:root {
  --bg: #05070d;
  --panel: rgba(18, 24, 38, 0.55);
  --line: rgba(255, 255, 255, 0.07);
  --txt: #e8eefc;
  --mute: #7d8aa8;
  --cyan: #3ee8ff;
  --blue: #4d7cff;
  --violet: #a35cff;
  --red: #ff3d6e;
  --amber: #ffb547;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--txt);
  font-family: 'Outfit', system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button { font-family: inherit; color: inherit; cursor: pointer; border: none; background: none; }

.bg-glow {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 50% 55%, rgba(77, 124, 255, 0.13), transparent 70%),
    radial-gradient(600px 400px at 10% 0%, rgba(62, 232, 255, 0.08), transparent 70%),
    radial-gradient(600px 500px at 95% 100%, rgba(163, 92, 255, 0.10), transparent 70%);
  transition: background 0.4s;
}
body.hot .bg-glow {
  background:
    radial-gradient(900px 600px at 50% 55%, rgba(255, 61, 110, 0.16), transparent 70%),
    radial-gradient(600px 400px at 10% 0%, rgba(62, 232, 255, 0.06), transparent 70%),
    radial-gradient(600px 500px at 95% 100%, rgba(163, 92, 255, 0.12), transparent 70%);
}

#app {
  position: relative;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(6px, 1vh, 10px);
  padding: clamp(6px, 1vh, 10px) clamp(10px, 1.4vw, 16px);
  padding-top: max(clamp(6px, 1vh, 10px), env(safe-area-inset-top));
  padding-bottom: max(clamp(6px, 1vh, 10px), env(safe-area-inset-bottom));
  padding-left: max(clamp(10px, 1.4vw, 16px), env(safe-area-inset-left));
  padding-right: max(clamp(10px, 1.4vw, 16px), env(safe-area-inset-right));
  box-sizing: border-box;
  overflow: hidden;
}

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { width: clamp(24px, 3vh, 30px); height: clamp(24px, 3vh, 30px); object-fit: contain; display: block; filter: drop-shadow(0 0 10px rgba(62, 232, 255, 0.45)); }
.brand-mark.big { width: 80px; height: 80px; filter: drop-shadow(0 0 25px rgba(62, 232, 255, 0.5)); }
.brand-name { font-size: clamp(14px, 2vh, 17px); letter-spacing: 3px; font-weight: 500; }
.brand-name b, h1 b { font-weight: 900; background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.status-row { display: flex; gap: 8px; }
.chip { display: flex; align-items: center; gap: 6px; padding: clamp(4px, 0.6vh, 6px) clamp(8px, 1vw, 12px); border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: clamp(11px, 1.4vh, 13px); color: var(--mute); backdrop-filter: blur(12px); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: pulse 1.4s infinite; }
.chip.ok .dot { background: #3dffa8; box-shadow: 0 0 8px #3dffa8; animation: none; }
.chip.err .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
@keyframes pulse { 50% { opacity: 0.3; } }
.top-right { display: flex; align-items: center; gap: 8px; }
.clock { font-size: clamp(15px, 2.2vh, 19px); letter-spacing: 2px; margin-right: 4px; }
.icon-btn { min-width: clamp(34px, 4.2vh, 38px); height: clamp(34px, 4.2vh, 38px); padding: 0 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; font-weight: 600; transition: 0.2s; backdrop-filter: blur(12px); }
.icon-btn:hover { border-color: rgba(62, 232, 255, 0.4); box-shadow: 0 0 16px rgba(62, 232, 255, 0.15); }
.icon-btn:active { transform: scale(0.94); }

/* grid */
.grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 2fr) minmax(190px, 1fr);
  gap: clamp(8px, 1.2vw, 14px);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.panel.side {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: clamp(6px, 1vh, 8px);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(6px, 1vh, 10px) clamp(8px, 1vw, 12px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(255,255,255,0.12), transparent 40%, transparent 70%, rgba(62,232,255,0.12)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.card.grow { flex: 1; min-height: 0; }
.card-title { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--mute); font-weight: 600; margin-bottom: clamp(2px, 0.5vh, 4px); flex-shrink: 0; }
.kv { display: flex; justify-content: space-between; padding: clamp(1px, 0.3vh, 3px) 0; font-size: clamp(10.5px, 1.3vh, 12.5px); border-bottom: 1px dashed var(--line); }
.kv:last-child { border: none; }
.kv span { color: var(--mute); }
.kv b { font-weight: 500; font-variant-numeric: tabular-nums; }
.signal { position: absolute; top: clamp(6px, 1vh, 10px); right: clamp(8px, 1vw, 12px); display: flex; gap: 3px; align-items: flex-end; height: 11px; }
.signal i { width: 3px; background: rgba(255,255,255,0.12); border-radius: 2px; transition: 0.3s; }
.signal i:nth-child(1) { height: 30%; } .signal i:nth-child(2) { height: 45%; } .signal i:nth-child(3) { height: 60%; } .signal i:nth-child(4) { height: 80%; } .signal i:nth-child(5) { height: 100%; }
.signal i.on { background: #3dffa8; box-shadow: 0 0 6px #3dffa8; }

/* compass */
.compass { position: relative; width: 100%; max-width: clamp(70px, 10.5vh, 95px); aspect-ratio: 1; margin: 0 auto; flex-shrink: 0; }
.compass svg { width: 100%; height: 100%; transition: transform 0.4s cubic-bezier(.2,.8,.2,1); }
.c-ring { fill: rgba(0,0,0,0.25); stroke: rgba(255,255,255,0.1); stroke-width: 1.5; }
.c-n, .c-l { text-anchor: middle; font-size: 14px; fill: var(--mute); }
.c-n { fill: var(--red); font-weight: 900; }
.compass-needle { position: absolute; left: 50%; top: 6%; width: 0; height: 0; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 10px solid var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
.compass-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.compass-val b { font-size: clamp(13px, 2vh, 17px); }
.compass-val span { font-size: 9.5px; color: var(--mute); letter-spacing: 1.5px; }
.fill-cv { flex: 1; width: 100%; min-height: 0; border-radius: 8px; }

/* center */
.center { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; height: 100%; overflow: hidden; }
.gauge-wrap { position: relative; width: 100%; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
#gauge { position: absolute; inset: 0; width: 100%; height: 100%; }
.gauge-center { position: relative; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.speed { font-weight: 900; font-size: clamp(48px, 9.5vmin, 120px); line-height: 0.95; font-variant-numeric: tabular-nums; letter-spacing: -2px; text-shadow: 0 0 35px rgba(62, 232, 255, 0.35); transition: color 0.3s, text-shadow 0.3s; }
body.hot .speed { color: #ffe3ea; text-shadow: 0 0 35px rgba(255, 61, 110, 0.6); }
.unit { font-size: clamp(11px, 1.6vmin, 14px); letter-spacing: 4px; color: var(--mute); text-transform: uppercase; margin-top: 2px; }
.gear-box { display: flex; align-items: baseline; gap: 4px; margin-bottom: 3px; padding: 2px 8px; border-radius: 8px; background: rgba(62, 232, 255, 0.08); border: 1px solid rgba(62, 232, 255, 0.25); }
.gear-d { font-size: 11px; color: var(--mute); font-weight: 600; }
#gearVal { font-size: clamp(16px, 2.5vmin, 22px); font-weight: 700; color: var(--cyan); }
.gear-box.shift { animation: gearPop 0.35s ease; }
@keyframes gearPop { 40% { transform: scale(1.25); background: rgba(62, 232, 255, 0.3); } }
.rpm-read { margin-top: 5px; font-size: clamp(10.5px, 1.4vmin, 12.5px); color: var(--mute); letter-spacing: 1.5px; }
.rpm-read b { color: var(--txt); font-weight: 500; font-variant-numeric: tabular-nums; }

.pedals { display: none; gap: 10px; margin-top: 3px; flex-shrink: 0; }
body.demo .pedals { display: flex; }
.pedal { width: clamp(85px, 10vw, 120px); height: clamp(34px, 4.8vh, 44px); border-radius: 12px; font-weight: 700; letter-spacing: 1.5px; font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(12px); transition: 0.12s; touch-action: none; }
.pedal small { font-family: 'Outfit'; font-size: 9px; letter-spacing: 1px; color: var(--mute); font-weight: 400; }
.pedal.gas { border-color: rgba(62, 232, 255, 0.35); }
.pedal.brake { border-color: rgba(255, 61, 110, 0.35); }
.pedal.gas.on { background: linear-gradient(160deg, rgba(62,232,255,0.35), rgba(77,124,255,0.25)); box-shadow: 0 0 24px rgba(62,232,255,0.35); transform: scale(0.96); }
.pedal.brake.on { background: linear-gradient(160deg, rgba(255,61,110,0.4), rgba(163,92,255,0.2)); box-shadow: 0 0 24px rgba(255,61,110,0.35); transform: scale(0.96); }

/* right */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3px, 0.6vh, 6px); }
.stat { display: flex; flex-direction: column; padding: clamp(4px, 0.6vh, 6px) clamp(5px, 0.7vw, 8px); border-radius: 8px; background: rgba(0,0,0,0.22); }
.stat span { font-size: 9px; color: var(--mute); letter-spacing: 1px; text-transform: uppercase; line-height: 1; }
.stat b { font-size: clamp(14px, 1.8vh, 17px); font-weight: 600; margin-top: 1px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat em { font-style: normal; font-size: 9px; color: var(--mute); }
.g-wrap { position: relative; width: 100%; max-width: clamp(70px, 10vh, 95px); aspect-ratio: 1; margin: 0 auto; flex-shrink: 0; }
#gCv { width: 100%; height: 100%; }
.g-val { position: absolute; bottom: -2px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--mute); }
.engine-name { font-size: clamp(14px, 1.8vh, 17px); font-weight: 700; line-height: 1.15; }
.engine-sub { color: var(--mute); font-size: 10px; margin-bottom: clamp(2px, 0.4vh, 4px); }
.bar-row { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 6px; margin: clamp(1px, 0.3vh, 3px) 0; font-size: 10px; color: var(--mute); }
.bar { height: 5px; border-radius: 6px; background: rgba(255,255,255,0.06); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 10px rgba(62,232,255,0.5); }
.bar i.rpm { background: linear-gradient(90deg, var(--cyan), var(--violet), var(--red)); background-size: 300px 100%; }
.bar i.boost { background: linear-gradient(90deg, var(--amber), var(--red)); }
#boostRow { display: none; }
body.turbo #boostRow { display: grid; }

/* dock */
.dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: clamp(3px, 0.7vh, 6px) clamp(8px, 1vw, 12px);
  border-radius: clamp(12px, 1.8vh, 18px);
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
  min-height: 0;
}

/* engine picker button */
.engine-picker-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: clamp(4px, 0.7vh, 6px) clamp(8px, 0.9vw, 12px);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(62,232,255,0.22);
  text-align: left;
  transition: 0.2s;
  flex-shrink: 0;
}
.engine-picker-btn:hover {
  background: rgba(62,232,255,0.08);
  border-color: rgba(62,232,255,0.45);
  box-shadow: 0 0 16px rgba(62,232,255,0.18);
}
.engine-picker-btn:active {
  transform: scale(0.96);
}
.eng-picker-badge {
  padding: 3px 7px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(62,232,255,0.22), rgba(163,92,255,0.22));
  border: 1px solid rgba(62,232,255,0.4);
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
}
.eng-picker-info {
  display: flex;
  flex-direction: column;
}
.eng-picker-label {
  font-size: 8px;
  color: var(--mute);
  letter-spacing: 1.2px;
  font-weight: 600;
  line-height: 1;
}
.eng-picker-info b {
  font-size: 12px;
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
}
.eng-picker-info small {
  font-size: 9.5px;
  color: var(--mute);
  line-height: 1.1;
}
.eng-picker-arrow {
  font-size: 11px;
  color: var(--cyan);
  margin-left: 2px;
  transition: transform 0.2s;
}
body.drawer-open .engine-picker-btn .eng-picker-arrow {
  transform: rotate(180deg);
}

.dock-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.seg { display: flex; padding: 2px; border-radius: 10px; background: rgba(0,0,0,0.3); }
.seg button { padding: clamp(4px, 0.6vh, 6px) clamp(8px, 0.8vw, 12px); border-radius: 8px; font-weight: 600; font-size: 11.5px; color: var(--mute); transition: 0.2s; white-space: nowrap; }
.seg button.active { background: linear-gradient(140deg, var(--cyan), var(--blue)); color: #031018; box-shadow: 0 0 14px rgba(62,232,255,0.4); }
.vol { display: flex; align-items: center; gap: 6px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: clamp(65px, 6vw, 100px); height: 5px; border-radius: 6px; background: linear-gradient(90deg, var(--cyan) var(--p, 70%), rgba(255,255,255,0.1) var(--p, 70%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(62,232,255,0.8); cursor: pointer; }

/* radio mini */
.radio-mini { display: flex; align-items: center; gap: 3px; padding: 2px 3px; border-radius: 12px; background: rgba(0,0,0,0.3); min-width: 0; flex-shrink: 1; }
.r-btn { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; color: var(--mute); transition: 0.2s; flex-shrink: 0; }
.r-btn:hover { color: var(--txt); background: rgba(255,255,255,0.05); }
.r-btn.play { color: #031018; background: linear-gradient(140deg, var(--violet), var(--blue)); box-shadow: 0 0 12px rgba(163,92,255,0.4); }
.r-btn:active { transform: scale(0.92); }
.r-info { display: flex; align-items: center; gap: 6px; padding: 2px 8px 2px 5px; border-radius: 9px; min-width: 0; max-width: clamp(160px, 18vw, 240px); text-align: left; transition: 0.2s; }
.r-info:hover { background: rgba(255,255,255,0.05); }
.r-icon { font-size: 15px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.r-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.r-text b { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.r-text small { font-size: 9.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.radio-mini.live .r-text small { color: #3dffa8; }
.radio-mini.has-track .r-text small { color: var(--cyan); font-weight: 600; text-shadow: 0 0 10px rgba(62,232,255,0.3); }
.radio-mini.duck .r-text small::after { content: ' · kısıldı'; color: var(--amber); }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 14px; opacity: 0.25; flex-shrink: 0; }
.eq i { width: 2.5px; height: 30%; border-radius: 2px; background: var(--cyan); }
.radio-mini.live .eq { opacity: 1; }
.radio-mini.live .eq i { animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s !important; } .eq i:nth-child(3) { animation-delay: -0.6s !important; } .eq i:nth-child(4) { animation-delay: -0.15s !important; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* overlay */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, rgba(20, 30, 60, 0.85), rgba(3, 4, 8, 0.97)); backdrop-filter: blur(8px); z-index: 10; transition: opacity 0.6s, visibility 0.6s; }
.overlay.hide { opacity: 0; visibility: hidden; }
.start-card { text-align: center; max-width: 520px; padding: 20px; }
.start-logo { display: flex; justify-content: center; margin-bottom: 20px; }
h1 { font-size: clamp(32px, 6vw, 48px); letter-spacing: 8px; font-weight: 500; }
.start-card p { color: var(--mute); margin: 10px 0 35px; font-size: 16px; }
.start-btn { position: relative; width: clamp(170px, 25vmin, 220px); height: clamp(170px, 25vmin, 220px); border-radius: 50%; font-weight: 700; font-size: clamp(14px, 2.2vmin, 17px); letter-spacing: 2px; line-height: 1.5; background: radial-gradient(circle at 50% 35%, #2a3350, #0b0f1c); border: 2px solid rgba(62,232,255,0.4); box-shadow: 0 0 0 10px rgba(62,232,255,0.05), 0 0 60px rgba(62,232,255,0.25), inset 0 -10px 30px rgba(0,0,0,0.6); transition: 0.25s; }
.start-btn span { display: block; padding: 0 25px; }
.start-btn::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid rgba(62,232,255,0.3); animation: ring 2s infinite; }
@keyframes ring { from { transform: scale(0.95); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.start-btn:hover { box-shadow: 0 0 0 10px rgba(62,232,255,0.08), 0 0 90px rgba(62,232,255,0.45), inset 0 -10px 30px rgba(0,0,0,0.6); color: var(--cyan); }
.start-btn:active { transform: scale(0.95); }
.warn { margin-top: 28px; font-size: 12px; color: var(--amber); padding: 10px 14px; border-radius: 12px; background: rgba(255,181,71,0.08); border: 1px solid rgba(255,181,71,0.25); }

/* drawers */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; visibility: hidden; transition: 0.3s; z-index: 8; }
.drawer {
  position: fixed;
  left: clamp(10px, 2vw, 24px);
  right: clamp(10px, 2vw, 24px);
  bottom: clamp(10px, 2vh, 20px);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: rgba(12, 16, 28, 0.96);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.7);
  transform: translateY(115%);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
  z-index: 9;
  pointer-events: none;
  visibility: hidden;
}
body.drawer-open .drawer.open {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
body.drawer-open .drawer-bg {
  opacity: 1;
  visibility: visible;
}
.drawer-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(10px, 1.4vh, 16px) clamp(14px, 2vw, 20px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.drawer-head h2 { font-size: 16px; letter-spacing: 2px; }
.drawer-ctrl { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.drawer-sub { font-size: 12px; color: var(--mute); }

/* engine cards inside popup */
.engine-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  padding: clamp(12px, 1.8vh, 18px) clamp(14px, 2vw, 20px);
  overflow-y: auto;
}
.eng-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  text-align: left;
  transition: 0.2s;
}
.eng-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(62,232,255,0.3);
  transform: translateY(-2px);
}
.eng-card.active {
  background: linear-gradient(140deg, rgba(62,232,255,0.14), rgba(163,92,255,0.14));
  border-color: rgba(62,232,255,0.5);
  box-shadow: 0 0 20px rgba(62,232,255,0.18);
}
.eng-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eng-card-badge {
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(62,232,255,0.15);
  border: 1px solid rgba(62,232,255,0.35);
  font-size: 11px;
  font-weight: 800;
  color: var(--cyan);
}
.eng-card-flag {
  font-size: 16px;
}
.eng-card-titles {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.eng-card-titles b {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.eng-card-titles small {
  font-size: 11px;
  color: var(--mute);
}
.eng-card-check {
  font-size: 10px;
  font-weight: 700;
  color: #3dffa8;
  background: rgba(61,255,168,0.12);
  border: 1px solid rgba(61,255,168,0.3);
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.8px;
}
.eng-card-desc {
  font-size: 11.5px;
  color: var(--txt);
  opacity: 0.85;
  line-height: 1.35;
  margin: 1px 0;
}
.eng-card-specs {
  display: flex;
  gap: 10px;
  font-size: 10.5px;
  color: var(--mute);
  padding-top: 5px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.eng-card-specs b {
  color: var(--cyan);
  font-weight: 600;
}

/* radio stations drawer */
.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); cursor: pointer; }
.toggle input { display: none; }
.toggle span { width: 38px; height: 22px; border-radius: 99px; background: rgba(255,255,255,0.1); position: relative; transition: 0.2s; }
.toggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: 0.2s; }
.toggle input:checked + span { background: var(--cyan); }
.toggle input:checked + span::after { left: 18px; }
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: clamp(12px, 1.6vh, 16px) clamp(16px, 2vw, 20px); overflow-y: auto; }
.station { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); text-align: left; transition: 0.2s; }
.station:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.station .s-ic { font-size: 22px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,0.05); flex-shrink: 0; }
.station b { display: block; font-size: 14px; font-weight: 600; }
.station small { font-size: 11px; color: var(--mute); }
.station.active { border-color: rgba(163,92,255,0.5); background: linear-gradient(140deg, rgba(163,92,255,0.18), rgba(77,124,255,0.12)); box-shadow: 0 0 20px rgba(163,92,255,0.18); }
.station.active .s-ic { background: linear-gradient(140deg, var(--violet), var(--blue)); }

/* Fallback for portrait / narrow screens */
@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr; overflow-y: auto; }
  html, body { overflow: auto; }
  #app { height: auto; min-height: 100%; overflow: visible; }
  .center { height: 50vh; order: -1; }
  .dock { flex-wrap: wrap; justify-content: center; }
}

/* Toast Notification (Debugger) */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(340px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto;
  background: rgba(18, 24, 38, 0.92);
  border: 1px solid rgba(62, 232, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(62, 232, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--txt);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.toast-hide {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
}
.toast-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  color: var(--cyan);
  font-size: 13px;
  margin-bottom: 6px;
}
.toast-body {
  color: var(--mute);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-line;
}
.toast-body b {
  color: var(--txt);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
