/* ============================================================
   ハンバーガー打 — スタイル
   ネオン × アメリカンダイナー
   ============================================================ */

:root {
  --bg0: #0b0713;
  --bg1: #150d24;
  --bg2: #1e1333;
  --pink: #ff3d68;
  --pink-d: #c2143c;
  --yellow: #ffd23f;
  --orange: #ff8c1a;
  --teal: #2ec4b6;
  --green: #4ade80;
  --blue: #38bdf8;
  --purple: #c084fc;
  --ink: #f6f1ff;
  --dim: #a293bd;
  --panel: rgba(255, 255, 255, .05);
  --line: rgba(255, 255, 255, .12);
  --bw: 132px;
  --font: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --mono: "SF Mono", "Consolas", "Roboto Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255, 61, 104, .22), transparent 70%),
    radial-gradient(ellipse 70% 50% at 90% 110%, rgba(46, 196, 182, .18), transparent 70%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 60%);
}

/* 背景のスキャンライン＋グリッド */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
  opacity: .5;
}

button { font-family: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------------- 画面切り替え ---------------- */
.screen {
  position: fixed; inset: 0; z-index: 1;
  display: none; flex-direction: column;
  overflow-y: auto;
}
.screen.on { display: flex; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 20px 22px 40px; }

/* ---------------- ネオン看板 ---------------- */
.sign { text-align: center; padding: 26px 0 6px; }
.sign h1 {
  margin: 0; font-size: clamp(38px, 7.4vw, 84px); font-weight: 900;
  letter-spacing: .04em; line-height: 1;
  background: linear-gradient(180deg, #fff 0%, var(--yellow) 45%, var(--orange) 75%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 140, 26, .55)) drop-shadow(0 4px 0 rgba(0, 0, 0, .5));
  animation: flicker 6s infinite;
}
@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: .55; }
  98% { opacity: 1; }
  98.6% { opacity: .7; }
}
.sign .en {
  margin: 6px 0 0; font-family: var(--mono); font-size: clamp(11px, 1.7vw, 15px);
  letter-spacing: .42em; color: var(--teal); text-transform: uppercase;
  text-shadow: 0 0 12px rgba(46, 196, 182, .8);
}
.sign .sub { margin: 14px 0 0; color: var(--dim); font-size: 14px; }

/* ---------------- ボタン ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 14px; border: 2px solid transparent;
  background: linear-gradient(180deg, #2a1b45, #1a1030);
  color: var(--ink); font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 0 #0d0818, 0 8px 20px rgba(0, 0, 0, .5);
  transition: transform .1s, box-shadow .1s, filter .15s;
}
.btn:hover { filter: brightness(1.22); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #0d0818; }
.btn.primary {
  background: linear-gradient(180deg, #ff6b8a, var(--pink) 55%, var(--pink-d));
  box-shadow: 0 5px 0 #7d0c26, 0 10px 26px rgba(255, 61, 104, .45);
  font-size: 17px; padding: 16px 34px;
}
.btn.primary:active { box-shadow: 0 1px 0 #7d0c26; }
.btn.gold {
  background: linear-gradient(180deg, #ffe98a, var(--yellow) 50%, #d99a00);
  color: #2b1a00; box-shadow: 0 5px 0 #8a6200, 0 10px 26px rgba(255, 210, 63, .4);
}
.btn.teal { background: linear-gradient(180deg, #56e0d2, var(--teal) 55%, #178377); color: #052723; box-shadow: 0 5px 0 #0c5a52; }
.btn.ghost { background: rgba(255, 255, 255, .06); border-color: var(--line); box-shadow: none; }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 0 #0d0818; }

.menu { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

/* ---------------- ハンバーガー描画 ---------------- */
.burger {
  --bscale: 1;
  width: var(--bw);
  transform: scale(var(--bscale)); transform-origin: bottom center;
  display: flex; flex-direction: column; align-items: center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55));
}
.burger .layer { flex: 0 0 auto; margin-top: -2px; position: relative; }
.burger .layer:first-child { margin-top: 0; }

