/* Werewords v2 — Moonlit Arcane Tabletop (月下秘仪桌游风) */

:root {
  --bg-deep: #0b0e17;
  --bg-night: #121726;
  --bg-card: #171d2e;
  --bg-card-elev: #1e253b;
  --bg-parchment: #211d1a;
  --ink: #f3ede0;
  --ink-muted: #a6adbe;
  --ink-dim: #737c94;
  --gold: #e5bc6e;
  --gold-soft: rgba(229, 188, 110, 0.16);
  --gold-line: rgba(229, 188, 110, 0.28);
  --seer: #7cc0ff;
  --seer-soft: rgba(124, 192, 255, 0.14);
  --wolf: #e86259;
  --wolf-soft: rgba(232, 98, 89, 0.16);
  --villager: #dec9a4;
  --villager-soft: rgba(222, 201, 164, 0.14);
  --yes: #34b27b;
  --no: #d9534f;
  --maybe: #df9a3c;
  --close: #e8b339;
  --off: #6396cc;
  --line: rgba(243, 237, 224, 0.11);
  --shadow: 0 18px 44px rgba(3, 5, 12, 0.55);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 500px at 50% -140px, rgba(229, 188, 110, 0.12), transparent 65%),
    radial-gradient(700px 500px at 100% 10%, rgba(124, 192, 255, 0.08), transparent 60%),
    radial-gradient(600px 480px at 0% 100%, rgba(232, 98, 89, 0.07), transparent 65%),
    var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--gold);
  text-decoration: none;
}

.app-shell {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 14px 42px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Top Navigation Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(23, 29, 46, 0.78);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mini .sub-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
  white-space: nowrap;
}

.icon-btn:hover {
  background: rgba(229, 188, 110, 0.12);
  border-color: var(--gold-line);
  color: var(--ink);
}

/* Panels & Cards */
.panel {
  background: linear-gradient(180deg, rgba(30, 37, 59, 0.92), rgba(20, 25, 40, 0.96));
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(246, 224, 176, 0.09);
  position: relative;
}

.panel-soft {
  background: rgba(23, 29, 46, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}

.hero {
  text-align: center;
  padding: 24px 18px 20px;
}

.hero-crest {
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 188, 110, 0.18), rgba(229, 188, 110, 0.02) 70%);
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 6vw, 34px);
  letter-spacing: 0.12em;
  color: var(--ink);
}

.hero p {
  margin: 8px auto 0;
  max-width: 420px;
  color: var(--ink-muted);
  font-size: 14px;
}

/* Section Headers */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.muted {
  color: var(--ink-muted);
  font-size: 13px;
}

.dim {
  color: var(--ink-dim);
  font-size: 12px;
}

/* Inputs & Controls */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(243, 237, 224, 0.18);
  background: rgba(11, 14, 23, 0.72);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 188, 110, 0.18);
}

.input-code {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 700;
  text-align: center;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, background 0.16s, border-color 0.16s, opacity 0.16s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}

.btn-primary {
  background: linear-gradient(135deg, #ebc77e, #c99945);
  color: #15120c;
  box-shadow: 0 6px 20px rgba(229, 188, 110, 0.24);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f3d28f, #d7a853);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--gold-line);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(229, 188, 110, 0.14);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-muted);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.btn-danger {
  background: rgba(232, 98, 89, 0.15);
  border-color: rgba(232, 98, 89, 0.45);
  color: #ff9c96;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(232, 98, 89, 0.26);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-row > .btn {
  flex: 1 1 130px;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-mayor {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-line);
}

.badge-seer {
  background: var(--seer-soft);
  color: var(--seer);
  border: 1px solid rgba(124, 192, 255, 0.35);
}

.badge-wolf {
  background: var(--wolf-soft);
  color: var(--wolf);
  border: 1px solid rgba(232, 98, 89, 0.4);
}

.badge-villager {
  background: var(--villager-soft);
  color: var(--villager);
  border: 1px solid rgba(222, 201, 164, 0.3);
}

.badge-ok {
  background: rgba(52, 178, 123, 0.16);
  color: #6ee0ac;
  border: 1px solid rgba(52, 178, 123, 0.35);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

/* Room Code Header & Invite Box */
.room-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(11, 14, 23, 0.65);
  border: 1px solid var(--gold-line);
  margin-bottom: 14px;
}

.room-code-big {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(11, 14, 23, 0.6);
  border: 1px solid var(--line);
  margin-top: 10px;
}

.qr-frame {
  background: #f8f5ee;
  padding: 10px;
  border-radius: 12px;
  display: inline-flex;
}

.qr-frame svg {
  display: block;
  width: 172px;
  height: 172px;
}

.invite-url-text {
  width: 100%;
  font-size: 12px;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
  text-align: center;
  user-select: all;
}

/* Member Roster */
.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.seat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(11, 14, 23, 0.55);
  border: 1px solid var(--line);
  min-width: 0;
}

