:root {
  --bg: #fdfaf4;
  --panel: #ffffff;
  --ink: #2b2b2b;
  --sub: #6b6b6b;
  --line: #e6dfd2;
  --accent: #2f7d6d;
  --accent-soft: #d9eee8;
  --warn: #d9534f;
  --good: #3a9a4a;
  --gold: #e8b93a;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1f21; --panel: #2a2d30; --ink: #eeeeee; --sub: #a8a8a8;
    --line: #3d4145; --accent: #5cc0a8; --accent-soft: #24433c;
  }
}
* { box-sizing: border-box; }
/* display を指定したクラスでも hidden 属性で必ず消えるようにする */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Hiragino Maru Gothic ProN", "Meiryo", sans-serif;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
header.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel);
}
header.bar a.home { color: var(--accent); text-decoration: none; font-weight: bold; font-size: 18px; }
header.bar h1 { font-size: 20px; margin: 0; flex: 1; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
button, .btn {
  font: inherit; font-size: 20px; border: 2px solid var(--line); background: var(--panel);
  color: var(--ink); border-radius: 14px; padding: 10px 18px; cursor: pointer;
  touch-action: manipulation; user-select: none;
}
button:active { transform: scale(0.97); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: bold; }
button.on { background: var(--accent-soft); border-color: var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.muted { color: var(--sub); }
.center { text-align: center; }
.big-msg {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); z-index: 50;
}
.big-msg.show { display: flex; }
.big-msg .box {
  background: var(--panel); border-radius: 24px; padding: 32px 40px; text-align: center;
  font-size: 36px; font-weight: bold; box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.big-msg .box small { display: block; font-size: 20px; font-weight: normal; margin: 8px 0 18px; color: var(--sub); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 70% { transform: scale(1.08) } 100% { transform: scale(1); opacity: 1 } }
@keyframes shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-8px) } 75% { transform: translateX(8px) } }
.shake { animation: shake .3s; }

/* だれが つかっているか */
.whochip { font-size: 16px; padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.whopick {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.whopick .box {
  background: var(--panel); border-radius: 24px; padding: 20px;
  width: 100%; max-width: 440px; max-height: 84vh; overflow: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.whopick h2 { margin: 0 0 14px; font-size: 22px; text-align: center; }
.whopick .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.whopick .list button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 17px; padding: 12px 6px; }
.whopick .list button .f { font-size: 34px; line-height: 1; }
.whopick .foot { display: flex; gap: 8px; justify-content: space-between; margin-top: 16px; }
.whopick .foot .btn { text-decoration: none; display: inline-block; }