/* ---------------- タイトル画面 ---------------- */
.hero {
  display: flex; align-items: flex-end; justify-content: center; gap: 30px;
  margin-top: 10px; min-height: 210px;
}
.hero .burger { animation: bob 2.6s ease-in-out infinite; }
.hero .burger:nth-child(2) { animation-delay: .5s; }
.hero .burger:nth-child(3) { animation-delay: 1s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin-top: 30px;
}
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px;
}
.feature b { display: block; font-size: 14px; margin-bottom: 4px; color: var(--yellow); }
.feature span { font-size: 12.5px; color: var(--dim); line-height: 1.6; }

/* ---------------- 共通ヘッダ ---------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: rgba(10, 6, 18, .7); backdrop-filter: blur(8px);
}
.topbar h2 { margin: 0; font-size: 18px; letter-spacing: .06em; }
.topbar .right { display: flex; gap: 8px; align-items: center; }

/* ---------------- レベル / コース選択 ---------------- */
.pick-grid { display: grid; gap: 14px; margin-top: 16px; }
.pick-grid.lv { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.pick-grid.co { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.pick-grid.md { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  position: relative; text-align: left; padding: 18px;
  border-radius: 18px; border: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  color: var(--ink); transition: transform .14s, border-color .14s, box-shadow .14s;
  overflow: hidden;
}
.card::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 4px;
  background: var(--c, var(--pink)); opacity: .8;
}
.card:hover { transform: translateY(-4px); border-color: var(--c, var(--pink)); box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 24px -6px var(--c, var(--pink)); }
.card.sel { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 40%, transparent), 0 0 30px -6px var(--c); }
.card .lvtag {
  display: inline-block; font-family: var(--mono); font-weight: 800; font-size: 12px;
  padding: 3px 9px; border-radius: 999px; background: var(--c); color: #10061c; letter-spacing: .1em;
}
.card h3 { margin: 9px 0 4px; font-size: 17px; line-height: 1.3; }
.card .cardtop { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.card .cardtop .ico { font-size: 20px; line-height: 1; }
.card p { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.6; }
.card .big { font-size: 30px; font-weight: 900; color: var(--yellow); font-family: var(--mono); }
.card .meta { margin-top: 10px; display: flex; gap: 14px; font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.card .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.card .tg {
  font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: #cfc2e6;
  white-space: nowrap;
}

.section-title {
  margin: 26px 0 2px; font-size: 13px; letter-spacing: .28em; color: var(--teal);
  text-transform: uppercase; font-family: var(--mono);
}

/* ---------------- ゲーム画面 ---------------- */
#screen-game { overflow: hidden; }
.game-root { display: flex; flex-direction: column; height: 100%; }

.hud {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--line); border-bottom: 1px solid var(--line);
}
.hud .cell { background: rgba(12, 7, 22, .88); padding: 8px 12px; text-align: center; }
.hud .k { font-size: 10px; letter-spacing: .18em; color: var(--dim); font-family: var(--mono); }
.hud .v { font-size: 22px; font-weight: 900; font-family: var(--mono); line-height: 1.2; }
.hud .v.money { color: var(--yellow); }
.hud .v.time { color: var(--teal); }
.hud .v.time.warn { color: var(--pink); animation: pulse .5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.hud .v.combo { color: var(--orange); }

/* フィーバーゲージ */
.fever-bar { height: 6px; background: rgba(255, 255, 255, .07); position: relative; overflow: hidden; }
.fever-bar i {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--yellow), var(--pink));
  transition: width .18s ease;
  box-shadow: 0 0 14px var(--orange);
}

/* ベルト */
.stage { flex: 1; position: relative; overflow: hidden; min-height: 210px; }
.belt {
  position: absolute; inset: auto 0 0 0; height: 100%;
}
.belt-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 54px;
  background:
    repeating-linear-gradient(90deg, #3a3350 0 26px, #2b2540 26px 52px),
    #322b48;
  border-top: 3px solid #574c78;
  box-shadow: 0 -8px 22px rgba(0, 0, 0, .55) inset;
  animation: beltmove 1.1s linear infinite;
}
@keyframes beltmove { from { background-position-x: 0, 0; } to { background-position-x: -52px, 0; } }
.belt-floor::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
}

