/* ===== MINE SEEKER — minimal geometric temple ===== */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
  /* Temple Lantern theme — 神殿の灯火 (refined) */
  --bg: #121419;             /* 深い石の闇 */
  --bg-soft: #1B1E25;        /* パネル背景 */
  --bg-panel: #1F232B;       /* 一段明るいパネル */
  --tile: #2C313B;           /* 未開封の石 */
  --tile-top: #333945;       /* 石の上面ハイライト */
  --tile-hover: #3A4150;
  --tile-open: #EAE1CD;      /* 開封タイル＝古い羊皮紙 */
  --tile-open-edge: #D8CDB2; /* 羊皮紙の影 */
  --tile-border: #383E4A;
  --hairline: #2A2F39;
  --text: #ECE4D2;           /* 灯火色のテキスト */
  --text-dim: #93907F;       /* 補助テキスト（コントラスト改善） */
  --text-dark: #1A1614;      /* 開いたタイルの濃色テキスト */
  --accent: #E8B14C;         /* 灯火の金 = 旗・タイトル・アクション */
  --accent-hover: #F5C766;
  --accent-deep: #3D2F11;    /* 金の濃い影 */
  --accent-glow: rgba(232,177,76,0.18);
  --warn: #D6453F;           /* 暗紅 = 爆弾・致命的 */
  --warn-deep: #5A1815;
  --info: #5DB1CD;           /* 古代水色 = 宝・発見 */
  --success: #5FA86E;        /* 苔緑 = 撃破・成功 */
  --enemy: #C77B3A;          /* 琥珀褐色 = 敵 */
  --gold: #E8B14C;
  /* 数字色：マインスイーパー伝統 × 砂岩タイル上での視認性 */
  --num-1: #2C7BC2;
  --num-2: #2E8B47;
  --num-3: #C7332B;
  --num-4: #553B95;
  --num-5: #8B1A1A;
  --num-6: #1A7F8B;
  --num-7: #1A1614;
  --num-8: #6D4C41;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232,177,76,0.09), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 112%, rgba(93,177,205,0.05), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.02em;
}

/* ----- Page load reveal ----- */
@keyframes app-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.topbar { animation: app-fade 0.5s ease-out both; }
.board-wrap { animation: app-fade 0.6s ease-out 0.08s both; }
.sidebar { animation: app-fade 0.6s ease-out 0.16s both; }

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 20px 64px;
}

/* ----- Topbar ----- */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 24px;
}
.title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 27px;
  letter-spacing: 0.2em;
  margin: 0;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.title::before {
  content: "◇";
  color: var(--accent);
  font-size: 20px;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.title-sub {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}
@media (max-width: 540px) { .title-sub { display: none; } }
.help-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px 0 13px;
  border-radius: 20px;
  border: 1px solid var(--tile-border);
  background: var(--bg-soft);
  color: var(--accent);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.help-btn::before {
  content: "?";
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.help-btn:hover {
  border-color: var(--accent);
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

/* ----- HUD (under board) ----- */
.hud {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  padding: 4px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-soft));
  border: 1px solid var(--tile-border);
  border-radius: 10px;
  margin-top: 16px;
  width: 100%;
  max-width: 560px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 6px 18px rgba(0,0,0,0.25);
}
.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1 1 0;
  min-width: 66px;
  padding: 12px 8px;
  border-radius: 7px;
  transition: background 0.2s;
}
.hud-item + .hud-item { box-shadow: inset 1px 0 0 var(--hairline); }
.hud-label {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hud-value {
  font-family: 'Oswald', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.hud-sep {
  color: var(--text-dim);
  font-size: 20px;
  margin: 0 1px;
  font-weight: 400;
}
#hp-max, .hud-max { color: var(--text-dim); font-size: 20px; }
.hud-hp .hud-value { color: var(--success); }
.hud-hp.low { background: rgba(214,69,63,0.08); }
.hud-hp.low .hud-value { color: var(--warn); animation: hp-pulse 1.6s infinite; }
@keyframes hp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.hud-hp.dmg .hud-value { animation: hp-flash 0.45s; }
@keyframes hp-flash {
  0%   { transform: scale(1); color: var(--warn); }
  30%  { transform: scale(1.28); color: #FF6B6B; }
  100% { transform: scale(1); color: var(--warn); }
}

/* ----- Layout ----- */
.layout {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 36px;
  align-items: start;
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; gap: 26px; }
}

/* ----- Board ----- */
.board-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.board {
  display: grid;
  gap: 5px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%),
    var(--bg-soft);
  border: 1px solid var(--tile-border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.2);
  /* grid-template-columns set in JS based on size */
}
.tile {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, var(--tile-top), var(--tile));
  border: 1px solid var(--tile-border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 19px;
  transition: background 0.12s, transform 0.06s, box-shadow 0.12s;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 1px 2px rgba(0,0,0,0.25);
}
.tile:hover:not(.opened):not(.flagged) {
  background: linear-gradient(180deg, var(--tile-hover), var(--tile-top));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px var(--accent-glow);
}
.tile:active:not(.opened) { transform: scale(0.93); }
.tile.opened {
  background: linear-gradient(180deg, var(--tile-open), var(--tile-open-edge));
  color: var(--text-dark);
  cursor: default;
  border-color: var(--tile-open-edge);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.14);
}
.tile.opened.empty { color: transparent; }
/* SVG pixel-art icons inside tiles */
.tile svg.icon {
  width: 76%;
  height: 76%;
  max-width: 36px;
  max-height: 36px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  shape-rendering: crispEdges;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}
