@font-face {
  font-family: 'Charter';
  src: local('Charter'), local('Charter Roman'), local('Bitstream Charter');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Charter';
  src: local('Charter Italic'), local('Bitstream Charter Italic');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Charter';
  src: local('Charter Bold'), local('Bitstream Charter Bold');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0b0a;
  --bg2: #16120f;
  --bg3: #1f1a16;
  --panel: rgba(255, 215, 100, 0.03);
  --panel2: rgba(255, 215, 100, 0.05);
  --border: rgba(212, 175, 85, 0.2);
  --border-light: rgba(255, 215, 100, 0.1);
  --border-dark: rgba(0, 0, 0, 0.8);
  --text: #e6e1cf;
  --muted: #b0a490;
  --muted2: #7a6e5d;
  --shadow-sharp: 0 1px 3px rgba(0, 0, 0, 0.6);
  --shadow-diffuse: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-combined: 0 2px 6px rgba(0, 0, 0, 0.6), 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-inset-light: inset 0 1px 0 rgba(255, 215, 100, 0.04);
  --radius: 4px;
  --accent-cool: #8eb8d8;
  --focus: 0 0 0 3px #f0c050;
  --ok: #6dba7a;
  --bad: #e87060;
  --gold: #f0c050;
  --gold2: rgba(255, 200, 80, 0.1);
  --accent: #eaca60;
  --accent2: #c49a30;
  --glow-gold: 0 0 20px rgba(255, 200, 80, 0.25), 0 0 40px rgba(255, 180, 50, 0.1);
  --glow-gold-soft: 0 0 12px rgba(255, 200, 80, 0.15);
  --glow-gold-intense: 0 0 30px rgba(255, 200, 80, 0.4), 0 0 60px rgba(255, 180, 50, 0.2);
  --progress: 0;
}

* {
  box-sizing: border-box;
}

html {
  background-color: #050403;
}

body {
  margin: 0;
  font-family: Charter, 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  color: var(--text);
  background: transparent;
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
}

#parchmentTexture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  transition: background 1.5s ease-in-out;
  /* Default sober background - overridden by JS for dynamic effects */
  background: radial-gradient(circle at 50% 30%, rgba(20, 16, 12, 1) 0%, rgba(5, 4, 3, 1) 80%);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--bg2);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 0 0 4px 0;
  border: 2px solid var(--accent);
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
}

.skip-link:focus {
  top: 0;
  opacity: 1;
  outline: none;
  box-shadow: var(--focus);
}

.wrap {
  max-width: 800px;
  margin: 24px auto;
  padding: 0 20px calc(48px + env(safe-area-inset-bottom)) 20px;
  position: relative;
  z-index: 1;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.header-logo-link {
  display: none;
}

.header-logo {
  display: block;
  width: 32px;
  height: 32px;
}

.title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: -0.02em;
  text-shadow: 0 0 15px rgba(255, 200, 80, 0.4), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.title .sub {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(0, 0, 0, 0.6);
  outline: 1px solid rgba(255, 255, 255, 0.03);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: var(--shadow-sharp), var(--shadow-inset);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted2);
}

.dot.ok {
  background: var(--ok);
}

.dot.bad {
  background: var(--bad);
}

.btn {
  border: 1px solid rgba(0, 0, 0, 0.6);
  outline: 1px solid rgba(255, 255, 255, 0.03);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  color: var(--text);
  padding: 8px 14px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s, background-color 0.2s;
  box-shadow: var(--shadow-combined), var(--shadow-inset);
}

.btn:hover {
  border-color: var(--accent-cool);
  background: linear-gradient(to bottom, rgba(170, 195, 216, 0.08), rgba(170, 195, 216, 0.04));
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(170, 195, 216, 0.2), var(--shadow-combined), inset 0 0 12px rgba(170, 195, 216, 0.1);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), var(--shadow-inset);
}

.btn.primary {
  background: linear-gradient(to bottom, rgba(255, 200, 80, 0.18), rgba(255, 180, 50, 0.08));
  border-color: var(--accent);
  border-top-color: var(--gold);
  border-bottom-color: var(--accent2);
  color: var(--gold);
  box-shadow: var(--shadow-combined), var(--shadow-inset-light), var(--glow-gold-soft);
}

