/* 应用式入口和阅读界面；打印继续使用原始说明书排版。 */
@media screen {
  :root { --paper: #f9f9f9; --surface: #fff; --beige: #f6f8fa; --line: #e6ebf0; --header: 80px; }
  html { scroll-padding-top: calc(var(--header) + 22px); }
  body { background: var(--paper); }
  .topbar { background: var(--paper); padding-inline: max(20px, calc((100vw - 960px) / 2)); border-top: 0; border-bottom: 0; }
  .brand-logo { gap: 7px; transform: scale(.82); transform-origin: left center; padding: 0; background: transparent; border-radius: 0; }
  .topbar .brand { min-height: 44px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }
  .topbar .brand-logo img { filter: none; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-wordmark { width: 70px; height: 23px; }
  .brand-wordmark img { transform: rotate(-90deg) scale(.77); }
  .search-trigger { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; min-width: 44px; border: 0; border-radius: 12px; background: transparent; }
  .search-trigger:hover { background: #f0f0f0; }
  .topbar .search-trigger:focus-visible { outline-color: var(--red); }
  .topbar .search-icon { width: 16px; height: 16px; border: 2.5px solid #242424; }
  .topbar .search-icon::after { width: 6px; height: 2.5px; background: #242424; right: -5px; bottom: -3px; }
  main, body[data-page="start"] main { margin: 0 auto; max-width: 1000px; padding: 12px 20px 0; }
  #reader-view { max-width: 760px; margin: 0 auto; }
  .document-layout { display: block; }
  #article { padding-bottom: 0; }
  #article > h1 { margin: 6px 2px 18px; font-size: 26px; line-height: 1.4; gap: 10px; }
  #article > h1::before { height: 28px; flex-basis: 24px; font-size: 16px; }
  #article > .lead { margin: -4px 2px 24px; font-size: 15px; line-height: 1.8; }
  .home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .home-grid-main { grid-auto-rows: 1fr; }
  .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
  .guide-menu-card { display: grid; padding: 8px 22px; margin-bottom: 4px; border-radius: 24px; background: #fff; }
  .guide-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; font-size: 14px; font-weight: 500; }
  .guide-menu-row:hover { color: var(--red); }
  .guide-menu-row svg { width: 16px; height: 16px; flex-shrink: 0; stroke: #8a939c; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .app-card { position: relative; display: flex; align-items: flex-start; flex-direction: column; gap: 16px; min-width: 0; padding: 22px 22px 16px; border: 0; border-radius: 24px; background: #fff; min-height: 154px; -webkit-tap-highlight-color: transparent; }
  .app-card:hover, .app-card:focus-visible { background: #fdfefe; outline: 2px solid #e0e6ec; outline-offset: 0; }
  .app-card:active { background: #f9fafc; }
  .app-card-icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; color: var(--red); background: #fff4f4; border-radius: 10px; }
  .app-card-icon svg { display: block; width: 23px; height: 23px; }
  .app-card-icon-device { background: transparent; }
  .device-settings-icon { position: relative; display: block; width: 38px; height: 38px; }
  .device-settings-stage { position: absolute; inset: 0 auto auto 0; width: 52px; height: 52px; transform: scale(.7307692308); transform-origin: top left; }
  .device-settings-stage img { display: block; max-width: none; flex-shrink: 0; }
  .device-zen-icon { position: relative; display: block; width: 38px; height: 35.869px; }
  .device-zen-stage { position: absolute; inset: 0 auto auto 0; width: 107px; height: 101px; transform: scale(.3551401869); transform-origin: top left; }
  .device-zen-stage img { position: absolute; display: block; max-width: none; flex-shrink: 0; }
  .device-zen-base { top: 0; left: 0; }
  .device-zen-character { top: 3.44%; left: 3.23%; }
  .device-focus-icon { position: relative; display: block; width: 38px; height: 35.927px; }
  .device-focus-stage { position: absolute; inset: 0 auto auto 0; width: 110px; height: 104px; transform: scale(.3454545455); transform-origin: top left; }
  .device-focus-stage img { display: block; max-width: none; flex-shrink: 0; }
  .device-learning-icon { position: relative; display: block; width: 33.7414px; height: 38px; }
  .device-learning-stage { position: absolute; inset: 0 auto auto 0; width: 103px; height: 116px; transform: scale(.3275862069); transform-origin: top left; }
  .device-learning-stage img { display: block; max-width: none; flex-shrink: 0; }
  .device-connection-icon { position: relative; display: block; width: 23.181px; height: 32px; }
  .device-connection-crop { position: absolute; inset: 0 auto auto 0; width: 78.79245px; height: 108.768486px; overflow: hidden; transform: scale(.2942028631); transform-origin: top left; }
  .device-connection-stage { position: absolute; left: -3.60981369px; top: -3.60945582px; width: 86px; height: 116px; }
  .device-connection-stage img { position: absolute; display: block; max-width: none; flex-shrink: 0; }
  .device-character-icon { position: relative; display: block; width: 38px; height: 35.913px; }
  .device-character-stage { position: absolute; inset: 0 auto auto 0; width: 94.7037px; height: 89.5016px; transform: scale(.4012515); transform-origin: top left; }
  .device-character-stage img { position: absolute; display: block; max-width: none; flex-shrink: 0; }
  .device-character-base { left: 0; top: 0; }
  .device-character-face { left: 3.3%; top: 3.48%; }
  .app-card-copy { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
  .app-card-copy strong { font-size: 14px; line-height: 1.5; font-weight: 600; }
  .app-card-copy > span { color: #7b858f; font-size: 12px; line-height: 1.65; }
  .home-footer { padding: 20px 2px 28px; color: #8a949e; font-size: 12px; text-align: center; }
  .reader-appbar { display: none; align-items: center; justify-content: space-between; width: 100%; max-width: 760px; height: 100%; margin-inline: auto; gap: 16px; }
  body[data-page]:not([data-page="home"]) .topbar > .brand,
  body[data-page]:not([data-page="home"]) .topbar > .header-actions { display: none; }
  body[data-page]:not([data-page="home"]) .reader-appbar { display: flex; }
  .back-link, .contents-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; font-size: 14px; line-height: 20px; color: #697681; }
  .reader-appbar svg { display: block; width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .contents-button { border: 0; background: transparent; }
  .guide-section { display: flow-root; margin: 0 0 4px; padding: 24px; border: 0; border-radius: 24px; background: #fff; box-shadow: none; }
  body[data-page] .guide-section > h2 { margin: 0 0 18px; padding: 0; border: 0; font-size: 21px; line-height: 1.5; }
  .guide-section > :last-child { margin-bottom: 0; }
  .guide-section .technical-figure { margin: 14px 0 0; }
  .guide-section .table-wrap { border-color: var(--line); border-radius: 10px; }
  .guide-section .note, .guide-section .mobile-path, .guide-section .example { border-radius: 8px; }
  .guide-section .inventory li { border-radius: 8px; }
  .guide-section .inventory-note { margin-bottom: 0; }
  .guide-section .plain-list > li, .guide-section .dictionary-list > li, .guide-section .steps > li { border-bottom-color: #edf0f3; }
  .guide-section .guide-table th, .guide-section .guide-table td { border-bottom-color: #edf0f3; }
  body[data-page="help"] .guide-section .faq,
  body[data-page="help"] .guide-section .plain-list > li { border-bottom-color: #f2f3f5; }
  body[data-page="help"] .guide-section > .faq:last-child { border-bottom: 0; }
  body[data-page="settings"] .guide-section[aria-labelledby="volume"] > .setting-row:last-child { border-bottom: 0; }
  .document-footer { max-width: none; }
  .page-links { border: 0; padding-top: 2px; gap: 4px; }
  .page-link { background: #fff; border: 0; border-radius: 12px; padding: 14px 16px; }
  .footer-note { padding-inline: 2px; color: #8a949e; }
  dialog { border: 0; border-radius: 18px; }
  #search-input { border-radius: 10px; border-color: #e2e8ee; }
  .dialog-foot { border-top-color: #edf0f3; }
  #section-links { display: grid; gap: 2px; }
  #section-links a { display: flex; justify-content: space-between; gap: 18px; min-height: 48px; padding: 12px 2px; border-bottom: 1px solid #edf0f3; font-size: 15px; line-height: 1.7; }
  #section-links a:last-child { border: 0; }
  #section-links a > span { color: #a2adb7; }
}

@media screen and (max-width: 850px) {
  :root { --header: 72px; }
  .topbar { padding-inline: 14px; }
  main, body[data-page="start"] main { padding: 8px 8px 0; max-width: 700px; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .app-card { padding: 18px 18px 12px; gap: 13px; min-height: 132px; border-radius: 24px; }
  #article > h1 { font-size: 23px; margin-bottom: 20px; }
  .guide-section { padding: 18px; margin-bottom: 4px; border-radius: 24px; }
  body[data-page] .guide-section > h2 { font-size: 19px; margin-bottom: 16px; }
  .guide-section .product-layout { container: device-parts / inline-size; max-width: 382px; width: 100%; gap: 16px; }
  .guide-section .product-layout .product-mount { --device-scale: .8; width: calc(274.106px * var(--device-scale)); height: calc(282.31885px * var(--device-scale)); flex: 0 0 calc(274.106px * var(--device-scale)); }
  .guide-section .product-layout .product-stage { transform: scale(var(--device-scale)); }
  .guide-section .product-layout .product-legend { flex: 0 0 118px; font-size: 14px; line-height: 2.05; }
  .guide-section .technical-figure { margin-inline: 0; }
}

@container device-parts (max-width: 352px) {
  .guide-section .product-layout .product-mount { --device-scale: .7; }
  .guide-section .product-layout .product-legend { flex-basis: 110px; }
}
@container device-parts (max-width: 319px) {
  .guide-section .product-layout .product-mount { --device-scale: .62; }
}
@container device-parts (max-width: 295px) {
  .guide-section .product-layout .product-mount { --device-scale: .54; }
  .guide-section .product-layout .product-legend { flex-basis: 104px; font-size: 13px; }
}
@container device-parts (max-width: 270px) {
  .guide-section .product-layout .product-mount { --device-scale: .46; }
}
@container device-parts (max-width: 245px) {
  .guide-section .product-layout .product-mount { --device-scale: .42; }
}

@media screen and (max-width: 359px) {
  main, body[data-page="start"] main { padding-inline: 8px; }
  .topbar { padding-inline: 12px; }
  .home-grid { gap: 4px; }
  .app-card { padding: 15px 13px 10px; min-height: 132px; }
  .guide-section { padding: 14px; }
  body[data-page="start"] .guide-section .inventory li { font-size: 14px; gap: 4px; padding: 8px; }
  body[data-page="start"] .guide-section .joystick-layout { grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
  body[data-page="start"] .guide-section .joystick-mount { width: 120px; height: 95px; }
  body[data-page="start"] .guide-section .joystick-stage { transform: scale(.833333); }
  .control-list > div, .compact-specs > div { grid-template-columns: 80px minmax(0, 1fr); gap: 10px; }
}

@media screen and (min-width: 851px) and (max-width: 1050px) {
  .joystick-layout { grid-template-columns: 270px minmax(0, 1fr); }
  .direction-list > div { grid-template-columns: 1fr; gap: 0; }
}

/* Figma 8026:833：原始截图与定位红框，手机端横向翻看。 */
.update-gallery-hint { display: none; }
.update-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; margin: 24px 0 0; }
.update-shot { margin: 0; min-width: 0; }
.update-shot-frame { position: relative; width: 100%; aspect-ratio: 603 / 1311; }
.update-shot-frame > img { display: block; width: 100%; height: auto; }
.update-shot-highlight { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; fill: none; stroke: #ff0000; stroke-width: 6; }
.update-shot figcaption { margin-top: 8px; color: #7b858f; font-size: 12px; line-height: 1.6; text-align: center; }
@media screen and (max-width: 850px) {
  .update-gallery-hint { display: block; margin: 22px 0 10px; color: #7b858f; font-size: 12px; line-height: 1.6; }
  .update-gallery { display: flex; gap: 12px; margin-top: 0; padding-bottom: 8px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
  .update-shot { flex: 0 0 88%; scroll-snap-align: start; }
}

/* 用户提供的创建词本流程图：保留原图，手机端横向查看。 */
.wordbook-flow { margin: 20px 0 24px; }
.wordbook-flow-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.wordbook-flow-link { display: block; width: 100%; }
.wordbook-flow-link > img { display: block; width: 100%; height: auto; }
.wordbook-flow figcaption { margin-top: 8px; color: #7b858f; font-size: 12px; line-height: 1.6; }
.wordbook-flow-mobile-hint { display: none; }
@media screen and (max-width: 850px) {
  .wordbook-flow-link { width: 1440px; }
  .wordbook-flow-mobile-hint { display: inline; }
}

/* 角色指南：各步骤使用用户提供的原始截图。 */
.role-step-figure { grid-column: 1 / -1; width: 100%; min-width: 0; margin: 14px 0 0; }
.role-step-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.role-step-link { display: block; width: 100%; max-width: 280px; margin-inline: auto; }
.role-step-link > img { display: block; width: 100%; height: auto; }
.role-step-figure--create .role-step-link { width: 650px; max-width: none; }
.role-step-figure--import .role-step-link { width: 420px; max-width: none; }
.role-step-figure figcaption { margin-top: 8px; color: #7b858f; font-size: 12px; line-height: 1.6; text-align: center; }
.role-step-pan-hint { display: none; }
@media screen and (max-width: 850px) {
  .role-step-pan-hint { display: inline; }
}

.todo-step-figure--annotated .role-step-link { width: 380px; max-width: none; }
