/* Phase 2: shared reading rhythm and interaction polish.
   Keep the original typefaces, media, camera framing and chapter timing. */
:root {
  --control-size: 44px;
  --reading-size: clamp(14px, 1.05vw, 16px);
}

/* Navigation stays quiet, but is easier to read and target. */
.chapter-nav a { min-height: var(--control-size); align-items: center; }
.chapter-nav b { font-size: 14px; letter-spacing: .02em; }
.chapter-nav span { font-size: 11px; }
.language button { min-height: var(--control-size); min-width: 36px; font-size: 12px; }
.brand { min-height: var(--control-size); gap: 10px; }
.brand-logo { display: block; width: 32px; height: 32px; flex: 0 0 auto; }
button, a, summary { touch-action: manipulation; }
:is(button, a, summary, input):focus-visible { outline-width: 2px; outline-offset: 5px; }
.chapter-nav a:focus-visible { outline-offset: 2px; }

/* A common scale for small controls; video remains the dominant surface. */
.chip { height: 20px; min-width: 30px; padding: 0 6px; font-size: 11px; }
.transport button, .ui-transport button {
  min-height: var(--control-size); font-size: 13px; letter-spacing: .025em; opacity: .85;
}
.transport .toggle, #hero-toggle, #ui-play { min-width: 36px; min-height: var(--control-size); text-align: center; }
.timeline, #ui-timeline { min-height: var(--control-size); }
.time, #ui-time { font-size: 12px; letter-spacing: .03em; }
.view-labels strong, .blend-version { font-size: 13px; letter-spacing: .04em; }
.camera-pages { gap: 8px 24px; margin-bottom: 16px; font-size: 13px; letter-spacing: .02em; }
.camera-pages a { min-height: var(--control-size); align-items: center; }
.camera-page-number { font-size: 11px; }
.detail summary { display: inline-flex; align-items: center; min-height: var(--control-size); font-size: 13px; }
.detail dt { font-size: 12px; }
.detail dd { font-size: 14px; line-height: 1.7; }
.next-link { min-height: var(--control-size); font-size: 13px; letter-spacing: .025em; }
.chapter-heading .lede { font-size: var(--reading-size); line-height: 1.75; max-width: 34em; }
html[lang="en"] .act-card b {
  font-size: clamp(48px, 8vw, 140px); line-height: 1.05;
  white-space: normal; max-width: 16ch; text-wrap: balance;
}

/* Motion examples: one display language, clear selection, no production status clutter. */
.motion-intro { gap: clamp(32px, 5vw, 88px); margin-bottom: clamp(32px, 5vh, 56px); }
.motion-intro .lede { font-size: var(--reading-size); max-width: 38em; }
.motion-intro .limit-note { font-size: 13px; line-height: 1.7; max-width: 42em; }
.motion-flow { margin-bottom: 22px; }
.motion-flow b { font-size: 14px; }
.motion-flow span { font-size: 12px; }
.library-head { align-items: center; padding: 20px 0; border-top: 1px solid var(--hair-l); }
.library-head h3 { font-size: 18px; line-height: 1.5; }
.library-head small { margin-left: 12px; font-size: 12px; letter-spacing: .03em; }
.library-head p { font-size: 13px; line-height: 1.6; }
.motion-prompt { gap: 18px; padding-right: clamp(24px, 3vw, 48px); }
.motion-row-meta { font-size: 12px; letter-spacing: .04em; }
.motion-row-title { line-height: 1.35; text-wrap: balance; }
.motion-prompt-copy p { font-size: var(--reading-size); line-height: 1.85; max-width: 32em; }
html[lang^="zh"] .motion-prompt-en,
html[lang="en"] .motion-prompt-zh { display: none; }
.motion-prompt-zh::before { content: "提示词"; font-size: 12px; letter-spacing: .06em; margin-bottom: 12px; }
html[lang="en"] .motion-prompt-zh::before { content: none; }
html[lang="en"] .motion-prompt-en::before {
  content: "PROMPT"; display: block; font-size: 12px; letter-spacing: .06em; color: var(--g4); margin-bottom: 12px;
}
.motion-media-label { font-size: 13px; }
.motion-loop-controls, .motion-pair-controls { font-size: 12px; letter-spacing: .025em; }
.motion-loop-toggle, .motion-pair-toggle { min-height: var(--control-size); min-width: 78px; font-size: 13px; padding: 10px 16px; }
.motion-loop-toggle:hover, .motion-pair-toggle:hover { background: var(--ink); color: var(--paper); }
.motion-row-note { font-size: 13px; line-height: 1.7; }
#library-grid .library-card-body { gap: 10px; padding-top: 16px; }
#library-grid .library-card-body b { font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; }
#library-grid .library-card-body .mono, #library-grid .library-status { font-size: 12px; letter-spacing: .025em; }
#library-grid .library-action { font-size: 11px; padding: 8px 10px; }
#library-grid .library-card[aria-pressed=true] .library-card-body b { font-weight: 600; }
.motion-bottom { padding: 36px 0 56px; }
.motion-bottom p { font-size: 12px; line-height: 1.6; }

