:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242725;
  background: #f8f8f6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --accent: #c9443b;
  --accent-hover: #b7352e;
  --muted: #686e62;
  --line: #e4e6e0;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.skip-link { position: absolute; top: -80px; left: 20px; z-index: 20; padding: 12px 16px; background: #242725; color: #fff; border-radius: 5px; font-size: 13px; }
.skip-link:focus { top: 12px; }
button { border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #df6e65; outline-offset: 5px; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.local-status { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); letter-spacing: .05px; }
.status-dot { height: 6px; width: 6px; border-radius: 50%; background: #81917a; }

.account-field + .account-field { margin-top: 18px; }
.text-button { background: transparent; padding: 0; font-size: 11px; color: #626b5b; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--accent); }
#account-forgot { margin-top: 14px; }
.account-switch { display: block; margin: 20px auto 0; }
.account-email { color: #394532; font-size: 14px; overflow-wrap: anywhere; }
.account-notice { font-size: 12px; line-height: 1.7; background: #f0f4eb; border-radius: 7px; padding: 12px; color: #45543b; }
.account-transfer { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 20px; }
.account-transfer h3 { font-size: 14px; font-weight: 600; }
.account-transfer p { font-size: 12px; line-height: 1.7; color: var(--muted); }
.account-transfer .button { margin-top: 14px; min-height: 39px; font-size: 12px; }
.account-local-library { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 20px; }
.account-local-library h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.account-local-library > p { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0 0 15px; }
.account-local-library .button { min-height: 39px; font-size: 12px; }
.reminder-setting { display: flex; align-items: flex-start; gap: 9px; margin: 20px 0 7px; color: #454c40; font-size: 12px; line-height: 1.6; cursor: pointer; }
.reminder-setting input { flex-shrink: 0; width: 16px; height: 16px; margin: 1px 0 0; padding: 0; accent-color: var(--accent); }
.reminder-setting input:focus-visible { outline: 2px solid #d96a60; outline-offset: 3px; }
.account-local-library > .input-hint { font-size: 10px; margin: 0; }
.transfer-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; margin-bottom: 28px; background: #eff2e9; border-radius: 9px; }
.transfer-banner strong { color: #45533c; font-size: 13px; font-weight: 570; }
.transfer-banner p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 6px 0 0; }
.transfer-banner .button { min-height: 37px; font-size: 11px; flex-shrink: 0; }
.transfer-banner-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.transfer-banner-actions .text-button { color: #565e4e; }
.transfer-banner .transfer-banner-error { color: #b33f36; }

.workspace { width: min(1160px, 89.2%); margin: 0 auto; flex: 1; padding: 60px 0 80px; animation: workspace-in 450ms ease-out both; }
.library-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 40px; }
.library-heading-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.eyebrow { font-size: 10px; letter-spacing: 1.9px; color: var(--muted); font-weight: 650; margin: 0 0 13px; }
h1 { font-size: clamp(30px, 3.4vw, 41px); font-weight: 620; letter-spacing: -1.55px; line-height: 1.15; display: flex; align-items: center; gap: 14px; margin: 0; }
.video-count { height: 26px; min-width: 27px; padding: 0 8px; border: 1px solid #dfe2d9; border-radius: 7px; font-size: 12px; font-weight: 500; color: #6e746b; line-height: 24px; letter-spacing: 0; background: #f1f2ed; }
.library-description { color: var(--muted); font-size: 14px; margin: 13px 0 0; line-height: 1.6; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; font-size: 13px; font-weight: 560; border-radius: 7px; transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease; white-space: nowrap; }
.button .icon { width: 17px; height: 17px; }
.button-primary { color: #fff; background: var(--accent); box-shadow: 0 2px 3px #48201a0b, inset 0 1px 0 #ffffff13; }
.button-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.button-primary:active { transform: translateY(0); }
.button-secondary { background: #fff; border: 1px solid var(--line); color: #565c53; }
.button-secondary:hover { background: #f2f3ef; }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.collection-divider { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--line); color: #6b7265; font-size: 11px; min-height: 46px; gap: 12px; }
.category-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 17px; min-width: 0; padding-bottom: 11px; flex: 1; }
.category-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 0; color: var(--muted); background: transparent; border-bottom: 2px solid transparent; font-size: 12px; white-space: nowrap; }
.category-tab:hover { color: #242725; }
.category-tab.is-active { color: #394532; border-bottom-color: #4e5848; }
.category-tab-label { max-width: 155px; overflow: hidden; text-overflow: ellipsis; }
.category-tab-count { font-size: 10px; color: #6b7265; background: #eeefe9; padding: 1px 5px; border-radius: 4px; line-height: 1.5; }
.category-create { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 6px 0; background: transparent; color: #6b7265; font-size: 11px; }
.category-create:hover { color: var(--accent); }
.category-create .icon { width: 14px; height: 14px; }
.collection-tools { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; white-space: nowrap; }
.category-edit { display: grid; place-items: center; height: 26px; width: 26px; background: transparent; color: #686e62; border-radius: 4px; }
.category-edit:hover { color: var(--accent); background: #f2e9e4; }
.category-edit .icon { width: 15px; height: 15px; }
.search-disclosure { display: flex; align-items: center; min-width: 0; }
.search-toggle { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 32px; padding: 0; border-radius: 5px; color: #68715e; background: transparent; transition: color 160ms ease, background 160ms ease; }
.search-toggle .icon { width: 17px; height: 17px; }
.search-toggle:hover { background: #eeefe9; color: #343e2b; }
.search-toggle[aria-expanded="true"] { color: var(--accent); background: #f5ebe6; }
.search-reveal { width: 0; margin-right: 0; opacity: 0; visibility: hidden; transform: translateX(7px); overflow: hidden; transition: width 220ms ease, margin-right 220ms ease, opacity 160ms ease, transform 220ms ease, visibility 0s linear 220ms; }
.search-disclosure.is-open .search-reveal { width: 220px; margin-right: 8px; opacity: 1; visibility: visible; transform: translateX(0); transition-delay: 0s; }
.search-field { display: flex; align-items: center; gap: 5px; width: 100%; padding: 0 2px; border-bottom: 1px solid #c7cebd; background: transparent; transition: border-color 160ms ease; }
.search-field:focus-within { border-bottom-color: #849578; }
.search-field input { height: 31px; font-size: 12px; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear { display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 28px; padding: 0; background: transparent; color: #686e62; border-radius: 4px; }
.search-clear .icon { width: 14px; height: 14px; }
.search-clear:hover { color: #242725; background: #eeefe9; }
.filtered-empty { text-align: center; padding: 75px 12px; }
.filtered-empty > .icon { width: 34px; height: 34px; color: #818c77; stroke-width: 1.3; }
.filtered-empty h2 { font-size: 21px; font-weight: 570; letter-spacing: -.5px; margin: 20px 0 10px; }
.filtered-empty p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.filtered-empty > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 24px; }

.empty-state { text-align: center; padding: 66px 12px 36px; }
.empty-art { position: relative; width: 200px; height: 147px; margin: 0 auto 36px; }
.art-card { position: absolute; width: 132px; height: 99px; border-radius: 9px; border: 1px solid #dfe2d9; background: #f0f1ec; }
.art-card-back { left: 21px; top: 12px; transform: rotate(-13deg); background: #e9ede5; }
.art-card-middle { top: 15px; right: 17px; transform: rotate(11deg); background: #f0e7df; border-color: #e8ddd2; }
.art-card-front { left: 35px; top: 27px; height: 107px; padding: 11px; background: #fff; box-shadow: 0 8px 18px #3b483410; transform: rotate(-2deg); }
.art-play { height: 55px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: #ecede6; }
.art-play svg { fill: #8c9683; height: 25px; width: 25px; }
.art-line { display: block; width: 75px; height: 4px; margin-top: 9px; border-radius: 3px; background: #e5e8df; }
.art-line-short { width: 46px; height: 3px; margin-top: 5px; background: #eff0ec; }
.art-bookmark { position: absolute; right: 16px; bottom: 4px; height: 38px; width: 38px; background: #fff; border: 1px solid #e9ddd6; box-shadow: 0 3px 7px #4532240b; border-radius: 50%; display: grid; place-items: center; color: var(--accent); transform: rotate(8deg); }
.art-bookmark .icon { width: 17px; height: 17px; }
.empty-kicker { font-size: 9px; font-weight: 600; color: #6b7265; letter-spacing: 1.5px; margin: 0 0 14px; }
.empty-state h2 { font-size: 24px; letter-spacing: -.7px; font-weight: 570; margin: 0 0 12px; }
.empty-state > p:not(.empty-kicker) { font-size: 13px; line-height: 1.85; color: var(--muted); margin: 0; }
.empty-state .button { margin-top: 25px; }
.empty-note { display: block; font-size: 10px; margin-top: 15px; color: #6b7265; }

.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 36px 25px; padding-top: 29px; }
.video-grid:empty { display: none; }
.video-card { min-width: 0; }
.add-video-card { display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: stretch; width: 100%; min-width: 0; padding: 24px; border: 1px dashed #c9d0c1; border-radius: 9px; color: #4d5b42; background: #f3f5ef; transition: border-color 180ms ease, background 180ms ease; }
.add-video-card:hover { background: #edf1e7; border-color: #94a284; }
.add-video-card-plus { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 17px; border: 1px solid #d9e0d1; border-radius: 50%; background: #ffffffb3; color: #71845f; transition: transform 180ms ease; }
.add-video-card-plus .icon { width: 23px; height: 23px; stroke-width: 1.5; }
.add-video-card:hover .add-video-card-plus { transform: translateY(-2px); }
.add-video-card-label { font-size: 15px; font-weight: 560; letter-spacing: -.2px; }
.add-video-card-caption { max-width: 100%; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #68745d; font-size: 11px; }
.video-card.is-removing { position: relative; overflow: hidden; border-radius: 9px; }
.video-card.is-removing .video-card-content { filter: blur(5px); opacity: .4; pointer-events: none; user-select: none; }
.removal-overlay { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #e0e2d8; border-radius: 9px; background: #f8f8f6b8; animation: removal-in 180ms ease-out both; }
.removal-label { color: #59634f; font-size: 11px; letter-spacing: .1px; }
.removal-countdown { margin: 6px 0 12px; font-size: 32px; font-weight: 570; line-height: 1.2; letter-spacing: -1px; color: #343c2e; font-variant-numeric: tabular-nums; }
.removal-progress { display: block; width: 94px; height: 3px; border: 0; border-radius: 3px; overflow: hidden; appearance: none; background: #dce2d3; color: #7e8f6e; }
.removal-progress::-webkit-progress-bar { background: #dce2d3; border-radius: 3px; }
.removal-progress::-webkit-progress-value { background: #7e8f6e; border-radius: 3px; }
.removal-progress::-moz-progress-bar { background: #7e8f6e; border-radius: 3px; }
.removal-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.card-undo { min-height: 38px; padding-inline: 17px; background: #fffffff0; border-color: #cfd7c5; color: #3f4e34; font-size: 12px; }
.card-undo:hover { background: #fff; border-color: #aab99b; }
.button-delete-now { min-height: 38px; padding-inline: 13px; font-size: 12px; color: #a1372f; border: 1px solid #e4c6bc; background: #faeee9; }
.button-delete-now:hover { color: #902b24; border-color: #d5a496; background: #f6e3db; }
.video-link { display: block; border-radius: 9px; }
.thumbnail { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 9px; background: #e7eae2; isolation: isolate; }
.thumbnail-image { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 300ms ease; }
.thumbnail::after { content: ''; position: absolute; inset: 0; background: #13200d12; transition: background 200ms ease; }
.thumbnail-play { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -42%); width: 45px; height: 45px; border-radius: 50%; background: #ffffffed; display: grid; place-items: center; opacity: 0; transition: opacity 180ms ease, transform 180ms ease; color: #242725; }
.thumbnail-play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 3px; }
.video-link:hover .thumbnail-image { transform: scale(1.035); }
.video-link:hover .thumbnail::after { background: #13200d25; }
.video-link:hover .thumbnail-play, .video-link:focus-visible .thumbnail-play { opacity: 1; transform: translate(-50%, -50%); }
.thumbnail-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: #85917c; }
.thumbnail-fallback .icon { height: 36px; width: 36px; stroke-width: 1.2; }
.no-thumbnail .thumbnail-fallback { display: flex; }
.video-title { font-size: 14px; line-height: 1.55; font-weight: 560; letter-spacing: -.15px; margin: 13px 0 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-details { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #6b7265; font-size: 11px; line-height: 1.5; }
.video-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-details .icon { width: 15px; height: 15px; color: #a0a59b; transition: color 160ms ease, transform 160ms ease; }
.video-link:hover .video-details .icon { color: var(--accent); transform: translate(1px, -1px); }
.video-card.is-new { animation: card-in 300ms ease-out both; }
.video-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.video-annotations { margin-top: 10px; }
.annotation-actions { display: flex; gap: 15px; }
.annotation-button { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 2px 0; color: #626b5b; background: transparent; font-size: 11px; }
.annotation-button .icon { width: 14px; height: 14px; }
.annotation-button:hover { color: var(--accent); }
.annotation-button.has-note { padding-inline: 7px; border-radius: 5px; color: #80633c; background: #f4eee3; }
.annotation-button.has-note:hover { color: #71552e; background: #eee5d4; }
.note-presence-dot { width: 5px; height: 5px; margin-left: 1px; border-radius: 50%; background: currentColor; }
.video-tags, .tag-drafts { display: flex; flex-wrap: wrap; gap: 6px; }
.video-tags { margin-top: 7px; }
.video-tag { max-width: 100%; padding: 4px 8px; color: #576b85; background: #edf1f8; border-radius: 5px; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.tag-drafts { margin-bottom: 20px; }
.tag-drafts:empty { margin: 0; }
.tag-draft { display: inline-flex; align-items: center; max-width: 100%; gap: 7px; padding: 5px 7px 5px 10px; background: #edf1f8; border: 1px solid #dce4ef; border-radius: 6px; color: #576b85; font-size: 12px; }
.tag-draft > span { min-width: 0; overflow-wrap: anywhere; }
.tag-draft button { display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; padding: 0; color: #697c94; background: transparent; border-radius: 3px; }
.tag-draft button:hover { color: var(--accent); background: #fff; }
.tag-draft .icon { width: 13px; height: 13px; }
.tag-input-row { display: flex; gap: 8px; }
.tag-input-row .input-wrap { min-width: 0; flex: 1; }
.tag-input-row .button { flex-shrink: 0; min-height: 46px; padding-inline: 12px; font-size: 12px; }
.annotation-count { color: #626b5b; font-size: 10px; margin: 9px 0 0; line-height: 1.6; }
#note-input { display: block; width: 100%; min-height: 180px; max-height: 45svh; resize: vertical; padding: 12px; font: inherit; font-size: 13px; line-height: 1.7; border: 1px solid #89937f; border-radius: 7px; color: #343b30; background: #fff; }
#note-input:focus-visible { outline: 2px solid #d96a60; outline-offset: 2px; }
.note-input-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.note-input-meta .annotation-count { white-space: nowrap; }
.video-category-button { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; min-height: 32px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: #686e62; font-size: 11px; transition: background 160ms ease, border-color 160ms ease; }
.video-category-button:hover { background: #eeefe9; border-color: #d1d6c9; }
.video-category-button.is-assigned { color: #45543b; background: #eef1e9; border-color: #dce3d5; }
.video-category-button .icon { width: 14px; height: 14px; }
.video-category-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.remove-video { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; margin-left: auto; padding: 0; border-radius: 6px; background: transparent; color: #7c8375; transition: background 160ms ease, color 160ms ease; }
.remove-video .icon { width: 16px; height: 16px; }
.remove-video:hover { color: #b43c32; background: #faeae5; }
.remove-video:disabled { opacity: .4; cursor: default; }
.time-button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: #686e62; font-size: 11px; transition: background 160ms ease, border-color 160ms ease; }
.time-button .icon { width: 14px; height: 14px; }
.time-button:hover { background: #eeefe9; border-color: #d1d6c9; }
.time-button.has-time { color: #aa392f; background: #fcf0ed; border-color: #ecd4cd; font-variant-numeric: tabular-nums; }
.time-button.has-time:hover { background: #f8e5df; border-color: #e0b6ac; }
.library-error { padding: 14px; border: 1px solid #e8c7c2; border-radius: 7px; color: #a53d35; font-size: 13px; line-height: 1.6; background: #fff6f4; margin: 20px 0 0; }

.site-footer { width: 89.2%; margin: 0 auto; min-height: 63px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #6b7265; font-size: 10px; }
.site-footer > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.footer-dot { height: 5px; width: 5px; border-radius: 50%; background: #9ba58f; }
.workspace-footer { display: block; padding: 30px 0 22px; font-size: 12px; }
.workspace-footer-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.footer-wordmark { font-size: 22px; font-weight: 700; letter-spacing: -.9px; color: #242725; }
.footer-wordmark span { color: var(--accent); }
.workspace-footer-main p { margin: 9px 0 0; font-size: 12px; line-height: 1.7; }
.workspace-footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: 13px 30px; line-height: 1.5; }
.workspace-footer a:hover { color: var(--accent); }
.workspace-footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); margin-top: 27px; padding-top: 17px; font-size: 11px; line-height: 1.7; }

dialog { width: min(488px, calc(100% - 32px)); padding: 0; border: 1px solid #e6e7e2; border-radius: 15px; color: #242725; background: #fff; box-shadow: 0 20px 100px #161d1640; max-height: calc(100svh - 40px); }
dialog[open] { animation: dialog-in 180ms ease-out both; }
dialog::backdrop { background: #20251e62; backdrop-filter: blur(4px); }
.dialog-content { padding: 27px 29px 26px; }
.dialog-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 23px; }
.dialog-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #f1dad5; background: #fcf1ee; color: var(--accent); border-radius: 11px; }
.dialog-icon .icon { width: 21px; height: 21px; }
.icon-button { display: grid; place-items: center; background: transparent; color: #8c9286; width: 32px; height: 32px; margin: -8px -10px 0 0; border-radius: 5px; }
.icon-button:hover { background: #f4f5f1; color: #242725; }
.icon-button .icon { width: 19px; height: 19px; }
dialog h2 { font-size: 25px; font-weight: 590; letter-spacing: -.8px; line-height: 1.3; margin: 0 0 9px; }
#dialog-description, .dialog-description { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 28px; }
#time-video-title, .dialog-video-title { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0 0 25px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.category-field { margin-top: 20px; }
.optional-label { font-weight: 400; color: #6b7265; font-size: 10px; margin-left: 5px; }
select { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #89937f; border-radius: 7px; color: #343b30; background: #fff; font-size: 12px; cursor: pointer; text-overflow: ellipsis; }
select:focus-visible { outline: 2px solid #d96a60; outline-offset: 2px; }
.category-picker-field { padding-right: 12px; }
.category-picker-field input { font-size: 12px; height: 44px; }
.category-picker-chevron { color: #6b7265; font-size: 18px; line-height: 1; pointer-events: none; }
.category-picker-options { max-height: 176px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 7px; margin-top: 6px; padding: 4px; background: #fff; }
.category-picker-option { display: block; width: 100%; min-height: 36px; padding: 8px 10px; text-align: left; font-size: 12px; color: #343b30; background: transparent; border-radius: 4px; overflow-wrap: anywhere; }
.category-picker-option[aria-selected="true"] { font-weight: 650; }
.category-picker-option:hover, .category-picker-option.is-highlighted { background: #f0f2eb; }
.category-picker-create { color: var(--accent); border-top: 1px solid var(--line); border-radius: 0 0 4px 4px; margin-top: 3px; }
.category-picker-status { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.category-picker-field:has(input:disabled) { opacity: .65; }
#start-time { font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
form label { font-size: 12px; font-weight: 570; display: block; margin-bottom: 9px; }
.input-wrap { display: flex; gap: 10px; align-items: center; border: 1px solid #89937f; border-radius: 7px; padding: 0 13px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.input-wrap:focus-within { border-color: #d96a60; box-shadow: 0 0 0 3px #d84e4410; }
.input-wrap .icon { width: 17px; height: 17px; color: #949b8d; }
input { min-width: 0; width: 100%; height: 46px; background: transparent; border: 0; outline: none; font-size: 12px; color: #343b30; }
input::placeholder { color: #737b69; }
input:focus-visible { outline: 0; }
.input-wrap:has([aria-invalid="true"]) { border-color: #c65145; }
.input-hint { font-size: 10px; color: #6b7265; margin: 10px 0 0; line-height: 1.6; }
.form-error { color: #b33f36; background: #fff5f3; border: 1px solid #f2d5cf; padding: 10px 12px; border-radius: 6px; font-size: 12px; line-height: 1.6; margin: 15px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 26px; }
.dialog-actions .button { min-height: 41px; font-size: 12px; }
.button-clear { background: transparent; color: #686e62; padding-inline: 0; margin-right: auto; }
.button-clear:hover { color: var(--accent); }
.time-dialog-actions, .category-dialog-actions { flex-wrap: wrap; }
.dialog-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; background: #f8f9f5; border-top: 1px solid #edf0e8; padding: 15px 18px; font-size: 10px; color: #6b7265; }
.dialog-footnote .icon { width: 12px; height: 12px; }
.backup-section h3 { margin: 0 0 7px; font-size: 14px; font-weight: 600; }
.backup-section > p { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.backup-section .button { min-height: 39px; font-size: 12px; }
.backup-import { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
#backup-file { height: auto; min-height: 40px; padding: 0; font-size: 11px; color: var(--muted); cursor: pointer; }
#backup-file:focus-visible { outline: 2px solid #d96a60; outline-offset: 3px; border-radius: 7px; }
#backup-file::file-selector-button { min-height: 39px; margin-right: 12px; padding: 0 13px; background: #fff; color: #565c53; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 12px; font-weight: 560; cursor: pointer; }
#backup-file::file-selector-button:hover { background: #f2f3ef; }
.backup-import > .input-hint { font-size: 10px; margin: 8px 0 0; }
.backup-preview { margin-top: 19px; padding: 16px; background: #f4f6f0; border-radius: 8px; }
.backup-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.backup-counts div { display: flex; flex-direction: column-reverse; gap: 5px; }
.backup-counts dt { font-size: 10px; line-height: 1.5; color: var(--muted); }
.backup-counts dd { margin: 0; color: #394532; font-size: 23px; font-weight: 580; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.backup-preview p { font-size: 10px; line-height: 1.6; color: #606a58; margin: 13px 0 0; }
#backup-dialog .button:disabled { cursor: default; opacity: .5; }
.button-spinner { width: 14px; height: 14px; border: 2px solid #ffffff66; border-top-color: #fff; border-radius: 50%; animation: spin 700ms linear infinite; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; display: flex; align-items: center; gap: 10px; padding: 14px 19px; border-radius: 9px; font-size: 12px; background: #2f392c; color: #fff; box-shadow: 0 6px 25px #25331b25; animation: toast-in 180ms ease-out; z-index: 5; }
.toast .icon { width: 16px; height: 16px; color: #b9c9a5; }

@keyframes workspace-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes removal-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; bottom: 18px; } to { opacity: 1; bottom: 28px; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 1600px) { .site-footer { max-width: 1320px; } }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .workspace { padding-top: 44px; } .empty-state { padding-top: 55px; } }
@media (min-width: 601px) and (max-width: 900px) { .transfer-banner { align-items: flex-start; flex-direction: column; gap: 14px; } }
@media (max-width: 600px) {
  .local-status { font-size: 0; gap: 0; }
  .status-dot { height: 7px; width: 7px; }

  .workspace-footer-main { flex-direction: column; gap: 23px; }
  .workspace-footer nav { gap: 11px 24px; font-size: 11px; }
  .workspace-footer-bottom { flex-direction: column; gap: 8px; text-align: left; }
  .transfer-banner { align-items: flex-start; flex-direction: column; gap: 12px; padding: 16px; }
  .workspace { width: calc(100% - 46px); padding: 37px 0 55px; }
  .library-heading { gap: 12px; align-items: flex-start; margin-bottom: 27px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.4px; margin-bottom: 10px; }
  h1 { font-size: 29px; letter-spacing: -1.2px; gap: 9px; }
  .video-count { height: 23px; line-height: 21px; font-size: 10px; min-width: 23px; padding: 0 6px; border-radius: 6px; }
  .library-description { font-size: 12px; max-width: 180px; margin-top: 11px; }
  .library-heading-actions { flex-direction: column-reverse; gap: 7px; margin-top: 20px; align-items: stretch; }
  .library-heading-actions .button { padding: 0 11px; font-size: 11px; min-height: 36px; gap: 4px; }
  .library-heading-actions .button .icon { width: 15px; height: 15px; }
  .collection-divider { font-size: 9px; }
  .collection-divider { align-items: flex-start; flex-direction: column; gap: 0; }
  .category-tabs { gap: 3px 14px; width: 100%; padding-bottom: 8px; }
  .category-tab { font-size: 11px; }
  .category-tab-label { max-width: 130px; }
  .collection-tools { align-self: flex-end; padding-bottom: 12px; gap: 7px; max-width: 100%; }
  .search-disclosure.is-open .search-reveal { width: clamp(110px, calc(100vw - 230px), 200px); }
  .empty-state { padding: 45px 0 15px; }
  .empty-art { transform: scale(.9); margin-bottom: 22px; }
  .empty-kicker { font-size: 8px; letter-spacing: 1px; }
  .empty-state h2 { font-size: 21px; line-height: 1.4; letter-spacing: -.5px; }
  .empty-state > p:not(.empty-kicker) { font-size: 12px; }
  .empty-note { font-size: 9px; }
  .video-grid { grid-template-columns: 1fr; gap: 29px; padding-top: 23px; }
  .video-title { font-size: 14px; }
  .site-footer { width: calc(100% - 46px); font-size: 9px; min-height: 62px; gap: 15px; }
  .site-footer > span:last-child { text-align: right; }
  .dialog-content { padding: 24px 22px; }
  dialog h2 { font-size: 23px; }
  .dialog-footnote { font-size: 9px; padding-inline: 12px; }
}
@media (max-width: 359px) {
  .library-heading { flex-wrap: wrap; }
  .library-heading > div:first-child { width: 100%; }
  .library-heading-actions { flex-direction: row; margin-top: 0; }
  .library-heading-actions .button:last-child { order: -1; }
  h1 { font-size: 25px; }
  .library-heading-actions .button { padding: 0 8px; }
  .collection-divider > span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
