@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* -- core palette -- */
  --ink: #10171a;
  --ink-raised: #16211f;
  --felt: #1d3c34;
  --felt-deep: #142a25;
  --parchment: #f2e9d3;
  --parchment-dim: #c9c0a6;
  --brass: #c9a227;
  --brass-bright: #e6c34f;
  --ember: #c1462f;
  --ember-bright: #e2694e;
  --mist: #6fa39a;
  --mist-bright: #8fc4b9;
  --line: rgba(242, 233, 211, 0.12);
  --line-strong: rgba(242, 233, 211, 0.22);
  --shadow-deep: 0 24px 60px rgba(0, 0, 0, 0.55);

  /* -- type -- */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;

  color-scheme: dark;
}

body.light-mode {
  --ink: #eef0ea;
  --ink-raised: #ffffff;
  --felt: #dce9de;
  --felt-deep: #c9dcc9;
  --parchment: #16211f;
  --parchment-dim: #4c5750;
  --brass: #96721a;
  --brass-bright: #7c5f16;
  --ember: #a8371f;
  --ember-bright: #8c2c19;
  --mist: #2f6d61;
  --mist-bright: #24544a;
  --line: rgba(22, 33, 31, 0.12);
  --line-strong: rgba(22, 33, 31, 0.24);
}

/* -------------------------------------------------------------- reset -- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brass-bright);
  text-decoration: none;
}

a:hover {
  color: var(--mist-bright);
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--parchment);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 2.2em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.6em;
}

p,
li {
  max-width: 68ch;
  color: var(--parchment-dim);
}

.container {
  width: min(760px, 92vw);
  margin: 0 auto;
}

.wide {
  width: min(1080px, 94vw);
}

/* --------------------------------------------------------- utilities -- */

.eyebrow-note {
  font-size: 0.85rem;
  color: var(--mist-bright);
  border-left: 3px solid var(--mist);
  padding-left: 0.85rem;
  margin: 1.4rem 0;
}

.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--brass-bright);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  margin: 2rem 0;
  max-width: 60ch;
}

/* ------------------------------------------------------------- nav --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(16, 23, 26, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

body.light-mode .site-header {
  background: rgba(238, 240, 234, 0.9);
}

.nav {
  width: min(1160px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--parchment);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wordmark:hover {
  color: var(--brass-bright);
}

.wordmark .pip {
  color: var(--brass);
  font-style: normal;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list>li {
  position: relative;
}

.nav-list>li>a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--parchment-dim);
  padding: 0.6rem 0.85rem;
  font-weight: 600;
  font-size: 0.94rem;
  border-radius: 8px;
}

.nav-list>li>a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-list>li>a:hover {
  color: var(--parchment);
}

.nav-list>li>a:hover::after {
  transform: scaleX(1);
}

.dropdown-arrow {
  font-size: 0.7rem;
  margin-left: 0.3rem;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  padding: 0.4rem;
  margin: 0;
  list-style: none;
  background: var(--ink-raised);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-deep);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.18s ease;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  color: var(--parchment-dim);
  font-size: 0.9rem;
}

.dropdown-menu li a:hover {
  background: var(--felt);
  color: var(--parchment);
}

.nav-log {
  background: var(--brass);
  color: #16130a !important;
  border-radius: 999px;
  padding: 0.55rem 1.1rem !important;
  font-weight: 700;
}

.nav-log:hover {
  background: var(--brass-bright);
  color: #16130a !important;
}

.menu {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--parchment);
  font-size: 1.4rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

.toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 400;
  background: var(--ink-raised);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--parchment);
  font-size: 1.1rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  box-shadow: var(--shadow-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toggle:hover {
  border-color: var(--brass);
}

@media (max-width: 880px) {
  .menu {
    display: block;
  }

  .toggle {
    display: none;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-raised);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-list.open {
    max-height: 800px;
  }

  .nav-list li a {
    border-radius: 0;
    padding: 0.9rem 1.2rem;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    border: none;
    background: var(--felt-deep);
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }
}

/* --------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  border-radius: 999px;
  padding: 0.85rem 1.7rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-brass {
  background: var(--brass);
  color: #16130a;
}

.btn-brass:hover {
  background: var(--brass-bright);
  color: #16130a;
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--parchment);
}

.btn-outline:hover {
  border-color: var(--brass);
  color: var(--brass-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--parchment-dim);
  border-color: transparent;
  padding: 0.7rem 1.1rem;
}

.btn-ghost:hover {
  color: var(--parchment);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------- panels -- */

