:root {
  color-scheme: dark;
  --ink: #080808;
  --panel: #121212;
  --panel-2: #191816;
  --line: #38342d;
  --line-bright: #6d5c42;
  --cream: #f3ead8;
  --muted: #a9a297;
  --gold: #f5b52e;
  --gold-soft: #7b5518;
  --ember: #e94f20;
  --red: #c72e22;
  --green: #72c274;
  --nav-height: 70px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--cream);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #060606;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(233, 79, 32, 0.18), transparent 42%),
    radial-gradient(circle at 12% 80%, rgba(245, 181, 46, 0.07), transparent 30%),
    linear-gradient(160deg, #0b0a09 0%, #050505 60%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.ambient i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px 4px rgba(233, 79, 32, 0.45);
  animation: spark 7s linear infinite;
}

.ambient i:nth-child(1) { left: 15%; top: 80%; animation-delay: -2s; }
.ambient i:nth-child(2) { left: 73%; top: 72%; animation-delay: -5s; }
.ambient i:nth-child(3) { left: 90%; top: 45%; animation-delay: -3.5s; }
.ambient i:nth-child(4) { left: 35%; top: 92%; animation-delay: -1s; }

@keyframes spark {
  0% { transform: translate(0, 20vh) scale(0); opacity: 0; }
  15% { opacity: 1; transform: translate(8px, 0) scale(1); }
  100% { transform: translate(-24px, -95vh) scale(0); opacity: 0; }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  background: rgba(8, 8, 8, 0.88);
  border-inline: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: calc(var(--safe-bottom) + 18px);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(66px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 18px 0;
  border-bottom: 1px solid rgba(245, 181, 46, 0.18);
  background: rgba(9, 9, 9, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand small {
  color: var(--ember);
  font-size: inherit;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  filter: drop-shadow(0 0 12px rgba(233, 79, 32, 0.28));
}

.splash-screen {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(167, 42, 25, 0.46), transparent 29%),
    radial-gradient(circle at 50% 115%, rgba(245, 181, 46, 0.13), transparent 40%),
    #070707;
  text-align: center;
  transition: opacity 320ms ease, transform 320ms ease;
}

.splash-screen::before,
.splash-screen::after {
  content: "";
  position: absolute;
  inset: 8%;
  pointer-events: none;
  border: 1px solid rgba(245, 181, 46, 0.08);
  clip-path: polygon(12% 0, 88% 0, 100% 15%, 100% 85%, 88% 100%, 12% 100%, 0 85%, 0 15%);
}

.splash-screen::after {
  inset: 10%;
  border-color: rgba(199, 46, 34, 0.1);
}

.splash-screen.is-exiting {
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
}

.splash-mark {
  position: relative;
  display: grid;
  width: min(92vw, 440px);
  height: 250px;
  place-items: center;
  margin-bottom: 5px;
}

.splash-mark img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
  animation: splash-arrive 650ms cubic-bezier(.2, .85, .25, 1) both;
}

.splash-ring {
  position: absolute;
  top: 20px;
  right: 86px;
  bottom: 20px;
  left: 86px;
  border: 1px solid rgba(245, 181, 46, 0.36);
  border-radius: 50%;
  box-shadow: 0 0 45px rgba(233, 79, 32, 0.17), inset 0 0 32px rgba(245, 181, 46, 0.05);
  animation: splash-ring 2.4s ease-in-out infinite;
}

.splash-screen h1 {
  position: relative;
  margin: 6px 0 12px;
  color: #fff0d8;
  font-size: clamp(48px, 14vw, 74px);
  line-height: 0.82;
  letter-spacing: -0.065em;
  text-transform: uppercase;
  text-shadow: 0 5px 0 #4e160d, 0 0 42px rgba(233, 79, 32, 0.23);
}

.splash-screen h1 span {
  display: block;
  color: var(--gold);
  font-size: 0.43em;
  letter-spacing: 0.19em;
  line-height: 1.35;
  text-shadow: none;
}

.splash-copy {
  margin: 0;
  color: #a89d90;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.splash-dots {
  display: flex;
  gap: 6px;
  margin-top: 33px;
}

.splash-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6e4a1a;
  animation: splash-dot 900ms ease-in-out infinite;
}

