:root {
  /* Exact Brand Colors extracted from Diwaniyah Sadu Logo */
  --sadu-cream: #FBF5EA;
  --sadu-sand: #F2E8D5;
  --sadu-sand-deep: #E5D7BD;
  --sadu-ink: #231815;
  --sadu-ink-soft: #63544B;
  --sadu-red: #9E2226;
  --sadu-red-dark: #7A181B;
  --sadu-gold: #DF9A26;
  --sadu-gold-light: #FDF1D2;
  --sadu-teal: #1E6B52;
  --sadu-teal-light: #E3F4EC;
  --card-surface: #FFFDF8;

  --border-sadu: 2.5px solid #231815;
  --shadow-sadu: 0 4px 0 #231815;
  --shadow-sadu-sm: 0 2.5px 0 #231815;

  --font-display: 'Baloo Bhaijaan 2', 'Tajawal', 'Segoe UI', sans-serif;
  --font-body: 'Tajawal', 'Baloo Bhaijaan 2', Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--sadu-cream);
  color: var(--sadu-ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* Authentic Woven Sadu Geometric Strip (SVG Data Pattern) */
.sadu-ribbon {
  height: 12px;
  width: 100%;
  background-color: var(--sadu-red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='12' viewBox='0 0 48 12'%3E%3Crect width='48' height='12' fill='%239E2226'/%3E%3Cpolygon points='0,6 6,0 12,6 6,12' fill='%23231815'/%3E%3Cpolygon points='6,3 9,6 6,9 3,6' fill='%23DF9A26'/%3E%3Cpolygon points='12,6 18,0 24,6 18,12' fill='%23FBF5EA'/%3E%3Cpolygon points='18,3 21,6 18,9 15,6' fill='%239E2226'/%3E%3Cpolygon points='24,6 30,0 36,6 30,12' fill='%23231815'/%3E%3Cpolygon points='30,3 33,6 30,9 27,6' fill='%23DF9A26'/%3E%3Cpolygon points='36,6 42,0 48,6 42,12' fill='%23FBF5EA'/%3E%3Cpolygon points='42,3 45,6 42,9 39,6' fill='%239E2226'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  border-top: 2px solid var(--sadu-ink);
  border-bottom: 2px solid var(--sadu-ink);
  flex-shrink: 0;
}

.sadu-spine-pattern {
  background-color: var(--sadu-red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='36' viewBox='0 0 24 36'%3E%3Crect width='24' height='36' fill='%239E2226'/%3E%3Cpolygon points='12,2 22,18 12,34 2,18' fill='%23231815'/%3E%3Cpolygon points='12,8 17,18 12,28 7,18' fill='%23DF9A26'/%3E%3Cpolygon points='12,13 15,18 12,23 9,18' fill='%23FBF5EA'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-position: center;
}

/* =========================================================
   FULL-SCREEN GAME MODE (Zero nested screen-in-screen!)
   ========================================================= */
body.fs-active {
  overflow: hidden;
}
body.fs-active #main-top-bar {
  display: none !important;
}
body.fs-active .app-shell {
  max-width: 100%;
  width: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
}
body.fs-active .main-view {
  width: 100%;
  height: 100vh;
}

@media (max-width: 960px) {
  body.fs-active {
    overflow-y: auto;
  }
  body.fs-active .app-shell,
  body.fs-active .main-view {
    height: auto;
    min-height: 100vh;
  }
}

/* Standard Menu Shell (Home & Pre-Game Setup) */
.app-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 16px 22px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.menu-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--sadu-cream);
  border: var(--border-sadu);
  border-radius: 16px;
  box-shadow: var(--shadow-sadu);
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.brand-logo-img {
  height: 70px;
  width: auto;
  display: block;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   BUTTONS & INPUTS
   ========================================================= */
button {
  font-family: var(--font-display);
  cursor: pointer;
  border: none;
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--sadu-ink);
  background: var(--card-surface);
  border: var(--border-sadu);
  box-shadow: var(--shadow-sadu-sm);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4.5px 0 var(--sadu-ink);
}

.btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--sadu-ink);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-red { background: var(--sadu-red); color: #FBF5EA; }
.btn-gold { background: var(--sadu-gold); color: var(--sadu-ink); }
.btn-ink { background: var(--sadu-ink); color: #FBF5EA; }
.btn-teal { background: var(--sadu-teal); color: #FBF5EA; }
.btn-sand { background: var(--sadu-sand); color: var(--sadu-ink); }
.btn-orange { background: #C85A17; color: #FBF5EA; }

.btn-lg {
  padding: 14px 32px;
  font-size: 1.18rem;
  border-radius: 14px;
  box-shadow: var(--shadow-sadu);
}

.btn-sm {
  padding: 6px 13px;
  font-size: 0.85rem;
  border-radius: 9px;
}

.sadu-mini-btn {
  background: var(--sadu-sand);
  color: var(--sadu-ink);
  border: 2px solid var(--sadu-ink);
  box-shadow: 0 2px 0 var(--sadu-ink);
  padding: 7px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
}

.input, select, textarea {
  width: 100%;
  background: var(--sadu-cream);
  border: 2px solid var(--sadu-ink);
  border-radius: 11px;
  padding: 10px 14px;
  color: var(--sadu-ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
}

.input:focus, select:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(223, 154, 38, 0.35);
}

label.field-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 8px;
  background: var(--sadu-sand);
  border: 1.5px solid var(--sadu-ink);
  color: var(--sadu-ink);
}

/* =========================================================
   UNIFIED FULL-SCREEN GAME SHELL (Matches User Wireframe!)
   RTL Grid: Right Rail (275px) | Main Area (1fr)
   ========================================================= */
.fs-shell {
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: 275px 1fr;
  background: var(--sadu-cream);
  border: 3px solid var(--sadu-ink);
}

@media (max-width: 960px) {
  .fs-shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
  }
}

/* RIGHT RAIL: Team 1 Top + Turn Wheel Middle + Team 2 Bottom */
.fs-right-rail {
  background: var(--card-surface);
  border-left: 3px solid var(--sadu-ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  overflow: hidden;
}

@media (max-width: 960px) {
  .fs-right-rail {
    height: auto;
    border-left: none;
    border-bottom: 3px solid var(--sadu-ink);
  }
}

.rail-team-header {
  padding: 12px 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.rail-team-header.team-top {
  background: var(--sadu-red);
  color: #FBF5EA;
  border-bottom: 3px solid var(--sadu-ink);
}

.rail-team-header.team-bottom {
  background: var(--sadu-ink);
  color: var(--sadu-gold);
  border-top: 3px solid var(--sadu-ink);
}

.rail-team-body {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--sadu-cream);
  transition: background-color 0.2s ease;
}

.rail-team-body.active-rail {
  background: var(--sadu-gold-light);
}

.rail-team-body.top-body {
  border-bottom: 3px solid var(--sadu-ink);
}

.rail-team-body.bottom-body {
  border-top: 3px solid var(--sadu-ink);
}

/* 3 Circular Lifeline Badges stacked vertically (matching O O O in sketch!) */
.rail-lifelines-circles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.circle-lf-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid var(--sadu-ink);
  background: var(--card-surface);
  box-shadow: 0 2.5px 0 var(--sadu-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  position: relative;
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.circle-lf-btn:hover:not(:disabled) {
  transform: scale(1.07);
}

.circle-lf-btn.armed {
  background: var(--sadu-gold);
  box-shadow: 0 0 0 3px var(--sadu-red);
}

.circle-lf-btn.locked {
  background: var(--sadu-sand-deep);
  opacity: 0.55;
  border-style: dashed;
  box-shadow: none;
  cursor: not-allowed;
}

.circle-lf-btn.used {
  opacity: 0.28;
  box-shadow: none;
  cursor: not-allowed;
}

.circle-lf-btn.used::after {
  content: '✕';
  position: absolute;
  font-weight: 900;
  color: var(--sadu-red);
  font-size: 1.35rem;
}

.rail-score-block {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.rail-score-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--sadu-ink);
}

.rail-score-controls {
  display: flex;
  gap: 6px;
}

.rail-score-controls button {
  width: 30px;
  height: 26px;
  border-radius: 7px;
  border: 2px solid var(--sadu-ink);
  background: var(--card-surface);
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--sadu-ink);
}

/* Middle Turn Wheel Section (Big Circle + Pointer Arrow like sketch!) */
.rail-wheel-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--card-surface);
  position: relative;
}

