/* ============================================================================
   RPi4 6.86" 1280x480 Hi-Fi Audio Streamer GUI — 5 Signature Themes
   1) obsidian : Modern OLED Studio (Carbon + Acid Lime)
   2) mcintosh : Classic McIntosh Blue-Eyes VU Glass + Emerald LED
   3) tube     : Warm Vacuum Tube / Luxman Champagne Amber
   4) cyber    : Tokyo City-Pop Neon Magenta & Electric Cyan
   5) silver   : Brushed Aluminum Silver-Face Daylight (Braun / B&O)
   ============================================================================ */

:root, [data-theme="obsidian"] {
  --bg: #080b0f;
  --shell-bg: radial-gradient(circle at 22% 18%, #131c26 0%, #080b0f 62%);
  --topbar-bg: rgba(12, 16, 22, 0.94);
  --rail-bg: #0c1016;
  --panel: #11161d;
  --panel-2: #171e28;
  --input-bg: #0e141c;
  --viz-bg: #0b0f15;
  --art-bg: linear-gradient(145deg, #16202c, #0c1118);
  --line: #25303f;
  --text: #eef3f8;
  --muted: #8b9bb0;
  --accent: #c8df6e;
  --accent-text: #10160d;
  --accent-dim: rgba(200, 223, 110, 0.16);
  --accent-border: rgba(200, 223, 110, 0.45);
  --cyan: #58b8ff;
  --amber: #f5b942;
  --red: #ef5350;
  --glow-1: rgba(200, 223, 110, 0.28);
  --glow-2: rgba(88, 184, 255, 0.16);
  --vinyl-grad: linear-gradient(135deg, #c8df6e, #527329);
  --progress-grad: linear-gradient(90deg, #58b8ff, #c8df6e);
  --shadow: rgba(0, 0, 0, 0.5);
}

[data-theme="mcintosh"] {
  --bg: #04070d;
  --shell-bg: radial-gradient(circle at 50% 0%, #0a1930 0%, #04070d 65%);
  --topbar-bg: rgba(4, 8, 16, 0.96);
  --rail-bg: #060b14;
  --panel: #0a111d;
  --panel-2: #0f192b;
  --input-bg: #070d18;
  --viz-bg: #041022;
  --art-bg: linear-gradient(145deg, #071933, #030812);
  --line: #193252;
  --text: #e9f4ff;
  --muted: #79a1c9;
  --accent: #00b8ff;
  --accent-text: #03101c;
  --accent-dim: rgba(0, 184, 255, 0.16);
  --accent-border: rgba(0, 184, 255, 0.55);
  --cyan: #2ef278;
  --amber: #2ef278;
  --red: #ff5252;
  --glow-1: rgba(0, 184, 255, 0.34);
  --glow-2: rgba(46, 242, 120, 0.18);
  --vinyl-grad: linear-gradient(135deg, #00c6ff, #005bb5);
  --progress-grad: linear-gradient(90deg, #0088ff, #2ef278);
  --shadow: rgba(0, 10, 30, 0.65);
}

[data-theme="tube"] {
  --bg: #110c07;
  --shell-bg: radial-gradient(circle at 26% 15%, #2a1b0e 0%, #110c07 62%);
  --topbar-bg: rgba(20, 14, 9, 0.95);
  --rail-bg: #160f09;
  --panel: #1d150e;
  --panel-2: #271c12;
  --input-bg: #150e08;
  --viz-bg: #181008;
  --art-bg: linear-gradient(145deg, #322111, #140d07);
  --line: #3f2d1c;
  --text: #faeedc;
  --muted: #bfa382;
  --accent: #f5b041;
  --accent-text: #1c1104;
  --accent-dim: rgba(245, 176, 65, 0.18);
  --accent-border: rgba(245, 176, 65, 0.5);
  --cyan: #ffcf70;
  --amber: #ff9f43;
  --red: #e55039;
  --glow-1: rgba(255, 165, 48, 0.34);
  --glow-2: rgba(235, 100, 30, 0.2);
  --vinyl-grad: linear-gradient(135deg, #f8c471, #a0522d);
  --progress-grad: linear-gradient(90deg, #e67e22, #f8d47c);
  --shadow: rgba(0, 0, 0, 0.6);
}

[data-theme="cyber"] {
  --bg: #080514;
  --shell-bg: radial-gradient(circle at 18% 18%, #240c38 0%, #090617 55%, #061322 100%);
  --topbar-bg: rgba(11, 7, 26, 0.94);
  --rail-bg: #0c071d;
  --panel: #140d2b;
  --panel-2: #1d133d;
  --input-bg: #100922;
  --viz-bg: #0b061a;
  --art-bg: linear-gradient(145deg, #2b0f47, #0b162d);
  --line: #35235e;
  --text: #f7efff;
  --muted: #a693cc;
  --accent: #ff3d9a;
  --accent-text: #ffffff;
  --accent-dim: rgba(255, 61, 154, 0.18);
  --accent-border: rgba(255, 61, 154, 0.55);
  --cyan: #00f0ff;
  --amber: #00f0ff;
  --red: #ff3b6b;
  --glow-1: rgba(255, 61, 154, 0.35);
  --glow-2: rgba(0, 240, 255, 0.24);
  --vinyl-grad: linear-gradient(135deg, #ff3d9a, #00e5ff);
  --progress-grad: linear-gradient(90deg, #ff3d9a, #8b5cf6, #00f0ff);
  --shadow: rgba(12, 0, 28, 0.65);
}

[data-theme="silver"] {
  --bg: #dde2e8;
  --shell-bg: linear-gradient(160deg, #eef1f5 0%, #dce1e8 55%, #cfd6df 100%);
  --topbar-bg: rgba(246, 248, 251, 0.95);
  --rail-bg: #e5e9ef;
  --panel: #f7f9fb;
  --panel-2: #ebeef3;
  --input-bg: #ffffff;
  --viz-bg: #f3f1e8;
  --art-bg: linear-gradient(145deg, #d7dde6, #eef2f6);
  --line: #c4cdd8;
  --text: #151c24;
  --muted: #566374;
  --accent: #e65100;
  --accent-text: #ffffff;
  --accent-dim: rgba(230, 81, 0, 0.12);
  --accent-border: rgba(230, 81, 0, 0.45);
  --cyan: #1d4ed8;
  --amber: #d97706;
  --red: #dc2626;
  --glow-1: rgba(230, 81, 0, 0.18);
  --glow-2: rgba(29, 78, 216, 0.12);
  --vinyl-grad: linear-gradient(135deg, #ff7043, #bf360c);
  --progress-grad: linear-gradient(90deg, #1d4ed8, #e65100);
  --shadow: rgba(20, 30, 45, 0.16);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }
input { user-select: text; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  background: #040608;
  color: var(--text);
  font-family: "Noto Sans CJK KR", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  overflow: hidden;
  position: relative;
}

.app-shell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1560px;
  height: 720px;
  transform-origin: center center;
  transform: translate(-50%, -50%);
  background: var(--shell-bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.72);
  transition: background .25s ease, color .2s ease;
}

.hidden { display: none !important; }

/* ================= HOME TILE DASHBOARD (BENTO TILES + ANIMATED LAUNCH) ================= */
.home-tile-board {
  width: 100%; height: 100%;
  display: flex; align-items: stretch; gap: 12px;
}
.home-studio-deck {
  width: 100%; height: 100%;
  --deck-h: 536px;
  display: flex; align-items: center; gap: 14px;
  position: relative;
  animation: tileViewEnter .32s cubic-bezier(.22, 1, .36, 1) both;
}
/* Subtle Full-Screen Blurred Album Cover Ambient Backdrop (GPU-cached static blur -> 60fps!) */
.player-amb-bg {
  position: absolute; inset: -24px -28px; z-index: 0;
  pointer-events: none; overflow: hidden;
  opacity: 0; transition: opacity .65s ease;
  will-change: opacity, transform;
  contain: strict;
  transform: translateZ(0);
}
.player-amb-bg.has-art { opacity: 1; }
.player-amb-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.12) translateZ(0);
  opacity: .34;
}
[data-theme="silver"] .player-amb-img {
  opacity: .20;
}
.player-amb-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, rgba(6, 10, 16, .24) 0%, rgba(6, 10, 16, .74) 100%);
}
[data-theme="silver"] .player-amb-vignette {
  background: radial-gradient(ellipse at 50% 48%, rgba(235, 240, 246, .35) 0%, rgba(220, 226, 235, .78) 100%);
}
/* 3-Column Player Layout: Left = Frameless Album Cover (order 1) | Center = VU (order 2) | Right = Player Deck (order 3) */
.home-studio-deck .now-album  { order: 1; position: relative; z-index: 1; }
.home-studio-deck .now-center { order: 2; position: relative; z-index: 1; }
.home-studio-deck .now-left   { order: 3; position: relative; z-index: 1; }

.now-album {
  width: 300px; flex: 0 0 300px;
  height: var(--deck-h, 536px);
  --art-max-h: 444px;
  background: transparent;
  border: 0; border-radius: 0;
  padding: 0;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 0;
  box-shadow: none;
  position: relative; overflow: visible;
}
.na-bottom-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0;
  pointer-events: none;
}
.na-bottom-bar > * { pointer-events: auto; }
/* Unselected = 3D Embossed (양각), Selected (.active) = 3D Debossed Pressed (음각) */
.na-mini-btn {
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
  font: 800 10.5px/1.15 inherit; letter-spacing: .02em;
  background: linear-gradient(150deg, rgba(48, 59, 78, .86) 0%, rgba(18, 24, 36, .92) 100%);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, .52),
    inset 1px 1px 1.5px rgba(255, 255, 255, .22),
    inset -1.5px -1.5px 3px rgba(0, 0, 0, .48);
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .10s;
}
.na-mini-btn:hover { border-color: var(--accent-border); color: var(--text); }
.na-mini-btn.active {
  transform: translateY(1px);
  background: linear-gradient(145deg, rgba(4, 8, 14, .82) 0%, rgba(16, 24, 38, .66) 100%);
  color: var(--accent); border-color: var(--accent);
  box-shadow:
    inset 2.5px 2.5px 6px rgba(0, 0, 0, .86),
    inset -1.5px -1.5px 4px rgba(255, 255, 255, .10),
    0 0 10px var(--glow-1);
}
[data-theme="silver"] .na-mini-btn {
  background: linear-gradient(150deg, #ffffff 0%, #dde6f0 100%);
  border-color: rgba(15, 23, 42, .14);
  box-shadow: 0 3px 8px rgba(15, 23, 42, .18), inset 1px 1px 1px #ffffff, inset -1px -1px 2px rgba(15, 23, 42, .12);
}
[data-theme="silver"] .na-mini-btn.active {
  background: linear-gradient(145deg, rgba(15, 23, 42, .14) 0%, rgba(255, 255, 255, .45) 100%);
  box-shadow: inset 2px 2px 5px rgba(15, 23, 42, .30), inset -1.5px -1.5px 4px rgba(255, 255, 255, .85);
}
.na-lbl { font: 800 10.5px/1 ui-monospace, monospace; letter-spacing: .12em; color: var(--muted); white-space: nowrap; }
.na-src {
  font: 800 10px/1 ui-monospace, monospace; letter-spacing: .08em;
  padding: 4px 8px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border);
  white-space: nowrap;
}
.na-cover-wrap {
  position: relative; width: 100%; flex: 1 1 auto; height: 100%; min-height: 0;
  border-radius: 0; overflow: visible; align-self: stretch;
  background: transparent; cursor: pointer;
  display: flex; align-items: flex-start; justify-content: center;
  border: 0; box-shadow: none;
  perspective: 960px;
}
[data-theme="silver"] .na-cover-wrap {
  background: transparent;
  border: 0;
}
.na-stage-3d {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  transform: rotateY(12deg) rotateX(1.5deg);
  transform-origin: left center;
  transition: transform .36s cubic-bezier(.22, 1, .36, 1);
}
.now-album.lyrics-overlay-on .na-stage-3d {
  transform: rotateY(0deg) rotateX(0deg);
}
.na-art-main {
  width: 100%; flex: 0 1 auto; max-height: var(--art-max-h, 384px); min-height: 0;
  display: flex; align-items: flex-start; justify-content: center;
}
.na-cover-img {
  position: relative; z-index: 2;
  width: 100%; height: auto; max-height: var(--art-max-h, 384px);
  object-fit: contain; object-position: top center; display: block;
  user-select: none; -webkit-user-drag: none;
  transition: opacity .32s ease;
}
.na-floor-shadow {
  width: 82%; height: 10px; flex: 0 0 10px; margin-top: -3px; z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .24) 55%, transparent 78%);
  pointer-events: none; transition: opacity .3s ease;
}
[data-theme="silver"] .na-floor-shadow {
  background: radial-gradient(ellipse at 50% 50%, rgba(15, 23, 42, .34) 0%, rgba(15, 23, 42, .10) 55%, transparent 78%);
}
.na-reflect-wrap {
  position: relative; width: 100%; flex: 1 1 22%; min-height: 0;
  margin-top: -5px; overflow: hidden; pointer-events: none;
  opacity: .34;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .30) 48%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .30) 48%, rgba(0, 0, 0, 0) 100%);
  transition: opacity .3s ease;
}
[data-theme="silver"] .na-reflect-wrap { opacity: .24; }
.na-reflect-img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: auto; max-height: var(--art-max-h, 384px);
  object-fit: contain; object-position: top center;
  transform: scaleY(-1); display: block;
  user-select: none; -webkit-user-drag: none;
}
.now-album.lyrics-overlay-on .na-reflect-wrap,
.now-album.lyrics-overlay-on .na-floor-shadow { opacity: 0; }
.now-album.lyrics-overlay-on .na-art-main { flex: 1 1 100%; max-height: 100%; height: 100%; align-items: center; }
.now-album.lyrics-overlay-on .na-cover-img { max-height: 100%; height: 100%; object-position: center; opacity: .22; }
[data-theme="silver"] .now-album.lyrics-overlay-on .na-cover-img {
  opacity: .20;
}
.na-lyrics-cue {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(8, 12, 18, .78); color: var(--accent);
  border: 1px solid var(--accent-border);
  font: 800 10.5px/1 inherit; letter-spacing: .02em;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.now-album.has-lyrics:not(.lyrics-overlay-on) .na-lyrics-cue { opacity: .94; }
.now-album.lyrics-overlay-on .album-lyrics-panel { display: flex !important; }
.album-lyrics-panel {
  position: absolute; inset: 0 0 36px 0; z-index: 4;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(6, 9, 15, .64) 0%,
    rgba(6, 9, 15, .28) 20%,
    rgba(6, 9, 15, .28) 78%,
    rgba(6, 9, 15, .72) 100%
  );
  display: flex; flex-direction: column;
}
.alp-status {
  flex: 0 0 auto; padding: 7px 13px;
  font: 700 10.5px/1.2 ui-monospace, monospace; color: var(--accent);
  background: rgba(6, 9, 15, .42);
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: space-between;
}
.alp-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 28px 16px 72px; display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
}
.lyr-line {
  font-size: 15.5px; font-weight: 600; line-height: 1.5;
  color: rgba(235, 242, 250, .72);
  padding: 5px 10px; border-radius: 9px; border-left: 3px solid transparent;
  word-break: keep-all; text-shadow: 0 1px 6px rgba(0,0,0,.85);
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: left center;
  transition: transform .52s cubic-bezier(.22, 1, .36, 1), color .42s ease, opacity .42s ease, background .42s ease, border-color .42s ease;
}
.lyr-line[data-lyric-t] { cursor: pointer; }
.lyr-line[data-lyric-t]:hover { background: rgba(255,255,255,.10); color: #ffffff; }
.lyr-line.is-past { color: rgba(205, 218, 232, .40); }
.lyr-line.is-active {
  color: #ffffff; font-weight: 800;
  transform: translate3d(4px, 0, 0) scale(1.045);
  background: rgba(255, 255, 255, .13); border-left-color: var(--accent);
  text-shadow: 0 2px 12px rgba(0,0,0,.95), 0 0 16px var(--glow-1);
}
@keyframes vlbRiseIn {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.vlb-cur.vlb-glide  { animation: vlbRiseIn .46s cubic-bezier(.22, 1, .36, 1) both; }
.vlb-next.vlb-glide { animation: vlbRiseIn .52s cubic-bezier(.22, 1, .36, 1) both; }
.lyr-empty {
  margin: auto; text-align: center; padding: 20px 12px;
  font-size: 13.5px; line-height: 1.55; color: rgba(226, 236, 248, .82);
  text-shadow: 0 1px 6px rgba(0,0,0,.85);
}

.now-album.is-playing .na-cover-wrap {
  border: 0;
  box-shadow: none;
}
.na-sheen {
  display: none;
}
.na-foot {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  border-top: 1px solid var(--line); padding-top: 10px;
}
.na-title {
  font-size: 16px; font-weight: 800; line-height: 1.25; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.na-sub {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-status-tile {
  width: 396px; flex: 0 0 396px;
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 13px 14px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  box-shadow: 0 10px 28px var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  position: relative; overflow: hidden;
}
.hst-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hst-src {
  font: 800 10.5px/1 ui-monospace, monospace; letter-spacing: .08em;
  padding: 4px 9px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border);
}
.hst-dac-btn {
  display: flex; align-items: center; gap: 6px; max-width: 245px;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--input-bg); color: var(--text);
  font-size: 11px; font-weight: 700; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hst-dac-btn:hover { border-color: var(--accent); }
.hst-now { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hst-station {
  display: flex; align-items: center; gap: 6px;
  font: 800 11px/1.2 ui-monospace, "Noto Sans CJK KR", sans-serif; color: var(--accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hst-title {
  font-size: 20px; font-weight: 900; line-height: 1.2; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hst-sub {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hst-vu-box {
  height: 98px; border-radius: 12px; overflow: hidden; position: relative;
  background: #06090e; border: 1px solid var(--line); cursor: pointer;
  box-shadow: inset 0 4px 14px rgba(0,0,0,.6);
  transition: border-color .18s ease, transform .18s ease;
}
.hst-vu-box:hover { border-color: var(--accent); transform: scale(1.01); }
#tile-vu-canvas { width: 100%; height: 100%; display: block; }
.hst-vu-hint {
  position: absolute; right: 7px; bottom: 5px;
  font: 700 9.5px/1 ui-monospace, sans-serif;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(8,12,18,.78); color: var(--accent);
  border: 1px solid var(--accent-border); pointer-events: none;
}
.hst-controls {
  display: flex; align-items: center; gap: 6px;
  padding-top: 4px; border-top: 1px solid var(--line);
}
.hst-ctl {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 14px; font-weight: 800; cursor: pointer; display: grid; place-items: center;
  transition: transform .1s ease, border-color .15s ease;
}
.hst-ctl.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.hst-ctl:active { transform: scale(.93); }
.hst-vol-wrap {
  flex: 1; display: flex; align-items: center; gap: 6px; margin-left: 4px;
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; height: 36px;
}
.hst-mute { border: 0; background: transparent; color: var(--text); font-size: 14px; cursor: pointer; padding: 0; }
.hst-mute.muted { color: var(--red); }
.hst-slider { flex: 1; min-width: 48px; }
.hst-vol-val { font: 800 11.5px ui-monospace, monospace; color: var(--accent); min-width: 32px; text-align: right; }

/* 3-Column IDLE Live Music Discovery Dashboard (Radio Top 15 | Melon TOP 100 | Genie TOP 100) */
.idle-music-hub {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; min-height: 0;
}
.idle-col {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%);
  box-shadow: 0 12px 30px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .10);
}
.idle-col.col-radio { --col-accent: #f5b942; --col-glow: rgba(245, 185, 66, .20); --col-border: rgba(245, 185, 66, .42); }
.idle-col.col-melon { --col-accent: #00d25b; --col-glow: rgba(0, 210, 91, .18); --col-border: rgba(0, 210, 91, .42); }
.idle-col.col-genie { --col-accent: #38bdf8; --col-glow: rgba(56, 189, 248, .20); --col-border: rgba(56, 189, 248, .44); }
.idle-col-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 13px 15px 11px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--col-glow, transparent) 0%, transparent 100%);
}
.ich-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.ich-ico {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06);
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .34);
}
.ich-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ich-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ich-title { margin: 0; font-size: 16px; font-weight: 900; letter-spacing: -.015em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ich-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ich-acts { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.ich-badge {
  font: 800 10px/1 ui-monospace, monospace; letter-spacing: .05em;
  padding: 4px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, .26); color: var(--col-accent, var(--accent));
  border: 1px solid var(--col-border, var(--line));
}
[data-theme="silver"] .ich-badge { background: rgba(15, 23, 42, .06); }
.ich-ref-btn, .ich-more-btn {
  height: 28px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--input-bg); color: var(--text);
  font: 800 11.5px/1 inherit; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .14s, color .14s, background .14s;
}
.ich-ref-btn { width: 28px; padding: 0; font-size: 14px; }
.ich-ref-btn:hover, .ich-more-btn:hover { border-color: var(--col-accent, var(--accent)); color: var(--col-accent, var(--accent)); }

.idle-list {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 6px;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
}
.idle-loading {
  margin: auto; text-align: center; padding: 24px 12px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.idle-row {
  width: 100%; flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .03);
  color: var(--text); text-align: left; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, transform .10s ease;
}
[data-theme="silver"] .idle-row {
  border-color: rgba(15, 23, 42, .09);
  background: rgba(255, 255, 255, .72);
}
.idle-row:hover {
  border-color: var(--col-border, var(--accent-border));
  background: rgba(255, 255, 255, .07);
}
.idle-row:active { transform: translateY(1px); }
.idle-row.is-playing {
  border-color: var(--col-accent, var(--accent));
  background: linear-gradient(135deg, var(--col-glow, var(--accent-dim)), rgba(0, 0, 0, .18));
  box-shadow: 0 0 14px var(--col-glow, var(--glow-1));
}
.idle-rank {
  width: 26px; flex: 0 0 26px; text-align: center;
  font: 900 14px/1 ui-monospace, monospace; color: var(--muted);
}
.idle-rank.r1 { color: #fbbf24; font-size: 17px; }
.idle-rank.r2 { color: #cbd5e1; font-size: 16px; }
.idle-rank.r3 { color: #f59e0b; font-size: 15.5px; }
[data-theme="silver"] .idle-rank.r2 { color: #475569; }
.idle-thumb {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 9px; object-fit: cover; display: block;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .10);
}
.idle-freq-pill {
  width: 54px; height: 34px; flex: 0 0 54px; border-radius: 9px;
  background: rgba(245, 185, 66, .12); border: 1px solid rgba(245, 185, 66, .34);
  color: #fbbf24; font: 800 12.5px/1 ui-monospace, monospace;
  display: grid; place-items: center;
}
[data-theme="silver"] .idle-freq-pill { color: #b45309; background: rgba(245, 158, 11, .14); }
.idle-row.is-playing .idle-freq-pill { background: #f5b942; color: #120d04; border-color: #f5b942; }
.idle-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.idle-name {
  font-size: 14px; font-weight: 800; line-height: 1.25; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idle-meta {
  font-size: 11.5px; font-weight: 500; line-height: 1.25; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idle-play-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .05);
  color: var(--muted); font-size: 12px; display: grid; place-items: center;
}
.idle-row:hover .idle-play-ico { border-color: var(--col-accent, var(--accent)); color: var(--col-accent, var(--accent)); }
.idle-row.is-playing .idle-play-ico { background: var(--col-accent, var(--accent)); color: #06090f; border-color: transparent; }

.home-tile-board.boot-pre-enter .idle-col { opacity: 0; transform: translateY(48px); }
.home-tile-board.boot-entering .idle-col { animation: tileRiseFromBottom .62s cubic-bezier(.16, 1.06, .3, 1) both; }
.home-tile-board.boot-entering .idle-col:nth-child(1) { animation-delay: .04s; }
.home-tile-board.boot-entering .idle-col:nth-child(2) { animation-delay: .12s; }
.home-tile-board.boot-entering .idle-col:nth-child(3) { animation-delay: .20s; }

/* Selectable IDLE Mode 2: Time & Weather Living Atmospheric Landscape Scenery */
.idle-weather-scene {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--line);
  background: #070d18;
  box-shadow: 0 14px 36px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .14);
}
#idle-weather-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.iws-overlay {
  position: relative; z-index: 2; width: 100%; height: 100%;
  padding: 28px 34px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  background: linear-gradient(180deg, rgba(4, 8, 16, .12) 0%, rgba(4, 8, 16, .04) 48%, rgba(4, 8, 16, .58) 100%);
}
.iws-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.iws-tod-pill {
  width: fit-content; padding: 5px 12px; border-radius: 999px;
  background: rgba(8, 14, 24, .56); border: 1px solid rgba(255, 255, 255, .24);
  font: 800 11.5px/1 ui-monospace, "Noto Sans CJK KR", sans-serif; letter-spacing: .10em; color: #f8fafc;
}
.iws-time {
  font: 900 94px/0.96 ui-monospace, monospace; letter-spacing: -.04em; color: #ffffff;
  text-shadow: 0 6px 26px rgba(0, 0, 0, .58);
}
.iws-date { font-size: 20px; font-weight: 800; color: rgba(241, 245, 249, .92); text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.iws-greet { font-size: 14px; font-weight: 600; color: rgba(226, 236, 248, .82); text-shadow: 0 1px 8px rgba(0, 0, 0, .65); }

.iws-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex: 0 0 auto; }
.iws-wx-card {
  padding: 16px 22px; border-radius: 18px;
  background: rgba(8, 14, 24, .58); border: 1px solid rgba(255, 255, 255, .20);
  display: flex; flex-direction: column; gap: 6px; min-width: 248px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .42);
}
.iws-wx-top { display: flex; align-items: center; gap: 14px; }
.iws-wx-ico { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; color: #fde68a; }
.iws-wx-temp-wrap { display: flex; flex-direction: column; gap: 2px; }
.iws-wx-temp { font: 900 40px/1 ui-monospace, monospace; color: #ffffff; }
.iws-wx-cond { font-size: 14.5px; font-weight: 800; color: #e2e8f0; }
.iws-wx-meta { font-size: 12px; font-weight: 600; color: rgba(203, 213, 225, .86); }
.iws-quick-row, .ics-quick-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.iws-qbtn {
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(10, 16, 28, .66); color: #f8fafc;
  font: 800 12.5px/1 inherit; cursor: pointer;
  transition: border-color .15s, background .15s, transform .10s;
}
.iws-qbtn:hover { border-color: var(--accent); background: var(--accent-dim); color: #ffffff; }
.iws-qbtn:active { transform: translateY(1px); }

/* Selectable IDLE Mode 3: Hi-Fi Analog Chronometer + Studio Digital Clock */
.idle-clock-scene {
  width: 100%; height: 100%;
  border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(circle at 28% 50%, var(--glow-1) 0%, transparent 56%), linear-gradient(155deg, var(--panel) 0%, var(--panel-2) 100%);
  box-shadow: 0 14px 36px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .10);
  display: flex; align-items: center; justify-content: center; gap: 48px; padding: 24px 40px;
}
.ics-analog-wrap {
  width: 390px; height: 390px; flex: 0 0 390px;
  display: grid; place-items: center;
}
#idle-clock-canvas { width: 100%; height: 100%; display: block; }
.ics-digital-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ics-kicker { font: 800 12px/1 ui-monospace, monospace; letter-spacing: .18em; color: var(--accent); }
.ics-time-row { display: flex; align-items: baseline; gap: 12px; }
.ics-hhmm { font: 900 116px/0.92 ui-monospace, monospace; letter-spacing: -.04em; color: var(--text); }
.ics-ss { font: 800 44px/1 ui-monospace, monospace; color: var(--accent); opacity: .9; }
.ics-date { font-size: 22px; font-weight: 800; color: var(--muted); }
.ics-status-pill {
  width: fit-content; padding: 7px 14px; border-radius: 999px;
  background: var(--input-bg); border: 1px solid var(--line);
  font: 700 13px/1 ui-monospace, "Noto Sans CJK KR", sans-serif; color: var(--text);
}

/* Selectable IDLE Mode 4: Living Album Cover Art Gallery Wall */
.idle-gallery-scene {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--line);
  background: #06090f;
}
.igs-grid {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px; padding: 8px;
}
.igs-card {
  position: relative; overflow: hidden; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .12);
  padding: 0; background: #101622; cursor: pointer; text-align: left;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.igs-card:hover { border-color: var(--accent); box-shadow: 0 0 18px var(--glow-1); z-index: 2; }
.igs-card:active { transform: translateY(1.5px); }
.igs-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.igs-cap {
  position: absolute; inset: auto 0 0 0; padding: 20px 10px 8px;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 7, 12, .88) 72%);
  display: flex; flex-direction: column; gap: 2px;
}
.igs-cap b { font-size: 12.5px; font-weight: 800; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.igs-cap small { font-size: 10.5px; color: rgba(203, 213, 225, .86); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.igs-badge {
  position: absolute; left: 8px; top: 8px; padding: 3px 7px; border-radius: 999px;
  background: rgba(6, 10, 18, .76); border: 1px solid rgba(255, 255, 255, .20);
  font: 800 10px/1 ui-monospace, monospace; color: #ffffff;
}
.igs-badge.melon { border-color: rgba(0, 210, 91, .65); color: #4ade80; }
.igs-badge.genie { border-color: rgba(56, 189, 248, .65); color: #7dd3fc; }
.igs-float-pill {
  position: absolute; right: 16px; top: 14px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(6, 10, 18, .78); border: 1px solid var(--accent-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.igs-clock { font: 900 14px/1 ui-monospace, monospace; color: var(--accent); }
.igs-sep { color: var(--muted); }
.igs-hint { font-size: 11.5px; font-weight: 700; color: #e2e8f0; }

/* Settings Tab: three startup and IDLE screen choices */
.idle-pick-grid {
  flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; min-height: 0;
}
.idle-pick-card {
  border-radius: 16px; border: 1.5px solid var(--line);
  background: linear-gradient(155deg, var(--panel-2) 0%, var(--panel) 100%);
  color: var(--text); padding: 20px 16px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  box-shadow: 0 6px 18px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .10s ease;
}
.idle-pick-card:hover { border-color: var(--accent-border); }
.idle-pick-card:active { transform: translateY(1.5px); }
.idle-pick-card.active {
  border-color: var(--accent);
  background: linear-gradient(155deg, var(--accent-dim), var(--panel-2));
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, .55), 0 0 0 1px var(--accent), 0 0 18px var(--glow-1);
}
.ipc-ico {
  width: 60px; height: 60px; border-radius: 16px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted);
}
.idle-pick-card.active .ipc-ico { color: var(--accent); border-color: var(--accent-border); background: var(--accent-dim); }
.idle-pick-card b { font-size: 16px; font-weight: 900; }
.idle-pick-card.active b { color: var(--accent); }
.idle-pick-card span { font-size: 12.5px; color: var(--muted); line-height: 1.45; word-break: keep-all; }
.ipc-tag {
  font-style: normal; font: 800 10.5px/1 ui-monospace, "Noto Sans CJK KR", sans-serif;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--muted);
}
.idle-pick-card.active .ipc-tag { background: var(--accent); color: var(--accent-text); border-color: transparent; }

/* 4x2 Full-Width Pure Tile Menu Launcher (Legacy Fallback) */
.home-tiles-grid {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Top-Edge Swipe-Down Handle & Slide-Down Home Menu Drawer */
.home-edge-zone {
  position: absolute; top: 0; left: 50%; width: 220px; height: 22px; z-index: 59;
  transform: translateX(-50%);
  display: flex; align-items: flex-start; justify-content: center;
  touch-action: pan-x;
  pointer-events: none;
}
.home-edge-handle {
  pointer-events: auto;
  width: 112px; height: 12px; padding: 0;
  border: 1px solid var(--accent-border); border-top: 0;
  border-radius: 0 0 11px 11px;
  background: linear-gradient(90deg, rgba(16, 22, 32, .92), rgba(26, 34, 48, .96), rgba(16, 22, 32, .92));
  color: var(--accent); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .44), inset 0 -1px 0 rgba(255, 255, 255, .14);
  transition: height .18s ease, background .18s ease, border-color .18s ease, transform .5s cubic-bezier(.16, 1.06, .3, 1);
}
.home-edge-handle:hover, .home-edge-zone:hover .home-edge-handle {
  height: 18px; border-color: var(--accent);
  background: linear-gradient(90deg, rgba(20, 28, 42, .96), var(--accent-dim), rgba(20, 28, 42, .96));
}
[data-theme="silver"] .home-edge-handle {
  background: rgba(255, 255, 255, .95); color: var(--accent);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .16);
}
.heh-bar {
  width: 34px; height: 2.5px; border-radius: 99px;
  background: var(--accent); opacity: .9;
}
.heh-chev { font-size: 9px; font-weight: 900; line-height: .65; margin-top: 1px; }
.home-edge-handle.boot-pre-enter { transform: translateY(-22px); opacity: 0; }
.home-edge-handle.boot-entering { animation: homeEdgeHandleIn .72s cubic-bezier(.16, 1.06, .3, 1) .26s both; }
@keyframes homeEdgeHandleIn {
  0%   { opacity: 0; transform: translateY(-24px); }
  100% { opacity: 1; transform: translateY(0); }
}

.home-edge-backdrop {
  position: absolute; inset: 0; z-index: 64;
  background: rgba(4, 7, 12, .68);
  opacity: 0; transition: opacity .22s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity;
}
.home-edge-backdrop.open { opacity: 1; }

.home-edge-drawer {
  position: absolute; top: 0; left: 0; right: 0; z-index: 67;
  padding: 14px 20px 0;
  display: flex; flex-direction: column; align-items: stretch;
  transform: translate3d(0, -108%, 0);
  transition: transform .30s cubic-bezier(.22, 1, .36, 1);
  will-change: transform; backface-visibility: hidden;
  pointer-events: none;
  touch-action: pan-x;
}
.home-edge-drawer.open {
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}
.home-edge-drawer.dragging { transition: none; }

.home-drawer-card {
  position: relative; overflow: hidden;
  border-radius: 20px; border: 1.5px solid var(--accent-border);
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%);
  color: var(--text); padding: 14px 18px 8px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .72), 0 0 32px var(--glow-1), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.hd-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.hd-head-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hd-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px;
  background: var(--accent); box-shadow: 0 0 10px var(--glow-1);
}
.hd-title { font: 900 13px/1 ui-monospace, monospace; letter-spacing: .14em; color: var(--accent); }
.hd-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-head-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.hd-full-btn {
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--accent-border); background: var(--accent-dim); color: var(--accent);
  font: 800 11.5px/1 inherit; cursor: pointer;
}
.hd-full-btn:hover { background: var(--accent); color: var(--accent-text); }
.hd-close-btn {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--muted);
  font-size: 13px; font-weight: 800; cursor: pointer; display: grid; place-items: center;
}
.hd-close-btn:hover { border-color: var(--accent); color: var(--text); }

.hd-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.hd-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .24));
  color: var(--text); text-align: left; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .10);
  transition: border-color .16s ease, transform .12s ease, box-shadow .16s ease, background .16s ease;
}
[data-theme="silver"] .hd-tile {
  background: linear-gradient(150deg, #ffffff 0%, #e9eff7 100%);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12), inset 0 1px 0 #ffffff;
}
.hd-tile:hover {
  border-color: var(--tile-accent, var(--accent));
  box-shadow: 0 8px 20px rgba(0, 0, 0, .42), 0 0 16px var(--tile-glow, var(--glow-1));
}
.hd-tile:active { transform: translateY(1.5px); }
.hd-tile.is-playing {
  border-color: var(--tile-accent, var(--accent));
  background: linear-gradient(150deg, var(--tile-glow, var(--accent-dim)), rgba(0, 0, 0, .26));
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, .65), 0 0 14px var(--tile-glow, var(--glow-1));
}
.hd-ico {
  width: 50px; height: 50px; flex: 0 0 50px; border-radius: 13px; overflow: hidden;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .34);
}
.hd-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hd-ico.ico-nobg { background: transparent; border: 0; box-shadow: none; }
.hd-ico.ico-nobg img { object-fit: contain; }
.hd-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hd-meta b { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-meta small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hd-pullup {
  align-self: center; width: 160px; height: 18px; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.hd-pullup-bar {
  width: 56px; height: 4px; border-radius: 999px;
  background: var(--muted); opacity: .55; transition: opacity .15s, background .15s;
}
.hd-pullup:hover .hd-pullup-bar { background: var(--accent); opacity: 1; }

/* Left-Edge Swipe Handle & Slide-Out Master Volume Popup Drawer */
.vol-edge-zone {
  position: absolute; top: 48px; left: 0; bottom: 0; width: 28px; z-index: 58;
  display: flex; align-items: center; justify-content: flex-start;
  touch-action: pan-y;
}
.vol-edge-handle {
  width: 16px; height: 96px; padding: 0; border: 1px solid var(--accent-border); border-left: 0;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, rgba(20, 26, 36, .9), rgba(12, 16, 22, .94));
  color: var(--accent); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  box-shadow: 4px 0 16px rgba(0,0,0,.42), inset -1px 0 0 rgba(255,255,255,.12);
  transition: width .18s ease, background .18s ease, border-color .18s ease, transform .5s cubic-bezier(.16, 1.06, .3, 1);
}
.vol-edge-handle:hover, .vol-edge-zone:hover .vol-edge-handle {
  width: 22px; border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-dim), rgba(16, 22, 30, .95));
}
[data-theme="silver"] .vol-edge-handle {
  background: rgba(255, 255, 255, .94); color: var(--accent);
  box-shadow: 3px 0 12px rgba(15,23,42,.16);
}
.veh-bar {
  width: 3px; height: 28px; border-radius: 99px;
  background: var(--accent); opacity: .82;
}
.veh-chev { font-size: 13px; font-weight: 900; line-height: 1; }
.vol-edge-handle.boot-pre-enter { transform: translateX(-30px); opacity: 0; }
.vol-edge-handle.boot-entering { animation: volEdgeHandleIn .72s cubic-bezier(.16, 1.06, .3, 1) .26s both; }
@keyframes volEdgeHandleIn {
  0%   { opacity: 0; transform: translateX(-34px); }
  100% { opacity: 1; transform: translateX(0); }
}

.vol-edge-backdrop {
  position: absolute; inset: 48px 0 0 0; z-index: 62;
  background: rgba(4, 7, 12, .62);
  opacity: 0; transition: opacity .22s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity;
}
.vol-edge-backdrop.open { opacity: 1; }

.vol-edge-drawer {
  position: absolute; top: 48px; left: 0; bottom: 0; width: 280px; z-index: 65;
  padding: 16px 14px 16px 16px;
  display: flex; align-items: stretch;
  transform: translate3d(-106%, 0, 0);
  transition: transform .30s cubic-bezier(.22, 1, .36, 1);
  will-change: transform; backface-visibility: hidden;
  pointer-events: none;
  touch-action: pan-y;
}
.vol-edge-drawer.open {
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}
.vol-edge-drawer.dragging { transition: none; }

.vol-drawer-card {
  position: relative; overflow: hidden; flex: 1;
  border-radius: 22px; border: 1.5px solid var(--accent-border);
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  color: var(--text); padding: 18px 18px 16px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  box-shadow: 14px 0 42px rgba(0, 0, 0, .62), 0 0 32px var(--glow-1), inset 0 1px 0 rgba(255,255,255,.16);
}
.vdc-glow {
  position: absolute; inset: -15% -20% auto -20%; height: 48%;
  background: radial-gradient(ellipse at 50% 25%, var(--glow-1), transparent 72%);
  pointer-events: none;
}
.vd-head {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
}
.vd-label { font: 800 12px/1 ui-monospace, monospace; letter-spacing: .12em; color: var(--muted); }
.vd-speaker { font-size: 18px; line-height: 1; }
.vd-readout {
  position: relative; z-index: 1;
  text-align: center; line-height: 1;
}
.vd-num { font: 900 50px/1 ui-monospace, monospace; color: var(--accent); letter-spacing: -.03em; }
.vd-num.muted { color: var(--red); font-size: 34px; }
.vd-unit { font-size: 18px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.vd-fader-wrap {
  position: relative; z-index: 1; flex: 1 1 auto; min-height: 110px;
  display: flex; align-items: stretch; justify-content: center; gap: 14px;
  padding: 10px 12px; border-radius: 16px;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line);
  cursor: ns-resize; touch-action: none;
}
[data-theme="silver"] .vd-fader-wrap { background: rgba(15, 23, 42, .06); }
.vd-scale {
  display: flex; flex-direction: column; justify-content: space-between;
  font: 700 10px/1 ui-monospace, monospace; color: var(--muted); text-align: right;
  padding: 4px 0; user-select: none;
}
.vd-fader-track {
  position: relative; width: 24px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.75);
}
[data-theme="silver"] .vd-fader-track { background: rgba(15, 23, 42, .16); border-color: rgba(15, 23, 42, .22); }
.vd-fader-fill {
  position: absolute; left: 2px; right: 2px; bottom: 2px;
  border-radius: 999px;
  background: linear-gradient(0deg, var(--cyan), var(--accent));
  box-shadow: 0 0 14px var(--glow-1);
  pointer-events: none;
}
.vd-fader-thumb {
  position: absolute; left: 50%; width: 42px; height: 22px;
  transform: translate(-50%, 50%);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 45%, #64748b 100%);
  border: 1.5px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 12px rgba(0,0,0,.65), 0 0 10px var(--glow-1);
  pointer-events: none;
}
.vd-fader-thumb::after {
  content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px;
  transform: translateY(-50%); background: var(--accent-text); border-radius: 2px; opacity: .75;
}
.vd-step-row { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 6px; }
.vd-presets { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

/* Bottom-Edge Swipe-Up Handle & Slide-Up Display Brightness Popup Drawer */
.bright-edge-zone {
  position: absolute; left: 50%; bottom: 0; width: 180px; height: 26px; z-index: 58;
  transform: translateX(-50%);
  display: flex; align-items: flex-end; justify-content: center;
  touch-action: pan-x;
}
.bright-edge-handle {
  width: 112px; height: 15px; padding: 0;
  border: 1px solid rgba(251, 191, 36, .48); border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, rgba(20, 26, 36, .92), rgba(32, 26, 16, .95), rgba(20, 26, 36, .92));
  color: #fbbf24; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.14);
  transition: height .18s ease, background .18s ease, border-color .18s ease, transform .5s cubic-bezier(.16, 1.06, .3, 1);
}
.bright-edge-handle:hover, .bright-edge-zone:hover .bright-edge-handle {
  height: 21px; border-color: #fbbf24;
  background: linear-gradient(90deg, rgba(251, 191, 36, .22), rgba(245, 158, 11, .34), rgba(251, 191, 36, .22));
}
[data-theme="silver"] .bright-edge-handle {
  background: rgba(255, 255, 255, .94); color: #d97706;
  box-shadow: 0 -3px 12px rgba(15,23,42,.16);
}
.beh-bar {
  width: 34px; height: 3px; border-radius: 99px;
  background: #fbbf24; opacity: .88;
}
.beh-chev { font-size: 11px; font-weight: 900; line-height: .7; }
.bright-edge-handle.boot-pre-enter { transform: translateY(28px); opacity: 0; }
.bright-edge-handle.boot-entering { animation: brightEdgeHandleIn .72s cubic-bezier(.16, 1.06, .3, 1) .28s both; }
@keyframes brightEdgeHandleIn {
  0%   { opacity: 0; transform: translateY(32px); }
  100% { opacity: 1; transform: translateY(0); }
}

.bright-edge-backdrop {
  position: absolute; inset: 48px 0 0 0; z-index: 62;
  background: rgba(4, 7, 12, .54);
  opacity: 0; transition: opacity .22s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity;
}
.bright-edge-backdrop.open { opacity: 1; }

.bright-edge-drawer {
  position: absolute; left: 50%; bottom: 0; width: 680px; z-index: 65;
  padding: 12px 16px 18px;
  display: flex; align-items: stretch;
  transform: translate3d(-50%, 112%, 0);
  transition: transform .30s cubic-bezier(.22, 1, .36, 1);
  will-change: transform; backface-visibility: hidden;
  pointer-events: none;
  touch-action: pan-x;
}
.bright-edge-drawer.open {
  transform: translate3d(-50%, 0, 0);
  pointer-events: auto;
}
.bright-edge-drawer.dragging { transition: none; }

.bright-drawer-card {
  position: relative; overflow: hidden; flex: 1;
  border-radius: 22px; border: 1.5px solid rgba(251, 191, 36, .58);
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  color: var(--text); padding: 16px 20px 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 -14px 44px rgba(0, 0, 0, .64), 0 0 34px rgba(251, 191, 36, .20), inset 0 1px 0 rgba(255,255,255,.16);
}
.bdc-glow {
  position: absolute; inset: -30% -15% auto -15%; height: 65%;
  background: radial-gradient(ellipse at 50% 20%, rgba(251, 191, 36, .24), transparent 72%);
  pointer-events: none;
}
.bd-head {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.bd-head-left { display: flex; align-items: center; gap: 8px; }
.bd-ico { font-size: 20px; line-height: 1; }
.bd-label { font: 800 12.5px/1 ui-monospace, monospace; letter-spacing: .12em; color: var(--muted); }
.bd-head-right { display: flex; align-items: baseline; gap: 3px; }
.bd-num { font: 900 32px/1 ui-monospace, monospace; color: #fbbf24; letter-spacing: -.03em; }
.bd-unit { font-size: 14px; font-weight: 700; color: var(--muted); margin-right: 10px; }
.bd-close {
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--muted);
  font-size: 14px; font-weight: 800; cursor: pointer; display: grid; place-items: center;
  align-self: center;
}
.bd-close:hover { border-color: #fbbf24; color: var(--text); }
.bd-fader-wrap {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px 10px; border-radius: 16px;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line);
  cursor: ew-resize; touch-action: none;
}
[data-theme="silver"] .bd-fader-wrap { background: rgba(15, 23, 42, .06); }
.bd-fader-track {
  position: relative; height: 22px; width: 100%; border-radius: 999px;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.75);
}
[data-theme="silver"] .bd-fader-track { background: rgba(15, 23, 42, .16); border-color: rgba(15, 23, 42, .22); }
.bd-fader-fill {
  position: absolute; left: 2px; top: 2px; bottom: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b45309, #f59e0b 52%, #fef08a 100%);
  box-shadow: 0 0 14px rgba(251, 191, 36, .48);
  pointer-events: none;
}
.bd-fader-thumb {
  position: absolute; top: 50%; width: 24px; height: 36px;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffbeb 0%, #fde68a 45%, #d97706 100%);
  border: 1.5px solid rgba(255,255,255,.88);
  box-shadow: 0 4px 12px rgba(0,0,0,.62), 0 0 12px rgba(251, 191, 36, .48);
  pointer-events: none;
}
.bd-fader-thumb::after {
  content: ""; position: absolute; top: 8px; bottom: 8px; left: 50%; width: 2px;
  transform: translateX(-50%); background: rgba(120, 53, 15, .72); border-radius: 2px;
}
.bd-scale {
  display: flex; justify-content: space-between;
  font: 700 10.5px/1 ui-monospace, monospace; color: var(--muted); user-select: none;
}
.bd-btn-row {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: .75fr repeat(4, 1fr) .75fr; gap: 7px;
}
.bd-btn-row .vp-btn.active {
  background: rgba(251, 191, 36, .22); border-color: #fbbf24; color: #fde68a;
}
[data-theme="silver"] .bd-btn-row .vp-btn.active { color: #b45309; }

/* Right-Edge Swipe Handle & Slide-Out Single "전원 제어" Tile Drawer */
.power-edge-zone {
  position: absolute; top: 48px; right: 0; bottom: 0; width: 28px; z-index: 58;
  display: flex; align-items: center; justify-content: flex-end;
  touch-action: pan-y;
}
.power-edge-handle {
  width: 16px; height: 96px; padding: 0; border: 1px solid rgba(239, 68, 68, .38); border-right: 0;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, rgba(24, 28, 36, .88), rgba(14, 17, 22, .92));
  color: rgba(255, 118, 124, .92); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  box-shadow: -4px 0 16px rgba(0,0,0,.42), inset 1px 0 0 rgba(255,255,255,.12);
  transition: width .18s ease, background .18s ease, border-color .18s ease, transform .5s cubic-bezier(.16, 1.06, .3, 1);
}
.power-edge-handle:hover, .power-edge-zone:hover .power-edge-handle {
  width: 22px; border-color: rgba(248, 113, 113, .75);
  background: linear-gradient(180deg, rgba(153, 27, 27, .48), rgba(20, 22, 28, .94));
}
[data-theme="silver"] .power-edge-handle {
  background: rgba(255, 255, 255, .92); color: #dc2626;
  box-shadow: -3px 0 12px rgba(15,23,42,.16);
}
.peh-bar {
  width: 3px; height: 28px; border-radius: 99px;
  background: rgba(248, 113, 113, .78);
}
.peh-chev { font-size: 13px; font-weight: 900; line-height: 1; }
.power-edge-handle.boot-pre-enter { transform: translateX(30px); opacity: 0; }
.power-edge-handle.boot-entering { animation: edgeHandleIn .72s cubic-bezier(.16, 1.06, .3, 1) .26s both; }
@keyframes edgeHandleIn {
  0%   { opacity: 0; transform: translateX(34px); }
  100% { opacity: 1; transform: translateX(0); }
}

.power-edge-backdrop {
  position: absolute; inset: 48px 0 0 0; z-index: 62;
  background: rgba(4, 7, 12, .62);
  opacity: 0; transition: opacity .22s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity;
}
.power-edge-backdrop.open { opacity: 1; }

.power-edge-drawer {
  position: absolute; top: 48px; right: 0; bottom: 0; width: 264px; z-index: 65;
  padding: 16px 16px 16px 14px;
  display: flex; align-items: stretch;
  transform: translate3d(106%, 0, 0);
  transition: transform .30s cubic-bezier(.22, 1, .36, 1);
  will-change: transform; backface-visibility: hidden;
  pointer-events: none;
  touch-action: pan-y;
}
.power-edge-drawer.open {
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}
.power-edge-drawer.dragging { transition: none; }

.power-drawer-tile {
  position: relative; overflow: hidden; flex: 1;
  border-radius: 22px; border: 1.5px solid rgba(239, 68, 68, .55);
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  color: var(--text); cursor: pointer; padding: 24px 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  box-shadow: -14px 0 42px rgba(0, 0, 0, .62), 0 0 32px rgba(239, 68, 68, .22), inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform .16s ease, border-color .18s ease, box-shadow .18s ease;
}
.power-drawer-tile:hover {
  border-color: #f87171;
  box-shadow: -14px 0 46px rgba(0, 0, 0, .68), 0 0 44px rgba(239, 68, 68, .36), inset 0 1px 0 rgba(255,255,255,.22);
}
.power-drawer-tile:active { transform: scale(.96); }
.pdt-glow {
  position: absolute; inset: -15% -20% auto -20%; height: 55%;
  background: radial-gradient(ellipse at 50% 25%, rgba(239, 68, 68, .32), transparent 72%);
  pointer-events: none;
}
.pdt-emblem {
  position: relative; z-index: 1;
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center; color: #ff5c66;
  background: radial-gradient(circle at 35% 30%, rgba(239, 68, 68, .26), rgba(16, 12, 16, .85));
  border: 2px solid rgba(239, 68, 68, .68);
  box-shadow: 0 10px 30px rgba(239, 68, 68, .36), inset 0 1px 0 rgba(255,255,255,.24);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
[data-theme="silver"] .pdt-emblem {
  background: radial-gradient(circle at 35% 30%, rgba(220, 38, 38, .15), rgba(255, 255, 255, .94));
  color: #dc2626;
}
.power-drawer-tile:hover .pdt-emblem { transform: scale(1.07); }
.pdt-title { position: relative; z-index: 1; font-size: 22px; font-weight: 900; letter-spacing: -.015em; }
.pdt-sub { position: relative; z-index: 1; font: 800 10.5px/1 ui-monospace, monospace; letter-spacing: .16em; color: #f87171; }
.pdt-hint {
  position: relative; z-index: 1; margin-top: 8px;
  font-size: 12px; color: var(--muted); text-align: center;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .24); border: 1px solid var(--line);
}
[data-theme="silver"] .pdt-hint { background: rgba(15, 23, 42, .06); }
.metro-tile {
  position: relative; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--panel) 0%, var(--panel-2) 100%);
  color: var(--text); text-align: left; cursor: pointer;
  padding: 20px 22px 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 10px 26px var(--shadow), inset 0 1px 0 rgba(255,255,255,.1);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), border-color .2s ease, box-shadow .22s ease, opacity .22s ease;
  will-change: transform, opacity;
}
.metro-tile .mt-glow {
  position: absolute; inset: -25% -15% auto -15%; height: 68%;
  background: radial-gradient(ellipse at 30% 20%, var(--tile-glow, rgba(200,223,110,.22)), transparent 72%);
  pointer-events: none; transition: opacity .22s ease, transform .3s ease;
}
.metro-tile:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: var(--tile-accent, var(--accent));
  box-shadow: 0 14px 32px var(--shadow), 0 0 24px var(--tile-glow, var(--glow-1));
}
.metro-tile:active { transform: scale(.96); }
.mt-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.mt-ico {
  width: 76px; height: 76px; border-radius: 18px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13);
  display: grid; place-items: center; font-size: 32px; overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease;
}
.mt-ico.app-ico img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  user-select: none; -webkit-user-drag: none;
}
.mt-ico.app-ico.ico-pad {
  background: linear-gradient(155deg, rgba(16, 48, 108, .72), rgba(8, 22, 54, .88));
  border-color: rgba(96, 165, 250, .38);
  padding: 6px;
}
.mt-ico.app-ico.ico-pad img { object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.mt-ico.app-ico.ico-nobg {
  background: transparent; border: 0; box-shadow: none; overflow: visible;
}
.mt-ico.app-ico.ico-nobg img {
  object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45));
}
[data-theme="silver"] .mt-ico { background: rgba(15,23,42,.06); border-color: rgba(15,23,42,.12); }
[data-theme="silver"] .mt-ico.app-ico.ico-nobg { background: transparent; border: 0; }
.metro-tile:hover .mt-ico { transform: scale(1.09) rotate(-2deg); }
.mt-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font: 800 11px/1 ui-monospace, monospace; letter-spacing: .06em;
  padding: 5px 9px; border-radius: 999px;
  background: rgba(0,0,0,.3); color: var(--tile-accent, var(--accent));
  border: 1px solid var(--tile-border, var(--line));
  transition: background .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
