@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-soft.woff') format('woff'); font-weight: 400 800; font-display: swap; }
:root { --walnut: #5a2f1e; --deep: #2e160c; --ivory: #efe3c8; --gold: #f7c766; --gold-deep: #c98e2c; --ink: #2a1e17; --red: #c2412d; --green: #2f7d4f;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif; --sans: ui-sans-serif, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--deep); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; color: var(--ivory); font: 400 16px/1.45 var(--sans); overflow-x: hidden;
  background: radial-gradient(900px 500px at 50% -10%, #8a5236, transparent 70%), linear-gradient(#4a2518, #2e160c 80%); }
[hidden] { display: none !important; }
a { color: var(--gold); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
.wrap { width: min(94vw, 640px); margin: 0 auto; padding: 14px 0 40px; }
.top { text-align: center; padding: 8px 0 14px; }
.back { display: inline-block; padding: 10px 0; font: 600 15px var(--sans); }
.kicker { margin: 0; font: 700 13px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
h1 { margin: 4px 0 8px; font: 700 clamp(30px, 8vw, 44px)/1.05 var(--serif); letter-spacing: -.01em; }
.sub { margin: 0 auto; max-width: 34em; color: #e6d8b8; }
.clock { margin: 10px 0 0; font: 600 14px var(--sans); color: #d9c6a0; }

.cb { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 17px/1 var(--serif); color: var(--ink); border-radius: 18px 16px 20px 15px / 16px 19px 15px 18px;
  background: radial-gradient(120% 140% at 35% 25%, #ffe3a0, var(--gold) 45%, var(--gold-deep));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -4px 0 rgba(120,70,10,.35), 0 4px 0 #7d4f17, 0 9px 16px rgba(0,0,0,.4);
  transition: transform 60ms linear, box-shadow 60ms linear; -webkit-tap-highlight-color: transparent; }
.cb:hover { color: var(--ink); filter: brightness(1.05); }
.cb:active { transform: translateY(3px) scaleY(.94); box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 0 1px 0 #7d4f17, 0 3px 6px rgba(0,0,0,.4); }
.cb.ghost { background: radial-gradient(120% 140% at 35% 25%, #f6ecd6, #dccaa6 50%, #b9a27a); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -4px 0 rgba(90,60,20,.25), 0 4px 0 #6b5434, 0 9px 16px rgba(0,0,0,.4); }
.cb.big { min-height: 56px; font-size: 20px; padding: 12px 26px; }

/* the old site: cold, gray, 2009 */
.frame { position: relative; border-radius: 10px; overflow: hidden; background: #cfd3d7; color: #1d1f22; box-shadow: 0 0 0 2px #1a1d20, 0 22px 50px rgba(0,0,0,.55); font-family: Arial, Helvetica, sans-serif; }
.chrome { display: flex; align-items: center; gap: 6px; padding: 9px 10px; background: #4a4f55; }
.chrome i { width: 11px; height: 11px; border-radius: 50%; background: #8d949b; flex: none; }
.url { margin-left: 8px; flex: 1; min-width: 0; padding: 4px 10px; border-radius: 4px; background: #2c3034; color: #c4cad0; font: 12px/1.4 ui-monospace, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #b8bdc2; border-bottom: 1px solid #9aa0a6; font: 600 13px Arial, sans-serif; }
.dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dots li { width: 22px; height: 22px; border-radius: 50%; background: #e7eaec; border: 2px solid #7b828a; font-size: 12px; display: grid; place-items: center; }
.dots li.on { border-color: #1d5fd0; background: #fff; }
.dots li.g { background: #7fd09a; border-color: #2f7d4f; } .dots li.y { background: #f1d675; border-color: #a98a10; } .dots li.r { background: #ee8d80; border-color: #a73a2b; }
.hud-r { margin: 0; white-space: nowrap; }
.stage { position: relative; min-height: 400px; padding: 16px 14px 18px; background: linear-gradient(#d9dcdf, #cbcfd3); }
.stage.shake { animation: shake .28s; }
@keyframes shake { 20% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 80% { transform: translateX(-3px); } }
.toast { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; padding: 8px 12px; border-radius: 6px; background: #3b1d12; color: #ffe2a1; font: 600 14px Arial, sans-serif; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity .15s, transform .15s; pointer-events: none; z-index: 5; }
.toast.on { opacity: 1; transform: none; }
.toast.good { background: #1d4d33; color: #d7f5e1; }

.intro { text-align: center; padding: 56px 8px 30px; }
.intro-t { margin: 0; font: 700 28px 'Times New Roman', serif; color: #1a3f8a; text-decoration: underline; }
.intro-s { margin: 8px 0 26px; font: 15px 'Times New Roman', serif; color: #444; }
.intro-n { margin: 14px 0 0; font-size: 13px; color: #555; }
.sitebar { margin: 0 0 12px; padding: 6px 10px; background: #1a3f8a; color: #fff; font: 700 14px 'Times New Roman', serif; }
.ob-t { margin: 0 0 4px; font: 700 20px Arial, sans-serif; } .ob-p { margin: 0 0 12px; font-size: 14px; color: #333; }
.ob { position: relative; min-height: 330px; }
.b { min-height: 44px; padding: 8px 14px; border: 2px outset #eceef0; background: #e1e4e7; color: #111; font: 15px Arial, sans-serif; cursor: pointer; border-radius: 2px; }
.b:active { border-style: inset; }
.b.blue { background: #1d5fd0; border-color: #4b82e0; color: #fff; font-weight: 700; }
.b.link { border: 0; background: none; color: #1a3f8a; text-decoration: underline; padding: 8px 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel { padding: 12px; background: #f4f5f6; border: 1px solid #9aa0a6; }
.sw { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 6px 4px; border: 0; border-bottom: 1px solid #dde0e3; background: none; text-align: left; cursor: pointer; font: 15px Arial, sans-serif; }
.sw .knob { flex: none; width: 46px; height: 24px; border-radius: 12px; background: #8d949b; position: relative; transition: background .1s; }
.sw .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .1s; }
.sw[aria-pressed="true"] .knob { background: #1d5fd0; } .sw[aria-pressed="true"] .knob::after { left: 25px; }
.stackbn { margin-top: 8px; padding: 8px 10px; background: #f4f5f6; border: 1px solid #9aa0a6; font-size: 13px; }
.cap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 330px; margin: 8px 0 12px; }
.tile { aspect-ratio: 1; display: grid; place-items: center; padding: 4px; border: 3px solid transparent; background: linear-gradient(135deg, #8d9aa5, #6b7782); color: #e9eef2; font: 700 12px/1.2 Arial, sans-serif; text-align: center; cursor: pointer; border-radius: 2px; }
.tile.sel { border-color: #1d5fd0; filter: brightness(.7); }
.capbox { max-width: 360px; padding: 10px; background: #fff; border: 1px solid #9aa0a6; }
.capbox h4 { margin: 0 0 6px; padding: 10px; background: #1d5fd0; color: #fff; font: 15px Arial, sans-serif; }
.cal { max-width: 360px; background: #fff; border: 1px solid #9aa0a6; }
.cal-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; background: #1a3f8a; color: #fff; font: 700 15px Arial, sans-serif; }
.cal-h .b { min-height: 36px; padding: 2px 12px; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 6px; }
.cal-g span { text-align: center; font: 700 11px Arial, sans-serif; color: #666; padding: 2px 0; }
.day { min-height: 38px; border: 0; background: #e4e7ea; color: #9aa0a6; font: 14px Arial, sans-serif; cursor: pointer; border-radius: 2px; }
.day.open { background: #1d5fd0; color: #fff; font-weight: 700; }
.day.void { visibility: hidden; }
.zip { display: block; width: 100%; max-width: 260px; min-height: 48px; margin: 8px 0 10px; padding: 8px 10px; border: 2px inset #cfd3d7; background: #fff; font: 22px ui-monospace, Menlo, monospace; letter-spacing: .12em; color: #111; }
.msg { min-height: 22px; margin: 6px 0 0; font-size: 14px; color: #a73a2b; font-weight: 700; }
.keys { display: grid; grid-template-columns: repeat(3, 62px); gap: 6px; margin-top: 6px; }
.key { min-height: 46px; border: 2px outset #eceef0; background: #e1e4e7; font: 700 20px Arial, sans-serif; cursor: pointer; border-radius: 3px; color: #111; }
.key:active { border-style: inset; }
.tree { margin: 0 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.chad-page { color: #555; font-size: 14px; }
.bubble { position: absolute; right: 0; bottom: 0; width: 230px; padding: 34px 12px 12px; background: #2f8fe8; color: #fff; border-radius: 14px 14px 4px 14px; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.bubble p { margin: 0 0 10px; font: 700 16px Arial, sans-serif; }
.bubble .b { display: block; width: 100%; margin-top: 6px; background: #fff; color: #1d5fd0; border: 0; border-radius: 6px; font-weight: 700; }
.bx { position: absolute; width: 30px; height: 30px; padding: 0; border: 0; background: rgba(0,0,0,.18); color: #fff; font: 700 15px/1 Arial, sans-serif; border-radius: 50%; cursor: pointer; }
.bx.c0 { top: 3px; left: 3px; } .bx.c1 { top: 3px; right: 3px; } .bx.c2 { bottom: 3px; left: 3px; } .bx.c3 { bottom: 3px; right: 3px; }
.veil { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(20,22,25,.62); padding: 12px; }
.pop { width: min(100%, 320px); padding: 18px 16px 14px; background: #fff; text-align: center; border: 4px solid #e0382d; display: flex; flex-direction: column; gap: 8px; }
.pop h3 { margin: 0; font: 800 24px Arial, sans-serif; color: #e0382d; order: 0; }
.pop .yes { order: 1; min-height: 54px; background: #e0382d; color: #fff; border: 0; font: 800 17px Arial, sans-serif; cursor: pointer; border-radius: 4px; }
.pop .later { order: 2; min-height: 44px; background: #fff; border: 2px solid #e0382d; color: #e0382d; font: 700 15px Arial, sans-serif; cursor: pointer; border-radius: 4px; }
.pop .no { order: 3; padding: 6px; border: 0; background: none; color: #8a9097; font: 11px Arial, sans-serif; text-decoration: underline; cursor: pointer; min-height: 32px; }
.pop.p1 .no { order: -1; align-self: flex-end; min-height: 28px; }
.pop.p2 .no { order: 1; }

/* result */
.result { margin-top: 18px; padding: 20px 18px 22px; text-align: center; border-radius: 22px; color: var(--ink);
  background: radial-gradient(ellipse at 40% 20%, #f7eedb, #ecdcbc 70%, #ddc9a2); box-shadow: 0 3px 0 #fff8 inset, 0 -5px 0 #0002 inset, 0 22px 44px #0008; }
.res-h { margin: 0 0 6px; font: 700 26px var(--serif); }
.grid { margin: 6px auto 10px; font: 30px/1.35 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; letter-spacing: .06em; white-space: pre-wrap; }
.stats { margin: 0; font: 700 17px var(--sans); }
.grade { margin: 6px 0 16px; font: italic 600 20px var(--serif); }
.btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.note { min-height: 22px; margin: 12px 0 0; font-size: 14px; color: #5b4636; }
.next { margin: 4px 0 14px; font: 600 14px var(--sans); color: #5b4636; }

.new { margin-top: 18px; }
.new-card { padding: 26px 20px 22px; text-align: center; border-radius: 22px; color: var(--ink); background: radial-gradient(ellipse at 40% 10%, #fffaf0, #fbf0d6 70%, #f2e1b8); box-shadow: 0 3px 0 #fff inset, 0 -5px 0 #0001 inset, 0 22px 44px #0008; }
.new-k { margin: 0; font: 700 13px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #8a5a1a; }
.new-h { margin: 6px 0 8px; font: 700 40px/1.05 var(--serif); }
.new-p { margin: 0 auto 20px; max-width: 28em; color: #4a3a2c; }
.booked { margin-top: 18px; }
.stamp { display: inline-block; margin: 0; padding: 4px 22px; border: 5px solid var(--red); color: var(--red); border-radius: 10px; font: 800 28px/1.3 var(--sans); letter-spacing: .14em; transform: rotate(-5deg); animation: slam .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes slam { from { transform: rotate(-5deg) scale(2.4); opacity: 0; } }
.vs { margin: 16px 0 0; font: 700 19px/1.4 var(--serif); }
.coaster { position: relative; margin: 18px auto 0; padding: 24px 20px 20px; text-align: center; border-radius: 30px; color: var(--ink); background: radial-gradient(ellipse at 40% 30%, #f7eedb, #ecdcbc 70%, #ddc9a2); box-shadow: 0 3px 0 #fff8 inset, 0 -5px 0 #0002 inset, 0 22px 44px #0008; transform: rotate(-1deg); }
.co-h { margin: 0 0 8px; font: 700 26px/1.12 var(--serif); }
.co-p { margin: 0 auto 16px; max-width: 30em; font-size: 15px; color: #4a3a2c; }
.co-s { margin: 12px 0 0; font: italic 14px var(--serif); color: #7a6650; }
.foot { margin-top: 26px; text-align: center; font-size: 14px; color: #d9c6a0; }
@media (max-width: 420px) { .stage { padding: 14px 10px 16px; } .bubble { width: 200px; } .new-h { font-size: 34px; } }
@media (prefers-reduced-motion: reduce) { .stage.shake, .stamp { animation: none; } }
.key-l { margin: 8px 0 0; font: 13px var(--sans); color: #6a5642; }
.bx::after, .pop .no::after { content: ''; position: absolute; inset: -8px; }
.pop .no { position: relative; }
.vs2 { margin: 6px 0 0; font: italic 16px var(--serif); color: #6a5642; }

/* stats and histogram */
.mine { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 16px; padding: 0; }
.mine li { padding: 10px 4px 8px; border-radius: 14px; background: #0000000d; box-shadow: 0 2px 0 #fff8 inset; }
.mine b { display: block; font: 800 24px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.mine span { display: block; margin-top: 2px; font: 700 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #6a5642; }
.mine li.hot b { color: var(--red); }
.hist { margin: 0 0 18px; padding: 14px 12px 10px; border-radius: 16px; background: #0000000d; }
.hist-h { margin: 0; font: 700 20px var(--serif); }
.hist-s { margin: 2px 0 10px; font: 600 15px var(--sans); color: #4a3a2c; min-height: 22px; }
.bars { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; height: 150px; margin: 0; padding: 0; }
.bars li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.bars .bar { width: 100%; min-height: 4px; border-radius: 6px 6px 2px 2px; background: #b9a37c; transition: height .5s cubic-bezier(.2, 1, .3, 1); }
.bars li.me .bar { background: linear-gradient(#f9d27d, #e3a73f); box-shadow: 0 0 0 2px #8e5f17; }
.bars .n { font: 700 12px var(--sans); color: #4a3a2c; font-variant-numeric: tabular-nums; }
.bars .l { margin-top: 4px; font: 700 11px var(--sans); color: #6a5642; white-space: nowrap; }
.bars li.me .l::before { content: 'You '; color: var(--red); }
.hist-k { margin: 8px 0 0; font: 12px var(--sans); color: #6a5642; }
@media (max-width: 420px) { .mine b { font-size: 20px; } .mine span { font-size: 10px; letter-spacing: .04em; } .bars .l { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { .bars .bar { transition: none; } }
