/* 拔克小遊戲。手機優先：一欄、大按鈕、單手按得到。
 * 墨與底沿用官網（barkur/public/style.css）；平台本身不上色，
 * --accent 由每款遊戲帶進來（public/games.js 的 color）。 */

:root {
  --ground: #0b0b0d;
  --ground-2: #17171b;
  --ink: #e8e6e1;
  --ink-dim: #9a978f;
  --rule: rgba(232, 230, 225, 0.22);
  --live: #58d68d;
  --accent: var(--ink);
  --line: #06c755;   /* LINE 的品牌綠，只用在那顆按鈕上 */
  --tap: 52px;
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 480px;
  margin-inline: auto;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; }

h1, h2 { margin: 0; line-height: 1.3; }
h1 { font-size: 28px; }
h2 { font-size: 24px; }
p { margin: 0; }

.top { margin-bottom: 20px; }
.meta { color: var(--ink-dim); font-size: 15px; }
.center { text-align: center; padding-top: 30vh; }
.foot { text-align: center; margin-top: 20px; font-size: 15px; }
.big { font-size: 64px; font-weight: 700; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }

.card, .stage, .choices {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card {
  padding: 22px 18px;
  margin-bottom: 16px;
  background: var(--ground-2);
  border-top: 3px solid var(--accent);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 8px 16px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--ground); }
.btn.line { background: var(--line); border-color: var(--line); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.choice { min-height: 72px; font-size: 20px; }
.btn.choice.on { background: var(--accent); border-color: var(--accent); color: var(--ground); opacity: 1; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.link {
  align-self: center;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--ink-dim);
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
}

.field {
  width: 100%;
  min-height: var(--tap);
  padding: 8px 14px;
  border: 1px solid var(--rule);
  background: var(--ground);
  color: var(--ink);
  font: inherit;
  font-size: 20px;   /* 16px 以上，iOS 才不會一點輸入框就把頁面放大 */
}
.guess { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

.seats, .rows { list-style: none; margin: 0; padding: 0; }
.seats li, .rows li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.seats .off, .seats .empty { color: var(--ink-dim); }
.rows { font-size: 15px; }
.rows .same { border-left: 3px solid var(--live); padding-left: 10px; }
.rows .diff { border-left: 3px solid var(--rule); padding-left: 10px; }

.notice { padding: 12px 14px; border: 1px solid var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: opacity 0.15s; }
}