/* 食べるゾーン */
.mouth-zone {
  position: absolute; left: 0; bottom: 0; width: 120px; top: 0;
  background: linear-gradient(90deg, rgba(255, 61, 104, .32), transparent);
  border-right: 3px dashed rgba(255, 61, 104, .5);
  pointer-events: none;
}
.mouth-zone span {
  position: absolute; bottom: 62px; left: 8px; white-space: nowrap;
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
  color: #ffc3d0; text-shadow: 0 2px 5px rgba(0, 0, 0, .9);
}

.burger-item {
  position: absolute; left: 0; bottom: 46px;
  width: calc(var(--bw) * 1.18);
  display: flex; flex-direction: column; align-items: center;
  will-change: transform;
}
.burger-item .plate {
  width: calc(var(--bw) * 1.18); height: 12px; border-radius: 50%;
  background: linear-gradient(180deg, #e9e5f5, #9d95bb);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .5); margin-top: -4px;
}
.burger-item .tag {
  margin-top: 6px; font-size: 10.5px; font-family: var(--mono); white-space: nowrap;
  color: var(--dim); background: rgba(0, 0, 0, .5); padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line);
}
.burger-item .price {
  position: absolute; top: -18px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-weight: 900; font-size: 15px;
  color: var(--yellow); text-shadow: 0 2px 0 #7a4d00, 0 0 12px rgba(255, 210, 63, .7);
}
.burger-item.active .burger { animation: activebob .9s ease-in-out infinite; }
@keyframes activebob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.burger-item.rare-4 .burger { filter: drop-shadow(0 0 14px var(--purple)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.burger-item.rare-5 .burger { filter: drop-shadow(0 0 22px var(--yellow)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); animation: legend 1.4s ease-in-out infinite; }
@keyframes legend { 0%, 100% { filter: drop-shadow(0 0 18px var(--yellow)); } 50% { filter: drop-shadow(0 0 34px #fff2a8); } }
.burger-item.custom .tag { border-color: var(--teal); color: var(--teal); }

.burger-item.eaten { animation: eaten .45s cubic-bezier(.3, -.6, .5, 1) forwards; }
@keyframes eaten {
  0% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }
  100% { transform: translateY(-190px) scale(.35) rotate(28deg); opacity: 0; }
}
.burger-item.missed { animation: missed .55s ease-in forwards; }
@keyframes missed {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(150px) rotate(-38deg); opacity: 0; }
}

/* 残り時間リング */
.timer-ring {
  position: absolute; top: -36px; left: 50%; margin-left: -32px;
  width: 64px; height: 6px; border-radius: 3px;
  background: rgba(255, 255, 255, .16); overflow: hidden;
}
.timer-ring i { display: block; height: 100%; background: var(--teal); }
.timer-ring i.warn { background: var(--pink); }

/* ---------------- タイピング表示 ---------------- */
.typing {
  background: rgba(9, 5, 17, .93); border-top: 1px solid var(--line);
  padding: 16px 20px 12px; text-align: center;
}
.typing .jp { font-size: 15px; color: #c9bce0; margin-bottom: 8px; min-height: 22px; font-weight: 700; }
.typing .txt {
  font-family: var(--mono); font-size: clamp(22px, 3vw, 38px); font-weight: 700;
  line-height: 1.55; letter-spacing: .02em; word-break: break-word;
  min-height: 48px;
}
.typing { position: relative; }
.typing .replay {
  position: absolute; right: 14px; top: 12px;
  padding: 6px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--dim);
  font-family: var(--mono);
}
.typing .replay:hover { color: var(--ink); border-color: var(--teal); }
.typing .replay.off { display: none; }
.typing .txt .c { transition: color .06s; }
.typing .txt .c.done { color: var(--green); text-shadow: 0 0 10px rgba(74, 222, 128, .5); }
.typing .txt .c.cur {
  color: #10061c; background: var(--yellow); border-radius: 4px;
  box-shadow: 0 0 16px var(--yellow); animation: curblink .8s steps(2) infinite;
}
@keyframes curblink { 50% { background: #fff; box-shadow: 0 0 22px #fff; } }
.typing .txt .c.todo { color: #6d5f8c; }
.typing .txt .c.sp { opacity: .45; }
.typing .txt .c.bad { color: var(--pink); background: rgba(255, 61, 104, .2); border-radius: 4px; }
.shake, .typing.shake { animation: shake .22s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-9px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-4px); }
}

/* 仮想キーボード */
.kbd { padding: 8px 12px 14px; display: flex; flex-direction: column; gap: 4px; align-items: center; background: rgba(9, 5, 17, .93); }
.kbd .row { display: flex; gap: 4px; }
.kbd .key {
  width: 34px; height: 30px; border-radius: 6px; font-family: var(--mono); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--dim);
  transition: background .08s, color .08s, transform .08s;
}
.kbd .key.wide { width: 150px; }
.kbd .key.next { background: var(--yellow); color: #10061c; border-color: #fff; box-shadow: 0 0 14px var(--yellow); transform: translateY(-2px); }
.kbd .key.hit { background: var(--green); color: #052; transform: translateY(2px); }
.kbd .key.err { background: var(--pink); color: #fff; }
.kbd.off { display: none; }

/* ---------------- 演出 ---------------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.pop {
  position: absolute; font-family: var(--mono); font-weight: 900; white-space: nowrap;
  animation: popup .9s cubic-bezier(.2, .8, .3, 1) forwards; text-shadow: 0 3px 0 rgba(0, 0, 0, .6);
}
@keyframes popup {
  0% { transform: translate(-50%, 0) scale(.4); opacity: 0; }
  18% { transform: translate(-50%, -22px) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -100px) scale(.95); opacity: 0; }
}
.particle { position: absolute; border-radius: 50%; will-change: transform, opacity; }

.fever-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 30; opacity: 0;
  transition: opacity .4s;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 140, 26, .35), transparent 60%),
    radial-gradient(ellipse at 50% -20%, rgba(255, 61, 104, .3), transparent 60%);
}
body.fever .fever-overlay { opacity: 1; animation: feverpulse .5s infinite alternate; }
@keyframes feverpulse { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(35deg); } }
body.fever .belt-floor { animation-duration: .5s; }
.fever-banner {
  position: fixed; top: 42%; left: 50%; transform: translate(-50%, -50%);
  font-size: clamp(44px, 10vw, 110px); font-weight: 900; font-family: var(--mono);
  letter-spacing: .1em; z-index: 41; pointer-events: none;
  background: linear-gradient(180deg, #fff, var(--yellow), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 140, 26, .9));
  animation: feverbanner 1.5s ease forwards;
}
@keyframes feverbanner {
  0% { transform: translate(-50%, -50%) scale(.2) rotate(-14deg); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.15) rotate(3deg); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
  100% { transform: translate(-50%, -140%) scale(.8); opacity: 0; }
}

/* カウントダウン */
.countdown {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 3, 12, .78); backdrop-filter: blur(3px);
}
.countdown b {
  font-family: var(--mono); font-size: clamp(90px, 20vw, 220px); font-weight: 900;
  background: linear-gradient(180deg, #fff, var(--yellow), var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 180, 40, .8));
  animation: cd .85s ease forwards;
}
@keyframes cd {
  0% { transform: scale(2.2); opacity: 0; }
  30% { transform: scale(1); opacity: 1; }
  100% { transform: scale(.7); opacity: 0; }
}

/* ---------------- リザルト ---------------- */
.result-hero { text-align: center; padding: 20px 0 6px; }
.verdict {
  font-size: clamp(30px, 6vw, 60px); font-weight: 900; margin: 6px 0 2px; font-family: var(--mono);
  letter-spacing: .04em;
}
.verdict.win { background: linear-gradient(180deg, #fff, var(--yellow), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(255, 200, 40, .7)); }
.verdict.lose { color: #8b7ba8; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 118px; height: 118px; border-radius: 50%; margin: 12px auto;
  font-family: var(--mono); font-size: 48px; font-weight: 900;
  border: 4px solid currentColor;
  box-shadow: 0 0 32px -4px currentColor, inset 0 0 30px -10px currentColor;
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: center; }
.stat .k { font-size: 10.5px; letter-spacing: .18em; color: var(--dim); font-family: var(--mono); }
.stat .v { font-size: 26px; font-weight: 900; font-family: var(--mono); margin-top: 2px; }
.money-line { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-family: var(--mono); }
.money-line .m { font-size: 15px; color: var(--dim); }
.money-line .m b { font-size: 30px; color: var(--yellow); display: block; }

.bar-list { margin-top: 18px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-family: var(--mono); font-size: 12.5px; }
.bar-row .lbl { width: 90px; color: var(--dim); text-align: right; }
.bar-row .bar { flex: 1; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--orange)); }
.bar-row .num { width: 52px; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.badge {
  padding: 7px 13px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: rgba(255, 210, 63, .14); border: 1px solid rgba(255, 210, 63, .5); color: var(--yellow);
}
.badge.new { animation: badgepop .6s ease; }
@keyframes badgepop { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------------- ギャラリー / 投稿 ---------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; margin-top: 16px; }
.gcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 10px 12px; text-align: center; position: relative;
  transition: transform .14s, box-shadow .14s;
}
.gcard:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0, 0, 0, .5); }
.gcard .holder { height: 150px; display: flex; align-items: flex-end; justify-content: center; }
.gcard .nm { font-size: 12.5px; font-weight: 800; margin-top: 8px; line-height: 1.3; }
.gcard .jp { font-size: 11px; color: var(--dim); margin-top: 2px; }
.gcard .rar { position: absolute; top: 8px; left: 8px; font-size: 10px; font-family: var(--mono); padding: 2px 7px; border-radius: 999px; font-weight: 800; }
.gcard .del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255, 61, 104, .2); border: 1px solid rgba(255, 61, 104, .5); color: var(--pink);
  font-size: 13px; line-height: 1; display: none;
}
.gcard.mine .del { display: block; }
.gcard.mine { border-color: rgba(46, 196, 182, .5); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--dim);
}
.chip.on { background: var(--pink); border-color: var(--pink); color: #fff; }

/* 投稿フォーム */
.form { display: grid; grid-template-columns: 1fr 300px; gap: 24px; margin-top: 16px; align-items: start; }
@media (max-width: 780px) { .form { grid-template-columns: 1fr; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; letter-spacing: .1em; color: var(--teal); font-family: var(--mono); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; font-family: inherit; font-size: 14px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 61, 104, .2); }
.field .hint { font-size: 11px; color: var(--dim); margin-top: 4px; }
.field select option { background: #1a1030; }

.ing-picker { display: flex; flex-direction: column; gap: 6px; }
.ing-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px;
  max-height: 210px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(0, 0, 0, .25);
}
.ing-btn {
  display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 8px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--ink); font-size: 11px;
  text-align: left;
}
.ing-btn:hover { border-color: var(--yellow); }
.ing-btn .sw { width: 20px; height: 12px; border-radius: 3px; flex: none; }
.stack-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.stack-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-radius: 9px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 12px;
}
.stack-row .nm { flex: 1; }
.stack-row button { background: none; border: none; color: var(--dim); font-size: 13px; padding: 2px 5px; }
.stack-row button:hover { color: var(--pink); }

