:root {
  --ink: #14343A;
  --teal: #1F6F78;
  --mid: #2A9D8F;
  --light: #E4EFEC;
  --orange: #E76F51;
  --rust: #B24A2A;
  --soft: #FCEDE6;
  --paper: #FBF7F0;
  --card: #FFFFFF;
  --gray: #5E7176;
  --pale: #BFD8D5;
  --night: #0B2B33;
}

* { box-sizing: border-box; margin: 0; padding: 0 }
html, body { height: 100%; background: #0B1F23; overflow: hidden }
body { font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif; color: var(--ink) }

/* 1920×1080 stage, scaled to fit the window (letterboxed) */
#viewport { position: fixed; inset: 0 }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0 }

.slide {
  position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; gap: 40px;
  padding: 110px 150px; background: var(--paper);
}
.slide.active { display: flex }
.slide.dark { background: var(--night); color: #F4EFE6 }

h1 { font-size: 150px; font-weight: 900; line-height: 1.12; letter-spacing: 4px }
h2 { font-size: 84px; font-weight: 900; color: var(--teal); line-height: 1.2 }
.dark h2 { color: #F4EFE6 }
.kicker { font-size: 44px; font-weight: 700; color: var(--orange); letter-spacing: 2px }
.sub { font-size: 52px; font-weight: 500; color: var(--pale) }
.big { font-size: 50px; font-weight: 500; line-height: 1.5 }
.huge { font-size: 110px; font-weight: 900; color: var(--teal) }
.accent { color: var(--orange); font-weight: 700 }
.note { font-size: 30px; color: var(--gray) }
.note-light { font-size: 32px; color: var(--pale) }

/* hidden until the presenter presses → */
.step { visibility: hidden }
.step.shown { visibility: visible }

/* cover and story */
.cover { flex-direction: row; align-items: center; justify-content: space-between }
.cover-text { display: flex; flex-direction: column; gap: 36px }
.cover-art { width: 680px; height: 680px; flex: none }
.cover h1 { font-size: 132px; white-space: nowrap }
.story { flex-direction: row; align-items: center; justify-content: space-between }
.story-text { display: flex; flex-direction: column; gap: 40px; max-width: 900px }
.story-art { width: 680px; height: 680px }
.art { object-fit: contain }
.art.missing { display: none }
/* the chest pictures have a square night background: fade its edges into the page */
.dark .art { -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%);
             mask-image: radial-gradient(closest-side, #000 82%, transparent 100%) }
.divider { align-items: flex-start }
.divider h1 { color: #F4EFE6 }

/* cards */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px }
.cards2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px }
.tcard { background: var(--card); border-radius: 32px; border-top: 14px solid var(--teal); padding: 50px 48px;
         display: flex; flex-direction: column; gap: 18px; box-shadow: 0 10px 30px #14343A14 }
.tcard.hot { border-top-color: var(--orange); background: var(--soft) }
.tcard .no { font-size: 38px; font-weight: 700; color: var(--orange) }
.tcard b { font-size: 64px; font-weight: 900; color: var(--teal) }
.tcard.hot b { color: var(--rust) }
.tcard small { font-size: 36px; color: var(--gray) }

.ans { border-radius: 32px; padding: 54px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff }
.ans b { font-size: 80px; font-weight: 900 }
.ans span { font-size: 48px; font-weight: 700 }
.ans.yes { background: var(--mid) }
.ans.no { background: var(--orange) }

.chips { display: flex; gap: 32px }
.chips span { background: var(--teal); color: #fff; font-size: 72px; font-weight: 900; border-radius: 28px; padding: 26px 56px }

.quiz { background: var(--card); border-radius: 28px; padding: 36px 48px; display: flex; flex-direction: column; gap: 16px;
        box-shadow: 0 10px 30px #14343A14 }
.quiz .q { font-size: 54px; font-weight: 700 }
.quiz .a { font-size: 50px; font-weight: 900; color: var(--teal) }
.quiz .a.no-text { color: var(--orange) }
.quiz .a.yes-text { color: var(--mid) }

.msgs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px }
.msg { background: var(--card); border-left: 16px solid var(--orange); border-radius: 24px; padding: 44px 48px;
       font-size: 50px; font-weight: 700; line-height: 1.45; box-shadow: 0 10px 30px #14343A14 }
.msg small { display: block; font-size: 34px; font-weight: 500; color: var(--gray); margin-bottom: 14px }
.reveal { background: var(--teal); color: #fff; border-radius: 28px; padding: 36px 52px; display: flex; flex-direction: column; gap: 8px }
.reveal p { font-size: 50px; font-weight: 700 }

.steps-list { font-size: 58px; font-weight: 700; line-height: 1.6; padding-left: 80px }
.steps-list.five { columns: 2; column-gap: 80px }
.bullets { font-size: 62px; font-weight: 700; line-height: 1.7; padding-left: 70px }
.bullets li::marker { color: var(--orange) }

.station .kicker { font-size: 56px }
.station h2 { font-size: 120px }
.station.s1 { border-left: 40px solid #E76F51 }
.station.s2 { border-left: 40px solid #2A9D8F }
.station.s3 { border-left: 40px solid #1F6F78 }

table.rot { border-collapse: collapse; font-size: 46px; width: 100%; background: var(--card); border-radius: 24px; overflow: hidden }
table.rot th { background: var(--teal); color: #fff; padding: 22px 28px; font-weight: 700 }
table.rot th small { font-size: 32px; font-weight: 500 }
table.rot td { padding: 22px 28px; text-align: center; border-top: 2px solid var(--light); font-weight: 700 }
table.rot td:first-child { color: var(--teal) }

.formula { font-size: 66px; font-weight: 900; display: flex; align-items: center; gap: 24px; color: var(--orange) }
.formula span { background: var(--teal); color: #fff; border-radius: 22px; padding: 18px 36px }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px }
.rules p { font-size: 80px; font-weight: 900; background: var(--card); border-radius: 28px; padding: 40px 52px; box-shadow: 0 10px 30px #14343A14 }
.rules b { color: var(--orange); margin-right: 24px }
.rules span { color: var(--teal) }

.qr-row { display: flex; gap: 80px; align-items: center }
#qr { background: #fff; padding: 28px; border-radius: 24px }
#qr img, #qr canvas { width: 440px !important; height: 440px !important; display: block }
.url { font-size: 64px; font-weight: 900; color: var(--teal); margin: 10px 0 30px }

/* timer */
.timer { display: flex; align-items: center; gap: 30px }
.timer .t { font-size: 110px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 380px }
.slide:not(.dark) .timer .t { color: var(--teal) }
.timer button { font: inherit; font-size: 38px; font-weight: 700; border: none; border-radius: 20px; padding: 18px 36px; cursor: pointer;
                background: var(--orange); color: #fff }
.timer button.ghost { background: transparent; color: inherit; border: 3px solid currentColor }
.timer .w { font-size: 44px; font-weight: 700; color: var(--orange) }

/* lock and chest */
.lock-slide { flex-direction: row; align-items: center; justify-content: space-between; gap: 60px }
.lock-left { display: flex; flex-direction: column; gap: 36px; width: 900px }
.lock { display: flex; flex-direction: column; gap: 26px }
.dials { display: flex; gap: 26px }
.dial { display: flex; flex-direction: column; align-items: center; gap: 10px }
.dial button { font: inherit; width: 150px; height: 70px; font-size: 44px; border: none; border-radius: 18px; cursor: pointer;
               background: #24474E; color: #F4EFE6 }
.dial .d { width: 150px; height: 170px; display: flex; align-items: center; justify-content: center; font-size: 120px; font-weight: 900;
           background: #F4EFE6; color: var(--ink); border-radius: 22px; border: 6px solid transparent; cursor: pointer }
.dial .d.cur { border-color: var(--orange) }
.open-btn { font: inherit; align-self: flex-start; font-size: 56px; font-weight: 900; padding: 22px 80px; border: none; border-radius: 24px;
            background: var(--orange); color: #fff; cursor: pointer }
.lock-msg { font-size: 44px; font-weight: 700; min-height: 60px; color: #FFB4A2 }
.lock-right { width: 760px; height: 760px; position: relative; flex: none }
.chest { position: absolute; inset: 0; width: 100%; height: 100% }
#chestVideo, #chestOpen { display: none }
.lock-slide.opened #chestClosed { display: none }
.lock-slide.opened.has-video #chestVideo { display: block }
.lock-slide.opened.no-video #chestOpen { display: block }
.gift { position: absolute; left: 150px; top: 50%; transform: translateY(-50%); width: 900px; background: #F4EFE6; color: var(--ink);
        border-radius: 36px; padding: 56px 60px; display: none; flex-direction: column; gap: 26px }
.gift h2 { color: var(--teal) }
.gift .note-light { color: var(--gray) }
.lock-slide.gift-shown .gift { display: flex }
.lock-slide.gift-shown .lock-left { visibility: hidden }

/* ?print: every page stacked, all steps shown */
@page { size: 1920px 1080px; margin: 0 }
html:has(body.print), body.print { overflow: visible; background: #fff; height: auto }
body.print #viewport { position: static }
body.print #stage { position: static; transform: none !important; height: auto }
body.print .slide { display: flex; position: relative; width: 1920px; height: 1080px; overflow: hidden; break-after: page;
                    -webkit-print-color-adjust: exact; print-color-adjust: exact }
body.print .step { visibility: visible }
body.print #bar { display: none }

/* presenter bar: fades in when the mouse moves */
#bar { position: fixed; right: 24px; bottom: 20px; display: flex; gap: 10px; align-items: center; background: #0B1F23CC;
       color: #fff; border-radius: 16px; padding: 8px 12px; font-size: 18px; opacity: 0; transition: opacity .3s }
#bar.show { opacity: 1 }
#bar button { font: inherit; background: #24474E; color: #fff; border: none; border-radius: 10px; padding: 8px 14px; cursor: pointer }
#count { min-width: 64px; text-align: center }