.big-turn-wheel-wrap {
  width: 132px;
  height: 132px;
  position: relative;
  cursor: pointer;
}

.big-wheel-svg {
  width: 100%;
  height: 100%;
  transition: transform 0.9s cubic-bezier(0.2, 0.85, 0.25, 1);
  filter: drop-shadow(0 4px 0 var(--sadu-ink));
}

.wheel-turn-caption {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  text-align: center;
  color: var(--sadu-ink);
}

/* MAIN AREA (Left of Right Rail) */
.fs-main-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--sadu-cream);
}

@media (max-width: 960px) {
  .fs-main-area {
    height: auto;
    overflow: visible;
  }
}

/* Top Bar inside Main Area: Logo Centered + End Game on Far Left */
.fs-top-bar {
  height: 98px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 22px;
  background: var(--sadu-cream);
  border-bottom: 3px solid var(--sadu-ink);
}

.fs-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.fs-top-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.fs-top-logo {
  height: 76px;
  width: auto;
  display: block;
}

.fs-top-left {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.end-game-box-btn {
  background: var(--card-surface);
  color: var(--sadu-red);
  border: 2.5px solid var(--sadu-ink);
  box-shadow: 0 3px 0 var(--sadu-ink);
  padding: 9px 20px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}

.end-game-box-btn:hover {
  background: var(--sadu-red);
  color: #FBF5EA;
}

/* Main Full-Screen Canvas */
.fs-canvas {
  flex: 1;
  padding: 18px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* =========================================================
   EXACT T-SHAPE 2x3 CATEGORY GRID (Large Full-Canvas Fill!)
   ========================================================= */
.t-board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 24px 32px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .t-board-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    height: auto;
  }
}

