/* =========================================================
   $BIZO — main stylesheet
   Brand colours live in :root below. Change them in one place.
   ========================================================= */

:root {
  /* Brand palette (from CLAUDE.md — keep exact) */
  --aurora: #7C3AED;
  --ocean: #3B82F6;
  --pearl: #EAEAF2;
  --graphite: #1A1B2E;

  /* Derived helpers (transparent versions of the brand colours) */
  --pearl-dim: rgba(234, 234, 242, 0.7);
  --pearl-faint: rgba(234, 234, 242, 0.08);
  --line: rgba(234, 234, 242, 0.14);
  --gradient: linear-gradient(135deg, var(--aurora), var(--ocean));

  --radius: 18px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-asian: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans", "Malgun Gothic", sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--graphite);
  color: var(--pearl);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.2rem; }

a { color: inherit; }

/* Any element marked as Asian-language gets a font that has those characters */
[lang="zh-Hans"], [lang="zh-Hant"], [lang="ja"], [lang="ko"] { font-family: var(--font-asian); }

.container { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 1rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--ocean); outline-offset: 3px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--gradient);
  color: var(--pearl);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}
.btn--primary:hover { box-shadow: 0 10px 40px rgba(59, 130, 246, 0.5); }

.btn--ghost {
  background: var(--pearl-faint);
  color: var(--pearl);
  border-color: var(--line);
}
.btn--ghost:hover { background: rgba(234, 234, 242, 0.14); }

.btn--small { padding: 0.55em 1.1em; font-size: 0.9rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem max(1.25rem, env(safe-area-inset-left));
  background: rgba(26, 27, 46, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 700 1.3rem var(--font-head);
  text-decoration: none;
}
.nav__logo img { border-radius: 22%; }
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  text-decoration: none;
  color: var(--pearl-dim);
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--pearl); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  padding: 3rem 0 4rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Honeycomb pattern drawn with an inline SVG, very faint */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 0 L56 16 L56 49 L28 65 L0 49 L0 16 Z M28 65 L28 98' fill='none' stroke='%23EAEAF2' stroke-opacity='0.05' stroke-width='1.5'/%3E%3C/svg%3E");
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: drift 14s ease-in-out infinite alternate;
}
.blob--aurora { width: 520px; height: 520px; background: var(--aurora); top: -120px; left: -140px; }
.blob--ocean  { width: 480px; height: 480px; background: var(--ocean); bottom: -160px; right: -120px; animation-delay: -7s; }

@keyframes drift {
  to { transform: translate(60px, 40px) scale(1.1); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(1100px, 100% - 2.5rem);
  margin-inline: auto;
  /* one centred column: character, then the words, then the links */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35em 0.9em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pearl-faint);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--pearl-dim);
}

.hero__title {
  font-size: clamp(4rem, 13vw, 8.5rem);
  letter-spacing: -0.03em;
  margin: 0;
}
.hero__cn {
  margin: 0.2rem 0 1rem;
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  color: var(--pearl-dim);
}
/* Spaced-out capitals, matching the brand sheet */
.hero__tagline {
  font: 500 clamp(1.1rem, 2.6vw, 1.6rem) var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 0.6rem;
}
.hero__sub { margin: 0 0 2rem; color: var(--pearl-dim); font-size: 1.1rem; }

.hero__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
.hero__buttons--left { justify-content: flex-start; }

.hero__mascot { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0; }

/* Character framed by vertical Japanese text either side */
.mascot-frame { display: flex; align-items: center; gap: clamp(0.6rem, 2.5vw, 1.6rem); }
.vert {
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
  font-family: "Noto Serif JP", var(--font-asian);
}
.vert--name { font-size: clamp(2.4rem, 9vw, 4.2rem); font-weight: 600; letter-spacing: 0.2em; transition: filter 0.3s; }
.vert--tag { font-size: clamp(1.05rem, 4vw, 1.5rem); letter-spacing: 0.35em; color: var(--pearl); opacity: 0.8; }
.mascot-caption {
  margin: 1rem 0 0;
  font-family: "Noto Serif JP", var(--font-asian);
  font-size: clamp(1rem, 3.6vw, 1.25rem);
  letter-spacing: 0.3em;
  color: var(--pearl-dim);
  text-align: center;
}