.splash-dots i:nth-child(2) { animation-delay: 150ms; }
.splash-dots i:nth-child(3) { animation-delay: 300ms; }

@keyframes splash-arrive {
  from { opacity: 0; transform: translateY(16px) scale(0.86) rotate(-4deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes splash-ring {
  0%, 100% { opacity: 0.45; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes splash-dot {
  0%, 100% { opacity: 0.28; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); background: var(--gold); }
}

.power-meter {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 66px;
  height: 38px;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #5e481d;
  border-radius: 4px;
  background: linear-gradient(#201b13, #111);
  box-shadow: inset 0 0 12px rgba(245, 181, 46, 0.08);
  font-size: 13px;
}

.bolt {
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(245, 181, 46, 0.7);
}

.view {
  padding: 22px 16px 18px;
}

.arena-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.section-heading {
  display: block;
  margin: 5px 2px 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

.arena-heading h1,
.section-heading h1 {
  margin: 0;
  font-size: clamp(25px, 7vw, 34px);
  line-height: 1;
  letter-spacing: -0.025em;
}

.section-heading > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.partner-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.partner-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #777;
  box-shadow: 0 0 0 3px rgba(119, 119, 119, 0.12);
}

.partner-status.online {
  color: #b6dcb7;
}

.partner-status.online span {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(114, 194, 116, 0.14), 0 0 12px rgba(114, 194, 116, 0.5);
}

.filter-strip {
  display: flex;
  gap: 8px;
  margin: 0 -2px 15px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar { display: none; }

.filter {
  flex: 1 0 auto;
  min-width: 68px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #302d28;
  border-radius: 3px;
  background: #121212;
  color: #999187;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter.active {
  border-color: #8f6420;
  background: linear-gradient(180deg, #382714, #19140d);
  color: #ffd574;
  box-shadow: inset 0 -2px 0 var(--gold), 0 0 16px rgba(245, 181, 46, 0.09);
}

.deck {
  min-height: 465px;
  perspective: 1100px;
}

.name-card {
  position: relative;
  min-height: 465px;
  overflow: hidden;
  touch-action: pan-y;
  border: 1px solid #524836;
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 30%),
    radial-gradient(circle at 50% 13%, rgba(199, 46, 34, 0.35), transparent 39%),
    linear-gradient(165deg, #221815 0%, #131211 55%, #0c0c0c 100%);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.54),
    inset 0 0 0 4px #101010,
    inset 0 0 0 5px rgba(245, 181, 46, 0.12);
  user-select: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.name-card::before,
.name-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.name-card::before {
  inset: 12px;
  border: 1px solid rgba(245, 181, 46, 0.16);
  clip-path: polygon(0 0, 38% 0, 43% 6px, 57% 6px, 62% 0, 100% 0, 100% 100%, 0 100%);
}

.name-card::after {
  top: -60%;
  left: 45%;
  width: 3px;
  height: 180%;
  opacity: 0.15;
  transform: rotate(28deg);
  background: linear-gradient(transparent, var(--gold), transparent);
  box-shadow: 0 0 30px 10px rgba(245, 181, 46, 0.2);
}

.name-card > * {
  position: relative;
  z-index: 1;
}

.name-card.is-exiting-left { transform: translateX(-130%) rotate(-14deg); opacity: 0; }
.name-card.is-exiting-right { transform: translateX(130%) rotate(14deg); opacity: 0; }
.name-card.is-entering { transform: translateY(10px) scale(0.985); opacity: 0; }

.card-topline {
  display: flex;
  justify-content: space-between;
  padding: 23px 24px 0;
}

.gender-badge,
.era-badge {
  padding: 6px 10px;
  border: 1px solid #6e2b20;
  border-radius: 3px;
  background: rgba(89, 23, 16, 0.68);
  color: #ffbc9d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gender-badge[data-gender="Boy"] {
  border-color: #3d536f;
  background: rgba(24, 48, 78, 0.7);
  color: #a9cffc;
}

.gender-badge[data-gender="Unisex"] {
  border-color: #5a4c21;
  background: rgba(76, 57, 18, 0.7);
  color: #f5cd6d;
}

.era-badge {
  border-color: #38342d;
  background: rgba(0, 0, 0, 0.2);
  color: #a8a096;
}

.name-lockup {
  padding: 38px 24px 30px;
  text-align: center;
}

.card-kicker {
  margin-bottom: 5px;
  color: #d36a4a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.23em;
}

.name-lockup h2 {
  margin: 0;
  color: #fff7e8;
  font-size: clamp(58px, 18vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-shadow: 0 3px 0 #3c130c, 0 0 36px rgba(233, 79, 32, 0.23);
}

.pronunciation {
  margin-top: 15px;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: #d6c9b9;
  font-size: 13px;
  letter-spacing: 0.05em;
  touch-action: manipulation;
}

.pronunciation span:first-child {
  margin-right: 5px;
  color: var(--gold);
}

.pronunciation.is-speaking {
  color: var(--gold);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 22px;
  border: 1px solid #312d27;
  background: rgba(4, 4, 4, 0.45);
}

.stat {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
  min-height: 58px;
  padding: 11px 12px;
  border-right: 1px solid #312d27;
  border-bottom: 1px solid #312d27;
}

.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n + 2) { border-bottom: 0; }
.stat.full-stat { grid-column: 1 / -1; border-right: 0; }
.stat.full-stat + .stat,
.stat.full-stat + .stat + .stat { border-bottom: 0; }

.stat-icon {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 16px;
}

.stat div {
  min-width: 0;
}

.stat small {
  display: block;
  margin-bottom: 4px;
  color: #847d73;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.stat b {
  display: block;
  overflow: hidden;
  color: #ded4c4;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.32;
  text-overflow: ellipsis;
}

.swipe-hint {
  display: flex;
  justify-content: space-between;
  margin: 14px 23px 0;
  color: #645e56;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.swipe-hint span:first-child { color: #a35445; }
.swipe-hint span:last-child { color: #6fa071; }

.swipe-stamp {
  position: absolute;
  z-index: 4;
  top: 90px;
  padding: 8px 12px;
  border: 4px solid currentColor;
  border-radius: 5px;
  opacity: 0;
  font-size: 25px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  transition: opacity 60ms linear;
}

.swipe-no { right: 22px; color: #ef6753; transform: rotate(11deg); }
.swipe-yes { left: 22px; color: #7bdc7e; transform: rotate(-11deg); }

.arena-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 8vw, 38px);
  padding: 18px 0 2px;
}

.decision-button {
  display: grid;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  place-content: center;
  border: 1px solid #47423c;
  clip-path: polygon(22% 0, 78% 0, 100% 22%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 22%);
  background: linear-gradient(145deg, #292724, #0e0e0e 72%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.decision-button:active { transform: scale(0.94); }

.decision-icon {
  font-size: 28px;
  font-weight: 400;
  line-height: 0.85;
}

.decision-button small {
  margin-top: 6px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.pass-button { color: #d77a6b; }
.yes-button { color: #88cd8b; }
.power-button {
  width: 76px;
  height: 76px;
  border-color: #c98b1d;
  color: var(--gold);
  background: radial-gradient(circle, #3b2a12, #14110d 68%);
  box-shadow: 0 0 25px rgba(245, 181, 46, 0.15), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.power-button .decision-icon { font-size: 38px; text-shadow: 0 0 12px rgba(245, 181, 46, 0.65); }

.empty-deck,
.no-matches {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px 28px;
  border: 1px solid #342f28;
  border-radius: 6px;
  background: rgba(20, 19, 17, 0.75);
  text-align: center;
}

.empty-emblem {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid #795718;
  border-radius: 50%;
  color: var(--gold);
  font-size: 30px;
  box-shadow: inset 0 0 20px rgba(245, 181, 46, 0.08);
}

.empty-deck h2,
.no-matches h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.empty-deck > p:not(.eyebrow),
.no-matches p {
  max-width: 310px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid #b07918;
  border-radius: 3px;
  background: linear-gradient(180deg, #f5ba3e, #b8730b);
  color: #1b1205;
  box-shadow: inset 0 1px 0 #ffdc8a, 0 10px 28px rgba(209, 126, 5, 0.18);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secondary-button {
  border-color: #5a5145;
  background: #1b1916;
  color: var(--cream);
  box-shadow: none;
}

.text-button {
  min-height: 42px;
  padding: 0;
  border: 0;
  background: none;
  color: #b9aea0;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button.danger {
  display: block;
  margin: 22px auto 0;
  color: #c87a6c;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: max(0px, calc((100vw - 560px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 560px) / 2));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid #353028;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(18px);
}

.nav-button {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  place-content: center;
  align-items: center;
  gap: 7px;
  border: 0;
  border-right: 1px solid #292621;
  background: transparent;
  color: #79736a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-button:last-child { border-right: 0; }
.nav-button span { font-size: 15px; }

.nav-button.active {
  color: var(--gold);
  background: linear-gradient(180deg, rgba(245, 181, 46, 0.07), transparent);
}

.nav-button.active::before {
  content: "";
  position: absolute;
  top: 0;
  right: 20%;
  left: 20%;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.nav-button i {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 9px;
  background: #3e2c10;
  color: #f4c35c;
  font-size: 9px;
  font-style: normal;
}

.matches-view,
.room-view {
  padding-top: 28px;
}

.match-spotlight {
  position: relative;
  min-height: 165px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #73511c;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 110%, rgba(245, 181, 46, 0.35), transparent 45%),
    linear-gradient(145deg, #32130e, #16110c 55%, #0d0d0d);
  box-shadow: inset 0 0 0 4px #111, 0 18px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.match-spotlight::before {
  content: "CHAMPION";
  display: inline-block;
  margin-top: 20px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.match-spotlight h2 {
  margin: 4px 0 7px;
  color: #fff3dc;
  font-size: 48px;
  letter-spacing: -0.04em;
}

.match-spotlight p {
  color: #c4b7a3;
  font-size: 11px;
}

.power-badges {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.power-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid #795718;
  border-radius: 3px;
  background: #2e210d;
  color: #ffd66d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.match-list {
  display: grid;
  gap: 9px;
}

.match-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  min-height: 72px;
  align-items: center;
  border: 1px solid #332f29;
  border-radius: 4px;
  background: linear-gradient(110deg, #191714, #0f0f0f);
}

.match-rank {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-right: 1px solid #3a342c;
  color: #776e62;
  font-family: Georgia, serif;
  font-size: 20px;
}

.match-name {
  min-width: 0;
  padding: 0 14px;
}

.match-name b {
  display: block;
  margin-bottom: 3px;
  color: #eee4d4;
  font-family: Georgia, serif;
  font-size: 22px;
}

.match-name small {
  display: block;
  overflow: hidden;
  color: #827b72;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.match-power {
  padding-right: 14px;
  color: var(--gold);
  font-size: 24px;
  text-shadow: 0 0 12px rgba(245, 181, 46, 0.52);
}

.room-card {
  display: grid;
  justify-items: center;
  padding: 26px 22px 22px;
  border: 1px solid #5b4829;
  border-radius: 6px;
  background: radial-gradient(circle at 50% 0, rgba(199, 46, 34, 0.2), transparent 60%), #151411;
  box-shadow: inset 0 0 0 4px #0d0d0d;
}

.room-card small {
  color: #8b8275;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.room-card strong {
  margin: 7px 0 20px;
  color: #fff0d1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 34px;
  letter-spacing: 0.17em;
}

.room-card .primary-button { width: 100%; }

.room-detail {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.settings-list {
  margin-top: 14px;
  border: 1px solid #302d28;
  border-radius: 5px;
  background: #111;
}

.settings-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 16px;
  border-bottom: 1px solid #292621;
  font-size: 12px;
}

.settings-list div:last-child { border-bottom: 0; }
.settings-list span { color: #898177; }
.settings-list b { max-width: 50%; text-align: right; }

.onboarding {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: calc(32px + env(safe-area-inset-top, 0px)) 18px calc(32px + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(rgba(6, 6, 6, 0.08), rgba(6, 6, 6, 0.88)),
    radial-gradient(circle at 50% 10%, rgba(179, 43, 28, 0.42), transparent 38%);
}

.onboarding-panel {
  width: min(100%, 420px);
  text-align: center;
}

.onboarding-brand {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin: 0 auto 38px;
  color: #f3ead8;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.onboarding-brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.onboarding-brand small {
  color: var(--ember);
  font-size: inherit;
}

.onboarding h1 {
  margin: 8px 0 16px;
  color: #fff2da;
  font-size: clamp(39px, 11vw, 57px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  text-shadow: 0 3px 0 #4c160e, 0 0 40px rgba(233, 79, 32, 0.18);
}

.onboarding-copy {
  max-width: 350px;
  margin: 0 auto 24px;
  color: #aaa094;
  font-size: 14px;
  line-height: 1.55;
}

.wizard-panel {
  animation: wizard-enter 220ms ease both;
}

.wizard-step {
  margin: 0;
  color: var(--gold);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.wizard-back {
  display: block;
  min-height: 35px;
  margin: -12px 0 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #9c9287;
  font-size: 12px;
}

.wizard-progress {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 21px;
}

.wizard-progress i {
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: #3a352f;
}

.wizard-progress i.active {
  background: linear-gradient(90deg, #d34120, var(--gold));
  box-shadow: 0 0 10px rgba(245, 181, 46, 0.24);
}

.path-choices {
  display: grid;
  gap: 11px;
}

.path-choice {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  min-height: 82px;
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  border: 1px solid #3d3831;
  border-radius: 6px;
  background: linear-gradient(110deg, #191714, #10100f);
  text-align: left;
}

.path-choice.path-primary {
  border-color: #74501e;
  background:
    radial-gradient(circle at 0 50%, rgba(199, 46, 34, 0.22), transparent 47%),
    linear-gradient(110deg, #241610, #10100f);
}

.path-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #604720;
  border-radius: 50%;
  background: #1b150d;
  color: var(--gold);
  font-size: 22px;
}

.path-choice b,
.path-choice small {
  display: block;
}

.path-choice b {
  margin-bottom: 5px;
  color: #f2e7d7;
  font-family: Georgia, serif;
  font-size: 18px;
}

.path-choice small {
  color: #827b72;
  font-size: 10px;
}

.path-arrow {
  color: #746a5e;
  font-family: Georgia, serif;
  font-size: 28px;
}

.setup-card {
  display: grid;
  gap: 11px;
  padding: 20px;
  border: 1px solid #494035;
  border-radius: 5px;
  background: rgba(17, 16, 14, 0.88);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.setup-card label {
  margin-top: 3px;
  color: #d3c7b8;
  font-size: 11px;
  font-weight: 800;
}

.setup-card input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #484139;
  border-radius: 3px;
  background: #090909;
  color: #fff3df;
  font-size: 16px;
}

.setup-card input::placeholder { color: #5f5952; }
.setup-card .primary-button { width: 100%; margin-top: 4px; }
.setup-card .text-button { justify-self: center; }

.code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.invite-card {
  display: grid;
  justify-items: center;
  padding: 23px 20px 20px;
  border: 1px solid #65502d;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 0, rgba(199, 46, 34, 0.19), transparent 61%),
    rgba(17, 16, 14, 0.92);
  box-shadow: inset 0 0 0 3px #0c0c0c, 0 20px 50px rgba(0, 0, 0, 0.32);
}

.invite-card > small {
  color: #918779;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.invite-card strong {
  margin: 8px 0 19px;
  color: #fff0d1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(28px, 9vw, 36px);
  letter-spacing: 0.16em;
}

.invite-card button {
  width: 100%;
}

.invite-card .secondary-button {
  margin-top: 9px;
}

.share-button span {
  margin-right: 8px;
  font-size: 18px;
}

.pairing-status {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 17px auto 4px;
  color: #8e877e;
  font-size: 11px;
}

.pairing-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #777;
  box-shadow: 0 0 0 4px rgba(119, 119, 119, 0.11);
  animation: pairing-pulse 1.6s ease-in-out infinite;
}

.pairing-status.paired {
  color: #b6dcb7;
}

.pairing-status.paired > span {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(114, 194, 116, 0.13), 0 0 13px rgba(114, 194, 116, 0.46);
  animation: none;
}

.enter-arena {
  margin-top: 5px;
}

.privacy-note {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 15px 10px 0;
  color: #6f6962;
  font-size: 10px;
  line-height: 1.45;
}

@keyframes wizard-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pairing-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.game-dialog {
  width: min(calc(100% - 30px), 430px);
  margin: auto;
  padding: 31px 24px 24px;
  overflow: visible;
  border: 1px solid #896024;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 0, rgba(199, 46, 34, 0.34), transparent 44%),
    linear-gradient(160deg, #1c1713, #0b0b0b 70%);
  color: var(--cream);
  box-shadow: inset 0 0 0 4px #080808, 0 30px 90px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.game-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: #877f74;
  font-size: 24px;
}

.result-icon {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  margin: 0 auto 16px;
  border: 1px solid #b77a20;
  border-radius: 50%;
  background: #241707;
  color: var(--gold);
  font-size: 32px;
  box-shadow: 0 0 28px rgba(245, 181, 46, 0.2);
}

.result-icon.power { font-size: 43px; }

.game-dialog h2 {
  margin: 0 0 8px;
  color: #fff4df;
  font-size: 43px;
  line-height: 1;
}

.game-dialog > p:not(.eyebrow) {
  margin: 0 auto 20px;
  color: #afa69a;
  font-size: 13px;
  line-height: 1.5;
}

.versus-votes {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
}

.versus-votes div {
  padding: 12px 8px;
  border: 1px solid #3c3730;
  border-radius: 4px;
  background: #111;
}

.versus-votes small {
  display: block;
  margin-bottom: 5px;
  color: #81796f;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.versus-votes b {
  color: #e7ddcc;
  font-size: 15px;
}

.versus-votes > span {
  color: var(--ember);
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 900;
  font-style: italic;
}

.game-dialog .primary-button { width: 100%; }

.power-choices {
  display: grid;
  gap: 8px;
}

.power-choice {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 1px solid #4c402e;
  border-radius: 3px;
  background: #15130f;
  text-align: left;
}

.power-choice b { font-family: Georgia, serif; font-size: 18px; }
.power-choice span { color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; }

.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: calc(var(--safe-bottom) + 18px);
  left: 18px;
  max-width: 440px;
  margin: auto;
  padding: 13px 15px;
  border: 1px solid #5f4c2f;
  border-radius: 4px;
  background: rgba(28, 24, 18, 0.96);
  color: #e5dac9;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  font-size: 12px;
  text-align: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

@media (min-width: 700px) {
  body { padding-block: 22px; }
  .app-shell { min-height: calc(100dvh - 44px); border: 1px solid #2f2b25; border-radius: 18px; overflow: hidden; }
  .onboarding { min-height: calc(100dvh - 44px); width: min(calc(100% - 40px), 560px); margin: 22px auto; border: 1px solid #332c24; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient i,
  .splash-mark img,
  .splash-ring,
  .splash-dots i,
  .pairing-status > span,
  .wizard-panel {
    animation: none;
  }
}

@media (max-height: 680px) {
  .splash-mark {
    height: 200px;
  }

  .splash-dots {
    margin-top: 20px;
  }
}

/* Simpler home-led navigation */
.home-view {
  padding-top: 34px;
}

.home-hero {
  padding: 4px 3px 25px;
}

.home-hero h1 {
  margin: 0 0 18px;
  color: #fff3de;
  font-size: clamp(42px, 12vw, 62px);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.home-hero .partner-status {
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid #302c26;
  border-radius: 3px;
  background: #10100f;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 14px;
  border: 1px solid #332f29;
  border-radius: 5px;
  background: #11100f;
}

.home-stats div {
  display: grid;
  min-height: 70px;
  place-content: center;
  border-right: 1px solid #332f29;
  text-align: center;
}

.home-stats div:last-child { border-right: 0; }

.home-stats strong {
  color: #f6ead7;
  font-family: Georgia, serif;
  font-size: 24px;
}

.home-stats small {
  margin-top: 3px;
  color: #756f66;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.home-menu {
  display: grid;
  gap: 10px;
}

.home-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  min-height: 92px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #37322b;
  border-radius: 5px;
  background: linear-gradient(105deg, #181614, #0e0e0e);
  color: #e9dece;
  text-align: left;
}

.home-card.arena-card {
  border-color: #73501d;
  background:
    radial-gradient(circle at 0 50%, rgba(199, 46, 34, 0.2), transparent 42%),
    linear-gradient(105deg, #21140f, #0e0e0e);
}

.home-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #594524;
  clip-path: polygon(20% 0, 80% 0, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0 80%, 0 20%);
  background: #19140d;
  color: var(--gold);
  font-size: 18px;
}

.home-card small,
.home-card b,
.home-card em {
  display: block;
}

.home-card small {
  margin-bottom: 4px;
  color: #9a7130;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.home-card b {
  font-family: Georgia, serif;
  font-size: 18px;
}

.home-card em {
  margin-top: 3px;
  color: #7f786f;
  font-size: 10px;
  font-style: normal;
}

.home-arrow {
  color: #70675c;
  font-family: Georgia, serif;
  font-size: 28px;
}

.home-note {
  margin: 18px 0 0;
  color: #615b54;
  font-size: 10px;
  text-align: center;
}

.subpage-bar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}

.subpage-bar h1 {
  margin: 0;
  font-size: clamp(24px, 7vw, 32px);
  line-height: 1;
}

.back-button {
  min-height: 35px;
  padding: 0;
  border: 0;
  background: none;
  color: #a59b8f;
  font-size: 12px;
  font-weight: 750;
}

.matches-view > .back-button,
.room-view > .back-button {
  margin-bottom: 22px;
}

.arena-view .deck,
.arena-view .name-card {
  min-height: 405px;
}

.arena-view .name-lockup {
  padding: 48px 24px 38px;
}

.compact-stats {
  margin-inline: 28px;
}

.compact-stats .stat {
  min-height: 68px;
  border-bottom: 0;
}

.details-button {
  display: block;
  min-height: 38px;
  margin: 15px auto 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #b7aa98;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.arena-actions {
  justify-content: space-around;
  max-width: 360px;
  margin-inline: auto;
  padding-top: 20px;
}

.arena-actions .decision-button {
  width: 104px;
  height: 76px;
}

.arena-actions .decision-icon {
  font-size: 32px;
}

.power-meter {
  min-width: 94px;
  color: #ffd56d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.power-meter b {
  font-size: 13px;
}

.details-dialog h2 {
  margin-bottom: 22px;
}

.detail-list {
  display: grid;
  margin-bottom: 16px;
  border: 1px solid #37322b;
  text-align: left;
}

.detail-list div {
  padding: 13px 14px;
  border-bottom: 1px solid #302c27;
}

.detail-list div:last-child { border-bottom: 0; }

.detail-list small {
  display: block;
  margin-bottom: 5px;
  color: #8d816f;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.detail-list b {
  color: #e8dece;
  font-size: 12px;
  line-height: 1.4;
}

.pronunciation-note {
  color: #736c63 !important;
  font-size: 10px !important;
}

.details-dialog .secondary-button { width: 100%; }

.announcer {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 30px;
  background:
    radial-gradient(circle, rgba(163, 38, 24, 0.42), rgba(0, 0, 0, 0.9) 60%),
    rgba(0, 0, 0, 0.82);
  text-align: center;
  animation: announcer-in 180ms ease-out both;
}

.announcer span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.26em;
}

.announcer strong {
  max-width: 520px;
  margin-top: 8px;
  color: #fff1d7;
  font-family: Georgia, serif;
  font-size: clamp(42px, 14vw, 76px);
  line-height: 0.94;
  text-shadow: 0 4px 0 #6a1c10, 0 0 40px rgba(233, 79, 32, 0.55);
}

@keyframes announcer-in {
  from { opacity: 0; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-height: 760px) {
  .view { padding-top: 14px; }
  .arena-heading { margin-bottom: 10px; }
  .filter-strip { margin-bottom: 10px; }
  .deck, .name-card { min-height: 425px; }
  .name-lockup { padding: 26px 24px 20px; }
  .name-lockup h2 { font-size: 58px; }
  .arena-actions { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
