/* O2 Champions — Prototype 2: "Bento / neo-brutalist".
   Cream paper, thick ink outlines, hard offset shadows, flat colour blocks.
   Layouts are bento grids, sticker walls and bar races. Flat colours only. */
:root {
  --paper: #fff8ec;
  --paper-2: #fff0d4;
  --white: #ffffff;
  --ink: #17181c;

  --blue: #45a4f3;
  --green: #5aca7a;
  --coral: #f45b49;
  --yellow: #ffd23f;
  --lilac: #8e97ec;
  --pink: #ff9ecb;
  --mint: #7fd6c9;

  --text: var(--ink);
  --muted: #3f4450;
  --faint: #5d6270;
  --brand: var(--blue);
  --brand-2: #1c64a8;
  --ok: #0b7a4b;
  --err: #c0281b;

  --bw: 2.5px;
  --border: var(--bw) solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);
  --radius: 16px;
  --radius-sm: 10px;
  --gap: 18px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; padding-bottom: 24px; }
a { color: var(--brand-2); font-weight: 600; }
a:hover { color: var(--ink); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; font-weight: 700; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 2rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent-text { background: var(--yellow); color: var(--ink); padding: 0 0.18em; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
h1 .accent-text { border: var(--border); box-shadow: var(--shadow-sm); display: inline-block; transform: rotate(-1.5deg); margin-top: 6px; padding: 0 0.25em; }
.container { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { justify-content: center; text-align: center; }
.hidden { display: none !important; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.section { padding: 28px 0; }
.eyebrow {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); padding: 5px 10px; border-radius: 6px; margin-bottom: 12px;
}
.eyebrow.light { background: var(--white); color: var(--ink); border: 2px solid var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Prototype banner + header (logo row, pill nav underneath) ---------- */
.proto-banner { background: var(--ink); color: var(--paper); text-align: center; font-size: 0.8rem; font-weight: 600; padding: 7px 16px; }
.site-header { background: var(--paper); padding: 18px 0 0; }
.masthead { position: relative; display: flex; justify-content: center; align-items: center; min-height: 48px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo img { height: 30px; width: auto; display: block; }
.logo-divider { display: none; }
.logo-tag {
  font-family: var(--display); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 6px; padding: 3px 8px; transform: rotate(-3deg); box-shadow: 2px 2px 0 var(--ink);
}
.nav-cta { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; gap: 10px; align-items: center; }
.points-chip {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  padding: 6px 13px; border: var(--border); border-radius: 999px; background: var(--yellow); box-shadow: var(--shadow-sm);
  font-weight: 700; font-size: 0.86rem; white-space: nowrap;
}
.points-chip:hover { color: var(--ink); }
.points-chip .coin { width: 18px; height: 18px; }
.pill-nav {
  margin: 16px auto 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; width: fit-content; max-width: 100%;
  padding: 7px; background: var(--white); border: var(--border); border-radius: 999px; box-shadow: var(--shadow);
}
.pill-nav a {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.9rem; padding: 9px 16px; border-radius: 999px; border: 2px solid transparent;
  transition: background .12s;
}
.pill-nav a:hover { background: var(--paper-2); color: var(--ink); }
.pill-nav a.active { background: var(--yellow); border-color: var(--ink); }
@media (max-width: 760px) {
  .masthead { justify-content: space-between; }
  .nav-cta { position: static; transform: none; }
  .logo img { height: 24px; }
  .pill-nav { border-radius: 18px; display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .pill-nav a { text-align: center; padding: 8px 6px; font-size: 0.8rem; border-radius: 12px; }
}
@media (max-width: 420px) {
  .nav-cta .btn { display: none; }
  .pill-nav { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  padding: 12px 22px; border: var(--border); border-radius: 12px; background: var(--white); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .12s; white-space: nowrap;
}
.btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--blue); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { color: var(--paper); }
.btn-ghost { background: var(--white); }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }
@media (max-width: 420px) { .btn { white-space: normal; text-align: center; } }

/* ---------- Tiles (the bento building block) ---------- */
.tile {
  position: relative; background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; min-width: 0;
}
.tile.t-blue { background: var(--blue); }
.tile.t-green { background: var(--green); }
.tile.t-coral { background: var(--coral); }
.tile.t-yellow { background: var(--yellow); }
.tile.t-lilac { background: var(--lilac); }
.tile.t-pink { background: var(--pink); }
.tile.t-mint { background: var(--mint); }
.tile.t-ink { background: var(--ink); color: var(--paper); }
.tile.t-paper { background: var(--paper-2); }
.tile[class*="t-"] .muted, .tile[class*="t-"] .faint { color: var(--ink); }
.tile.t-ink .muted, .tile.t-ink .faint { color: rgba(255, 248, 236, 0.8); }
.tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tile-head h2, .tile-head h3 { margin: 0; }
.tile-label { font-family: var(--display); font-weight: 700; font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; }
.bento { display: grid; gap: var(--gap); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; background: var(--white); color: var(--ink); white-space: nowrap;
}
.badge-ok { background: #b9f0a8; }
.badge-warn { background: #ffe08a; }
.badge-err { background: #ffb3a8; }
.badge-brand { background: var(--lilac); }

/* ---------- Home bento ---------- */
.home-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); padding-top: 28px; }
.b-head { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.b-head h1 { font-size: clamp(1.8rem, 4.2vw, 3.3rem); }
.b-head .lead { font-size: 1.08rem; color: var(--ink); max-width: 560px; font-weight: 500; }
.b-head .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.b-stat { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.b-stat strong { display: block; margin-bottom: 4px; font-family: var(--display); font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1; }
.b-stat span { font-weight: 700; font-size: 0.9rem; }
.b-stat .big-e { font-size: 1.8rem; }
.b-feed { display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
.feed-window { position: relative; flex: 1; min-height: 240px; overflow: hidden; margin: 0 -22px; border-top: 2px solid rgba(255, 248, 236, .3); }
.feed-track { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; animation: feedUp 34s linear infinite; }
.b-feed:hover .feed-track, .b-feed:focus-within .feed-track { animation-play-state: paused; }
.feed-item { padding: 11px 22px; border-bottom: 2px dashed rgba(255, 248, 236, .25); font-size: 0.86rem; line-height: 1.4; }
.feed-item strong { color: var(--yellow); }
.feed-item .plus { color: var(--green); font-weight: 800; }
@keyframes feedUp { to { transform: translateY(-50%); } }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); border: 2px solid var(--paper); margin-right: 6px; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

.b-stickers { min-height: 300px; overflow: hidden; }
.mini { position: absolute; background: var(--white); border: var(--border); border-radius: 12px; padding: 12px; box-shadow: var(--shadow-sm); font-size: 0.82rem; width: 84%; }
.mini .faint { color: var(--muted); }
.mini.m1 { top: 18px; left: 10px; transform: rotate(-5deg); background: var(--yellow); }
.mini.m2 { top: 112px; right: 10px; transform: rotate(4deg); }
.mini.m3 { bottom: 16px; left: 14px; transform: rotate(-2deg); background: var(--pink); }
.mini .bal { font-family: var(--display); font-size: 1.4rem; }
.mini .thumb { width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; background: #ffe9e5; flex-shrink: 0; }

.feat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
.feat-hero { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; border: var(--border); border-radius: 14px; padding: 16px; color: var(--ink); text-decoration: none; font-weight: 400; min-height: 200px; transition: transform .12s; }
.feat-hero:hover { color: var(--ink); transform: rotate(-1.5deg); }
.feat-hero .e { font-size: 4rem; line-height: 1; }
.feat-list { display: grid; gap: 8px; align-content: start; }
.feat-row { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 400; padding: 8px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.feat-row:hover { color: var(--ink); background: var(--paper-2); }
.feat-row .th { width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.feat-row .grow { flex: 1; min-width: 0; }
.feat-row .grow div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 700; white-space: nowrap; }

.b-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.b-steps li { border: 2px solid var(--ink); border-radius: 12px; padding: 12px 12px 12px 54px; position: relative; background: var(--white); min-height: 92px; }
.b-steps li:nth-child(2), .b-steps li:nth-child(4) { transform: translateY(14px); }
.b-steps li .n { position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; background: var(--yellow); }
.b-steps li strong { display: block; }
.b-steps li span { font-size: 0.85rem; color: var(--muted); display: block; }
.b-steps .ico { margin-right: 4px; }
.b-steps { padding-bottom: 36px; }

.b-check form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.b-check .input { flex: 1 1 200px; }

@media (min-width: 1001px) {
  .home-bento { grid-template-areas:
    "head head s1 feed"
    "head head s2 feed"
    "s3 stk top top"
    "gift gift top top"
    "steps steps chk chk"; }
}
@media (min-width: 601px) and (max-width: 1000px) {
  .home-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas:
    "head head" "s1 s2" "s3 stk" "feed feed" "top top" "gift gift" "steps steps" "chk chk"; }
}
@media (min-width: 601px) {
  .b-head { grid-area: head; } .b-s1 { grid-area: s1; } .b-s2 { grid-area: s2; } .b-s3 { grid-area: s3; }
  .b-feed { grid-area: feed; } .b-stickers { grid-area: stk; } .b-top { grid-area: top; } .b-gift { grid-area: gift; }
  .b-steps { grid-area: steps; } .b-check { grid-area: chk; }
}
@media (max-width: 600px) {
  .home-bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .b-head { padding: 22px; }
  .feat-wrap { grid-template-columns: minmax(0, 1fr); }
  .feat-row { flex-wrap: wrap; }
  .feat-row .price { margin-left: 52px; }
  .b-steps ol { grid-template-columns: 1fr; }
  .b-steps li:nth-child(2), .b-steps li:nth-child(4) { transform: translateX(14px); }
  .b-steps { padding-bottom: 22px; }
  .b-stickers { min-height: 0; display: grid; gap: 12px; }
  .mini { position: static; width: 100%; }
  .feed-window { min-height: 260px; }
}

/* ---------- Sticker wall (contribution types) ---------- */
.wall-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.sticker-wall {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 26px 22px;
  padding: 38px 18px; margin-top: 18px; border: var(--border); border-radius: 22px; background: var(--paper-2);
  box-shadow: inset 0 0 0 6px var(--paper);
}
.sticker {
  --rot: -3deg;
  position: relative; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); font-weight: 400; text-align: left;
  border: var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 18px 20px; width: 230px; max-width: 100%;
  transform: rotate(var(--rot)); transition: transform .18s, box-shadow .18s; font: inherit; cursor: pointer;
}
.sticker:hover, .sticker:focus-visible { color: var(--ink); transform: rotate(0deg) scale(1.04); box-shadow: var(--shadow-lg); z-index: 2; }
.sticker .emoji { font-size: 2.2rem; line-height: 1; }
.sticker strong { font-family: var(--display); font-size: 1rem; line-height: 1.2; }
.sticker .desc { font-size: 0.84rem; }
.sticker .pts { align-self: flex-start; font-family: var(--display); font-weight: 700; font-size: 1.25rem; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; margin-top: 4px; }
.sticker .pts small { font-size: 0.7rem; }
.sticker:nth-child(1) { --rot: -4deg; background: var(--blue); width: 260px; }
.sticker:nth-child(2) { --rot: 3deg; background: var(--coral); width: 320px; padding: 26px; }
.sticker:nth-child(2) .emoji { font-size: 3.2rem; }
.sticker:nth-child(2) strong { font-size: 1.35rem; }
.sticker:nth-child(3) { --rot: -2deg; background: var(--green); width: 280px; }
.sticker:nth-child(4) { --rot: 5deg; background: var(--pink); width: 210px; border-radius: 50px 20px 20px 20px; }
.sticker:nth-child(5) { --rot: -6deg; background: var(--lilac); width: 240px; border-radius: 20px 50px 20px 20px; }
.sticker:nth-child(2)::before { content: "TOP PAY"; position: absolute; top: -14px; right: 18px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 6px; font-family: var(--display); font-size: .62rem; font-weight: 700; padding: 3px 7px; transform: rotate(6deg); }
@media (max-width: 600px) {
  .sticker-wall { padding: 26px 12px; gap: 18px; }
  .sticker, .sticker:nth-child(n) { width: 100%; }
}

/* ---------- Page heads (bento title row) ---------- */
.head-bento { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); padding-top: 28px; }
.head-bento .tile:first-child { padding: 30px; }
.head-bento p { font-size: 1.04rem; max-width: 640px; }
.head-side { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; }
.head-side .huge { font-size: 3.4rem; line-height: 1; }
@media (max-width: 800px) { .head-bento { grid-template-columns: 1fr; } .head-bento .tile:first-child { padding: 22px; } }

/* ---------- Earn: chunky type toggles + form panel ---------- */
.step-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; }
.step-title .n { width: 36px; height: 36px; border: var(--border); border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; background: var(--yellow); flex-shrink: 0; }
.step-title h2, .step-title h3 { margin: 0; font-size: 1.2rem; }
.toggles { display: flex; flex-wrap: wrap; gap: 14px; }
.toggle {
  flex: 1 1 200px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 2px; align-items: center;
  text-align: left; font: inherit; color: var(--ink); cursor: pointer; padding: 14px 16px;
  border: var(--border); border-radius: 18px; background: var(--white); box-shadow: 0 6px 0 var(--ink);
  transition: transform .1s, box-shadow .1s, background .1s;
}
.toggle:hover { background: var(--paper-2); }
.toggle:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.toggle .emoji { grid-row: 1 / 4; font-size: 1.7rem; width: 54px; height: 54px; border: var(--border); border-radius: 14px; display: grid; place-items: center; background: var(--paper); }
.toggle strong { font-size: 0.98rem; line-height: 1.25; }
.toggle .desc { font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.toggle .pts { font-family: var(--display); font-weight: 700; font-size: 0.95rem; }
.toggle[aria-checked="true"] { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.toggle:nth-child(1)[aria-checked="true"] { background: var(--blue); }
.toggle:nth-child(2)[aria-checked="true"] { background: var(--coral); }
.toggle:nth-child(3)[aria-checked="true"] { background: var(--green); }
.toggle:nth-child(4)[aria-checked="true"] { background: var(--pink); }
.toggle:nth-child(5)[aria-checked="true"] { background: var(--lilac); }
.toggle[aria-checked="true"] .desc { color: var(--ink); }
.toggle[aria-checked="true"] .emoji { background: var(--white); }
.toggle[aria-checked="true"] .pts::after { content: " ✓"; }

.form-panel {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--gap);
  padding: var(--gap); border: var(--border); border-radius: 24px; background: var(--paper-2); box-shadow: var(--shadow-lg);
}
.form-panel > .tile { box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.side-stack { display: grid; gap: var(--gap); align-content: start; }
.sticky { position: sticky; top: 16px; }
.sum-tile { background: var(--yellow); transform: rotate(-1.5deg); }
.sum-tile .value { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; }
.rules-list { padding-left: 18px; margin: 0; font-size: 0.9rem; display: grid; gap: 8px; }
@media (max-width: 900px) {
  .form-panel { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .sum-tile { transform: none; }
}
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .form-panel { padding: 10px; border-radius: 18px; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.field label, .field .label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.req { color: var(--err); }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.input, textarea.input, select.input {
  width: 100%; padding: 12px 15px; border: var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
  font: inherit; font-size: 0.95rem; transition: box-shadow .12s; min-width: 0;
}
.input:focus { outline: none; box-shadow: var(--shadow-sm); background: #fffef8; }
.input[disabled] { background: var(--paper-2); }
.input.invalid { background: #fff0ee; }
textarea.input { min-height: 96px; resize: vertical; }
select.input { width: auto; font-weight: 600; cursor: pointer; }
.inline-form { display: flex; gap: 10px; }
.inline-form .input { flex: 1; }
@media (max-width: 560px) { .inline-form { flex-direction: column; } }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: var(--border); border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.alert-err { background: #ffb3a8; }
.alert-info { background: var(--white); }

.robot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 320px; user-select: none;
  padding: 11px 14px; border: var(--border); border-radius: var(--radius-sm); background: var(--white);
}
.robot-left { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.robot-box { width: 26px; height: 26px; border: var(--border); border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; }
.robot.loading .robot-box { border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.robot.checked .robot-box { background: var(--green); }
.robot.checked .robot-box::after { content: "✓"; font-weight: 800; }
.robot-brand { font-size: 0.65rem; color: var(--faint); text-align: right; line-height: 1.2; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 15px; border: var(--border); border-radius: 999px; background: var(--white); color: var(--ink);
  font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer;
}
.chip:hover { background: var(--paper-2); }
.chip.active { background: var(--ink); color: var(--paper); }

/* ---------- Leaderboard: bar race ---------- */
.tabs { display: inline-flex; border: var(--border); border-radius: 12px; overflow: hidden; background: var(--white); box-shadow: var(--shadow-sm); }
.tab { padding: 10px 18px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer; }
.tab + .tab { border-left: var(--border); }
.tab.active { background: var(--ink); color: var(--paper); }
.race-wrap { margin-top: var(--gap); padding: 24px; border: var(--border); border-radius: 24px; background: var(--white); box-shadow: var(--shadow-lg); }
.race-label { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 0.8rem; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 8px; padding: 4px 10px; margin-bottom: 16px; }
.race { display: grid; gap: 14px; }
.lane { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.lane .rk { font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-align: center; line-height: 1; }
.lane .rk .medal { display: block; font-size: 1.5rem; }
.lane .who { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; min-width: 0; }
.lane .who .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane .who .meta { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane .who > div { min-width: 0; }
.lane .avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 0.75rem; }
.track { display: flex; align-items: center; gap: 10px; }
.bar {
  height: 38px; width: 0; border: var(--border); border-radius: 0 12px 12px 0; background: var(--paper-2); box-shadow: var(--shadow-sm);
  transition: width 1s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 80ms); flex-shrink: 0;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; overflow: hidden;
}
.race.go .bar { width: calc((100% - 112px) * var(--w, 0)); min-width: 14px; }
.lane .score { font-family: var(--display); font-weight: 700; white-space: nowrap; font-size: 1rem; }
.lane .score small { font-family: var(--font); font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.lane.r1 .bar { background: var(--yellow); height: 52px; }
.lane.r2 .bar { background: var(--blue); height: 46px; }
.lane.r3 .bar { background: var(--coral); height: 42px; }
.lane.r1 .bar .crown { font-size: 1.4rem; }
.lane.r1 .score { font-size: 1.25rem; }
.lane:nth-child(n+4) .bar { background: var(--lilac); }
.lane:nth-child(2n+5) .bar { background: var(--mint); }
.race-axis { display: flex; justify-content: space-between; margin: 10px 0 0 64px; padding-top: 6px; border-top: 2px dashed var(--ink); font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.lb-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--gap); margin-top: var(--gap); align-items: stretch; }
.lb-foot .tile { display: flex; flex-direction: column; justify-content: center; }
.toggle-line { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.toggle-line input { width: 20px; height: 20px; accent-color: var(--ink); flex-shrink: 0; margin-top: 2px; }
.empty-month { text-align: center; padding: 34px 16px; }
@media (max-width: 700px) {
  .lb-foot { grid-template-columns: 1fr; }
  .race-wrap { padding: 16px 12px; }
  .lane { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
  .lane .rk { font-size: 0.9rem; }
  .lane .rk .medal { font-size: 1.2rem; }
  .race.go .bar { width: calc((100% - 92px) * var(--w, 0)); }
  .bar { height: 30px; } .lane.r1 .bar { height: 40px; } .lane.r2 .bar { height: 36px; } .lane.r3 .bar { height: 33px; }
  .lane .score { font-size: 0.85rem; } .lane.r1 .score { font-size: 1rem; }
  .race-axis { margin-left: 42px; }
}

.avatar {
  width: 44px; height: 44px; border: var(--border); border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 0.88rem; color: var(--ink); flex-shrink: 0;
}
.avatar.lg { width: 78px; height: 78px; font-size: 1.5rem; border-radius: 20px; box-shadow: var(--shadow-sm); transform: rotate(-4deg); }

/* Mini top-5 on home */
.mini-race { display: grid; gap: 10px; }
.mini-lane { display: grid; grid-template-columns: 30px 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--white); }
.mini-lane .r { font-family: var(--display); font-weight: 700; text-align: center; }
.mini-lane .avatar { width: 40px; height: 40px; font-size: 0.78rem; }
.mini-lane .who { min-width: 0; }
.mini-lane .who strong, .mini-lane .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-lane .who span { font-size: 0.8rem; color: var(--muted); }
.mini-lane .score { font-family: var(--display); font-weight: 700; text-align: right; }
.mini-lane .score small { display: block; font-family: var(--font); font-size: 0.7rem; color: var(--muted); }
.mini-lane .mbar { grid-column: 1 / -1; height: 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.mini-lane .mbar span { display: block; height: 100%; background: var(--ink); }
.mini-lane:nth-child(1) { background: var(--yellow); }
.mini-lane:nth-child(2) { background: #cfe7fd; }
.mini-lane:nth-child(3) { background: #ffd6d0; }

/* ---------- Shop: bento gift grid + drawer ---------- */
.shop-bar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); margin-top: var(--gap); }
.balance-tile { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.balance-tile .big { font-family: var(--display); font-weight: 700; font-size: 1.8rem; }
.toolbar-tile { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.toolbar-tile .sort-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-tile label { font-weight: 700; font-size: 0.85rem; }
@media (max-width: 860px) { .shop-bar { grid-template-columns: 1fr; } }

.gift-bento { display: grid; gap: var(--gap); grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; margin-top: var(--gap); }
.gift { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; scroll-margin: 40px; }
.gift:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.gift.flash { outline: 4px solid var(--blue); outline-offset: 4px; }
.gift-img { min-height: 130px; flex: 1 0 auto; display: grid; place-items: center; font-size: 4rem; position: relative; border-bottom: var(--border); }
.gift-img .badge { position: absolute; top: 12px; left: 12px; background: var(--white); }
.gift-img .e { transition: transform .3s; line-height: 1; }
.gift:hover .gift-img .e { transform: scale(1.12) rotate(-6deg); }
.gift-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.gift-body h3 { margin: 0; font-family: var(--font); font-weight: 800; font-size: 1rem; }
.gift-price { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.gift-price .pts { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.gift .progress { height: 12px; }
.gift.wide { grid-column: span 2; flex-direction: row; }
.gift.wide .gift-img { flex: 0 0 42%; min-height: 0; border-bottom: 0; border-right: var(--border); }
.gift.wide .gift-body { flex: 1; justify-content: center; }
.gift.big { grid-column: span 2; grid-row: span 2; }
.gift.big .gift-img { font-size: 8rem; min-height: 260px; }
.gift.big .gift-body h3 { font-family: var(--display); font-size: 1.3rem; }
.gift.big .gift-price .pts { font-size: 1.4rem; }
.gift-bento .empty { grid-column: 1 / -1; }
@media (max-width: 1000px) { .gift-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .gift-bento { grid-template-columns: 1fr; }
  .gift.wide, .gift.big { grid-column: auto; grid-row: auto; }
  .gift.wide { flex-direction: column; }
  .gift.wide .gift-img { flex: 1 0 auto; min-height: 130px; border-right: 0; border-bottom: var(--border); }
  .gift.big .gift-img { font-size: 5.5rem; min-height: 180px; }
}

.how-redeem { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); margin-top: 36px; }
.how-redeem .tile:nth-child(1) { transform: rotate(-1deg); }
.how-redeem .tile:nth-child(3) { transform: rotate(1deg); }
.how-redeem .ic { font-size: 1.8rem; display: block; }
@media (max-width: 860px) { .how-redeem { grid-template-columns: 1fr; } .how-redeem .tile:nth-child(n) { transform: none; } }

.drawer-back {
  position: fixed; inset: 0; background: rgba(23, 24, 28, 0.55); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer-back.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); overflow: auto;
  background: var(--paper); border-left: var(--border); box-shadow: -8px 0 0 var(--ink);
  transform: translateX(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.drawer-back.open .drawer { transform: none; }
.drawer-head { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: var(--border); background: var(--yellow); position: sticky; top: 0; z-index: 1; }
.drawer-head .thumb { width: 64px; height: 64px; border: var(--border); border-radius: 14px; display: grid; place-items: center; font-size: 2rem; flex-shrink: 0; }
.drawer-head .faint { color: var(--ink); }
.drawer-head h3 { margin: 0; }
.drawer-body { padding: 22px 20px; }
.drawer-close { margin-left: auto; width: 38px; height: 38px; border: var(--border); border-radius: 10px; background: var(--coral); color: var(--ink); cursor: pointer; font-weight: 800; flex-shrink: 0; box-shadow: 2px 2px 0 var(--ink); }
.gift-line { display: flex; justify-content: space-between; gap: 10px; padding: 12px 15px; border: var(--border); border-radius: var(--radius-sm); background: var(--white); }

/* ---------- Points dashboard ---------- */
.lookup-tile .inline-form { margin-bottom: 12px; }
.dash { display: grid; gap: var(--gap); grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--gap); }
@media (min-width: 901px) {
  .dash { grid-template-areas:
    "bal bal hi hi"
    "bal bal lvl lvl"
    "hold ladder ladder ladder"
    "hist hist pend pend"
    "hist hist reds reds"; }
  .d-bal { grid-area: bal; } .d-hi { grid-area: hi; } .d-lvl { grid-area: lvl; } .d-hold { grid-area: hold; }
  .d-ladder { grid-area: ladder; } .d-hist { grid-area: hist; } .d-pend { grid-area: pend; } .d-reds { grid-area: reds; }
}
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.d-bal { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 280px; }
.d-bal .value { font-family: var(--display); font-weight: 700; font-size: clamp(3.4rem, 9vw, 6.6rem); line-height: 1; overflow-wrap: anywhere; }
.d-bal .coin { width: 28px; height: 28px; }
.d-hi { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.d-hi h2 { margin: 0 0 6px; }
.d-hi .avatar.lg { margin: 0; }
.d-lvl .value, .d-hold .value { font-family: var(--display); font-weight: 700; font-size: 1.6rem; display: block; margin: 4px 0 8px; }
.d-hold .row-line { font-size: 0.86rem; display: block; }
.d-ladder { display: flex; flex-direction: column; justify-content: center; }
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: var(--border); border-radius: 12px; overflow: hidden; }
.levels span { padding: 10px 6px; font-size: 0.78rem; font-weight: 700; text-align: center; background: var(--white); color: var(--faint); }
.levels span + span { border-left: var(--border); }
.levels .on { color: var(--ink); background: var(--green); }
@media (max-width: 600px) { .levels { grid-template-columns: 1fr; } .levels span + span { border-left: 0; border-top: var(--border); } }
.progress { height: 16px; border: var(--border); border-radius: 999px; background: var(--white); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); border-right: 2px solid var(--ink); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.t-green .progress > span { background: var(--ink); }

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; font-family: var(--display); font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: var(--border); background: var(--paper-2); }
.table td { padding: 11px 12px; border-bottom: 2px dashed var(--ink); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--display); font-weight: 700; white-space: nowrap; }
.table .sub { font-size: 0.8rem; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); }
.pos { color: var(--ok); } .neg { color: var(--err); }
.table-wrap { overflow-x: auto; border: var(--border); border-radius: var(--radius-sm); background: var(--white); }
.list-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 2px dashed var(--ink); color: var(--ink); text-decoration: none; font-weight: 400; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .th { width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 10px; display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.list-item .end { text-align: right; flex-shrink: 0; }
.list-item .end .faint { font-size: 0.75rem; margin-top: 4px; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); font-weight: 600; }
.not-found { text-align: center; padding: 50px 20px; }

/* ---------- How it works: zig-zag path ---------- */
.path { position: relative; display: grid; gap: 26px; margin-top: var(--gap); counter-reset: step; }
.path::before { content: ""; position: absolute; top: 30px; bottom: 30px; left: 50%; border-left: 4px dashed var(--ink); z-index: 0; }
.path-step {
  position: relative; z-index: 1; width: 56%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start;
  padding: 22px; border: var(--border); border-radius: 20px; box-shadow: var(--shadow);
}
.path-step:nth-child(odd) { justify-self: start; transform: rotate(-1deg); }
.path-step:nth-child(even) { justify-self: end; transform: rotate(1deg); }
.path-step:nth-child(1) { background: var(--blue); }
.path-step:nth-child(2) { background: var(--green); }
.path-step:nth-child(3) { background: var(--yellow); }
.path-step:nth-child(4) { background: var(--coral); }
.path-step .num {
  counter-increment: step; width: 70px; height: 70px; border: var(--border); border-radius: 18px; background: var(--white);
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 2rem; box-shadow: var(--shadow-sm);
}
.path-step .num::before { content: counter(step); }
.path-step h3 { font-size: 1.15rem; }
.path-step .icon { margin-right: 6px; }
.path-step .muted { color: var(--ink); }
@media (max-width: 760px) {
  .path::before { left: 34px; }
  .path-step, .path-step:nth-child(n) { width: 100%; transform: none; grid-template-columns: 1fr; gap: 10px; }
  .path-step .num { width: 50px; height: 50px; font-size: 1.4rem; }
}
.info-bento { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--gap); margin-top: 40px; }
@media (max-width: 860px) { .info-bento { grid-template-columns: 1fr; } }
.level-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--ink); }
.level-row:last-child { border-bottom: 0; }
.level-row .e { font-size: 1.6rem; }
.level-row .progress { height: 10px; margin-top: 6px; }
.level-row .min { font-family: var(--display); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }

.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; margin-top: 16px; }
@media (max-width: 760px) { .faq-grid { grid-template-columns: 1fr; } }
details.faq { border: var(--border); border-radius: 14px; background: var(--white); padding: 15px 18px; box-shadow: var(--shadow-sm); }
details.faq[open] { background: var(--paper-2); box-shadow: var(--shadow); }
details.faq:nth-child(4n+1)[open] { background: #cfe7fd; }
details.faq:nth-child(4n+2)[open] { background: #d4f3dd; }
details.faq:nth-child(4n+3)[open] { background: #fff1b8; }
details.faq:nth-child(4n+4)[open] { background: #ffd6d0; }
details.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); font-family: var(--display); line-height: 1; transition: transform .2s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin: 10px 0 0; }

/* CTA block */
.cta-block { border: var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 40px 28px; text-align: center; background: var(--green); margin-top: 40px; }
.cta-block h2 { max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-block .muted { color: var(--ink); font-weight: 600; }

/* Terms bento */
.terms-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.terms-bento .tile.wide { grid-column: span 2; }
.terms-bento h2 { font-size: 1.15rem; }
.terms-bento p { margin: 0; }
@media (max-width: 860px) { .terms-bento { grid-template-columns: 1fr; } .terms-bento .tile.wide { grid-column: auto; } }

/* ---------- Misc ---------- */
.skeleton { background: var(--paper-2); border: 2px dashed var(--faint); border-radius: var(--radius); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.success { text-align: center; padding: 36px 16px; }
.success .big-emoji { font-size: 4rem; display: block; margin-bottom: 10px; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1); } }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); opacity: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 0.9rem;
  box-shadow: 4px 4px 0 var(--yellow); transition: all .25s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 300; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* ---------- Footer (bento strip) ---------- */
.site-footer { padding: 40px 0 32px; margin-top: 48px; border-top: var(--border); background: var(--paper-2); }
.footer-bento { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--gap); }
.fb { border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.fb-brand { background: var(--yellow); }
.fb-links { background: var(--white); display: flex; flex-wrap: wrap; gap: 8px 10px; align-content: center; }
.fb-links a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.88rem; padding: 5px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }
.fb-links a:hover { background: var(--blue); color: var(--ink); }
.fb-meta { background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: center; gap: 12px; align-items: flex-start; }
.reset-btn { font: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer; padding: 7px 13px; border: 2px solid var(--paper); border-radius: 10px; background: var(--coral); color: var(--ink); }
.reset-btn:hover { background: var(--yellow); }
@media (max-width: 860px) { .footer-bento { grid-template-columns: 1fr; } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .5s; }
.reveal.in { opacity: 1; transform: none; }
.sticker.reveal.in { transform: rotate(var(--rot)); }
.sticker.reveal.in:hover, .sticker.reveal.in:focus-visible { transform: rotate(0deg) scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .feed-track { position: static; }
  .feed-window { overflow-y: auto; max-height: 360px; }
  .feed-track .dup { display: none; }
}

/* History table: let the "What" column shrink so long links ellipsis instead of overflowing */
.d-hist .table td:nth-child(2) { width: 100%; max-width: 0; }
.d-hist .table .sub { max-width: none; }