[data-theme="silver"] .mt-badge { background: rgba(15,23,42,.06); }
.mt-eq {
  display: none; align-items: flex-end; gap: 2.5px; height: 12px; flex: 0 0 auto;
}
.mt-eq i {
  display: block; width: 2.6px; height: 100%; border-radius: 99px;
  background: currentColor; transform-origin: bottom center;
  transform: scaleY(.25); will-change: transform;
}
.mt-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mt-title { font-size: 22px; font-weight: 900; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-sub { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s ease; }

/* Live Now-Playing Home Tile Action (60fps GPU-composited transform/opacity only!) */
.mt-live-ring {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  border: 2px solid var(--tile-accent, var(--accent));
  opacity: 0; will-change: opacity, transform;
}
.mt-shimmer {
  position: absolute; top: -15%; bottom: -15%; left: 0; width: 42%; pointer-events: none; z-index: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.14) 48%, rgba(255,255,255,.22) 52%, transparent 100%);
  opacity: 0; transform: translate3d(-160%, 0, 0) skewX(-22deg); will-change: transform, opacity;
}
.metro-tile.is-playing {
  border-color: var(--tile-accent, var(--accent));
  box-shadow: 0 14px 36px var(--shadow), 0 0 28px var(--tile-glow, var(--glow-1)), inset 0 1px 0 rgba(255,255,255,.24);
}
.metro-tile.is-playing .mt-live-ring {
  animation: tileRingPulse 2.4s ease-in-out infinite;
}
.metro-tile.is-playing .mt-glow {
  opacity: .82;
}
.metro-tile.is-playing .mt-shimmer {
  opacity: 0;
}
.metro-tile.is-playing .mt-ico {
  border-color: var(--tile-accent, var(--accent));
  box-shadow: 0 8px 18px rgba(0,0,0,.42), 0 0 16px var(--tile-glow, var(--glow-1)), inset 0 1px 0 rgba(255,255,255,.32);
}
.metro-tile.is-playing .mt-badge {
  background: var(--tile-accent, var(--accent));
  color: #080b10;
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 14px var(--tile-glow, var(--glow-1));
}
.metro-tile.is-playing .mt-eq { display: inline-flex; }
.metro-tile.is-playing .mt-eq i:nth-child(1) { animation: eqBarBounce .54s ease-in-out infinite alternate; }
.metro-tile.is-playing .mt-eq i:nth-child(2) { animation: eqBarBounce .42s ease-in-out .12s infinite alternate; }
.metro-tile.is-playing .mt-eq i:nth-child(3) { animation: eqBarBounce .62s ease-in-out .22s infinite alternate; }
.metro-tile.is-playing .mt-eq i:nth-child(4) { animation: eqBarBounce .48s ease-in-out .06s infinite alternate; }
.metro-tile.is-playing .mt-sub {
  color: var(--text);
  font-weight: 700;
}
#view-now:not(.active) .metro-tile.is-playing *,
#home-tile-board.hidden .metro-tile.is-playing * {
  animation-play-state: paused !important;
}