@media (max-width: 640px) {
  .t-board-grid {
    grid-template-columns: 1fr;
  }
}

.t-cat-unit {
  display: flex;
  flex-direction: column;
  gap: 11px;
  height: 100%;
}

.t-cat-header {
  background: var(--sadu-ink);
  color: #FBF5EA;
  border: 3px solid var(--sadu-ink);
  box-shadow: 0 5px 0 var(--sadu-red);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.t-cat-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 10px;
  align-items: stretch;
}

.t-points-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.t-cat-spine {
  border: 3px solid var(--sadu-ink);
  border-radius: 10px;
  min-height: 185px;
  box-shadow: 0 4px 0 var(--sadu-ink);
}

.t-point-btn {
  flex: 1;
  padding: 14px 8px;
  border-radius: 12px;
  border: 3px solid var(--sadu-ink);
  box-shadow: 0 4px 0 var(--sadu-ink);
  background: var(--card-surface);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  color: var(--sadu-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background-color 0.12s ease;
}

.t-point-btn.tier-200 { background: var(--sadu-cream); }
.t-point-btn.tier-400 { background: var(--sadu-gold-light); }
.t-point-btn.tier-600 { background: #FBE6E6; }

.t-point-btn:hover:not(.answered) {
  transform: translateY(-2px);
  background: var(--sadu-gold);
}

.t-point-btn.answered {
  background: var(--sadu-sand-deep);
  color: var(--sadu-ink-soft);
  border-style: dashed;
  box-shadow: none;
  opacity: 0.42;
  cursor: default;
}

/* =========================================================
   FULL-SCREEN QUESTION & ANSWER STAGE (Inside .fs-canvas)
   ========================================================= */
.fs-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-surface);
  border: 2.5px solid var(--sadu-ink);
  box-shadow: 0 3px 0 var(--sadu-ink);
  padding: 5px 14px;
  border-radius: 999px;
}

.fs-timer-digits {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  min-width: 72px;
  text-align: center;
}

.fs-timer-stop-btn {
  background: var(--sadu-red);
  color: #FBF5EA;
  border: 2px solid var(--sadu-ink);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
}

.fs-timer-stop-btn.is-paused {
  background: var(--sadu-teal);
}

.fs-question-stage {
  flex: 1;
  background: var(--card-surface);
  border: 3px solid var(--sadu-ink);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--sadu-ink);
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  gap: 14px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.fs-q-headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.3rem);
  font-weight: 800;
  line-height: 1.45;
  color: var(--sadu-ink);
}

.question-media-frame {
  border: 3px solid var(--sadu-ink);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--sadu-ink);
  background: var(--sadu-ink);
  padding: 7px;
  max-width: 520px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-media-frame img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.answer-giant-word {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  color: var(--sadu-red);
  background: var(--sadu-gold-light);
  border: 3px solid var(--sadu-ink);
  box-shadow: 0 5px 0 var(--sadu-ink);
  padding: 10px 34px;
  border-radius: 16px;
}

