/* ============================================================
   Sky High - the skyscraper game
   ============================================================ */

:root {
    --ink: #33334d;
    --ink-soft: #6b6b85;
    --paper: #fffdf7;
    --gold: #ffc93c;
    --good: #35c26b;
    --bad: #ef6461;
    --steel: #5f8fc4;
    --steel-dark: #3f6c9e;
    --night: #1d2347;
    --shadow: 0 6px 0 rgba(0, 0, 0, .09), 0 12px 26px rgba(70, 60, 120, .14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: 'Baloo 2', 'Trebuchet MS', sans-serif;
    color: var(--ink);
    background: linear-gradient(170deg, #bfe7ff 0%, #d9f0ff 40%, #fff3d6 100%);
    padding: 64px 14px 40px;
    overflow-x: hidden;
}

/* drifting clouds */
.sky {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.sky::before,
.sky::after {
    content: '';
    position: absolute;
    width: 110px;
    height: 38px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 26px -14px 0 4px #fff, 58px 2px 0 -6px #fff, -6px 4px 0 -4px #fff;
    opacity: .8;
    animation: drift 60s linear infinite;
}

.sky::before { top: 12%; left: -160px; }
.sky::after { top: 34%; left: -160px; animation-duration: 85s; animation-delay: -30s; transform: scale(.7); }

@keyframes drift {
    to { translate: calc(100vw + 320px) 0; }
}

main,
.topbar,
footer {
    position: relative;
    z-index: 1;
}

main {
    max-width: 1080px;
    margin: 0 auto;
}

/* ---------- top bar ---------- */
.topbar {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0 14px;
    z-index: 20;
}

.chip {
    font: inherit;
    font-weight: 700;
    font-size: 17px;
    border: 0;
    border-radius: 999px;
    padding: 6px 16px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.starcount .s { color: var(--gold); margin-right: 4px; }

/* ---------- cards & buttons ---------- */
.card {
    background: var(--paper);
    border-radius: 26px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.btn {
    font: inherit;
    font-weight: 800;
    font-size: 19px;
    border: 0;
    border-radius: 16px;
    padding: 10px 20px;
    min-height: 50px;
    background: #e9eef8;
    color: var(--ink);
    box-shadow: 0 4px 0 rgba(0, 0, 0, .12);
    cursor: pointer;
    transition: transform .08s;
    margin: 6px 4px;
}

.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn.primary { background: var(--steel); color: #fff; box-shadow: 0 4px 0 var(--steel-dark); }
.btn.small { font-size: 16px; min-height: 42px; padding: 6px 12px; }
.btn:disabled { opacity: .45; cursor: default; }

.link {
    font: inherit;
    font-weight: 800;
    background: none;
    border: 0;
    color: var(--steel-dark);
    cursor: pointer;
    text-decoration: underline;
    font-size: 17px;
}

.link.small { font-size: 14px; color: var(--ink-soft); font-weight: 600; }

.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.small { font-size: 14px; color: var(--ink-soft); }
.hint { color: var(--ink-soft); }

/* ---------- home ---------- */
.start-card { padding-top: 14px; }

.hero {
    display: flex;
    align-items: center;
    gap: 16px;
}

.game-title {
    font-family: 'Fredoka One', 'Baloo 2', sans-serif;
    font-size: clamp(40px, 7vw, 60px);
    line-height: 1;
    color: var(--steel-dark);
    letter-spacing: 1px;
}

.game-title span { color: #ff9f1c; }
.tagline { font-size: 19px; }

.rivet { display: block; }
.rivet-light { animation: blink 1.6s infinite; }
.mascot-holder .rivet { animation: bob 3s ease-in-out infinite; }

@keyframes bob {
    50% { transform: translateY(-6px) rotate(-2deg); }
}

@keyframes blink {
    50% { opacity: .2; }
}

.tier-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 10px;
}

.tier {
    font: inherit;
    font-weight: 800;
    font-size: 17px;
    border: 3px solid #d7e2f3;
    background: #fff;
    border-radius: 999px;
    padding: 6px 16px;
    min-height: 46px;
    cursor: pointer;
    color: var(--ink);
}

.tier.on { background: var(--steel); border-color: var(--steel); color: #fff; }
.tier.locked { opacity: .55; }

.home-skyline {
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(#cfeaff, #eef7ff);
    height: 230px;
}

.home-skyline.is-night { background: linear-gradient(#141a3a, #2b3570); }

.home-skyline svg { width: 100%; height: 100%; display: block; }

.collect-line { margin-top: 8px; font-size: 17px; }

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.mode-card {
    font: inherit;
    text-align: left;
    border: 0;
    background: var(--paper);
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 130px;
    transition: transform .12s;
}

.mode-card:hover { transform: translateY(-3px) rotate(-.5deg); }
.mode-card .mi { display: block; width: 44px; height: 44px; }
.micon { width: 100%; height: 100%; display: block; }
.mode-card b { font-size: 20px; }
.mode-card small { color: var(--ink-soft); font-size: 15px; }
.mstars { color: var(--gold); font-size: 20px; letter-spacing: 2px; margin-top: auto; }

.grownups { text-align: center; margin-top: 18px; }

/* ---------- skyline svg ---------- */
.skyline .tw { stroke: rgba(40, 60, 100, .45); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.skyline .tw.ghost { fill: rgba(255, 255, 255, .35); stroke: rgba(90, 110, 150, .6); stroke-dasharray: 4 3; }
.skyline .tw.mine { stroke: #ff9f1c; stroke-width: 3; stroke-dasharray: 6 3; }
.skyline .tw.good { stroke: var(--good); stroke-width: 3; }
.skyline .tw.bad { stroke: var(--bad); stroke-width: 3; }
.skyline .winfill { stroke: none; }
.skyline.night .tw { fill-opacity: .75; }
.skyline .ghostq { font: 800 34px 'Baloo 2', sans-serif; fill: rgba(90, 110, 150, .7); text-anchor: middle; }
.skyline .tlabel { font: 800 22px 'Baloo 2', sans-serif; fill: var(--ink); text-anchor: middle; }
.skyline.night .tlabel { fill: #fff; }
.skyline .groundbar { fill: #9aa7bf; }
.skyline.night .groundbar { fill: #0d1230; }
.skyline .gridline { stroke: rgba(80, 100, 140, .2); stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
.skyline .gridlabel { font: 700 18px 'Baloo 2', sans-serif; fill: rgba(60, 80, 120, .6); }
.skyline.night .gridlabel { fill: rgba(255, 255, 255, .5); }
.skyline .clockface { fill: #fffdf7; stroke: #6b6b85; stroke-width: 2; vector-effect: non-scaling-stroke; }
.skyline .twistline,
.ticon .twistline { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: 2; vector-effect: non-scaling-stroke; }
.skyline .star { fill: #fff; animation: twinkle 2.4s infinite; }
.skyline .aircraft { fill: #ff4040; animation: blink 1.4s infinite; }
.skyline .twg { cursor: pointer; }

.skyline .twg.rise { animation: rise .9s cubic-bezier(.2, .9, .3, 1.2) both; }

@keyframes rise {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes twinkle {
    50% { opacity: .2; }
}

.ticon { display: block; overflow: visible; }
.ticon .tw { stroke: rgba(40, 60, 100, .5); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ticon .clockface { fill: #fffdf7; stroke: #6b6b85; stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* ---------- collection ---------- */
.mode-head { margin: 4px 4px 12px; }
.mode-head h2 { font-family: 'Fredoka One', sans-serif; font-size: 34px; color: var(--steel-dark); }
.mode-head .sub { font-size: 17px; }

.big-skyline {
    overflow-x: auto;
    background: linear-gradient(#cfeaff, #eef7ff);
    border-radius: 18px;
    height: 460px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.big-skyline:has(.night) { background: linear-gradient(#141a3a, #2b3570); }
.big-skyline svg { height: 100%; display: block; min-width: 100%; }

.two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.zoomsvg { width: 100%; max-width: 280px; display: block; margin: 6px auto; }

.tcard { display: flex; gap: 16px; align-items: flex-start; }
.tcard-art { flex: 0 0 auto; padding-top: 6px; }
.tcard h3 { font-size: 24px; line-height: 1.1; }
.tcard .aka { color: var(--ink-soft); font-size: 15px; margin-bottom: 4px; }
.tcard table { border-collapse: collapse; margin: 6px 0; font-size: 16px; }
.tcard th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 1px 12px 1px 0; vertical-align: top; }
.tcard td { font-weight: 700; }
.tcard .facts { margin: 6px 0 0 20px; font-size: 16px; }
.tcard .giraffes { margin-top: 6px; color: #b77a12; font-weight: 700; }

/* ---------- play cards ---------- */
.play-card { min-height: 260px; }
.round { color: var(--ink-soft); font-weight: 700; }
.prompt { font-size: 23px; font-weight: 800; line-height: 1.25; }
.q-row { display: flex; align-items: center; gap: 16px; margin: 8px 0 14px; }
.q-art { flex: 0 0 auto; }

.choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.choices.n6 { grid-template-columns: repeat(3, 1fr); margin-top: 10px; }

.choice {
    font: inherit;
    font-weight: 800;
    font-size: 19px;
    min-height: 60px;
    border: 3px solid #d7e2f3;
    background: #fff;
    border-radius: 16px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--ink);
}

.choice:hover:not(:disabled) { border-color: var(--steel); }
.choice.right { background: #dff7e7; border-color: var(--good); }
.choice.wrong { background: #fde5e4; border-color: var(--bad); animation: shake .4s; }
.choice:disabled { cursor: default; }

.explain { margin-top: 12px; font-size: 18px; min-height: 28px; }
.next { display: block; margin: 12px auto 0; }

@keyframes shake {
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.shake { animation: shake .4s; }

/* ---------- tower cards game ---------- */
.status { font-size: 18px; text-align: center; margin-bottom: 10px; }

.card-table {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.game-card {
    width: 250px;
    min-height: 340px;
    background: #fff;
    border-radius: 22px;
    border: 4px solid #d7e2f3;
    padding: 14px;
    box-shadow: var(--shadow);
    text-align: center;
    animation: flip .35s ease-out;
}

.game-card.back {
    background: repeating-linear-gradient(45deg, #9cc7f0 0 14px, #b6d6f5 14px 28px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
}

@keyframes flip {
    from { transform: rotateY(90deg); }
}

.gc-art { display: flex; justify-content: center; height: 124px; align-items: flex-end; }
.game-card h3 { font-size: 20px; line-height: 1.1; margin-top: 6px; }
.gc-city { color: var(--ink-soft); font-size: 14px; }
.gc-stats { margin-top: 8px; display: grid; gap: 4px; }
.gc-stat { display: flex; justify-content: space-between; background: #f1f5fb; border-radius: 10px; padding: 3px 10px; font-size: 16px; }
.gc-stat.chosen { background: #fff1c7; outline: 3px solid var(--gold); }

.pick-row { flex-basis: 100%; text-align: center; font-size: 19px; }

/* ---------- height guess ---------- */
.readout {
    font-family: 'Fredoka One', sans-serif;
    font-size: 54px;
    text-align: center;
    color: var(--steel-dark);
}

.big-range { width: 100%; height: 44px; accent-color: var(--steel); }
.nudges { display: flex; flex-wrap: wrap; justify-content: center; }
.nudge { min-width: 64px; }

.guess-viz { display: flex; justify-content: center; margin: 6px 0 10px; }

.ruler {
    position: relative;
    width: 260px;
    border-left: 4px solid var(--ink-soft);
    border-bottom: 4px solid var(--ink-soft);
}

.guessline {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 3px dashed #ff9f1c;
    z-index: 2;
}

.guessline span { position: absolute; right: 0; top: -26px; font-weight: 800; color: #d07800; }

.grow {
    position: absolute;
    bottom: 0;
    left: 30px;
    transform-origin: bottom;
    animation: grow 1.1s cubic-bezier(.2, .9, .3, 1.1) both;
    display: flex;
    align-items: flex-end;
}

@keyframes grow {
    from { transform: scaleY(0); }
}

/* ---------- line them up ---------- */
.axis { display: flex; justify-content: space-between; font-weight: 800; color: var(--ink-soft); }

.line-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 14px;
}

.line-card {
    flex: 1 1 140px;
    background: #fff;
    border: 3px solid #d7e2f3;
    border-radius: 18px;
    padding: 12px 8px 6px;
    text-align: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
    box-shadow: 0 4px 0 rgba(0, 0, 0, .08);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.line-card b { font-size: 17px; line-height: 1.15; }
.line-card small { color: var(--ink-soft); }
.line-card.dragging { z-index: 5; position: relative; box-shadow: 0 14px 30px rgba(0, 0, 0, .2); cursor: grabbing; border-color: var(--steel); }
.arrows { display: flex; justify-content: space-between; margin-top: 6px; }

.mini {
    font: inherit;
    border: 0;
    background: #e9eef8;
    border-radius: 10px;
    width: 44px;
    height: 38px;
    font-size: 16px;
    cursor: pointer;
}

.line-sky { height: 300px; background: linear-gradient(#cfeaff, #eef7ff); border-radius: 16px; }
.line-sky svg,
.time-sky svg,
.studio-sky svg,
.deck-view svg { width: 100%; height: 100%; display: block; }
.line-names { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; justify-content: center; }
.line-names span { font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.line-names .good { background: #dff7e7; }
.line-names .bad { background: #fde5e4; }

/* ---------- who am I ---------- */
.who-row { display: flex; gap: 16px; align-items: flex-start; }

.mystery {
    flex: 0 0 100px;
    height: 150px;
    border-radius: 16px;
    background: repeating-linear-gradient(0deg, #b6d6f5 0 10px, #9cc7f0 10px 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 64px 'Fredoka One', sans-serif;
    color: #fff;
}

/* the mystery box flips round to show the tower once it is solved */
.mystery.solved {
    background: linear-gradient(#fff6d8, #ffe9a8);
    box-shadow: 0 0 0 4px var(--good), 0 0 24px rgba(255, 196, 0, .7);
    animation: unmask .6s ease-out;
}
.mystery.solved svg { max-height: 140px; transform-origin: bottom; animation: rise .7s ease-out; }

@keyframes unmask {
    0% { transform: rotateY(90deg) scale(.8); }
    60% { transform: rotateY(-10deg) scale(1.08); }
    100% { transform: none; }
}

.choice { position: relative; }
.choice.right { animation: bounce .5s; color: #157a3b; }
.choice.wrong { color: #b3261e; }

@keyframes bounce {
    30% { transform: scale(1.12); }
    60% { transform: scale(.96); }
}

.pts-fly {
    position: absolute;
    right: 10px;
    top: -6px;
    font: 28px 'Fredoka One', sans-serif;
    color: #ff9f1c;
    text-shadow: 0 2px 0 #fff;
    pointer-events: none;
    animation: fly 1.2s ease-out forwards;
}

@keyframes fly {
    to { transform: translateY(-60px) scale(1.4); opacity: 0; }
}

.who-fb { min-height: 32px; margin: 12px 0 0; font-size: 20px; font-weight: 800; text-align: center; }
.who-fb.good { color: #157a3b; }
.who-fb.bad { color: #b3261e; }
.who-fb.pop-in { animation: pop .35s; }

.clues { font-size: 19px; padding-left: 24px; flex: 1; }
.clues li { margin-bottom: 4px; }
.clues li.new { animation: pop .4s; font-weight: 700; }

@keyframes pop {
    from { transform: scale(.9); opacity: 0; }
}

/* ---------- map ---------- */
.map-wrap { border-radius: 16px; overflow: hidden; }
.worldmap { width: 100%; display: block; cursor: crosshair; }
.worldmap .ocean { fill: #a7d8f5; }
.worldmap .land { fill: #cde8b5; stroke: #8db37a; stroke-width: .6; }
.worldmap .grat line { stroke: rgba(255, 255, 255, .5); stroke-width: .6; }
.worldmap .grat .equator { stroke: rgba(255, 255, 255, .9); stroke-dasharray: 4 3; }
.worldmap .pin.guess { fill: #ff9f1c; stroke: #fff; stroke-width: 2; }
.worldmap .pin.real { fill: var(--bad); stroke: #fff; stroke-width: 2.5; animation: pulse 1s infinite alternate; }
.worldmap .pinline { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; }
.worldmap .pinlabel { font: 800 18px 'Baloo 2', sans-serif; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; }

@keyframes pulse {
    to { r: 11; }
}

/* ---------- elevator ---------- */
.lift-wrap { display: flex; gap: 16px; align-items: flex-start; }

.shaft {
    position: relative;
    flex: 0 0 150px;
    height: 420px;
    background: linear-gradient(#cfeaff, #eef7ff);
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 6px;
}

.shaft-art .ticon { max-width: 140px; }

.car {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 46px;
    height: 46px;
    margin-left: -23px;
    background: var(--gold);
    border: 3px solid #d99a16;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: bottom 1s cubic-bezier(.5, 0, .3, 1);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .7);
}

.car .floor { font: 800 16px 'Baloo 2', sans-serif; }
.qbox { flex: 1; }

.deck-view {
    position: relative;
    height: 260px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(#141a3a, #2b3570);
    margin: 10px 0;
}

.window-frame {
    position: absolute;
    inset: 0;
    border: 12px solid #5c6788;
    background: linear-gradient(90deg, transparent 32.5%, #5c6788 32.5% 34%, transparent 34% 65.5%, #5c6788 65.5% 67%, transparent 67%);
    z-index: 2;
    pointer-events: none;
    border-radius: 18px;
}

/* ---------- time ---------- */
.time-sky { height: 260px; background: linear-gradient(#ffe9c4, #fff7e6); border-radius: 16px; margin: 8px 0; }
.timeline { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tl-item { background: #fff1c7; border-radius: 12px; padding: 4px 10px; display: flex; flex-direction: column; animation: pop .4s; }
.tl-item b { color: #b77a12; }
.tl-item small { color: var(--ink-soft); }
.pile { display: flex; flex-wrap: wrap; gap: 10px; }

.pile-card {
    font: inherit;
    font-weight: 800;
    background: #fff;
    border: 3px solid #d7e2f3;
    border-radius: 16px;
    padding: 8px;
    width: 130px;
    min-height: 110px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--ink);
}

.pile-card span { font-size: 15px; line-height: 1.1; }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.studio-sky { position: relative; height: 460px; background: linear-gradient(#cfeaff, #eef7ff); border-radius: 16px; }
.studio-sky svg { height: calc(100% - 48px) !important; }
.legend { text-align: center; font-weight: 800; font-size: 15px; padding: 4px 8px; }
.studio-read .sum { font-size: 22px; font-weight: 700; }
.studio-read p { margin-bottom: 6px; font-size: 18px; }
.stepper { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 6px 0; }
.stepper > span { width: 110px; font-weight: 800; }
.stepper > b { font-size: 20px; margin-left: 8px; }
.crowns { display: flex; flex-wrap: wrap; align-items: center; }
.crowns > span { font-weight: 800; width: 50px; }
.crown-btn.on { background: var(--gold); }
.namebox { font-weight: 800; display: block; margin-bottom: 6px; }
.namebox input { font: inherit; font-size: 18px; padding: 6px 10px; border-radius: 12px; border: 3px solid #d7e2f3; width: 220px; }

/* ---------- science ---------- */
.lab { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.lab-canvas { width: 100%; max-width: 420px; border-radius: 16px; display: block; }
.lab-right p { margin-bottom: 8px; font-size: 17px; }
.meter { height: 22px; background: #e9eef8; border-radius: 999px; overflow: hidden; }
.meter .fill { display: block; height: 100%; width: 0; transition: width .2s, background .3s; }
.science-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sci { text-align: center; }
.sci .ticon { margin: 0 auto 6px; }
.sci p { font-size: 16px; }

/* ---------- overlay ---------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(29, 35, 71, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 16px;
}

.overlay[hidden] { display: none; }

.result-card {
    max-width: 440px;
    width: 100%;
    text-align: center;
    animation: pop .35s;
}

.result-card h2 { font-family: 'Fredoka One', sans-serif; color: var(--steel-dark); font-size: 30px; }
.result-card p { font-size: 18px; margin: 4px 0; }
.result-mascot { display: flex; justify-content: center; }
.big-stars { font-size: 52px; color: #d7dbe8; }
.big-stars .on { color: var(--gold); display: inline-block; animation: starpop .5s both; }

@keyframes starpop {
    from { transform: scale(0) rotate(-90deg); }
}

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }

.confetti i {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 16px;
    border-radius: 3px;
    animation: fall linear both;
}

@keyframes fall {
    to { transform: translateY(110vh) rotate(720deg); }
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--night);
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 700;
    z-index: 50;
    box-shadow: var(--shadow);
    animation: pop .3s;
    text-align: center;
    max-width: 90vw;
}

.credits {
    max-width: 1080px;
    margin: 20px auto 0;
    font-size: 13px;
    color: var(--ink-soft);
    text-align: center;
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
    .two-col,
    .studio,
    .lab { grid-template-columns: 1fr; }
    .choices.n6 { grid-template-columns: repeat(2, 1fr); }
    .lift-wrap { flex-direction: column; }
    .shaft { flex-basis: auto; width: 100%; height: 300px; }
    .hero { flex-direction: column; text-align: center; }
    .who-row { flex-direction: column; }
    .mystery { width: 100%; flex-basis: auto; height: 80px; }
}

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