.panel {
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.6rem 1.8rem;
}

.felt-panel {
  background: radial-gradient(circle at 30% 0%, var(--felt) 0%, var(--felt-deep) 70%);
  border: 1px solid rgba(242, 233, 211, 0.08);
  border-radius: 24px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* ------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  right: -3vw;
  top: -4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: min(22rem, 40vw);
  color: var(--felt);
  opacity: 0.55;
  line-height: 1;
  user-select: none;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--mist-bright);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.hero h1 {
  max-width: 14ch;
}

.hero-lede {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--parchment-dim);
  margin-bottom: 1.8rem;
}

.hero-under {
  margin: 0 0 2rem 0;
}

.main-h1 {
  margin: 0;
}

/* --------------------------------------------------------- game hud -- */

.hud-strip {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.6rem 0 1.4rem;
}

.hud-pill {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.6rem 1.1rem;
  min-width: 92px;
}

.hud-pill .hud-label {
  font-size: 0.65rem;
  color: var(--parchment-dim);
  text-transform: none;
}

.hud-pill .hud-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--brass-bright);
}

.hud-pill.mistakes .hud-value {
  color: var(--ember-bright);
}

.hud-pill.deck .hud-value {
  color: var(--mist-bright);
}

/* ------------------------------------------------------------- board -- */

.board-wrap {
  display: none;
  padding-bottom: 3rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* --------------------------------------------------------- card face -- */

.card-slot {
  aspect-ratio: 5 / 7;
  perspective: 900px;
}

.card-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-flip.is-face {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--brass);
  overflow: hidden;
  height: 100%;
}

.face-back {
  background:
    repeating-linear-gradient(135deg, rgba(201, 162, 39, 0.14) 0 2px, transparent 2px 14px),
    var(--felt-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.face-back::after {
  content: "♣";
  font-size: 2.4rem;
  color: rgba(201, 162, 39, 0.55);
}

.face-front {
  background: var(--ink-raised);
  transform: rotateY(180deg);
  position: relative;
}

.face-front.busted {
  filter: saturate(0.4) brightness(0.55);
  border-color: var(--ember);
}

.face-front.busted .call-zone {
  cursor: not-allowed;
  pointer-events: none;
}

.card-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.01em;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

.card-value.is-red {
  color: var(--ember-bright);
}

.card-value.is-black {
  color: var(--parchment);
}

.call-zone {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.call-zone.higher {
  top: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
}

.call-zone.lower {
  bottom: 0;
  border-radius: 0 0 10px 10px;
}

.call-zone::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.05rem;
}

.call-zone.higher::before {
  content: "\f062";
}

.call-zone.lower::before {
  content: "\f063";
}

.call-zone.higher:hover {
  background: rgba(111, 163, 154, 0.24);
  color: var(--ink);
}

.call-zone.lower:hover {
  background: rgba(193, 70, 47, 0.24);
  color: var(--ink);
}

.locked-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: rgba(242, 233, 211, 0.35);
  z-index: 4;
  pointer-events: none;
}

/* --------------------------------------------------------- hot streaks -- */

@keyframes glow-yellow {

  0%,
  100% {
    box-shadow: 0 0 12px 2px rgba(230, 195, 79, 0.5), 0 0 24px 6px rgba(230, 195, 79, 0.22);
  }

  50% {
    box-shadow: 0 0 18px 4px rgba(230, 195, 79, 0.75), 0 0 32px 10px rgba(230, 195, 79, 0.35);
  }
}

@keyframes glow-red {

  0%,
  100% {
    box-shadow: 0 0 14px 3px rgba(226, 105, 78, 0.55), 0 0 28px 8px rgba(226, 105, 78, 0.28);
  }

  50% {
    box-shadow: 0 0 22px 6px rgba(226, 105, 78, 0.85), 0 0 40px 12px rgba(226, 105, 78, 0.4);
  }
}

.card-slot.hot .face-front {
  border-color: var(--brass-bright);
  animation: glow-yellow 1.6s ease-in-out infinite;
}

.card-slot.extra-hot .face-front {
  border-color: var(--ember-bright);
  animation: glow-red 1.1s ease-in-out infinite;
}

/* -------------------------------------------------------- deck + deal -- */

.deck-well {
  display: flex;
  justify-content: center;
  margin: 0.4rem 0 2rem;
}

.deck-pile {
  width: 92px;
  aspect-ratio: 5 / 7;
  border-radius: 12px;
  border: 2px solid var(--brass);
  background:
    repeating-linear-gradient(135deg, rgba(201, 162, 39, 0.14) 0 2px, transparent 2px 14px),
    var(--felt-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3), 10px 10px 0 rgba(0, 0, 0, 0.16);
}

.deck-pile::after {
  content: "♣";
  font-size: 1.6rem;
  color: rgba(201, 162, 39, 0.55);
}

.flying-card {
  position: fixed;
  border-radius: 12px;
  border: 2px solid var(--brass);
  background:
    repeating-linear-gradient(135deg, rgba(201, 162, 39, 0.14) 0 2px, transparent 2px 14px),
    var(--felt-deep);
  z-index: 850;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.flying-card::after {
  content: "♣";
  font-size: 1.5rem;
  color: rgba(201, 162, 39, 0.55);
}

/* ------------------------------------------------------------ flash -- */

.container.flash-correct {
  box-shadow: 0 0 0 3px var(--mist) inset;
}

.container.flash-wrong {
  animation: shake 0.4s ease;
  box-shadow: 0 0 0 3px var(--ember) inset;
}

@keyframes shake {
  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }

  100% {
    transform: translateX(0);
  }
}

.point-pop {
  position: fixed;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--brass-bright);
  pointer-events: none;
  z-index: 900;
  transition: transform 1s ease-out, opacity 1.4s ease-out;
}