.answer-full-photo-frame {
  border: 3px solid var(--sadu-ink);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--sadu-ink);
  background: var(--sadu-sand);
  padding: 7px;
  max-width: 340px;
}

.answer-full-photo-frame img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 11px;
  display: block;
}

/* =========================================================
   HOME & SETUP MENUS (Sadu Brand Identity)
   ========================================================= */
.home-hero-sadu {
  background: var(--card-surface);
  border: var(--border-sadu);
  border-radius: 22px;
  box-shadow: var(--shadow-sadu);
  overflow: hidden;
  margin-bottom: 24px;
}

.home-hero-inner {
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.home-modes-bento {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 22px;
}

@media (max-width: 920px) {
  .home-modes-bento {
    grid-template-columns: 1fr;
  }
}

.secondary-modes-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.game-ticket {
  background: var(--card-surface);
  border: var(--border-sadu);
  border-radius: 20px;
  box-shadow: var(--shadow-sadu);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.game-ticket:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 var(--sadu-ink);
}

.ticket-header {
  padding: 20px 24px;
  border-bottom: var(--border-sadu);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FBF5EA;
}

.ticket-war .ticket-header { background: var(--sadu-red); }
.ticket-hive .ticket-header { background: var(--sadu-teal); }
.ticket-flock .ticket-header { background: var(--sadu-ink); color: var(--sadu-gold); }

.ticket-header h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
}

.ticket-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
}

/* Panels & Setup Cards */
.panel {
  background: var(--card-surface);
  border: var(--border-sadu);
  border-radius: 20px;
  box-shadow: var(--shadow-sadu);
  padding: 24px;
  margin-bottom: 22px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px dashed var(--sadu-sand-deep);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
}

.panel-subtitle {
  color: var(--sadu-ink-soft);
  font-size: 0.94rem;
}

.teams-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.filter-tabs-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  background: var(--sadu-sand);
  border: 2px solid var(--sadu-ink);
  color: var(--sadu-ink);
}

.filter-tab.active {
  background: var(--sadu-red);
  color: #FBF5EA;
}

.war-packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 15px;
}

.war-pack-card {
  background: var(--card-surface);
  border: var(--border-sadu);
  border-radius: 15px;
  box-shadow: 0 3.5px 0 var(--sadu-ink);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease;
}

.war-pack-card:hover { transform: translateY(-2px); }
.war-pack-card.is-picked {
  outline: 4px solid var(--sadu-gold);
}

.war-pack-banner {
  height: 80px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 2px solid var(--sadu-ink);
  position: relative;
  overflow: hidden;
  color: #fff;
}

.war-pack-banner img.pack-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pack-tag {
  position: relative;
  z-index: 2;
  background: rgba(35, 24, 21, 0.88);
  color: #FBF5EA;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 6px;
}

.pack-check {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sadu-cream);
  border: 2px solid var(--sadu-ink);
  color: var(--sadu-ink);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.war-pack-card.is-picked .pack-check { background: var(--sadu-gold); }