.btn.primary:hover {
  background: linear-gradient(to bottom, rgba(255, 200, 80, 0.28), rgba(255, 180, 50, 0.15));
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: var(--glow-gold), var(--shadow-combined), inset 0 0 16px rgba(255, 200, 80, 0.15);
}

.btn.primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), var(--shadow-inset);
}

.btn:focus {
  outline: none;
  box-shadow: var(--focus);
}

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

.error {
  display: none;
  border: 1px solid rgba(237, 146, 128, 0.3);
  background: rgba(237, 146, 128, 0.08);
  padding: 10px 12px;
  border-radius: 3px;
  margin: 10px 0;
  white-space: pre-wrap;
  font-size: 13px;
  color: var(--bad);
}

.grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 20px;
}

.card {
  border: none;
  background: transparent;
  padding: 0;
}

.card h2 {
  margin: 0 0 14px 0;
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  font-style: italic;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 10px rgba(255, 200, 80, 0.25), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hintBox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}

.hints {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hints li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--border-dark);
  border-left: 3px solid var(--gold);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  border-radius: 0 4px 4px 0;
  margin-bottom: 4px;
  box-shadow: var(--shadow-inset), -3px 0 10px rgba(255, 200, 80, 0.1);
}

.guess-enter {
  transform: translateY(8px) scale(0.995);
  opacity: 0;
  transition: transform 380ms cubic-bezier(.2, .9, .2, 1), opacity 320ms ease-out;
}

.guess-enter.show {
  transform: none;
  opacity: 1;
}

.rowItem.best {
  transform-origin: left center;
  transition: transform 420ms cubic-bezier(.2, .9, .2, 1), box-shadow 420ms;
}

.rowItem.best.best-anim {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(212, 175, 85, 0.15);
}

.btn.loading {
  opacity: 0.7;
  transform: translateY(1px) scale(0.995);
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 85, 0.2);
  border-top-color: var(--gold);
  animation: spin 800ms linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.hints li.revealed {
  box-shadow: -3px 0 15px rgba(255, 200, 80, 0.2), 0 4px 12px rgba(255, 200, 80, 0.1);
  transition: box-shadow 520ms ease;
}

.hints li.glow {
  animation: hintGlow 900ms ease-out;
}

@keyframes hintGlow {
  0% {
    box-shadow: -3px 0 10px rgba(255, 200, 80, 0.1)
  }

  40% {
    box-shadow: -3px 0 25px rgba(255, 200, 80, 0.35), 0 8px 25px rgba(255, 200, 80, 0.2)
  }

  100% {
    box-shadow: -3px 0 15px rgba(255, 200, 80, 0.15), 0 4px 10px rgba(255, 200, 80, 0.08)
  }
}

.hnum {
  width: 24px;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.htext {
  color: var(--text);
  font-weight: 400;
  flex: 1;
  line-height: 1.5;
  font-size: 15px;
}

.htype {
  display: inline-block;
  background: linear-gradient(to bottom, rgba(255, 200, 80, 0.18), rgba(255, 180, 50, 0.08));
  border: 1px solid var(--accent2);
  border-top-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: var(--shadow-sharp), inset 0 1px 0 rgba(255, 200, 80, 0.1), 0 0 6px rgba(255, 200, 80, 0.1);
}

.btn-reveal {
  flex-grow: 1;
  text-align: center;
  font-size: 13px;
  padding: 8px 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: repeating-linear-gradient(
    45deg,
    var(--bg3),
    var(--bg3) 10px,
    var(--bg2) 10px,
    var(--bg2) 20px
  );
  color: var(--muted);
}

.btn-reveal span {
  position: relative;
  z-index: 2;
}

.btn-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  border-right: 1px solid rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-reveal:hover {
  color: var(--gold);
  border-color: var(--gold);
  border-style: solid;
  background: var(--bg3);
}

.hintMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.stats, .stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 260px;
  will-change: transform;
}

