/* ============================================================
   100Excel ゲームセンター（game.php 専用）
   アーケード部分はサイトテーマと独立した「夜のゲーセン」配色
   ============================================================ */

/* ファーストビューにゲーム画面が来るよう、上の余白を詰める */
.main { padding-top: 14px; }
.breadcrumb { margin-bottom: 10px; }

/* ---------- アーケード筐体エリア ---------- */
.arcade {
  max-width: 860px;
  margin: 28px auto 0;
  background: #1c1530;
  border: 3px solid #3a2d5c;
  border-radius: 20px;
  padding: 0 0 26px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04),
              0 18px 40px rgba(10, 5, 30, 0.45),
              inset 0 0 60px rgba(80, 40, 140, 0.12);
  overflow: hidden;
}

/* 電飾マーキー */
.marquee {
  background: linear-gradient(180deg, #2c2150, #221941);
  border-bottom: 2px solid #3a2d5c;
  padding: 14px 20px 12px;
  text-align: center;
  position: relative;
}
.marquee-title {
  font-family: "DM Mono", monospace;
  font-size: 1.05rem;
  letter-spacing: 0.35em;
  color: #ffd86e;
  text-shadow: 0 0 12px rgba(255, 216, 110, 0.7);
}
.marquee-sub {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: #8e7fc9;
  margin-top: 4px;
}
.marquee-bulbs {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.marquee-bulbs span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #57407a;
  animation: bulb 1.2s steps(1) infinite;
}
.marquee-bulbs span:nth-child(odd)  { animation-delay: 0s; }
.marquee-bulbs span:nth-child(even) { animation-delay: 0.6s; }
@keyframes bulb {
  0%, 49%  { background: #ffd86e; box-shadow: 0 0 8px rgba(255, 216, 110, 0.8); }
  50%, 100% { background: #57407a; box-shadow: none; }
}

/* ---------- 筐体本体（スロット＋さえちゃん） ---------- */
.arcade-body {
  display: flex;
  gap: 24px;
  padding: 26px 28px 0;
  align-items: flex-start;
}
@media (max-width: 767px) {
  .arcade-body { flex-direction: column; padding: 20px 14px 0; }
}

/* スロットマシン */
.slot {
  flex: 1;
  background: linear-gradient(180deg, #2a2147, #241c3d);
  border: 2px solid #443468;
  border-radius: 16px;
  padding: 20px;
  position: relative;
  min-width: 0;
}
.slot-head {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: #8e7fc9;
  text-align: center;
  margin-bottom: 12px;
}
.slot-frame {
  display: flex;
  gap: 14px;
  align-items: center;
}
.slot-window {
  flex: 1;
  background: #0e0a1c;
  border: 2px solid #594588;
  border-radius: 10px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.7);
  position: relative;
}
.slot-window::before, .slot-window::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 22px;
  pointer-events: none;
  z-index: 2;
}
.slot-window::before { top: 0;    background: linear-gradient(180deg, rgba(14,10,28,0.95), transparent); }
.slot-window::after  { bottom: 0; background: linear-gradient(0deg,   rgba(14,10,28,0.95), transparent); }
.reel-text {
  font-family: "DM Mono", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7df2b0;
  text-shadow: 0 0 14px rgba(125, 242, 176, 0.55);
  white-space: nowrap;
}
.reel-text.is-idle { color: #4f4178; text-shadow: none; font-size: 0.95rem; letter-spacing: 0.2em; }
.slot.is-spinning .reel-text { filter: blur(2px); }
.reel-cat {
  position: absolute;
  bottom: 5px;
  right: 10px;
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: #8e7fc9;
  z-index: 3;
}

/* レバー */
.lever {
  width: 56px;
  flex-shrink: 0;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
/* 高さ固定の枠の中でノブが上下する（筐体のレイアウトは動かない） */
.lever-arm {
  height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.lever-stick {
  width: 10px;
  height: 64px;
  background: linear-gradient(90deg, #6b7280, #cbd5e1, #6b7280);
  margin: 0 auto;
  border-radius: 6px;
  transition: height 0.16s ease-in;
}
.lever-knob {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8f85, #d93b2c);
  margin: 0 auto -6px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 12px rgba(217, 59, 44, 0.6);
}
.lever-base {
  width: 40px;
  height: 14px;
  background: #443468;
  border-radius: 6px 6px 3px 3px;
  margin: 0 auto;
}
/* 引くと棒が縮んでノブが下りる（ノブは棒の上に乗っているので自然に追従） */
.lever.is-pulled .lever-stick { height: 14px; }
.lever.is-ready .lever-knob   { animation: knob-pulse 1.2s ease-in-out infinite; }
@keyframes knob-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(217, 59, 44, 0.5); }
  50%      { box-shadow: 0 0 22px rgba(255, 143, 133, 0.95); }
}
.lever-label {
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: #8e7fc9;
  margin-top: 6px;
}

/* コイン投入口・クレジット */
.slot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.coin-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #160f2b;
  border: 2px dashed #594588;
  border-radius: 10px;
  padding: 10px 16px;
  transition: all 0.2s ease;
}
.coin-slot.is-over {
  border-color: #ffd86e;
  background: rgba(255, 216, 110, 0.08);
  box-shadow: 0 0 14px rgba(255, 216, 110, 0.3);
}
.coin-slot-hole {
  width: 8px;
  height: 30px;
  background: #000;
  border-radius: 4px;
  border: 1px solid #594588;
}
.coin-slot-label {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: #8e7fc9;
  line-height: 1.6;
}
.insert-all-btn {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #ffd86e;
  background: #160f2b;
  border: 2px solid #594588;
  border-radius: 100px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.insert-all-btn:hover {
  border-color: #ffd86e;
  box-shadow: 0 0 12px rgba(255, 216, 110, 0.3);
}
.credit-lamp {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: #57407a;
  background: #0e0a1c;
  border: 1px solid #443468;
  border-radius: 8px;
  padding: 8px 14px;
}
.credit-lamp.is-on {
  color: #7df2b0;
  text-shadow: 0 0 10px rgba(125, 242, 176, 0.6);
  border-color: #7df2b0;
}

/* ---------- さえちゃん ---------- */
.sae-corner {
  width: 240px;
  flex-shrink: 0;
  text-align: center;
}
@media (max-width: 767px) {
  .sae-corner { width: 100%; }
}
.sae-corner-bubble {
  background: #fffef8;
  border: 2px solid #2c2c2c;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #2c2c2c;
  text-align: left;
  position: relative;
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  min-height: 76px;
}
.sae-corner-bubble::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 11px solid #2c2c2c;
}
.sae-corner-bubble::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid #fffef8;
  z-index: 1;
}
.sae-corner-bubble .sae-answer {
  display: block;
  font-family: "DM Mono", monospace;
  background: rgba(29, 111, 66, 0.08);
  border-radius: 6px;
  padding: 6px 8px;
  margin: 8px 0;
  color: #1d6f42;
  font-size: 0.82rem;
  word-break: break-all;
}
.sae-corner-img {
  width: 110px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

/* ---------- ジュークボックス（さえちゃんの下） ---------- */
.jukebox {
  margin-top: 14px;
  background: linear-gradient(180deg, #2a2147, #1c1530);
  border: 2px solid #443468;
  border-radius: 14px 14px 10px 10px;
  padding: 12px 14px 10px;
}
.jukebox-head {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: #ffd86e;
  text-shadow: 0 0 8px rgba(255, 216, 110, 0.5);
  margin-bottom: 10px;
}
.jukebox-btns {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.juke-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #594588;
  background: #160f2b;
  color: #8e7fc9;
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.juke-btn:hover {
  border-color: #ffd86e;
  color: #ffd86e;
  box-shadow: 0 0 10px rgba(255, 216, 110, 0.3);
}
.juke-btn.is-playing {
  border-color: #7df2b0;
  color: #0a0e1a;
  background: #7df2b0;
  animation: juke-pulse 1s ease-in-out infinite;
}
@keyframes juke-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(125, 242, 176, 0.4); }
  50%      { box-shadow: 0 0 18px rgba(125, 242, 176, 0.85); }
}
.jukebox-note {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: #8e7fc9;
  margin-top: 9px;
  min-height: 14px;
}

/* ---------- メダル受け皿・交換所（スロット筐体の中） ---------- */
.medal-deck {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.medal-tray {
  flex: 1;
  min-width: 180px;
  background: #160f2b;
  border: 2px solid #3a2d5c;
  border-radius: 12px;
  padding: 12px 14px;
}
.medal-tray-label {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: #8e7fc9;
  margin-bottom: 8px;
}
.medal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
}
.medal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #e8b524 60%, #b78a12);
  border: 2px solid #8a6a0e;
  color: #7a5c08;
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease;
}
.medal:hover { transform: translateY(-3px) rotate(-6deg); }
.medal:active { cursor: grabbing; }
.medal-empty {
  font-size: 0.78rem;
  color: #6f5f9e;
  line-height: 34px;
}
.exchange-btn {
  font-family: "DM Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: #ffd86e;
  background: #2c2150;
  border: 2px solid #594588;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.7;
  text-align: center;
}
.exchange-btn:hover {
  border-color: #ffd86e;
  box-shadow: 0 0 14px rgba(255, 216, 110, 0.3);
}

/* ---------- 出題パネル（常設・中身だけ入れ替わる） ---------- */
.quiz {
  margin: 20px 28px 0;
  background: #221a3e;
  border: 2px solid #443468;
  border-radius: 16px;
  padding: 24px 26px;
  min-height: 120px;
  transition: opacity 0.25s ease, min-height 0.45s ease;
}
.quiz.is-waiting { opacity: 0.35; pointer-events: none; }
.quiz-placeholder {
  font-family: "DM Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #6f5f9e;
  text-align: center;
  margin: 26px 0;
}
@media (max-width: 767px) { .quiz { margin: 16px 14px 0; padding: 16px 14px; } }

.quiz-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.quiz-func {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--excel-green);
  background: var(--excel-green-soft);
  border-radius: 100px;
  padding: 5px 14px;
}
.quiz-target {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.quiz-target strong {
  font-size: 1.15rem;
  color: var(--excel-green);
  margin-left: 6px;
}
.quiz-story {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--ink);
  margin: 6px 0 14px;
}

/* ミニシート */
.sheet-wrap { margin: 4px 0 16px; overflow-x: auto; }
.sheet { border-collapse: collapse; font-family: "DM Mono", monospace; }
.sheet th {
  background: #f3f3f3;
  color: #595959;
  font-weight: 500;
  font-size: 0.7rem;
  border: 1px solid #d4d4d4;
  padding: 4px 0;
}
.sheet th.col-h { width: 96px; }
.sheet th.row-h { width: 32px; }
.sheet td {
  border: 1px solid #d4d4d4;
  background: var(--paper);
  height: 36px;
  padding: 0 10px;
  font-size: 0.9rem;
  color: var(--ink);
  text-align: right;
}
.sheet td.is-text { text-align: left; }
body[data-time="night"] .sheet th { background: #232a3a; color: #8b95a8; border-color: #39415a; }
body[data-time="night"] .sheet td { border-color: #39415a; }

/* 数式バー */
.fxbar {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: "DM Mono", monospace;
  margin-bottom: 14px;
  min-height: 48px;
}
.fx-label { color: var(--ink-mute); font-style: italic; font-size: 0.85rem; flex-shrink: 0; }
.fx-formula { font-size: 1.02rem; color: var(--ink); word-break: break-all; line-height: 1.5; }
.fx-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--excel-green);
  animation: caret-blink 1s steps(1) infinite;
  vertical-align: -2px;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* トークン */
.token-area { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.token-btn {
  font-family: "DM Mono", monospace;
  font-size: 0.92rem;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.token-btn:hover { border-color: var(--excel-green); color: var(--excel-green); transform: translateY(-1px); }
.token-btn:active { transform: translateY(1px); }
.token-btn.is-func {
  background: var(--excel-green-soft);
  border-color: rgba(29, 111, 66, 0.25);
  color: var(--excel-green);
  font-weight: 500;
}

/* 操作列 */
.ctrl-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ctrl-btn {
  font-family: "DM Mono", monospace;
  font-size: 0.76rem;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ctrl-btn:hover { border-color: var(--excel-green); color: var(--excel-green); }
.giveup-btn:hover { border-color: #d87a6e; color: #c05b4d; }
.judge-btn {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 11px 32px;
  border: none;
  border-radius: 100px;
  background: var(--excel-green);
  color: #fff;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--excel-green-d);
  transition: all 0.15s ease;
  margin-left: auto;
}
.judge-btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--excel-green-d); }
body[data-time="night"] .judge-btn { color: #0a0e1a; }

/* 結果表示 */
.result-line {
  margin-top: 14px;
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: none;
}
.result-line.show { display: block; }
.result-line strong { color: var(--excel-green); font-size: 1rem; }

/* 解説ボックス（計算結果の下） */
.explain-box {
  margin-top: 12px;
  border: 1.5px solid rgba(125, 242, 176, 0.35);
  background: rgba(125, 242, 176, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--ink);
  display: none;
}
.explain-box.show { display: block; animation: quiz-in 0.3s ease; }
@keyframes quiz-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.explain-answer {
  display: block;
  font-family: "DM Mono", monospace;
  font-size: 0.92rem;
  color: #7df2b0;
  background: #0e0a1c;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  word-break: break-all;
}

/* ---------- 正解のネオン演出 ---------- */
.arcade.is-celebrate .marquee-bulbs span {
  animation: bulb-party 0.32s steps(1) infinite;
}
.arcade.is-celebrate .marquee-bulbs span:nth-child(3n)   { animation-delay: 0.1s; }
.arcade.is-celebrate .marquee-bulbs span:nth-child(3n+1) { animation-delay: 0.2s; }
@keyframes bulb-party {
  0%   { background: #ff6ec7; box-shadow: 0 0 10px #ff6ec7; }
  33%  { background: #7df2b0; box-shadow: 0 0 10px #7df2b0; }
  66%  { background: #6ec7ff; box-shadow: 0 0 10px #6ec7ff; }
  100% { background: #ffd86e; box-shadow: 0 0 10px #ffd86e; }
}
.arcade.is-celebrate .marquee-title {
  animation: title-party 0.4s ease-in-out infinite alternate;
}
@keyframes title-party {
  from { text-shadow: 0 0 12px rgba(255, 216, 110, 0.7); }
  to   { text-shadow: 0 0 22px rgba(255, 255, 255, 0.95), 0 0 44px rgba(255, 216, 110, 0.9); }
}
.arcade.is-celebrate .slot-window {
  border-color: #7df2b0;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 18px rgba(125, 242, 176, 0.55);
}
.arcade.is-celebrate .quiz {
  border-color: rgba(125, 242, 176, 0.7);
  box-shadow: 0 0 20px rgba(125, 242, 176, 0.25);
}

/* ---------- コレクション ---------- */
.collection {
  max-width: 860px;
  margin: 26px auto 0;
}
.collection-title {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.collection-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.func-chip {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--line);
  color: var(--ink-mute);
  background: var(--paper);
}
.func-chip.is-got {
  border-color: var(--excel-green);
  color: var(--excel-green);
  background: var(--excel-green-soft);
  font-weight: 500;
}

/* ---------- 出口（非常口風ネオン） ---------- */
.exit-wrap {
  max-width: 860px;
  margin: 34px auto 10px;
  text-align: center;
}
.exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-jp);
  font-size: 0.92rem;
  font-weight: 700;
  color: #d9d2ee;
  background: #1c1530;
  border: 2px solid #3a2d5c;
  border-radius: 100px;
  padding: 13px 28px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.exit-sign {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  font-weight: 500;
  color: #7df2b0;
  background: #0e2418;
  border: 1.5px solid #7df2b0;
  border-radius: 4px;
  padding: 3px 10px 3px 12px;
  text-shadow: 0 0 8px rgba(125, 242, 176, 0.8);
  box-shadow: 0 0 10px rgba(125, 242, 176, 0.25);
  animation: exit-glow 2.4s ease-in-out infinite;
}
@keyframes exit-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(125, 242, 176, 0.2); }
  50%      { box-shadow: 0 0 16px rgba(125, 242, 176, 0.5); }
}
.exit-btn:hover {
  border-color: #7df2b0;
  color: #fff;
  box-shadow: 0 0 18px rgba(125, 242, 176, 0.25);
  transform: translateY(-2px);
}