@keyframes tileRingPulse {
  0%, 100% { opacity: .88; transform: scale(1); }
  50%      { opacity: .32; transform: scale(.988); }
}
@keyframes tileAuraPulse {
  0%, 100% { opacity: .68; transform: translate3d(0, 0, 0) scale(1); }
  50%      { opacity: 1;   transform: translate3d(4%, 4%, 0) scale(1.12); }
}
@keyframes tileShimmerSweep {
  0%   { transform: translate3d(-160%, 0, 0) skewX(-22deg); opacity: 0; }
  12%  { opacity: .85; }
  48%  { transform: translate3d(340%, 0, 0) skewX(-22deg); opacity: .75; }
  52%, 100% { transform: translate3d(340%, 0, 0) skewX(-22deg); opacity: 0; }
}
@keyframes tileIconGroove {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  25%      { transform: translate3d(0, -5px, 0) scale(1.065) rotate(-2.8deg); }
  50%      { transform: translate3d(0, -1px, 0) scale(1.015) rotate(0.6deg); }
  75%      { transform: translate3d(0, -4px, 0) scale(1.055) rotate(2.4deg); }
}
@keyframes eqBarBounce {
  0%   { transform: scaleY(.22); }
  55%  { transform: scaleY(.96); }
  100% { transform: scaleY(.44); }
}

