:root {
  --ink: #2a1810;
  --muted: #6d5344;
  --cream: #fff6e8;
  --foam: #fffdf8;
  --line: #ead7c2;
  --wood: #c9a27a;
  --amber: #c65312;
  --amber-deep: #8d390c;
  --pond: #14685f;
  --pond-deep: #0c3f3b;
  --with: #1f8a6e;
  --apart: #c2410c;
  --easy: #d9f3ea;
  --split: #fff0d4;
  --hard: #ffe1d4;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Outfit, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #e7f8f3 0%, #8fd4c8 26%, #1f7a70 68%, #0e4f49 100%);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
.scene { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lily {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d9f5e4, #3f9d78 68%, #1f6e58);
  opacity: .55;
}
.l1 { width: 140px; height: 46px; left: -30px; bottom: 12vh; transform: rotate(-8deg); }
.l2 { width: 90px; height: 30px; right: 8vw; bottom: 22vh; opacity: .4; }
.l3 { width: 180px; height: 54px; right: -40px; bottom: 6vh; }
.reed {
  position: absolute; bottom: 0; width: 8px; height: 28vh; border-radius: 8px 8px 0 0;
  background: linear-gradient(#1d6b45, #0e3d32);
  opacity: .35;
}
.r1 { left: 7vw; transform: rotate(8deg); }
.r2 { right: 10vw; height: 22vh; transform: rotate(-6deg); }
#app {
  width: min(520px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}
.mast {
  display: grid; grid-template-columns: 104px 1fr auto; gap: 10px; align-items: center;
  margin-bottom: 14px; color: #08332f;
}
.mascot, .beaver { width: 104px; height: 112px; }
.mascot { animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 8px 0 rgba(8, 51, 47, .12)); }
.beaver.hero { width: 168px; height: 180px; margin: -8px auto 0; display: block; }
.trial-kicker { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #14564f; }
.trial-num { font-family: Fraunces, Georgia, serif; font-size: 42px; font-weight: 700; line-height: .85; letter-spacing: -.04em; }
.pips { display: flex; gap: 5px; margin-top: 8px; }
.pip { width: 22px; height: 8px; border-radius: 99px; background: #08332f33; }
.pip.on { outline: 2px solid #08332f; outline-offset: 2px; }
.pip.with { background: #1f8a6e; }
.pip.against { background: #e25b2a; }
.pip.heat { background: #e0a100; }
.pip.early { background: #08332f; }
.hud { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.hudbtn, .flame {
  border: 0; background: #08332f; color: #fff; border-radius: 999px;
  padding: 7px 10px; font-weight: 800; font-size: 13px; text-align: center; margin: 0;
}
.flame { box-shadow: none; }
.hudbtn { cursor: pointer; box-shadow: 0 3px 0 #04221f; }
.hudbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #04221f; }
.card {
  background: var(--cream);
  border-radius: 28px;
  padding: 18px 16px 16px;
  box-shadow: 0 1px 0 #fff inset, 0 8px 0 var(--wood), 0 22px 36px #04332e44;
}
.card.center, .card.poster { text-align: center; }
.beaver.react, .mascot.react { animation: hop .5s ease; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes hop { 40% { transform: translateY(-16px) scale(1.05); } }
.kicker, .sub, .fine, .progress { color: var(--muted); font-weight: 600; }
.kicker { text-align: center; margin-bottom: 8px; }
.progress { text-align: center; margin: -6px 0 10px; font-size: 14px; color: #08332f; font-weight: 800; }
.q, .title {
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  letter-spacing: -.02em;
  line-height: 1.2;
  text-wrap: balance;
}
.q { font-size: clamp(1.45rem, 4.4vw, 1.85rem); text-align: center; margin: 4px 0 14px; }
.title { font-size: clamp(1.7rem, 5vw, 2.15rem); text-align: center; color: var(--amber-deep); margin: 4px 0 8px; }
.sub { text-align: center; line-height: 1.4; }
.fine { text-align: center; font-size: 13px; margin-top: 8px; }
.options, .board, .days { list-style: none; padding: 0; margin: 0; }
.opt, .choice, .daylink, .btn {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; border: 0; border-radius: 16px; background: #fff;
  box-shadow: 0 4px 0 #e3d0b6; padding: 14px; overflow: hidden;
}
.opt, .daylink, .btn { margin-top: 10px; font-weight: 700; }
.opt:active, .daylink:active, .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #e3d0b6; }
.choice { margin-top: 8px; }
.opt .bar, .choice .bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #ffe3c8; z-index: 0;
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}
.opt.mine .bar, .choice.mine .bar { background: #ffc48a; }
.opt.leader .bar, .choice.leader .bar { background: #cfeedd; }
.opt.mine.leader .bar, .choice.mine.leader .bar { background: #ffb067; }
.opt .label, .opt .pct, .choice .label, .choice .pct { position: relative; z-index: 1; }
.label { flex: 1; }
.pct { font-variant-numeric: tabular-nums; font-weight: 800; }
.tag {
  position: relative; z-index: 1; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--pond); background: #ffffffcc; border-radius: 99px; padding: 2px 6px;
}
.quip { text-align: center; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.55rem; margin: 16px 0 4px; line-height: 1.15; }
.quip.with, .title.with, .qrow-vs.with { color: #0f5c49; }
.quip.against, .title.against, .qrow-vs.against { color: #9a3412; }
.quip.solo, .title.solo { color: #9a3412; }
.quip.heat, .quip.split, .title.split, .qrow-vs.heat { color: #8a4b08; }
.marks { display: flex; justify-content: center; gap: 8px; margin: 16px 0 4px; }
.sq { width: 34px; height: 34px; border-radius: 8px; background: #eadcc6; }
.sq.with { background: #1f8a6e; }
.sq.against { background: #e25b2a; }
.sq.heat, .sq.split { background: #e0a100; }
.sq.early { background: #d7c4a8; }
.chip {
  display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .02em;
}
.chip.hard, .who.apart { background: var(--hard); color: #9a3412; }
.chip.split, .chip.mid { background: var(--split); color: #8a4b08; }
.chip.easy, .who.with { background: var(--easy); color: #0f5c49; }
.chip.early, .who.early { background: #efe6da; color: #6d5344; }
.who { border-radius: 99px; padding: 4px 8px; font-size: 12px; font-weight: 800; }
.btn {
  justify-content: center; background: var(--amber); color: #fff; box-shadow: 0 5px 0 var(--amber-deep);
  font-size: 1.05rem; font-weight: 800; padding: 15px;
}
.btn:active { box-shadow: 0 1px 0 var(--amber-deep); }
.btn.ghost { background: #fff; color: #6b3f22; box-shadow: 0 4px 0 #e3d0b6; font-size: .95rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stat { background: var(--foam); border-radius: 16px; text-align: center; padding: 10px 6px; box-shadow: 0 3px 0 #eadcc6; }
.stat b { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.45rem; font-weight: 700; }
.stat span { font-size: 12px; font-weight: 700; color: var(--muted); }
.traits { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.traits li { list-style: none; background: #fff; border-radius: 99px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.section { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; margin: 18px 0 8px; color: var(--muted); }
.qrow { background: var(--foam); border-radius: 16px; padding: 12px; margin-top: 10px; box-shadow: 0 3px 0 #eadcc6; }
.qrow.is-hardest { background: #fff1e4; box-shadow: 0 3px 0 #f0c49a; }
.qrow-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.qrow-q { font-weight: 800; margin: 8px 0; line-height: 1.3; }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: #eadcc6; }
.stack i { display: block; height: 100%; }
.qrow-vs { margin-top: 8px; font-size: 14px; font-weight: 650; line-height: 1.35; }
.qrow-meta { margin-top: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.share {
  white-space: pre-wrap; background: #f3e6cf; border-radius: 14px; padding: 12px;
  text-align: center; margin-top: 14px; font-weight: 700; line-height: 1.45;
}
.reset { text-align: center; margin-top: 14px; font-weight: 700; }
.reset b { font-variant-numeric: tabular-nums; }
.daylink { justify-content: space-between; }
.daylink span:last-child { color: var(--muted); font-size: 14px; text-align: right; }
.opt:focus-visible, .btn:focus-visible, .daylink:focus-visible, .hudbtn:focus-visible {
  outline: 3px solid var(--pond); outline-offset: 2px;
}
[data-focus]:focus { outline: none; }
#toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px); background: #042724; color: #fff;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; opacity: 0;
  pointer-events: none; transition: .25s ease; z-index: 5; max-width: min(420px, 92vw); text-align: center;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.confetti { position: fixed; top: -16px; width: 10px; height: 14px; z-index: 4; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); } }
@media (max-width: 380px) {
  .mast { grid-template-columns: 72px 1fr auto; }
  .mascot { width: 72px; height: 78px; }
  .trial-num { font-size: 34px; }
  .beaver.hero { width: 140px; height: 150px; }
  .sq { width: 28px; height: 28px; }
}
.site-copy, .page { width: min(720px, 100%); margin: 0 auto; position: relative; z-index: 1; padding: 8px 16px 28px; }
.site-copy, .prose {
  background: var(--cream); color: var(--ink); border-radius: 28px; padding: 22px 20px;
  box-shadow: 0 1px 0 #fff inset, 0 8px 0 var(--wood), 0 22px 36px #04332e44;
}
.site-copy { margin-top: 18px; }
.site-copy h2, .prose h1, .prose h2 { font-family: Fraunces, Georgia, serif; letter-spacing: -.03em; line-height: 1.15; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 4px 0 12px; }
.prose h2 { font-size: 1.35rem; margin: 22px 0 8px; }
.site-copy p, .prose p, .prose li { line-height: 1.5; margin-top: 10px; }
.prose ul { margin: 8px 0 0; padding-left: 1.2rem; }
.site-copy a, .prose a { color: var(--amber-deep); font-weight: 800; }
.page { padding-top: calc(18px + env(safe-area-inset-top)); }
.site-nav, .site-footer { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.site-nav { margin-bottom: 14px; }
.site-footer { justify-content: center; padding: 18px 16px 8px; }
.site-nav a, .site-footer a { font-weight: 800; text-decoration: none; }
.site-nav a { color: #08332f; }
.site-footer a { color: #f4fffc; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.site-nav .brand { font-family: Fraunces, Georgia, serif; font-size: 1.35rem; margin-right: 6px; }
.adbreak {
  position: fixed; inset: 0; z-index: 20; background: #042724cc;
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.adbreak-card {
  width: min(420px, 100%); background: var(--cream); color: var(--ink);
  border-radius: 24px; padding: 22px 18px; text-align: center;
  box-shadow: 0 8px 0 var(--wood);
}
.adbreak-card h2 { font-family: Fraunces, Georgia, serif; font-size: 1.8rem; margin: 6px 0 8px; }
.adbreak-card p { line-height: 1.45; }
.adbreak-count { font-family: Fraunces, Georgia, serif; font-size: 2.4rem; margin: 12px 0; }
body.play {
  background: #a34a22;
  color: #f6ddb4;
  min-height: 100vh;
}
body.play.show-verdict { background: #14685f; }
body.play .scene { display: none; }
body.play #app { width: min(480px, 100%); padding-left: 0; padding-right: 0; }
body.play .site-footer a { color: #f6ddb4; }
.tools {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px; padding: 0 14px; color: #f6ddb4;
}
a.hudbtn { text-decoration: none; display: inline-block; }
.tool-day {
  margin: 0; font-weight: 800; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase;
}
.tool-right { display: flex; align-items: center; gap: 6px; }
body.play .hudbtn, body.play .flame { background: #4a2416; box-shadow: none; }
.trial {
  background: #a34a22;
  border-radius: 0;
  overflow: hidden;
  color: #f6ddb4;
  box-shadow: none;
}
.trial-head {
  display: flex; align-items: center; gap: 8px;
  background: #4a2416;
  padding: 6px 14px 6px 4px;
  min-height: 84px;
}
.trial .mascot {
  width: 84px; height: 92px; flex: 0 0 auto;
  margin: 0 0 -8px -4px;
  filter: none;
}
.choose-line {
  font-family: Nunito, Outfit, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.2rem, 4.8vw, 1.55rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  color: #f6ddb4;
  text-wrap: balance;
}
.trial-body, .bid-stage { position: relative; }
.trial-body { padding: 22px 14px 18px; }
.trial .pips { justify-content: center; margin: 2px 0 0; }
.trial .pip { background: #ffffff33; }
.trial .pip.on { outline-color: #f6ddb4; }
.trial .pip.with { background: #7fd84a; }
.trial .pip.against { background: #ffb088; }
.trial .pip.heat { background: #ffe08a; }
.trial .pip.early { background: #f6ddb4; }
.prompt {
  font-family: Nunito, Outfit, system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 7vw, 2.6rem);
  text-align: center;
  color: #f6ddb4;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin: 22px 0 18px;
  text-wrap: balance;
}
.spark {
  position: absolute; color: #fff; font-weight: 700; line-height: 1;
  pointer-events: none;
}
.s1 { top: 14px; left: 18px; font-size: 18px; }
.s2 { top: 28px; right: 26px; font-size: 13px; opacity: .8; }
.s3 { top: 78px; right: 16px; font-size: 16px; opacity: .85; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.sides.stack { grid-template-columns: 1fr; }
.side {
  display: flex; flex-direction: column; height: 100%; width: 100%;
  margin: 0; padding: 0; border: 0; border-radius: 18px; overflow: hidden;
  background: #6e3016; color: #f6ddb4; text-align: center;
  font: inherit; cursor: pointer; appearance: none; -webkit-appearance: none;
}
button.side:active { transform: translateY(2px); }
button.side:focus-visible, .side:focus-visible { outline: 3px solid #ffe08a; outline-offset: 2px; }
.side.mine { box-shadow: inset 0 0 0 4px #f6ddb4; }
.tile { display: block; padding: 14px 8px 6px; }
.tile .glyph { width: 78px; height: 78px; display: block; margin: 0 auto 6px; }
.side.two .glyph { width: 64px; height: 64px; }
.tile-t {
  display: block; font-weight: 800; font-size: 15px; line-height: 1.2;
  color: #fff; text-wrap: balance;
}
.choose {
  display: block; position: relative; margin-top: auto; overflow: hidden;
  background: #4a2416; color: #f6ddb4;
  font-family: Nunito, Outfit, system-ui, sans-serif;
  font-weight: 800; font-size: 1.15rem; padding: 13px 8px; text-align: center;
}
.choose .fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: #f6ddb4; opacity: .28;
}
.choose .lbl { position: relative; z-index: 1; }
.trial .quip, .trial .sub, .trial .btn { position: relative; z-index: 1; }
.trial .quip { font-family: Nunito, Outfit, system-ui, sans-serif; color: #f6ddb4; }
.trial .quip.with { color: #d8ffc8; }
.trial .quip.against, .trial .quip.solo { color: #ffd0b8; }
.trial .quip.heat, .trial .quip.split { color: #ffe08a; }
.trial .sub { color: #ffe8d6; }
.trial .btn { margin-top: 12px; }
.bid {
  border-radius: 0; overflow: hidden; color: #f6ddb4;
  box-shadow: none;
}
.bid-stage {
  background: #14685f; min-height: 280px;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 12px 8px;
}
.bid .beaver.hero {
  width: min(240px, 70%); height: auto; margin: 0; filter: none;
}
.bid .spark { color: #fff; }
.bid-foot { background: #0c3f3b; padding: 16px 16px 18px; text-align: center; }
.bid-kicker {
  font-family: Nunito, Outfit, system-ui, sans-serif;
  font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  font-size: 13px; color: #d7efe8; margin-bottom: 4px;
}
.bid .title {
  font-family: Nunito, Outfit, system-ui, sans-serif;
  font-weight: 900; color: #f6ddb4; font-size: clamp(1.8rem, 6vw, 2.3rem);
}
.bid .title.with { color: #d8ffc8; }
.bid .title.against, .bid .title.solo { color: #ffd0b8; }
.bid .title.split { color: #ffe08a; }
.bid .sub, .bid .reset { color: #f6ddb4; }
.bid .btn {
  background: #f6ddb4; color: #0c3f3b; box-shadow: 0 4px 0 #062421;
}
.bid .btn:active { box-shadow: 0 1px 0 #062421; }
.bid .btn.ghost {
  background: transparent; color: #f6ddb4; box-shadow: none;
}
.bid .qrow { background: #0e524c; color: #f6ddb4; box-shadow: none; }
.bid .qrow-q { color: #fff; }
.bid .qrow-vs.with { color: #d8ffc8; }
.bid .qrow-vs.against { color: #ffd0b8; }
.bid .qrow-vs.heat { color: #ffe08a; }
@media (max-width: 380px) {
  .trial .mascot { width: 64px; height: 72px; }
  .choose-line { font-size: 1.05rem; }
  .tile-t { font-size: 13px; }
  .side.two .glyph { width: 52px; height: 52px; }
  .bid .beaver.hero { width: min(200px, 68%); }
}
.sheet {
  width: min(480px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: calc(18px + env(safe-area-inset-top)) 0 calc(28px + env(safe-area-inset-bottom));
}
.lodge {
  margin: 14px;
  background: #4a2416;
  color: #f6ddb4;
  border-radius: 18px;
  padding: 14px 14px 16px;
}
.lodge h2, .lodge h3 {
  font-family: Nunito, Outfit, system-ui, sans-serif;
  font-weight: 800;
  margin: 0 0 6px;
}
.lodge h3 { font-size: 1rem; }
.lodge label { display: block; font-weight: 800; margin: 10px 0 0; }
.lodge input {
  display: block; width: 100%; margin-top: 6px;
  border: 0; border-radius: 12px; padding: 10px 12px;
  background: #6e3016; color: #fff;
}
.lodge input:focus { outline: 3px solid #ffe08a; }
.hint, .form-note { color: #ffe8d6; font-size: 14px; line-height: 1.4; margin: 8px 0 0; }
.hint-inline { font-weight: 600; font-size: 13px; }
.side-edit { margin-top: 14px; }
.icon-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  max-height: 196px; overflow: auto; margin-top: 8px; padding: 2px;
}
.icon-pick { background: #6e3016; border: 0; border-radius: 10px; padding: 4px; }
.icon-pick.on { outline: 3px solid #f6ddb4; }
.icon-pick .glyph { width: 36px; height: 36px; display: block; margin: 0 auto; }
.wait { margin-top: 14px; }
.wait-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trial.mini { margin-top: 8px; }
.trial.mini .prompt { font-size: 1.55rem; margin: 12px 0 10px; }
.trial.mini .tile .glyph { width: 56px; height: 56px; }
#adder .trial { margin: 14px -14px 0; }
.lodge .btn { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