.preview-box {
  position: sticky; top: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; text-align: center;
}
.preview-box .holder { min-height: 220px; display: flex; align-items: flex-end; justify-content: center; }

/* ---------------- 記録 ---------------- */
table.rec { width: 100%; border-collapse: collapse; margin-top: 12px; font-family: var(--mono); font-size: 13px; }
table.rec th, table.rec td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); }
table.rec th { color: var(--teal); font-size: 11px; letter-spacing: .12em; text-align: right; }
table.rec th:first-child, table.rec td:first-child { text-align: left; }
table.rec tr:hover td { background: rgba(255, 255, 255, .04); }

/* ---------------- トースト ---------------- */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  padding: 11px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: rgba(20, 12, 34, .96); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6); animation: toastin .3s ease;
}
@keyframes toastin { from { transform: translateY(16px); opacity: 0; } }

/* ---------------- ヘルプ ---------------- */
.help h3 { color: var(--yellow); font-size: 16px; margin: 22px 0 6px; }
.help p, .help li { font-size: 13.5px; line-height: 1.85; color: #d7cdeb; }
.help ul { padding-left: 20px; }
.help code {
  font-family: var(--mono); background: rgba(255, 255, 255, .08); padding: 2px 7px;
  border-radius: 6px; font-size: 12.5px; color: var(--yellow);
}

.toggle { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dim); font-family: var(--mono); }
.toggle input { width: 16px; height: 16px; accent-color: var(--pink); }
.toggle input[type=range] { width: 82px; }

