:root {
    color-scheme: dark;
    --ink: #f7f9ff;
    --muted: #a9b6d2;
    --navy-950: #070b16;
    --navy-900: #0d1425;
    --navy-800: #14203a;
    --line: #2a3a5b;
    --accent: #8ba4ff;
    --accent-secondary: #8ba4ff;
    --pink: #f72585;
    --yellow: #ffd166;
    --mint: #72efdd;
    --radius: 1.2cqw;
    font-family: "Pretendard", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #02040a;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.deck-shell {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 182, 255, 0.11), transparent 32%),
        #02040a;
}

.deck-stage {
    position: relative;
    width: min(100vw, calc(100vh * 16 / 9));
    aspect-ratio: 16 / 9;
    container-type: size;
    overflow: hidden;
    background: var(--navy-950);
    box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.55);
}

.slide {
    position: absolute;
    inset: 0;
    display: none;
    overflow: hidden;
    padding: 4.7cqh 5.1cqw 5.5cqh;
    color: var(--ink);
    background:
        linear-gradient(120deg, rgba(34, 182, 255, 0.04), transparent 45%),
        var(--navy-950);
}

.slide.is-active {
    display: flex;
    flex-direction: column;
    animation: slide-in 260ms ease-out both;
}

@keyframes slide-in {
    from { opacity: 0; transform: translateX(0.8cqw); }
    to { opacity: 1; transform: none; }
}

.slide::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 0.55cqh;
    background: linear-gradient(90deg, var(--accent) 0 72%, var(--accent-secondary) 72%);
}

.slide-number {
    position: absolute;
    right: 4.8cqw;
    bottom: 2.1cqh;
    color: #7f8eaa;
    font-size: 1cqw;
    letter-spacing: 0.08em;
}

.slide-footer {
    position: absolute;
    left: 5.1cqw;
    bottom: 1.95cqh;
    display: flex;
    gap: 1.2cqw;
    color: #7585a2;
    font-size: 0.86cqw;
    letter-spacing: -0.01em;
}

.slide-footer::before {
    content: "";
    width: 1.6cqw;
    height: 0.18cqh;
    align-self: center;
    background: var(--accent-secondary);
}

.eyebrow {
    margin: 0 0 1.2cqh;
    color: var(--accent);
    font-size: 1.12cqw;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
    word-break: keep-all;
}

h1,
h2 {
    margin-bottom: 2.4cqh;
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1.08;
    text-wrap: balance;
}

h1 {
    font-size: 5.1cqw;
}

h2 {
    font-size: 3.35cqw;
}

h3 {
    margin-bottom: 1.2cqh;
    font-size: 1.85cqw;
    line-height: 1.2;
}

p,
li,
label,
button,
a {
    font-size: 1.52cqw;
    line-height: 1.45;
}

.lead {
    color: #d9e2f3;
    font-size: 1.92cqw;
    line-height: 1.45;
    letter-spacing: -0.025em;
}

.muted {
    color: var(--muted);
}

.accent {
    color: var(--accent);
}

.pink { color: var(--pink); }
.yellow { color: var(--yellow); }
.mint { color: var(--mint); }

.split {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 4cqw;
    align-items: center;
    min-height: 0;
    flex: 1;
}

.split.equal {
    grid-template-columns: 1fr 1fr;
}

.stack {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.center {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.formula {
    display: inline-flex;
    align-items: baseline;
    gap: 0.6cqw;
    padding: 1.1cqh 1.1cqw;
    border-left: 0.35cqw solid var(--accent);
    color: #fff;
    background: #111d34;
    font-family: "JetBrains Mono", "Cascadia Code", monospace;
    font-size: 2.15cqw;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.formula.big {
    font-size: 3cqw;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75cqw;
    align-items: center;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55cqw;
    min-height: 4.6cqh;
    padding: 0.55cqh 1.1cqw;
    border: 0.1cqw solid #405172;
    border-radius: 999px;
    color: var(--ink);
    background: #17243e;
    cursor: pointer;
    text-decoration: none;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-0.15cqh);
    border-color: var(--accent);
    background: #1b3154;
    outline: none;
}

.button.primary {
    border-color: var(--accent);
    color: #03121c;
    background: var(--accent);
    font-weight: 900;
}

.button[data-active="true"] {
    border-color: var(--accent);
    color: #03121c;
    background: var(--accent);
}

.big-number {
    color: var(--accent);
    font-size: 7.2cqw;
    font-weight: 950;
    line-height: 0.9;
    letter-spacing: -0.07em;
}

.stage-panel {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border: 0.1cqw solid #293a5c;
    border-radius: var(--radius);
    background: #0b1325;
}

.block-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1.1cqh 1.6cqw rgba(0, 0, 0, 0.35));
}

.speaker-notes {
    display: none;
}

.deck-controls {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    transform: translateX(-50%);
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(6, 10, 20, 0.88);
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    opacity: 0.22;
    transition: opacity 160ms ease;
}

.deck-controls:hover,
.deck-controls:focus-within {
    opacity: 1;
}

.deck-controls button {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #18233a;
    cursor: pointer;
}

.deck-controls button:disabled {
    opacity: 0.28;
    cursor: default;
}

.deck-count {
    min-width: 4.5rem;
    text-align: center;
    color: #cbd6ec;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.deck-download {
    position: fixed;
    z-index: 22;
    top: 14px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border: 1px solid #52617b;
    border-radius: 7px;
    color: #eef3ff;
    background: #101a2f;
    font: 600 12px/1.4 "Malgun Gothic", system-ui, sans-serif;
    text-decoration: none;
}
.deck-download:hover, .deck-download:focus-visible { border-color: var(--accent); color: var(--accent); }
:fullscreen .deck-download { display: none; }

.deck-progress-track {
    position: fixed;
    z-index: 21;
    inset: auto 0 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.deck-progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--mint));
    transition: width 180ms ease;
}

.notes-panel {
    position: fixed;
    z-index: 30;
    right: 1rem;
    bottom: 4.8rem;
    display: none;
    width: min(34rem, calc(100vw - 2rem));
    max-height: 40vh;
    overflow: auto;
    padding: 1rem 1.2rem;
    border: 1px solid #435373;
    border-radius: 1rem;
    color: #eaf0ff;
    background: rgba(7, 12, 23, 0.96);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
}

.notes-panel p,
.notes-panel li {
    font-size: 1rem;
}

.show-notes .notes-panel {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px), (max-height: 560px) {
    .deck-controls {
        bottom: 0.45rem;
        opacity: 0.75;
        transform: translateX(-50%) scale(0.84);
        transform-origin: bottom center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}

.print-view, .print-view body { width: 16in; height: auto; overflow: visible; background: #070b16; }
.print-view .deck-shell { position: static; display: block; }
.print-view .deck-stage { width: 16in; height: auto; aspect-ratio: auto; overflow: visible; container-type: normal; box-shadow: none; }
.print-page { position: relative; width: 16in; height: 9in; container-type: size; break-inside: avoid; break-after: page; }
.print-page:last-child { break-after: auto; }
.print-view .slide { display: flex !important; flex-direction: column; position: absolute; inset: 0; animation: none !important; }
.print-view *, .print-view *::before, .print-view *::after { animation: none !important; transition: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-view .deck-controls, .print-view .deck-progress-track, .print-view .notes-panel, .print-view .deck-download { display: none !important; }
@media print {
    @page { size: 16in 9in; margin: 0; }
}