/* Evidence is readable without enlarging the entire presentation. */
.ui-lede { font-size: 14px; line-height: 1.7; }
.ui-switch-hint { font-size: 12px; line-height: 1.6; }
.ui-tips-trigger { min-height: var(--control-size); font-size: 14px; }
.ui-transport-sub { gap: 2px 18px; align-items: center; }
.ui-making-entry { display: inline-flex; align-items: center; min-height: var(--control-size); font-size: 13px; }
.ui-version-tag { font-size: 11px; padding: 4px 6px; }
.ui-version-tag.ai { background: var(--red); color: #000; }
.ui-version-step { font-size: 11px; }
.ui-tips-meta { font-size: 12px; line-height: 1.5; letter-spacing: .04em; }
#ui-tips-close { width: var(--control-size); height: var(--control-size); flex-shrink: 0; }
.ui-tips-description { font-size: 16px; line-height: 1.8; }
.ui-tip-figure figcaption { font-size: 14px; }
.ui-tip-callout { font-size: 13px; line-height: 1.65; }
.ui-tip-flow { font-size: 14px; line-height: 1.75; }
.ui-tip-pagination button, .ui-tip-skip, .ui-tip-after, #ui-tip-play, #ui-guide-dismiss { min-height: var(--control-size); font-size: 13px; }
.ui-tips-footer { flex-wrap: wrap; }
.ui-ue5-guide p { font-size: 13px; line-height: 1.7; }

@media (min-width: 701px) and (max-width: 1100px) {
  .chapter-nav { gap: 18px; }
  .chapter-nav b { font-size: 12px; }
  .brand-name { font-size: 12px; }
}
@media (min-width: 701px) and (max-width: 950px) {
  :root { --header: 100px; }
  .site-header {
    height: var(--header); grid-template-columns: 1fr auto; grid-template-rows: 44px 44px;
    padding: 6px var(--gutter); align-content: start;
  }
  .chapter-nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; gap: 32px; }
  .language { grid-row: 1; grid-column: 2; }
}
@media (max-width: 700px) {
  .brand-logo { width: 28px; height: 28px; }
  html[lang="en"] .act-card b { font-size: clamp(36px, 9vw, 60px); }
  .chapter-nav { gap: 8px; }
  .chapter-nav b { font-size: 12px; letter-spacing: 0; }
  .chapter-nav span { font-size: 10px; }
  .brand-name { font-size: 12px; }
  .language button { padding-inline: 5px; min-width: 30px; }
  .language button + button::before { margin-right: 6px; }
  .camera-pages { gap: 6px 16px; font-size: 12px; }
  .chapter-heading { bottom: 156px; }
  .chapter-heading .lede { font-size: 14px; }
  .transport { gap: 12px; bottom: 12px; }
  .transport button { font-size: 12px; }
  .transport .toggle { min-width: 28px; }
  .chapter-footer { bottom: 74px; }
  .chapter-footer .next-link span:first-child { display: inline; }
  .chapter-footer .next-link { font-size: 12px; transform: none; }
  .chapter-footer .next-arrow::before { width: 16px; margin-right: 6px; }
  .view-labels strong, .blend-version { font-size: 12px; }
  .motion-section.chapter { padding-top: calc(var(--header) + 32px); }
  .motion-intro { gap: 24px; margin-bottom: 28px; }
  .motion-intro .display { font-size: clamp(34px, 8.6vw, 52px); line-height: 1.2; }
  .motion-intro .chapter-num { margin-bottom: 16px; }
  .motion-flow { margin-bottom: 16px; gap: 14px 18px; }
  .motion-flow li { padding-top: 9px; }
  .motion-flow b { font-size: 13px; }
  .library-head { align-items: flex-start; padding: 16px 0; gap: 6px; }
  .library-head p { margin: 0; }
  .motion-prompt { padding: 20px 0 12px; gap: 12px; }
  /* On phones, show the selected action before its longer prompt. */
  .motion-prompt { display: contents; }
  .motion-row-meta { order: 0; padding-top: 20px; }
  .motion-row-title { order: 1; margin-top: 12px; }
  .motion-loop, .motion-pair, .motion-result { order: 2; }
  .motion-prompt-copy { order: 3; margin: 4px 0 24px; }
  .motion-row-note { order: 4; }
  .motion-prompt-copy p { font-size: 14px; line-height: 1.75; max-width: none; }
  .motion-prompt-zh::before, html[lang="en"] .motion-prompt-en::before { margin-bottom: 8px; }
  #library-grid .library-card-body { padding-top: 12px; gap: 7px; }
  #library-grid .library-card-body b { font-size: 14px; }
  #library-grid .library-status { font-size: 11px; }
  .motion-bottom { align-items: flex-start; padding: 28px 0 36px; }
  .motion-bottom p { max-width: 17em; }
  .ui-lede { font-size: 13px; }
  .ui-rail-panel { gap: 8px; }
  .ui-tips-trigger { font-size: 13px; }
  .ui-transport button { font-size: 12px; }
  .ui-tips-description { font-size: 14px; }
  .ui-tips-dialog[data-issue="damage"] .ui-tip-comparison { grid-template-columns: 1fr; gap: 24px; }
  .ui-tip-figure figcaption { font-size: 13px; }
  .ui-tips-meta { gap: 9px; font-size: 11px; }
  .ui-tip-flow { font-size: 13px; }
  .ui-tip-after { gap: 16px; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 11px; }
  .chapter-nav span { display: none; }
  .transport { gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-loop-toggle, .motion-pair-toggle { transition: none; }
}
