:root {
  color-scheme: dark;
  --page:#151719; --paper:#202326; --line:#373c41; --bright:#f4f2ed;
  --muted:#a9adb1; --blue:#b9d8fa; --amber:#ffd18a; --red:#ff8175;
  font-family: system-ui, "Malgun Gothic", sans-serif;
}
*,*::before,*::after { box-sizing:border-box }
body { margin:0; background:radial-gradient(ellipse at 52% 0%,#25282a,transparent 55rem),var(--page); color:var(--bright) }
button,input,textarea,select { font:inherit }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent }
button { cursor:pointer; color:inherit }
button:disabled { cursor:default; opacity:.46 }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--blue); outline-offset:3px }
a { color:var(--blue); text-underline-offset:3px }
[hidden] { display:none!important }
.wrap { width:min(1120px,calc(100% - 64px)); margin-inline:auto }
.top { border-bottom:1px solid #36393b; background:#191b1de6 }
.masthead { height:66px; display:flex; justify-content:space-between; align-items:center }
.brand { text-decoration:none; font-family:Consolas,monospace; font-size:17px; font-weight:800; letter-spacing:-.5px; color:var(--bright); display:flex; align-items:center; gap:7px }
.brand>span:last-child,.console-bar strong span { color:var(--amber) }
.outline { background:#292c2e; border:1px solid #43474b; border-radius:6px; padding:9px 13px; font-size:.875rem; white-space:nowrap }
.intro { padding:40px 0 29px }
h1,h2,p { margin:0 }
h1 { font-size:clamp(1rem,3.65vw,2.8rem); line-height:1.15; letter-spacing:-.065em; white-space:nowrap }
h1 em { font-style:normal; color:var(--amber) }
.intro p { color:var(--muted); margin-top:13px }
input:not([type=range]),textarea,select { width:100%; min-width:0; background:#17191b; border:1px solid #45494d; color:var(--bright); border-radius:6px; padding:10px 11px }
input::placeholder,textarea::placeholder { color:#9b9fa3 }
.primary { background:var(--amber); color:#281c0d; font-weight:750; padding:10px 14px; border:1px solid #ffe1ad; border-radius:6px; white-space:nowrap; font-size:.875rem }
.primary:hover { background:#ffe0ad }
.outline:hover,.transport button:enabled:hover { filter:brightness(1.2) }
.practice { display:flex; align-items:center; flex-wrap:wrap; gap:9px 14px; padding-bottom:16px }
.practice-heading { display:flex; align-items:center; gap:3px }
.practice h2 { font-size:.92rem }
.practice-reset { display:grid; align-items:center; justify-items:start; min-width:32px; min-height:36px; padding:0; border:0; background:none; color:#ad8651; font:700 1.65rem/1 system-ui,sans-serif }
.practice-reset:hover { color:var(--amber) }
.practice-songs { display:flex; flex-wrap:wrap; gap:6px }
.practice-songs button { max-width:100%; white-space:normal }
.practice-songs button[aria-pressed=true] { color:var(--amber); border-color:#967847; background:#3a3022 }
.console { padding:0 12px 12px; border-radius:13px; border:1px solid #565b60; background:repeating-linear-gradient(0deg,#ffffff04 0 1px,transparent 1px 3px),linear-gradient(#474b4e,#333638); box-shadow:0 13px 30px #0006,inset 0 1px #ffffff30 }
.console-bar { display:flex; justify-content:space-between; align-items:center; padding:12px 5px; font-family:Consolas,monospace; letter-spacing:.11em; font-size:.8rem }
.console-model { color:#d7dadd; text-align:right }
.decks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-items:stretch }
.deck { min-width:0; display:flex; flex-direction:column; padding:13px; border:1px solid #151719; border-radius:8px; background:linear-gradient(#292d30,#222527); box-shadow:inset 0 1px #ffffff22 }
.deck-head { display:flex; gap:9px; align-items:center; margin-bottom:10px }
.deck-head h2 { font-size:1rem; letter-spacing:-.03em }
.deck-toggle { display:grid; place-items:center; flex:none; width:32px; height:32px; padding:0; border:1px solid transparent; border-radius:5px; background:none; color:var(--amber) }
.deck-toggle::before { content:''; width:10px; height:10px; border-top:2px solid currentColor; border-left:2px solid currentColor; transform:translateY(2px) rotate(45deg) }
.deck-toggle[aria-expanded=false]::before { transform:translateY(-2px) rotate(225deg) }
.deck-toggle:hover { background:#3a3022; border-color:#655036 }
.deck:has(> .bay[hidden]) .deck-head { margin-bottom:0 }
.deck-letter { display:grid; place-items:center; width:25px; height:25px; border-radius:4px; background:var(--amber); color:#2e2012; font:bold .95rem Consolas,monospace }
.b .deck-letter { background:var(--blue); color:#152533 }
.deck-status { display:flex; align-items:center; gap:6px; margin-left:auto; color:#d0d2d3; font-size:.8125rem }
.deck-status i { width:7px; height:7px; border-radius:50%; background:#717473 }
#play-led.on { background:#ffcc7a; box-shadow:0 0 8px #ffba54 }
#rec-led.on { background:var(--red); box-shadow:0 0 8px #fc6a5d }
.bay { position:relative; min-height:178px; flex:1; display:grid; place-items:center; padding:11px 15px; overflow:hidden; border:1px solid #0c0e0e; border-radius:6px; background:repeating-linear-gradient(128deg,#ffffff04 0 1px,transparent 1px 25px),radial-gradient(ellipse at 48% 55%,#303031,#101214); box-shadow:inset 0 2px 12px #000 }
.bay:has(.video:not([hidden])) { padding:0; min-height:200px }
.video { width:100%; height:100%; aspect-ratio:16/9; min-height:200px }
.video iframe { display:block; width:100%; height:100%; min-height:200px; border:0 }
.cassette { position:relative; width:min(100%,285px); height:145px; border:1px solid #7b5b3d; border-radius:10px; overflow:hidden; background:linear-gradient(166deg,#eecc90,#b77c47 77%,#785234); box-shadow:inset 0 0 0 4px #392c27,inset 0 0 0 5px #ffffff28,0 10px 24px #0009 }
.blue-tape { border-color:#627a92; background:linear-gradient(163deg,#c4daed,#65859f 78%,#3b536a); box-shadow:inset 0 0 0 4px #283642,inset 0 0 0 5px #ffffff28,0 10px 24px #0009 }
.tape-label { display:flex; justify-content:space-between; margin:12px 12px 0; padding:6px 10px; background:repeating-linear-gradient(0deg,#faf4e66b 0 1px,transparent 1px 4px),#f4e1bc; color:#38281a; border-radius:4px; font:bold .72rem Consolas,monospace; letter-spacing:.09em }
.blue-tape .tape-label { background-color:#d5e5ef; color:#203344 }
.tape-window { display:flex; align-items:center; justify-content:center; gap:14px; height:55px; margin:4px 12px; border:2px solid #ffffff3a; border-radius:8px; background:linear-gradient(#272929,#161818 55%,#323434); box-shadow:inset 0 2px 7px #000 }
.tape-window i { flex:0 0 36px; height:36px; border:3px solid #b5aa93; border-radius:50%; background:radial-gradient(circle,#191c1d 0 31%,transparent 34%),repeating-conic-gradient(#2a2c2a 0 24deg,#beb39a 25deg 49deg,#2a2c2a 51deg 60deg) }
.blue-tape .tape-window i { border-color:#b5c6d4 }
.tape-window span { position:relative; width:65px; height:22px; border-radius:3px; border:1px solid #767069; background:linear-gradient(90deg,#958777 5%,#4e4136 6% 53%,#b3a895 54% 58%,#58504b 59% 94%,#928269 95%); box-shadow:inset 0 0 7px #000 }
.tape-foot { display:block; margin:1px auto 0; padding:3px 0; width:51%; text-align:center; color:#dad8d0; background:#36322f; clip-path:polygon(9% 0,91% 0,100% 100%,0 100%) }
.tape-button { padding:0; display:flex; flex-direction:column; justify-content:flex-start }
.tape-button .tape-label,.tape-button .tape-window { align-self:stretch }
.tape-button:hover { filter:brightness(1.12) }
.cassette.spinning i { animation:reel 1.6s linear infinite }
.best-stickers { position:absolute; inset:auto 8px 10px; display:flex; justify-content:center; gap:8px }
.best-stickers button { width:30px; height:26px; border:1px solid #676b60; border-radius:3px; background:repeating-linear-gradient(0deg,#00000010 0 1px,transparent 1px 4px),#e8dfc4; color:#292821; font:bold .95rem Consolas,monospace; box-shadow:1px 2px 2px #0006; transform:rotate(-6deg) }
.best-stickers button:nth-child(2) { background-color:#bdd9d7; transform:rotate(3deg) }
.best-stickers button:nth-child(3) { background-color:#e9bdaf; transform:rotate(-3deg) }
.best-stickers button[aria-pressed=true] { outline:2px solid var(--amber); outline-offset:2px }
.best-dock .best-stickers { position:static; justify-content:flex-end; padding:7px 2px 0 }
.record-actions { display:flex; flex-shrink:0; align-items:center; gap:8px }
#rec-message { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.icon-action { display:inline-flex; align-items:center; color:#e1caa6; font-size:.8125rem }
.icon-action:has(> [hidden]) { display:none }
@keyframes reel { to { transform:rotate(360deg) } }
@media (prefers-reduced-motion:reduce) { .cassette.spinning i { animation:none } }
.meter { display:grid; grid-template-columns:38px minmax(0,1fr) 38px; align-items:center; gap:6px; color:#dbdcdd; font:.85rem Consolas,monospace; margin:9px 0 }
.meter span:last-child { text-align:right }
.meter input,.meter progress { width:100%; min-width:0; accent-color:var(--amber); margin:0; height:14px }
.meter progress { appearance:none; height:5px; border:0; background:#151719; border-radius:4px; overflow:hidden }
.meter progress::-webkit-progress-bar { background:#151719 }
.meter progress::-webkit-progress-value { background:var(--blue) }
.meter progress::-moz-progress-bar { background:var(--blue) }
.transport { display:grid; grid-template-columns:1fr 1fr 1.35fr; gap:6px }
.transport button { padding:8px 2px; border:1px solid #62676c; border-bottom:3px solid #101113; background:linear-gradient(#464a4e,#313436); border-radius:5px; font-size:.875rem; font-weight:650; white-space:nowrap }
.transport b { display:inline-block; margin-right:3px; font-family:system-ui,sans-serif }
.transport .record b { color:var(--red) }
.transport [aria-pressed=true] { background:#554128; color:#ffe0a3; border-color:#a78252 }
.deck-foot { min-height:24px; padding-top:8px; display:flex; align-items:start; justify-content:space-between; gap:6px; color:var(--muted); font-size:.8125rem; overflow-wrap:anywhere }
.deck-foot a,.text-button { color:#e1caa6; white-space:nowrap; font-size:.8125rem }
.source-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px }
.source-actions .tape-button,.cassette.mini-cassette { display:flex; flex-direction:column; justify-content:center; width:40px; height:24px; border-radius:4px; box-shadow:inset 0 0 0 2px #392c27 }
.source-actions .tape-label,.source-actions .tape-foot,.source-actions .tape-window span { display:none }
.source-actions .tape-window,.mini-cassette .tape-window { flex:none; height:13px; margin:0 4px; gap:5px; border-radius:3px; border-width:1px }
.source-actions .tape-window i,.mini-cassette .tape-window i { flex-basis:8px; height:8px; border-width:1px }
.source-actions .tape-button { width:28px; height:18px }
.source-actions .tape-window { height:10px; margin:0 3px; gap:3px }
.source-actions .tape-window i { flex-basis:6px; height:6px }
#karaoke-link { display:inline-flex; align-items:center; gap:4px; margin-left:5px }
.source-actions .icon-action { margin-left:5px }
.mic-icon { position:relative; width:13px; height:13px; border:1px solid currentColor; border-top:0; border-radius:0 0 8px 8px; transform:scale(.85); }
.mic-icon::before { content:''; position:absolute; top:-3px; left:3px; width:5px; height:11px; border-radius:5px; background:currentColor }
.mic-icon::after { content:''; position:absolute; top:12px; left:5px; width:1px; height:4px; background:currentColor }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap }
.text-button { background:none; border:0; padding:0; text-decoration:underline; text-underline-offset:3px }
.lyrics { margin-top:21px; border:1px solid var(--line); border-radius:9px; background:var(--paper); overflow:hidden }
.lyrics-head { padding:15px 17px; display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid var(--line) }
.lyrics-head h2 { letter-spacing:-.05em; font-size:1.27rem }
.lyrics-head p { color:var(--muted); font-size:.875rem; margin-top:4px }
.lyrics-heading { min-width:0 }
.lyrics-title-row { display:flex; align-items:center; gap:9px }
.lyrics-title-row h2 { flex:none; white-space:nowrap }
.lyrics-stickers { display:flex; flex-wrap:wrap; align-items:center; min-width:0; gap:5px }
.lyrics-sticker { min-width:0; max-width:112px; min-height:25px; padding:3px 7px; border:1px solid #a18a68; border-radius:3px; background:repeating-linear-gradient(0deg,#00000010 0 1px,transparent 1px 4px),#dfc9a2; color:#302619; font-size:.75rem; font-weight:750; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; box-shadow:1px 2px 2px #0006; transform:rotate(-2deg) }
.lyrics-sticker:nth-child(even) { background-color:#c7b38b; transform:rotate(2deg) }
.lyrics-sticker:hover { filter:brightness(1.1) }
.lyrics-actions { display:flex; justify-content:flex-end; flex:none; flex-wrap:wrap; gap:6px }
.lyrics-archive-status { padding:6px 17px; color:var(--amber); font-size:.8125rem }
.sections { max-height:clamp(230px,38vh,480px); overflow:auto; overscroll-behavior:contain }
.sections:empty { min-height:60px }
.lyric-row { padding:13px 17px; display:grid; grid-template-columns:minmax(95px,155px) minmax(0,1fr) minmax(150px,.6fr); gap:16px; align-items:start; border-bottom:1px solid #383b3e }
.lyric-row:last-child { border-bottom:0 }
.lyric-text { color:#e0e0de; text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; font-size:.98rem; line-height:1.65; touch-action:manipulation; cursor:pointer }
.lyric-row .section-label { padding:7px 24px 7px 8px; color:#f2dbb5; background:#302a22; border-color:#514334; font:.875rem Consolas,monospace; appearance:none; background-image:linear-gradient(45deg,transparent 50%,#f2dbb5 50%),linear-gradient(135deg,#f2dbb5 50%,transparent 50%); background-position:calc(100% - 12px) 50%,calc(100% - 8px) 50%; background-size:4px 4px; background-repeat:no-repeat }
.note-area { min-height:47px; border:1px dashed #535454; border-radius:5px; padding:7px }
.note-area textarea { background:#ffe6a8; color:#2e2517; border:0; min-height:66px; resize:vertical }
.note-area textarea::placeholder { color:#605239 }
.note-add { color:#d8c7a9; text-decoration:none }
.footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; margin-block:16px 21px; color:#a9adb1; font-size:.8125rem }
.footer span:first-child { font-family:Consolas,monospace; letter-spacing:.12em }
dialog { width:min(560px,calc(100% - 24px)); max-height:calc(100% - 24px); padding:18px; background:#25282b; color:var(--bright); border:1px solid #53595e; border-radius:10px; box-shadow:0 20px 75px #000a }
dialog::backdrop { background:#090a0bcc }
.dialog-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:10px }
.dialog-top h2 { font-size:1.23rem }
.icon-button { width:34px; height:34px; border:1px solid #4d5359; border-radius:5px; background:#303438; font-size:1.35rem }
.dialog-stack { display:grid; gap:11px }
.dialog-stack p { color:#d0d2d3; font-size:.92rem; line-height:1.5 }
.practice-options { display:grid; gap:7px }
.practice-options button { padding:9px 12px; text-align:left; white-space:normal }
.dialog-stack textarea { resize:vertical; min-height:190px; line-height:1.6 }
.dialog-actions { display:flex; justify-content:end; gap:7px; flex-wrap:wrap }
.link-button { text-decoration:none; display:inline-block; text-align:center }
.dialog-stack .finder-guide { font-size:.84rem }
.finder-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:7px }
.finder-row button:disabled { opacity:1; background:#292c2e; color:#9da1a3; border-color:#43474b }
@media(max-width:1020px) {
  .intro { padding-top:27px }
  h1 { font-size:clamp(1rem,7.25vw,2.8rem) }
}
@media(max-width:850px) {
  .wrap { width:calc(100% - 32px) }
}
@media(max-width:590px) {
  .wrap { width:calc(100% - 20px) }
  .masthead { height:50px }
  .intro { padding:19px 0 13px }
  .intro p { margin-top:9px; font-size:clamp(.875rem,3.6vw,1rem) }
  .practice { display:grid; gap:4px; padding-bottom:12px }
  .practice-reset { min-width:44px; min-height:44px }
  .practice-songs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) }
  .practice-songs button { min-height:44px; padding:5px 7px; overflow-wrap:anywhere }
  .practice-songs button:last-child:nth-child(odd) { grid-column:1 / -1 }
  main:has(#source-bay[hidden]):has(#record-bay[hidden]) .practice-songs { min-width:0; display:flex; flex-wrap:nowrap; overflow-x:auto; padding:3px 4px; overscroll-behavior-inline:contain }
  main:has(#source-bay[hidden]):has(#record-bay[hidden]) .practice-songs button { flex:none; max-width:15rem }
  .decks { grid-template-columns:1fr }
  .console { padding:0 7px 7px }
  .deck { padding:10px }
  .deck-toggle { width:44px; height:36px }
  .transport button { min-height:44px }
  .lyric-row { grid-template-columns:1fr; gap:7px }
  .section-label { width:max-content; max-width:100% }
  .lyrics-head { display:grid; padding:11px }
  .lyrics-actions button,.dialog-actions button,.dialog-actions a,.finder-row button { min-height:44px }
  .lyrics-actions button { padding-inline:8px }
  .finder-row input,.dialog-stack textarea,.note-area textarea { font-size:1rem }
}
@media(max-width:540px) {
  .finder-row { grid-template-columns:1fr 1fr }
  .finder-row input { grid-column:1 / -1 }
}