/* ----------------------------------------------------------- modals -- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 12, 13, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-box {
  background: var(--ink-raised);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 2.2rem 2.4rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-deep);
  position: relative;
}

.end-score {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  margin: 1rem 0 1.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

.end-score span {
  display: block;
  font-size: 0.7rem;
  color: var(--parchment-dim);
  font-family: var(--font-body);
  font-weight: 500;
}

.field {
  position: relative;
  text-align: left;
  margin-bottom: 1.2rem;
}

.field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--line-strong);
  color: var(--parchment);
  padding: 0.8rem 0;
  font-size: 1rem;
  font-family: var(--font-body);
}

.field input:focus,
.field input:valid {
  border-bottom-color: var(--brass);
  outline: none;
}

.field label {
  position: absolute;
  top: 0.8rem;
  left: 0;
  color: var(--parchment-dim);
  pointer-events: none;
  transition: 0.2s ease;
}

.field input:focus+label,
.field input:valid+label {
  transform: translateY(-1.3rem);
  font-size: 0.75rem;
  color: var(--brass-bright);
}

#submitStatus {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--brass-bright);
  min-height: 1.4em;
}

.badge-strip {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0 0;
}

.badge-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.14);
  color: var(--brass-bright);
  border: 1px solid rgba(201, 162, 39, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-chip.locked {
  background: rgba(242, 233, 211, 0.05);
  color: var(--parchment-dim);
  border-color: var(--line-strong);
  opacity: 0.75;
}

a.badge-chip-link {
  background: transparent;
  border-style: dashed;
  color: var(--parchment);
}

a.badge-chip-link:hover {
  border-color: var(--brass);
  color: var(--brass-bright);
}

/* --------------------------------------------------------- leaderboard */

.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--parchment-dim);
  font-size: 0.94rem;
}

.table th,
.table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

#leaderboardContent th,
#leaderboardContent td {
  padding: 0.3rem 0.5rem;
}

.table th {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--parchment);
  background: var(--ink-raised);
  position: sticky;
  top: 0;
}

.table td:nth-child(n+3) {
  text-align: right;
}

.table tr:hover td {
  background: rgba(242, 233, 211, 0.03);
}

.table .top-player td {
  background: rgba(201, 162, 39, 0.08);
}

.table .top-player td:first-child {
  color: var(--brass-bright);
  font-weight: 700;
}

