:root {
  color-scheme: dark;
  --bg: #101813;
  --surface: #1b241e;
  --ink: #f3f1e7;
  --muted: #b3bdb1;
  --line: #39453b;
  --mint: #c1e6a5;
  --on-mint: #1b311a;
  --warning: #f2c684;
  --error: #ffc0ac;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font: 100%/1.55 "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: radial-gradient(ellipse at 20% 26%, #213126 0%, transparent 53%), var(--bg);
}
.shell {
  max-width: 66rem;
  margin: auto;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
}
.masthead, .brand, .connection, footer, .times, .volume { display: flex; align-items: center; }
.masthead { justify-content: space-between; flex-wrap: wrap; gap: .7rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.brand { gap: .55rem; }
.brand strong { font-size: 1.22rem; font-weight: 750; letter-spacing: -.045em; }
.brand-kind { color: var(--muted); font-size: .86rem; border-left: 1px solid var(--line); padding-left: .65rem; }
.mark { display: flex; align-items: center; gap: 3px; height: 28px; color: var(--mint); transform: skew(-10deg); }
.mark i { width: 4px; height: 11px; border-radius: 3px; background: currentColor; }
.mark i:nth-child(2) { height: 24px; }
.mark i:nth-child(3) { height: 17px; }
.mark i:last-child { height: 8px; }
.connection { gap: .5rem; color: var(--muted); font-size: .8rem; }
.connection::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.connection[data-state="online"]::before { color: var(--mint); }
.connection[data-state="offline"]::before { color: var(--warning); }
.console {
  display: grid;
  margin: clamp(1.25rem, 5vw, 4rem) 0 1.1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--surface);
  box-shadow: 0 1.6rem 4rem #080f092e;
}
.artwork {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 1.4rem;
  overflow: hidden;
  background: radial-gradient(ellipse at 43% 20%, #4a6250, transparent 75%), #2b3e32;
  border-bottom: 1px solid var(--line);
}
.artwork::before {
  content: ""; position: absolute; inset: 0; opacity: .16;
  background: repeating-linear-gradient(120deg, transparent 0 5px, #9db29b 5px 6px, transparent 6px 9px);
}
.album { position: relative; width: min(65%, 13rem); aspect-ratio: 1.34; transform: rotate(-7deg); }
.sleeve, .vinyl { position: absolute; height: 100%; aspect-ratio: 1; }
.vinyl {
  right: 0; border-radius: 50%; border: 1px solid #101a15;
  background: repeating-radial-gradient(circle at 50%, #0000 0 2px, #c4d7c51a 2.5px 3px, #0000 4px),
              conic-gradient(from 18deg, #121914, #546255 36deg, #101712 70deg, #1c231c 155deg, #60665a 214deg, #141c17 250deg, #121914);
  box-shadow: 3px 9px 12px #0c160c66;
}
.vinyl i { position: absolute; inset: 32%; border-radius: 50%; background: radial-gradient(circle, #14271c 0 5%, #dcb180 6% 55%, #e0bc8e 56%); }
.sleeve { left: 0; padding: 5%; background: #e2d6b1; box-shadow: 2px 4px 9px #0a150f70, 0 14px 22px #0a150f40; }
.print { position: relative; height: 100%; overflow: hidden; isolation: isolate; background: linear-gradient(#87aa9d, #d5c898 70%); }
.sun { position: absolute; top: 9%; right: 14%; width: 27%; aspect-ratio: 1; border-radius: 50%; background: #f8d39a; }
.ridge { position: absolute; inset: 0; }
.far { background: #698879; clip-path: polygon(0 45%, 15% 37%, 25% 42%, 34% 36%, 51% 50%, 69% 39%, 86% 47%, 100% 39%, 100% 100%, 0 100%); }
.near { background: #355e50; clip-path: polygon(0 64%, 18% 52%, 30% 57%, 47% 47%, 72% 58%, 88% 50%, 100% 55%, 100% 100%, 0 100%); }
.reflection { position: absolute; inset: 66% 0 0; background: repeating-linear-gradient(174deg, #315e53 0 4%, #82a38d 5% 8%, #446f5d 9% 16%, #adc0a0 17% 19%); }
.print::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 2px, #1e413317 2px 3px); }
.panel { align-self: center; min-width: 0; padding: clamp(1.4rem, 6vw, 3rem); }
h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.45rem); line-height: 1.25; letter-spacing: -.035em; overflow-wrap: anywhere; }
.intro { margin: .85rem 0 0; color: var(--muted); line-height: 1.7; }
kbd { color: var(--ink); font: .9em var(--mono); white-space: nowrap; padding: .16em .4em; background: #303d32; border-radius: .35em; }
form { margin-top: 1.75rem; }
label { font-size: .9rem; font-weight: 650; }
#code {
  display: block; width: 100%; min-height: 50px; margin: .5rem 0; padding: .6rem .9rem;
  font: 1.1rem var(--mono); letter-spacing: .065em; color: var(--ink);
  border: 1px solid #728572; border-radius: .55rem; background: #111b15;
}
#code::placeholder { color: #98a596; }
#code[aria-invalid="true"] { border-color: var(--error); }
small, .error { font-size: .8125rem; }
small { color: var(--muted); }
.error { color: var(--error); margin: .6rem 0 0; }
.primary { display: block; width: 100%; min-height: 48px; margin-top: 1.4rem; padding: .65rem 1.3rem; border: 0; border-radius: .6rem; font: inherit; font-weight: 700; color: var(--on-mint); background: var(--mint); cursor: pointer; }
@media (hover: hover) { .primary:hover { background: #d6f3c4; } }
.primary:active { background: #b1cf96; }
.primary:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #f5db9b; outline-offset: 3px; }
.play-state { margin: 0 0 .65rem; color: var(--mint); font-size: .85rem; font-weight: 650; }
[data-state="offline"] .play-state { color: var(--warning); }
#timeline { margin-top: 1.5rem; }
progress { display: block; appearance: none; width: 100%; height: .32rem; overflow: hidden; border: 0; border-radius: 1rem; background: var(--line); color: var(--mint); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--mint); border-radius: 1rem; }
progress::-moz-progress-bar { background: var(--mint); }
.times { justify-content: space-between; margin-top: .5rem; color: var(--muted); font: .79rem var(--mono); }
.lyric { margin: 1.25rem 0 0; padding-left: .8rem; border-left: 2px solid #83a981; white-space: pre-line; overflow-wrap: anywhere; }
.volume { gap: .65rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.volume label { color: var(--muted); font-size: .83rem; }
#volume { flex: 1 1 4.5rem; min-width: 0; min-height: 48px; accent-color: var(--mint); cursor: pointer; }
.level { color: var(--muted); font: .8rem var(--mono); min-width: 4ch; text-align: right; }
footer { justify-content: center; gap: .5rem; color: var(--muted); font-size: .82rem; }
.game-icon { width: 1.2em; height: .8em; flex: none; border: 1px solid currentColor; border-radius: .27em; background: radial-gradient(circle at 28% 50%, currentColor 0 1px, transparent 1.5px), radial-gradient(circle at 72% 50%, currentColor 0 1px, transparent 1.5px); }
@media (min-width: 45rem) {
  .shell { padding: max(2.25rem, env(safe-area-inset-top)) max(2.25rem, env(safe-area-inset-right)) max(2.25rem, env(safe-area-inset-bottom)) max(2.25rem, env(safe-area-inset-left)); }
  .console { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); min-height: 27rem; }
  .artwork { border-bottom: 0; border-right: 1px solid var(--line); }
  .album { width: min(88%, 22rem); }
  .panel { padding: clamp(1.6rem, 4vw, 3.25rem); }
  footer { justify-content: flex-end; }
}
@media (max-height: 32rem) and (max-width: 44.99rem) { .artwork { display: none; } }
