:root { color-scheme: dark;
  --bg: #0d1a16; --card: #13261f; --line: #1f3a31; --line2: #2c4a40; --chip: #23453a;
  --text: #f4ede0; --soft: #e4d9c4; --muted: #a9bfb5; --mint: #cfe0d8;
  --gold: #f2c66d; --gold2: #ffe0a0; --red: #c8323c; --warm: #3a2a12;
  --serif: Fraunces, Georgia, serif; --sans: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: var(--gold); } a:hover { color: var(--gold2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }
.wrap { max-width: 1320px; margin: 0 auto; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 32px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 700; }
.brand small { display: block; font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--mint); font-weight: 500; font-size: 14px; text-decoration: none; }
.pill.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.pill.light.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.ghost { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--mint); font-size: 14px; font-weight: 500; text-decoration: none; }
.ghost:hover { border-color: var(--muted); color: var(--text); }
.gold { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 0; background: var(--gold); color: var(--bg); font-weight: 600; font-size: 14px; }
.gold:disabled { opacity: .5; cursor: default; }
.danger { color: #ff9aa0; border-color: #5a2a2e; }

/* player */
.stage { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; padding: 28px 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.now { display: flex; gap: 32px; padding: 32px; align-items: center; }
.art { width: 300px; height: 300px; border-radius: 18px; background: var(--chip); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art .ph { color: #8fb0a3; }
.info { display: flex; flex-direction: column; gap: 18px; min-width: 0; flex: 1; }
.onair { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.6s infinite; }
.badge.off { background: var(--line2); } .badge.off i { animation: none; opacity: .6; }
@keyframes blink { 50% { opacity: .3; } }
.showname { font-size: 13px; color: var(--muted); }
.title { margin: 0; font-family: var(--serif); font-size: 44px; line-height: 1.05; font-weight: 700; overflow-wrap: anywhere; }
.artist { font-size: 20px; color: var(--soft); }
.album { font-size: 14px; color: var(--muted); }
.quote { font-size: 16px; line-height: 1.55; color: var(--soft); border-radius: 12px; background: var(--warm); padding: 14px 16px; margin: 0; }
.bar { height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; }
.bar > div { height: 100%; background: var(--gold); transition: width .9s linear; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.play { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--gold); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.play:hover { background: var(--gold2); }
.round { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line2); background: transparent; color: var(--text); display: flex; align-items: center; justify-content: center; }
.round:hover { border-color: var(--muted); }
.round.on { color: var(--red); border-color: var(--red); background: #2a1215; }
.vol { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 140px; color: var(--muted); }
input[type=range] { flex: 1; accent-color: var(--gold); }
.side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.list { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.list h2, .h2 { margin: 0; font-size: 13px; letter-spacing: 1.2px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.row { display: flex; align-items: center; gap: 14px; padding: 4px 12px; min-width: 0; }
.row.warm { background: var(--warm); border-radius: 12px; padding: 10px 12px; }
.thumb { width: 42px; height: 42px; border-radius: 8px; background: var(--chip); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .t { display: flex; flex-direction: column; min-width: 0; }
.row .t b { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched { display: flex; gap: 14px; align-items: baseline; }
.sched span { width: 110px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.sched b { font-weight: 500; font-size: 15px; }
.sched.on b { color: var(--gold); font-weight: 700; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 32px 28px; font-size: 13px; color: var(--muted); }
.copy { background: none; border: 0; color: var(--gold); padding: 0; text-decoration: underline; font-size: 13px; }

/* studio */
.studio { padding: 24px 32px 48px; display: grid; gap: 24px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.panel h3 { margin: 0; font-size: 18px; font-weight: 600; }
.panel p, .hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.field { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.field.col { flex-direction: column; align-items: stretch; }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=search], select, textarea {
  padding: 9px 11px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line2); font-size: 14px; min-width: 0; }
textarea { resize: vertical; min-height: 64px; }
input[type=color] { width: 44px; height: 36px; padding: 0; border: 1px solid var(--line2); border-radius: 8px; background: none; }
.week { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); gap: 4px; }
.week .dh { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.hours { position: relative; height: 624px; }
.hours span { position: absolute; right: 6px; font-size: 11px; color: var(--muted); transform: translateY(-50%); }
.day { position: relative; height: 624px; background: repeating-linear-gradient(to bottom, #12231d 0 1px, transparent 1px 78px); border-radius: 8px; background-color: #0f1f1a; }
.blk { position: absolute; left: 2px; right: 2px; border-radius: 8px; padding: 6px 8px; overflow: hidden; border: 0; text-align: left; color: #fff; font-size: 12px; line-height: 1.25; }
.blk b { display: block; font-size: 12px; }
.blk.sel { outline: 2px solid var(--gold); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--mint); font-size: 13px; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.switch { width: 52px; height: 30px; border-radius: 15px; border: 0; background: var(--line2); position: relative; padding: 0; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--gold); } .switch.on::after { left: 25px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid #172d26; vertical-align: middle; }
.table td.m { color: var(--muted); }
.scroll { overflow-x: auto; }
.small { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.jrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg); }
.jrow span { flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 500; z-index: 10; }
.gate { max-width: 420px; margin: 80px auto; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.gate h1 { margin: 0; font-family: var(--serif); font-size: 32px; }
.err { color: #ff9aa0; font-size: 13px; min-height: 18px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 980px) {
  .stage, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .now { flex-direction: column; align-items: stretch; }
  .art { width: 100%; height: auto; aspect-ratio: 1; max-width: 420px; align-self: center; }
}
@media (max-width: 640px) {
  .top { padding: 16px; } .stage { padding: 16px; gap: 16px; } .studio { padding: 16px 16px 40px; }
  .now { padding: 20px; gap: 20px; } .title { font-size: 32px; } .artist { font-size: 17px; }
  .foot { padding: 12px 16px 24px; }
  .week { grid-template-columns: 36px repeat(7, minmax(0, 1fr)); }
  .blk { padding: 4px; font-size: 10px; } .blk b { font-size: 10px; } .blk small { display: none; }
}
