:root {
  --ink: #12161a;
  --muted: #7c8589;
  --paper: #f3f1eb;
  --panel: #fbfaf7;
  --line: #deded8;
  --orange: #ff6547;
  --yellow: #f5c84b;
  --cyan: #4bb9c9;
  --pink: #ef83a8;
  --green: #78b78b;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: Manrope, sans-serif; }
body:before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .28; background-image: radial-gradient(#b8bab5 0.65px, transparent .65px); background-size: 12px 12px; mask-image: linear-gradient(to bottom, black, transparent 90%); }
button, input { font: inherit; }
.app-shell { max-width: 1500px; min-height: 100vh; margin: auto; padding: 30px 44px 42px; }
.topbar { height: 52px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; font-size: 13px; letter-spacing: .14em; }
.brand-mark { color: var(--orange); font-size: 24px; line-height: 0; }
.top-status, .key-guide { color: var(--muted); font: 11px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--yellow); vertical-align: 1px; }
.workspace { display: grid; grid-template-columns: minmax(230px, 28%) 1fr; min-height: calc(100vh - 124px); }
.sidebar { display: flex; flex-direction: column; padding: 72px 10% 0 0; border-right: 1px solid var(--line); }
.eyebrow, .metric-label, .meta-label { color: var(--muted); font: 10px "DM Mono", monospace; letter-spacing: .16em; }
h1 { margin: 18px 0 18px; font-size: clamp(38px, 4vw, 65px); line-height: .98; letter-spacing: -.06em; font-weight: 800; }
h1 em { color: var(--orange); font-style: normal; }
.intro { max-width: 290px; margin: 0 0 42px; color: #646d70; font-size: 13px; line-height: 1.75; }
.upload-zone { display: flex; min-height: 142px; padding: 18px; flex-direction: column; justify-content: center; gap: 5px; border: 1px dashed #b9bbb5; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.upload-zone:hover { border-color: var(--orange); background: #fff3ed; transform: translateY(-2px); }
.upload-icon { color: var(--orange); font-size: 26px; line-height: 1; }
.upload-title { font-weight: 800; font-size: 15px; }
.upload-hint { color: var(--muted); font: 10px "DM Mono", monospace; }
#audioInput { display: none; }
.track-meta { padding-top: 25px; }
.track-name { overflow: hidden; margin: 10px 0 4px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.track-detail { color: var(--muted); font: 11px "DM Mono", monospace; }
.side-footer { display: flex; flex-direction: column; gap: 17px; margin-top: auto; padding-bottom: 5px; }
.key-guide { display: flex; align-items: center; gap: 5px; }
kbd { display: inline-grid; width: 22px; height: 22px; place-items: center; color: var(--ink); border: 1px solid #c9cbc5; background: var(--panel); font: 11px "DM Mono", monospace; }
.key-guide span { margin-left: 5px; }
.version { color: #a5aaa8; font: 10px "DM Mono", monospace; }
.game-area { display: flex; min-width: 0; padding: 40px 0 0 5%; flex-direction: column; }
.game-header, .transport { display: flex; align-items: center; }
.game-header { gap: 38px; padding: 0 2px 22px; }
.metric-label { display: block; margin-bottom: 5px; }
.game-header strong { font: 500 20px "DM Mono", monospace; letter-spacing: -.05em; }
.combo-block strong { color: var(--orange); }
.reset-btn { width: 32px; height: 32px; margin-left: auto; border: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; font-size: 20px; }
.reset-btn:hover { color: var(--orange); border-color: var(--orange); }
.stage { position: relative; overflow: hidden; flex: 1; min-height: 440px; background: var(--panel); border: 1px solid var(--line); }
.stage:before { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,.7), transparent 40%); pointer-events: none; }
.lane-lines { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); pointer-events: none; }
.lane-lines i { border-right: 1px solid rgba(210,211,205,.8); }
.lane-lines i:first-child { border-left: 1px solid rgba(210,211,205,.8); }
.lane-labels { position: absolute; top: 16px; right: 0; left: 0; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); color: #b4b9b5; text-align: center; font: 11px "DM Mono", monospace; }
.hit-line { position: absolute; right: 0; bottom: 72px; left: 0; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); height: 4px; }
.hit-line span { margin: 0 8px; background: var(--ink); }
.hit-line:after { content: ""; position: absolute; top: -9px; right: 0; left: 0; height: 22px; border-top: 1px solid rgba(18,22,26,.16); border-bottom: 1px solid rgba(18,22,26,.16); }
.notes { position: absolute; inset: 0; z-index: 2; }
.note { position: absolute; width: calc(25% - 16px); height: 25px; border-radius: 2px; box-shadow: 0 4px 0 rgba(18,22,26,.12); transform: translateX(-50%); transition: opacity .08s linear; }
.note.hold { border-radius: 2px 2px 7px 7px; box-shadow: 0 4px 0 rgba(18,22,26,.12), inset 0 -7px 0 rgba(255,255,255,.2); }
.note:after { content: ""; position: absolute; inset: 5px 8px; border: 1px solid rgba(255,255,255,.55); }
.note.lane-0 { background: var(--orange); }.note.lane-1 { background: var(--cyan); }.note.lane-2 { background: var(--pink); }.note.lane-3 { background: var(--green); }
.stage-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #9da3a0; text-align: center; }
.stage-message strong { color: #626c6d; font-size: 14px; }.stage-message span { font-size: 11px; }.message-symbol { color: var(--orange); font-size: 38px; }
.judgement { position: absolute; right: 0; bottom: 117px; left: 0; z-index: 5; color: var(--orange); opacity: 0; text-align: center; font: 700 13px "DM Mono", monospace; letter-spacing: .1em; }
.judgement.show { animation: judge .48s ease-out both; }
@keyframes judge { 0% { opacity: 0; transform: translateY(8px); } 35% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-8px); } }
.transport { gap: 24px; padding-top: 24px; }.play-btn { display: flex; min-width: 142px; height: 44px; padding: 0 17px; align-items: center; justify-content: center; gap: 9px; border: 0; color: white; background: var(--ink); cursor: pointer; font-size: 12px; font-weight: 700; }.play-btn:not(:disabled):hover { background: var(--orange); }.play-btn:disabled { opacity: .35; cursor: not-allowed; }
.progress-wrap { flex: 1; }.progress-bar { height: 3px; background: #d4d5cf; }.progress-fill { width: 0; height: 100%; background: var(--orange); transition: width .1s linear; }.time-row { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font: 10px "DM Mono", monospace; }.bpm-readout { min-width: 72px; text-align: right; }.bpm-readout strong { font: 500 19px "DM Mono", monospace; }
@media (max-width: 760px) { .app-shell { padding: 18px 18px 26px; }.workspace { display: block; }.sidebar { padding: 40px 0 26px; border-right: 0; border-bottom: 1px solid var(--line); }.sidebar h1 br { display: none; }.intro { margin-bottom: 26px; }.upload-zone { min-height: 105px; }.side-footer { display: none; }.game-area { padding: 28px 0 0; }.stage { min-height: 430px; }.transport { gap: 12px; }.play-btn { min-width: 116px; padding: 0 10px; }.bpm-readout { min-width: 52px; } }
