/* =========================================================
   Guess the Word — Onboarding modal
   Uses the game's tokens when they exist; the fallback after
   each comma is the design value.
   ========================================================= */

/* ---------- Hide the puzzle until the round starts ---------- */
.gtw-is-onboarding [data-pause-skeleton] {
  color: transparent !important;
  text-shadow: none !important;
  background: var(--surface-alt);
  border-radius: 10px;
  user-select: none;
}
.gtw-is-onboarding [data-pause-hide],
.gtw-is-onboarding [data-pause-hide] * {
  color: transparent !important;
  text-shadow: none !important;
  user-select: none;
}
.gtw-is-onboarding [data-pause-hide]::placeholder { color: transparent !important; }

/* ---------- Overlay ---------- */
.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  overflow-y: auto;
  background: var(--scrim);
  animation: ob-fade 0.2s ease-out;
}
.ob-overlay[hidden] { display: none; }

.ob-dialog {
  width: 100%;
  max-width: 340px;
  margin: auto;
  box-sizing: border-box;
  padding: 28px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  animation: ob-pop 0.24s ease-out;
}
.ob-title { margin: 0; font-size: 24px; font-weight: 800; }
.ob-sub { margin: 6px 0 0; font-size: 14px; color: var(--text-secondary); }

/* ---------- Example ---------- */
.ob-example {
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 14px 14px;
  border-radius: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ob-example__row { display: flex; align-items: center; gap: 10px; }
.ob-example__word { font-size: 22px; font-weight: 800; letter-spacing: 0.01em; }
.ob-example__plus { font-size: 16px; font-weight: 600; color: var(--text-tertiary); }
.ob-example__tiles { display: flex; gap: 4px; font: 800 17px var(--font-mono); }
.ob-tile {
  width: 26px;
  height: 32px;
  box-sizing: border-box;
  border-radius: 7px;
  background: var(--success-soft);
  border: 2px solid var(--success);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-example__caption { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
.ob-example__caption strong { color: var(--text-primary); font-weight: 700; }

/* ---------- Rules ---------- */
.ob-rules {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.ob-rule { display: flex; align-items: center; gap: 12px; }
.ob-rule__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-rule__icon svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ob-rule__icon--blue  { background: var(--accent-soft);  color: var(--accent); }
.ob-rule__icon--green { background: var(--success-soft); color: var(--success); }
.ob-rule__icon--red   { background: var(--danger-soft);   color: var(--danger); }
.ob-rule__icon--gold  { background: var(--gold-bg);  color: var(--gold); }
.ob-rule__text { font-size: 14px; line-height: 1.4; color: var(--text-secondary); }
.ob-rule__text strong { font-weight: 700; }

/* ---------- Actions ---------- */
.ob-btn {
  margin-top: 22px;
  width: 240px;
  max-width: 100%;
  height: 56px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-contrast);
  font: 800 18px var(--font-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}
.ob-btn svg { width: 18px; height: 18px; fill: currentColor; }
.ob-btn:active { filter: brightness(0.92); }
.ob-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.ob-check {
  position: relative;
  margin-top: 10px;
  min-height: 44px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}
.ob-check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ob-check__box {
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-check__box svg {
  width: 12px; height: 12px; opacity: 0;
  fill: none; stroke: var(--accent-contrast); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
}
.ob-check input:checked + .ob-check__box { background: var(--accent); border-color: var(--accent); }
.ob-check input:checked + .ob-check__box svg { opacity: 1; }
.ob-check input:focus-visible + .ob-check__box { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes ob-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ob-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ob-overlay, .ob-dialog { animation: none; }
}
