/* 部員証の星空に合わせた紺と黄 */
:root {
  --bg: #0a0f22;
  --panel: #111a36;
  --panel-2: #18234d;
  --line: #2a3a70;
  --text: #e9edff;
  --muted: #9ba7d8;
  --star: #ffd85e;
  --ink: #1a1530;
  --ng: #ff9a9a;
  --sans: "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans JP", sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; }
h1, h2 { font-family: var(--serif); }
button, input { font: inherit; color: inherit; }
button {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  min-height: 48px; padding: 8px 14px; cursor: pointer; touch-action: manipulation;
}
button.primary, button[aria-pressed="true"] { background: var(--star); border-color: var(--star); color: var(--ink); font-weight: 700; }
button.danger { border-color: #8a3a45; color: #ffb8c0; }
button:disabled { opacity: 0.4; cursor: default; }
input[type="text"] {
  width: 100%; min-height: 52px; padding: 10px 14px; font-size: 20px;
  background: #0d1530; border: 1px solid var(--line); border-radius: 10px;
}
a { color: var(--star); }
:focus-visible { outline: 2px solid var(--star); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack p { margin: 0; }
.message { min-height: 1.6em; text-align: center; font-weight: 700; color: var(--ng); }
.url { overflow-wrap: anywhere; }
.qr { display: block; width: 100%; height: auto; background: #fff; fill: #000; border-radius: 8px; shape-rendering: crispEdges; }
.offline { position: fixed; inset: auto 0 0 0; margin: 0; padding: 8px; background: #6a2a36; text-align: center; font-size: 14px; z-index: 10; }

/* 入力画面（スマホ） */
.phone { max-width: 420px; margin: 0 auto; padding: 24px 18px 64px; }
.phone header { text-align: center; margin-bottom: 28px; }
.phone header p { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 0.3em; }
.phone h1 { margin: 0; font-size: 34px; letter-spacing: 0.2em; }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.numbers button { font-size: 20px; }
.big { font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--star); }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; }

/* 部長用 */
.admin { max-width: 560px; margin: 0 auto; padding: 14px 14px 72px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.card h2 { margin: 0 0 8px; font-size: 16px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.steps li { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.steps li[aria-current="step"] { background: var(--star); border-color: var(--star); color: var(--ink); font-weight: 700; }
.clock { margin: 8px 0 0; text-align: center; font-size: 64px; line-height: 1.2; font-variant-numeric: tabular-nums; }
#clockState { margin: 0 0 12px; }
.busy button { pointer-events: none; opacity: 0.6; }
.roster { width: 100%; border-collapse: collapse; }
.roster th, .roster td { border-top: 1px solid var(--line); padding: 5px 0; }
.roster th { text-align: left; font-weight: 400; }
.roster td { width: 1%; padding-left: 8px; white-space: nowrap; }
.roster button { min-height: 44px; min-width: 64px; }
.roster td + td button { min-width: 126px; }
.roster .attend.absent { background: none; border-style: dashed; color: var(--muted); }
.adminQr { max-width: 280px; margin-top: 10px; }
summary { cursor: pointer; min-height: 32px; }

/* プロジェクター。どの画面比でも収まるよう短い辺に合わせる */
.projector { height: 100vh; overflow: hidden; }
.projector .view {
  height: 100vh; padding: 4vmin 5vmin; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.projector h1, .projector p { margin: 0; line-height: 1.2; }
.club { font-size: 4vmin; color: var(--muted); letter-spacing: 0.3em; }
.headline { font-size: 17vmin; letter-spacing: 0.08em; color: var(--star); white-space: nowrap; }
.headline.pass { font-size: 34vmin; }
.join { display: flex; align-items: center; gap: 5vmin; margin-top: 6vmin; font-size: 4.5vmin; text-align: left; }
.joinQr { width: 36vmin; flex: none; }
.join .url { font-size: 2.6vmin; }
.timer { font-size: 11vmin; font-variant-numeric: tabular-nums; }
.projector .timer.huge { font-size: 28vmin; margin-top: 3vmin; }
.projector #roster { justify-content: flex-start; gap: 3vmin; }
.bar { width: 100%; display: flex; align-items: baseline; justify-content: space-between; }
.bar h1 { font-size: 11vmin; color: var(--star); letter-spacing: 0.1em; }
.members {
  flex: 1; min-height: 0; width: 100%; margin: 0; padding: 0; list-style: none;
  display: grid; gap: 2.4vmin; grid-auto-rows: 1fr; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.members[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 24vmin); align-content: center; }
.members[data-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.members li {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 0.4vmin solid var(--star); border-radius: 2vmin; background: var(--panel); animation: arrive 0.6s ease-out;
}
.members li.empty { border: 0.3vmin dashed var(--line); background: none; animation: none; }
.members .no { font-size: 3vmin; color: var(--muted); line-height: 1.2; }
.members .name { font-family: var(--serif); font-weight: 700; font-size: 7.5vmin; line-height: 1.2; white-space: nowrap; }
@keyframes arrive { from { transform: scale(1.25); opacity: 0; } }
.foot { width: 100%; height: 13vmin; display: flex; align-items: center; justify-content: space-between; font-size: 5vmin; }
.cornerQr { width: 13vmin; }
.paused {
  position: fixed; left: 50%; bottom: 4vmin; transform: translateX(-50%); margin: 0; padding: 1vmin 4vmin;
  border-radius: 999px; background: #ffb04a; color: var(--ink); font-weight: 700; font-size: 4vmin; white-space: nowrap;
}
.fullscreen { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); min-height: 32px; padding: 2px 12px; font-size: 13px; opacity: 0.55; }