.statBox {
  border: none;
  border-left: 2px solid var(--gold);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  padding: 10px 14px;
  text-align: right;
  border-radius: 0 4px 4px 0;
  box-shadow: var(--shadow-inset), -2px 0 8px rgba(255, 200, 80, 0.1);
}

.statLabel {
  font-size: 10px;
  color: var(--muted2);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.statValue {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  border: none;
  margin-top: 8px;
}

.bar>div {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 400ms ease;
}

.inputRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.input {
  border: 1px solid rgba(0, 0, 0, 0.6);
  outline: 1px solid rgba(255, 255, 255, 0.03);
  border-top-color: var(--border-dark);
  border-bottom-color: var(--border-light);
  background: linear-gradient(to bottom, var(--bg2), var(--bg3));
  color: var(--text);
  padding: 12px 14px;
  border-radius: 3px;
  font-size: 16px;
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 200, 80, 0.25), var(--focus), inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.input::placeholder {
  color: var(--muted2);
}

.listHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.listHeader .meta {
  color: var(--muted2);
  font-size: 12px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.list {
  margin-top: 10px;
  border: 1px solid rgba(0, 0, 0, 0.6);
  outline: 1px solid rgba(255, 255, 255, 0.03);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  max-height: 300px;
  overflow-y: auto;
  box-shadow: var(--shadow-sharp), var(--shadow-inset);
}

.rowItem {
  display: grid;
  grid-template-columns: 44px 1fr 72px 80px;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 14px;
}

.rowItem:last-child {
  border-bottom: none;
}

.idx {
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.word {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 15px;
}

.badge {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  background: linear-gradient(to bottom, var(--panel2), rgba(240, 220, 180, 0.05));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: var(--shadow-sharp), var(--shadow-inset);
}

.heat {
  justify-self: end;
  color: var(--muted2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.rowItem.best {
  background: var(--gold2);
  border-left: 3px solid var(--gold);
  box-shadow: inset 0 0 15px rgba(255, 200, 80, 0.08), -3px 0 12px rgba(255, 200, 80, 0.15);
}

.rowItem.best .badge {
  background: rgba(255, 200, 80, 0.15);
  color: var(--gold);
  box-shadow: 0 0 8px rgba(255, 200, 80, 0.15);
}

@keyframes popGlow {
  0% {
    transform: translateY(0)
  }

  30% {
    transform: translateY(-2px)
  }

  100% {
    transform: translateY(0)
  }
}

@keyframes hintFlash {
  0% {
    opacity: 0.5
  }

  100% {
    opacity: 1
  }
}

.hintPop {
  animation: popGlow 400ms ease;
}

.hints li.newHint {
  animation: hintFlash 500ms ease;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 3, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  will-change: opacity;
}

.modal {
  width: 100%;
  max-width: 500px;
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  border: 1px solid rgba(0, 0, 0, 0.6);
  outline: 1px solid rgba(255, 255, 255, 0.03);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  border-radius: 3px;
  padding: 24px;
  box-shadow: var(--shadow-combined), var(--shadow-inset);
  will-change: transform, opacity;
  animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.modal p {
  margin: 0 0 14px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

code {
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  border: 1px solid var(--border);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--gold);
  font-size: 12px;
  font-family: ui-monospace, monospace;
  box-shadow: var(--shadow-inset);
}

.win-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  background: rgba(5, 4, 3, 0.96);
  will-change: opacity;
}

.win-card {
  width: 100%;
  max-width: 460px;
  border-radius: 4px;
  border: 1px solid var(--gold);
  outline: 1px solid rgba(0, 0, 0, 0.6);
  border-top-color: var(--gold);
  border-bottom-color: var(--accent2);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  box-shadow: var(--glow-gold), var(--shadow-combined), var(--shadow-inset);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transform: translateY(6px);
  opacity: 0;
  animation: winIn 350ms ease-out forwards;
  will-change: transform, opacity;
}

@keyframes winIn {
  to {
    transform: translateY(0);
    opacity: 1
  }
}

.win-card::before {
  display: none;
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  max-height: 40vh;
  overflow-y: auto;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  will-change: transform;
  overscroll-behavior: contain;
}

.campaign-card {
  border: 1px solid rgba(0, 0, 0, 0.6);
  outline: 1px solid rgba(255, 255, 255, 0.03);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  border-radius: 3px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-combined), var(--shadow-inset);
}

.campaign-card:hover {
  border-color: var(--gold);
  border-top-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold-soft), var(--shadow-combined), inset 0 0 12px rgba(255, 200, 80, 0.08);
}

.campaign-card:focus {
  outline: none;
  box-shadow: var(--focus);
}

.campaign-card.selected {
  border-color: var(--gold);
  background: var(--gold2);
  box-shadow: var(--glow-gold-soft), 0 0 0 1px var(--gold), inset 0 0 16px rgba(255, 200, 80, 0.1);
}

.campaign-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.campaign-card.locked .lock-icon {
  display: block;
}

/* Coming soon: verrouillé avec cadenas */
.campaign-card.coming-soon {
  opacity: 0.7;
  cursor: not-allowed;
}

.campaign-card.coming-soon .lock-icon {
  display: block;
}

.campaign-card h4 {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.campaign-score {
  font-size: 12px;
  color: var(--muted2);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.campaign-score b {
  color: var(--gold);
  font-weight: 700;
}

.lock-icon {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  opacity: 0.35;
}

.campaign-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--gold);
  color: var(--bg);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.win-top {
  position: relative;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.win-title {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 200, 80, 0.4), 0 0 24px rgba(255, 180, 50, 0.2), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.win-burst {
  display: none;
}

.win-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.win-list {
  position: relative;
  margin: 16px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.win-li {
  border: none;
  border-left: 2px solid var(--gold);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  padding: 10px 14px;
  border-radius: 0 3px 3px 0;
  box-shadow: var(--shadow-inset);
}

.win-li .k {
  font-size: 10px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.win-li .v {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  white-space: pre-wrap;
}

/* New Particle System CSS */
.particle-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  display: none;
}

#bonusDisplay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  pointer-events: none;
  font-size: 42px;
  font-weight: 700;
  color: var(--gold);
  opacity: 0;
  transition: none;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  text-shadow: 0 0 20px rgba(255, 200, 80, 0.5), 0 0 40px rgba(255, 180, 50, 0.25), 0 4px 8px rgba(0, 0, 0, 0.8);
  text-align: center;
}

@keyframes bonusPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8)
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1)
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(1)
  }
}

#bonusDisplay.show {
  animation: bonusPop 1.2s ease-out forwards;
}