.leader-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.6rem 0 2rem;
}

.pagination button {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--parchment);
  cursor: pointer;
  font-weight: 700;
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination button:not(:disabled):hover {
  border-color: var(--brass);
  color: var(--brass-bright);
}

/* --------------------------------------------------------------- faq -- */

details.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--parchment);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brass);
}

details.faq-item[open] summary::after {
  content: "–";
}

details.faq-item p {
  margin-top: 0.8rem;
}

/* ------------------------------------------------------------ shop --- */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.6rem 0;
}

.shop-card {
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
}

.shop-preview {
  aspect-ratio: 5/7;
  border-radius: 10px;
  margin: 0 auto 0.8rem;
  width: 70%;
  border: 2px solid var(--brass);
  background: var(--felt-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  position: relative;
  overflow: hidden;
}

.shop-preview i {
  font-size: 1.7rem;
  color: rgba(242, 233, 211, 0.85);
}

.shop-card p {
  color: var(--parchment);
  font-weight: 600;
  margin: 0 0 0.7rem;
}

.shop-message {
  min-height: 1.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
}

.shop-message.show {
  opacity: 1;
}

.shop-message.success {
  color: var(--mist-bright);
}

.shop-message.error {
  color: var(--ember-bright);
}

.buy-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 800;
  font-family: var(--font-body);
  cursor: pointer;
  background: var(--brass);
  color: #16130a;
  transition: transform 0.12s ease, background 0.15s ease;
}

.buy-btn:hover {
  background: var(--brass-bright);
}

.buy-btn:active {
  transform: scale(0.97);
}

.buy-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.buy-btn.owned-btn {
  background: var(--mist);
  color: #0d1512;
}

.buy-btn.owned-btn:hover {
  background: var(--mist-bright);
}

.buy-btn.equipped-btn {
  background: transparent;
  color: var(--brass-bright);
  border: 2px solid var(--brass);
}

.skin-default {
  background: var(--felt-deep);
}

.skin-red {
  background: linear-gradient(135deg, var(--ember), #7c2818);
}

.skin-floral {
  background: #175048;
}

.skin-rain {
  background: linear-gradient(180deg, #234d63, #123047);
}

.skin-lava {
  background: linear-gradient(160deg, #7a2f13, #c1462f);
}

.skin-galaxy {
  background: radial-gradient(circle at 30% 30%, #3a2a5c, #0d0a1a);
}

/* -------------------------------------------------------- dashboard -- */

.dashboard-wrap {
  padding: 2.5rem 0;
}

.dashboard-card {
  max-width: 640px;
  margin: 0 auto;
}

.dashboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.dashboard-row:last-child {
  border-bottom: none;
}

.dashboard-row span {
  color: var(--parchment-dim);
}

.dashboard-row p {
  color: var(--parchment);
  font-weight: 700;
  margin: 0;
}

.dashboard-actions {
  margin-top: 1.6rem;
  display: flex;
  justify-content: center;
}

.logout-btn {
  color: var(--ember-bright);
  border: 1px solid var(--ember);
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
}

.logout-btn:hover {
  background: var(--ember);
  color: #16130a;
}

/* -------------------------------------------------------------- form -- */

.auth-form {
  max-width: 420px;
  margin: 3rem auto;
  padding: 2rem;
}

.auth-form .field-group {
  margin-bottom: 1.2rem;
}

.auth-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--parchment-dim);
  margin-bottom: 0.4rem;
}

.auth-form input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--parchment);
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  font-family: var(--font-body);
}

.auth-form input:focus {
  border-color: var(--brass);
  outline: none;
}