.seat-card.is-me {
  border-color: var(--gold-line);
  background: rgba(229, 188, 110, 0.08);
}

.seat-name-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-on {
  background: #3dd598;
  box-shadow: 0 0 8px rgba(61, 213, 152, 0.7);
}

.dot-off {
  background: #6f778c;
}

.seat-name {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kick-btn {
  border: none;
  background: rgba(232, 98, 89, 0.14);
  color: #ff9c96;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.kick-btn:hover {
  background: rgba(232, 98, 89, 0.3);
}

/* Segmented Pills & Settings */
.seg-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg-btn {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 23, 0.55);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s;
}

.seg-btn.active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}

details.drawer {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(11, 14, 23, 0.45);
  margin-top: 12px;
}

details.drawer > summary {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

details.drawer > summary::after {
  content: "▾";
  color: var(--gold);
}

details.drawer[open] > summary::after {
  content: "▴";
}

.drawer-body {
  padding: 4px 14px 14px;
  border-top: 1px solid var(--line);
}

/* Signature Hold-to-Reveal Tarot Card */
.hold-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 10px 0;
}

.secret-card {
  width: 100%;
  max-width: 340px;
  min-height: 292px;
  border-radius: 22px;
  border: 1.5px solid var(--gold-line);
  background:
    radial-gradient(circle at 50% 0%, rgba(229, 188, 110, 0.14), transparent 58%),
    linear-gradient(165deg, #1b2236, #101522);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55), inset 0 0 0 6px rgba(229, 188, 110, 0.04);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.18s, box-shadow 0.18s;
}

.secret-card.holding {
  transform: scale(0.985);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 188, 110, 0.25), 0 18px 42px rgba(0, 0, 0, 0.6);
}

.secret-card.role-wolf.holding {
  border-color: var(--wolf);
  box-shadow: 0 0 0 3px rgba(232, 98, 89, 0.28), 0 18px 42px rgba(0, 0, 0, 0.6);
}

.secret-card.role-seer.holding {
  border-color: var(--seer);
  box-shadow: 0 0 0 3px rgba(124, 192, 255, 0.28), 0 18px 42px rgba(0, 0, 0, 0.6);
}

.role-art {
  width: 92px;
  height: 92px;
  margin-bottom: 10px;
}

.role-wolf { color: var(--wolf); }
.role-seer { color: var(--seer); }
.role-villager { color: var(--villager); }
.role-mayor { color: var(--gold); }

.secret-card .card-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 4px 0;
  color: var(--ink);
}

.secret-card .card-desc {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 6px 0 0;
  max-width: 260px;
}

.hold-hint-pill {
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.word-reveal-box {
  margin-top: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(11, 14, 23, 0.72);
  border: 1px solid var(--gold-line);
}

.word-reveal-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.word-reveal-text {
  font-family: var(--font-serif);
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-top: 2px;
  word-break: break-word;
}

/* Giant Word Stage (Mayor Night / Local Night) */
.giant-word {
  font-family: var(--font-serif);
  font-size: clamp(32px, 9vw, 52px);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-align: center;
  padding: 18px 14px;
  margin: 10px 0;
  border-radius: var(--radius-md);
  background: rgba(11, 14, 23, 0.75);
  border: 1px solid var(--gold-line);
  word-break: break-word;
}

.word-choices {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.word-choice-btn {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gold-line);
  background: linear-gradient(135deg, rgba(229, 188, 110, 0.11), rgba(23, 29, 46, 0.85));
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.16s, background 0.16s;
}

.word-choice-btn:hover {
  border-color: var(--gold);
  background: rgba(229, 188, 110, 0.22);
  transform: translateY(-1px);
}

/* Countdown Clock (Zero Digit Jitter) */
.clock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px;
  border-radius: var(--radius-md);
  background: rgba(11, 14, 23, 0.72);
  border: 1px solid var(--gold-line);
  margin-bottom: 14px;
}