#bonusDisplay.lost {
  color: var(--bad);
}

#bonusDisplay.bonus {
  color: var(--gold);
}

.btn.warning {
  background: transparent;
  border-color: rgba(237, 146, 128, 0.3);
  color: var(--bad);
}

.btn.warning:hover {
  background: rgba(237, 146, 128, 0.1);
  border-color: var(--bad);
}

#startDailyBtn:hover {
  background: var(--gold2);
  border-color: var(--accent);
}

.help-modal {
  max-height: 85vh;
  overflow-y: auto;
}

.help-section {
  margin-bottom: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.help-section:last-of-type {
  border-bottom: none;
}

.help-subtitle {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  font-style: italic;
}

.help-list {
  margin: 8px 0;
  padding-left: 20px;
  line-height: 1.6;
  color: var(--muted);
  font-size: 14px;
}

.help-list li {
  margin-bottom: 6px;
}

.help-list strong {
  color: var(--text);
  font-weight: 600;
}

kbd {
  display: inline-block;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

@media (max-width:720px) {
  /* Prevent iOS auto-zoom on inputs */
  .input, #guessInput {
    font-size: 16px;
  }

  .wrap {
    padding: 0 10px 40px 10px;
    margin-top: 12px;
  }

  .header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    gap: 8px;
    justify-content: center;
  }

  .header-logo-link {
    display: none;
  }

  .title {
    display: none;
  }

  .header .right {
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto; /* Allow scroll if needed, though we try to fit */
  }

  .header .btn, .header .pill {
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* Compact hints: 1 column */
  .hints {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .hints li {
    margin-bottom: 0;
    padding: 6px;
    border-radius: 4px;
    align-items: center;
  }

  .btn-reveal {
    padding: 6px 8px;
    font-size: 12px;
  }

  .hnum {
    font-size: 11px;
    width: 18px;
  }

  .htext {
    font-size: 12px;
    line-height: 1.3;
  }

  /* Compact stats */
  .stats {
    grid-template-columns: 1fr;
    min-width: 85px;
    gap: 6px;
  }

  .statBox {
    padding: 6px 8px;
  }

  .statLabel {
    font-size: 8px;
    margin-bottom: 2px;
  }

  .statValue {
    font-size: 15px;
  }

  .bar {
    margin-top: 4px;
    height: 3px;
  }

  .hintBox {
    gap: 12px;
    margin-bottom: 12px; /* reduced from implicit */
  }

  .card h2 {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .rowItem {
    grid-template-columns: 36px 1fr 60px 60px;
    padding: 8px;
    font-size: 12px;
  }

  /* Tour / Onboarding mobile adjustments */
  .tour-bubble {
    width: 280px;
    padding: 16px 14px 14px;
    max-width: 92vw;
  }

  .tour-bubble.compact-step {
    padding: 14px 12px 12px;
  }

  .tour-bubble h3 {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .tour-bubble.compact-step h3 {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .tour-bubble p {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .tour-bubble.compact-step p {
    font-size: 12px;
    line-height: 1.35;
    margin-bottom: 6px;
  }

  .tour-controls {
    margin-top: 10px;
    padding-top: 10px;
  }

  .tour-bubble.compact-step .tour-controls {
    margin-top: 8px;
    padding-top: 8px;
  }

  /* Mobile Performance Optimizations */
  .hints li.glow {
    animation: none !important;
    box-shadow: inset 0 0 0 1px var(--gold) !important;
    transition: none !important;
  }

  .highlight-pulse {
    box-shadow: 0 0 0 2px var(--gold) !important;
  }

  .win-card, .modal, .menu-wrap, .campaign-card, .btn {
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
  }

  .menu-title, .win-title, #bonusDisplay, .card h2 {
    text-shadow: none !important;
  }

  .campaign-card:hover {
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
  }
}

/* Glow animation for score */
@keyframes glowPulse {
  0% {
    transform: scale(1)
  }

  25% {
    transform: scale(1.06)
  }

  50% {
    transform: scale(1)
  }

  75% {
    transform: scale(1.06)
  }

  100% {
    transform: scale(1)
  }
}

.glow-pulse {
  animation: glowPulse 800ms ease-out;
  display: inline-block;
}

/* Style for too expensive hints */
.btn-reveal.too-expensive {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(237, 146, 128, 0.05);
  border-color: rgba(237, 146, 128, 0.15);
}

.btn-reveal.too-expensive:hover {
  background: rgba(237, 146, 128, 0.05);
  border-color: rgba(237, 146, 128, 0.15);
}

/* ============================================ */
/* PAGE SYSTEM - Navigation between menu/game  */
/* ============================================ */
.page {
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Menu Page Styles */
#menuPage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom)) 24px;
}

.menu-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  border: 1px solid var(--border);
  outline: 1px solid rgba(0, 0, 0, 0.6);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  border-radius: 4px;
  padding: 32px;
  box-shadow: var(--glow-gold-soft), var(--shadow-combined), var(--shadow-inset);
}

.menu-title {
  font-size: 32px;
  text-align: center;
  margin: 0 0 6px 0;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(255, 200, 80, 0.5), 0 0 40px rgba(255, 180, 50, 0.25), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.menu-subtitle {
  text-align: center;
  margin: 0 0 28px 0;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

.menu-header-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-token-pill {
  cursor: pointer;
  padding: 8px 14px;
  font-size: 13px;
  background: var(--gold2);
  border: 1px solid var(--gold);
  transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-token-pill:hover {
  background: rgba(212, 175, 85, 0.18);
}

.menu-section {
  margin-bottom: 20px;
}

.menu-label {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
}

.menu-daily-btn {
  width: 100%;
  font-size: 15px;
  padding: 14px;
}

.start-btn-sticky {
  position: fixed;
  bottom: calc(40px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  z-index: 100;
  width: min(calc(100% - 128px), 430px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.start-btn-sticky.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.start-btn-sticky .menu-start-btn {
  border-radius: 10px;
  background: linear-gradient(to bottom, rgb(80, 68, 32), rgb(56, 48, 24)) !important;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.6), 0 0 14px rgba(240, 200, 96, 0.2);
}

.menu-start-btn {
  width: 100%;
  font-size: 15px;
  padding: 14px;
}

.menu-next-puzzle {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  font-style: italic;
}

.menu-next-puzzle span {
  color: var(--gold);
  font-weight: 600;
}

/* Resume Game Button */
#resumeGameSection {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.resume-game-btn {
  flex: 1;
  font-size: 15px;
  padding: 14px;
}

.resume-text {
  font-weight: normal;
  font-size: 12px;
  color: var(--muted);
}

.btn-abandon {
  padding: 14px 16px;
}

.btn-abandon:hover {
  border-color: var(--bad);
  transform: translateY(-1px);
}

/* Game Page - inherits existing styles */
#gamePage .wrap {
  max-width: 920px;
  margin: 22px auto;
  padding: 0 14px 40px 14px;
}

/* Responsive adjustments for menu */
@media (max-width: 720px) {
  .menu-wrap {
    padding: 16px;
  }

  .menu-title {
    font-size: 26px;
  }

  .menu-header-actions {
    gap: 10px;
  }

  .menu-header-actions .btn {
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* ============================================ */
/* STRIPE ELEMENTS - In-Game Payment Form      */
/* ============================================ */
.stripe-card-element {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 14px 16px;
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stripe-card-element:focus-within {
  border-color: var(--accent-cool);
  box-shadow: var(--focus);
}

.stripe-card-element.StripeElement--invalid {
  border-color: var(--bad);
}

#card-errors {
  color: var(--bad);
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
}

#paymentProcessing {
  text-align: center;
  padding: 20px;
}

#paymentProcessing p {
  margin: 0;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  vertical-align: middle;
  transform: scale(1.25);
}

.site-legal-footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  padding: 12px 0;
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.02)
}

.site-legal-footer a {
  color: var(--muted);
  text-decoration: underline
}

label[for="acceptTermsCheckbox"] a {
  color: var(--gold);
  text-decoration: underline
}

/* ============================================ */
/* MENU REFINEMENTS - Soft, harmonious styling */
/* ============================================ */

/* Difficulty buttons - premium feel */
.difficulty-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  color: var(--muted);
  font-weight: 500;
  box-shadow: var(--shadow-sharp), var(--shadow-inset);
}

.difficulty-btn:hover {
  border-color: var(--accent-cool);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(170, 195, 216, 0.2), var(--shadow-combined), inset 0 0 10px rgba(170, 195, 216, 0.08);
}

.difficulty-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), var(--shadow-inset);
}

.difficulty-btn.selected {
  border-color: var(--accent2);
  border-top-color: var(--gold);
  background: linear-gradient(to bottom, rgba(240, 200, 96, 0.12), rgba(240, 200, 96, 0.06));
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-combined), inset 0 0 14px rgba(240, 200, 96, 0.12);
}

/* Daily button - premium warm glow */
.menu-daily-btn {
  background: linear-gradient(to bottom, rgba(240, 200, 96, 0.12), rgba(240, 200, 96, 0.06)) !important;
  border: 1px solid var(--accent2) !important;
  border-top-color: var(--gold) !important;
  border-bottom-color: var(--accent2) !important;
  color: var(--accent) !important;
  box-shadow: var(--shadow-combined), inset 0 0 16px rgba(212, 175, 85, 0.06) !important;
}

.menu-daily-btn:hover {
  background: linear-gradient(to bottom, rgba(240, 200, 96, 0.18), rgba(240, 200, 96, 0.1)) !important;
  border-color: var(--gold) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(240, 200, 96, 0.35), var(--shadow-combined), inset 0 0 20px rgba(240, 200, 96, 0.12) !important;
}

.menu-daily-btn:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), var(--shadow-inset) !important;
}

