/* HAPPYボドゲ プレイルーム：参加者向けの画面 */
:root {
  --bg: #f5f0e6;
  --surface: #fffdf8;
  --ink: #2a2622;
  --muted: #6f675d;
  --line: #e2d9c8;
  --green: #24483e;
  --green-ink: #f4efe2;
  --gold: #b88a3a;
  --gold-soft: #e9d6ac;
  --ok-bg: #e3efe6;
  --ok-ink: #1f4a35;
  --warn-bg: #fbecc8;
  --warn-ink: #6b4a08;
  --err-bg: #f8dedb;
  --err-ink: #7c231b;
  --info-bg: #e8e6df;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171a18;
    --surface: #212522;
    --ink: #ece7dc;
    --muted: #a59d90;
    --line: #353a36;
    --green: #2c574a;
    --gold: #d2a758;
    --gold-soft: #6b5a34;
    --ok-bg: #20382b;
    --ok-ink: #bfe3cc;
    --warn-bg: #43361a;
    --warn-ink: #f1d691;
    --err-bg: #47231f;
    --err-ink: #f3c1bb;
    --info-bg: #2a2e2b;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
}

p { margin: 0 0 8px; }
h1, h2 { font-family: var(--serif); font-weight: 600; margin: 0; }
h1 { font-size: 26px; line-height: 1.4; margin-bottom: 8px; }
h2 { font-size: 18px; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }

.loading { text-align: center; color: var(--muted); padding: 80px 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.6; }
.center { text-align: center; }

.top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 2px 14px;
}
.brand { font-family: var(--serif); font-weight: 600; font-size: 17px; }
.brand-sub { font-size: 11px; letter-spacing: 0.22em; color: var(--muted); }

.hero { padding: 20px 2px 16px; }
.eyebrow { font-size: 12px; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 4px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 14px;
}

/* お知らせ・受付の状態 */
.notice, .banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.notice.error { background: var(--err-bg); color: var(--err-ink); }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice.info { background: var(--info-bg); }
.banner p { margin: 0; }
.banner-title { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-bottom: 2px !important; }
.banner.pending { background: var(--warn-bg); color: var(--warn-ink); }
.banner.done { background: var(--ok-bg); color: var(--ok-ink); }
.banner.info { background: var(--info-bg); }

/* ボタン・入力 */
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  margin-top: 14px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: var(--green);
  color: var(--green-ink);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: 0.55; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn.small-btn { min-height: 44px; margin-top: 4px; }
.btn.line { background: #06c755; border-color: #06c755; color: #fff; font-size: 17px; }

.text-btn {
  background: none;
  border: 0;
  padding: 10px 4px;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

label, .label { display: block; font-weight: 600; margin: 16px 0 6px; }
form > label:first-child { margin-top: 0; }

input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 500;
  margin: 10px 0 0;
}
.check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }

.companion-row { display: flex; gap: 8px; margin-bottom: 8px; }
.icon-btn {
  flex: none;
  width: 48px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.dev { margin-top: 28px; border-style: dashed; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* 会員証 */
.member-card {
  background: var(--green);
  color: var(--green-ink);
  border-radius: 18px;
  padding: 20px 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(20, 40, 34, 0.18);
}
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card-kicker { font-size: 11px; letter-spacing: 0.24em; color: var(--gold-soft); }
.member-card .card-kicker { color: #e9d6ac; }
.rank {
  font-size: 12px;
  letter-spacing: 0.16em;
  border: 1px solid #d9bd7c;
  color: #f0dba9;
  border-radius: 999px;
  padding: 2px 12px;
}
.card-name { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 10px 0 0; overflow-wrap: anywhere; }
.card-count { margin: 2px 0 12px; font-size: 14px; display: flex; align-items: baseline; gap: 4px; }
.card-count .num { font-family: var(--serif); font-size: 34px; line-height: 1.2; color: #f0dba9; }
.rank-ja { margin-left: auto; font-size: 13px; opacity: 0.85; }
.card-next { font-size: 13px; margin: 12px 0 0; opacity: 0.9; }

.stamps { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(240, 219, 169, 0.5);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: rgba(240, 219, 169, 0.7);
}
.stamp.on { background: #e3c57f; border: 1px solid #e3c57f; color: #24483e; }

/* メンバー一覧 */
.count { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--muted); }
.people { list-style: none; margin: 8px 0 0; padding: 0; }
.people li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.people li:first-child { border-top: 0; }
.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
}
.pname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tag {
  margin-left: 8px;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--muted);
  white-space: nowrap;
}
.plus { flex: none; font-size: 13px; color: var(--muted); }
.live { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3fa66b; }

.event-name { font-weight: 600; margin: 0; }
.link { color: inherit; text-underline-offset: 3px; }

/* 参加の記録 */
.history { list-style: none; margin: 4px 0 0; padding: 0; }
.history > li { border-top: 1px solid var(--line); }
.history > li:first-child { border-top: 0; }
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nth { flex: none; width: 52px; font-family: var(--serif); color: var(--gold); font-weight: 600; }
.history-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chev { flex: none; color: var(--muted); }
.history-detail { padding: 0 0 12px 64px; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: 10px 0; }
