/* TITLE SCREEN + SETTINGS + TUTORIAL + RESPONSIVE — WS-L (Sprint 4). Lead-owned. */

/* ---- title screen ---- */
#titleScreen[hidden] { display: none; }
#titleScreen {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 520px at 50% 30%, #1a3d2255, transparent 70%),
    #050806f2;
  backdrop-filter: blur(10px);
}
.title-card {
  width: min(560px, 100%); text-align: center; padding: 40px 34px;
  border: 1px solid #3a493d; border-radius: 20px;
  background: linear-gradient(150deg, #1d241f 0%, #101511 70%);
  box-shadow: 0 36px 100px #000d, inset 0 1px #ffffff0d;
  animation: title-in .3s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes title-in { from { opacity: 0; transform: translateY(14px); } }
.title-eyebrow { color: var(--muted); font: 700 10px/1.2 var(--mono); letter-spacing: .2em; }
.title-brand {
  margin: 10px 0 8px; font-size: clamp(38px, 8vw, 64px); line-height: .92;
  letter-spacing: -.05em; color: var(--accent);
  text-shadow: 0 0 34px #53fc1833;
}
.title-tag { margin: 0 auto 18px; max-width: 420px; color: #b3c2b8; font-size: 14px; line-height: 1.5; }
.title-notice {
  margin: 0 auto 20px; max-width: 440px; padding: 10px 14px;
  border: 1px solid var(--warn); border-radius: 10px; background: #ffcc3312;
  color: var(--warn); font-size: 12px; line-height: 1.5; text-align: left;
}
.title-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.title-btn { font-size: 15px; padding: 12px 22px; border-radius: 12px; font-weight: 700; }
.title-actions--minor button,
.title-menu-link { font-size: 12px; padding: 7px 12px; }
.title-menu-link {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); background: var(--panel-2); text-decoration: none;
  transition: background .12s ease, border-color .12s ease, transform .06s ease, box-shadow .12s ease;
}
.title-menu-link:hover { border-color: var(--accent-dim); background: #212a23; }
.title-menu-link:active { transform: translateY(1px); }
.title-menu-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.title-foot { margin-top: 16px; color: var(--muted); font-size: 11px; }

/* ---- settings panel ---- */
.settings-panel[hidden] { display: none; }
.settings-panel {
  position: fixed; inset: 0; z-index: 210;
  display: grid; place-items: center; background: #05080699;
}
.settings-card {
  width: min(380px, calc(100vw - 32px)); padding: 22px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-solid); box-shadow: 0 24px 70px #000c;
}
.settings-card h2 { margin: 0 0 14px; font-size: 17px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.settings-row input[type="range"] { flex: 1; max-width: 180px; accent-color: var(--accent); }
.settings-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.settings-row--danger span small { color: var(--muted); }
.settings-row--danger button { border-color: var(--bad); color: var(--bad); }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---- tutorial ---- */
#tutorial[hidden] { display: none; }
#tutorial {
  position: fixed; left: 0; right: 0; bottom: 18px; z-index: 150;
  display: flex; justify-content: center; pointer-events: none; padding: 0 14px;
}
.tut-card {
  pointer-events: auto;
  width: min(520px, 100%); padding: 16px 18px;
  border: 1px solid var(--accent-dim); border-radius: 14px;
  background: linear-gradient(150deg, #16211a, #10140f);
  box-shadow: 0 18px 60px #000c, 0 0 0 1px #ffffff08 inset;
  animation: title-in .22s ease;
}
.tut-eyebrow { color: var(--accent); font: 700 10px/1.2 var(--mono); letter-spacing: .18em; }
.tut-card h3 { margin: 6px 0 6px; font-size: 16px; }
.tut-card p { margin: 0 0 12px; color: #b3c2b8; font-size: 13px; line-height: 1.5; }
.tut-actions { display: flex; justify-content: space-between; gap: 10px; }

.tut-highlight {
  box-shadow: 0 0 0 2px var(--accent), 0 0 26px #53fc1844 !important;
  border-color: var(--accent) !important;
}

/* ---- responsive pass: stack the board under 900px ---- */
@media (max-width: 900px) {
  html, body { height: auto; min-height: 100%; }
  #app {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .pane { min-height: 340px; max-height: 70vh; }
  #hud { position: sticky; top: 0; z-index: 40; }
  #toasts { max-width: calc(100vw - 28px); }
  .shop { position: static; transform: none; width: 100%; margin-top: 10px; animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .title-card, .tut-card { animation: none; }
}
