/* ============================================================
   Warren Hopz Air Hockey — application styles
   Built on the Warren Hopz Design System tokens (tokens.css).
   Cozy storybook theme: carrot/gold/honey palette, pillowy
   radii, warm shadows, DM Serif Display + Nunito.
   ============================================================ */

/* ---------------- Page backgrounds ---------------- */
.page-lobby {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  background: #e7dcc4;
}
/* Document-height garden layer: unlike a fixed background, it remains present
   in browser full-page screenshots as well as during regular scrolling. */
.page-lobby::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(35,52,36,.18), rgba(35,52,36,.05) 38%, rgba(35,52,36,.22) 100%),
    url('../img/lobby-garden-backdrop.jpg') center / cover no-repeat;
}
.page-lobby > * { position: relative; z-index: 1; }
.page-lobby * { letter-spacing: 0; }
.page-game {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(35,52,36,.18), rgba(35,52,36,.05) 38%, rgba(35,52,36,.22) 100%),
    url('../img/lobby-garden-backdrop.jpg') center / cover no-repeat;
  background-color: #e7dcc4;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }
.hidden { display: none !important; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; height: 470px;
  border: 4px solid #6b4328; border-radius: 18px; margin: 22px auto 0;
  width: min(1320px, calc(100% - 44px));
  background: #314b36;
  box-shadow: 0 9px 0 #3e2719, 0 28px 64px rgba(18, 30, 20, .42), 0 0 0 2px rgba(255,225,177,.58);
}
.hero::after { content: ""; position: absolute; inset: 5px; z-index: 3; border: 1px solid rgba(255,226,174,.42); border-radius: 11px; box-shadow: inset 0 0 30px rgba(37,24,15,.28); pointer-events: none; }
.hero__art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(24,39,27,.9) 0%, rgba(28,43,29,.67) 32%, rgba(28,43,29,.08) 66%),
    linear-gradient(180deg, rgba(25,38,26,.04) 54%, rgba(25,43,29,.56) 100%);
}
.hero__inner { position: relative; z-index: 2; height: 100%; padding: 54px 58px; display: flex; align-items: center; }
.hero__txt { min-width: 0; max-width: 530px; }
.hero .wh-eyebrow { color: var(--gold-300); }
.hero__title { font-size: 64px; margin: 8px 0 0; line-height: 1; font-weight: 600; color: #fffaf0; text-shadow: 0 3px 18px rgba(20,27,17,.35); }
.hero__title .light { color: #f2b27c; }
.hero__tag { max-width: 450px; margin-top: 16px; font-weight: 700; color: rgba(255,250,240,.88); font-size: 17px; line-height: 1.45; }
.hero__edition { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: #fff3d4; font-size: 13px; font-weight: 900; text-transform: uppercase; }
.hero__edition [data-lucide] { width: 16px; height: 16px; color: var(--gold-400); }
.hero__ver { position: absolute; z-index: 4; top: 22px; right: 24px; background: rgba(58,37,23,.82); color: #fff3d4; border: 1px solid rgba(255,216,138,.55); }
.page-lobby.lobby-active .hero { height: 320px; }
.page-lobby.lobby-active .hero__inner { padding: 34px 52px; }
.page-lobby.lobby-active .hero__title { font-size: 50px; }
.page-lobby.lobby-active .hero__tag { margin-top: 10px; font-size: 15px; }
.page-lobby.lobby-active .hero__edition { margin-top: 14px; }

/* ---------------- Layout grid ---------------- */
.grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; margin-top: 24px; align-items: start; }
.play-col > .panel + .panel { margin-top: 22px; }
@media (max-width: 880px) { .grid { grid-template-columns: 1fr; } }

/* ---------------- Panels / cards ---------------- */
.panel, .card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: 8px; box-shadow: var(--shadow-md); padding: 24px;
}
.card + .card { margin-top: 22px; }
.panel__head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.panel__head .ic {
  width: 38px; height: 38px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--carrot-700); flex: none;
}
.panel__head .ic.ic-pink  { background: var(--carrot-100); color: var(--carrot-800); }
.panel__head .ic.ic-green { background: var(--green-100); color: var(--green-700); }
.panel__head .ic.ic-gold  { background: var(--highlight-soft); color: var(--gold-700); }
.panel__head h2 { font-size: 24px; margin: 0; }
.panel__head .sub { font-size: 13px; color: var(--text-muted); font-weight: 700; margin-top: 1px; }

.feature {
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,216,138,.45), transparent 55%), var(--surface-card);
  border: 1.5px solid var(--gold-300); box-shadow: var(--shadow-lg), var(--halo);
  position: relative; overflow: hidden;
}
.feature__peek {
  position: absolute; right: -16px; bottom: -10px; width: 120px; opacity: .9;
  filter: drop-shadow(0 8px 14px rgba(74,53,38,.18)); pointer-events: none;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--control-h-md); padding: 0 22px; border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-weight: 800; font-size: 15px;
  border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
  color: var(--text-strong); background: var(--surface-card);
  transition: transform var(--dur-fast) var(--ease-bounce), box-shadow var(--dur-base) var(--ease-soft), background var(--dur-fast), border-color var(--dur-fast);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn--primary, .btn-primary, .btn-red {
  background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); border-color: transparent;
}
.btn--primary:hover, .btn-primary:hover, .btn-red:hover { background: var(--accent-hover); box-shadow: var(--halo); transform: translateY(-2px); }
.btn--secondary { background: var(--secondary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--secondary:hover { background: var(--secondary-hover); transform: translateY(-2px); }
.btn--outline, .btn-ghost {
  background: var(--surface-card); color: var(--text-strong); border-color: var(--border-strong);
}
.btn--outline:hover, .btn-ghost:hover { border-color: var(--accent); color: var(--carrot-700); transform: translateY(-2px); }
.btn--lg { height: var(--control-h-lg); font-size: 17px; padding: 0 30px; }
.btn--block { width: 100%; }
.btn-sm { height: var(--control-h-sm); font-size: 13px; padding: 0 14px; }
.btn [data-lucide] { width: 18px; height: 18px; }
.page-lobby .btn { border-radius: 8px; }

/* ---------------- Fields / forms ---------------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.field, .form-group input, input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; height: var(--control-h-md); border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md); background: var(--surface-card); padding: 0 16px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px; color: var(--text-body);
  box-sizing: border-box; transition: border-color var(--dur-fast), box-shadow var(--dur-base);
}
.field::placeholder, input::placeholder { color: var(--text-faint); }
.field:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.code-field { text-align: center; letter-spacing: .4em; font-weight: 800; font-family: var(--font-mono); }

.stack { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--text-muted); font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.label { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--honey-500); margin: 0 0 10px; }
.divide { height: 1px; background: var(--border-subtle); margin: 20px 0; }

/* ---------------- Auth card ---------------- */
.auth-wrap { position: relative; z-index: 2; max-width: 500px; margin: -52px auto 0; }
.world-gate { padding: 22px 24px 24px; border-color: rgba(255,216,138,.7); box-shadow: 0 22px 55px rgba(18,30,20,.34); }
.world-gate__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.world-gate__head img { width: 42px; height: 38px; object-fit: contain; }
.world-gate__head .label { margin: 0; color: var(--green-700); }
.world-gate__head h2 { margin: 2px 0 0; font-size: 27px; }
.tabs { display: flex; gap: 6px; background: var(--surface-sunken); padding: 5px; border-radius: 8px; margin-bottom: 20px; }
.tab-btn {
  flex: 1; height: 40px; border: none; background: transparent; border-radius: 6px;
  font-family: var(--font-sans); font-weight: 800; font-size: 14px; color: var(--text-muted); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-soft);
}
.tab-btn.active { background: var(--surface-card); color: var(--carrot-700); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel .btn { margin-top: 4px; }

/* ---------------- Topbar ---------------- */
.topbar-panel {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; margin-top: -30px; padding: 13px 16px;
  background: rgba(255,249,235,.97); border: 3px solid #6f4b2d; border-radius: 8px;
  box-shadow: 0 7px 0 #49311f, 0 16px 36px rgba(18,30,20,.26); backdrop-filter: blur(10px);
}
.topbar-av { width: 42px; height: 42px; border-radius: 8px; background: #f6dfc4; display: grid; place-items: center; color: #9a542c; flex: none; }
.topbar-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar-id .who { font-weight: 800; color: var(--text-strong); }
.topbar-type { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.topbar-place { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 900; color: var(--green-700); }
.topbar-place [data-lucide] { width: 15px; height: 15px; }

/* ---------------- Lobby world ---------------- */
.lobby-world { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(330px, .82fr); gap: 24px; align-items: start; margin-top: 22px; }
.lobby-main-col { min-width: 0; }
.play-courtyard {
  position: relative; overflow: hidden; padding: 28px;
  background: rgba(255,249,235,.97);
  border: 3px solid #6f4b2d; border-radius: 8px; box-shadow: 0 8px 0 #49311f, 0 18px 42px rgba(18,30,20,.2);
}
.play-courtyard::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -75px; top: -75px; opacity: .18; pointer-events: none;
  background: url('../img/brand/bunny-mark-gold.png') center / contain no-repeat;
}
.courtyard-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding-bottom: 24px; }
.courtyard-head h2 { margin: 2px 0 0; font-size: 34px; }
.courtyard-head .label { margin: 0; color: var(--green-700); }
.courtyard-mark { width: 50px; height: 50px; display: grid; place-items: center; flex: none; border-radius: 8px; background: #bb6843; color: #fff8e9; box-shadow: 0 4px 0 #834224; }
.courtyard-free { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 900; color: var(--green-700); }
.courtyard-free [data-lucide] { width: 15px; height: 15px; }
.play-mode { position: relative; z-index: 1; display: grid; grid-template-columns: 126px 150px minmax(0,1fr); gap: 18px; margin: 0 -28px; padding: 25px 28px; border-top: 2px dashed rgba(111,75,45,.34); }
.play-mode--human { background: rgba(248,224,196,.88); }
.play-mode--ai { background: rgba(226,241,214,.88); border-bottom: 2px dashed rgba(85,117,73,.35); }
.mode-art { position: relative; align-self: stretch; min-height: 126px; margin: 0; overflow: hidden; border: 3px solid #fff8e9; border-radius: 7px; box-shadow: 0 8px 18px rgba(74,53,38,.2), 0 0 0 1px #c99b61; }
.mode-art::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 24px rgba(63,39,20,.2); pointer-events: none; }
.mode-art img { width: 100%; height: 100%; min-height: 126px; display: block; object-fit: cover; }
.mode-art--human { transform: rotate(-1deg); }
.mode-art--ai { transform: rotate(1deg); }
.mode-intro { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; align-content: start; }
.mode-number { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: #a6532b; line-height: 1; }
.mode-intro h3 { margin: 0 0 6px; font-size: 24px; }
.mode-intro p { margin: 0; color: var(--text-muted); font-size: 13px; font-weight: 700; line-height: 1.4; }
.human-actions { display: grid; grid-template-columns: 1fr; gap: 13px; }
.host-action, .join-action { min-width: 0; }
.action-label { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 9px; font-size: 11px; font-weight: 900; text-transform: uppercase; color: var(--honey-600); }
.action-label [data-lucide] { width: 15px; height: 15px; }
.join-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.join-row .code-field { min-width: 0; letter-spacing: .22em; }
.ai-controls { min-width: 0; }
.ai-controls .difficulty-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.difficulty-btn { justify-content: center; border-radius: 6px; }

.weekly-reward-panel { position: relative; overflow: hidden; padding: 24px; background: linear-gradient(145deg, #5f3921, #8e572b 56%, #b66b36); border: 3px solid #4a2b19; border-radius: 8px; box-shadow: 0 8px 0 #352014, 0 18px 42px rgba(18,30,20,.25); color: #fff7e7; }
.weekly-reward__glow { position: absolute; width: 230px; height: 230px; right: -92px; top: -112px; border-radius: 50%; background: radial-gradient(circle, rgba(255,216,138,.5), transparent 68%); pointer-events: none; }
.weekly-reward__head { position: relative; display: flex; align-items: center; gap: 12px; }
.weekly-reward__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; color: #70411f; background: #ffd88a; box-shadow: 0 4px 0 #b87a3e; }
.weekly-reward__icon [data-lucide] { width: 24px; height: 24px; }
.weekly-reward-panel .label { margin: 0; color: #ffe3a8; }
.weekly-reward-panel h2 { margin: 1px 0 0; color: #fffaf0; font-size: 30px; }
.weekly-countdown { margin-left: auto; padding: 5px 8px; border: 1px solid rgba(255,226,174,.42); border-radius: 5px; background: rgba(50,28,15,.3); color: #ffe7bd; font-size: 11px; font-weight: 800; white-space: nowrap; }
.weekly-pool-value { position: relative; display: flex; align-items: baseline; gap: 8px; margin: 20px 0 16px; font-family: var(--font-display); }
.weekly-pool-value span { font-size: 48px; line-height: 1; color: #ffd88a; text-shadow: 0 3px 0 rgba(59,32,14,.3); }
.weekly-pool-value small { color: #fff1cf; font-size: 17px; font-weight: 800; }
.weekly-pool-breakdown { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.weekly-pool-breakdown > div { padding: 11px; border: 1px solid rgba(255,231,189,.25); border-radius: 6px; background: rgba(58,33,18,.34); }
.weekly-pool-breakdown span { display: block; color: #f9d8a8; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.weekly-pool-breakdown strong { display: block; margin-top: 3px; color: #fff9ea; font-size: 16px; line-height: 1.2; }
.weekly-trail { position: relative; margin-top: 16px; padding: 15px; border: 1px solid rgba(255,231,189,.32); border-radius: 7px; background: rgba(47,27,16,.36); }
.weekly-trail .wh-section-title { margin-bottom: 9px; }
.weekly-trail .label { color: #ffe3a8; }
.weekly-trail .wh-section-title strong { color: #fff0c6; }
.weekly-progress { height: 10px; overflow: hidden; background: rgba(40,22,13,.56); border: 1px solid rgba(255,231,189,.28); border-radius: 999px; }
.weekly-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f2b27c, #ffd88a); box-shadow: 0 0 12px rgba(255,216,138,.55); }
.weekly-chips { margin-top: 12px; gap: 6px; }
.weekly-chips .chip { flex: 1; justify-content: center; padding: 6px 4px; border-color: rgba(255,231,189,.24); background: rgba(50,28,15,.28); color: #f9e1bd; font-size: 10px; }
.weekly-chips .chip[data-win="true"] { background: #d9edc9; border-color: #b9d6a6; color: #35552b; }
.weekly-trail .muted { margin: 10px 0 0; color: #f8d9ad; font-size: 12px; }
.warren-panel { overflow: hidden; padding: 24px; background: #fffaf0; border: 3px solid #6f4b2d; border-radius: 8px; box-shadow: 0 8px 0 #49311f, 0 18px 42px rgba(18,30,20,.2); }
.warren-panel + .warren-panel, .weekly-reward-panel + .warren-panel { margin-top: 22px; }
.wh-market-panel .wh-tool, .wh-collection-panel .wh-collection { padding-top: 0; margin-top: 0; border-top: 0; }
#wh-collection-section { margin-top: 28px; }
#wh-collection-section .warren-panel { width: 100%; }
#wh-collection-section .nfts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.collection-refresh { margin-left: auto; width: 38px; padding: 0; }
.collection-refresh [data-lucide] { width: 17px; height: 17px; }
.warren-panel__head { position: relative; min-height: 112px; display: flex; align-items: center; margin: -24px -24px 20px; padding: 22px 118px 22px 24px; overflow: hidden; background: #314b36; }
.warren-panel__head::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 52%; opacity: .72; background: url('../img/lobby-world-hero.jpg') 84% center / cover no-repeat; mask-image: linear-gradient(90deg, transparent, #000 34%); pointer-events: none; }
.warren-panel__head > div { position: relative; z-index: 1; }
.warren-panel__head .label { margin: 0; color: #ffd88a; }
.warren-panel__head h2 { margin: 1px 0 3px; color: #fffaf0; font-size: 28px; }
.warren-panel__head p { margin: 0; color: rgba(255,250,240,.72); font-size: 12px; font-weight: 700; }
.wh-balance-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; margin-bottom: 16px; border-radius: 7px; background: #fff0db; }
.wh-balance-card > span { display: inline-flex; align-items: center; gap: 7px; color: var(--honey-700); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.wh-balance-card [data-lucide] { width: 17px; height: 17px; }
.wh-balance-card strong { color: var(--carrot-800); font-family: var(--font-display); font-size: 28px; }
.wh-metrics { margin-bottom: 16px; }
.wh-metrics .stat { padding: 13px; border-radius: 6px; }
.wh-metrics .stat:first-child { background: #fff0db; }
.wh-metrics .stat:last-child { background: #e8f1df; }
.wh-metrics .stat .v { font-size: 25px; }
.wh-metrics .stat .k { display: flex; align-items: center; gap: 6px; }
.wh-metrics .stat .k [data-lucide] { width: 15px; height: 15px; color: var(--honey-600); }
.wh-qualification { position: relative; overflow: hidden; padding: 15px; background: #f2eadb; border-left: 4px solid var(--carrot-400); border-radius: 0 6px 6px 0; }
.wh-qualification::after { content: ""; position: absolute; right: -20px; bottom: -30px; width: 105px; height: 92px; opacity: .08; background: url('../img/brand/bunny-mark-gold.png') center / contain no-repeat; pointer-events: none; }
.wh-qualification > * { position: relative; z-index: 1; }
.wh-section-title { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.wh-section-title .label { margin: 0; }
.wh-section-title strong { font-size: 12px; color: var(--green-700); }
.wh-qualification .chip { flex: 1; justify-content: center; min-width: 0; padding: 7px 5px; border-radius: 6px; font-size: 11px; }
.wh-qualification .muted { margin: 9px 0 0; }
.wh-tool, .wh-collection { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--border-default); }
.wh-tool__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.wh-tool__head > span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 900; text-transform: uppercase; color: var(--honey-700); }
.wh-tool__head [data-lucide] { width: 16px; height: 16px; }
.wh-tool__head small { color: var(--text-muted); font-weight: 800; text-align: right; }
.verify-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 8px; }
.verify-row .btn { padding: 0 12px; }
.warren-panel .nfts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.warren-panel .nft { border-radius: 6px; }
.warren-panel .nft__art { height: 98px; }
.warren-panel .wh-collection > .muted { margin: 10px 0 0; }

.hall-of-fame { position: relative; overflow: hidden; margin-top: 28px; padding: 24px 26px; background: #62445f; border: 3px solid #472f45; border-radius: 8px; box-shadow: 0 7px 0 #352234, 0 18px 42px rgba(18,30,20,.2); }
.hall-of-fame::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 42%; opacity: .25; background: linear-gradient(90deg, transparent, rgba(74,48,32,.08)), url('../img/lobby-human-mode.jpg') center / cover no-repeat; mask-image: linear-gradient(90deg, transparent, #000 35%); pointer-events: none; }
.hall-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 15px; }
.hall-emblem { width: 48px; height: 48px; display: grid; place-items: center; flex: none; border-radius: 8px; background: #f3bd87; color: #6e3f25; box-shadow: 0 4px 0 #3f293d; }
.hall-head .label { margin: 0; color: #ffd88a; }
.hall-head h2 { margin: 2px 0 3px; color: #fff7ea; font-size: 29px; }
.hall-head p { margin: 0; color: rgba(255,247,234,.68); font-size: 13px; font-weight: 700; }
.hall-action { margin-left: auto; min-width: 190px; }
.hall-of-fame #lb-section { position: relative; z-index: 1; overflow-x: auto; padding: 14px; background: #fffaf0; border-radius: 6px; }

/* ---------------- Unified lobby card system ---------------- */
.play-courtyard, .weekly-reward-panel, .warren-panel, .hall-of-fame {
  background: rgba(255,250,240,.98); border: 2px solid #6f4b2d; border-radius: 8px;
  box-shadow: 0 6px 0 #49311f, 0 16px 34px rgba(42,29,18,.18); color: var(--text-body);
}
.weekly-reward-panel { padding: 24px; }
.weekly-reward__glow, .play-courtyard::after, .hall-of-fame::after { display: none; }

/* Every main panel uses the same heading rhythm and icon tile. */
.courtyard-head, .weekly-reward__head, .warren-panel__head, .hall-head {
  position: relative; z-index: 1; min-height: 0; display: flex; align-items: center; gap: 12px;
  margin: 0 0 20px; padding: 0; overflow: visible; background: transparent;
}
.courtyard-head h2, .weekly-reward-panel h2, .warren-panel__head h2, .hall-head h2 {
  margin: 2px 0 0; color: var(--text-strong); font-size: 26px; font-weight: 400; line-height: 1.1;
}
.courtyard-head .label, .weekly-reward-panel .label, .warren-panel__head .label, .hall-head .label {
  margin: 0; color: var(--honey-600); font-size: 11px;
}
.warren-panel__head::after { display: none; }
.courtyard-mark, .weekly-reward__icon, .panel-heading-icon, .hall-emblem {
  width: 46px; height: 46px; display: grid; place-items: center; flex: none; border-radius: 8px;
  background: #f6dfc4; border: 1px solid #d2b585; box-shadow: none; color: #9a542c;
}
.courtyard-mark [data-lucide], .weekly-reward__icon [data-lucide], .panel-heading-icon [data-lucide], .hall-emblem [data-lucide] { width: 21px; height: 21px; }
.weekly-reward__head { margin-bottom: 16px; }
.weekly-countdown { margin-left: auto; padding: 5px 8px; border: 1px solid #d2b585; border-radius: 6px; background: #f7ead5; color: var(--honey-700); }
.courtyard-free { color: var(--green-700); }
.hall-head { flex-wrap: nowrap; }
.hall-head p, .warren-panel__head p { color: var(--text-muted); }
.hall-action { margin-left: auto; }

/* A single surface treatment for secondary data and controls inside cards. */
.weekly-pool-breakdown > div, .weekly-trail, .wh-balance-card,
.mode-art, .hall-of-fame #lb-section, .wh-qualification, .wh-metrics .stat {
  background: #f7ead5; border: 1px solid #d2b585; border-radius: 6px; box-shadow: none;
}
.weekly-pool-value { margin: 12px 0 16px; font-family: var(--font-display); }
.weekly-pool-value span, .wh-balance-card strong { color: var(--carrot-800); text-shadow: none; }
.weekly-pool-value small { color: var(--text-muted); }
.weekly-pool-breakdown { gap: 10px; }
.weekly-pool-breakdown > div { padding: 12px; }
.weekly-pool-breakdown span { color: var(--text-muted); }
.weekly-pool-breakdown strong { color: var(--text-strong); }
.weekly-trail { margin-top: 14px; padding: 14px; }
.weekly-trail .label, .weekly-trail .wh-section-title strong, .weekly-trail .muted { color: var(--text-muted); }
.weekly-progress { border-color: #d2b585; background: #ead9bc; }
.weekly-progress span { background: #b98a3e; box-shadow: none; }
.weekly-chips .chip { background: #fffaf0; border-color: #d2b585; color: var(--text-body); }
.weekly-chips .chip[data-win="true"] { background: #e8f1df; border-color: #a8cd90; color: var(--green-700); }
.wh-balance-card { padding: 14px; margin-bottom: 18px; }
.wh-tool, .wh-collection { margin-top: 18px; padding-top: 18px; border-top-color: var(--border-default); }
.wh-tool__head { margin-bottom: 12px; }
.wh-tool__head > span { color: var(--honey-700); }
.verify-row { gap: 10px; margin-top: 10px; }

/* Match configuration receives one calm surface and consistent breathing room. */
.play-mode { margin: 0; padding: 28px 0 4px; border-top: 0; background: transparent; gap: 22px; }
.play-mode + .play-mode { margin-top: 24px; padding-top: 28px; border-top: 1px solid var(--border-default); }
.play-mode--human, .play-mode--ai { background: transparent; border-bottom: 0; }
.mode-art { border-width: 1px; transform: none; }
.mode-intro { padding-top: 4px; }
.mode-number { color: var(--honey-600); }
.human-actions, .ai-controls { align-self: start; }
.ai-controls { display: flex; flex-direction: column; gap: 16px; padding: 16px; background: #f7ead5; border: 1px solid #d2b585; border-radius: 6px; }
.ai-controls .difficulty-row { margin: 0; gap: 8px; }
.practice-toggle { margin: 0; padding: 2px 0; }
.practice-label { line-height: 1.35; }
.difficulty-btn { min-height: 42px; }


@media (max-width: 980px) {
  .lobby-world { display: flex; flex-direction: column; }
  .lobby-main-col { display: contents; }
  .play-courtyard { order: 1; }
  #wh-section { order: 2; width: 100%; }
  .hall-of-fame { order: 3; width: 100%; }
  .warren-panel .nfts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #wh-collection-section .nfts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .hero { height: 430px; border-radius: 0 0 12px 12px; }
  .hero__art { object-position: 62% center; }
  .hero__scrim { background: linear-gradient(90deg, rgba(24,39,27,.9), rgba(28,43,29,.52) 65%, rgba(28,43,29,.12)); }
  .hero__inner { padding: 42px 28px; }
  .hero__title { font-size: 48px; }
  .hero__tag { max-width: 360px; font-size: 15px; }
  .topbar-place { display: none; }
  .topbar-panel #logout-btn { margin-left: auto; }
  .play-mode { grid-template-columns: 1fr; gap: 16px; }
  .mode-art { min-height: 0; aspect-ratio: 16 / 7; transform: none; }
  .mode-art img { min-height: 0; }
  .human-actions { grid-template-columns: 1fr; }
  .mode-intro { grid-template-columns: 34px minmax(0,1fr); }
  .hall-head { align-items: flex-start; flex-wrap: wrap; }
  .hall-action { width: 100%; margin-left: 63px; }
  .warren-panel .nfts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #wh-collection-section .nfts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .wrap { padding: 0 12px 44px; }
  .hero { height: 460px; }
  .page-lobby.lobby-active .hero { height: 310px; }
  .page-lobby.lobby-active .hero__inner { padding: 30px 20px; align-items: center; }
  .page-lobby.lobby-active .hero__title { font-size: 39px; }
  .page-lobby.lobby-active .hero__tag { max-width: 260px; font-size: 13px; }
  .page-lobby.lobby-active .hero__edition { margin-top: 10px; }
  .hero__art { object-position: 70% center; }
  .hero__scrim { background: linear-gradient(90deg, rgba(24,39,27,.93), rgba(28,43,29,.67) 70%, rgba(28,43,29,.24)); }
  .hero__inner { padding: 56px 20px 42px; align-items: flex-end; }
  .hero__txt { max-width: 330px; }
  .hero__title { font-size: 42px; }
  .hero__tag { font-size: 14px; }
  .hero__edition { margin-top: 16px; }
  .hero__ver { top: 14px; right: 14px; }
  .auth-wrap { margin-top: -34px; }
  .world-gate { padding: 18px; }
  .world-gate__head h2 { font-size: 24px; }
  .topbar-panel { margin-top: -22px; padding: 10px; gap: 9px; }
  .topbar-av { width: 38px; height: 38px; }
  .topbar-panel #logout-btn { width: 38px; padding: 0; font-size: 0; }
  .topbar-panel #logout-btn [data-lucide] { margin: 0; }
  .play-courtyard, .warren-panel, .hall-of-fame { padding: 18px; }
  .warren-panel__head { min-height: 108px; margin: -18px -18px 18px; padding: 18px 102px 18px 18px; }
  .courtyard-head { padding-bottom: 18px; }
  .courtyard-head h2 { font-size: 28px; }
  .courtyard-mark { width: 44px; height: 44px; }
  .courtyard-free { display: none; }
  .play-mode { margin: 0 -18px; padding: 22px 18px; }
  .mode-art { aspect-ratio: 16 / 8; }
  .mode-intro h3 { font-size: 22px; }
  .join-row, .verify-row { grid-template-columns: 1fr; }
  .join-row .btn, .verify-row .btn { width: 100%; }
  .ai-controls .difficulty-row { grid-template-columns: 1fr 1fr; }
  .difficulty-btn { min-height: 42px; }
  .practice-label { align-items: flex-start; flex-wrap: wrap; }
  .practice-label .muted { width: 100%; margin-left: 22px; }
  .warren-panel .nfts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #wh-collection-section .nfts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hall-of-fame { margin-top: 18px; }
  .hall-emblem { width: 44px; height: 44px; }
  .hall-head h2 { font-size: 25px; }
  .hall-action { margin-left: 0; }
}

/* ---------------- Chips / difficulty ---------------- */
.chips, .difficulty-row { display: flex; gap: 8px; flex-wrap: wrap; }
.difficulty-row { margin-bottom: 16px; }
.chip, .difficulty-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-default); background: var(--surface-card); font-family: var(--font-sans);
  font-weight: 800; font-size: 14px; color: var(--text-body); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-soft);
}
.chip:hover, .difficulty-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.difficulty-btn.active, .chip[data-on="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--carrot-700); }
.chip[data-win="true"] { background: var(--success-soft); border-color: var(--green-400); color: var(--green-700); }
.chip .tick { width: 16px; height: 16px; }

/* practice toggle (switch) */
.practice-toggle { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; cursor: pointer; user-select: none; }
.practice-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.practice-toggle .switch { position: relative; flex: none; width: 42px; height: 24px; border-radius: var(--radius-pill); background: var(--border-default); transition: background var(--dur-fast) var(--ease-soft); }
.practice-toggle .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-card); box-shadow: var(--shadow-sm); transition: transform var(--dur-fast) var(--ease-bounce); }
.practice-toggle input:checked + .switch { background: var(--green-500); }
.practice-toggle input:checked + .switch::after { transform: translateX(18px); }
.practice-toggle input:focus-visible + .switch { box-shadow: var(--ring-gold); }
.practice-label { font-size: 13.5px; font-weight: 800; color: var(--text-body); display: inline-flex; align-items: center; gap: 6px; }
.practice-label [data-lucide] { width: 16px; height: 16px; color: var(--green-600); }
.practice-label .muted { font-weight: 600; }

/* ---------------- Pills / badges ---------------- */
.pill-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 800; }
.pill-badge.ok { background: var(--success-soft); color: var(--green-700); }

/* ---------------- Stats / coin / wallet ---------------- */
.stats { display: flex; gap: 14px; margin-bottom: 20px; }
.stat { flex: 1; background: var(--surface-sunken); border-radius: var(--radius-lg); padding: 14px 16px; }
.stat .k { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.stat .v { font-family: var(--font-display); font-size: 30px; color: var(--text-strong); line-height: 1; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.coin { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-300), var(--gold-600)); color: var(--honey-800);
  font-weight: 900; font-size: .62em; box-shadow: inset 0 0 0 1.5px rgba(120,78,38,.35); }
.walletline { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-body); }
.walletline .addr { font-family: var(--font-mono); font-weight: 800; color: var(--text-strong); background: var(--surface-sunken); padding: 4px 10px; border-radius: var(--radius-sm); font-size: 14px; }

/* ---------------- NFT cards ---------------- */
.nfts, .wh-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 8px 0; }
@media (max-width: 1040px) { .nfts, .wh-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .nfts, .wh-cards { grid-template-columns: repeat(2, 1fr); } }
.nft, .wh-card-nft {
  background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); cursor: default;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base);
  display: flex; flex-direction: column;
}
.nft:hover, .wh-card-nft:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.nft__art, .wh-art {
  height: 112px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(160deg, var(--gold-200), var(--carrot-200)); background-size: cover; background-position: center;
}
.wh-art span, .nft__num { font-family: var(--font-display); color: #fff; text-shadow: 0 1px 6px rgba(42,29,18,.5); }
.nft__num { position: absolute; top: 8px; left: 10px; z-index: 2; font-size: 18px; }
.wh-art span { font-size: 28px; }
.wh-art.has-img span { display: none; }
.nft__body, .wh-card-body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.nft__name, .wh-card-name { font-weight: 800; font-size: 13.5px; color: var(--text-strong); }
.nft__val { font-size: 12px; color: var(--text-muted); font-weight: 700; margin: 3px 0 9px; display: flex; align-items: center; gap: 5px; }
.nft__btn, .wh-card-body .btn {
  width: 100%; height: 34px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong);
  background: var(--surface-card); color: var(--text-body); font-family: var(--font-sans); font-weight: 800; font-size: 12.5px;
  cursor: pointer; transition: all var(--dur-fast);
}
.nft__btn:hover { border-color: var(--accent); color: var(--carrot-700); }
.nft[data-primary="true"], .wh-card-nft.is-primary { border: 2px solid var(--gold-500); box-shadow: var(--shadow-md), var(--glow-gold); }
.nft[data-primary="true"] .nft__btn { background: var(--gold-400); border-color: var(--gold-500); color: var(--honey-800); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------------- Alerts ---------------- */
.alert { border-radius: var(--radius-md); padding: 11px 14px; font-size: 13.5px; font-weight: 700; margin-top: 12px; }
.alert-error   { background: var(--danger-soft);  color: var(--berry-600); border: 1px solid var(--berry-400); }
.alert-info    { background: var(--info-soft);     color: var(--sky-500);   border: 1px solid var(--sky-300); }
.alert-success { background: var(--success-soft);  color: var(--green-700); border: 1px solid var(--green-400); }

/* ---------------- Match code / spinner ---------------- */
.match-code { font-family: var(--font-mono); font-weight: 900; font-size: 38px; letter-spacing: .2em; text-align: center; color: var(--carrot-700); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--border-default); border-top-color: var(--accent); border-radius: 50%; animation: wh-spin .8s linear infinite; vertical-align: middle; }
@keyframes wh-spin { to { transform: rotate(360deg); } }

/* ---------------- Leaderboard ---------------- */
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 8px 10px; border-bottom: 2px solid var(--border-subtle); }
.lb-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-subtle); color: var(--text-body); font-weight: 700; }
.lb-table .lb-rank { font-family: var(--font-display); color: var(--carrot-600); }
.lb-table .lb-name { color: var(--text-strong); }
.lb-table .lb-pts { font-weight: 900; }

/* ---------------- Footer ---------------- */
.footer { text-align: center; color: var(--text-faint); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 36px; }
.app-version { text-align: center; color: var(--text-faint); font-size: 11px; font-weight: 700; padding: 16px 0; }

/* ---------------- Lobby palette refinements ---------------- */
.page-lobby .btn--primary,
.page-lobby .btn-primary,
.page-lobby .btn-red {
  background: #bd6947; color: #fffaf2; border-color: #9b4f2d;
  box-shadow: 0 5px 0 #79391f, 0 8px 16px rgba(91,47,26,.24);
}
.page-lobby .btn--primary:hover,
.page-lobby .btn-primary:hover,
.page-lobby .btn-red:hover { background: #a95635; box-shadow: 0 5px 0 #653019, 0 10px 18px rgba(91,47,26,.28); }
.page-lobby #create-ai-btn { background: #568b5d; border-color: #3f7248; box-shadow: 0 5px 0 #315d3a, 0 8px 16px rgba(48,94,58,.2); }
.page-lobby #create-ai-btn:hover { background: #477a50; box-shadow: 0 5px 0 #294f32, 0 10px 18px rgba(48,94,58,.22); }
.page-lobby #wh-pay { background: #b98a3e; border-color: #956c2e; box-shadow: 0 5px 0 #795623; }
.page-lobby #wh-pay:hover { background: #a87932; box-shadow: 0 5px 0 #67481d; }
.page-lobby .difficulty-btn.active { background: #ffe2a0; border-color: #c58d3c; color: #6d4a20; }
.page-lobby .tab-btn.active { color: #9b4f2d; }
.page-lobby .footer { color: rgba(255,247,234,.85); text-shadow: 0 1px 8px rgba(24,35,25,.6); }

/* ---------------- Fixed toast (warrenhopz) ---------------- */
#wh-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  max-width: 90vw; padding: 12px 18px; border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: .9rem; font-weight: 800; color: #fff;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; z-index: var(--z-toast);
  transition: opacity var(--dur-base) var(--ease-soft), transform var(--dur-base) var(--ease-out);
}
#wh-toast.show { opacity: 1; transform: translate(-50%, 0); }
.wh-toast-info { background: var(--honey-600); }
.wh-toast-success { background: var(--green-600); }
.wh-toast-error { background: var(--danger); }

/* ============================================================
   GAME SCREEN
   ============================================================ */
#game-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
#hud {
  display: grid; grid-template-columns: minmax(250px, 1fr) auto minmax(170px, 1fr);
  align-items: center; gap: 18px; min-height: 76px; padding: 10px 18px;
  background: rgba(255,250,240,.96); backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(111,75,45,.48); box-shadow: 0 7px 24px rgba(42,29,18,.22); z-index: 5;
}
.hud-score { display: flex; gap: 8px; }
.score-chip {
  display: grid; grid-template-columns: minmax(0, auto) minmax(3ch, max-content); align-items: center; gap: 10px;
  min-width: 158px; height: 52px; padding: 0 12px 0 14px; border-radius: 12px;
  font-family: var(--font-display); font-size: 28px; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), var(--shadow-xs);
}
.score-name { font-family: var(--font-sans); font-size: 13px; line-height: 1.1; font-weight: 900; text-transform: uppercase; color: currentColor; }
.score-chip b { min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; line-height: 1; }
.score-chip.chip-red  { background: #fff7e9; color: #bf4c1d; border: 1.5px solid #ed935d; }
.score-chip.chip-blue { background: #f6f8f8; color: #285f91; border: 1.5px solid #a3bbcf; }
.hud-status { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 245px; }
.hud-mark { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(87,53,28,.2)); }
.hud-sprig { width: 19px; height: 19px; color: #d4a454; transform: rotate(-35deg); }
.hud-sprig--end { transform: rotate(35deg) scaleX(-1); }
#turn-indicator { min-width: 98px; text-align: center; text-transform: uppercase; font-weight: 900; color: var(--honey-800); font-size: 14px; }
#turn-indicator.my-turn { color: #8c4d27; }
#hud-back-btn { justify-self: end; min-height: 46px; padding-inline: 18px; border: 1.5px solid #d2b585; border-radius: 12px; background: rgba(255,253,248,.88); box-shadow: var(--shadow-xs); }

#canvas-wrap {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  padding: 24px 18px 20px; min-height: 0; overflow: hidden; background: transparent;
}
#board-frame {
  position: relative; max-height: 100%; overflow: hidden; border: 0; border-radius: 28px;
  background: transparent;
  box-shadow: 0 24px 54px rgba(20,22,10,.46), 0 0 0 2px rgba(255,229,167,.5), 0 0 32px rgba(255,204,102,.18);
}
#game-canvas { display: block; border-radius: 28px; touch-action: none; }
#game-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 24px; background: var(--overlay-scrim); backdrop-filter: blur(3px); z-index: 6;
}
.game-result-card {
  width: min(390px, 100%); padding: 24px; border: 1.5px solid rgba(229,190,128,.9); border-radius: 16px;
  background: rgba(255,250,240,.97); box-shadow: 0 22px 54px rgba(27,18,11,.38), inset 0 1px 0 #fff;
}
.game-result-mark { width: 58px; height: 58px; object-fit: contain; margin: -4px auto 4px; filter: drop-shadow(0 4px 7px rgba(87,53,28,.2)); }
#game-overlay h2 { color: var(--text-strong); font-size: 34px; margin: 0; }
#game-overlay p { color: var(--text-muted); font-weight: 700; margin: 8px 0 0; }
#game-overlay #overlay-note { min-height: 22px; color: var(--honey-700); font-size: 13px; }
#game-overlay #overlay-note.is-error { color: var(--danger); }
.game-result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
#rematch-btn.hidden + #overlay-btn { grid-column: 1 / -1; }
#abandon-btn {
  position: absolute; bottom: 18px; right: 18px; height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1.5px solid #d2b585; background: rgba(255,253,248,.94);
  color: var(--honey-800); font-family: var(--font-sans); font-weight: 900; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 5px 14px rgba(42,29,18,.2);
}
#abandon-btn:hover { border-color: var(--danger); color: var(--berry-600); }
#abandon-btn [data-lucide] { width: 15px; height: 15px; }
.game-version { position: absolute; bottom: 6px; left: 10px; font-size: 11px; font-weight: 700; color: var(--text-faint); pointer-events: none; }

@media (max-width: 620px) {
  #hud { grid-template-columns: 1fr auto; gap: 7px; min-height: 0; padding: 7px 9px; }
  .hud-score { gap: 6px; }
  .score-chip { min-width: 0; height: 40px; grid-template-columns: minmax(0, auto) minmax(3ch, max-content); gap: 5px; padding: 0 7px; border-radius: 9px; font-size: 21px; }
  .score-name { font-size: 8px; }
  .hud-status { grid-row: 2; grid-column: 1 / -1; min-width: 0; min-height: 32px; }
  .hud-mark { width: 31px; height: 31px; }
  .hud-sprig { width: 14px; height: 14px; }
  #turn-indicator { min-width: 84px; font-size: 12px; }
  #hud-back-btn { grid-column: 2; grid-row: 1; }
  #canvas-wrap { padding: 12px 10px 62px; }
  #board-frame, #game-canvas { border-radius: 18px; }
  #abandon-btn { bottom: 8px; right: 8px; }
  .game-result-card { padding: 20px 16px; }
  .game-result-actions { grid-template-columns: 1fr; }
}