/* Campaign category cards - premium depth (override base styles) */
.campaign-grid .campaign-card {
  border: 1px solid var(--border);
  border-top-color: var(--border-light);
  border-bottom-color: var(--border-dark);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  box-shadow: var(--shadow-combined), var(--shadow-inset);
}

.campaign-grid .campaign-card:hover:not(.locked) {
  border-color: var(--accent);
  border-top-color: var(--gold);
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  transform: translateY(-1px);
  box-shadow: var(--shadow-combined), inset 0 0 10px rgba(232, 200, 104, 0.06);
}

.campaign-grid .campaign-card.selected {
  border-color: var(--gold);
  border-top-color: var(--gold);
  background: linear-gradient(to bottom, rgba(240, 200, 96, 0.12), rgba(240, 200, 96, 0.06));
  box-shadow: var(--shadow-combined), inset 0 0 14px rgba(240, 200, 96, 0.1);
}

/* Start button states */
.menu-start-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-start-btn:disabled {
  background: linear-gradient(to bottom, var(--bg3), var(--bg2)) !important;
  border-color: var(--border) !important;
  border-top-color: var(--border-light) !important;
  border-bottom-color: var(--border-dark) !important;
  color: var(--muted2) !important;
  opacity: 0.5;
  box-shadow: var(--shadow-sharp), var(--shadow-inset) !important;
}

