/* Mobile Gomoku/Renju entry — five130.space/mobile_gomoku.html */
:root {
  --bg: #12352c;
  --bg2: #0c241e;
  --text: #f5f0e6;
  --muted: rgba(245, 240, 230, 0.72);
  --accent: #c9a227;
  --line: rgba(245, 240, 230, 0.12);
  --card: rgba(20, 48, 40, 0.92);
  --app-max: 520px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --touch-min: 44px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "PT Sans", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 10% -10%, rgba(201, 162, 39, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
a { color: var(--accent); }
button { font: inherit; }

.wrap {
  max-width: var(--app-max);
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 16px calc(32px + var(--safe-bottom));
}

.brand { margin-bottom: 14px; }
.brand .name {
  font-size: clamp(1.55rem, 5.5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand .tag {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.nav-back {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  min-height: var(--touch-min);
  line-height: var(--touch-min);
}
.nav-back:hover { color: var(--accent); }

.section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 16px;
  margin-bottom: 14px;
}
.section h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffe08a;
}
.section .hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.choice-list .choice {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 72px;
  padding: 20px 16px;
  border-radius: 12px;
  border: 1px solid rgba(245, 240, 230, 0.22);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.25;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
}
.choice-list .choice.on {
  background: var(--accent);
  color: #1a1408;
  border-color: rgba(255, 220, 120, 0.85);
}
.choice-list .choice:disabled,
.choice-list .choice[hidden] {
  display: none;
}

.play-btn {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 20px 16px;
  margin-top: 4px;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.2rem;
  cursor: pointer;
  background: linear-gradient(180deg, #ffe08a, #c9a227);
  color: #1a1408;
}
.play-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Wizard: only #wizard-host swaps; brand / auth / footer stay */
.wizard-host {
  min-height: 12rem;
}
.choice-list .choice.color-black.on,
.choice-list .choice.color-black:active {
  background: #111;
  color: #fff;
  border-color: var(--accent);
}
.choice-list .choice.color-white {
  background: #f5f0e6;
  color: #111;
  border-color: rgba(0, 0, 0, 0.35);
}
.choice-list .choice.color-white:active {
  background: #fff;
}
.link-back {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  min-height: var(--touch-min);
}
.link-back:hover { color: var(--accent); }

.note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.err {
  margin: 10px 0 0;
  color: #ff8a9a;
  font-weight: 700;
  font-size: 0.92rem;
  min-height: 1.2em;
}

.footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.45;
}

@media (min-width: 600px) {
  :root { --app-max: 640px; }
}
