@layer reset, app, theme, preview, responsive;
@layer reset {
  * { box-sizing: border-box; }
  :root { font-family: system-ui, sans-serif; color: #24262d; background: #f7f8fa; font-synthesis: none; color-scheme: light; --accent: #ef4438; --muted: #626a78; --line: #e7e8ec; }
  body { margin: 0; }
  button, input, textarea, select { font: inherit; }
  button, select, summary { cursor: pointer; }
  button { color: inherit; }
  button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
  button { border: 0; background: transparent; }
  button:disabled { cursor: wait; opacity: .6; }
  input, textarea, select { width: 100%; min-width: 0; }
  a { color: inherit; }
  h1, h2, h3, p { margin: 0; }
  button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible { outline: 3px solid #ee6d60; outline-offset: 3px; }
  input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  [hidden] { display: none !important; }
  [data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
  [data-icon] svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
}
@layer app {
  .skip-link { position: fixed; left: 16px; top: 10px; background: #fff; padding: 16px; z-index: 100; clip-path: inset(50%); opacity: 0; pointer-events: none; }
  .skip-link:focus { clip-path: none; opacity: 1; pointer-events: auto; }
  .app-header { height: 60px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
  .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; font-weight: 750; letter-spacing: -.65px; }
  .brand-light { font-weight: 450; color: #71757e; margin-left: 4px; }
  .header-right { display: flex; align-items: center; gap: 16px; }
  .header-guide { font-size: 13px; text-underline-offset: 4px; }
  .about-preview { padding: 48px 28px; border-top: 1px solid var(--line); max-width: 1180px; margin: 0 auto; line-height: 1.7; }
  .about-preview h2 { font-size: clamp(22px, 3vw, 28px); line-height: 1.25; margin-bottom: 14px; }
  .about-preview-intro { max-width: 740px; }
  .about-preview p { color: var(--muted); font-size: 15px; }
  .about-preview-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
  .about-preview h3 { font-size: 16px; margin-bottom: 8px; }
  .thumbnail-guides { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
  .thumbnail-guides a { display: block; width: fit-content; margin-top: 10px; text-underline-offset: 4px; }
  .thumbnail-guides a span { font-size: 12px; color: var(--muted); }
  .privacy-badge { display: flex; align-items: center; gap: 8px; color: #58625d; font-size: 12px; font-weight: 600; }
  .privacy-badge > span, .live-dot { width: 6px; height: 6px; background: #419772; border-radius: 50%; display: inline-block; }
  .icon-button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; color: #686e79; flex: none; }
  .icon-button:hover { background: #e9ebef; }
  .app-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); height: calc(100dvh - 60px); min-height: 0; }
  .editor { padding: 22px 24px 20px; background: #fff; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
  .editor-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
  .editor-title h2 { font-size: 18px; font-weight: 650; letter-spacing: -.45px; }
  .step-label { font-size: 10px; letter-spacing: .09em; color: #626a78; font-weight: 650; }
  .drop-zone { position: relative; min-height: 173px; border: 1.5px dashed #d6d8de; border-radius: 10px; background: #fafbfc; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; text-align: center; transition: border-color .12s, background .12s; }
  .drop-zone:hover, .drop-zone.dragging, .drop-zone:focus-within { background: #fff6f3; border-color: var(--accent); }
  .drop-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
  .drop-symbol { color: #818893; margin-bottom: 7px; }
  .drop-symbol svg { width: 27px; height: 27px; stroke-width: 1.4; }
  .drop-zone strong { font-size: 14px; font-weight: 600; }
  .drop-zone > span:not(.drop-symbol) { font-size: 13px; color: #626a78; }
  .choose-link { color: #bd352b; text-decoration: underline; text-underline-offset: 3px; }
  .drop-zone small { margin-top: 7px; font-size: 11px; color: #626a78; }
  .drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .variants { display: flex; gap: 7px; overflow-x: auto; padding: 4px 2px; margin: 13px -2px 0; scrollbar-width: thin; }
  .variants:empty { display: none; }
  .comparison-label { margin-top: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
  .comparison-label > span { color: var(--muted); font-size: 12px; }
  .variant { width: 72px; flex: none; position: relative; }
  .variant-select { display: block; padding: 3px; width: 100%; border: 1.5px solid transparent; border-radius: 7px; }
  .variant-select[aria-pressed=true] { border-color: var(--accent); }
  .variant-select img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
  .variant-select .variant-number { font-size: 13px; font-weight: 650; color: #747882; display: block; padding-top: 5px; }
  .variant-remove { position: absolute; right: 0; top: 0; width: 28px; height: 28px; border: 2px solid white; background: #444851; color: #fff; border-radius: 50%; font-size: 15px; line-height: 15px; }
  .image-info { font-size: 11px; line-height: 1.6; color: #626a78; margin: 11px 0 23px; overflow-wrap: anywhere; }
  .file-status { font-size: 12px; color: #af4432; line-height: 1.5; margin-bottom: 16px; white-space: pre-line; }
  .retry-button { min-height: 32px; padding: 6px 12px; text-decoration: underline; text-underline-offset: 3px; margin-bottom: 12px; }
  .file-status:empty { display: none; }
  .field-label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; margin: 18px 0 8px; }
  .field-label > span { color: #626a78; font-size: 11px; font-weight: 450; }
  input:not([type=file]):not([type=range]), textarea, select { color: #333841; background: #fff; border: 1px solid #dcdee5; border-radius: 7px; padding: 11px 12px; font-size: 13px; line-height: 1.5; }
  textarea { display: block; resize: vertical; min-height: 86px; }
  .field-hint { font-size: 11px; color: #626a78; margin-top: 7px; }
  .metadata-settings { border-top: 1px solid #eff0f3; border-bottom: 1px solid #eff0f3; margin-top: 23px; padding: 16px 0; }
  .metadata-settings summary { display: flex; justify-content: space-between; list-style: none; font-size: 13px; color: #6f747f; }
  .metadata-settings summary::-webkit-details-marker { display: none; }
  .metadata-settings summary svg { width: 15px; height: 15px; }
  .metadata-settings[open] summary [data-icon] { transform: rotate(180deg); }
  .field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .placement { display: flex; align-items: center; gap: 12px; margin: 19px 0 16px; }
  .placement label { margin: 0; flex: 1; white-space: nowrap; font-weight: 450; }
  .placement select { width: 111px; padding: 8px; font-size: 12px; }
  .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #dfe2e8; background: #fff; border-radius: 7px; padding: 9px 12px; font-size: 12px; font-weight: 500; line-height: 1.5; }
  .secondary-button:hover { border-color: #a6aab4; background: #f9fafb; }
  .secondary-button svg { width: 16px; height: 16px; }
  #shuffle { width: 100%; }
  .library-hint { margin: 8px 0 12px; }
  #shuffle:disabled { opacity: .6; cursor: wait; }
  .editor-footer { display: flex; align-items: flex-start; gap: 9px; margin-top: 28px; color: #626a78; font-size: 11px; line-height: 1.8; }
  .editor-footer svg { height: 14px; width: 14px; margin-top: 4px; }
  .editor-footer p > span { color: #626a78; }
  .editor-guide { margin-top: 14px; font-size: 12px; line-height: 1.7; color: var(--muted); }
  .guide-new-tab { display: block; font-size: 11px; }
  .text-button { padding: 9px 0; color: #8b5d58; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
  .workspace { min-width: 0; min-height: 0; padding: 16px 18px 0; outline: none; display: flex; flex-direction: column; }
  .workspace > :not(.preview-viewport) { flex: none; }
  .workspace-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
  .eyebrow { color: #626a78; font-size: 9px; font-weight: 650; letter-spacing: .13em; margin-bottom: 4px; }
  .workspace-heading h1 { font-size: 22px; font-weight: 620; letter-spacing: -.6px; }
  .fullscreen-button { color: #626875; background: transparent; }
  .workspace-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
  .controls-bar { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 12px; }
  .segments { display: flex; padding: 3px; gap: 2px; background: #e9ebef; border-radius: 8px; }
  .segments button { padding: 8px 14px; font-size: 12px; font-weight: 550; color: #626a78; border-radius: 5px; white-space: nowrap; }
  .segments button[aria-pressed=true] { background: #fff; color: #292e38; box-shadow: 0 1px 4px #20263210; }
  .preview-controls { display: flex; align-items: center; gap: 8px; }
  .devices button { display: grid; place-items: center; padding: 7px 11px; }
  .devices svg { width: 17px; height: 17px; }
  .zoom-bar { display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
  .zoom-presets { background: transparent; padding: 0; gap: 5px; }
  .zoom-presets button { border: 1px solid #dfe2e8; padding: 6px 10px; font-weight: 450; }
  .zoom-presets button[aria-pressed=true] { border-color: #9aa1af; box-shadow: none; }
  .zoom-slider { display: flex; flex: 1; max-width: 240px; min-width: 145px; align-items: center; gap: 8px; font-size: 12px; color: #626a78; }
  .zoom-slider input { display: block; flex: 1; width: 100%; margin: 0; padding: 0; height: 28px; accent-color: var(--accent); cursor: pointer; }
  .zoom-slider output { min-width: 37px; text-align: right; color: #454d5c; font-variant-numeric: tabular-nums; }
  .zoom-help { color: #626a78; font-size: 11px; line-height: 1.6; margin: 6px 0 10px; }
  .quick-compare { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; font-size: 12px; color: var(--muted); flex: none; min-width: 0; }
  #quick-options { flex: 1; min-width: 90px; }
  #export-comparison { margin-left: auto; flex: none; }
  #quick-options { display: flex; gap: 6px; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
  .quick-version { min-width: 36px; min-height: 34px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; color: inherit; font-weight: 650; flex: none; }
  .quick-version[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #151619; }
  .quick-version:hover { border-color: var(--accent); }
  .preview-viewport:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .preview-viewport { border: 1px solid #dfe2e7; border-radius: 8px; background: #eef0f3; padding: 0; overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
  #preview-boundary { margin: 0 auto; position: relative; }
  .youtube { transform-origin: top left; }
  .workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #626a78; font-size: 10px; line-height: 1.6; padding: 8px 0; }
  .workspace-footer > span:first-child { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
  .live-dot { width: 5px; height: 5px; }
  .fullscreen-note:empty { display: none; }
  body.preview-expanded { overflow: hidden; }
  body.preview-expanded .preview-viewport, .preview-viewport:fullscreen { position: fixed; inset: 0; z-index: 50; width: 100%; height: 100dvh; min-height: 0; border: 0; border-radius: 0; background: #fff; }
  body.preview-expanded .workspace > :not(.preview-viewport) { visibility: hidden; }
  dialog { padding: 28px; border: 1px solid #dfe2e8; border-radius: 14px; width: min(530px, calc(100% - 32px)); box-shadow: 0 20px 100px #1113; color: #333943; }
  dialog::backdrop { background: #171c2b65; backdrop-filter: blur(3px); }
  .dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .dialog-heading h2 { font-size: 23px; letter-spacing: -.7px; }
  dialog p { margin-top: 17px; font-size: 14px; line-height: 1.7; color: #676e7b; }
  dialog .dialog-footnote { font-size: 12px; }
  .credits-page { max-width: 720px; margin: 60px auto; padding: 24px; font-size: 16px; line-height: 1.8; }
  .credits-page h1 { font-size: 30px; margin: 24px 0 12px; }
  .credits-page p { margin: 20px 0; }
}
@layer theme {
  :root[data-theme=dark] { color-scheme: dark; background: #151619; color: #e5e6e9; --accent: #ff6555; --muted: #9b9fa9; --line: #2a2d33; }
  [data-theme=dark] .app-header, [data-theme=dark] .editor { background: #1b1c20; }
  [data-theme=dark] .brand-light { color: #a1a5ae; }
  [data-theme=dark] .privacy-badge { color: #a5b7ab; }
  [data-theme=dark] .icon-button { color: #a9aeba; }
  [data-theme=dark] .icon-button:hover { background: #303238; color: #fff; }
  [data-theme=dark] .step-label, [data-theme=dark] .eyebrow { color: #8d929e; }
  [data-theme=dark] .drop-zone { background: #212328; border-color: #40434d; }
  [data-theme=dark] .drop-zone:hover, [data-theme=dark] .drop-zone.dragging, [data-theme=dark] .drop-zone:focus-within { background: #2c2324; border-color: var(--accent); }
  [data-theme=dark] .drop-symbol { color: #a1a6b2; }
  [data-theme=dark] .drop-zone > span:not(.drop-symbol) { color: #a1a5af; }
  [data-theme=dark] .choose-link { color: #ff796a; }
  [data-theme=dark] .drop-zone small, [data-theme=dark] .image-info, [data-theme=dark] .field-hint, [data-theme=dark] .field-label > span { color: #9399a5; }
  [data-theme=dark] .variant-select .variant-number { color: #a9aeba; }
  [data-theme=dark] .variant-remove { border-color: #1b1c20; background: #858c99; color: #151619; }
  [data-theme=dark] .file-status { color: #ff9b80; }
  [data-theme=dark] input:not([type=file]):not([type=range]), [data-theme=dark] textarea, [data-theme=dark] select { background: #151619; color: #e1e3e8; border-color: #373a43; }
  [data-theme=dark] .metadata-settings { border-color: #303239; }
  [data-theme=dark] .metadata-settings summary { color: #a4a9b4; }
  [data-theme=dark] .secondary-button { background: #202227; color: #c8cbd3; border-color: #383b44; }
  [data-theme=dark] .secondary-button:hover { background: #2c2e35; border-color: #646a77; }
  [data-theme=dark] .editor-footer { color: #a1a7b3; }
  [data-theme=dark] .editor-footer p > span { color: #9298a4; }
  [data-theme=dark] .text-button { color: #ddaaa3; }
  [data-theme=dark] .segments { background: #25272d; }
  [data-theme=dark] .segments button { color: #9da3af; }
  [data-theme=dark] .segments button[aria-pressed=true] { background: #3a3d46; color: #f0f1f4; box-shadow: 0 1px 4px #0003; }
  [data-theme=dark] .zoom-presets { background: transparent; }
  [data-theme=dark] .zoom-presets button { border-color: #3b404b; }
  [data-theme=dark] .zoom-presets button[aria-pressed=true] { border-color: #707888; }
  [data-theme=dark] .zoom-help, [data-theme=dark] .zoom-slider { color: #9ba4b3; }
  [data-theme=dark] .zoom-slider output { color: #d0d6e0; }
  [data-theme=dark] .preview-viewport { border-color: #34363e; background: #111214; }
  [data-theme=dark] .workspace-footer { color: #959da9; }
  [data-theme=dark] dialog { background: #202227; color: #e6e8ef; border-color: #41454f; }
  [data-theme=dark] dialog p { color: #b0b6c2; }
  [data-theme=dark] .skip-link { background: #32363e; color: #fff; }
}
@layer preview {
  .youtube { --yt-bg: #fff; --yt-text: #0f0f0f; --yt-muted: #606060; --yt-chip: #f2f2f2; --yt-border: #dedede; background: var(--yt-bg); color: var(--yt-text); font: 14px Arial, sans-serif; min-height: 810px; width: 1280px; padding-bottom: 35px; }
  .youtube.dark { --yt-bg: #0f0f0f; --yt-text: #f1f1f1; --yt-muted: #aaa; --yt-chip: #272727; --yt-border: #333; color-scheme: dark; }
  .yt-header { height: 64px; display: flex; align-items: center; gap: 24px; padding: 0 26px; }
  .yt-header [data-icon] svg { width: 24px; height: 24px; }
  body.preview-expanded .yt-header { position: sticky; top: 0; z-index: 2; background: var(--yt-bg); }
  .yt-exit { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; color: var(--yt-text); }
  .yt-exit:hover { background: var(--yt-chip); }
  .yt-logo { display: flex; align-items: center; gap: 4px; position: relative; }
  .yt-logo h2 { font-size: 23px; font-weight: 750; letter-spacing: -1.5px; transform: scaleX(.87); transform-origin: left; margin-right: -10px; }
  .yt-logo sup { position: absolute; right: -15px; top: -5px; font-size: 9px; color: var(--yt-muted); }
  .yt-mark { display: block; width: 31px; height: 22px; background: #f03; border-radius: 7px; position: relative; }
  .yt-mark::after { content: ""; position: absolute; top: 6px; left: 12px; border-left: 10px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
  .yt-search { margin-left: auto; width: 480px; height: 40px; border: 1px solid var(--yt-border); border-radius: 25px; display: flex; align-items: center; color: var(--yt-muted); font-size: 16px; overflow: hidden; }
  .yt-search > span:first-child { padding-left: 20px; flex: 1; }
  .yt-search > span:last-child { background: var(--yt-chip); width: 64px; height: 100%; border-left: 1px solid var(--yt-border); color: var(--yt-text); }
  .yt-mic { background: var(--yt-chip); border-radius: 50%; width: 40px; height: 40px; margin-left: -10px; }
  .yt-account { margin-left: auto; display: flex; gap: 24px; align-items: center; }
  .viewer-avatar { background: #b54320; color: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; }
  .yt-layout { display: flex; }
  .yt-rail { width: 74px; flex: none; display: flex; flex-direction: column; gap: 32px; padding-top: 22px; text-align: center; }
  .yt-rail > span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .yt-rail svg { height: 24px; width: 24px; }
  .yt-rail small { font-size: 10px; }
  .yt-content { padding: 0 28px 0 16px; min-width: 0; flex: 1; }
  .yt-topics { position: relative; display: flex; gap: 12px; height: 57px; align-items: center; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .yt-topics > button { flex: none; padding: 8px 13px; background: var(--yt-chip); border-radius: 8px; font-size: 14px; font-weight: 600; }
  .yt-topics > button:hover { filter: brightness(.9); }
  .yt-topics > button:focus-visible { outline-color: var(--yt-text); outline-offset: 2px; }
  .yt-topics > [aria-pressed=true] { background: var(--yt-text); color: var(--yt-bg); }
  .yt-topics > [aria-busy=true] { opacity: .55; cursor: progress; }
  .sample-notice { padding: 8px 16px; }
  .sample-notice .retry-button { color: var(--yt-text); }
  .topic-status { color: var(--yt-muted); font-size: 13px; padding: 0 12px; }
  .topic-status:empty { display: none; }
  .feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 18px; padding-top: 13px; }
  .video-card { min-width: 0; }
  .youtube[data-layout=search] .yt-topics { display: none; }
  .youtube[data-layout=search] .feed { display: flex; flex-direction: column; gap: 24px; max-width: 1100px; margin: 0 auto; padding-top: 24px; }
  .youtube[data-layout=search] .video-card { display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
  .youtube[data-layout=search] .card-details { display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; column-gap: 8px; margin-top: 0; }
  .youtube[data-layout=search] .card-copy { display: contents; }
  .youtube[data-layout=search] .card-copy h3 { grid-column: 1 / 3; grid-row: 1; font-size: 20px; line-height: 26px; font-weight: 400; }
  .youtube[data-layout=search] .card-meta { grid-column: 1 / 3; grid-row: 2; margin: 4px 0 14px; font-size: 12px; }
  .youtube[data-layout=search] .channel-avatar { grid-column: 1; grid-row: 3; width: 24px; height: 24px; font-size: 12px; }
  .youtube[data-layout=search] .card-channel { grid-column: 2; grid-row: 3; align-self: center; font-size: 12px; }
  .youtube[data-layout=search] .card-more { grid-column: 3; grid-row: 1; }
  .thumbnail { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 11px; background: #222; container-type: inline-size; }
  .thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .thumbnail .sample-copy { position: absolute; inset: 0; padding: 5.3cqw; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; font-size: 9cqw; line-height: .98; font-weight: 900; letter-spacing: -.26cqw; text-shadow: 0 .5cqw 3cqw #0006; background: linear-gradient(0deg, #0008, transparent 80%); white-space: pre-line; }
  .thumbnail .sample-copy.bright { font-size: 11.6cqw; text-transform: uppercase; color: #ffffce; }
  .thumbnail .sample-copy.quiet { font-family: Georgia, serif; font-style: italic; letter-spacing: -.18cqw; font-weight: 500; font-size: 10.3cqw; text-align: center; justify-content: center; }
  .thumbnail .sample-copy.tech { color: white; font-size: 8.7cqw; text-transform: uppercase; }
  .thumbnail .sample-copy.interview { font-size: 9.6cqw; color: #fff4db; padding-top: 24cqw; background: linear-gradient(0deg, #17100deb, transparent 75%); }
  .thumbnail .sample-copy.album { font-size: 9cqw; letter-spacing: .6cqw; font-weight: 650; text-align: center; justify-content: center; background: #0004; }
  .thumbnail .sample-copy.loud { font-size: 11.6cqw; font-weight: 950; color: #fff15a; text-shadow: .3cqw .3cqw 0 #111, -.2cqw -.2cqw 0 #111, 0 .6cqw 2cqw #000; }
  .thumbnail .duration { position: absolute; right: 7px; bottom: 7px; background: #000c; color: #fff; padding: 2px 4px; font-size: 12px; font-weight: 600; line-height: 15px; border-radius: 4px; }
  .card-details { display: flex; align-items: flex-start; gap: 11px; margin-top: 12px; }
  .channel-avatar { border-radius: 50%; width: 36px; height: 36px; flex: none; display: grid; place-items: center; color: white; font-size: 16px; font-weight: 600; background: #62676e; }
  .avatar-0 { background: #454b58; } .avatar-1 { background: #5f7161; } .avatar-2 { background: #a06635; } .avatar-3 { background: #5c6688; } .avatar-4 { background: #8a715a; } .avatar-5 { background: #39756b; }
  .card-copy { flex: 1; min-width: 0; }
  .card-copy h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; line-height: 22px; font-weight: 600; margin: 0 0 5px; overflow-wrap: anywhere; }
  .card-channel, .card-meta { color: var(--yt-muted); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
  .card-more { font-size: 22px; line-height: 18px; width: 10px; flex: none; }
  .youtube.mobile { width: 390px; min-height: 800px; }
  .mobile .yt-header { padding: 0 16px; height: 56px; gap: 15px; }
  .mobile .yt-menu, .mobile .yt-search, .mobile .yt-mic, .mobile .yt-rail { display: none; }
  .mobile .yt-logo h2 { font-size: 22px; }
  .mobile .yt-account { gap: 18px; }
  .mobile .yt-account svg { height: 22px; width: 22px; }
  .mobile .viewer-avatar { width: 27px; height: 27px; font-size: 14px; }
  .mobile .yt-content { padding: 0; }
  .mobile .yt-topics { padding: 0 12px; height: 53px; gap: 8px; }
  .mobile .feed { grid-template-columns: 1fr; gap: 27px; padding-top: 4px; }
  .mobile .thumbnail { border-radius: 0; }
  .mobile .card-details { padding: 0 12px; }
  .mobile .card-copy h3 { font-size: 15px; line-height: 21px; margin-bottom: 3px; }
  .mobile .card-channel, .mobile .card-meta { font-size: 12px; line-height: 17px; }
  .youtube.mobile[data-layout=search] .feed { padding-top: 12px; }
  .youtube.mobile[data-layout=search] .video-card { display: block; }
  .youtube.mobile[data-layout=search] .card-details { display: flex; margin-top: 10px; }
  .youtube.mobile[data-layout=search] .card-copy { display: block; }
  .youtube.mobile[data-layout=search] .card-copy h3 { font-size: 15px; line-height: 21px; font-weight: 600; }
  .youtube.mobile[data-layout=search] .channel-avatar { width: 36px; height: 36px; }
  .youtube.mobile[data-layout=search] .card-meta { margin: 0; }
  .watch-layout { display: grid; grid-template-columns: minmax(0,1fr) 400px; gap: 25px; padding: 15px 28px; }
  .watch-player { aspect-ratio: 16/9; position: relative; background: #111; border-radius: 11px; overflow: hidden; }
  .watch-player > img { width: 100%; height: 100%; object-fit: cover; }
  .player-controls { display: flex; align-items: center; gap: 16px; position: absolute; bottom: 0; left: 0; right: 0; padding: 25px 18px 14px; color: #fff; background: linear-gradient(transparent, #000a); font-size: 12px; }
  .player-controls::before { content: ""; position: absolute; left: 15px; right: 15px; height: 3px; top: 15px; background: #fff5; border-left: 40px solid #f03; }
  .watch-main h2 { font-size: 20px; margin-top: 14px; line-height: 1.4; }
  .watch-channel { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; }
  .watch-channel small { color: var(--yt-muted); display: block; font-size: 12px; margin-top: 4px; }
  .subscribe { margin-left: 14px; padding: 10px 15px; border-radius: 24px; background: var(--yt-text); color: var(--yt-bg); font-weight: 600; }
  .watch-description { background: var(--yt-chip); border-radius: 10px; padding: 15px; font-size: 14px; line-height: 1.8; margin-top: 20px; white-space: pre-line; }
  .watch-comments { font-size: 19px; margin-top: 28px; font-weight: 600; }
  .suggested-feed { display: flex; flex-direction: column; gap: 15px; }
  .suggested-feed .video-card { display: flex; gap: 9px; }
  .suggested-feed .thumbnail { width: 168px; flex: none; height: 94.5px; border-radius: 8px; }
  .suggested-feed .card-details { margin: 0; gap: 4px; flex: 1; }
  .suggested-feed .channel-avatar { display: none; }
  .suggested-feed .card-copy h3 { font-size: 14px; line-height: 20px; -webkit-line-clamp: 3; margin-bottom: 3px; }
  .suggested-feed .card-channel, .suggested-feed .card-meta { font-size: 12px; line-height: 17px; }
  .suggested-feed .duration { font-size: 11px; line-height: 13px; right: 4px; bottom: 4px; }
  .mobile .watch-layout { display: block; padding: 0; }
  .mobile .watch-player { border-radius: 0; }
  .mobile .watch-main h2 { margin: 12px; font-size: 18px; }
  .mobile .watch-channel { margin: 14px 12px; }
  .mobile .watch-description, .mobile .watch-comments { display: none; }
  .mobile .suggested-feed { padding: 18px 12px; }
  .mobile .suggested-feed .card-details { padding: 0; }
}
@layer responsive {
  @media (min-width: 1700px) { body.preview-expanded .feed { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  @media (max-width: 1100px) { .app-layout { grid-template-columns: 282px minmax(0,1fr); } .editor { padding: 22px 18px 20px; } .preview-controls { gap: 4px; } .workspace-footer { flex-wrap: wrap; gap: 4px; } body.preview-expanded .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.preview-expanded .watch-layout { grid-template-columns: 1fr; } }
  @media (max-width: 760px) {
    .about-preview { padding: 36px 20px; }
    .about-preview-columns { grid-template-columns: 1fr; gap: 20px; }
    .app-header { height: 56px; padding: 0 18px; } .brand { font-size: 16px; } .brand img { width: 28px; height: 28px; } .brand-light { margin-left: 3px; } .privacy-badge { display: none; }
    .app-layout { display: flex; flex-direction: column; height: auto; } .editor { border-right: 0; border-bottom: 1px solid var(--line); padding: 23px 20px; overflow: visible; }
    .editor-title { margin-bottom: 16px; } .step-label { font-size: 11px; } .drop-zone { min-height: 137px; } .drop-symbol { display: none; }
    input:not([type=file]):not([type=range]), textarea, select { font-size: 16px; } .field-label { font-size: 14px; } .editor-footer { margin-top: 19px; } .field-hint, .image-info, .editor-footer { font-size: 12px; }
    .workspace { padding: 16px 12px 0; } .workspace-heading h1 { font-size: 21px; }
    .controls-bar { gap: 6px; flex-wrap: wrap; } .segments button { padding: 8px 11px; } .devices button { padding: 7px 9px; } .preview-controls { gap: 3px; }
    .preview-viewport { height: max(400px, calc(100dvh - 210px)); flex: none; } .workspace-footer { font-size: 10px; padding: 10px 0 16px; }
    .zoom-bar { gap: 8px; flex-basis: 100%; } .zoom-slider { max-width: none; min-width: 100%; } .zoom-help { font-size: 11px; } .fullscreen-button { padding: 8px; white-space: nowrap; }
    body.preview-expanded .feed { grid-template-columns: 1fr; }
  }
  @media (max-width: 380px) { .app-header .brand { font-size: 14px; } .header-right { gap: 8px; } }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
}

@layer app {
  .bookmark-note { display: flex; align-items: start; justify-content: space-between; gap: 14px 24px; margin-top: 14px; padding: 16px 0 8px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
  .bookmark-note p { margin: 0; }
  .bookmark-message { font-weight: 600; }
  .bookmark-privacy { color: var(--muted); margin-top: 3px !important; }
  .bookmark-help { flex: 0 0 auto; max-width: 100%; }
  .bookmark-help summary { min-height: 32px; padding: 3px 0; text-underline-offset: 4px; }
  .bookmark-help summary:hover { text-decoration: underline; }
  .bookmark-help[open] { flex-basis: 100%; }
  .bookmark-note:has(.bookmark-help[open]) { flex-wrap: wrap; }
  .bookmark-instructions { max-width: 66ch; padding: 8px 0; color: var(--muted); }
  .bookmark-instructions p + p { margin-top: 9px; }
  .bookmark-instructions kbd { font: inherit; font-weight: 600; }
  @media (max-width: 600px) { .bookmark-note { flex-direction: column; gap: 8px; } }
}
