:root {
  --dw-bg: #0b0b0c; --dw-fg: #f1efe9; --dw-accent: #ff3b30; --dw-panel: rgba(16, 16, 18, .95);
  --dw-font-body: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, monospace; --chalk: 'Permanent Marker', 'Comic Sans MS', cursive;
  --line: rgba(241, 239, 233, .16); --led: #ff3b30;
}
body { overflow-x: hidden; font-size: 1.15rem; background: radial-gradient(120% 70% at 50% 0%, #1b1b1f 0%, #0b0b0c 60%) fixed, #0b0b0c; }
h1, h2, h3 { font-family: var(--dw-font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: .95; margin: 0 0 .4em; }
h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
section { padding: clamp(48px, 8vw, 100px) clamp(16px, 5vw, 64px); }
button { font: inherit; }

.flash { position: fixed; inset: 0; z-index: 200; background: #fff; opacity: 0; pointer-events: none; }
.flash.is-on { animation: flash .22s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

.topbar { position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 12px clamp(16px, 4vw, 40px); background: #0b0b0cd9; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .55em; font-weight: 700; font-size: 1.5rem; letter-spacing: .14em; color: var(--dw-fg); text-decoration: none; }
.brand-stripes { width: 34px; height: 14px; background: repeating-linear-gradient(-45deg, #fff 0 6px, #111 6px 12px); border: 1px solid #fff; }
.topbar nav { display: flex; align-items: center; gap: 18px; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav a { color: var(--dw-fg); text-decoration: none; opacity: .8; }
.topbar nav a:hover { opacity: 1; color: var(--dw-accent); }
@media (max-width: 640px) { .topbar nav a { display: none; } }

.intro { max-width: 980px; margin: 0 auto; padding-bottom: 20px; }
.kicker { font-family: var(--mono); letter-spacing: .25em; text-transform: uppercase; color: var(--dw-accent); font-size: .9rem; margin: 0 0 1rem; }
.kicker span { color: var(--dw-fg); }
.intro h1 { font-size: clamp(4rem, 12vw, 7.5rem); }
.lede { font-size: clamp(1.2rem, 2.4vw, 1.45rem); max-width: 60ch; opacity: .92; line-height: 1.45; }
.lede.small { font-size: 1.15rem; opacity: .8; }
.word { background: none; border: 0; padding: 0; color: inherit; border-bottom: 1px dotted var(--dw-accent); cursor: pointer; }
.word.is-found { color: var(--dw-accent); }

/* the slate */
.stage { max-width: 980px; margin: 0 auto; padding-top: clamp(60px, 11vw, 120px); }
.slate { position: relative; background: #121214; border-radius: 10px; box-shadow: 0 40px 100px #000, inset 0 0 0 2px #2a2a2e; padding: 0 0 18px; }
.sticks { position: relative; height: clamp(54px, 9vw, 80px); }
.stick { position: absolute; left: 0; right: 0; height: 50%; border: 2px solid #ddd; border-radius: 4px;
  background: repeating-linear-gradient(-55deg, #f4f2ec 0 26px, #141414 26px 52px); }
.stick-base { bottom: 0; background: repeating-linear-gradient(55deg, #f4f2ec 0 26px, #141414 26px 52px); }
.stick-top { top: 0; transform-origin: 3% 100%; transform: rotate(-7deg); transition: transform .12s cubic-bezier(.7, 0, 1, .4); }
.slate.is-clapped .stick-top { transform: rotate(0deg); transition-duration: .07s; }
.slate.is-tail .sticks { transform: scaleY(-1); }
.hinge { position: absolute; left: 1.2%; bottom: 18%; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #999; background: radial-gradient(#ddd, #777); padding: 0; z-index: 2; }
.hinge.is-found { border-color: var(--dw-accent); }
.board { position: relative; padding: clamp(14px, 3vw, 28px); display: grid; gap: 12px; }
.tc-wrap { background: #050505; border: 1px solid #2c2c2c; border-radius: 6px; padding: 10px 14px; text-align: center; }
.tc { display: block; font-family: var(--mono); font-size: clamp(2.6rem, 11vw, 6.4rem); color: var(--led); letter-spacing: .04em; line-height: 1.05;
  text-shadow: 0 0 18px #ff3b3088, 0 0 2px #ff7a72; font-variant-numeric: tabular-nums; }
.tc.is-held { color: #fff; text-shadow: 0 0 22px #fff8; }
.tc-meta { font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; color: #8a8a8a; }
.cell { display: grid; gap: 2px; border: 2px solid #e9e7e0; border-radius: 4px; padding: 6px 10px 4px; }
.cell span { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: #a9a7a0; }
.cell input { width: 100%; min-width: 0; background: transparent; border: 0; color: #fbfaf6; font-family: var(--chalk); font-size: clamp(1.4rem, 4.6vw, 2.6rem); padding: 0; line-height: 1.2; text-transform: uppercase; }
.cell input::placeholder { color: #ffffff40; font-size: .6em; }
.cell input:focus { outline: none; }
.cell:focus-within { border-color: var(--dw-accent); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid3.small .cell input { font-size: clamp(1rem, 3vw, 1.4rem); }
@media (max-width: 560px) { .grid3.small { grid-template-columns: 1fr 1fr; } .grid3.small .cell:last-child { grid-column: span 2; } }
.toggles { display: flex; gap: 10px; flex-wrap: wrap; }
.tog { flex: 1 1 90px; background: transparent; color: #fbfaf6; border: 2px solid #e9e7e0; border-radius: 4px; padding: .4em; font-family: var(--chalk); font-size: 1.3rem; cursor: pointer; }
.tog[aria-pressed="true"] { background: #fbfaf6; color: #121214; }
.chalk { position: absolute; right: 16px; bottom: 4px; width: 60px; height: 14px; border-radius: 50%; background: radial-gradient(#ffffff2a, transparent 70%); }
.chalk.is-found { background: radial-gradient(#ff3b3044, transparent 70%); }

.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: stretch; }
.clap-btn { flex: 1 1 220px; background: var(--dw-accent); color: #fff; border: 0; border-radius: 8px; font-weight: 700; font-size: 2rem; letter-spacing: .14em; padding: .35em 1em; cursor: pointer; box-shadow: 0 10px 30px #ff3b3044; }
.clap-btn small { font-size: .9rem; letter-spacing: .1em; opacity: .75; font-weight: 400; }
.clap-btn:active { transform: translateY(2px); }
.ctl { background: #18181b; color: var(--dw-fg); border: 1px solid var(--line); border-radius: 8px; padding: .6em 1em; cursor: pointer; font-size: 1.05rem; letter-spacing: .04em; display: inline-flex; align-items: center; gap: .5em; }
.ctl small { opacity: .6; }
.ctl:hover { border-color: var(--dw-accent); }
.ctl.small { font-size: .95rem; padding: .4em .8em; }
.check input { accent-color: var(--dw-accent); }
.hint { opacity: .7; font-size: 1.02rem; max-width: 72ch; }
.log { margin-top: 18px; background: #111113; border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; }
.log h3 { font-size: 1.4rem; }
.log ol { font-family: var(--mono); font-size: .92rem; margin: 0 0 10px; padding-left: 1.6em; max-height: 220px; overflow: auto; }
.log li.empty { list-style: none; margin-left: -1.6em; opacity: .55; }
.log li b { color: var(--dw-accent); font-weight: 400; }

/* fullscreen slate mode */
.slate:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 4vh 4vw; border-radius: 0; }
.slate:fullscreen .tc { font-size: 14vw; }

.history { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 760px) { .history { grid-template-columns: 1fr; } }
.history ul { padding-left: 1.1em; }
.history li { margin: .35em 0; }
.mini { margin: 0; display: grid; place-items: center; }
.mini-slate { width: min(320px, 80vw); aspect-ratio: 4 / 3; background: #18181b; border-radius: 10px; border: 2px solid #333; position: relative; transform: rotate(4deg); box-shadow: 0 30px 70px #000;
  background-image: linear-gradient(#ffffff10 1px, transparent 1px); background-size: 100% 25%; }
.mini-slate::before { content: ''; position: absolute; left: -2px; right: -2px; top: -26px; height: 24px; border-radius: 4px; background: repeating-linear-gradient(-55deg, #f4f2ec 0 14px, #141414 14px 28px); transform: rotate(-10deg); transform-origin: 0 100%; }
.mini-slate span { position: absolute; left: 10%; height: 6px; border-radius: 3px; background: #ffffff55; }
.mini-slate span:nth-child(1) { top: 20%; width: 60%; } .mini-slate span:nth-child(2) { top: 45%; width: 40%; } .mini-slate span:nth-child(3) { top: 70%; width: 70%; background: #ff3b3099; }

.vote { text-align: center; }
.vote > p { font-size: 1.2rem; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; max-width: 1000px; margin: 1.6rem auto 0; }
.offer { font-size: 1.35rem; font-weight: 700; color: var(--dw-fg); background: #151517; border: 1px solid var(--line); border-radius: 10px; padding: 1em; cursor: pointer; transition: border-color .2s, transform .2s; }
.offer small { font-weight: 400; font-size: 1rem; opacity: .7; }
.offer:hover, .offer:focus-visible { border-color: var(--dw-accent); transform: translateY(-2px); }
.offer.quiet { background: transparent; }
.found { font-family: var(--mono); font-size: .9rem; opacity: .8; margin-top: 2.4rem; }
.reward { max-width: 640px; margin: 1rem auto; padding: 1rem 1.2rem; border: 1px solid var(--dw-accent); border-radius: 8px; background: #ff3b3014; }
.journal { max-width: 720px; margin: 1rem auto 0; text-align: left; }
.journal li { margin: .5em 0; }

.signup { display: grid; justify-items: center; text-align: center; background: linear-gradient(transparent, #1a0d0c); }
.signup .dw-optin { text-align: left; width: 100%; font-size: 1.05rem; }
.offer-note { margin: 0; color: var(--dw-accent); font-family: var(--mono); font-size: .9rem; }
.foot { padding: 30px 16px 10px; text-align: center; border-top: 1px solid var(--line); }
.more { font-size: 1.05rem; letter-spacing: .04em; }
.glyph { background: none; border: 0; color: inherit; font-size: 1rem; cursor: pointer; padding: 0 .3em; }
.glyph.is-found { color: var(--dw-accent); }

@media (max-width: 640px) { .stick-top { transform: rotate(-13deg); } }