.menu-start-btn:not(:disabled) {
  background: linear-gradient(to bottom, rgba(240, 200, 96, 0.15), rgba(240, 200, 96, 0.08));
  border-color: var(--accent2);
  border-top-color: var(--gold);
  border-bottom-color: var(--accent2);
  color: var(--accent);
  box-shadow: var(--shadow-combined), inset 0 0 14px rgba(240, 200, 96, 0.1);
}

.menu-start-btn:not(:disabled):hover {
  background: linear-gradient(to bottom, rgba(240, 200, 96, 0.25), rgba(240, 200, 96, 0.12));
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(240, 200, 96, 0.35), var(--shadow-combined), inset 0 0 18px rgba(240, 200, 96, 0.18);
}

.menu-start-btn:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), var(--shadow-inset);
}

/* Decorative corners for premium feel */
.modal:not(.tour-backdrop)::before,
.modal:not(.tour-backdrop)::after,
.menu-wrap::before,
.menu-wrap::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
  opacity: 0.5;
  box-shadow: 0 0 6px rgba(255, 200, 80, 0.25);
}

.modal:not(.tour-backdrop)::before,
.menu-wrap::before {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
}

.modal:not(.tour-backdrop)::after,
.menu-wrap::after {
  top: 8px;
  right: 8px;
  border-left: none;
  border-bottom: none;
}