/* IPTV Live Now-Playing Strip (matches Internet Radio live deck bar) */
.iptv-now-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(155deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  transition: border-color .22s ease, box-shadow .22s ease;
}
.iptv-now-bar.live {
  border-color: rgba(244, 114, 182, .65);
  box-shadow: 0 8px 24px var(--shadow), 0 0 20px rgba(244, 114, 182, .22), inset 0 1px 0 rgba(255,255,255,.12);
}
.iptv-now-bar .inb-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.iptv-now-bar .inb-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px;
  background: var(--muted); opacity: .5;
}
.iptv-now-bar .inb-dot.live {
  background: #f472b6; opacity: 1;
  box-shadow: 0 0 10px rgba(244, 114, 182, .85);
}
.iptv-now-bar .inb-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.iptv-now-bar .inb-title {
  font-size: 14.5px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iptv-now-bar .inb-meta {
  font-size: 11.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iptv-now-bar .inb-sep { margin: 0 5px; opacity: .55; }
.iptv-now-bar .inb-acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
#iptv-results .media-item.is-playing {
  border-color: rgba(244, 114, 182, .75);
  background: linear-gradient(155deg, rgba(244, 114, 182, .14), var(--panel-2));
  box-shadow: 0 0 18px rgba(244, 114, 182, .2);
}
#iptv-results .media-item.is-playing .play-badge {
  background: #f472b6; color: #090c10; border-color: transparent;
}

