html, body { width: 100%; height: 100%; overflow: hidden; }
body { display: grid; grid-template-rows: 65px minmax(0, 1fr) 58px; }
.deck-header, .deck-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 32px; gap: 16px; }
.deck-header { border-bottom: 1px solid var(--line); }
.deck-tools { display: flex; gap: 8px; align-items: center; }
.deck-tools button { border: 1px solid transparent; padding: 8px 12px; background: none; font-size: 12px; border-radius: 3px; }
.deck-tools button:hover { border-color: var(--line); }
.preview-badge { color: var(--accent); font-size: 9px; letter-spacing: .1em; }
#viewport { min-height: 0; min-width: 0; position: relative; overflow: hidden; }
#stage { width: 1280px; height: 720px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(var(--stage-scale, .8)); transform-origin: center; }
.deck-mode .slide-scene { width: 100%; height: 100%; overflow: hidden; border: 1px solid var(--line); }
.deck-mode [data-step][data-visible="false"] { visibility: hidden; pointer-events: none; }
.deck-footer { border-top: 1px solid var(--line); font-size: 12px; }
.slide-position { display: flex; gap: 16px; align-items: center; }
#slide-counter { font-family: var(--mono); color: var(--accent); }
.divider { color: var(--line); }
.navigation { display: flex; align-items: center; gap: 16px; }
.navigation button { width: 40px; height: 34px; border: 1px solid var(--line); background: transparent; border-radius: 3px; font-size: 19px; }
#step-counter { min-width: 90px; text-align: center; color: var(--muted); font-size: 11px; }
.deck-progress { position: fixed; height: 3px; bottom: 0; left: 0; width: 100%; background: var(--line); }
#progress-fill { height: 100%; background: var(--accent); width: 0; }
.loading { text-align: center; padding: 200px 40px; color: var(--muted); font-size: 25px; }
.fatal-error { position: fixed; top: 25%; left: 10%; right: 10%; padding: 32px; border: 1px solid var(--accent); background: var(--panel); line-height: 1.7; z-index: 50; }
.deck-dialog { width: min(700px, calc(100vw - 40px)); max-height: 80vh; overflow: auto; padding: 32px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.deck-dialog::backdrop { background: #252e2cb0; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.dialog-heading h2 { font: 400 32px var(--serif); letter-spacing: -.03em; }
.dialog-heading button { border: 0; background: none; font-size: 25px; }
#overview-list { list-style: none; padding: 0; }
#overview-list button { display: flex; gap: 20px; width: 100%; text-align: left; background: none; border: 1px solid var(--line); padding: 20px; margin: 10px 0; border-radius: 3px; }
#overview-list button[aria-current="true"] { border-color: var(--accent); color: var(--accent); }
#overview-list button span { font-family: var(--mono); color: var(--accent); }
.key-list { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; font-size: 13px; line-height: 1.5; }
.key-list dt { font-weight: 600; } .key-list dd { margin: 0; color: var(--muted); }
.deck-dialog > p { font-size: 12px; color: var(--muted); line-height: 1.7; }
@media(max-width: 650px) { .deck-header, .deck-footer { padding: 0 12px; } .wordmark { font-size: 23px; } .wordmark small, .wordmark i, #slide-label, .divider { display: none; } .deck-tools { gap: 0; } .deck-tools button { padding: 8px; } .slide-position { gap: 6px; } .navigation { gap: 8px; } .preview-badge { display: none; } }