.campaign-card::before,
.campaign-card::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  opacity: 0.25;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.campaign-card::before {
  bottom: 6px;
  left: 6px;
  border-right: none;
  border-top: none;
}

.campaign-card::after {
  bottom: 6px;
  right: 6px;
  border-left: none;
  border-top: none;
}

.campaign-card:hover::before,
.campaign-card:hover::after {
  opacity: 0.5;
}

/* Level Popup Display */
#levelDisplay {
  position: fixed;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9998;
  pointer-events: none;
  font-size: 64px;
  font-weight: 700;
  color: var(--gold);
  opacity: 0;
  text-shadow: 0 0 25px rgba(255, 200, 80, 0.6), 0 0 50px rgba(255, 180, 50, 0.35), 0 0 80px rgba(255, 160, 30, 0.15), 0 4px 10px rgba(0, 0, 0, 0.8);
  font-family: Charter, 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
}

@keyframes levelPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }

  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }

  40% {
    transform: translate(-50%, -50%) scale(1);
  }

  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.95);
  }
}

#levelDisplay.show {
  animation: levelPop 1.8s ease-out forwards;
}

/* Game Panel - Fond premium subtil */
.game-panel {
  background: rgba(30, 25, 20, 0.4);
  border: 1px solid rgba(200, 170, 120, 0.1);
  border-radius: 6px;
  padding: 20px;
  margin-top: 8px;
}

