/* "Las prácticas de Lía" 3D: full-screen canvas with HTML panels on top. Colors come from the site tokens (assets/style.css). */
html, body.h3d-body { height: 100%; margin: 0; overflow: hidden; }
body.h3d-body { background: #f3ede4; color: var(--text-primary); font-family: var(--font-sans); }
.h3d-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
.show-narrow { display: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.h3d-btn {
  font: 600 0.95rem var(--font-sans); color: var(--text-primary); background: var(--bg-surface);
  border: 1px solid var(--border-color); border-radius: 10px; padding: 9px 16px; min-height: 42px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.h3d-btn:hover { border-color: var(--accent); }
.h3d-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg-primary); }
.h3d-btn-primary:hover { filter: brightness(1.08); }
.h3d-btn-ghost { background: color-mix(in srgb, var(--bg-surface) 80%, transparent); backdrop-filter: blur(6px); }
.h3d-link-btn { font: 0.85rem var(--font-sans); color: var(--text-secondary); background: none; border: 0; padding: 6px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.h3d-link-btn:hover { color: var(--accent); }
.h3d-link-btn.is-confirming { color: #f87171; }
.h3d-kicker { margin: 0; font: 600 0.72rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* top bar */
.h3d-top {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
  pointer-events: none;
}
.h3d-top > * { pointer-events: auto; }
.h3d-brand {
  font: 600 0.88rem var(--font-sans); color: var(--text-primary); text-decoration: none; padding: 9px 14px; border-radius: 10px; min-height: 42px;
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--bg-surface) 80%, transparent); border: 1px solid var(--border-color); backdrop-filter: blur(6px);
}
.h3d-hud {
  flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center;
  padding: 7px 14px; border-radius: 10px; border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-surface) 85%, transparent); backdrop-filter: blur(6px);
}
.h3d-hud-chapter { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h3d-hud-scene { font: 0.75rem var(--font-mono); color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.h3d-hud-track, .h3d-track { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--border-color); overflow: hidden; display: block; }
.h3d-hud-track span, .h3d-track span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s ease; }
.h3d-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.h3d-icon-btn { width: 42px; padding: 0; font-size: 1.05rem; }
.h3d-audio { position: relative; }
.h3d-audio-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 250px; padding: 6px; display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.h3d-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: 600 0.9rem var(--font-sans); color: var(--text-primary);
  background: none; border: 0; border-radius: 8px; padding: 9px 10px; cursor: pointer;
}
.h3d-toggle:hover { background: var(--bg-secondary); }
.h3d-toggle kbd { margin-left: auto; font: 0.72rem var(--font-mono); color: var(--text-muted); border: 1px solid var(--border-color); border-radius: 4px; padding: 1px 5px; }
.h3d-toggle::after { content: "Sí"; font: 600 0.72rem var(--font-mono); color: #34d399; min-width: 2.5ch; }
.h3d-toggle[aria-pressed="false"] { color: var(--text-muted); }
.h3d-toggle[aria-pressed="false"]::after { content: "No"; color: var(--text-muted); }
.story-tabs { flex-shrink: 0; }
#btn-study[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
#btn-retro[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
body[data-screen="screen-menu"] #btn-menu, body[data-screen="loading"] #btn-menu { visibility: hidden; }
body[data-screen="screen-menu"] .h3d-hud { display: none !important; }
body[data-screen="screen-menu"] #btn-study, body[data-screen="loading"] #btn-study { display: none; }

.h3d-loading, .h3d-fallback {
  position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center;
  padding: 24px; text-align: center; font-weight: 600; color: #3f3427;
}
.h3d-fallback { background: var(--bg-primary); color: var(--text-primary); }
.h3d-fallback p { max-width: 42ch; margin: 0; }

/* panels */
.h3d-panel {
  position: fixed; z-index: 10; background: color-mix(in srgb, var(--bg-surface) 94%, transparent); color: var(--text-primary);
  border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 18px 50px rgba(30, 20, 10, 0.28);
  backdrop-filter: blur(10px); overflow-y: auto; overscroll-behavior: contain;
  animation: h3d-in 0.35s ease both;
}
@keyframes h3d-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.h3d-menu {
  left: max(16px, env(safe-area-inset-left, 0px)); top: 72px; bottom: 16px; width: min(420px, calc(100% - 32px));
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
}
/* collapse / reopen the menu so the 3D office is fully visible */
.h3d-menu { transition: transform 0.3s ease, opacity 0.25s ease, visibility 0s; }
.h3d-menu-head { display: flex; align-items: stretch; gap: 8px; flex-shrink: 0; }
.h3d-menu-head .story-tabs { flex: 1; min-width: 0; }
.h3d-menu-head .story-tabs [role="tab"] { flex: 1; min-width: 0; white-space: nowrap; }
.h3d-menu-close {
  flex: none; width: 44px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--border-color); border-radius: 12px; background: transparent; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer;
}
.h3d-menu-close:hover { color: var(--accent); border-color: var(--accent); }
.h3d-menu-close:focus-visible, .h3d-menu-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.menu-collapsed .h3d-menu { transform: translateX(calc(-100% - 32px)); opacity: 0; visibility: hidden; transition: transform 0.3s ease, opacity 0.25s ease, visibility 0s 0.3s; pointer-events: none; animation: none; }
.h3d-menu-open { position: fixed; z-index: 11; left: max(16px, env(safe-area-inset-left, 0px)); top: 72px; animation: h3d-in 0.3s ease both; }
.h3d-menu-open[hidden] { display: none; }
.h3d-menu h1 { margin: 0; font-size: 1.9rem; line-height: 1.15; text-wrap: balance; }
.h3d-lede { margin: 0; color: var(--text-secondary); line-height: 1.55; }
.h3d-progress { display: grid; gap: 6px; font: 0.8rem var(--font-mono); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.chapter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.chapter-group details { border-radius: 12px; }
.chapter-group summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; padding: 8px 4px;
  font: 600 0.8rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary);
}
.chapter-group summary:hover { color: var(--accent); }
.chapter-group summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.chapter-group-meta { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.chapter-group .chapter-list { padding-bottom: 6px; }
.chapter-card {
  width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr) 24px; gap: 12px; align-items: center; text-align: left;
  font: inherit; color: var(--text-primary); background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.chapter-card:hover { border-color: var(--accent); transform: translateX(2px); }
.chapter-card.is-locked { opacity: 0.65; }
.chapter-card.is-done .chapter-num { background: #34d399; color: #052e1b; }
.chapter-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 0.95rem var(--font-mono); background: var(--accent-glow); color: var(--accent); }
.chapter-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chapter-title { font-weight: 600; line-height: 1.3; }
.chapter-meta { font-size: 0.78rem; color: var(--text-muted); }
.chapter-state { text-align: center; color: var(--text-secondary); }
.h3d-hint { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
#btn-reset { align-self: flex-start; }

/* scene title card */
.h3d-card {
  position: fixed; z-index: 10; left: 50%; top: 22%; transform: translateX(-50%); text-align: center;
  display: flex; flex-direction: column; gap: 6px; padding: 18px 28px; border-radius: 16px; max-width: calc(100% - 32px);
  background: color-mix(in srgb, var(--bg-primary) 88%, transparent); color: var(--text-primary); backdrop-filter: blur(8px);
  animation: h3d-card 1.4s ease both;
}
.h3d-card span { font: 600 0.75rem var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.h3d-card strong { font-size: 1.5rem; line-height: 1.2; text-wrap: balance; }
@keyframes h3d-card { 0% { opacity: 0; transform: translate(-50%, 10px); } 20%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* dialogue */
.h3d-dialogue {
  position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; justify-content: center;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.h3d-dialogue-box {
  width: min(820px, 100%); position: relative; padding: 22px 22px 14px; border-radius: 16px; cursor: pointer;
  background: color-mix(in srgb, var(--bg-surface) 95%, transparent); border: 1px solid var(--border-color);
  box-shadow: 0 18px 50px rgba(30, 20, 10, 0.3); backdrop-filter: blur(10px); animation: h3d-in 0.25s ease both;
}
.h3d-who {
  position: absolute; top: -14px; left: 18px; padding: 4px 12px; border-radius: 999px;
  font: 700 0.75rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: #64748b;
}
.h3d-dialogue-box[data-who="lia"] .h3d-who { background: #0284c7; }
.h3d-dialogue-box[data-who="bruno"] .h3d-who { background: #7c3aed; }
.h3d-dialogue-box[data-who="rustc"] .h3d-who { background: #ea580c; }
.h3d-dialogue-box[data-who="rustc"] .h3d-text { font-family: var(--font-mono); font-size: 0.98rem; }
.h3d-dialogue-box[data-who="narrador"] .h3d-text { font-style: italic; color: var(--text-secondary); }
.h3d-text { margin: 0; font-size: 1.08rem; line-height: 1.6; min-height: 3.2em; overflow-wrap: break-word; }
.h3d-text code, .h3d-question code, .q-takeaway code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 5px; border-radius: 4px; background: var(--bg-secondary); border: 1px solid var(--border-color); overflow-wrap: anywhere; }
.h3d-dialogue-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }

/* question */
.h3d-question {
  right: max(16px, env(safe-area-inset-right, 0px)); top: 72px; bottom: 16px; width: min(520px, calc(100% - 32px)); padding: 20px;
}
.h3d-question > div { display: flex; flex-direction: column; gap: 12px; }
.h3d-prompt { margin: 0; font-size: 1.2rem; line-height: 1.35; text-wrap: balance; }
.h3d-code {
  margin: 0; padding: 12px 14px; border-radius: 10px; overflow-x: auto; font: 0.84rem/1.5 var(--font-mono);
  background: #0b1220; color: #e2e8f0; border: 1px solid #1e293b;
}
/* Rust syntax colours (tokens from highlightCode in the build); the code boxes are always dark */
.h3d-code .hl-cm { color: #64748b; font-style: italic; }
.h3d-code .hl-kw { color: #c084fc; font-weight: 600; }
.h3d-code .hl-type { color: #38bdf8; }
.h3d-code .hl-fn { color: #60a5fa; }
.h3d-code .hl-macro { color: #2dd4bf; font-weight: 600; }
.h3d-code .hl-attr { color: #f59e0b; }
.h3d-code .hl-life { color: #fb7185; font-style: italic; }
.h3d-code .hl-str { color: #a3e635; }
.h3d-code .hl-num { color: #fb923c; }
.h3d-code .hl-bool { color: #f472b6; font-weight: 600; }
.h3d-code .hl-op { color: #94a3b8; }
.q-choices { display: flex; flex-direction: column; gap: 8px; }
.q-choice {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; text-align: left;
  font: inherit; font-size: 0.95rem; line-height: 1.45; color: var(--text-primary); background: var(--bg-secondary);
  border: 1px solid var(--border-color); border-radius: 12px; padding: 11px 12px; cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.q-choice:hover:not([aria-disabled="true"]) { border-color: var(--accent); transform: translateX(-2px); }
.q-choice kbd { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font: 600 0.75rem var(--font-mono); border: 1px solid var(--border-color); color: var(--text-secondary); background: var(--bg-surface); }
.q-choice span { min-width: 0; overflow-wrap: break-word; }
.q-choice.is-wrong { border-color: #f87171; opacity: 0.7; cursor: default; }
.q-choice.is-wrong span { text-decoration: line-through; text-decoration-color: #f87171; }
.q-choice.is-right { border-color: #34d399; background: rgba(52, 211, 153, 0.14); cursor: default; }
.q-choice.is-dim { opacity: 0.5; cursor: default; }
.q-choice.shake { animation: h3d-shake 0.32s ease; }
@keyframes h3d-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.q-feedback { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 0.93rem; line-height: 1.5; }
.q-feedback.is-wrong { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.45); }
.q-feedback.is-right { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.45); }
.q-after { display: flex; flex-direction: column; gap: 10px; }
.q-takeaway { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-glow); border-radius: 4px; line-height: 1.5; }
.q-after-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* study panel (left) */
.h3d-study {
  left: max(16px, env(safe-area-inset-left, 0px)); top: 72px; bottom: 16px; width: clamp(320px, 28vw, 440px); padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.study-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.study-title { margin: 4px 0 0; font-size: 1.1rem; line-height: 1.3; text-wrap: balance; }
.study-close { font-size: 1.1rem; text-decoration: none; padding: 4px 8px; }
.study-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-secondary); border: 1px solid var(--border-color); }
.study-tabs [role="tab"] {
  flex: 1; font: 600 0.85rem var(--font-sans); color: var(--text-secondary); background: none; border: 0; border-radius: 9px;
  padding: 8px 10px; min-height: 36px; cursor: pointer;
}
.study-tabs [role="tab"][aria-selected="true"] { background: var(--bg-surface); color: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.study-pane { display: flex; flex-direction: column; gap: 12px; }
.anim-title { margin: 0; font-size: 1rem; line-height: 1.35; }
.anim-code { padding: 10px 0; }
.anim-line { display: block; padding: 0 14px; border-left: 3px solid transparent; white-space: pre; transition: background 0.25s, border-color 0.25s; }
.anim-line::before { content: attr(data-n); display: inline-block; width: 2ch; margin-right: 12px; text-align: right; color: #475569; }
.anim-line.is-current { background: rgba(56, 189, 248, 0.24); border-left-color: #38bdf8; }
.anim-state { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.anim-var {
  display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 10px; min-width: 0;
  background: var(--bg-secondary); border: 1px solid var(--border-color); border-top: 3px solid #64748b;
  animation: anim-pop 0.35s ease both;
}
@keyframes anim-pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.anim-var-name { font: 600 0.82rem var(--font-mono); overflow-wrap: anywhere; }
.anim-var-type { font-weight: 400; color: var(--text-muted); }
.anim-var-value { font: 0.9rem var(--font-mono); color: var(--text-primary); overflow-wrap: anywhere; }
.anim-var-meta { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.anim-var.is-new { border-top-color: #22d3ee; }
.anim-var.is-mut { border-top-color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.anim-var.is-borrowed { border-top-color: #a78bfa; background: rgba(167, 139, 250, 0.1); }
.anim-var.is-moved { border-top-color: #94a3b8; opacity: 0.6; }
.anim-var.is-moved .anim-var-value, .anim-var.is-dropped .anim-var-value { text-decoration: line-through; }
.anim-var.is-dropped { border-style: dashed; opacity: 0.5; }
.anim-var.is-error { border-top-color: #f87171; background: rgba(248, 113, 113, 0.12); }
.anim-var.is-ok { border-top-color: #34d399; }
.anim-empty { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.anim-out { margin: 0; padding: 8px 12px; border-radius: 8px; background: #052e1b; color: #86efac; font: 0.82rem/1.5 var(--font-mono); white-space: pre-wrap; }
.anim-out::before { content: "salida"; display: block; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: #4ade80; opacity: 0.7; }
.anim-note { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-glow); border-radius: 4px; line-height: 1.5; font-size: 0.93rem; min-height: 3em; }
.anim-note code, .study-title code, .anim-title code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 5px; border-radius: 4px; background: var(--bg-secondary); border: 1px solid var(--border-color); }
.anim-controls { display: flex; gap: 8px; align-items: center; }
.anim-controls .h3d-btn { min-width: 46px; padding: 8px 12px; }
.anim-controls .h3d-btn:disabled { opacity: 0.4; cursor: default; }
.anim-count { margin-left: auto; font: 0.78rem var(--font-mono); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.anim-dots { display: flex; gap: 4px; }
.anim-dots span { flex: 1; height: 4px; border-radius: 2px; background: var(--border-color); transition: background 0.3s; }
.anim-dots span.is-on { background: var(--accent); }
.study-docs { font-size: 0.92rem; }
.study-docs .study-doc + .study-doc { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-color); }
.study-docs h3 { margin: 0 0 8px; font-size: 1.05rem; }
.study-docs h4, .study-docs h5 { font-size: 0.98rem; }
.study-docs p, .study-docs li { max-width: none; line-height: 1.6; }
.study-docs table { display: block; overflow-x: auto; font-size: 0.85rem; }
.study-docs img { max-width: 100%; height: auto; }
.study-docs .code-block-wrapper { margin: 10px 0; }
.study-docs .code-block-wrapper pre { font-size: 0.8rem; }
#docs-lesson { align-self: flex-start; }
/* with the panel docked, the dialogue box and question panel make room for it */
@media (min-width: 1200px) {
  body.study-open .h3d-dialogue { padding-left: calc(clamp(320px, 28vw, 440px) + 32px); }
  body.study-open .h3d-question { width: min(520px, 34vw); }
}

/* chapter complete */
.h3d-done {
  left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); padding: 24px; text-align: center;
  display: flex; flex-direction: column; gap: 10px; animation: none;
}
.h3d-done h2 { margin: 0; font-size: 1.35rem; text-wrap: balance; }
.h3d-done p { margin: 0; }
.h3d-stars { font-size: 2.2rem; letter-spacing: 0.2em; color: #f59e0b; }
.h3d-done .q-after-actions { justify-content: center; margin-top: 6px; }

/* phones: panels become bottom sheets so the 3D scene stays visible on top */
@media (max-width: 760px) {
  .hide-narrow { display: none; }
  .h3d-menu, .h3d-question { left: 8px; right: 8px; width: auto; top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); max-height: 62%; padding: 16px; border-radius: 16px; }
  .h3d-menu h1 { font-size: 1.5rem; }
  .h3d-menu-head .story-tabs [role="tab"] { padding-left: 6px; padding-right: 6px; font-size: 0.85rem; }
  body.menu-collapsed .h3d-menu { transform: translateY(calc(100% + 24px)); }
  .h3d-menu-open { top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .h3d-question { max-height: 70%; }
  .h3d-text { font-size: 1rem; }
  .h3d-dialogue-box { padding: 20px 16px 10px; }
  .h3d-card strong { font-size: 1.2rem; }
  .show-narrow { display: inline; }
  .h3d-top { gap: 6px; }
  .h3d-hud { padding: 6px 10px; grid-template-columns: auto; }
  .h3d-hud-chapter { display: none; }
  .h3d-hud-scene { text-align: center; }
  .h3d-tools { gap: 6px; }
  .h3d-tools .h3d-btn { min-width: 42px; padding: 0 10px; }
}
/* below the docking width the study panel covers the scene until it is closed */
body.study-overlay .h3d-study {
  z-index: 25; left: 8px; right: 8px; width: auto; top: calc(64px + env(safe-area-inset-top, 0px)); bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin: 0 auto;
}
@media (prefers-reduced-motion: reduce) {
  .h3d-panel, .h3d-dialogue-box, .q-choice.shake, .h3d-menu-open { animation: none; }
  .h3d-menu, body.menu-collapsed .h3d-menu { transition: none; }
  .h3d-card { animation: none; }
  .anim-var { animation: none; }
  .anim-line, .anim-dots span { transition: none; }
  .h3d-hud-track span, .h3d-track span { transition: none; }
}