/* Gentle floating (wings + body move together) */
.mascot-float {
  position: relative;
  /* room for the wings, which reach past the picture */
  margin: 0 clamp(26px, 9vw, 90px) 0 clamp(10px, 4vw, 50px);
  animation: hover 5s ease-in-out infinite;
}
.mascot-float::before {
  /* soft purple glow behind the character so it melts into the background */
  content: "";
  position: absolute;
  inset: 10% -15% 5%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.45), rgba(59, 130, 246, 0.15) 60%, transparent);
  filter: blur(20px);
  z-index: 0;
}
@keyframes hover {
  50% { transform: translateY(-12px); }
}

.mascot-stage { position: relative; z-index: 1; }
.mascot-stage.poke { animation: poke 0.65s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes poke {
  0%   { transform: scale(1) rotate(0); }
  20%  { transform: scale(1.05, 0.94) rotate(-3deg); }
  45%  { transform: scale(0.97, 1.04) translateY(-16px) rotate(2deg); }
  70%  { transform: scale(1.02, 0.98) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}
.hero__mascot.poked .vert--name { filter: drop-shadow(0 0 14px rgba(124, 58, 237, 0.95)); }

/* The character itself is a button: tap it and BIZO reacts */
.mascot-card {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 28px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mascot-card:focus-visible { outline: 3px solid var(--ocean); outline-offset: 4px; }
.mascot-card img {
  display: block;
  height: min(70svh, 660px);
  width: auto;
  filter: drop-shadow(0 18px 30px rgba(26, 27, 46, 0.6));
}

/* ---------- Flapping wings (SVG behind the character) ---------- */
.wings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 0;
  filter: drop-shadow(0 0 10px rgba(170, 140, 255, 0.55));
}
.wing path { fill: url(#wing-fill); stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.4; }
.wing path.comb { fill: url(#wing-comb); stroke: none; }
.wing {
  transform-box: view-box;  /* lets transform-origin use the picture's 410×750 grid */
  animation: flap-r 0.42s ease-in-out infinite;
}
.wing--l { animation-name: flap-l; }
.wing--hind { animation-delay: -0.07s; opacity: 0.9; }
/* tapping makes the wings buzz fast for a moment */
.mascot-stage.buzz .wing { animation-duration: 0.11s; }
@keyframes flap-r {
  0%, 100% { transform: rotate(-20deg); }
  50%      { transform: rotate(14deg) scale(0.9); }
}
@keyframes flap-l {
  0%, 100% { transform: rotate(20deg); }
  50%      { transform: rotate(-14deg) scale(0.9); }
}

/* "ビゾ！" speech bubble */
.mascot-bubble {
  position: absolute;
  top: 4%;
  right: -6%;
  padding: 0.35em 0.8em;
  border-radius: 999px;
  background: var(--pearl);
  color: var(--graphite);
  font: 700 1.1rem "Noto Serif JP", var(--font-asian);
  opacity: 0;
  transform: scale(0.4) rotate(-8deg);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
  pointer-events: none;
  z-index: 3;
}
.mascot-card.talk .mascot-bubble { opacity: 1; transform: scale(1) rotate(6deg); }

/* Little sparkles that fly out from where you tapped */
.spark {
  position: absolute;
  z-index: 4;
  font-size: 1.3rem;
  pointer-events: none;
  animation: spark 0.85s ease-out forwards;
}
@keyframes spark {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  to   { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15); opacity: 0; }
}

/* Honey drops: drip from the bee, fall, and splat */
.honey {
  position: absolute;
  z-index: 4;
  width: var(--size, 14px);
  height: var(--size, 14px);
  margin: calc(var(--size, 14px) / -2) 0 0 calc(var(--size, 14px) / -2);
  pointer-events: none;
  animation: honey-fall var(--time, 1.1s) cubic-bezier(0.55, 0, 0.9, 0.6) var(--delay, 0s) both;
}
.honey::before {
  /* the drop shape: a rounded square turned 45° = point at the top */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0 50% 50% 50%;
  transform: rotate(45deg);
  background: radial-gradient(circle at 38% 38%, #fff4b8 0, #ffd45a 25%, #f5a51c 60%, #b8650a 100%);
  box-shadow: 0 0 10px rgba(255, 190, 60, 0.6);
}
@keyframes honey-fall {
  0%   { transform: translateY(0) scale(0.2); opacity: 0; }
  12%  { transform: translateY(4px) scale(0.85, 1.15); opacity: 1; }
  25%  { transform: translateY(12px) scale(1, 1.3); }
  88%  { transform: translateY(var(--fall)) scale(0.9, 1.35); opacity: 1; }
  100% { transform: translateY(var(--fall)) scale(2, 0.3); opacity: 0; }
}

/* ---------- Social links + buy (bottom of the hero) ---------- */
.hero__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  width: min(520px, 100%);
}
.social {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pearl-faint);
  border: 1px solid var(--line);
  color: var(--pearl);
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.social svg { width: 22px; height: 22px; fill: currentColor; }
.social:hover { transform: translateY(-2px); background: rgba(124, 58, 237, 0.25); border-color: var(--aurora); }
.social:focus-visible { outline: 3px solid var(--ocean); outline-offset: 3px; }

.site-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--gradient);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 60;
}
.site-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* The flying-pose picture in the game section keeps its glowing card */
.play__bee {
  border-radius: 28px;
  border: 1px solid rgba(124, 58, 237, 0.5);
  box-shadow:
    0 0 0 6px rgba(124, 58, 237, 0.12),
    0 30px 80px rgba(124, 58, 237, 0.45),
    0 0 120px rgba(59, 130, 246, 0.25);
  animation: hover 5s ease-in-out infinite;
}

/* ---------- Generic sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--alt {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.10), rgba(59, 130, 246, 0.06));
  border-block: 1px solid var(--line);
}
.section__label {
  margin: 0 0 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ocean);
}
.lead { font-size: 1.15rem; color: var(--pearl-dim); max-width: 65ch; }

/* ---------- What is BIZO cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}
.card {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--pearl-faint);
  border: 1px solid var(--line);
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--aurora); }
.card p { margin: 0; color: var(--pearl-dim); }
.card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--gradient);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.card .card__asian { margin-top: 1rem; font-size: 0.9rem; color: var(--ocean); }

/* ---------- Game teaser ---------- */
.play {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.rewards {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.rewards li {
  padding: 0.7em 1.1em;
  border-radius: 12px;
  background: var(--pearl-faint);
  border: 1px solid var(--line);
}
.rewards span { color: var(--ocean); margin-inline: 0.3em; }

.play__preview {
  max-width: 320px;
  width: 100%;
  margin-inline: auto;
}
.play__bee { width: 100%; animation-duration: 3s; }

/* ---------- BIZO Cover (coming soon) ---------- */
.cover {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas: "intro dash" "outro dash";
  gap: 1.5rem 3rem;
  align-items: start;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  border-radius: 24px;
  border: 2px dashed rgba(59, 130, 246, 0.75);
  background: rgba(124, 58, 237, 0.05);
}
.cover__intro { grid-area: intro; }
.cover__outro { grid-area: outro; }
.dash { grid-area: dash; }

.badge {
  display: inline-block;
  padding: 0.35em 1em;
  border-radius: 999px;
  font: 700 0.9rem var(--font-body);
}
.badge--soon {
  /* Ocean lightened with Pearl */
  background: linear-gradient(rgba(234, 234, 242, 0.4), rgba(234, 234, 242, 0.4)), var(--ocean);
  color: var(--graphite);
}
.cover__title {
  margin: 0.8rem 0 0.2rem;
  background: linear-gradient(135deg, #b9a0ee, var(--aurora));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cover__cn { margin: 0 0 1rem; color: var(--pearl-dim); letter-spacing: 0.2em; }
.cover .lead { color: var(--pearl); }

.dash {
  padding: 1.4rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(16, 17, 32, 0.6);
}
.dash__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.dash__head b { font: 700 1.15rem var(--font-head); }
.dash__head span { color: #8fb6ff; font-size: 0.9rem; }
.dash dl { margin: 0 0 1.2rem; }
.dash dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.dash dt { color: var(--pearl-dim); }
.dash dd { margin: 0; font-weight: 700; text-align: right; }
.dash .dash__hi { color: #8fb6ff; }
.dash .btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.cover__steps { margin: 0 0 1rem; padding-left: 1.4rem; font-size: 1.1rem; display: grid; gap: 0.5rem; }
.cover__fine { margin: 0 0 1rem; font-size: 0.85rem; color: var(--pearl-dim); }
.cover__motto { margin: 0; font: 700 1.15rem var(--font-head); }

/* ---------- Footer ---------- */
.footer {
  padding: 4rem 0 calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}
.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.footer__cn { margin: 0; letter-spacing: 0.3em; color: var(--pearl-dim); }

.taglines {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.6rem 2rem;
}
.taglines li {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.taglines__lang {
  font: 600 0.75rem var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocean);
}
.footer__sub { font-weight: 600; }
.footer__sub span { display: block; color: var(--pearl-dim); font-weight: 400; }
.disclaimer, .copyright { font-size: 0.8rem; color: var(--pearl-dim); max-width: 80ch; }

/* ---------- How to buy dialog ---------- */
.buy {
  width: min(640px, 100% - 1.5rem);
  max-height: 90svh;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--graphite);
  color: var(--pearl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.buy::backdrop {
  background: rgba(26, 27, 46, 0.7);
  backdrop-filter: blur(6px);
}
.buy[open] { animation: pop 0.25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } }

.buy__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}
.buy__head h2 { font-size: 1.6rem; }
.buy__head h2 span { font-size: 1rem; color: var(--pearl-dim); }
.buy__close {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--pearl-faint);
  color: var(--pearl);
  font-size: 1rem;
  cursor: pointer;
}

.contract {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  padding: 0.9rem 1rem;
  margin: 0.5rem 0 1.2rem;
  border-radius: 14px;
  background: var(--pearl-faint);
  border: 1px solid var(--line);
}
.contract__label { width: 100%; font-size: 0.8rem; color: var(--pearl-dim); }
.contract code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 0.9rem; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: var(--pearl-faint);
}
.tabs button {
  padding: 0.7rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pearl-dim);
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--gradient); color: var(--pearl); }

.buy-steps { padding-left: 1.3rem; margin: 1.2rem 0; }
.buy-steps li { margin-bottom: 0.8rem; color: var(--pearl-dim); }
.buy-steps strong { color: var(--pearl); }
.buy-steps code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--pearl-faint);
}
.buy__warn {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--aurora);
}

/* ---------- Account / profile page ---------- */
[hidden] { display: none !important; }

.account { padding: clamp(2rem, 6vw, 4rem) 0; }
.account__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}
.panel-card {
  padding: clamp(1.2rem, 4vw, 2rem);
  border-radius: 22px;
  background: var(--pearl-faint);
  border: 1px solid var(--line);
}
.panel-card h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.lead--small { font-size: 0.95rem; }