.war-pack-body { padding: 12px 13px; flex: 1; }
.war-pack-title { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.war-pack-sub { font-size: 0.82rem; color: var(--sadu-ink-soft); }

.selected-tray {
  position: sticky;
  bottom: 14px;
  z-index: 30;
  background: var(--sadu-ink);
  color: #FBF5EA;
  border: 2.5px solid var(--sadu-gold);
  border-radius: 16px;
  padding: 14px 20px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.tray-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.tray-chip {
  background: #362723;
  border: 1.5px solid var(--sadu-gold);
  color: #FBF5EA;
  padding: 4px 11px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
}
.tray-chip.empty { border-style: dashed; border-color: #705D56; color: #9C8B84; }

/* Category pickers (Hive & Flock setup) */
.categories-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.cat-pick-card {
  background: var(--sadu-cream);
  border: 2px solid var(--sadu-ink);
  border-radius: 13px;
  padding: 13px 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--sadu-ink);
}
.cat-pick-card.selected { background: var(--sadu-gold-light); }
.cat-pick-card.selected-emerald { background: var(--sadu-teal-light); }
.cat-pick-emoji { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.cat-pick-name { font-family: var(--font-display); font-weight: 800; display: block; }
.cat-pick-meta { font-size: 0.78rem; color: var(--sadu-ink-soft); }

/* Hive SVG & Flock QR */
.hive-svg {
  width: 100%;
  max-width: 660px;
  max-height: calc(100vh - 150px);
  height: auto;
  margin: 0 auto;
  display: block;
}
.hex-cell { cursor: pointer; }
.hex-cell:hover polygon { filter: brightness(1.07); }
.hex-cell.winning-hex polygon { stroke: var(--sadu-gold) !important; stroke-width: 6px !important; }

.players-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sadu-sand);
  border: 2px solid var(--sadu-ink);
  padding: 6px 13px;
  border-radius: 999px;
  font-weight: 800;
}
.player-chip button {
  background: var(--sadu-red);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
}

.qr-box {
  display: inline-flex;
  padding: 14px;
  background: #fff;
  border: 3px solid var(--sadu-ink);
  border-radius: 18px;
  margin: 12px auto;
  box-shadow: 0 5px 0 var(--sadu-ink);
}

.qr-mode-switch {
  display: inline-flex;
  background: var(--sadu-sand);
  border: 2px solid var(--sadu-ink);
  border-radius: 11px;
  padding: 3px;
  gap: 4px;
}
.qr-mode-switch button {
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  background: transparent;
  color: var(--sadu-ink-soft);
}
.qr-mode-switch button.active {
  background: var(--sadu-ink);
  color: #FBF5EA;
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  width: 100%;
  margin: 14px 0;
}
.vote-card {
  background: var(--sadu-cream);
  border: 2.5px solid var(--sadu-ink);
  box-shadow: 0 3px 0 var(--sadu-ink);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
}
.vote-card.selected-suspect {
  background: #FBE6E6;
  border-color: var(--sadu-red);
  box-shadow: 0 4px 0 var(--sadu-red);
}

/* Modal & Mobile QR Screen */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 24, 21, 0.72);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-card {
  background: var(--card-surface);
  border: 3px solid var(--sadu-ink);
  border-radius: 22px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 8px 0 var(--sadu-ink);
}

.mobile-reveal-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--sadu-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.secret-mobile-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-surface);
  border: 3px solid var(--sadu-ink);
  border-radius: 24px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 7px 0 var(--sadu-ink);
}
.secret-word-vault {
  margin: 20px 0;
  padding: 26px 16px;
  border-radius: 16px;
  background: var(--sadu-cream);
  border: 2.5px dashed var(--sadu-ink);
  cursor: pointer;
}
.secret-word-vault.revealed {
  border-style: solid;
  background: var(--sadu-gold-light);
}
.secret-word-big {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--sadu-red);
  margin-top: 6px;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--sadu-ink);
  color: #FBF5EA;
  border: 2px solid var(--sadu-gold);
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 800;
}

/* =========================================================
   PHONE LOGIN (OTP) & D1Z (دي ونز) WALLET / STORE
   ========================================================= */
.d1z-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sadu-gold);
  color: var(--sadu-ink);
  border: 2.5px solid var(--sadu-ink);
  box-shadow: 0 2.5px 0 var(--sadu-ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}

.d1z-coin-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sadu-red);
  color: #FBF5EA;
  border: 2px solid var(--sadu-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
}

.auth-phone-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  direction: ltr;
}

.otp-digits-input {
  text-align: center;
  letter-spacing: 14px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  direction: ltr;
}

.sms-preview-banner {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  width: min(440px, 92vw);
  background: var(--sadu-ink);
  color: #FBF5EA;
  border: 3px solid var(--sadu-gold);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 12px 30px rgba(35, 24, 21, 0.4);
  animation: slideSms 0.28s ease-out;
}

@keyframes slideSms {
  from { opacity: 0; transform: translate(-50%, -18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.store-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.store-pack-card {
  background: var(--sadu-cream);
  border: 2.5px solid var(--sadu-ink);
  box-shadow: 0 4px 0 var(--sadu-ink);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}

.store-pack-card.popular {
  background: var(--sadu-gold-light);
  border-color: var(--sadu-red);
  box-shadow: 0 5px 0 var(--sadu-red);
}

.store-pack-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--sadu-red);
}

.store-pack-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sadu-ink);
}
