/* Cramberry · home page sections */

/* ---------- hero: text left, demo video right, pixel grid + drifting fruit bosses behind ---------- */
.hero {
  position: relative; overflow: hidden; padding-block: clamp(40px, 5.5vw, 76px) calc(clamp(48px, 6.5vw, 88px) + 54px);
  background:
    linear-gradient(var(--hairline) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--cream);
}
.hero::after { /* fade the grid out towards the bottom edge */
  content: ""; position: absolute; inset: auto 0 0; height: 35%; pointer-events: none; background: linear-gradient(transparent, var(--cream));
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
/* desktop: the hero fills the first screen, and the video gets the larger share of a wider container */
@media (min-width: 901px) {
  .hero { min-height: calc(100svh - var(--header-h)); display: grid; align-items: center; }
  .hero-grid { width: 100%; max-width: 1480px; padding-inline: max(var(--gutter), 3vw) max(var(--gutter-r), 3vw); grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
}
.hero-copy { display: grid; gap: 16px; justify-items: start; }
.hero-title { max-width: 15ch; }
.hero-lede { max-width: 46ch; color: var(--ink-soft); }
.hero-ctas { margin-top: 4px; }
.hero-ctas .btn svg:not(.ico) { width: 20px; height: 20px; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-title { max-width: 18ch; }
}

/* drifting fruit bosses in the background */
.hero-sky { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.drift { position: absolute; opacity: .2; animation: drift 9s ease-in-out infinite alternate; }
.d1 { left: 3%; top: 10%; } .d2 { left: 38%; top: 6%; animation-delay: -3s; } .d3 { right: 4%; top: 6%; animation-delay: -5s; }
.d4 { left: 42%; bottom: 10%; animation-delay: -2s; } .d5 { right: 6%; bottom: 8%; opacity: .15; animation-delay: -6s; }
@keyframes drift { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-18px) rotate(4deg); } }
@media (max-width: 900px) { .d2, .d4 { display: none; } .drift { opacity: .13; } }
.ul { position: relative; white-space: nowrap; color: var(--blue); }
[data-theme="dark"] .ul { color: var(--blue-light); }
.ul svg { position: absolute; left: 0; right: 0; bottom: -.16em; width: 100%; height: .26em; overflow: visible; }
.ul path { fill: none; stroke: var(--wildberry); stroke-width: 4; stroke-linejoin: miter; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .8s cubic-bezier(.65,0,.35,1) .35s forwards; }
.intro-pending .ul path { animation-play-state: paused; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 520px) { .ul { white-space: normal; } }


/* command ticker along the bottom edge of the hero */
.ticker { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; background: var(--paper); border-block: 3px solid var(--ink); overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: tick 96s linear infinite; }
.ticker-track span { font-family: var(--f-pixel); font-size: 15px; letter-spacing: .06em; color: var(--blue-deep); padding: 12px 22px; white-space: nowrap; }
.ticker-track span:nth-child(3n+2) { color: var(--wildberry); } .ticker-track span:nth-child(3n) { color: var(--ink); }
[data-theme="dark"] .ticker { background: var(--night); border-color: #000; }
[data-theme="dark"] .ticker-track span { color: var(--gold); }
[data-theme="dark"] .ticker-track span:nth-child(3n+2) { color: var(--blush); } [data-theme="dark"] .ticker-track span:nth-child(3n) { color: var(--blue-light); }
@keyframes tick { to { transform: translateX(-50%); } }

.hero-video {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: var(--night); box-shadow: 0 0 0 3px #000, 0 8px 0 3px #000, 0 30px 60px -28px rgba(15,16,21,.7);
}
.hero-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-soon { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--night-muted);
  background: radial-gradient(120% 90% at 50% 0%, #1b2140 0%, var(--night) 62%); font-family: var(--f-pixel); font-size: 16px; letter-spacing: .06em; }

/* ---------- live battle stage (inside Games) ---------- */
.stage {
  width: min(880px, 100%); margin: 0 auto clamp(28px, 4vw, 44px); text-align: left;
  background: var(--stage-bg);
  border-radius: 14px; padding: 16px clamp(16px, 3vw, 28px) 18px; color: var(--ink);
  box-shadow: 0 0 0 3px #000, 0 8px 0 3px #000, 0 30px 60px -28px rgba(15,16,21,.7);
}
.stage-bar { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-pixel); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.stage-k { color: var(--game-hi); }
.stage-tag { background: var(--game-chip); color: var(--ink); padding: 3px 10px; border-radius: 999px; }
.stage-field { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; padding: 18px 0 14px; border-bottom: 4px solid var(--game-chip); }
.stage .hplabel { color: var(--game-muted); }
.stage .hplabel b { color: var(--game-strong); }
.stage .hpbar { background: var(--hp-track); }
.fighter { display: grid; justify-items: center; gap: 12px; }
.fighter .plate { width: min(260px, 100%); }
.stage-vs { font-family: var(--f-pixel); font-size: clamp(24px, 3vw, 34px); color: var(--wildberry); text-shadow: 3px 3px 0 #000; padding-bottom: 46px; }
.mc-boss { position: relative; }
.mc-hero { transition: transform .4s var(--hop); }
.mc-hero.raise { animation: raise 1s var(--hop) both; }
#mc-boss.flash { animation: bflash .35s steps(2) 1, shake .4s steps(4) 1; }
.stage-q { display: grid; grid-template-columns: 1fr minmax(0, 300px); gap: 16px; align-items: center; padding-top: 14px; }
.stage-prompt { font-size: 15.5px; color: var(--game-strong); min-height: 2.6em; transition: opacity .25s; }
.stage-prompt.swap { opacity: 0; }
.mc-abcd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mc-abcd span { display: grid; place-items: center; height: 40px; border-radius: 6px; background: var(--blurple); color: #fff; font-family: var(--f-pixel); font-size: 17px; box-shadow: 0 3px 0 var(--blurple-deep); transition: transform .1s, box-shadow .1s, background .2s; }
.mc-abcd span.press { transform: translateY(3px); box-shadow: 0 0 0 var(--blurple-deep); background: var(--hp-green); }
.mc-abcd span.press.miss { background: var(--hp-red); }
@media (max-width: 640px) {
  .stage-field { grid-template-columns: 1fr 1fr; }
  .stage-vs { display: none; }
  .mc-hero { width: 112px !important; height: 88px !important; }
  #mc-boss { width: 110px !important; height: 100px !important; }
  .stage-q { grid-template-columns: 1fr; }
}

/* ---------- loop ---------- */
.loop-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 22px; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.step-b { width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; font-family: var(--f-body); font-weight: 700; font-size: 18px; background: var(--game-chip); color: var(--ink); box-shadow: 0 3px 0 var(--game-drop); transition: transform .1s, background .2s; }
.step-b[aria-selected="true"] { background: var(--gold); color: #2b211b; }
.step-b:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--game-drop); }
/* light mode: white step buttons with blue numbers, the current step in solid blue */
[data-theme="light"] .step-b { background: #fff; color: var(--blue); box-shadow: 0 0 0 2px var(--game-edge), 0 3px 0 var(--game-drop); }
[data-theme="light"] .step-b[aria-selected="true"] { background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-deep); }
[data-theme="light"] .lp.on { box-shadow: 0 0 0 3px var(--wildberry), 0 18px 36px -14px rgba(184,50,110,.35); }
[data-theme="light"] .loop-cap b { color: var(--wildberry); }
[data-theme="light"] .scope input:checked + span { background: var(--blue); color: #fff; }
.loop-play { margin-left: 6px; }
.scope { display: inline-flex; background: var(--game-well); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 2px var(--game-edge); }
.scope label { position: relative; }
.scope input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.scope span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--game-muted); }
.scope input:checked + span { background: var(--game-strong); color: var(--game-bg); }
.scope input:focus-visible + span { outline: 3px solid var(--game-hi); outline-offset: 2px; }

.loop-row { display: grid; grid-template-columns: 1fr 64px 1.05fr 64px 1fr 64px 1.25fr; align-items: stretch; }
.lp { background: var(--game-panel); border-radius: 12px; padding: 20px 18px 18px; position: relative; display: grid; align-content: start; gap: 4px;
  box-shadow: 0 0 0 2px var(--game-edge); transition: box-shadow .3s, opacity .3s, transform .3s; min-width: 0; }
.lp-bar { position: absolute; top: 0; left: 16px; right: 16px; height: 4px; background: var(--c); border-radius: 0 0 4px 4px; }
.lp-h { font-family: var(--f-pixel); font-weight: 500; font-size: 18px; letter-spacing: .03em; text-transform: uppercase; color: var(--game-strong); }
.lp-sub { color: var(--game-hi); font-size: 14.5px; font-weight: 700; }
.lp-art { min-height: 120px; display: grid; place-items: center; margin: 10px 0; }
.lp-art.cubbies { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.lp-art.cubbies figure { margin: 0; display: grid; justify-items: center; gap: 4px; }
.lp-art.cubbies img { width: 100%; max-width: 64px; }
.lp-art.cubbies figcaption { font-size: 12.5px; background: var(--game-chip); padding: 2px 8px; border-radius: 999px; }
.canvas-stack { position: relative; width: 92px; height: 74px; }
.canvas-stack i { position: absolute; width: 74px; height: 56px; border-radius: 8px; border: 3px solid #0f1015; }
.canvas-stack i:nth-child(1) { background: #ec4c58; left: 0; top: 0; }
.canvas-stack i:nth-child(2) { background: #ee9b3a; left: 8px; top: 8px; }
.canvas-stack i:nth-child(3) { background: #3a8cef; left: 16px; top: 16px; background-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0), linear-gradient(#fff 0 0);
  background-size: 44px 5px, 34px 5px, 40px 5px; background-position: 10px 12px, 10px 24px, 10px 36px; background-repeat: no-repeat; }
.lp-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.lp-list li { display: flex; gap: 10px; align-items: center; transition: opacity .3s, color .3s; }
.lp-list li::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.lp.on { box-shadow: 0 0 0 3px var(--game-gold), 0 0 40px -6px rgba(253,227,154,.45); transform: translateY(-4px); }
.loop[data-show="shared"] [data-scope="private"], .loop[data-show="private"] [data-scope="shared"] { opacity: .28; }
.loop[data-show="shared"] .lp[data-scope="both"] li[data-scope="private"], .loop[data-show="private"] .lp[data-scope="both"] li[data-scope="shared"] { opacity: .28; }
.loop[data-show="shared"] li[data-scope="shared"]::before { background: var(--hp-green); }
.loop[data-show="private"] li[data-scope="private"]::before { background: var(--blush); }
.loop[data-show="shared"] [data-scope="shared"], .loop[data-show="private"] [data-scope="private"] { color: var(--game-strong); }

.lp-link { position: relative; display: grid; grid-template-rows: 1fr 1fr; align-content: center; gap: 0; padding: 0 6px; }
.lane { position: relative; height: 24px; align-self: center; }
.lane::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, var(--lc) 0 8px, transparent 8px 14px); opacity: .55; }
.lane.fwd { --lc: var(--game-gold); align-self: end; margin-bottom: 8px; }
.lane.back { --lc: var(--blue-mid); align-self: start; margin-top: 8px; }
.lane.fwd::after, .lane.back::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 7px solid transparent; transform: translateY(-50%); }
.lane.fwd::after { right: -6px; border-left: 9px solid var(--game-gold); }
.lane.back::after { left: -6px; border-right: 9px solid var(--blue-mid); }
.lp-link[data-link="1"] .lane.back { visibility: hidden; }
.pkt { position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: var(--lc); box-shadow: 0 0 0 2px #000, 0 0 16px var(--lc); opacity: 0; left: 0; }
.lane.go .pkt { animation: pkt-f 1.1s steps(9) infinite; }
.lane.back.go .pkt { animation-name: pkt-b; }
@keyframes pkt-f { 0% { left: 0; opacity: 1; } 100% { left: calc(100% - 12px); opacity: 1; } }
@keyframes pkt-b { 0% { left: calc(100% - 12px); opacity: 1; } 100% { left: 0; opacity: 1; } }
.lane.go::before { opacity: 1; }
.lbadge { position: absolute; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--game-gold); color: var(--game-on-gold); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.lbadge.f { top: calc(50% - 56px); }
.lbadge.b { bottom: calc(50% - 56px); background: var(--blue-mid); color: #fff; }
.loop-cap { margin-top: 24px; min-height: 3.2em; font-size: 18px; font-weight: 700; color: var(--game-strong); display: flex; gap: 14px; align-items: baseline; }
.loop-cap b { font-family: var(--f-pixel); color: var(--game-hi); font-weight: 500; flex: none; }
.loop-note { margin-top: 10px; color: var(--ink); font-size: 15.5px; font-weight: 700; opacity: .8; }

.dc-mini { background: var(--discord-chat); border-radius: 8px; padding: 10px; font-size: 13.5px; display: grid; gap: 6px; margin: 10px 0; color: #dbdee1; }
.dc-ch { font-weight: 700; color: #fff; }
.dc-emb { background: var(--discord-embed); border-left: 3px solid var(--wildberry); border-radius: 4px; padding: 8px; display: grid; gap: 4px; }
.dc-emb span { color: var(--night-muted); font-size: 12px; }
.dc-hp { height: 6px; background: linear-gradient(90deg, var(--hp-red) 60%, #3a3d48 0); border-radius: 3px; display: block; }
.dc-abcd { display: flex; gap: 4px; }
.dc-abcd i { font-style: normal; background: var(--blurple); color: #fff; border-radius: 3px; padding: 1px 7px; font-size: 12px; }

@media (max-width: 1080px) {
  .loop-row { grid-template-columns: 1fr; }
  .lp-link { height: 76px; grid-template-rows: none; grid-template-columns: 1fr 1fr; padding: 0; justify-items: center; }
  .lane { width: 24px; height: 100%; }
  .lane::before { left: 50%; right: auto; top: 0; bottom: 0; width: 4px; height: auto; transform: translateX(-50%);
    background: repeating-linear-gradient(180deg, var(--lc) 0 8px, transparent 8px 14px); }
  .lane.fwd { margin: 0; align-self: stretch; justify-self: end; margin-right: 18px; }
  .lane.back { margin: 0; align-self: stretch; justify-self: start; margin-left: 18px; }
  .lane.fwd::after { right: auto; left: 50%; top: auto; bottom: -6px; transform: translateX(-50%); border: 7px solid transparent; border-top: 9px solid var(--game-gold); }
  .lane.back::after { left: 50%; top: -6px; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 9px solid var(--blue-mid); }
  .pkt { left: 50% !important; margin-left: -6px; top: 0; margin-top: 0; }
  @keyframes pkt-f { 0% { top: 0; opacity: 1; } 100% { top: calc(100% - 12px); opacity: 1; } }
  @keyframes pkt-b { 0% { top: calc(100% - 12px); opacity: 1; } 100% { top: 0; opacity: 1; } }
  .lbadge.f { top: 50%; left: calc(50% - 46px); transform: translate(-50%, -50%); }
  .lbadge.b { bottom: auto; top: 50%; left: calc(50% + 46px); transform: translate(-50%, -50%); }
}

/* ---------- phone ---------- */
.phone-grid { display: grid; grid-template-columns: 1fr minmax(300px, 400px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.phrases { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.phrase { display: flex; gap: 8px; align-items: stretch; }
.phrase .send {
  flex: 1; min-width: 0; text-align: left; min-height: 52px; padding: 10px 16px; border-radius: 22px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 15.5px; box-shadow: 0 3px 0 var(--blue-deep); overflow-wrap: anywhere;
  transition: transform .1s, box-shadow .1s, background .15s;
}
.phrase .send:hover { background: #3a80ea; }
.phrase .send:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--blue-deep); }
.phrase .send small { display: block; font-weight: 400; font-size: 13.5px; color: #d6e6ff; }
.phrase .copy { align-self: center; width: 44px; height: 44px; }
/* the messages unlock in order: the next one glows, later ones wait */
.phrase .send { transition: transform .1s, box-shadow .2s, background .15s, opacity .2s; }
.phrase.next .send { --ring: var(--wildberry); box-shadow: 0 0 0 3px var(--ring), 0 0 14px 3px rgba(42, 120, 230, .45); animation: nextGlow 1.8s ease-in-out infinite; }
[data-theme="dark"] .phrase.next .send { --ring: var(--gold); }
.phrase.locked .send { opacity: .5; }
.phrase.locked .send:hover { opacity: .7; }
.phrase.nudge .send { animation: nudge .5s steps(4) 1, nextGlow 1.8s ease-in-out infinite .5s; }
@keyframes nextGlow { 50% { filter: brightness(1.12); box-shadow: 0 0 0 3px var(--ring), 0 0 24px 7px rgba(42, 120, 230, .7); } }
@keyframes nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.phone-how { max-width: 52ch; }
.ph-body { scrollbar-width: none; }
.ph-body::-webkit-scrollbar { display: none; }
.small-note { margin-top: 14px; font-size: 15.5px; }
.phone-wrap { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 12px; }
.phone {
  position: relative; background: #000; border-radius: 44px; padding: 16px 12px 12px; height: min(600px, 72vh); display: flex; flex-direction: column;
  box-shadow: 0 0 0 10px #1b1d22, 0 0 0 12px #3a3d45, 0 40px 70px -30px rgba(15,16,21,.8);
}
.ph-notch { position: absolute; top: 12px; left: 50%; width: 96px; height: 26px; transform: translateX(-50%); background: #1b1d22; border-radius: 16px; }
.ph-head { display: grid; justify-items: center; gap: 2px; padding: 26px 0 10px; color: #fff; font-size: 13px; border-bottom: 1px solid #1f2126; }
.ph-head img { width: 44px; height: 40px; background: #24262c; border-radius: 50%; padding: 4px; }
.ph-body { flex: 1; overflow-y: auto; padding: 14px 6px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.bub { max-width: 82%; padding: 9px 14px; border-radius: 20px; font-size: 15.5px; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; animation: bub .3s var(--hop) both; }
@keyframes bub { from { transform: translateY(8px) scale(.94); opacity: 0; } }
.bub.me { align-self: flex-end; background: #0a84ff; color: #fff; border-bottom-right-radius: 6px; }
.bub.them { align-self: flex-start; background: #26262a; color: #f2f2f7; border-bottom-left-radius: 6px; }
.bub.typing { display: inline-flex; gap: 4px; padding: 14px; }
.bub.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8e8e93; animation: dots 1s infinite; }
.bub.typing i:nth-child(2) { animation-delay: .15s; } .bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { transform: translateY(-3px); opacity: .5; } }
.bub.link { display: flex; gap: 12px; align-items: center; background: #26262a; padding: 10px 12px; }
.bub.link img { width: 44px; height: 40px; background: #fff; border-radius: 8px; padding: 3px; }
.bub.link b { display: block; color: #fff; }
.bub.link span { font-size: 13px; color: #9a9aa1; }
.ph-input { margin: 6px 4px 2px; border: 1px solid #3a3a3e; border-radius: 18px; padding: 7px 14px; color: #6d6d72; font-size: 15px; }
@media (max-width: 900px) { .phone-grid { grid-template-columns: 1fr; } .phone-wrap { position: static; max-width: 420px; justify-self: center; width: 100%; } .phone { height: 560px; } }

/* ---------- games ---------- */
.games-wrap { position: relative; padding-top: 104px; }
.peek-boss { position: absolute; top: 0; right: 3%; z-index: 2; cursor: pointer; transform: translateY(40px); opacity: 0;
  transition: transform .5s var(--hop), opacity .3s; }
.peek-boss.up { transform: translateY(0); opacity: 1; animation: sway 2.6s ease-in-out infinite alternate .5s; }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.peek-boss .bubble { right: auto; left: -70px; top: -10px; transform-origin: bottom right; }
.peek-boss .bubble::after { left: auto; right: 6px; }
.games-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.game { background: var(--paper); padding: 22px 20px; display: grid; gap: 10px; align-content: start; }
.g-ico { height: 74px; display: flex; align-items: flex-end; }
.g-cmd { justify-self: start; background: var(--game-bg); color: var(--game-hi); padding: 3px 10px; border-radius: 4px; font-size: 14px; }
.game p { font-size: 16px; color: var(--ink-soft); }
.game code:not(.g-cmd) { background: var(--tint); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 1080px) { .games-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .games-grid { grid-template-columns: 1fr; } .peek-boss { right: 4%; } }

.bestiary { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.bestiary button {
  width: 100%; display: grid; justify-items: center; gap: 4px; padding: 18px 8px 14px; border: 0; border-radius: 10px; cursor: pointer; background: var(--game-bg); color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 70%, #000), 0 5px 0 3px color-mix(in srgb, var(--c) 45%, #000); transition: transform .15s var(--hop);
}
.bestiary button:hover { transform: translateY(-4px); }
.bestiary button b { font-size: 14.5px; margin-top: 6px; }
.bestiary-cap { margin-top: 14px; text-align: center; font-size: 15.5px; font-weight: 700; }
@media (max-width: 900px) { .bestiary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .bestiary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* ---------- what your group sees: endless auto-scrolling strip ---------- */
.cards-band { padding-block: clamp(44px, 5.5vw, 76px); }
.marquee { overflow: hidden; padding: 8px 0 18px; max-width: 2800px; margin-inline: auto; /* wider than this, the doubled strip would run out */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent); mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent); }
.marquee-track { display: flex; gap: 22px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 11px)); } }  /* the track holds the cards twice: -50% loops seamlessly */
.marquee figure { margin: 0; flex: 0 0 min(500px, 78vw); display: grid; gap: 12px; }
.marquee button { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px var(--game-edge), 0 24px 40px -24px var(--game-drop); transition: transform .2s var(--hop); }
.marquee button:hover { transform: translateY(-4px); }
[data-theme="light"] .marquee button { box-shadow: 0 0 0 2px var(--game-edge), 0 6px 0 var(--game-edge); }
.marquee figcaption { color: var(--ink); font-size: 16px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; padding-inline: 16px; }
  .marquee-track { animation: none; }
  .marquee figure[aria-hidden="true"] { display: none; }
}
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); }
.lightbox::backdrop { background: rgba(10,11,15,.88); }
.lightbox img { border-radius: 10px; width: 100%; }
.lightbox .lb-close { margin: 14px auto 0; display: flex; }

/* ---------- im cooked ---------- */
.cooked-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.cooked-boss { position: relative; display: inline-block; margin-top: 10px; margin-left: 30px; }
.cooked-boss .bubble { left: -54px; right: auto; transform-origin: bottom right; }
.cooked-boss .bubble::after { left: auto; right: 6px; }
.dc { background: var(--discord-chat); color: #dbdee1; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(15,16,21,.8); }
.dc-top { padding: 14px 18px; font-weight: 700; color: #fff; border-bottom: 1px solid #26282c; font-size: 17px; }
.dc-feed { padding: 16px 18px; display: grid; gap: 16px; min-height: 280px; max-height: 620px; overflow-y: auto; }
.dcm { display: grid; grid-template-columns: 40px 1fr; gap: 12px; animation: bub .35s var(--hop) both; }
.dcm .av { width: 40px; height: 40px; border-radius: 50%; display: block; }
.dcm .av.cb { background: var(--gold); display: grid; place-items: center; overflow: hidden; }
.dcm b { font-weight: 700; }
.dcm time { font-size: 12px; color: #949ba4; margin-left: 4px; }
.dcm p { font-size: 16px; overflow-wrap: anywhere; }
.you-tag { font-size: 11px; background: #4e5058; color: #fff; padding: 1px 5px; border-radius: 3px; vertical-align: 2px; }
.app-tag { background: var(--blurple); color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 3px; margin-left: 4px; vertical-align: 2px; font-weight: 700; }
.rally { margin-top: 6px; background: var(--discord-embed); border-left: 4px solid #8c8cff; border-radius: 4px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; animation: slidein .5s var(--hop) both; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.rally h4 { color: #fff; font-size: 18px; margin-bottom: 6px; }
.rally .r-sub { font-size: 15.5px; margin-bottom: 10px; }
.rally .r-h { font-weight: 700; color: #fff; font-size: 15px; margin: 4px 0 6px; }
.rally ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14.5px; }
.rally ol li { display: grid; grid-template-columns: 24px 82px 1fr; gap: 6px; align-items: baseline; }
.rally ol li code { background: #1e1f22; color: #dbdee1; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.rally ol li .n { background: #3e6fd8; color: #fff; border-radius: 3px; text-align: center; font-size: 12px; font-weight: 700; }
.rally .r-foot { grid-column: 1 / -1; color: #949ba4; font-size: 12.5px; margin-top: 8px; }
.rally canvas { align-self: center; }
.dc-in { display: flex; gap: 8px; padding: 0 18px 12px; }
.dc-in input { flex: 1; min-width: 0; min-height: 48px; border: 0; border-radius: 8px; background: #383a40; color: #fff; padding: 0 14px; font: inherit; font-size: 16px; }
.dc-in input::placeholder { color: #949ba4; }
.dc-try { padding: 0 18px 12px; }
.dc-try .btn { white-space: normal; text-align: left; line-height: 1.25; min-height: 48px; padding: 8px 14px; font-size: 15px; }
.dc-hint { padding: 0 18px 16px; font-size: 14.5px; color: #b5bac1; min-height: 1.4em; }
@media (max-width: 900px) { .cooked-grid { grid-template-columns: 1fr; } .cooked-boss { display: none; } }
@media (max-width: 520px) { .rally { grid-template-columns: 1fr; } .rally canvas { display: none; } .rally ol li { grid-template-columns: 22px 1fr; } .rally ol li span:last-child { grid-column: 2; } }

/* ---------- tools ---------- */
.tools-grid { display: grid; grid-template-columns: 1fr minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.cmds { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmd-item { background: var(--paper); border-radius: 8px; padding: 10px 10px 10px 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 0 0 2px var(--hairline); min-width: 0; }
.cmd-item code { font-weight: 700; color: var(--blue-deep); font-size: 15px; flex: none; }
[data-theme="dark"] .cmd-item code { color: var(--blue-light); }
.cmd-item span { color: var(--ink-soft); font-size: 15px; font-weight: 700; flex: 1; min-width: 0; }
.cmd-item .copy { flex: none; }
.tools-art { border-radius: 12px; box-shadow: 0 0 0 3px #000, 0 24px 40px -24px rgba(15,16,21,.6); }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cmds { grid-template-columns: 1fr; } }

/* ---------- add ---------- */
.add { overflow: hidden; }
.add-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.add-art canvas { filter: drop-shadow(0 20px 30px rgba(31,111,224,.35)); }
.add-big { min-height: 58px; font-size: 18px; padding: 0 28px; }
@media (max-width: 760px) { .add-grid { grid-template-columns: 1fr; } .add-art canvas { width: 156px !important; height: 132px !important; } }

/* ---------- team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.member { background: var(--paper); padding: 28px 20px 24px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.member .fact { color: var(--ink-soft); font-size: 15.5px; line-height: 1.45; max-width: 26ch; }
@media (max-width: 700px) { .team-grid { grid-template-columns: 1fr; max-width: 340px; } }

/* ---------- phones: keep what tells the story, trim the extras (desktop keeps everything) ---------- */
@media (max-width: 600px) {
  .band { padding-block: 44px; }
  .sec-head { margin-bottom: 22px; }
  .hero { padding-top: 28px; }
  .hero-copy { gap: 12px; }
  .hero-sky { display: none; }
  .ticker-track span { font-size: 13px; padding: 10px 16px; }

  /* how it works: the steps and what each part does; the filter pills and the illustrations are desktop extras */
  .scope, .lp-art, .dc-mini { display: none; }
  .loop-controls { margin-bottom: 14px; }
  .step-b { width: 38px; height: 38px; font-size: 16px; }
  .lp { padding: 16px 16px 14px; }
  .lp-list { gap: 4px; font-size: 14.5px; }
  .lp-link { height: 46px; }
  .lane { display: none; }
  .lbadge { width: 26px; height: 26px; font-size: 13.5px; }
  .loop-cap { font-size: 16px; margin-top: 16px; }

  /* games: battle stage, the four games as a tight list, the bosses as a small row */
  .stage { padding: 12px 14px 14px; }
  .stage-field { padding: 10px 0; }
  .peek-boss { display: none; }
  .games-wrap { padding-top: 0; }
  .games-grid { gap: 14px; }
  .game { padding: 16px; gap: 8px; }
  .g-ico { height: 50px; }
  .g-ico canvas { width: 50px !important; height: auto !important; }
  .bestiary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
  .bestiary button { padding: 10px 4px 8px; }
  .bestiary canvas { width: 54px !important; height: auto !important; }
  .bestiary button b { font-size: 13px; margin-top: 2px; }

  /* cubbie: a shorter phone */
  .phone { height: 470px; }
  .phrase .send { min-height: 46px; padding: 8px 14px; font-size: 15px; }

  /* im cooked: no empty chat space */
  .dc-feed { min-height: 150px; }

  /* tools: two columns of commands; copying is a desktop thing */
  .cmds { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cmd-item { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; }
  .cmd-item code { font-size: 14px; }
  .cmd-item span { font-size: 13.5px; }
  .cmd-item .copy { display: none; }
}