.view { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; }
.field small { font-weight: 400; color: var(--pearl-dim); }
.field input, #delete-form input {
  width: 100%;
  padding: 0.8em 1em;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  color: var(--pearl);
  font: 400 1rem var(--font-body);
}
.field input:focus, #delete-form input:focus { outline: 2px solid var(--ocean); outline-offset: 1px; }
.code-input { font-size: 1.5rem !important; letter-spacing: 0.4em; text-align: center; }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 4.5em; }
.pw-toggle {
  position: absolute;
  right: 0.5em; top: 50%;
  transform: translateY(-50%);
  padding: 0.3em 0.7em;
  border: 0;
  border-radius: 8px;
  background: var(--pearl-faint);
  color: var(--pearl-dim);
  font: 600 0.8rem var(--font-body);
  cursor: pointer;
}

.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; color: var(--pearl-dim); }
.check input { margin-top: 0.25em; width: 1.1em; height: 1.1em; accent-color: var(--aurora); }

.form-msg { margin: 0; min-height: 1.3em; font-size: 0.9rem; color: #ffb4c8; }
.form-msg.ok { color: #9cc2ff; }
.btn--block { width: 100%; }
.switch { margin: 0; font-size: 0.9rem; color: var(--pearl-dim); }
.switch span { margin: 0 0.3em; }
.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ocean);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.linkbtn:disabled { color: var(--pearl-dim); text-decoration: none; cursor: default; }

.me { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.me__avatar { width: 88px; height: 88px; border-radius: 24px; border: 2px solid var(--aurora); object-fit: cover; }
.me__text { flex: 1; min-width: 0; }
.me__text h2 { margin: 0; overflow-wrap: anywhere; }
.me__text .section__label { margin-bottom: 0.2rem; }
.me__email { margin: 0.2rem 0 0; color: var(--pearl-dim); font-size: 0.9rem; overflow-wrap: anywhere; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin: 0; }
.stats div { padding: 0.8rem; border-radius: 14px; background: rgba(0, 0, 0, 0.2); }
.stats dt { font-size: 0.75rem; color: var(--pearl-dim); }
.stats dd { margin: 0; font: 700 1.4rem var(--font-head); }

.edit { display: grid; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.edit h3 { margin: 0; }
.avatar-pick { border: 0; padding: 0; margin: 0; }
.avatar-pick legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; }
#avatar-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.avatar-opt input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-opt img { border-radius: 14px; border: 2px solid transparent; cursor: pointer; transition: transform 0.15s; }
.avatar-opt img:hover { transform: translateY(-2px); }
.avatar-opt input:checked + img { border-color: var(--aurora); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35); }
.avatar-opt input:focus-visible + img { outline: 2px solid var(--ocean); outline-offset: 2px; }
.hint { margin: -0.4rem 0 0; font-size: 0.8rem; color: var(--pearl-dim); }

.danger { padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--pearl-dim); }
.danger summary { cursor: pointer; color: #ffb4c8; font-weight: 600; }
#delete-form { display: grid; gap: 0.6rem; max-width: 320px; }

.lb { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.lb li {
  display: grid;
  grid-template-columns: 2.6rem 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}
.lb li.me-row { outline: 2px solid var(--aurora); }
.lb img { border-radius: 10px; }
.lb__rank { font: 700 1rem var(--font-head); color: var(--pearl-dim); text-align: center; }
.lb__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__score { font-size: 0.8rem; color: var(--pearl-dim); white-space: nowrap; }
.lb__empty { color: var(--pearl-dim); }
.nav__links a[aria-current="page"] { color: var(--pearl); }
.footer--slim { padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom)); }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .nav__links { display: none; }

  .hero { min-height: auto; padding-top: 2rem; }
  .hero__inner, .play { grid-template-columns: 1fr; text-align: center; }
  .hero { padding-top: 1rem; }
  .mascot-card img { width: min(56vw, 250px); height: auto; }
  .mascot-frame { gap: 0.5rem; }
  .mascot-caption { letter-spacing: 0.18em; }
  .hero__buttons .btn { flex: 1 1 40%; } /* two thumb-friendly buttons side by side */
  .eyebrow { font-size: 0.75rem; }

  .lead { margin-inline: auto; }
  .rewards { justify-content: center; }
  .play__preview { max-width: 260px; order: -1; }
  .cover { grid-template-columns: 1fr; grid-template-areas: "intro" "dash" "outro"; text-align: left; }

  .account__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .lb__score { grid-column: 3 / -1; }
}

/* Respect people who turn off animations in their device settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