.auth-form button {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-form .switch-line {
  text-align: center;
  margin-top: 1rem;
  color: var(--parchment-dim);
  font-size: 0.9rem;
}

.login-msg {
  color: var(--ember-bright);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* -------------------------------------------------------------- contact */

.support-form {
  width: min(920px, 94%);
  margin: 2rem auto 3rem;
  padding: 1.8rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.4rem;
}

.form-sub,
.form-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.support-form input,
.support-form select,
.support-form textarea,
.support-form button {
  width: 100%;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  box-sizing: border-box;
}

.support-form input,
.support-form select,
.support-form textarea {
  background: var(--ink);
  color: var(--parchment);
  border: 1px solid var(--line-strong);
}

.support-form textarea {
  resize: vertical;
  min-height: 220px;
  flex: 1;
}

.support-form>div:last-child {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

#submitBtn {
  background: var(--brass);
  color: #16130a;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

#submitBtn:hover {
  background: var(--brass-bright);
}

#submitBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  white-space: pre-line;
}

.form-message.error {
  display: block;
  background: rgba(193, 70, 47, 0.16);
  border: 1px solid rgba(193, 70, 47, 0.4);
  color: var(--ember-bright);
}

.form-message.success {
  display: block;
  background: rgba(111, 163, 154, 0.16);
  border: 1px solid rgba(111, 163, 154, 0.4);
  color: var(--mist-bright);
}

@media (max-width: 760px) {
  .support-form {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------- admin -- */

.admin-table {
  width: 100%;
  table-layout: fixed;
}

.admin-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* -------------------------------------------------------------- ads --- */

.ad-slot {
  margin: 2.4rem 0;
  padding: 0.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  text-align: center;
  min-height: 90px;
}

/* ------------------------------------------------------------ footer -- */

footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--ink-raised);
}

.footer-inner {
  width: min(1080px, 92vw);
  margin: 0 auto;
  padding: 2.4rem 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
}

.footer-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--parchment-dim);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--brass-bright);
}

.footer-fine {
  width: min(1080px, 92vw);
  margin: 0 auto 1.6rem;
  font-size: 0.78rem;
  color: var(--parchment-dim);
  opacity: 0.7;
}

/* ---------------------------------------------------------- homepage -- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.6rem 0 2.4rem;
}

.feature-item {
  border-top: 2px solid var(--brass);
  padding-top: 0.8rem;
}

.feature-item h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-item h3 i {
  color: var(--brass-bright);
  font-size: 0.95em;
}

.feature-item p {
  font-size: 0.92rem;
  margin: 0;
}

.stat-strip {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.6rem 0;
}

.stat-strip .stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--brass-bright);
  display: block;
}

.stat-strip .stat-label {
  font-size: 0.8rem;
  color: var(--parchment-dim);
}

/* --------------------------------------------------------- utilities -- */

.section-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.4rem 0;
}

.text-page {
  padding-bottom: 3rem;
}

.text-page h1 {
  margin-bottom: 0.3rem;
}

.text-page .updated {
  color: var(--parchment-dim);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

/* --------------------------------------------------------- achievements */

.achv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.6rem 0;
}

.achv-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.achv-card.locked {
  opacity: 0.55;
}

.achv-card.unlocked {
  border-color: var(--brass);
}

.achv-icon {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--parchment-dim);
  width: 1.4em;
  text-align: center;
}

.achv-card.unlocked .achv-icon {
  color: var(--brass-bright);
}

.achv-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.achv-body p {
  margin: 0;
  font-size: 0.88rem;
}

.achv-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: none;
  color: var(--parchment-dim);
  margin-top: 0.4rem;
  display: inline-block;
}

.achv-card.unlocked .achv-status {
  color: var(--brass-bright);
}

.achv-grid[data-tier="impossible"] .achv-card {
  border-style: dashed;
}

.achv-grid[data-tier="impossible"] .achv-card.unlocked {
  border-style: solid;
  border-color: #b98cff;
  box-shadow: 0 0 22px rgba(185, 140, 255, 0.35);
}

.achv-grid[data-tier="impossible"] .achv-card.unlocked .achv-status {
  color: #cdaaff;
}

.achv-grid[data-tier="impossible"] .achv-card.unlocked .achv-icon {
  color: #cdaaff;
}

.daily-panel {
  margin: 1.6rem 0 2.4rem;
}

.daily-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.daily-panel-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--mist-bright);
  font-size: 1rem;
  margin: 0 0 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.daily-panel-date {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--parchment);
  margin: 0;
}

.daily-countdown {
  text-align: right;
}

.daily-countdown-label {
  display: block;
  font-size: 0.72rem;
  color: var(--parchment-dim);
  margin-bottom: 0.2rem;
}

.daily-countdown-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
}