.clock-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(42px, 12vw, 58px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: var(--ink);
}

.clock-display.urgent {
  color: var(--wolf);
  animation: pulseUrgent 1s ease-in-out infinite;
}

.clock-display.paused {
  color: var(--ink-muted);
}

@keyframes pulseUrgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.62; }
}

.stock-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.stock-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

/* Day Mayor Token Console */
.target-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.target-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 23, 0.6);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s;
}

.target-chip.selected {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.token-grid-sub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.token-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 62px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s;
  user-select: none;
}

.token-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.token-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.token-btn .t-main { font-size: 17px; white-space: nowrap; }
.token-grid-sub .token-btn .t-main { font-size: 14px; white-space: nowrap; }
.token-btn .t-sub { font-size: 11px; opacity: 0.85; font-variant-numeric: tabular-nums; }

.token-yes { background: rgba(52, 178, 123, 0.2); border-color: rgba(52, 178, 123, 0.65); color: #7af0bc; }
.token-no { background: rgba(217, 83, 79, 0.2); border-color: rgba(217, 83, 79, 0.65); color: #ff9c97; }
.token-maybe { background: rgba(223, 154, 60, 0.18); border-color: rgba(223, 154, 60, 0.6); color: #ffd089; }
.token-close { background: rgba(232, 179, 57, 0.2); border-color: rgba(232, 179, 57, 0.65); color: #ffe08a; }
.token-off { background: rgba(99, 150, 204, 0.2); border-color: rgba(99, 150, 204, 0.65); color: #a7d2ff; }

/* Token History Timeline */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(11, 14, 23, 0.5);
  border: 1px solid var(--line);
  font-size: 13px;
}

.history-order {
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: var(--ink-dim);
  font-size: 12px;
  margin-right: 6px;
}

/* Vote & Hunt Target Grid */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: rgba(11, 14, 23, 0.6);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s;
}

.choice-card:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(229, 188, 110, 0.14);
}

.choice-card.selected {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

/* Settlement Banner */
.victory-banner {
  text-align: center;
  padding: 20px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 1.5px solid var(--gold-line);
  background: radial-gradient(circle at 50% 0%, rgba(229, 188, 110, 0.2), rgba(11, 14, 23, 0.7));
}

.victory-banner.team-wolf {
  border-color: rgba(232, 98, 89, 0.55);
  background: radial-gradient(circle at 50% 0%, rgba(232, 98, 89, 0.24), rgba(11, 14, 23, 0.75));
}

.victory-banner h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: 0.08em;
}

.result-table {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(11, 14, 23, 0.55);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}

.result-row.flipped {
  border-color: var(--wolf);
  background: rgba(232, 98, 89, 0.1);
}

/* Anti-tell Daytime Secret Bar */
.peek-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--gold-line);
  background: rgba(229, 188, 110, 0.07);
  margin-bottom: 12px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: pointer;
}

.peek-bar.holding {
  border-style: solid;
  border-color: var(--gold);
  background: rgba(229, 188, 110, 0.18);
}

/* Toast & Modal */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: min(92vw, 440px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 25, 40, 0.96);
  border: 1px solid var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 90;
  text-align: center;
}

.toast.error {
  border-color: var(--wolf);
  color: #ffb3ae;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 13, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 80;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 84dvh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.rules-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 440px) {
  .brand-mini .sub-tag {
    display: none;
  }
  .topbar {
    padding: 7px 10px;
  }
  .icon-btn {
    padding: 0 8px;
    font-size: 11.5px;
  }
}

@media (max-width: 360px) {
  .app-shell {
    padding: 10px 10px 32px;
  }
  .panel {
    padding: 16px 13px;
  }
  .brand-mini {
    font-size: 14px;
    gap: 5px;
  }
  .icon-btn {
    padding: 0 7px;
    font-size: 11px;
  }
  .roster {
    grid-template-columns: 1fr;
  }
  .token-grid-sub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .token-grid-sub .token-btn .t-main {
    font-size: 12.5px;
  }
}
