:root {
  color-scheme: dark;
  --bg: #08070a;
  --panel: rgba(18, 14, 22, 0.83);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8f2e9;
  --muted: #c5b8aa;
  --gold: #f5c36b;
  --red: #ff4f46;
  --blue: #5bbcff;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: "Noto Sans JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", system-ui, sans-serif; }
body { overflow-x: hidden; }
#glCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; background: radial-gradient(circle at 50% 35%, #29161d, #08070a 70%); }
#appShell { position: relative; z-index: 1; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 7vh 0 80px; display: grid; gap: 18px; }
.panel { border: 1px solid var(--line); background: linear-gradient(140deg, rgba(27, 18, 25, .90), rgba(9, 9, 13, .76)); box-shadow: 0 20px 80px rgba(0,0,0,.42); backdrop-filter: blur(18px); border-radius: 24px; padding: clamp(22px, 4vw, 42px); }
.hero { min-height: 460px; display: flex; flex-direction: column; justify-content: center; max-width: 760px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .22em; font-weight: 800; margin: 0 0 12px; }
h1, h2, p { margin-top: 0; }
h1 { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(48px, 9vw, 92px); line-height: .92; margin-bottom: 24px; letter-spacing: -.05em; text-shadow: 0 0 28px rgba(255, 63, 47, .25); }
h1 span { display: block; margin-top: 14px; font-family: inherit; color: var(--gold); font-size: .45em; letter-spacing: .12em; }
h2 { font-size: clamp(25px, 4vw, 38px); margin-bottom: 0; }
.lead { color: var(--muted); font-size: clamp(16px, 2.2vw, 21px); line-height: 1.85; max-width: 650px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
button { font: inherit; cursor: pointer; }
.primary, .secondary { min-height: 54px; border-radius: 999px; padding: 0 24px; font-weight: 800; letter-spacing: .03em; }
.primary { border: 0; color: #160a08; background: linear-gradient(110deg, #ff6a52, #f5c36b); box-shadow: 0 12px 34px rgba(255, 84, 58, .28); }
.primary:disabled { filter: grayscale(1); opacity: .55; cursor: not-allowed; }
.secondary { color: var(--text); border: 1px solid var(--line); background: rgba(255,255,255,.06); }
.status { margin: 14px 0 0; min-height: 24px; color: #d8ccbf; font-size: 14px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.badge { border: 1px solid rgba(245,195,107,.36); color: var(--gold); border-radius: 999px; padding: 8px 14px; font-weight: 800; white-space: nowrap; }
.mode-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.mode-card { min-height: 150px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); color: var(--text); text-align: left; padding: 18px; display: flex; flex-direction: column; gap: 9px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.mode-card:hover { transform: translateY(-3px); border-color: rgba(245,195,107,.5); }
.mode-card.selected { border-color: rgba(255,94,75,.82); background: linear-gradient(145deg, rgba(255,74,57,.19), rgba(245,195,107,.08)); box-shadow: inset 0 0 24px rgba(255,75,49,.08); }
.mode-card strong { font-size: 17px; }
.mode-card span { color: var(--muted); line-height: 1.55; font-size: 13px; }
.mode-card em { margin-top: auto; color: var(--gold); font-style: normal; font-size: 11px; letter-spacing: .13em; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.stats-grid > div { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: rgba(0,0,0,.16); }
.stats-grid span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stats-grid strong { font-size: clamp(24px, 4vw, 38px); color: var(--gold); }
.text-button { color: var(--muted); border: 0; background: none; text-decoration: underline; text-underline-offset: 4px; }
.guide ol { margin: 24px 0; padding-left: 1.4em; color: var(--muted); line-height: 1.85; }
.guide li + li { margin-top: 10px; }
.safety { border-left: 4px solid var(--red); padding: 12px 16px; color: #eaded2; background: rgba(255,79,70,.08); line-height: 1.7; }
#toast { position: fixed; z-index: 5; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 13px 18px; border-radius: 999px; background: #f5c36b; color: #160c08; font-weight: 900; transition: .25s ease; box-shadow: 0 10px 35px rgba(0,0,0,.4); }
#toast.show { opacity: 1; transform: translate(-50%,0); }
body.xr-active #appShell, body.xr-active #toast { display: none; }
@media (max-width: 900px) { .mode-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { #appShell { width: min(100% - 20px, 1120px); padding-top: 16px; } .panel { border-radius: 18px; padding: 22px; } .hero { min-height: 76vh; } .mode-grid { grid-template-columns: 1fr; } .mode-card { min-height: 116px; } .stats-grid { grid-template-columns: 1fr 1fr; } .actions { flex-direction: column; } .primary, .secondary { width: 100%; } }