.daily-panel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.daily-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(16, 23, 26, 0.35);
  border: 1px solid rgba(242, 233, 211, 0.08);
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

.daily-stat-label {
  font-size: 0.72rem;
  color: var(--parchment-dim);
}

.daily-stat-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--parchment);
}

.daily-stat-value i {
  color: var(--ember-bright);
  font-size: 0.9em;
  margin-right: 0.2rem;
}

.leader-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.leader-tab {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--parchment-dim);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.leader-tab:hover {
  border-color: var(--brass);
  color: var(--parchment);
}

.leader-tab.active {
  background: var(--brass);
  border-color: var(--brass);
  color: #16130a;
}

.your-rank-card {
  margin-bottom: 1.6rem;
}

.your-rank-label {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--mist-bright);
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
}

.your-rank-body {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.your-rank-name {
  font-weight: 700;
  color: var(--parchment);
}

.your-rank-pos {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brass-bright);
}

.your-rank-score {
  color: var(--parchment-dim);
}

.your-rank-percent {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mist-bright);
  background: rgba(111, 163, 154, 0.14);
  border: 1px solid rgba(111, 163, 154, 0.3);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

.table-red {
  --felt: #4a1d1d;
  --felt-deep: #301010;
}

.table-black {
  --felt: #1a1a1a;
  --felt-deep: #0d0d0d;
}

.table-wood {
  --felt: #4a3222;
  --felt-deep: #33210f;
}

.table-midnight {
  --felt: #1a1f3c;
  --felt-deep: #11142a;
}

.ui-ember {
  --brass: #c1462f;
  --brass-bright: #e2694e;
}

.ui-mist {
  --brass: #4f8d81;
  --brass-bright: #6fa39a;
}

.ui-amethyst {
  --brass: #8c5fd1;
  --brass-bright: #b98cff;
}

body.style-minimal .card-face {
  border-width: 1px;
  border-color: var(--line-strong);
  border-radius: 6px;
}

body.style-minimal .card-value {
  font-family: var(--font-body);
  font-weight: 700;
}

body.style-vintage .card-face {
  border-width: 3px;
  border-color: #a67c3d;
  border-radius: 3px;
}

body.style-vintage .card-value {
  font-style: italic;
}

body.style-modern .card-face {
  border-width: 1px;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body.style-modern .card-value {
  font-family: var(--font-body);
  font-weight: 800;
}

.preview-table-green {
  background: linear-gradient(135deg, #1d3c34, #142a25);
}

.preview-table-red {
  background: linear-gradient(135deg, #4a1d1d, #301010);
}

.preview-table-black {
  background: linear-gradient(135deg, #2a2a2a, #0d0d0d);
}

.preview-table-wood {
  background: linear-gradient(135deg, #4a3222, #33210f);
}

.preview-table-midnight {
  background: linear-gradient(135deg, #1a1f3c, #11142a);
}

.preview-style-classic {
  background: var(--felt-deep);
  border-radius: 12px;
  border-width: 2px;
  border-color: var(--brass);
}

.preview-style-minimal {
  background: var(--felt-deep);
  border-radius: 6px;
  border-width: 1px;
  border-color: var(--line-strong);
}

.preview-style-vintage {
  background: var(--felt-deep);
  border-radius: 3px;
  border-width: 3px;
  border-color: #a67c3d;
}

.preview-style-modern {
  background: var(--felt-deep);
  border-radius: 20px;
  border-width: 1px;
  border-color: var(--line-strong);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.preview-ui-brass {
  background: linear-gradient(135deg, #e6c34f, #c9a227);
}

.preview-ui-ember {
  background: linear-gradient(135deg, #e2694e, #c1462f);
}

.preview-ui-mist {
  background: linear-gradient(135deg, #8fc4b9, #4f8d81);
}

.preview-ui-amethyst {
  background: linear-gradient(135deg, #b98cff, #8c5fd1);
}

.dashboard-stats-heading {
  margin-top: 2rem;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1.8rem;
}

.profile-stat {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.profile-stat-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.14);
  color: var(--brass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.profile-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--parchment);
}

.profile-stat-label {
  display: block;
  font-size: 0.76rem;
  color: var(--parchment-dim);
}

.dashboard-actions {
  gap: 0.75rem;
}