/* Distinct Luxury Accent Palettes per Feature Tile */
.t-radio    { --tile-accent: #f5b942; --tile-glow: rgba(245,185,66,.26);  --tile-border: rgba(245,185,66,.45); }
.t-youtube  { --tile-accent: #ff4d4f; --tile-glow: rgba(255,77,79,.24);   --tile-border: rgba(255,77,79,.45); }
.t-melon    { --tile-accent: #00d25b; --tile-glow: rgba(0,210,91,.24);    --tile-border: rgba(0,210,91,.45); }
.t-genie    { --tile-accent: #38bdf8; --tile-glow: rgba(56,189,248,.26);  --tile-border: rgba(56,189,248,.48); }
.t-deck     { --tile-accent: var(--accent); --tile-glow: var(--glow-1);   --tile-border: var(--accent-border); }
.t-iptv     { --tile-accent: #f472b6; --tile-glow: rgba(244,114,182,.24); --tile-border: rgba(244,114,182,.45); }
.t-bt       { --tile-accent: #60a5fa; --tile-glow: rgba(96,165,250,.24);  --tile-border: rgba(96,165,250,.45); }
.t-settings { --tile-accent: #cbd5e1; --tile-glow: rgba(203,213,225,.20); --tile-border: rgba(203,213,225,.38); }

/* Shared-Element Hero Container Transform: Selected Tile Scales Up to Full Stage & Morphs into Target UI */
.home-tile-board.launching .metro-tile,
.home-tile-board.launching .home-status-tile,
.home-tile-board.launching .home-power-tile {
  transform: scale(.94);
  opacity: .22;
}
.home-tile-board.launching .metro-tile.tile-active-launch {
  opacity: 0;
  transition: opacity .06s linear;
}
.tile-morph-layer {
  position: absolute; z-index: 90; pointer-events: none; overflow: hidden;
  border-radius: 18px;
  border: 1.5px solid var(--tile-accent, var(--accent));
  background: linear-gradient(155deg, var(--panel) 0%, var(--panel-2) 100%);
  box-shadow: 0 18px 54px rgba(0,0,0,.65), 0 0 42px var(--tile-glow, var(--glow-1)), inset 0 1px 0 rgba(255,255,255,.16);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transition:
    left .36s cubic-bezier(.18, .92, .24, 1),
    top .36s cubic-bezier(.18, .92, .24, 1),
    width .36s cubic-bezier(.18, .92, .24, 1),
    height .36s cubic-bezier(.18, .92, .24, 1),
    border-radius .36s cubic-bezier(.18, .92, .24, 1),
    opacity .22s ease;
  will-change: left, top, width, height, opacity;
}
.tile-morph-layer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 35%, var(--tile-glow, var(--glow-1)) 0%, transparent 72%);
}
.tile-morph-layer .tm-ico {
  font-size: 36px; line-height: 1; position: relative; z-index: 1;
  transition: transform .36s cubic-bezier(.18, .92, .24, 1), opacity .24s ease;
}
.tile-morph-layer .tm-ico.tm-img-wrap {
  width: 76px; height: 76px; border-radius: 19px; overflow: hidden;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.tile-morph-layer .tm-ico.tm-img-wrap.tm-contain {
  background: transparent; box-shadow: none; overflow: visible;
}
.tile-morph-layer .tm-ico.tm-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tile-morph-layer .tm-ico.tm-img-wrap.tm-contain img {
  object-fit: contain; filter: drop-shadow(0 10px 22px rgba(0,0,0,.55));
}
.tile-morph-layer .tm-title {
  font-size: 20px; font-weight: 900; color: var(--text); letter-spacing: -.01em;
  position: relative; z-index: 1;
  transition: transform .36s cubic-bezier(.18, .92, .24, 1), opacity .24s ease;
}
.tile-morph-layer.expanded .tm-ico { transform: scale(1.48); opacity: .94; }
.tile-morph-layer.expanded .tm-title { transform: scale(1.22); }
.tile-morph-layer.morph-fade { opacity: 0; }
.tile-morph-layer.morph-fade .tm-ico,
.tile-morph-layer.morph-fade .tm-title { opacity: 0; transform: scale(1.78); }

@keyframes tileViewEnter {
  0%   { opacity: 0; transform: scale(.94); }
  100% { opacity: 1; transform: scale(1); }
}
.view.active { animation: tileViewEnter .28s cubic-bezier(.2, .9, .26, 1); }

/* Post-Boot Staggered Home Tile Choreography: Top Row Down, Bottom Row Up, Power Panel Right-In */
.home-tile-board.boot-pre-enter .metro-tile:nth-child(-n+4) {
  opacity: 0; transform: translateY(-96px) scale(.92);
}
.home-tile-board.boot-pre-enter .metro-tile:nth-child(n+5) {
  opacity: 0; transform: translateY(96px) scale(.92);
}
.home-tile-board.boot-pre-enter .home-power-tile {
  opacity: 0; transform: translateX(150px) scale(.94);
}
@keyframes tileDropFromTop {
  0%   { opacity: 0; transform: translateY(-96px) scale(.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tileRiseFromBottom {
  0%   { opacity: 0; transform: translateY(96px) scale(.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes powerSlideFromRight {
  0%   { opacity: 0; transform: translateX(150px) scale(.94); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
.home-tile-board.boot-entering .metro-tile:nth-child(-n+4) {
  animation: tileDropFromTop .68s cubic-bezier(.16, 1.06, .3, 1) both;
}
.home-tile-board.boot-entering .metro-tile:nth-child(n+5) {
  animation: tileRiseFromBottom .68s cubic-bezier(.16, 1.06, .3, 1) both;
}
.home-tile-board.boot-entering .metro-tile:nth-child(1) { animation-delay: .05s; }
.home-tile-board.boot-entering .metro-tile:nth-child(2) { animation-delay: .12s; }
.home-tile-board.boot-entering .metro-tile:nth-child(3) { animation-delay: .19s; }
.home-tile-board.boot-entering .metro-tile:nth-child(4) { animation-delay: .26s; }
.home-tile-board.boot-entering .metro-tile:nth-child(5) { animation-delay: .09s; }
.home-tile-board.boot-entering .metro-tile:nth-child(6) { animation-delay: .16s; }
.home-tile-board.boot-entering .metro-tile:nth-child(7) { animation-delay: .23s; }
.home-tile-board.boot-entering .metro-tile:nth-child(8) { animation-delay: .30s; }
.home-tile-board.boot-entering .home-power-tile {
  animation: powerSlideFromRight .74s cubic-bezier(.16, 1.06, .3, 1) .24s both;
}

/* Live Boot Diagnostics Log Ticker inside Startup Splash */
.splash-log-feed {
  margin-top: 10px; width: 100%; max-width: 560px;
  background: rgba(6, 10, 16, .62);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px; padding: 8px 11px;
  display: flex; flex-direction: column; gap: 4px;
  font: 600 11.5px/1.35 ui-monospace, "Noto Sans CJK KR", monospace;
  backdrop-filter: blur(8px);
}
.s-log-line {
  display: flex; align-items: center; gap: 8px;
  color: rgba(235,244,255,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: logSlideIn .28s cubic-bezier(.22, 1, .36, 1) both;
}
.s-log-tag {
  flex: 0 0 44px; text-align: center; font-size: 10px; font-weight: 800;
  padding: 2px 5px; border-radius: 4px;
  background: rgba(255,255,255,.1); color: var(--splash-accent, #c8df6e);
}
.s-log-tag.ok { background: rgba(34,197,94,.2); color: #4ade80; }
.s-log-tag.chk { background: rgba(245,185,66,.2); color: #fbbf24; }
@keyframes logSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================= CUSTOM HI-FI THEME-SYNCED SCROLLBARS ================= */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-border) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .18);
  border-radius: 999px;
  margin: 4px 0;
}
[data-theme="silver"] ::-webkit-scrollbar-track { background: rgba(15, 23, 42, .08); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-border), var(--line));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active {
  background: var(--accent);
  border: 1.5px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }

/* TOP STATUS BAR (48px): Left=Home+DMZAudio | Center=Date & Time | Right=LAN/Wi-Fi/BT Icons */
.topbar {
  height: 48px; flex: 0 0 48px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
}
.tb-left, .tb-center, .tb-right { display: flex; align-items: center; gap: 8px; }
.tb-left { justify-content: flex-start; min-width: 0; overflow: hidden; }
.tb-center { justify-content: center; }
.tb-right { justify-content: flex-end; min-width: 0; }
.brand-dot {
  width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%;
  background: var(--muted); box-shadow: 0 0 8px rgba(128,128,128,.4);
}
.brand-dot.playing { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.brand-name {
  font-weight: 900; font-size: 15px; letter-spacing: .08em; color: var(--text);
  background: linear-gradient(90deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
}
[data-theme="mcintosh"] .brand-name { color: #2ef278; text-shadow: 0 0 10px rgba(46,242,120,.45); background: none; }
.tb-datetime {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.tb-date { font: 700 12px/1 ui-monospace, "Noto Sans CJK KR", sans-serif; color: var(--muted); letter-spacing: .03em; }
.tb-dt-sep { color: var(--line); font-size: 11px; }
.tb-datetime .clock { font: 800 14px/1 ui-monospace, monospace; color: var(--accent); letter-spacing: .04em; }
.source-pill {
  font: 700 11px/1 ui-monospace, monospace;
  padding: 4px 9px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent-border);
}
.demo-badge {
  font: 700 10px/1 ui-monospace, monospace;
  padding: 4px 8px; border-radius: 999px; cursor: pointer;
  background: var(--accent-dim); color: var(--cyan); border: 1px solid var(--accent-border);
  white-space: nowrap; transition: background .15s, transform .1s;
}
.demo-badge:hover { background: var(--panel-2); }
.demo-badge:active { transform: scale(.96); }
.demo-badge.live { color: #4ade80; border-color: rgba(74,222,128,.55); background: rgba(20,83,45,.32); }

.dac-badge {
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; display: flex; align-items: center; gap: 7px;
  color: var(--text); cursor: pointer;
}
.dac-badge:hover, .dac-badge:active { border-color: var(--accent); }
.tb-dac-pill {
  padding: 3px 10px; font-size: 11px; gap: 6px;
  white-space: nowrap; flex: 0 1 auto; min-width: 0; max-width: 300px; overflow: hidden;
}
.tb-dac-pill #dac-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 145px;
}
.tb-dac-pill .dac-rate { white-space: nowrap; flex: 0 0 auto; }
.style-pill-btn {
  font: 700 11px/1 inherit; padding: 4px 9px; border-radius: 999px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); cursor: pointer;
}
.style-pill-btn:hover { border-color: var(--accent); color: var(--accent); }
.player-top-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font: 800 11.5px/1 ui-monospace, "Noto Sans CJK KR", sans-serif; letter-spacing: .03em;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent-dim), rgba(255,255,255,.06));
  color: var(--accent); border: 1.5px solid var(--accent-border);
  box-shadow: 0 0 14px var(--glow-1), inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform .12s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.player-top-pill:hover {
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
}
.player-top-pill:active { transform: scale(.95); }
.player-top-pill .ptp-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px;
  background: currentColor; opacity: .65;
}
.player-top-pill.live {
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
  box-shadow: 0 0 18px var(--glow-1);
}
.player-top-pill.live .ptp-dot {
  opacity: 1; background: var(--accent-text);
  animation: splashPulse 1.1s ease-in-out infinite;
}
.net-chip, .bt-chip { cursor: pointer; }
.net-chip:hover, .bt-chip:hover { border-color: var(--accent); color: var(--text); }
.dac-chip {
  background: var(--amber); color: #12100a; font-weight: 800; font-size: 10px;
  padding: 2px 6px; border-radius: 4px; letter-spacing: .05em;
}
.dac-rate { font-family: ui-monospace, monospace; color: var(--accent); font-weight: 700; }
.sep { color: var(--muted); opacity: .5; }

.tb-vol-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font: 800 12px/1 ui-monospace, monospace; color: var(--accent);
  background: var(--panel); border: 1px solid var(--accent-border);
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; flex: 0 0 auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .10);
  transition: border-color .15s, background .15s, color .15s;
}
.tb-vol-chip:hover { border-color: var(--accent); background: var(--accent-dim); }
.tb-vol-chip.muted { color: var(--red); border-color: rgba(239, 68, 68, .52); background: rgba(239, 68, 68, .12); }
.net-chip, .bt-chip, .temp-chip, .fps-chip {
  font: 600 11px ui-monospace, monospace; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px;
}
.fps-chip { font-weight: 800; color: #4ade80; border-color: rgba(74,222,128,.35); min-width: 56px; text-align: center; }
.fps-chip.mid { color: #fbbf24; border-color: rgba(251,191,36,.42); }
.fps-chip.low { color: #f87171; border-color: rgba(248,113,113,.45); }
.clock { font: 700 15px ui-monospace, monospace; color: var(--text); min-width: 52px; text-align: right; }
.tb-icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-size: 14px; cursor: pointer; display: grid; place-items: center;
}
.tb-icon-btn.theme-btn { border-color: var(--accent-border); }
.tb-icon-btn.danger { color: var(--red); }
.tb-icon-btn:active { transform: scale(.94); }
.tb-power-btn {
  height: 32px; padding: 0 11px; border-radius: 9px;
  border: 1px solid rgba(239, 68, 68, .55);
  background: linear-gradient(145deg, rgba(239, 68, 68, .22), rgba(127, 29, 29, .34));
  color: #ff6b72; font-size: 12px; font-weight: 900; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  box-shadow: 0 2px 10px rgba(239, 68, 68, .22);
  transition: transform .12s ease, border-color .16s ease, background .16s ease;
}
.tb-power-btn:hover { border-color: #f87171; background: rgba(239, 68, 68, .34); color: #fff; }
.tb-power-btn:active { transform: scale(.94); }
[data-theme="silver"] .tb-power-btn { background: rgba(220, 38, 38, .12); color: #dc2626; }

/* Top-Right Compact LAN / Wi-Fi / BT Live Status Icon Capsule */
.tb-status-icons {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 4px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
}
.tb-st-ico {
  position: relative; width: 28px; height: 26px; border-radius: 7px;
  border: 0; background: transparent; color: var(--muted); opacity: .35;
  display: grid; place-items: center; cursor: pointer;
  transition: opacity .18s ease, color .18s ease, background .18s ease, transform .12s ease;
}
.tb-st-ico:hover { background: rgba(255,255,255,.08); opacity: .95; }
.tb-st-ico:active { transform: scale(.92); }
.tb-st-ico .st-dot {
  position: absolute; right: 3px; top: 3px;
  width: 5px; height: 5px; border-radius: 50%;
  background: transparent; transition: background .18s ease, box-shadow .18s ease;
}
.tb-st-ico.standby { opacity: .72; color: var(--text); }
.tb-st-ico.on { opacity: 1; color: var(--accent); }
.tb-st-ico.on .st-dot { background: #4ade80; box-shadow: 0 0 6px rgba(74, 222, 128, .85); }
#status-wifi.on { color: #38bdf8; }
#status-bt.standby { color: #93c5fd; opacity: .78; }
#status-bt.on { color: #3b9eff; filter: drop-shadow(0 0 6px rgba(59, 158, 255, .65)); }
#status-bt.on .st-dot { background: #38bdf8; box-shadow: 0 0 6px rgba(56, 189, 248, .9); }
.tb-st-ico.off { opacity: .25; color: var(--muted); }

/* Prominent Icon-Only Home Button */
.tb-home-btn {
  width: 36px; height: 34px; padding: 0; border-radius: 10px;
  border: 1.5px solid var(--accent-border);
  background: var(--accent-dim); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 12px var(--glow-1), inset 0 1px 0 rgba(255,255,255,.18);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease, box-shadow .16s ease;
}
.tb-home-btn.away {
  background: var(--accent); border-color: var(--accent); color: var(--accent-text);
  box-shadow: 0 0 18px var(--glow-1), 0 2px 8px rgba(0,0,0,.35);
}
.tb-home-btn:hover { transform: scale(1.06); border-color: var(--accent); box-shadow: 0 0 18px var(--glow-1); }
.tb-home-btn:active { transform: scale(.93); }
#brand-home-trigger { cursor: pointer; }

/* FULL-WIDTH WORKSPACE & STAGE (1300 x 552 -> 1560 x 720 Native) */
.workspace { flex: 1 1 auto; height: 552px; display: flex; overflow: hidden; }
.stage { flex: 1 1 auto; width: 1300px; height: 552px; padding: 16px 20px; overflow: hidden; position: relative; }
.view { display: none; width: 100%; height: 100%; }
.view.active { display: flex; }

/* ================= VIEW 1: NOW PLAYING (3D PHYSICAL HI-FI HARDWARE DECK) ================= */
.view-now { gap: 18px; align-items: stretch; }
.now-left {
  width: 468px; flex: 0 0 468px;
  height: var(--deck-h, 536px);
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 0;
  background: transparent; border: 0; box-shadow: none; overflow: visible;
}
.deck-3d-shell {
  position: relative;
  display: flex; flex-direction: column; gap: 0;
  padding: 10px 10px 9px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(155deg, #2d3543 0%, #181e27 36%, #0f1319 72%, #080b0f 100%);
  border-top: 1.5px solid rgba(255,255,255,.32);
  border-left: 1.5px solid rgba(255,255,255,.20);
  border-right: 2.5px solid rgba(0,0,0,.86);
  border-bottom: 6px solid #05070a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -2px 5px rgba(0,0,0,.75),
    0 12px 26px rgba(0,0,0,.62);
  transform: translateZ(0);
  contain: layout style paint;
}
.deck-3d-shell::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; z-index: 6;
  border-radius: inherit;
  background: linear-gradient(128deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,.02) 26%, transparent 52%, rgba(0,0,0,.22) 100%);
}
[data-theme="silver"] .deck-3d-shell {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 3px),
    linear-gradient(155deg, #eef2f7 0%, #cfd7e2 38%, #aeb8c6 76%, #8894a6 100%);
  border-top: 1.5px solid rgba(255,255,255,.92);
  border-left: 1.5px solid rgba(255,255,255,.72);
  border-right: 2.5px solid rgba(55,65,81,.65);
  border-bottom: 6px solid #4e5968;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -2px 4px rgba(30,41,59,.35),
    10px 16px 28px rgba(15,23,42,.34),
    3px 6px 10px rgba(15,23,42,.22);
}
.deck-3d-feet {
  height: 13px; flex: 0 0 auto;
  padding: 0 38px;
  display: flex; align-items: flex-start; justify-content: space-between;
  pointer-events: none;
  transform: rotateY(-4.2deg) translateZ(0);
  transform-origin: center top;
}
.deck-3d-feet .d-foot {
  width: 52px; height: 10px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #1b212a 0%, #586375 24%, #aeb9c9 46%, #394250 72%, #0e1218 100%);
  border-top: 1px solid rgba(0,0,0,.92);
  border-bottom: 2px solid #040507;
  box-shadow: 0 5px 10px rgba(0,0,0,.78), inset 0 -1px 0 rgba(255,255,255,.16);
}
[data-theme="silver"] .deck-3d-feet .d-foot {
  background: linear-gradient(90deg, #525d6d 0%, #aeb9c7 26%, #f1f5f9 48%, #7b8798 74%, #3d4654 100%);
  box-shadow: 0 5px 10px rgba(15,23,42,.42);
}
.art-frame {
  width: 444px; height: 333px; flex: 0 0 333px; border-radius: 10px 10px 0 0;
  background: #090b0f; border: 0;
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.88), inset 0 4px 12px rgba(0,0,0,.72);
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; justify-content: flex-start;
}
.art-glow {
  position: absolute; inset: -25%;
  background: radial-gradient(circle at 35% 30%, var(--glow-1), var(--glow-2) 45%, transparent 72%);
}
.art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.vinyl-disc {
  width: 248px; height: 248px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, #0d1014 0%, #1c222b 32%, #0e1217 48%, #222a35 50%, #0b0e12 72%, #1d242e 74%, #090c10 100%);
  border: 3px solid rgba(255,255,255,.15);
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
  display: grid; place-items: center;
  animation: spin 14s linear infinite; animation-play-state: paused;
}
.vinyl-disc.spinning { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.vinyl-label {
  width: 82px; height: 82px; border-radius: 50%;
  background: var(--vinyl-grad); color: var(--accent-text);
  font-weight: 900; font-size: 13px; letter-spacing: .08em;
  display: grid; place-items: center; border: 5px solid #0d1014;
}
.art-overlay-top {
  height: 44px; flex: 0 0 44px; padding: 0 12px;
  background: linear-gradient(180deg, #1b2028, #11151b);
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; align-items: center;
}
.art-source-tag {
  background: rgba(8,11,15,.8); color: #eef3f8;
  border: 1px solid rgba(255,255,255,.16); padding: 3px 9px; border-radius: 999px;
  font: 700 10.5px ui-monospace, monospace; letter-spacing: .06em;
}
.mini-pill-btn {
  background: var(--panel-2); color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.art-overlay-bottom {
  flex: 0 0 auto; min-height: 32px; margin: 0;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(180deg, #151a22, #0a0d12);
  border-top: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.52), inset 0 -1px 0 rgba(255,255,255,.08);
  padding: 0 12px; font: 600 11px ui-monospace, monospace; color: #b9c7d8;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.noise-pill {
  background: rgba(16,22,30,.9); color: var(--accent);
  border: 1px solid var(--accent-border); border-radius: 999px;
  padding: 3px 9px; font: 700 10.5px/1 inherit; cursor: pointer;
}
.noise-pill.off { color: var(--muted); border-color: var(--line); opacity: .7; }
.autoplay-pill {
  background: rgba(16,22,30,.9); color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  padding: 3px 9px; font: 700 10.5px/1 inherit; cursor: pointer;
  white-space: nowrap; transition: background .16s, border-color .16s, color .16s;
}
.autoplay-pill.is-random {
  background: var(--accent-dim); color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--glow-1);
}
.mini-pill-btn.autoplay-pill { padding: 4px 10px; font-size: 11px; }
#yt-results .media-item.is-playing {
  border-color: var(--accent);
  background: linear-gradient(155deg, var(--accent-dim), var(--panel-2));
  box-shadow: 0 0 16px var(--glow-1);
}
#yt-results .media-item.is-playing .play-badge { background: var(--accent); color: var(--accent-text); }

/* ================= 3 PHOTOREALISTIC HARDWARE MEDIA PLAYERS (LP / CASSETTE / CD) ================= */
/* Native 1:1 pixel geometry — ZERO CSS transform: scale() */
.media-stage {
  position: relative; z-index: 2; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}

/* ---------- Style A: Real Studio Photo LP Turntable + Real Spinning Vinyl + Chrome S-Tonearm ---------- */
.tt-plinth {
  width: 100%; height: 100%; border-radius: 0; position: relative; overflow: hidden;
  background: #14110f url("assets/lp-turntable.jpg?v=27") center / 100% 100% no-repeat;
  border: 0;
}
.tt-corner-led {
  position: absolute; left: 14.5%; top: 73.5%; width: 7.57%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 3;
  background: radial-gradient(circle, rgba(255,120,40,.9) 0%, rgba(255,80,20,.45) 45%, transparent 72%);
  mix-blend-mode: screen; opacity: .25; transition: opacity .35s;
}
.tt-corner-led.lit { opacity: 1; animation: strobeGlow 1.6s ease-in-out infinite alternate; }
@keyframes strobeGlow { from { opacity: .78; } to { opacity: 1; } }

.lp-platter {
  position: absolute; left: 40.50%; top: 49.00%; width: 57.30%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; z-index: 2;
  display: grid; place-items: center;
}
.lp-strobe-rim {
  position: absolute; inset: -3%; border-radius: 50%; pointer-events: none;
  border: 2.5px dashed rgba(255,255,255,.22);
  animation: spin 5.5s linear infinite; animation-play-state: paused;
}
.lp-strobe-rim.spinning { animation-play-state: running; border-color: rgba(255,190,120,.38); }
.lp-disc {
  width: 100%; height: 100%; border-radius: 50%; position: relative;
  background: #08090c url("assets/lp-vinyl.jpg?v=27") center / 100% 100% no-repeat;
  box-shadow: 0 4px 16px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.14);
  display: grid; place-items: center;
  animation: spin 9.5s linear infinite; animation-play-state: paused;
}
.lp-disc.spinning { animation-play-state: running; }
.lp-sheen {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 3;
  background: conic-gradient(from 25deg, transparent 0deg 42deg, rgba(255,255,255,.15) 66deg, transparent 94deg 222deg, rgba(255,255,255,.11) 246deg, transparent 278deg 360deg);
}
.lp-label {
  width: 35.38%; aspect-ratio: 1; border-radius: 50%; position: relative; overflow: hidden;
  background: var(--vinyl-grad); border: 3px solid #090b0f;
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22), inset 0 0 6px rgba(0,0,0,.45);
}
.lp-art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.lp-spindle {
  position: relative; width: 14.67%; aspect-ratio: 1; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle at 32% 32%, #ffffff, #94a3b8 62%, #1e293b);
  border: 1.5px solid #090c10; box-shadow: 0 1px 4px rgba(0,0,0,.75);
}
/* Precision Brushed-Chrome S-Tonearm Anchored at Real Gimbal Center (80.46%, 26.90%) */
.lp-tonearm {
  position: absolute; left: 80.46%; top: 26.90%; width: 0; height: 0; z-index: 5;
  transform-origin: 0 0;
  transform: rotate(10deg);
  transition: transform 0.85s cubic-bezier(.22,.85,.32,1);
  pointer-events: none;
}
.tonearm-svg {
  position: absolute; left: -39px; top: -58px; width: 85px; height: 297px; overflow: visible;
}
.arm-stylus-pin {
  position: absolute; left: -20px; top: 227px; width: 6px; height: 10px;
  background: #ffffff; border-radius: 0 0 3px 3px; transform: rotate(16deg);
  box-shadow: 0 0 7px var(--accent), 0 0 12px #ffffff;
  opacity: .55; transition: opacity .3s;
}
.arm-stylus-pin.tracking {
  opacity: 1;
  animation: stylusJitter 0.16s ease-in-out infinite alternate;
}
@keyframes stylusJitter {
  from { transform: rotate(16deg) translateX(-0.6px) translateY(0); }
  to   { transform: rotate(16deg) translateX(0.6px) translateY(0.5px); }
}

/* ---------- Shared Real-Photo Hardware Frame for Cassette & CD Players ---------- */
.deck-chassis {
  width: 100%; height: 100%; border-radius: 0; position: relative; overflow: hidden;
  border: 0;
}
.deck-top-strip {
  position: absolute; top: 5.2%; left: 10.5%; right: 10.5%; height: 22px; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 6px;
}
.deck-model {
  font: 800 8.5px ui-monospace, monospace; letter-spacing: .12em; color: rgba(236,243,252,.82);
  text-shadow: 0 1px 3px rgba(0,0,0,.85);
}
.deck-led-ind {
  font: 800 8.5px ui-monospace, monospace; color: rgba(148,163,184,.72);
  text-shadow: 0 1px 3px rgba(0,0,0,.85); transition: color .2s;
}
.deck-led-ind.lit { color: #4ade80; text-shadow: 0 0 9px rgba(74,222,128,.9); }
.deck-led-ind.cd-led.lit { color: #38bdf8; text-shadow: 0 0 9px rgba(56,189,248,.95); }
.deck-counter {
  font: 800 10px ui-monospace, monospace; color: var(--accent);
  background: rgba(4,7,11,.82); padding: 1.5px 6px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,.16);
}

/* ---------- Style B: Real Studio Photo Cassette Deck + Real Cassette Shell + Album Cover ---------- */
.cas-deck {
  background: #14171c url("assets/cassette-deck.jpg?v=27") center / 100% 100% no-repeat;
}
.cas-door-frame {
  position: absolute; left: 15.17%; top: 29.46%; width: 69.00%; height: 48.88%;
  border-radius: 3px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 6px 18px rgba(0,0,0,.92);
}
.cas-interior {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.cassette-shell {
  width: 86.2%; height: 105.6%; position: relative; border-radius: 6px;
  background: #0c0e11 url("assets/cassette-shell.jpg?v=27") center / 100% 100% no-repeat;
  box-shadow: 0 6px 18px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08);
  transform: translateY(2%);
}
.cas-cover-sticker {
  position: absolute; left: 10.6%; top: 10.4%; width: 78.8%; height: 25.8%;
  border-radius: 3px; overflow: hidden;
  border-top: 2px solid var(--accent); background: #141c27;
  display: flex; align-items: flex-end; padding: 3px 6px;
  box-shadow: inset 0 0 6px rgba(0,0,0,.45);
}
.cas-art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: .94; }
.cas-cover-grad {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, rgba(5,8,13,.84) 0%, rgba(5,8,13,.42) 60%, rgba(5,8,13,.15) 100%);
}
.cas-sticker-meta { position: relative; z-index: 3; min-width: 0; width: 100%; line-height: 1.1; }
.cas-side {
  display: inline-block; font: 800 6.5px ui-monospace, monospace;
  background: var(--accent); color: var(--accent-text); padding: 1px 4px; border-radius: 2px; margin-bottom: 1px;
}
.cas-title { font-size: 9.5px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.95); }
.cas-artist { font: 700 7px ui-monospace, monospace; color: #dbe6f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cas-reel-wrap {
  position: absolute; width: 14.55%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; overflow: visible;
}
.cas-reel-wrap.left  { left: 30.93%; top: 49.17%; }
.cas-reel-wrap.right { left: 68.89%; top: 48.90%; }
.cas-tape-pack {
  position: absolute; border-radius: 50%; z-index: 1; pointer-events: none;
  background: repeating-radial-gradient(circle, rgba(78,52,46,.72) 0 1.5px, rgba(28,17,14,.85) 1.5px 3px);
  width: 94%; height: 94%; max-width: 112%; max-height: 112%; transition: width .5s, height .5s;
}
.cas-reel {
  position: relative; z-index: 2; width: 78%; height: 78%; border-radius: 50%;
  background: radial-gradient(circle, #0a0c10 42%, #d8e0ea 46%, #94a3b8 72%, #334155 100%);
  border: 1.5px solid rgba(255,255,255,.35);
  display: grid; place-items: center;
  animation: spin 3.0s linear infinite; animation-play-state: paused;
}
.cas-reel.spinning { animation-play-state: running; }
.cas-reel i { position: absolute; width: 12%; height: 88%; background: #1e293b; border-radius: 1.5px; }
.cas-reel i:nth-child(2) { transform: rotate(60deg); }
.cas-reel i:nth-child(3) { transform: rotate(120deg); }

.cas-door-glare {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  background: linear-gradient(125deg,
    rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 26%,
    transparent 31%, transparent 72%, rgba(255,255,255,.08) 100%);
  box-shadow: inset 0 0 14px rgba(0,0,0,.55);
}

/* ---------- Style C: Real Studio Photo Top-Loading CD Transport + Spinning Album-Cover CD ---------- */
.cd-player-chassis {
  background: #10141b url("assets/cd-player.jpg?v=27") center / 100% 100% no-repeat;
}
.cd-left-oled {
  position: absolute; left: 3.5%; top: 18%; width: 21%; z-index: 6;
  background: rgba(5,9,15,.84); border: 1px solid rgba(148,163,184,.22); border-radius: 7px;
  padding: 7px 6px; display: flex; flex-direction: column; gap: 5px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.8);
}
.cd-left-oled .deck-model { font-size: 7.5px; letter-spacing: .06em; color: #cbd5e1; }
.cd-left-oled .deck-counter { font-size: 9px; text-align: center; padding: 2px 3px; }
.cd-lid-spec {
  font: 700 7.5px/1.35 ui-monospace, monospace; color: #94a3b8; letter-spacing: .06em;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 4px;
}
.cd-well {
  position: absolute; left: 64.33%; top: 52.46%; width: 49.46%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; z-index: 2;
  display: grid; place-items: center;
}
.cd-disc {
  width: 100%; height: 100%; border-radius: 50%; position: relative; overflow: hidden;
  background: radial-gradient(circle, #e2e8f0 0%, #cbd5e1 55%, #94a3b8 100%);
  border: 1.5px solid rgba(255,255,255,.68);
  box-shadow: 0 4px 16px rgba(0,0,0,.8);
  display: grid; place-items: center;
  animation: spin 4.2s linear infinite; animation-play-state: paused;
}
.cd-disc.spinning { animation-play-state: running; }
.cd-art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.cd-rainbow {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg,
    rgba(255,0,128,.22), rgba(0,220,255,.28), rgba(140,255,100,.18),
    rgba(255,220,0,.2), rgba(120,80,255,.26), rgba(0,240,255,.24), rgba(255,0,128,.22));
  mix-blend-mode: screen;
}
.cd-text-ring {
  position: absolute; bottom: 13px; font: 800 6.5px ui-monospace, monospace;
  color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.95);
  letter-spacing: .08em; z-index: 2;
}
.cd-inner-ring {
  width: 31.7%; aspect-ratio: 1; border-radius: 50%; z-index: 3;
  background: rgba(226,232,240,.22); border: 3px solid rgba(241,245,249,.7);
  display: grid; place-items: center;
}
.cd-clamp {
  width: 65.5%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #0a0d12 0 14%, #64748b 16%, #e2e8f0 38%, #475569 55%, #cbd5e1 75%, #1e293b 100%);
  border: 1.5px solid rgba(255,255,255,.55);
  box-shadow: 0 2px 8px rgba(0,0,0,.85);
}
.cd-sled-rail {
  position: absolute; left: 58%; top: 50%; width: 23%; height: 2.7%;
  transform: translateY(-50%); pointer-events: none; z-index: 4;
}
.cd-laser-head {
  position: absolute; top: -3px; left: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #38bdf8 45%, transparent 75%);
  box-shadow: 0 0 12px #38bdf8, 0 0 20px rgba(56,189,248,.65);
  opacity: .18; transition: left .6s ease, opacity .3s;
}
.cd-laser-head.active { opacity: 1; }
/* Translucent Smoked-Glass Half-Shroud Cover letting spinning album-cover CD peek out */
.cd-lid-shroud {
  position: absolute; left: 28.5%; top: 10.5%; bottom: 1%; width: 22.16%; z-index: 5;
  pointer-events: none;
  background: linear-gradient(96deg,
    rgba(12,17,24,.78) 0%, rgba(16,22,31,.58) 62%, rgba(255,255,255,.12) 96%, transparent 100%);
  border-right: 1.5px solid rgba(255,255,255,.22);
  box-shadow: 6px 0 18px rgba(0,0,0,.45);
}

/* Unified Views & Spacious 5-Tab Settings */
.view-stream-hub, .view-chart, .view-iptv, .view-settings { flex-direction: column; gap: 10px; min-height: 0; }
.sub-pane { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }

/* Native Melon / Genie TOP 100 Chart Player View */
.chart-search-inline {
  flex: 1 1 220px; max-width: 380px; display: flex; align-items: center; gap: 6px;
}
.chart-search-inline .search-input { height: 36px; font-size: 13px; padding: 0 12px; }
.chart-search-inline .act-btn { height: 36px; padding: 0 10px; flex: 0 0 auto; }
.chart-now-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: 14px; flex: 0 0 auto;
  background: linear-gradient(155deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  transition: border-color .22s ease, box-shadow .22s ease;
}
.chart-now-bar.live[data-chart-svc="melon"] {
  border-color: rgba(0, 210, 91, .68);
  box-shadow: 0 8px 24px var(--shadow), 0 0 22px rgba(0, 210, 91, .22), inset 0 1px 0 rgba(255,255,255,.12);
}
.chart-now-bar.live[data-chart-svc="genie"] {
  border-color: rgba(56, 189, 248, .68);
  box-shadow: 0 8px 24px var(--shadow), 0 0 22px rgba(56, 189, 248, .22), inset 0 1px 0 rgba(255,255,255,.12);
}
.chart-now-bar .cnb-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.chart-now-bar .cnb-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; background: var(--muted); opacity: .5; }
.chart-now-bar.live[data-chart-svc="melon"] .cnb-dot { background: #00d25b; opacity: 1; box-shadow: 0 0 10px rgba(0,210,91,.88); }
.chart-now-bar.live[data-chart-svc="genie"] .cnb-dot { background: #38bdf8; opacity: 1; box-shadow: 0 0 10px rgba(56,189,248,.88); }
.chart-now-bar .cnb-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.chart-now-bar .cnb-title { font-size: 15.5px; font-weight: 800; line-height: 1.4; padding: 1px 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-now-bar .cnb-meta { font-size: 12.5px; line-height: 1.38; padding: 1px 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-now-bar .cnb-acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

/* Spacious Full-Width Unclipped List Cards for YouTube, Melon & Genie (NEVER shrinks or clips text!) */
#yt-results.cards-scroll,
#chart-results.cards-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 10px;
  padding-bottom: 22px;
}
#yt-results .media-item,
#chart-results .media-item {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 86px;
  padding: 13px 18px;
  gap: 16px;
  align-items: center;
  border-radius: 15px;
  overflow: visible;
}
.chart-rank {
  width: 48px; flex: 0 0 48px; text-align: center; white-space: nowrap;
  font: 900 18px/1.25 ui-monospace, monospace; color: var(--muted);
}
.chart-rank.top3 { color: #fbbf24; font-size: 21px; }
#chart-results .media-thumb { width: 62px; height: 62px; flex: 0 0 62px; border-radius: 11px; }
#yt-results .media-thumb { width: 104px; height: 62px; flex: 0 0 104px; border-radius: 10px; }
#yt-results .media-info,
#chart-results .media-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  overflow: visible;
}
#yt-results .media-title,
#chart-results .media-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.38;
  color: var(--text);
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow: visible;
  text-overflow: unset;
}
#yt-results .media-meta,
#chart-results .media-meta {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.38;
  margin-top: 0;
  color: var(--muted);
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow: visible;
  text-overflow: unset;
}
#yt-results .play-badge,
#chart-results .play-badge {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 12px; font-size: 17px;
}
#chart-results .media-item.is-playing[data-chart-svc="melon"] {
  border-color: rgba(0, 210, 91, .78);
  background: linear-gradient(155deg, rgba(0, 210, 91, .14), var(--panel-2));
  box-shadow: 0 0 18px rgba(0, 210, 91, .2);
}
#chart-results .media-item.is-playing[data-chart-svc="melon"] .play-badge { background: #00d25b; color: #05140b; }
#chart-results .media-item.is-playing[data-chart-svc="genie"] {
  border-color: rgba(56, 189, 248, .78);
  background: linear-gradient(155deg, rgba(56, 189, 248, .14), var(--panel-2));
  box-shadow: 0 0 18px rgba(56, 189, 248, .2);
}
#chart-results .media-item.is-playing[data-chart-svc="genie"] .play-badge { background: #38bdf8; color: #041320; }
.q-chip.iptv { border-color: rgba(236,72,153,.55); color: #f472b6; }
[data-theme="silver"] .q-chip.iptv { color: #db2777; }

.settings-tabs-bar {
  display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 5px; flex: 0 0 auto;
}
.settings-tabs-bar .seg-btn { flex: 1; height: 36px; font-size: 13px; }
.set-tab-pane { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; }
.full-card { flex: 1; }
.wifi-list.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 8px; overflow-x: hidden; }

.style-settings-grid { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; overflow: hidden; }
.media-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ms-card {
  border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 12px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px;
}
.ms-card .ms-ico { font-size: 30px; line-height: 1; }
.ms-card b { font-size: 14px; }
.ms-card span { font-size: 11px; color: var(--muted); line-height: 1.35; }
.ms-card.active { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent); }
.ms-card.active b { color: var(--accent); }

.noise-ctrl-box {
  margin-top: auto; background: var(--input-bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.noise-ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.noise-lvl-btns { display: flex; gap: 6px; }
.noise-lvl-btns .vp-btn { padding: 0 12px; height: 32px; font-family: inherit; }
.noise-lvl-btns .vp-btn.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.theme-cards-list { display: flex; flex-direction: column; gap: 7px; flex: 1; justify-content: space-between; }
.theme-row-btn {
  flex: 1; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 6px 12px; cursor: pointer; display: flex; align-items: center; gap: 12px; text-align: left;
}
.theme-row-btn i { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 16px; }
.theme-row-btn b { display: block; font-size: 13px; }
.theme-row-btn span { display: block; font-size: 11px; color: var(--muted); }
.theme-row-btn.active { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent); }
.theme-row-btn.active b { color: var(--accent); }

/* 5-Style VU Meter Selector Tab */
.vu-settings-card { gap: 12px; }
.vu-live-preview-box {
  height: 152px; flex: 0 0 152px;
  background: var(--viz-bg); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 2px 14px rgba(0,0,0,.35);
}
#vu-preview-canvas { width: 100%; height: 100%; display: block; }
.vu-pick-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px; flex: 1; min-height: 0;
}
.yt-more-btn {
  flex: 0 0 auto; width: 100%; padding: 13px 18px; border-radius: 13px;
  border: 1.5px dashed var(--accent-border); background: var(--accent-dim);
  color: var(--accent); font: 800 14.5px/1.2 inherit; cursor: pointer;
  text-align: center; transition: background .15s, border-color .15s;
}
.yt-more-btn:hover { background: var(--panel-2); border-color: var(--accent); }
.yt-more-btn:disabled { opacity: .6; cursor: default; }
.vu-card {
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 8px 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px;
}
.vu-card b { font-size: 13px; font-weight: 800; }
.vu-card span { font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.vu-card.active { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent); }
.vu-card.active b { color: var(--accent); }

.now-center { flex: 1 1 auto; min-width: 0; height: var(--deck-h, 536px); display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 0; }
.track-header {
  min-height: 60px; padding: 0 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-width: 0; text-align: center;
}
.home-status-top { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; width: 100%; }
.home-status-top:has(.track-station-bar.hidden) { display: none; }
.track-station-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; max-width: 100%;
  font: 800 11.5px/1.25 ui-monospace, "Noto Sans CJK KR", sans-serif;
  color: var(--accent); letter-spacing: .03em;
}
.station-dot {
  width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--glow-1);
  animation: splashPulse 1.8s ease-in-out infinite;
}
.marquee-box {
  position: relative; width: 100%; overflow: hidden; white-space: nowrap; min-width: 0;
}
.track-header .marquee-box:not(.is-scrolling) { text-align: center; }
.track-header .marquee-box.is-scrolling { text-align: left; }
.marquee-box.is-scrolling {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
}
.marquee-inner {
  display: inline-block; white-space: nowrap; will-change: transform;
}
.marquee-box.is-scrolling .marquee-inner {
  padding-left: 4px;
  animation: hiFiMarquee var(--mq-dur, 12s) linear infinite;
}
@keyframes hiFiMarquee {
  0%, 14%   { transform: translateX(0); }
  86%, 100% { transform: translateX(calc(-1 * var(--mq-shift, 120px))); }
}
.track-title {
  font-size: 23px; font-weight: 900; line-height: 1.2; letter-spacing: -.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
[data-theme="silver"] .track-title { text-shadow: none; }
.track-sub { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.28; }

.viz-wrap {
  background: transparent; border: 0; border-radius: 0;
  flex: 1 1 auto; min-height: 196px; max-height: 244px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative; box-shadow: none;
  cursor: pointer;
  contain: layout style paint;
}
#viz-canvas { width: 100%; height: 100%; display: block; transform: translateZ(0); }

.progress-block { display: flex; flex-direction: column; gap: 4px; }
.progress-track { height: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; cursor: pointer; }
.progress-fill { height: 100%; width: 0%; background: var(--progress-grad); border-radius: 999px; transition: width .25s linear; }
.progress-times { display: flex; justify-content: space-between; align-items: center; font: 600 10.5px ui-monospace, monospace; color: var(--muted); }

/* Home Quick Feature Icon Launcher Dock — 3D Embossed Keycaps + Monochrome CNC-Engraved (음각) Icons */
.home-app-dock {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  flex: 0 0 auto; min-width: 0; padding: 0;
}
.home-ico-btn {
  width: 50px; height: 50px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 13px;
  background: linear-gradient(150deg, #3c475a 0%, #242d3d 54%, #131823 100%);
  color: rgba(6, 9, 14, .88); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, .64),
    0 2px 3px rgba(0, 0, 0, .82),
    inset 1.5px 1.5px 2px rgba(255, 255, 255, .28),
    inset -2px -2px 4px rgba(0, 0, 0, .58);
  transition: box-shadow .14s ease, transform .10s ease, border-color .14s ease, color .14s ease;
}
[data-theme="silver"] .home-ico-btn {
  border-color: rgba(15, 23, 42, .15);
  background: linear-gradient(150deg, #ffffff 0%, #e4ebf4 56%, #c7d3e2 100%);
  color: rgba(34, 44, 58, .76);
  box-shadow:
    0 5px 12px rgba(15, 23, 42, .22),
    0 2px 3px rgba(15, 23, 42, .18),
    inset 1.5px 1.5px 2px rgba(255, 255, 255, .96),
    inset -2px -2px 4px rgba(15, 23, 42, .14);
}
.home-ico-btn:hover {
  border-color: rgba(255, 255, 255, .30);
  box-shadow:
    0 7px 16px rgba(0, 0, 0, .68),
    inset 1.5px 1.5px 2px rgba(255, 255, 255, .36),
    inset -2px -2px 4px rgba(0, 0, 0, .52);
}
.home-ico-btn:active,
.home-ico-btn.is-active {
  transform: translateY(1.5px);
  border-color: rgba(255, 255, 255, .14);
  background: linear-gradient(145deg, #070a10 0%, #151c29 100%);
  color: rgba(210, 220, 234, .88);
  box-shadow:
    inset 3.5px 3.5px 8px rgba(0, 0, 0, .94),
    inset 1px 1px 2px rgba(0, 0, 0, .98),
    inset -2px -2px 5px rgba(255, 255, 255, .10),
    0 1px 0 rgba(255, 255, 255, .14);
}
[data-theme="silver"] .home-ico-btn:active,
[data-theme="silver"] .home-ico-btn.is-active {
  background: linear-gradient(145deg, rgba(15, 23, 42, .18) 0%, rgba(255, 255, 255, .48) 100%);
  border-color: rgba(15, 23, 42, .24);
  color: rgba(15, 23, 42, .92);
  box-shadow:
    inset 3px 3px 7px rgba(15, 23, 42, .36),
    inset -2px -2px 5px rgba(255, 255, 255, .86);
}
.home-ico-btn .hi-svg {
  width: 26px; height: 26px; display: block; pointer-events: none;
  filter:
    drop-shadow(0 1.2px 0 rgba(255, 255, 255, .36))
    drop-shadow(0 -1px 0 rgba(0, 0, 0, .92));
  transition: filter .14s ease, opacity .14s ease;
}
.home-ico-btn:active .hi-svg,
.home-ico-btn.is-active .hi-svg {
  filter:
    drop-shadow(0 -1px 0 rgba(0, 0, 0, .96))
    drop-shadow(0 1px 0 rgba(255, 255, 255, .20));
}
[data-theme="silver"] .home-ico-btn .hi-svg {
  filter:
    drop-shadow(0 1.2px 0 rgba(255, 255, 255, .96))
    drop-shadow(0 -1px 0 rgba(15, 23, 42, .45));
}
[data-theme="silver"] .home-ico-btn:active .hi-svg,
[data-theme="silver"] .home-ico-btn.is-active .hi-svg {
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, .88))
    drop-shadow(0 -1px 0 rgba(15, 23, 42, .52));
}

/* ================= INTEGRATED PHOTOREALISTIC PHYSICAL TRANSPORT BUTTON BAR ================= */
.transport-row { display: flex; align-items: center; justify-content: center; gap: 0; flex: 0 0 auto; }
.deck-transport {
  width: 444px; height: 82px; flex: 0 0 82px;
  border-radius: 0; border: 0;
  border-top: 1px solid rgba(0,0,0,.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  position: relative; overflow: hidden;
  background: #14171c url("assets/transport-lp.jpg?v=29") center / 100% 100% no-repeat;
}
[data-media-style="lp"] .deck-transport {
  background-image: url("assets/transport-lp.jpg?v=29");
  padding: 0 10.4%;
}
[data-media-style="cassette"] .deck-transport {
  background-image: url("assets/transport-cassette.jpg?v=29");
  padding: 0 3.2%;
}
[data-media-style="cd"] .deck-transport {
  background-image: url("assets/transport-cd.jpg?v=29");
  padding: 0 2.6%;
}
.transport-btns {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  align-items: center;
}
.ctl-btn.hw-key {
  width: 100%; height: 52px; border-radius: 4px;
  border: 0; background: transparent; cursor: pointer;
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding-top: 9px; gap: 1px;
  transition: transform .08s ease, background .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.ctl-btn.hw-key:hover {
  background: radial-gradient(circle at 50% 55%, rgba(255,255,255,.08), transparent 72%);
}
.ctl-btn.hw-key:active {
  transform: translateY(1.8px) scale(.97);
  background: rgba(0,0,0,.22);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.55);
}
/* Engraved Monochrome Metallic Transport Glyph & Micro Label (Zero Color Emoji!) */
.hw-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; line-height: 1; pointer-events: none;
  transition: color .18s, filter .18s;
}
.hw-glyph svg { display: block; width: 17px; height: 17px; }
.hw-glyph[data-state="play"] .ico-pause,
.hw-glyph[data-state="pause"] .ico-play { display: none; }
.hw-lbl {
  font: 800 7px/1 ui-monospace, monospace; letter-spacing: .12em; pointer-events: none;
  opacity: .84;
}
/* Bright Brushed Silver Aluminum Keycaps (LP Turntable) -> Deep CNC Debossed Engraving (음각) */
[data-media-style="lp"] .hw-glyph {
  color: rgba(16, 20, 26, .82);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .82)) drop-shadow(0 -1px 0 rgba(0, 0, 0, .45));
}
[data-media-style="lp"] .hw-lbl {
  color: rgba(20, 24, 30, .78);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .78), 0 -0.7px 0 rgba(0, 0, 0, .42);
}
/* Dark Brushed Gunmetal / Satin Black Keycaps (Cassette & CD) -> Engraved Monochrome Metal (음각) */
[data-media-style="cassette"] .hw-glyph,
[data-media-style="cd"] .hw-glyph {
  color: rgba(12, 16, 22, .86);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .34)) drop-shadow(0 -1px 0 rgba(0, 0, 0, .92));
}
[data-media-style="cassette"] .hw-lbl,
[data-media-style="cd"] .hw-lbl {
  color: rgba(168, 178, 192, .72);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .14), 0 -1px 1px rgba(0, 0, 0, .92);
}
/* Real Hardware LED Slit Glow aligned right over the photographed recessed LED slot */
.hw-led {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 3.5px; border-radius: 99px; pointer-events: none;
  background: transparent; transition: background .2s, box-shadow .2s;
}
[data-media-style="cassette"] .hw-led { top: 10px; width: 10px; height: 4px; }
[data-media-style="cd"] .hw-led { top: 11px; width: 16px; height: 3.5px; }

.ctl-btn.hw-key:active .hw-led {
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff, 0 0 14px var(--accent);
}
/* Active Playing LED Color per Real Hardware Device */
[data-media-style="lp"] .hw-led.lit-play {
  background: #ff7b29;
  box-shadow: 0 0 7px #ff6a00, 0 0 14px rgba(255,106,0,.9);
}
[data-media-style="cassette"] .hw-led.lit-play {
  background: #4ade80;
  box-shadow: 0 0 7px #22c55e, 0 0 14px rgba(74,222,128,.95);
}
[data-media-style="cd"] .hw-led.lit-play {
  background: #38bdf8;
  box-shadow: 0 0 7px #0ea5e9, 0 0 14px rgba(56,189,248,.95);
}
.hw-led.lit-stop {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444, 0 0 12px rgba(239,68,68,.75);
}

.quick-strip { display: flex; gap: 6px; }
.q-chip {
  height: 44px; padding: 0 13px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.q-chip.melon { border-color: rgba(0,205,60,.55); color: #16a34a; }
.q-chip.genie { border-color: rgba(0,168,255,.55); color: #0284c7; }
.q-chip.yt { border-color: rgba(239,83,80,.55); color: #dc2626; }
.q-chip.radio { border-color: rgba(245,185,66,.6); color: #d97706; }
:not([data-theme="silver"]) .q-chip.melon { color: #5ef286; }
:not([data-theme="silver"]) .q-chip.genie { color: #67cbff; }
:not([data-theme="silver"]) .q-chip.yt { color: #ff8a80; }
:not([data-theme="silver"]) .q-chip.radio { color: #ffd166; }

/* Right Volume & Receiver Column */
.now-right { width: 248px; flex: 0 0 248px; display: flex; flex-direction: column; gap: 10px; }
.vol-card {
  flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; display: flex; flex-direction: column; justify-content: space-between;
}
.vol-top { display: flex; justify-content: space-between; align-items: center; }
.vol-label { font: 700 11px ui-monospace, monospace; color: var(--muted); letter-spacing: .08em; }
.amp-tag {
  font: 700 10px ui-monospace, monospace; color: var(--amber);
  background: var(--accent-dim); border: 1px solid var(--line); padding: 2px 6px; border-radius: 5px;
}
.vol-readout { text-align: center; line-height: 1; margin: 2px 0; }
.vol-num { font: 800 50px ui-monospace, monospace; color: var(--accent); letter-spacing: -.03em; }
.vol-unit { font-size: 18px; color: var(--muted); margin-left: 2px; }
.vol-slider { width: 100%; height: 28px; accent-color: var(--accent); cursor: pointer; }
.vol-step-row { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 6px; }
.v-btn {
  height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer;
}
.v-btn.muted { background: rgba(239,83,80,.2); border-color: var(--red); color: var(--red); }
.vol-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.vp-btn {
  height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--input-bg); color: var(--muted); font: 700 11px ui-monospace, monospace; cursor: pointer;
}

.rx-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px;
}
.rx-row { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.rx-row b { margin-left: auto; color: var(--text); font-weight: 700; }
.rx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.rx-dot.on { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.6); }

/* ================= VIEW 2 & 3: YOUTUBE & RADIO ================= */
.view-youtube, .view-radio { flex-direction: column; gap: 10px; }
.search-bar-row { display: flex; gap: 8px; }
.search-input {
  flex: 1; height: 44px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--input-bg); color: var(--text);
  padding: 0 14px; font-size: 15px; outline: none;
}
.search-input:focus { border-color: var(--accent); }
.act-btn {
  height: 44px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.act-btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.act-btn.accent-red { background: rgba(239,83,80,.18); border-color: var(--red); color: var(--red); }

.chip-row { display: flex; align-items: center; gap: 7px; overflow-x: auto; overflow-y: hidden; flex: 0 0 auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-label { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.tag-chip {
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tag-chip:active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.tag-chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 800; box-shadow: 0 0 10px var(--glow-1); }

.cards-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  align-content: start; padding-right: 8px; padding-bottom: 18px; scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
}
.media-item {
  min-width: 0; max-width: 100%; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
  padding: 10px 12px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.media-item:hover, .media-item:active { border-color: var(--accent); background: var(--panel-2); }
.media-thumb {
  width: 72px; height: 54px; border-radius: 8px; flex: 0 0 72px;
  background: var(--panel-2); object-fit: cover; display: grid; place-items: center;
  font-size: 20px; color: var(--accent); overflow: hidden;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-info { flex: 1; min-width: 0; }
.media-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-meta { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-badge {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  background: var(--accent-dim); color: var(--accent);
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.empty-hint { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); font-size: 15px; }

/* ================= VIEW 4: STREAMING SERVICES ================= */
.view-stream { align-items: stretch; }
.stream-grid { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.svc-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer; position: relative; overflow: hidden;
}
.svc-card.melon-card { border-color: rgba(0,205,60,.45); box-shadow: inset 0 40px 80px -50px rgba(0,205,60,.25); }
.svc-card.genie-card { border-color: rgba(0,168,255,.45); box-shadow: inset 0 40px 80px -50px rgba(0,168,255,.25); }
.svc-card.ytm-card { border-color: rgba(239,83,80,.45); box-shadow: inset 0 40px 80px -50px rgba(239,83,80,.25); }
.svc-card.rx-big-card { cursor: default; box-shadow: inset 0 40px 80px -50px var(--glow-1); }
.svc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.svc-app-ico {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover; display: block;
  box-shadow: 0 5px 14px rgba(0,0,0,.38);
}
.svc-app-ico.svc-ico-contain { object-fit: contain; box-shadow: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.svc-badge { font: 700 11px ui-monospace, monospace; color: var(--accent); letter-spacing: .08em; }
.svc-title { font-size: 21px; font-weight: 800; margin: 8px 0; }
.svc-desc { font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1; }
.svc-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.svc-go { font-weight: 800; color: var(--text); }
.svc-actions { display: flex; gap: 8px; margin-top: 10px; }
.svc-actions .act-btn { flex: 1; height: 40px; padding: 0 8px; font-size: 13px; }

/* ================= VIEW 5: SETTINGS + 5-THEME PICKER ================= */
.view-settings { align-items: stretch; }
.settings-grid { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1.15fr; gap: 14px; }
.set-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; overflow: hidden;
}
.set-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.set-head h3 { margin: 0; font-size: 15px; }
.seg-tabs { display: flex; gap: 6px; background: var(--input-bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg-btn {
  height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(155deg, rgba(44, 54, 72, .55) 0%, rgba(16, 22, 32, .72) 100%);
  color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer;
  box-shadow: 0 3px 7px rgba(0, 0, 0, .38), inset 1px 1px 1px rgba(255, 255, 255, .14);
  transition: background .14s, color .14s, box-shadow .14s, transform .10s;
}
.seg-btn.active {
  transform: translateY(1px);
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, .42), inset -1px -1px 2px rgba(255, 255, 255, .24);
}
[data-theme="silver"] .seg-btn {
  background: linear-gradient(155deg, #ffffff 0%, #e2e8f0 100%);
  border-color: rgba(15, 23, 42, .10);
  box-shadow: 0 2px 5px rgba(15, 23, 42, .14), inset 1px 1px 1px #ffffff;
}
[data-theme="silver"] .seg-btn.active {
  background: var(--accent); color: var(--accent-text);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .28);
}
.head-acts { display: flex; gap: 6px; }
.conn-pane { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.set-info-row { display: flex; gap: 8px; align-items: center; }
.set-info-row .set-info { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-ldac-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: 12px; flex: 0 0 auto;
  background: linear-gradient(155deg, var(--panel-2) 0%, var(--input-bg) 100%);
  border: 1px solid var(--line);
}
.bt-ldac-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.bt-codec-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; flex: 0 0 auto;
  font: 800 11.5px/1.2 ui-monospace, monospace; letter-spacing: .04em;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.bt-codec-pill.is-ldac {
  background: linear-gradient(135deg, rgba(245,185,66,.22), rgba(200,223,110,.16));
  color: #fbbf24; border-color: rgba(245,185,66,.75);
  box-shadow: 0 0 12px rgba(245,185,66,.25);
}
[data-theme="silver"] .bt-codec-pill.is-ldac { color: #b45309; background: rgba(245,185,66,.18); border-color: rgba(180,83,9,.55); }
.bt-codec-pill.is-hires {
  background: var(--accent-dim); color: var(--accent); border-color: var(--accent-border);
}
.bt-ldac-hint {
  font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ldac-mode-group { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.ldac-btn {
  height: 30px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  font: 800 11.5px/1 ui-monospace, monospace; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.ldac-btn:hover { border-color: var(--accent-border); color: var(--text); }
.ldac-btn.active {
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
  box-shadow: 0 0 10px var(--glow-1);
}
.mini-btn { height: 34px !important; padding: 0 10px !important; font-size: 11px !important; white-space: nowrap; }
.mini-btn.off { opacity: .55; }
.set-info {
  font: 600 12px ui-monospace, monospace; color: var(--cyan);
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px;
}
.wifi-list { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 7px; padding-right: 6px; scrollbar-gutter: stable; }
.wifi-row {
  min-width: 0; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.wifi-row.connected { border-color: var(--accent); background: var(--accent-dim); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.row-acts { display: flex; gap: 5px; flex: 0 0 auto; }
.row-btn {
  height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 11px; font-weight: 700; cursor: pointer;
}
.row-btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.row-btn.danger { border-color: var(--red); color: var(--red); }
.pass-row { display: flex; gap: 6px; }
.pass-row .search-input { flex: 1; }

/* Carrier IPTV Selector (KT / SKB / LG U+) */
.isp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.isp-btn {
  height: 58px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.isp-btn b { font-size: 14px; font-weight: 800; }
.isp-btn span { font-size: 11px; color: var(--muted); }
.isp-btn.active { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent); }
.isp-btn.active b { color: var(--accent); }
.iptv-banner {
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  padding: 9px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700;
}

/* Bluetooth A2DP Source Audio Output Strip */
.sink-strip {
  display: flex; align-items: center; gap: 6px;
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px;
}
.sink-lbl { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sink-chips { display: flex; gap: 5px; overflow-x: auto; flex: 1; }
.sink-chip {
  height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.sink-chip.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* ================= ANALOG FM RECEIVER + INTERNET RADIO DUAL DIGITAL VU ================= */
.radio-head-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; }
.radio-list-pane {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: 168px minmax(0, 1fr) 168px; gap: 16px;
  align-items: stretch; overflow: hidden;
}
.inet-vu-panel {
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #06090f 0%, #0a1019 52%, #05080d 100%);
  border: 1.5px solid var(--line);
  box-shadow: inset 0 6px 24px rgba(0,0,0,.78), 0 6px 18px var(--shadow);
  display: flex; align-items: stretch; justify-content: stretch;
}
[data-theme="silver"] .inet-vu-panel {
  background: linear-gradient(180deg, #111720 0%, #161f2b 52%, #0d1219 100%);
  border-color: #8c98a9;
}
.inet-vu-panel canvas { width: 100%; height: 100%; display: block; }
.inet-radio-center {
  min-width: 0; min-height: 0; height: 100%;
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.inet-now-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
}
.inet-now-bar.live { border-color: var(--accent-border); box-shadow: 0 6px 20px var(--shadow), 0 0 18px var(--glow-1); }
.inet-live-dot {
  width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%;
  background: var(--muted); opacity: .5;
}
.inet-live-dot.live {
  background: #4ade80; opacity: 1;
  box-shadow: 0 0 10px rgba(74, 222, 128, .9);
  animation: splashPulse 1.6s ease-in-out infinite;
}
.inet-now-info { flex: 1 1 auto; min-width: 0; }
.inet-now-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inet-now-meta {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inet-now-acts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.media-item.is-playing {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 18px var(--shadow);
}
.media-item.is-playing .play-badge {
  background: var(--accent); color: var(--accent-text);
}
/* Crisp unclipped single-column station list inside Internet Radio center pane */
#radio-results.cards-scroll {
  grid-template-columns: 1fr;
  gap: 8px;
  padding-bottom: 12px;
  scroll-snap-type: y proximity;
}
#radio-results .media-item {
  padding: 9px 14px;
  gap: 12px;
  min-height: 54px;
  scroll-snap-align: start;
}
#radio-results .media-thumb {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%; font-size: 16px;
}
#radio-results .media-info {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-width: 0;
}
#radio-results .media-title {
  flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.25;
}
#radio-results .media-meta {
  flex: 0 0 auto; margin-top: 0; font-size: 12px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  max-width: 44%;
}
[data-theme="silver"] #radio-results .media-meta { background: rgba(15,23,42,.05); }
#radio-results .play-badge {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px; font-size: 14px;
}
.tuner-shell { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }

.radio-receiver-face {
  flex: 0 0 212px; height: 212px;
  display: grid; grid-template-columns: 348px 1fr 348px; gap: 12px;
  align-items: stretch;
}
.radio-vu-box {
  height: 212px; border-radius: 16px; overflow: hidden;
  background: #06080c; cursor: pointer; user-select: none;
  border: 1px solid var(--line);
  box-shadow: inset 0 4px 18px rgba(0,0,0,.65), 0 6px 18px var(--shadow);
}
.radio-vu-box canvas { width: 100%; height: 100%; display: block; }

.radio-channel-window {
  height: 212px; border-radius: 16px;
  background: linear-gradient(180deg, #070b10 0%, #0b1118 52%, #05080c 100%);
  border: 2px solid var(--line);
  padding: 10px 14px 8px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
  box-shadow: inset 0 8px 26px rgba(0,0,0,.82), inset 0 1px 0 rgba(255,255,255,.12), 0 6px 20px var(--shadow);
}
.radio-channel-window::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(155deg, rgba(255,255,255,.075) 0%, rgba(255,255,255,.015) 36%, transparent 39%);
}
[data-theme="silver"] .radio-channel-window {
  background: linear-gradient(180deg, #10161e 0%, #151e28 55%, #0c1117 100%);
  border-color: #8c98a9;
}
.ch-win-top { display: flex; align-items: center; gap: 6px; z-index: 1; }
.ch-band-tag {
  font: 800 10px/1 ui-monospace, monospace; letter-spacing: .12em;
  padding: 4px 7px; border-radius: 5px;
  background: rgba(255,255,255,.06); color: #9fb0c4; border: 1px solid rgba(255,255,255,.12);
}
.ch-sig-row { margin-left: auto; width: 142px; gap: 5px; }
.ch-win-8digit {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  z-index: 1; margin: 2px 0;
}
#radio-8digit-canvas { width: 100%; height: 82px; display: block; }
.ch-win-bot {
  z-index: 1; border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 5px; text-align: center;
}
.radio-channel-window .tuner-station {
  font-size: 14px; font-weight: 800; color: #e8f1fb;
  letter-spacing: .01em; text-shadow: 0 0 10px rgba(255,255,255,.18);
}

.dial-glass {
  height: 62px; flex: 0 0 62px;
  background: #090b0e;
  border: 1.5px solid rgba(0, 0, 0, .82);
  border-bottom-color: rgba(255, 255, 255, .18);
  border-right-color: rgba(255, 255, 255, .14);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: ew-resize;
  box-shadow:
    inset 0 6px 18px rgba(0, 0, 0, .88),
    inset 4px 0 12px rgba(0, 0, 0, .65),
    inset -2px -2px 6px rgba(255, 255, 255, .06),
    0 2px 0 rgba(255, 255, 255, .09);
}
[data-theme="silver"] .dial-glass {
  border-color: rgba(15, 23, 42, .38);
  border-bottom-color: rgba(255, 255, 255, .95);
  border-right-color: rgba(255, 255, 255, .88);
  box-shadow:
    inset 0 5px 14px rgba(15, 23, 42, .36),
    inset 3px 0 8px rgba(15, 23, 42, .22),
    0 2px 0 rgba(255, 255, 255, .92);
}
#fm-dial-canvas { width: 100%; height: 100%; display: block; }

.tuner-deck {
  flex: 1 1 auto;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1.5px solid var(--line); border-radius: 16px;
  padding: 10px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 24px var(--shadow);
}
.fm-lamp {
  font: 800 10px/1 ui-monospace, monospace;
  padding: 4px 7px; border-radius: 5px;
  background: rgba(255,255,255,.05); color: #7e8fa4; border: 1px solid rgba(255,255,255,.12); opacity: .45;
}
.fm-lamp.lit { opacity: 1; background: rgba(239,83,80,.24); border-color: #ef5350; color: #ff7070; box-shadow: 0 0 10px rgba(239,83,80,.5); }
.fm-lamp.lit-green { opacity: 1; background: rgba(34,197,94,.22); border-color: #22c55e; color: #4ade80; box-shadow: 0 0 10px rgba(34,197,94,.5); }

.tuner-station { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-row { display: flex; align-items: center; gap: 6px; }
.sig-lbl, .sig-pct { font: 700 10px ui-monospace, monospace; color: #8da0b8; }
.sig-bar { flex: 1; height: 7px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 99px; overflow: hidden; }
.sig-bar > i { display: block; height: 100%; background: var(--progress-grad); transition: width .12s ease; }

.tuner-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.seek-row { display: grid; grid-template-columns: 1fr 0.85fr 1.35fr 0.85fr 1fr; gap: 8px; }
.seek-row .act-btn.btn-3d {
  height: 38px; padding: 0 10px; border-radius: 10px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .03em;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #2d3748 0%, #1c2432 52%, #131922 100%);
  border: 1px solid rgba(255,255,255,.16);
  border-top-color: rgba(255,255,255,.28);
  border-bottom: 3px solid #06090f;
  color: #eef4fb;
  box-shadow: 0 4px 0 #070a10, 0 7px 14px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .08s ease, box-shadow .08s ease, border-color .15s ease, background .15s ease;
}
.seek-row .act-btn.btn-3d:hover {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #374357 0%, #232d3e 52%, #171f2b 100%);
}
.seek-row .act-btn.btn-3d:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #070a10, 0 2px 6px rgba(0,0,0,.45), inset 0 2px 6px rgba(0,0,0,.55);
}
[data-theme="silver"] .seek-row .act-btn.btn-3d {
  background: linear-gradient(180deg, #ffffff 0%, #e4e9f0 55%, #cfd7e2 100%);
  border-color: rgba(15,23,42,.18); border-top-color: #ffffff; border-bottom: 3px solid #8c98a8;
  color: #18202a;
  box-shadow: 0 4px 0 #9aa6b6, 0 6px 12px rgba(15,23,42,.16), inset 0 1px 0 #ffffff;
}
.seek-row .act-btn.btn-mem {
  position: relative;
  border-color: rgba(245,185,66,.42);
  color: #fde68a;
}
[data-theme="silver"] .seek-row .act-btn.btn-mem { color: #b45309; border-color: rgba(217,119,6,.45); }
.mem-led {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px;
  background: rgba(148,163,184,.35); border: 1px solid rgba(0,0,0,.45);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.6);
  transition: background .16s ease, box-shadow .16s ease;
}
.seek-row .act-btn.btn-mem.armed {
  background: linear-gradient(180deg, #d97706 0%, #b45309 55%, #78350f 100%);
  border-color: #fcd34d; border-bottom-color: #451a03; color: #ffffff;
  box-shadow: 0 4px 0 #451a03, 0 0 20px rgba(245,158,11,.55), inset 0 1px 0 rgba(255,255,255,.35);
}
.seek-row .act-btn.btn-mem.armed .mem-led {
  background: #fef08a; box-shadow: 0 0 10px #fde047, 0 0 18px #f59e0b;
  animation: splashPulse .75s ease-in-out infinite;
}

/* 8-Channel Machined 3D Hardware Preset Bank */
.preset-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; }
.fm-preset {
  position: relative; height: 54px; border-radius: 11px;
  background: linear-gradient(180deg, #273140 0%, #19212d 54%, #11161f 100%);
  border: 1px solid rgba(255,255,255,.15);
  border-top-color: rgba(255,255,255,.26);
  border-bottom: 3px solid #06090e;
  color: var(--text); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 7px 6px 4px;
  box-shadow: 0 4px 0 #070a10, 0 7px 14px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .08s ease, box-shadow .1s ease, border-color .16s ease, background .16s ease;
}
.fm-preset:hover {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #323e52 0%, #202a38 54%, #151c27 100%);
}
.fm-preset:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #070a10, 0 2px 6px rgba(0,0,0,.45), inset 0 2px 6px rgba(0,0,0,.55);
}
[data-theme="silver"] .fm-preset {
  background: linear-gradient(180deg, #ffffff 0%, #e5eaf1 55%, #d1d9e4 100%);
  border-color: rgba(15,23,42,.18); border-top-color: #ffffff; border-bottom: 3px solid #8c98a8;
  box-shadow: 0 4px 0 #9aa6b6, 0 6px 12px rgba(15,23,42,.16), inset 0 1px 0 #ffffff;
}
.fp-led {
  position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3.5px; border-radius: 99px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.08);
  transition: background .18s ease, box-shadow .18s ease;
}
.fp-slot {
  position: absolute; top: 4px; left: 7px;
  font: 800 9px/1 ui-monospace, monospace; color: var(--muted); opacity: .78;
}
.fm-preset b { font: 800 13px/1.1 ui-monospace, monospace; color: var(--text); margin-top: 5px; }
.fm-preset span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fm-preset.active {
  border-color: var(--accent);
  border-top-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-dim) 0%, #18222d 56%, #101720 100%);
  box-shadow: 0 4px 0 #070a10, 0 0 18px var(--glow-1), inset 0 1px 0 rgba(255,255,255,.28);
}
[data-theme="silver"] .fm-preset.active {
  background: linear-gradient(180deg, #fff4eb 0%, #fde6d4 56%, #f5d4bc 100%);
}
.fm-preset.active b { color: var(--accent); }
.fm-preset.active .fp-led {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 14px var(--glow-1);
}
.preset-row.mem-armed .fm-preset {
  border-color: rgba(251,191,36,.78);
  box-shadow: 0 4px 0 #451a03, 0 0 16px rgba(245,158,11,.36), inset 0 1px 0 rgba(255,255,255,.26);
}
.preset-row.mem-armed .fm-preset .fp-led {
  background: #fbbf24;
  box-shadow: 0 0 9px #f59e0b;
  animation: splashPulse .85s ease-in-out infinite;
}
.fm-preset.just-saved {
  border-color: #4ade80 !important;
  box-shadow: 0 4px 0 #064e3b, 0 0 24px rgba(74,222,128,.75) !important;
}
.fm-preset.just-saved .fp-led {
  background: #4ade80 !important;
  box-shadow: 0 0 12px #22c55e !important;
}

.knob-zone {
  width: 96px; flex: 0 0 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-left: 1px solid var(--line); padding-left: 10px;
}
.tuning-knob {
  width: 68px; height: 68px; border-radius: 50%;
  position: relative; padding: 3px;
  background: radial-gradient(circle at 32% 28%, #04060a 0%, #0a0e14 68%, #1c2430 100%);
  border: 1.5px solid rgba(0, 0, 0, .82);
  border-right-color: rgba(255, 255, 255, .20);
  border-bottom-color: rgba(255, 255, 255, .24);
  box-shadow:
    inset 3px 4px 9px rgba(0, 0, 0, .92),
    inset -2px -2px 5px rgba(255, 255, 255, .10),
    0 8px 20px rgba(0, 0, 0, .65),
    0 1px 0 rgba(255, 255, 255, .14);
  cursor: grab; touch-action: none;
  display: grid; place-items: center;
}
.tuning-knob:active { cursor: grabbing; }
.knob-cap {
  width: 100%; height: 100%; border-radius: 50%;
  background: url("assets/tuning-knob-dark.png?v=73") center / 100% 100% no-repeat;
  border: 0; position: relative;
  display: grid; place-items: center;
  will-change: transform;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.62));
}
[data-theme="silver"] .knob-cap {
  background-image: url("assets/tuning-knob-silver.png?v=73");
}
[data-theme="silver"] .tuning-knob {
  background: radial-gradient(circle at 32% 28%, #9aa5b4 0%, #c6cfdb 68%, #eef2f7 100%);
  border-color: rgba(15, 23, 42, .35);
  border-right-color: rgba(255, 255, 255, .95);
  border-bottom-color: rgba(255, 255, 255, .98);
  box-shadow:
    inset 3px 4px 8px rgba(15, 23, 42, .36),
    inset -2px -2px 5px rgba(255, 255, 255, .85),
    0 6px 14px rgba(15, 23, 42, .20);
}
.knob-gloss {
  position: absolute; inset: 3px; border-radius: 50%; pointer-events: none; z-index: 3;
  background: url("assets/tuning-knob-gloss.png?v=73") center / 100% 100% no-repeat;
}
.knob-dimple { display: none; }
.knob-lbl { font: 800 9.5px ui-monospace, monospace; color: var(--muted); letter-spacing: .16em; text-shadow: 0 1px 0 rgba(0,0,0,.5); }

/* Monochrome Vector Control-Panel Tab & Card Icons */
.settings-tabs-bar .seg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.set-tab-ico, .set-inline-ico {
  flex: 0 0 auto; color: currentColor; opacity: .88;
}
.settings-tabs-bar .seg-btn.active .set-tab-ico { opacity: 1; }
#view-settings .mini-pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
}
#view-settings .ms-ico {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); transition: color .16s ease;
}
#view-settings .ms-card.active .ms-ico { color: var(--accent); }
#view-settings .sink-chip {
  display: inline-flex; align-items: center; gap: 6px;
}
.set-group { display: flex; flex-direction: column; gap: 5px; }
.set-lbl { font-size: 11px; color: var(--muted); font-weight: 700; }

.theme-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.theme-chip {
  height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text);
  font-size: 12px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 4px;
}
.theme-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 10px; }
.theme-chip.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.btn-row { display: flex; gap: 6px; }
.opt-btn {
  flex: 1; height: 36px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 11.5px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.opt-btn.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.opt-btn.warn { border-color: var(--amber); color: var(--amber); }
.opt-btn.danger { border-color: var(--red); color: var(--red); }
.small-muted { font-size: 12px; color: var(--muted); }
.pw-modal-box { width: 540px; gap: 12px; }
.pw-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pw-head-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pw-big-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pw-big-btn {
  height: 142px; border-radius: 16px; border: 1.5px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; color: var(--text);
  transition: transform .15s ease, border-color .18s ease, box-shadow .18s ease;
}
.pw-big-btn:active { transform: scale(.96); }
.pw-big-ico {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
}
.pw-big-lbl { font-size: 19px; font-weight: 900; letter-spacing: -.01em; }
.pw-big-sub { font: 800 10.5px/1 ui-monospace, monospace; letter-spacing: .12em; opacity: .78; }
.pw-big-btn.off {
  background: linear-gradient(155deg, rgba(239, 68, 68, .22), rgba(127, 29, 29, .36));
  border-color: rgba(239, 68, 68, .62);
}
.pw-big-btn.off .pw-big-ico {
  color: #ff6b72; background: rgba(239, 68, 68, .18);
  border: 1.5px solid rgba(239, 68, 68, .55);
  box-shadow: 0 6px 20px rgba(239, 68, 68, .3);
}
.pw-big-btn.off:hover { border-color: #f87171; box-shadow: 0 10px 28px rgba(239, 68, 68, .32); transform: translateY(-2px); }
.pw-big-btn.reboot {
  background: linear-gradient(155deg, rgba(245, 158, 11, .20), rgba(14, 116, 144, .28));
  border-color: rgba(245, 185, 66, .58);
}
.pw-big-btn.reboot .pw-big-ico {
  color: #fbbf24; background: rgba(245, 185, 66, .16);
  border: 1.5px solid rgba(245, 185, 66, .52);
  box-shadow: 0 6px 20px rgba(245, 185, 66, .26);
}
.pw-big-btn.reboot:hover { border-color: #fcd34d; box-shadow: 0 10px 28px rgba(245, 185, 66, .28); transform: translateY(-2px); }
[data-theme="silver"] .pw-big-btn.off { color: #b91c1c; background: rgba(220, 38, 38, .1); }
[data-theme="silver"] .pw-big-btn.reboot { color: #b45309; background: rgba(217, 119, 6, .1); }
.pw-preview-box {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
}

/* ================= TIME-OF-DAY STARTUP / RESTART / SHUTDOWN SPLASH (1280 x 480) ================= */
.power-splash {
  position: absolute; inset: 0; z-index: 120; overflow: hidden;
  background: #05070c; color: #f8fafc;
  opacity: 1; transform: scale(1);
  transition: opacity .65s ease, transform .65s cubic-bezier(.22,.85,.32,1);
}
.power-splash.fading-out { opacity: 0; transform: scale(1.03); pointer-events: none; }
#splash-canvas { position: absolute; inset: 0; width: 1300px; height: 600px; display: block; z-index: 1; }
.splash-content {
  position: relative; z-index: 3; width: 100%; height: 100%;
  padding: 24px 48px 20px; display: flex; flex-direction: column; justify-content: space-between;
  transition: opacity .55s ease, transform .55s ease;
}
.power-splash.collapsing .splash-content { opacity: 0; transform: scale(0.92); }
.splash-top-meta {
  display: flex; align-items: center; justify-content: space-between;
}
.splash-tod-pill {
  padding: 6px 14px; border-radius: 999px;
  background: rgba(8,12,20,.48); border: 1px solid rgba(255,255,255,.24);
  backdrop-filter: blur(8px); font: 800 12px ui-monospace, monospace; letter-spacing: .12em;
}
.splash-clock {
  font: 800 22px ui-monospace, monospace; letter-spacing: .08em;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.splash-center {
  display: flex; align-items: center; justify-content: center; gap: 48px;
}
.splash-emblem {
  position: relative; width: 174px; height: 174px; flex: 0 0 174px;
  display: grid; place-items: center;
  animation: splashEnter .8s cubic-bezier(.16,.88,.3,1) both;
}
@keyframes splashEnter {
  from { opacity: 0; transform: scale(.72); }
  to   { opacity: 1; transform: scale(1); }
}
.splash-ring {
  position: absolute; border-radius: 50%;
}
.splash-ring.outer {
  inset: 0; border: 2px solid rgba(255,255,255,.22);
  border-top-color: var(--splash-accent, #c8df6e);
  border-right-color: var(--splash-accent-2, #38bdf8);
  box-shadow: 0 0 28px var(--splash-glow, rgba(200,223,110,.35));
  animation: spin 5.2s linear infinite;
}
.splash-ring.inner {
  inset: 16px; border: 1.5px dashed rgba(255,255,255,.35);
  border-bottom-color: var(--splash-accent, #c8df6e);
  animation: spin 8s linear infinite reverse;
}
.power-splash[data-mode="reboot"] .splash-ring.outer { animation-duration: 1.8s; }
.power-splash[data-mode="reboot"] .splash-ring.inner { animation-duration: 2.6s; }
.power-splash[data-mode="poweroff"] .splash-ring.outer { animation-duration: 12s; opacity: .55; }
.splash-core {
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.25), rgba(8,12,20,.78));
  border: 1.5px solid rgba(255,255,255,.28);
  display: grid; place-items: center; font-size: 40px;
  color: var(--splash-accent, #c8df6e);
  text-shadow: 0 0 22px var(--splash-glow, rgba(200,223,110,.7));
  box-shadow: inset 0 2px 10px rgba(255,255,255,.18), 0 10px 30px rgba(0,0,0,.5);
  animation: splashPulse 2.2s ease-in-out infinite;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.splash-copy {
  width: 660px; display: flex; flex-direction: column; gap: 8px;
  animation: splashTextIn .75s cubic-bezier(.16,.88,.3,1) .1s both;
}
@keyframes splashTextIn {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: translateX(0); }
}
.splash-kicker {
  font: 800 12px ui-monospace, monospace; letter-spacing: .2em;
  color: var(--splash-accent, #c8df6e); text-shadow: 0 0 12px var(--splash-glow, rgba(200,223,110,.45));
}
.splash-title {
  margin: 0; font-size: 36px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15;
  color: #ffffff; text-shadow: 0 4px 24px rgba(0,0,0,.55);
}
.splash-sub {
  margin: 0; font-size: 16px; color: rgba(235,243,252,.86); font-weight: 500;
}
.splash-bar-wrap {
  margin-top: 8px; height: 6px; width: 100%; border-radius: 99px;
  background: rgba(255,255,255,.14); overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
}
.splash-bar-fill {
  height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--splash-accent, #c8df6e), var(--splash-accent-2, #38bdf8));
  box-shadow: 0 0 14px var(--splash-glow, rgba(200,223,110,.7));
  transition: width .35s cubic-bezier(.22,.85,.32,1);
}
.splash-step {
  font: 700 12px ui-monospace, monospace; color: rgba(220,232,246,.76); letter-spacing: .04em;
}
.splash-hint {
  text-align: center; font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: .05em;
}

/* Classic Hi-Fi Tube / CRT Warm Collapse Beam on Shutdown */
.splash-collapse-beam {
  position: absolute; left: 50%; top: 50%; z-index: 4; pointer-events: none;
  width: 1300px; height: 4px; transform: translate(-50%, -50%) scaleX(0); opacity: 0;
  background: radial-gradient(circle, #ffffff 0%, var(--splash-accent, #f5b041) 45%, transparent 78%);
  box-shadow: 0 0 36px #ffffff, 0 0 60px var(--splash-accent, #f5b041);
}
.power-splash.collapsing .splash-collapse-beam {
  animation: crtCollapse 1.05s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes crtCollapse {
  0%   { opacity: 0; transform: translate(-50%, -50%) scaleX(1) scaleY(90); }
  35%  { opacity: .95; transform: translate(-50%, -50%) scaleX(1) scaleY(1.2); }
  75%  { opacity: 1; transform: translate(-50%, -50%) scaleX(0.025) scaleY(2.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleX(0) scaleY(0); }
}
.splash-off-msg {
  position: absolute; inset: 0; z-index: 5; background: #020305;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: rgba(226,232,240,.75); font-size: 16px; font-weight: 700; cursor: pointer;
  animation: fadeInSlow .8s ease both;
}
@keyframes fadeInSlow { from { opacity: 0; } to { opacity: 1; } }
.splash-off-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,.75);
  animation: splashPulse 2.6s ease-in-out infinite;
}
.splash-off-msg small { font-size: 12px; color: rgba(148,163,184,.65); font-weight: 500; }

/* OVERLAYS, MODALS, TOAST, VIRTUAL KEYBOARD */
.dim-overlay { position: absolute; inset: 0; background: #000; opacity: 0; z-index: 40; pointer-events: none; transition: opacity .16s ease; }
.toast {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--panel); border: 1px solid var(--accent); color: var(--text);
  padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 700;
  box-shadow: 0 10px 30px var(--shadow);
}
.play-loading-banner {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 92;
  display: inline-flex; align-items: center; gap: 11px; max-width: 78%;
  padding: 11px 20px; border-radius: 999px;
  background: var(--panel); border: 1.5px solid var(--accent); color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .68), 0 0 18px var(--glow-1);
}
.plb-spin, .mini-spin {
  display: inline-block; border-radius: 50%; flex: 0 0 auto;
  border: 2.5px solid rgba(255, 255, 255, .22);
  border-top-color: var(--accent);
  animation: spin 0.72s linear infinite;
}
.plb-spin { width: 18px; height: 18px; }
.mini-spin { width: 16px; height: 16px; border-width: 2.2px; }
.plb-txt {
  font-size: 14px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.plb-sec {
  font: 800 12px ui-monospace, monospace; color: var(--accent);
  padding: 2px 8px; border-radius: 999px; background: var(--accent-dim);
  flex: 0 0 auto;
}
.media-item.is-loading {
  border-color: var(--accent) !important;
  background: linear-gradient(155deg, var(--accent-dim), var(--panel-2)) !important;
  box-shadow: 0 0 16px var(--glow-1);
}
.media-item.is-loading .play-badge {
  background: var(--accent-dim) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.modal { position: absolute; inset: 0; background: rgba(4,6,10,.72); z-index: 70; display: grid; place-items: center; }
.modal-box {
  width: 440px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.modal-box h3 { margin: 0; font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

.vkbd {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 95;
  background: var(--topbar-bg); border-top: 2px solid var(--accent);
  padding: 8px 16px 10px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 -14px 36px rgba(0,0,0,.65);
}
.vkbd-bar { display: flex; align-items: center; gap: 8px; }
.vk-mode-tag {
  height: 34px; padding: 0 12px; border-radius: 8px; line-height: 34px;
  background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border);
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.vkbd-preview {
  flex: 1; height: 34px; line-height: 34px; padding: 0 12px;
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vk-act {
  height: 34px; padding: 0 14px; border-radius: 8px; border: 0;
  background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.vk-act.close { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.vkbd-rows { display: flex; flex-direction: column; gap: 5px; }
.vk-row { display: flex; gap: 5px; justify-content: center; }
.vk-key {
  flex: 1; max-width: 98px; height: 42px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.vk-key.fn { flex: 1.45; max-width: 140px; font-size: 13px; background: var(--panel); color: var(--accent); border-color: var(--accent-border); }
.vk-key.fn.active { background: var(--accent); color: var(--accent-text); }
.vk-key.wide { flex: 3.2; max-width: 340px; font-size: 13px; }
.vk-key:active { background: var(--accent); color: var(--accent-text); transform: scale(.96); }

/* Nvarcher DAC Hardware Auto-Detection Strip & Step-by-Step Boot Consistency Dashboard (v94) */
.hw-dac-detect-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.hw-dac-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hw-dac-badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .01em;
}
.hw-dac-badge.detected {
  background: rgba(16, 185, 129, .18); color: #34d399; border: 1px solid rgba(52, 211, 153, .45);
}
.hw-dac-badge.absent {
  background: rgba(148, 163, 184, .14); color: var(--muted); border: 1px solid var(--line);
}
.hw-dac-desc {
  font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hw-dac-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.boot-dash-grid { grid-template-columns: 1.25fr 1fr; }
.boot-card { display: flex; flex-direction: column; gap: 8px; overflow: hidden; min-height: 0; }
.boot-kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.boot-kpi {
  padding: 7px 9px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.bk-lbl { font-size: 10px; color: var(--muted); font-weight: 700; }
.bk-val {
  font-size: 13px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bk-val.good { color: #34d399; }
.bk-val.warn { color: #fbbf24; }
.bk-val.bad  { color: #fb7185; }

.boot-waterfall {
  display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; overflow-y: auto; padding-right: 2px;
}
.bw-row {
  display: grid; grid-template-columns: 20px 150px 1fr 78px; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 9px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05);
}
.bw-step {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font: 800 10.5px ui-monospace, monospace; background: var(--panel-2); color: var(--accent); border: 1px solid var(--accent-border);
}
.bw-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bw-name { font-size: 11.5px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-detail { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-track {
  position: relative; height: 12px; border-radius: 999px;
  background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.07); overflow: hidden;
}
.bw-bar {
  position: absolute; top: 1px; bottom: 1px; border-radius: 999px; min-width: 4px;
  background: linear-gradient(90deg, #10b981, #38bdf8);
}
.bw-bar.slow { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.bw-bar.pending { background: rgba(148,163,184,.32); }
.bw-time {
  text-align: right; font: 800 10.5px ui-monospace, monospace; color: var(--text); white-space: nowrap;
}
.bw-time small { display: block; font-size: 9px; color: var(--muted); font-weight: 600; }

.boot-uptime-chip {
  font: 700 11px ui-monospace, monospace; color: var(--accent);
  padding: 3px 9px; border-radius: 999px; background: var(--accent-dim); border: 1px solid var(--accent-border);
}
.boot-sub-lbl { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .01em; margin-top: 2px; }
.boot-history-chart {
  display: flex; align-items: flex-end; gap: 6px; height: 96px;
  padding: 10px 10px 6px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line);
}
.bh-col {
  flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;
}
.bh-val { font: 800 9.5px ui-monospace, monospace; color: var(--text); }
.bh-bar-wrap { width: 100%; flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; }
.bh-bar {
  width: 72%; max-width: 28px; min-height: 6px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #38bdf8, #0284c7);
}
.bh-bar.cur { background: linear-gradient(180deg, #34d399, #059669); box-shadow: 0 0 8px rgba(52,211,153,.4); }
.bh-bar.spike { background: linear-gradient(180deg, #fbbf24, #ef4444); }
.bh-lbl { font: 700 8.5px ui-monospace, monospace; color: var(--muted); white-space: nowrap; }

.boot-slow-list {
  display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; overflow-y: auto;
}
.bsu-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 9px; border-radius: 8px; background: var(--panel-2); border: 1px solid rgba(255,255,255,.05);
  font-size: 11px;
}
.bsu-unit { font-family: ui-monospace, monospace; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsu-sec { font: 800 11px ui-monospace, monospace; color: var(--accent); flex: 0 0 auto; }
.bsu-sec.slow { color: #fbbf24; }
.temp-chip { cursor: pointer; }

[data-res="1280x400"] .boot-kpi-strip { gap: 5px; }
[data-res="1280x400"] .boot-kpi { padding: 4px 6px; }
[data-res="1280x400"] .bk-val { font-size: 11px; }
[data-res="1280x400"] .bw-row { grid-template-columns: 18px 118px 1fr 64px; padding: 3px 6px; gap: 5px; }
[data-res="1280x400"] .bw-name { font-size: 10px; }
[data-res="1280x400"] .bw-detail { display: none; }
[data-res="1280x400"] .boot-history-chart { height: 64px; padding: 6px 6px 4px; }
[data-res="1920x440"] .boot-history-chart { height: 74px; padding: 8px 8px 4px; }
[data-res="1920x440"] .bw-row { grid-template-columns: 18px 142px 1fr 72px; padding: 3px 7px; }

/* Per-resolution dedicated 1:1 native layouts live in:
   - layout-1560x720.css (Primary Flagship · 4×2 Luxury Tiles)
   - layout-1280x400.css (Ultra-Wide Compact · 4×2 Horizontal-Split Cards)
   - layout-1920x440.css (Panoramic Cockpit · 8×1 Single-Row Monoliths) */

/* Player transport: text-only sequential/random sliding switch. */
#btn-deck-autoplay {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 86px;
  height: 22px;
  flex: 0 0 86px;
  padding: 2px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: rgba(8, 12, 18, .92);
  color: #94a3b8;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.5);
  font: 700 10px/1 sans-serif;
  touch-action: manipulation;
}
#btn-deck-autoplay::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / 2);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: transform .18s ease;
}
#btn-deck-autoplay.is-random::before { transform: translateX(100%); }
#btn-deck-autoplay span { position: relative; z-index: 1; text-align: center; }
#btn-deck-autoplay:not(.is-random) .autoplay-seq,
#btn-deck-autoplay.is-random .autoplay-random { color: var(--accent-text); }
#btn-deck-autoplay:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  #btn-deck-autoplay::before { transition: none; }
}
