@layer base, layout, components, responsive;

@layer base {
  :root {
    color-scheme: light;
    --page: #f5f5f5;
    --surface: #ffffff;
    --canvas: #f5f5f5;
    --text: #171717;
    --muted: #525252;
    --faint: #666666;
    --line: #d4d4d4;
    --accent: #c92739;
    --accent-solid: #cf2f3d;
    --accent-soft: #fce7eb;
    --figure-paper: #f5f5f5;
    --figure-ink: #262626;
    --figure-detail: #525252;
    --figure-muted: #737373;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-family: var(--mono), "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--page);
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --page: #111111;
    --surface: #050505;
    --canvas: #111111;
    --text: #f5f5f5;
    --muted: #b3b3b3;
    --faint: #999999;
    --line: #2c2c2c;
    --accent: #fb7185;
    --accent-solid: #cf2f3d;
    --accent-soft: #2c1118;
    --figure-paper: #111111;
    --figure-ink: #f5f5f5;
    --figure-detail: #d4d4d4;
    --figure-muted: #929292;
  }
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ul, pre { margin: 0; }
  body { min-width: 320px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button, a, input, select { -webkit-tap-highlight-color: transparent; }
  button, select { cursor: pointer; }
  button { border: 0; }
  button:disabled, select:disabled, input:disabled { cursor: default; opacity: .48; }
  a { color: inherit; text-decoration: none; }
  button { touch-action: manipulation; }
  svg { display: block; }
  [hidden] { display: none !important; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
  ::selection { background: var(--accent-soft); color: var(--accent); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 12px 18px; background: var(--text); color: var(--page); transform: translateY(-160%); }
  .skip-link:focus { transform: none; }
}

@layer layout {
  .page-shell { max-width: 1248px; padding: 0 32px; margin: 0 auto; }
  .site-header { display: flex; align-items: center; min-height: 82px; gap: 16px; }
  .header-nav { display: flex; gap: 20px; align-items: center; margin-left: auto; }
  .intro { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; margin: 6px 0 16px; }
  .intro-card, .intro-facts { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 30px; }
  .intro-card { border-color: #0891b2; }
  .intro-facts { border-color: #be3459; display: flex; flex-direction: column; justify-content: center; }
  .studio { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(350px, 1fr); gap: 16px; scroll-margin-top: 24px; }
  .preview-panel { padding: 25px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
  .catalog-panel { display: flex; flex-direction: column; min-width: 0; padding: 25px 22px 0; border: 1px solid #6366a1; border-radius: 8px; background: var(--surface); }
  .preview-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 19px; }
  .stage { position: relative; width: 100%; aspect-ratio: 1.15; min-height: 260px; background: var(--canvas); overflow: hidden; }
  .motion-art { width: 100%; height: 100%; position: absolute; inset: 0; padding: 17px; }
  .motion-art > svg { display: block; width: 100%; height: 100%; }
  .stage-topline, .stage-bottomline { position: absolute; display: flex; justify-content: space-between; align-items: center; left: 18px; right: 18px; z-index: 1; pointer-events: none; }
  .stage-topline { top: 15px; }
  .stage-bottomline { bottom: 13px; }
  .playback-controls { display: flex; align-items: center; gap: 15px; padding-top: 17px; }
  .timeline-wrap { flex: 1; min-width: 0; padding-top: 8px; }
  .timeline-labels { display: flex; justify-content: space-between; }
  .preview-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 21px; }
  .export-actions, .motion-navigation { display: flex; gap: 8px; }
  .export-actions { flex-wrap: wrap; }
  .motion-navigation { margin-left: auto; }
  .pose-download { display: flex; align-items: stretch; gap: 6px; }
  .catalog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
  .category-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 17px 0 19px; }
  .catalog-results { position: relative; flex: 1; min-height: 400px; }
  .motion-list { list-style: none; padding: 0 9px 0 0; position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior-y: contain; }
  .catalog-footnote { display: flex; align-items: flex-start; gap: 9px; padding: 20px 0; margin-top: 15px; border-top: 1px solid var(--line); }
  .license-section { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 24px 28px; border: 1px solid #a54562; border-radius: 8px; background: var(--surface); }
  .license-links { display: flex; flex-direction: column; align-items: center; gap: 15px; padding-top: 25px; }
  .site-footer { display: flex; align-items: center; gap: 28px; padding: 27px 0 34px; }
  .site-footer > div { display: flex; gap: 24px; margin-left: auto; }
  .mobile-break { display: none; }
}

@layer components {
  .wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 720; letter-spacing: -1px; white-space: nowrap; }
  .wordmark svg, .wordmark-dash { color: var(--accent); }
  .header-nav a { font-size: 12px; color: var(--muted); }
  .header-nav a:hover, .site-footer a:hover { color: var(--accent); }
  .header-nav a:last-child { display: flex; gap: 13px; }
  .icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; background: transparent; border: 1px solid var(--line); font-size: 19px; }
  .icon-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
  .theme-toggle { margin-left: 0; border-radius: 50%; width: 38px; height: 38px; flex-basis: 38px; }
  .sun-icon, [data-theme="dark"] .moon-icon { display: none; }
  [data-theme="dark"] .sun-icon { display: block; }
  .eyebrow, .section-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 1.6px; }
  .eyebrow { display: flex; align-items: center; gap: 9px; color: var(--accent); }
  .accent-dot { display: inline-block; flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
  h1 { font-size: clamp(30px, 3.3vw, 42px); letter-spacing: -1.7px; line-height: 1.2; font-weight: 650; margin-top: 18px; }
  h1 > span { font-weight: 350; }
  .intro-copy { color: var(--muted); font-size: 14px; margin-top: 16px; letter-spacing: .1px; }
  .catalog-total { display: flex; align-items: center; gap: 20px; }
  .catalog-total > strong { font-family: var(--mono); font-size: 64px; font-weight: 600; line-height: 1.1; letter-spacing: -4px; }
  .catalog-total > strong > span { color: var(--line); font-weight: 200; font-size: 60px; }
  .catalog-total > span { color: var(--muted); font-size: 13px; line-height: 1.9; }
  .intro-facts > p { margin-top: 15px; color: var(--faint); font: 10px/1.5 var(--mono); }
  .intro-facts > p > span { padding-inline: 8px; }
  .section-kicker { color: var(--faint); font-size: 9px; letter-spacing: 1.4px; }
  .preview-heading h2 { font-size: 25px; font-weight: 550; letter-spacing: -.8px; margin-top: 5px; }
  .motion-english { font: 10px/1.6 var(--mono); color: var(--muted); margin-top: 3px; }
  .category-badge { border: 1px solid var(--line); padding: 3px 8px; font-size: 10px; white-space: nowrap; color: var(--muted); margin-top: 22px; }
  .stage-topline, .stage-bottomline { color: var(--faint); font: 9px/1.5 var(--mono); letter-spacing: .7px; }
  #playback-indicator { display: inline-flex; align-items: center; gap: 5px; }
  #playback-indicator i { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
  #playback-indicator[data-playing="true"] i { background: var(--accent); }
  .play-button { display: flex; width: 39px; height: 39px; flex: 0 0 39px; align-items: center; justify-content: center; color: var(--surface); background: var(--text); border-radius: 50%; }
  .play-button:hover:not(:disabled) { background: var(--accent); color: #ffffff; }
  .play-button .pause-icon, .play-button[aria-pressed="true"] .play-icon { display: none; }
  .play-button[aria-pressed="true"] .pause-icon { display: block; }
  #motion-progress { --progress: 0%; appearance: none; width: 100%; height: 14px; display: block; margin: 0; background: transparent; cursor: pointer; accent-color: var(--accent); }
  #motion-progress::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, var(--accent) var(--progress), var(--line) var(--progress)); }
  #motion-progress::-moz-range-track { height: 3px; background: var(--line); }
  #motion-progress::-moz-range-progress { height: 3px; background: var(--accent); }
  #motion-progress::-webkit-slider-thumb { appearance: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: -3px; }
  #motion-progress::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 0; }
  .timeline-labels { color: var(--faint); font: 9px/1.6 var(--mono); margin-top: 3px; }
  .speed-label select { border: 1px solid var(--line); background: var(--surface); padding: 7px 5px; font: 11px/1.5 var(--mono); min-height: 36px; }
  .keyframes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
  .keyframes button { color: var(--muted); background: transparent; padding: 4px 7px; border: 1px solid var(--line); font-size: 10px; min-height: 29px; }
  .keyframes button:hover, .keyframes button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
  .motion-subtitle { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 12px; min-height: 20px; }
  .button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 11px 17px; min-height: 43px; font-size: 11px; font-weight: 550; border: 1px solid transparent; white-space: nowrap; }
  .button-primary { background: var(--accent-solid); color: #ffffff; }
  .button-primary:hover:not(:disabled) { background: #b82534; }
  .button-secondary { border-color: var(--line); background: transparent; }
  .button-secondary:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
  .export-note { margin-top: 10px; color: var(--faint); font-size: 9px; }
  .pose-download select { min-height: 43px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 11px; }
  .developer-link { display: inline-flex; margin-top: 13px; font-size: 10px; color: var(--muted); }
  .developer-link:hover { color: var(--accent); }
  .reduced-motion-note { color: var(--accent); font-size: 10px; padding-top: 12px; }
  .catalog-heading h2 { font-size: 16px; font-weight: 550; letter-spacing: -.3px; }
  .catalog-heading h2 > span { display: block; font: 9px/1.5 var(--mono); color: var(--faint); letter-spacing: 1.2px; margin-top: 4px; }
  .result-count { font: 28px/1.2 var(--mono); color: var(--faint); letter-spacing: -1.5px; }
  .search-wrap { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); color: var(--faint); padding-bottom: 10px; }
  .search-wrap:focus-within { border-color: var(--accent); }
  .search-wrap input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 5px 0; font-size: 11px; height: 30px; }
  .search-wrap input::placeholder { color: var(--faint); }
  .search-wrap input:focus-visible { outline: 0; }
  .search-wrap kbd { font: 11px/1.5 var(--mono); border: 1px solid var(--line); border-radius: 2px; padding: 0 5px; }
  .category-filters button { background: transparent; color: var(--muted); font-size: 10px; border: 1px solid transparent; border-radius: 3px; padding: 6px 10px; min-height: 32px; }
  .category-filters button:hover:not(:disabled) { color: var(--accent); }
  .category-filters button[aria-pressed="true"] { background: var(--text); color: var(--surface); }
  .motion-list li + li { margin-top: 6px; }
  .motion-choice { display: flex; align-items: center; position: relative; gap: 15px; width: 100%; min-height: 87px; padding: 5px 12px 5px 7px; background: transparent; border: 1px solid transparent; text-align: left; }
  .motion-choice:hover { background: var(--canvas); }
  .motion-choice[aria-pressed="true"] { background: var(--canvas); border-color: var(--line); }
  .motion-choice[aria-pressed="true"]::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 3px; background: var(--accent); }
  .motion-thumbnail { --figure-paper: var(--canvas); flex: 0 0 78px; width: 78px; height: 78px; background: var(--canvas); }
  .motion-thumbnail svg { width: 100%; height: 100%; }
  .choice-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .choice-name { font-size: 12px; font-weight: 550; line-height: 1.5; }
  .choice-english { font: 9px/1.4 var(--mono); color: var(--faint); overflow-wrap: anywhere; }
  .choice-number { margin-left: auto; font: 9px/1.4 var(--mono); color: var(--faint); align-self: flex-start; padding-top: 13px; }
  .motion-choice[aria-pressed="true"] .choice-number { color: var(--accent); }
  .catalog-footnote .accent-dot { margin-top: 6px; }
  .catalog-footnote p { color: var(--faint); font-size: 10px; line-height: 1.8; }
  .empty-state { text-align: center; padding: 66px 12px; color: var(--muted); }
  .empty-state > span { font: 36px/1.5 var(--mono); color: var(--line); }
  .empty-state h3 { margin-top: 12px; font-weight: 500; font-size: 14px; }
  .empty-state p { margin-top: 6px; font-size: 11px; }
  .empty-state button { margin-top: 22px; }
  .text-button { display: inline-flex; gap: 9px; padding: 5px 0; background: transparent; color: var(--accent); font-size: 11px; }
  .text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
  .catalog-loading { padding: 50px 0; text-align: center; font-size: 12px; color: var(--faint); }
  .load-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; text-align: center; font-size: 12px; color: var(--muted); background: var(--canvas); z-index: 2; }
  .noscript-note { padding: 18px; color: var(--accent); }
  .noscript-note a { text-decoration: underline; }
  .text-link { display: inline-flex; align-items: center; gap: 24px; color: var(--accent); font-size: 11px; }
  .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
  .license-mark { color: var(--accent); font-size: 47px; line-height: 1; margin-top: 23px; font-weight: 250; }
  .license-section h2 { margin-top: 9px; font-size: 19px; font-weight: 500; letter-spacing: -.4px; }
  .license-section p:not(.section-kicker) { color: var(--muted); font-size: 11px; line-height: 1.9; margin-top: 9px; }
  .license-section p.illustration-note { font-size: 10px; color: var(--faint); margin-top: 12px; }
  .footer-wordmark { font-size: 15px; letter-spacing: -.6px; gap: 0; }
  .site-footer p, .site-footer > div { color: var(--faint); font: 9px/1.6 var(--mono); }
  .notification { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); padding: 12px 20px; background: var(--text); color: var(--page); border: 1px solid var(--line); font-size: 12px; box-shadow: 0 8px 30px #0002; }
  dialog { width: min(640px, calc(100% - 36px)); max-height: 85dvh; overflow: auto; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 24px; }
  dialog::backdrop { background: #000b; }
  .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .dialog-heading h2 { font-size: 20px; font-weight: 500; }
  dialog p { margin: 15px 0; font-size: 12px; color: var(--muted); }
  dialog textarea { display: block; resize: vertical; width: 100%; height: 230px; margin: 0 0 18px; padding: 12px; background: var(--canvas); border: 1px solid var(--line); font: 11px/1.5 var(--mono); }
}

@layer responsive {
  @media (min-width: 1400px) { .stage { aspect-ratio: 1.2; } }
  @media (max-width: 1100px) {
    .page-shell { padding-inline: 30px; }
    .studio { grid-template-columns: minmax(0, 1.15fr) minmax(310px, 1fr); }
    .preview-panel { padding: 24px 23px 21px; }
    .catalog-panel { padding: 25px 19px 0; }
    .category-filters { gap: 1px; }
    .category-filters button { padding-inline: 8px; }
    .stage { aspect-ratio: 1; }
    .motion-thumbnail { flex-basis: 66px; width: 66px; height: 66px; }
    .motion-choice { gap: 11px; min-height: 79px; }
    .choice-english { font-size: 8px; }
    .site-footer > p { display: none; }
  }
  @media (max-width: 760px) {
    .page-shell { padding-inline: 20px; }
    .site-header { height: 76px; gap: 16px; }
    .wordmark { font-size: 18px; letter-spacing: -.8px; gap: 5px; }
    .wordmark > svg { width: 24px; }
    .header-nav { gap: 15px; }
    .header-nav a { font-size: 10px; }
    .header-nav a:last-child { gap: 4px; }
    .theme-toggle { width: 32px; height: 32px; flex-basis: 32px; }
    .intro { padding: 39px 0 30px; gap: 18px; }
    .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
    h1 { font-size: 34px; letter-spacing: -2px; margin-top: 15px; }
    .intro-copy { font-size: 11px; line-height: 1.85; margin-top: 13px; }
    .intro-card, .intro-facts { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 30px; }
  .intro-card { border-color: #0891b2; }
  .intro-facts { border-color: #be3459; display: flex; flex-direction: column; justify-content: center; }
    .catalog-total { gap: 8px; }
    .catalog-total > strong { font-size: 49px; letter-spacing: -4px; }
    .catalog-total > strong > span { display: none; }
    .catalog-total > span { font-size: 10px; }
    .intro-facts > p { display: none; }
    .studio { grid-template-columns: 1fr; }
    .preview-panel { padding: 21px 20px 20px; }
    .preview-heading { margin-bottom: 17px; }
    .preview-heading h2 { font-size: 23px; }
    .stage { aspect-ratio: 1.25; }
    .motion-art { padding: 12px; }
    .catalog-panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px 20px 0; }
    .catalog-heading { margin-bottom: 15px; }
    .catalog-results { height: 380px; min-height: 380px; flex: 0 0 auto; }
    .motion-list { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 6px; padding-right: 5px; }
    .motion-list li + li { margin-top: 0; }
    .motion-choice { height: 100%; flex-wrap: wrap; padding: 6px 9px 10px; gap: 7px; }
    .motion-thumbnail { width: 77px; height: 77px; flex-basis: 77px; }
    .choice-copy { width: 100%; gap: 3px; }
    .choice-name { font-size: 11px; }
    .choice-english { font-size: 8px; line-height: 1.5; }
    .choice-number { position: absolute; right: 9px; top: 6px; }
    .catalog-footnote { margin-top: 12px; padding: 15px 0; }
    .catalog-footnote p br { display: none; }
    .license-section { grid-template-columns: 1fr; gap: 20px; padding-block: 30px; }
    .license-mark { display: none; }
    .license-section h2 { font-size: 18px; line-height: 1.65; }
    .license-links { flex-direction: row; justify-content: flex-start; gap: 22px; padding: 0; }
    .site-footer { padding: 24px 0; flex-wrap: wrap; gap: 13px; }
    .footer-wordmark { font-size: 15px; }
    .site-footer > div { gap: 17px; font-size: 8px; }
  }
  @media (max-width: 430px) {
    .page-shell { padding-inline: 15px; }
    .site-header { gap: 12px; }
    .header-nav a:first-child { display: none; }
    .wordmark { font-size: 17px; }
    .intro { position: relative; padding-top: 33px; }
    .intro-facts { align-self: flex-start; padding-top: 23px; }
    .catalog-total > strong { font-size: 37px; }
    .catalog-total > span { display: none; }
    h1 { font-size: 30px; }
    .intro-copy { font-size: 10px; }
    .mobile-break { display: block; }
    .preview-panel { padding-inline: 14px; }
    .catalog-panel { padding-inline: 14px; }
    .stage { min-height: 258px; }
    .stage-topline, .stage-bottomline { left: 12px; right: 12px; font-size: 7px; }
    .preview-heading h2 { font-size: 21px; }
    .motion-english { font-size: 9px; }
    .button { padding-inline: 12px; gap: 10px; }
    .preview-actions { gap: 8px; }
    .motion-navigation { gap: 4px; }
    .motion-navigation .icon-button { width: 34px; flex-basis: 34px; }
    .export-actions { gap: 6px; }
    .license-links { gap: 16px; }
    .site-footer > div { width: 100%; margin-left: 0; justify-content: space-between; }
  }
  @media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }
}

@layer components {
  .parent-site { color: var(--muted); font-size: 10px; margin-left: 8px; white-space: nowrap; }
  .parent-site:hover { color: var(--accent); }
  .language-toggle { min-width: 42px; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 12px; white-space: nowrap; }
  .language-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .theme-toggle { border-radius: 6px; background: var(--surface); }
  .intro .eyebrow { font-size: 10px; line-height: 1.8; letter-spacing: .4px; }
  .intro-copy { max-width: 490px; line-height: 1.9; font-size: 12px; }
  .intro-facts .facts-feature { font-size: 9px; margin-top: 8px; }
  h1 > span { font-weight: 650; }
  .preview-heading h2 { font-size: 23px; line-height: 1.4; letter-spacing: -.7px; }
  .motion-english { overflow-wrap: anywhere; }
  .stage { border: 1px solid var(--line); border-radius: 6px; }
  .button, .icon-button, .keyframes button { border-radius: 5px; }
  .button-primary { box-shadow: 2px 2px 0 var(--accent); border: 1px solid #f06a78; }
  .button-primary:active { box-shadow: none; transform: translate(1px, 1px); }
  .motion-choice { border-radius: 6px; }
  .motion-choice[aria-pressed="true"] { border-color: var(--accent); }
  .motion-choice[aria-pressed="true"]::before { display: none; }
  .motion-thumbnail { border-radius: 4px; }
  .catalog-heading h2 > span[data-i18n="collection"] { display: block; font: inherit; color: inherit; letter-spacing: inherit; }
  .catalog-heading h2 > span[data-i18n="collectionKicker"] { margin-top: 5px; }
  .category-filters { gap: 5px; }
  .category-filters button { padding: 6px 8px; }
  .category-filters button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
  .license-section h2 { line-height: 1.65; }
  .license-links { align-items: flex-start; }
  .license-links .text-link { font-size: 10px; gap: 8px; }
  dialog { border-radius: 8px; }
  .license-page { max-width: 950px; margin: 0 auto; padding: 24px; }
  .license-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; font-size: 13px; }
  .license-toolbar > a { margin-right: auto; }
  .license-toolbar button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
  .license-document { padding: 36px; background: var(--surface); border: 1px solid #a54562; border-radius: 8px; }
  .license-document h1 { font-size: clamp(25px, 4vw, 34px); line-height: 1.5; letter-spacing: -1px; margin: 0 0 24px; }
  .license-document h2 { margin: 32px 0 16px; font-size: 20px; }
  .license-document p { margin: 16px 0; color: var(--muted); line-height: 1.9; }
  .license-document a, .license-toolbar a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
  .license-document pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.9 var(--mono); color: var(--muted); }
}
@layer responsive {
  @media (max-width: 1100px) {
    .parent-site { display: none; }
    .intro-card, .intro-facts { padding: 25px; }
  }
  @media (max-width: 760px) {
    .page-shell { padding-inline: 16px; }
    .site-header { min-height: 72px; height: auto; gap: 10px; }
    .header-nav { gap: 12px; }
    .header-nav a:first-child { display: none; }
    .intro { padding: 0; gap: 12px; grid-template-columns: 1fr; }
    .intro-card { padding: 25px; }
    .intro-facts { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 20px; padding: 19px 24px; }
    .catalog-total { grid-row: span 2; }
    .catalog-total > strong { font-size: 43px; }
    .catalog-total > span { display: block; font-size: 11px; }
    .intro-facts > p { display: block; margin: 0; font-size: 10px; }
    .intro-facts .facts-feature { font-size: 8px; }
    h1 { font-size: 32px; letter-spacing: -1.3px; }
    .intro-copy { font-size: 12px; }
    .studio { gap: 12px; }
    .catalog-panel { border: 1px solid #6366a1; border-radius: 8px; }
    .license-section { margin-top: 12px; padding: 24px; }
    .license-links { flex-wrap: wrap; }
    .license-document { padding: 24px 20px; }
  }
  @media (max-width: 430px) {
    .page-shell { padding-inline: 12px; }
    .wordmark { font-size: 15px; }
    .wordmark > svg { width: 21px; }
    .site-header { gap: 8px; }
    .header-nav a:last-child { font-size: 9px; }
    .language-toggle { height: 34px; min-width: 38px; padding-inline: 6px; }
    .theme-toggle { height: 34px; }
    .intro-facts { align-self: auto; padding: 18px; column-gap: 14px; }
    .intro-facts .facts-feature { font-size: 7px; line-height: 1.7; }
    .preview-heading h2 { font-size: 20px; }
    .preview-actions { flex-wrap: wrap; }
    .export-actions { flex: 1; }
    .button { padding-inline: 10px; gap: 8px; font-size: 10px; }
    .license-links { gap: 18px; }
  }
}

@layer components {
  .license-links { padding: 0; gap: 12px; }
  .license-document details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
  .license-document summary { cursor: pointer; color: var(--text); font-size: 14px; }
  .license-document summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
  .license-document details[open] summary { margin-bottom: 18px; }
}
@layer responsive {
  @media (max-width: 760px) {
    .license-section { grid-template-columns: 1fr; }
    .license-links { gap: 16px; }
  }
}