.tile.bomb {
  background: radial-gradient(circle at 50% 40%, #E85852, var(--warn) 70%);
  border-color: var(--warn-deep);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.22), 0 0 14px rgba(214,69,63,0.4);
}
.tile.treasure {
  background: radial-gradient(circle at 50% 40%, #79C4DD, var(--info) 75%);
  border-color: #3E8AA3;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}
.tile.enemy-defeated {
  background: linear-gradient(180deg, #6FB57E, var(--success));
  border-color: #468254;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.18);
}
/* 撃破済みマスの数字は緑背景で見えるよう白に上書き */
.tile.opened.enemy-defeated {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
.tile.flagged {
  background: linear-gradient(180deg, var(--tile-top), var(--tile));
  box-shadow: inset 0 0 0 1.5px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ----- Animations ----- */
@keyframes flag-pop {
  0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.tile.flag-anim svg.icon { animation: flag-pop 0.28s ease-out; }

@keyframes bomb-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-3px, -1px) rotate(-2deg); }
  20% { transform: translate(3px, 1px) rotate(2deg); }
  30% { transform: translate(-3px, 1px); }
  40% { transform: translate(3px, -1px); }
  50% { transform: translate(-2px, 0); }
  60% { transform: translate(2px, 0); }
  70% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  90% { transform: translate(-1px, 0); }
}
.board.shake { animation: bomb-shake 0.55s ease-out; }

@keyframes bomb-explode {
  0%   { transform: scale(0.4); opacity: 0; }
  35%  { transform: scale(1.5); opacity: 1; filter: brightness(2) drop-shadow(0 0 12px #FFC857); }
  70%  { transform: scale(0.95); opacity: 1; filter: brightness(1.3); }
  100% { transform: scale(1); opacity: 1; filter: brightness(1) drop-shadow(0 1px 1px rgba(0,0,0,0.5)); }
}
.tile.reveal-anim.bomb svg.icon { animation: bomb-explode 0.6s ease-out; }

@keyframes sparkle {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  25%      { filter: brightness(1.5) drop-shadow(0 0 8px var(--accent)); }
  50%      { filter: brightness(1.2) drop-shadow(0 0 4px #fff); }
  75%      { filter: brightness(1.6) drop-shadow(0 0 10px var(--accent)); }
}
.tile.reveal-anim.treasure svg.icon {
  animation: treasure-pop 0.4s ease-out, sparkle 1.6s ease-in-out 0.4s 2;
}
@keyframes treasure-pop {
  0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes sword-slash {
  0%   { transform: scale(0) rotate(-90deg); opacity: 0; }
  40%  { transform: scale(1.4) rotate(15deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 0.95; }
}
.tile.reveal-anim.enemy-defeated svg.icon { animation: sword-slash 0.45s ease-out; }

@keyframes reveal-flip {
  0%   { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}
.tile.opened.reveal-anim { animation: reveal-flip 0.22s ease-out; }
.tile.peek {
  outline: 2px dashed var(--info);
  outline-offset: -3px;
}

.tile[data-num="1"] { color: var(--num-1); }
.tile[data-num="2"] { color: var(--num-2); }
.tile[data-num="3"] { color: var(--num-3); }
.tile[data-num="4"] { color: var(--num-4); }
.tile[data-num="5"] { color: var(--num-5); }
.tile[data-num="6"] { color: var(--num-6); }
.tile[data-num="7"] { color: var(--num-7); }
.tile[data-num="8"] { color: var(--num-8); }

.hint {
  color: var(--text-dim);
  font-size: 12px;
  margin: 0;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.6;
  max-width: 520px;
}
.hint b { color: var(--text); font-weight: 700; }

/* ----- Legend ----- */
.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 14px;
  width: 100%;
  max-width: 560px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--tile-border);
  border-radius: 10px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.legend-item svg.icon { width: 22px; height: 22px; flex-shrink: 0; }
.legend-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}
.legend-swatch.bomb { background: var(--warn); }
.legend-swatch.treasure { background: var(--info); }
.legend-swatch.enemy { background: var(--enemy); }
.legend-swatch.defeated { background: var(--success); }
.legend-num {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--tile-open);
  color: var(--num-3);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.legend-text { display: flex; flex-direction: column; line-height: 1.3; }
.legend-text b { font-size: 12px; color: var(--text); font-weight: 700; }
.legend-text span { font-size: 10.5px; color: var(--text-dim); }

/* ----- Sidebar panels ----- */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.panel {
  background: var(--bg-soft);
  border: 1px solid var(--tile-border);
  border-radius: 10px;
  padding: 16px 17px;
}
.panel-title {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--hairline);
}
.panel-sub {
  display: block;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin-top: 4px;
}

/* relics */
.relics { display: flex; flex-direction: column; gap: 10px; min-height: 30px; }
.relic {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: var(--text);
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 7px;
}
.relic-icon {
  width: 16px;
  height: 16px;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 0 4px var(--accent-glow));
}
.relic-name { font-weight: 700; }
.relic-desc { color: var(--text-dim); display: block; font-size: 11px; line-height: 1.45; margin-top: 2px; }

/* hand */
.hand {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 50px;
}
.card {
  width: 80px;
  padding: 10px 7px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg));
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.card:hover { background: linear-gradient(180deg, var(--accent-deep), var(--bg)); transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
.card.disabled { opacity: 0.4; cursor: not-allowed; }
.card-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 5px;
  letter-spacing: 0.06em;
  font-size: 12px;
}
.card-desc { color: var(--text-dim); line-height: 1.35; font-size: 10px; }
.card.targeting {
  background: var(--accent);
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 6px 16px rgba(0,0,0,0.4);
  transform: translateY(-3px);
}
.card.targeting .card-name, .card.targeting .card-desc { color: var(--text-dark); }

/* log */
.log {
  font-size: 11.5px;
  color: var(--text-dim);
  max-height: 150px;
  overflow-y: auto;
  line-height: 1.55;
}
.log-line { padding: 3px 0; border-bottom: 1px solid var(--hairline); }
.log-line:last-child { border-bottom: none; }
.log-line.win  { color: var(--accent); }
.log-line.lose { color: var(--warn); }
.log-line.info { color: var(--info); }

/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: modal-fade 0.25s ease-out;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal.hidden { display: none; }
.modal-box {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-soft));
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 34px 32px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65), 0 0 0 1px rgba(232,177,76,0.12), inset 0 1px 0 rgba(255,255,255,0.04);
  animation: modal-rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes modal-rise {
  from { transform: translateY(16px) scale(0.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal-title {
  font-family: 'Oswald', sans-serif;
  font-size: 30px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 18px;
}
.modal-title::before { content: "◇"; display: block; font-size: 18px; margin-bottom: 6px; opacity: 0.7; }
.modal-body { color: var(--text); font-size: 14px; line-height: 1.6; margin-bottom: 22px; }
.modal-lead { font-size: 15px; line-height: 1.8; color: var(--text); margin: 0 0 22px; }
.rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
  text-align: left;
}
.rule-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: var(--bg);
  border: 1px solid var(--tile-border);
  border-radius: 9px;
  transition: border-color 0.15s, transform 0.15s;
}
.rule-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.rule-card .rk { font-size: 26px; line-height: 1; flex-shrink: 0; }
.rule-card .rt { display: flex; flex-direction: column; gap: 3px; }
.rule-card .rt b { font-size: 14px; color: var(--text); font-weight: 700; letter-spacing: 0.02em; }
.rule-card .rt i { font-size: 12px; color: var(--text-dim); font-style: normal; }
.modal-note {
  font-size: 13px;
  color: var(--text);
  margin: 0 0 20px;
  padding: 11px 15px;
  background: var(--bg);
  border-left: 3px solid var(--warn);
  border-radius: 0 8px 8px 0;
  text-align: left;
  line-height: 1.6;
}
.modal-note b { color: var(--accent); }
.modal-stats { font-size: 12px; color: var(--accent); margin: 0; letter-spacing: 0.04em; }
.guide-lead {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--tile-border);
  border-radius: 9px;
  text-align: left;
}
.guide-lead b { color: var(--accent); }

/* danger explainer — 爆弾 vs 敵 */
.danger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
  text-align: left;
}
.danger-card {
  padding: 13px 14px;
  background: var(--bg);
  border: 1px solid var(--tile-border);
  border-radius: 9px;
  border-top: 3px solid var(--tile-border);
}
.danger-card.is-bomb { border-top-color: var(--warn); }
.danger-card.is-enemy { border-top-color: var(--enemy); }
.danger-card .dc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}
.danger-card .dc-dot {
  width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}
.danger-card.is-bomb .dc-dot { background: var(--warn); }
.danger-card.is-enemy .dc-dot { background: var(--enemy); }
.danger-card p { font-size: 12px; line-height: 1.55; color: var(--text-dim); margin: 0; }
.danger-card p b { color: var(--text); }
@media (max-width: 540px) { .danger-grid { grid-template-columns: 1fr; } }

.guide-h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-align: left;
  margin: 6px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hairline);
}
.guide { text-align: left; margin: 4px 0 16px; }
.guide h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 18px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hairline);
}
.guide p { font-size: 13px; line-height: 1.9; color: var(--text); margin: 0; }
.guide b { color: var(--accent); }
@media (max-width: 540px) {
  .rule-grid { grid-template-columns: 1fr; }
  .modal-title { font-size: 24px; }
  .modal-box { padding: 26px 20px; }
}
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  font-family: 'Oswald', sans-serif;
  background: var(--accent);
  color: var(--text-dark);
  border: none;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background 0.1s;
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: transparent; border: 1px solid var(--text-dim); color: var(--text); }
.btn.secondary:hover { background: var(--tile); }

.choice {
  display: block;
  width: 100%;
  margin: 7px 0;
  padding: 13px 15px;
  background: var(--bg);
  border: 1px solid var(--tile-border);
  border-radius: 9px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.choice:hover { border-color: var(--accent); background: var(--accent-deep); transform: translateY(-1px); }
.choice-name { font-family: 'Oswald', sans-serif; color: var(--accent); display: block; margin-bottom: 4px; font-size: 13px; letter-spacing: 0.08em; }
.choice-desc { color: var(--text-dim); font-size: 12px; line-height: 1.4; }

/* ----- Toast (achievement notification) ----- */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-soft));
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 13px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55), 0 0 0 1px var(--accent-glow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { color: var(--accent); font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 0.12em; }
.toast span { color: var(--text); font-size: 12px; }