@media (max-width: 620px) {
  :root { --bw: 104px; }
  .hud { grid-template-columns: repeat(3, 1fr); }
  .hud .cell:nth-child(n+4) { grid-column: span 1; }
  .kbd { display: none; }
}

/* ============================================================
   v2 — わかりやすさとUIの改善
   ============================================================ */

/* ---- ルール3ステップ（タイトル） ---- */
.rules3 {
  display: flex; align-items: stretch; justify-content: center; gap: 10px;
  margin: 26px auto 0; flex-wrap: wrap;
}
.r3 {
  position: relative; flex: 1 1 230px; max-width: 300px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px 16px; text-align: center;
}
.r3 .n {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; font-family: var(--mono); font-weight: 900;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--pink); color: #fff; box-shadow: 0 0 14px rgba(255, 61, 104, .7);
}
.r3 .rico { font-size: 34px; line-height: 1; margin: 6px 0 8px; }
.r3 b { display: block; font-size: 15.5px; margin-bottom: 6px; color: var(--yellow); }
.r3 p { margin: 0; font-size: 12.5px; line-height: 1.75; color: #cfc2e6; }
.r3arrow { align-self: center; color: var(--pink); font-size: 17px; opacity: .75; }
.hl { color: var(--yellow); font-weight: 800; }
@media (max-width: 760px) { .r3arrow { display: none; } }

/* ---- 設定（折りたたみ） ---- */
.settings {
  margin: 24px auto 0; max-width: 780px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px;
}
.settings summary {
  padding: 12px 16px; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--dim);
  list-style: none;
}
.settings summary::-webkit-details-marker { display: none; }
.settings summary::before { content: "\25B8  "; color: var(--teal); }
.settings[open] summary::before { content: "\25BE  "; }
.settings summary:hover { color: var(--ink); }
.setrow {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: center;
  padding: 4px 16px 14px;
}
.settings select {
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 4px 8px; font-family: var(--mono); font-size: 12px;
}
.settings select option { background: #1a1030; }
.mono-note { font-size: 11px; color: var(--dim); font-family: var(--mono); }

/* ---- 手順の説明文 ---- */
.step-note { margin: 4px 0 12px; font-size: 13px; line-height: 1.8; color: var(--dim); }
.step-note b { color: #e6dcf7; }

/* ---- 確認パネル（コース選択の下） ---- */
.confirm {
  margin: 30px auto 0; max-width: 760px; text-align: center;
  background: linear-gradient(180deg, rgba(255, 210, 63, .1), rgba(255, 255, 255, .02));
  border: 2px solid rgba(255, 210, 63, .38); border-radius: 20px; padding: 20px 22px 24px;
}
.confirm .ctitle {
  font-size: 11px; letter-spacing: .26em; color: var(--yellow); font-family: var(--mono);
  text-transform: uppercase; margin-bottom: 10px;
}
.confirm .cbody { margin: 0; font-size: 15.5px; line-height: 1.95; }
.confirm .cbody b { color: var(--yellow); }
.confirm .cmeta {
  margin: 12px 0 18px; font-size: 12px; color: var(--dim); font-family: var(--mono);
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.btn.big { font-size: 19px; padding: 18px 42px; }

/* ---- 元取りバー ---- */
.goalbar {
  position: relative; height: 30px; background: rgba(0, 0, 0, .55);
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.goalbar i {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, #1d7a4d, #4ade80);
  transition: width .3s cubic-bezier(.2, .8, .3, 1);
}
.goalbar.done i { background: linear-gradient(90deg, #d99a00, var(--yellow), #fff3b0); box-shadow: 0 0 22px var(--yellow); }
.goalbar .glbl {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .95); pointer-events: none;
}
.goalbar .glbl .mid { font-size: 13px; }
.goalbar.done .glbl { color: #2b1a00; text-shadow: none; }
.goalbar .glbl b { color: var(--yellow); }
.goalbar.done .glbl b { color: #7a4d00; }
.goalbar .glbl .right.ok { color: var(--green); }
.goalbar .glbl .right.ng { color: #ff8fa6; }
.goalbar.done .glbl .right.ok { color: #1c6b3a; }
@media (max-width: 700px) { .goalbar .glbl .right { display: none; } }

.fever-bar { position: relative; }
.fever-bar::after {
  content: "FEVER"; position: absolute; right: 8px; top: -1px;
  font-family: var(--mono); font-size: 8px; letter-spacing: .18em; color: var(--orange);
}

/* ---- タイピング欄 ---- */
.typing .hintline { margin-top: 8px; font-size: 11px; color: #7d6da0; font-family: var(--mono); }
.typing kbd {
  font-family: var(--mono); background: rgba(255, 255, 255, .1); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font-size: 10.5px; color: var(--ink);
}

/* ---- レシート（リザルト） ---- */
.receipt {
  max-width: 430px; margin: 18px auto 0; text-align: left;
  background: linear-gradient(180deg, #fffdf6, #f3ecdc); color: #2a2018;
  border-radius: 6px; padding: 18px 22px 20px; font-family: var(--mono);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}
.receipt .rhead {
  text-align: center; font-weight: 900; font-size: 13px; letter-spacing: .04em;
  padding-bottom: 10px; border-bottom: 2px dashed #b9ad95; margin-bottom: 12px;
}
.receipt .rrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; padding: 5px 0; }
.receipt .rrow b { font-size: 17px; font-weight: 900; }
.receipt .rsep { border-top: 2px dashed #b9ad95; margin: 8px 0; }
.receipt .rrow.total { font-size: 15px; font-weight: 900; }
.receipt .rrow.total b { font-size: 24px; }
.receipt .rnote {
  margin-top: 10px; padding-top: 10px; border-top: 1px dotted #c3b79f;
  font-size: 11.5px; line-height: 1.7; color: #6b5f4d; text-align: center; font-family: var(--font);
}
.stat .s { font-size: 10.5px; color: var(--dim); margin-top: 3px; line-height: 1.4; }

/* ---- モーダル ---- */
.modal {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 3, 12, .82); backdrop-filter: blur(6px); padding: 20px; overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal-box {
  width: min(880px, 100%); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, #241640, #150d24);
  border: 2px solid rgba(255, 210, 63, .4); border-radius: 24px; padding: 26px 26px 28px;
  text-align: center; box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
  animation: modalin .35s cubic-bezier(.2, .8, .3, 1);
}
@keyframes modalin { from { transform: translateY(24px) scale(.96); opacity: 0; } }
.modal-box h2 {
  margin: 0 0 20px; font-size: clamp(21px, 3.4vw, 30px);
  background: linear-gradient(180deg, #fff, var(--yellow), var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tsteps { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.tstep {
  position: relative; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px 14px 14px;
}
.tstep .n {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; font-family: var(--mono); font-weight: 900;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--pink); color: #fff; box-shadow: 0 0 14px rgba(255, 61, 104, .7);
}
.tstep .tico { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.tstep b { display: block; font-size: 15.5px; color: var(--yellow); margin-bottom: 6px; }
.tstep p { margin: 0; font-size: 12.5px; line-height: 1.8; color: #cfc2e6; }
.tnote {
  margin: 18px auto 22px; max-width: 620px; text-align: left;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px;
}
.tnote p { margin: 0 0 7px; font-size: 13px; line-height: 1.8; color: #d7cdeb; }
.tnote p:last-child { margin-bottom: 0; }

/* ---- クレジット ---- */
.credit {
  margin: 44px auto 8px; padding-top: 18px; border-top: 1px solid var(--line);
  text-align: center; font-size: 12.5px; color: var(--dim); line-height: 1.9;
}
.credit a {
  color: var(--yellow); font-weight: 800; text-decoration: none;
  border-bottom: 1px dotted rgba(255, 210, 63, .5);
}
.credit a:hover { color: #fff; border-bottom-color: #fff; }
.credit .u { display: block; font-family: var(--mono); font-size: 11px; opacity: .65; }

/* ---- はみ出す表 ---- */
.tablewrap { overflow-x: auto; }
.tablewrap table.rec { min-width: 560px; }

/* ---- レベルカードの出題例 ---- */
.card .ex {
  margin-top: 9px; padding: 7px 10px; border-radius: 9px;
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .ex .jp { color: var(--dim); font-family: var(--font); }

/* ---- コースカード ---- */
.card .payline { margin-top: 8px; font-size: 12px; color: var(--dim); line-height: 1.7; }
.card .payline b { color: var(--ink); }

/* ---- 目標達成バナー ---- */
.goal-banner {
  background: linear-gradient(180deg, #fff, #ffe98a, var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(74, 222, 128, .9));
  font-size: clamp(34px, 7vw, 78px);
}

/* ---- ラスト10秒 ---- */
body.hurry .stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  box-shadow: inset 0 0 90px rgba(255, 61, 104, .55);
  animation: hurrypulse .62s ease-in-out infinite alternate;
}
@keyframes hurrypulse {
  from { box-shadow: inset 0 0 60px rgba(255, 61, 104, .3); }
  to { box-shadow: inset 0 0 120px rgba(255, 61, 104, .8); }
}
body.hurry .belt-floor { animation-duration: .8s; }

/* ---- 一時停止 ---- */
.pausebtn {
  position: absolute; top: 10px; right: 12px; z-index: 8;
  padding: 8px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: rgba(12, 7, 22, .82); border: 1px solid var(--line); color: var(--dim);
  backdrop-filter: blur(6px); transition: color .12s, border-color .12s, transform .1s;
}
.pausebtn:hover { color: var(--ink); border-color: var(--pink); transform: translateY(-1px); }
.pausebtn:active { transform: translateY(1px); }

.pause-box { max-width: 460px; }
.pause-info {
  margin: 0 0 20px; font-size: 15px; color: #d7cdeb; font-family: var(--mono);
}
.pause-info b { color: var(--yellow); font-size: 19px; }
.pause-menu { display: flex; flex-direction: column; gap: 11px; align-items: stretch; }
.pause-menu .btn { width: 100%; }
.pause-note { margin: 18px 0 0; font-size: 11.5px; color: var(--dim); }

/* ---- 順位の1行（リザルト） ---- */
.rankline {
  margin: 16px auto 0; max-width: 520px; padding: 11px 20px; border-radius: 999px;
  font-size: 14.5px; color: #d7cdeb;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
}
.rankline b { color: var(--yellow); font-size: 17px; }
.rankline.best {
  background: linear-gradient(180deg, rgba(255, 210, 63, .22), rgba(255, 210, 63, .07));
  border-color: rgba(255, 210, 63, .6); color: #fff;
  animation: bestpop .6s cubic-bezier(.2, .8, .3, 1);
}
@keyframes bestpop {
  0% { transform: scale(.86); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