/* ============================================ */
/* INTERACTIVE TUTORIAL / TOUR                 */
/* ============================================ */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10100;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tour-backdrop.visible {
  display: block;
  opacity: 1;
}

.tour-highlight {
  position: relative;
  z-index: 10101 !important;
  box-shadow: 0 0 0 2px var(--gold), 0 0 15px rgba(0, 0, 0, 0.5) !important;
  pointer-events: auto;
  transition: box-shadow 0.3s ease;
}

.tour-bubble {
  position: absolute;
  width: 320px;
  max-width: 90vw;
  background: linear-gradient(to bottom, var(--bg3), var(--bg2));
  border: 1px solid var(--gold);
  border-top-color: var(--gold);
  border-bottom-color: var(--accent2);
  border-radius: 4px;
  padding: 20px;
  z-index: 10102;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 200, 80, 0.1);
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-bubble.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Hide corner decorations until bubble is fully visible (prevents flash at position 0,0) */
.tour-bubble:not(.visible)::before,
.tour-bubble:not(.visible)::after {
  display: none;
}

#coachTitle,
#coachContent {
  padding-right: 24px;
}

#coachSkipBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  padding: 4px 6px;
  line-height: 1;
  z-index: 10;
  opacity: 0.6;
  transition: opacity 0.15s;
}
#coachSkipBtn:hover {
  opacity: 1;
}

.tour-bubble::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
  opacity: 0.5;
  top: 6px;
  left: 6px;
  border-right: none;
  border-bottom: none;
}

.tour-bubble::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
  opacity: 0.5;
  bottom: 6px;
  right: 6px;
  border-left: none;
  border-top: none;
}

.tour-bubble h3 {
  margin: 0 0 12px 0;
  color: var(--gold);
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255, 200, 80, 0.25);
}

.tour-bubble p {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.tour-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tour-step-counter {
  font-size: 12px;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Desktop Layout Improvements */
@media (min-width: 1000px) {
  #gamePage .wrap {
    max-width: 1280px;
    padding: 0 32px 40px 32px;
  }

  .grid.game-panel {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
  }

  /* Stack hints and stats vertically in the side panel */
  .hintBox {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Compact stats grid */
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  /* Taller list on desktop */
  .game-panel .list {
    max-height: 70vh;
  }
}

/* Highlight Pulse Animation for new users */
@keyframes highlightPulseInfinite {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 200, 80, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 200, 80, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 200, 80, 0);
    transform: scale(1);
  }
}

.highlight-pulse {
  animation: highlightPulseInfinite 2s infinite;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  z-index: 10;
  position: relative;
  will-change: transform, box-shadow;
}

.hidden {
  display: none !important;
}

/* Proper noun hint badge */
.proper-noun-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px 0;
  padding: 6px 10px;
  background: rgba(138, 184, 216, 0.08);
  border: 1px solid rgba(138, 184, 216, 0.2);
  border-radius: var(--radius);
  font-size: 13px;
}

.proper-noun-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(138, 184, 216, 0.15);
  border: 1px solid rgba(138, 184, 216, 0.3);
  border-radius: 12px;
  color: var(--accent-cool);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proper-noun-text {
  color: var(--muted);
  font-style: italic;
}

/* ============================================ */
/* ONBOARDING COACH (reuses .tour-bubble style) */
/* ============================================ */

/* Modal backdrop for win/loss panels — darker + blocks all clicks outside bubble */
.tour-backdrop.modal {
  background: rgba(0, 0, 0, 0.88);
  pointer-events: all;
  cursor: default;
}

/* Hints locked during onboarding until the hints panel is dismissed */
.hints-onboarding-locked .btn-reveal {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
