/* WNR42 v2 — widget canvas. Tokens come from vendor/glass/css/glass.css. */

html,
body { height: 100%; }

body.v4 {
  min-height: 100dvh;
  overflow: hidden;
  background: #070a22;
  padding: 0;
  overscroll-behavior: none;
}

#app { min-height: 100dvh; }

.v2-noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #11162b;
  color: #fff;
  z-index: 9999;
}

.v2-bg,
.v2-veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.v2-bg { z-index: 0; overflow: hidden; background: #070a22; }

.v2-bg__layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.1s ease;
  transform: scale(1.02);
}
.v2-bg__layer.on { opacity: 1; }

.v2-veil {
  z-index: 1;
  background:
    radial-gradient(90% 70% at 50% 0%, rgb(var(--veil-rgb) / 0.08), transparent 65%),
    linear-gradient(180deg, rgb(var(--veil-rgb) / 0.12), rgb(var(--veil-rgb) / calc(var(--veil-a) + 0.18)));
}

.v2-canvas {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  isolation: isolate;
  touch-action: none;
}

.v2-canvas.is-idle .v2-widget:not(.v2-mini),
.v2-canvas.is-idle .v2-mini__glow { opacity: 0; pointer-events: none; }

.v2-canvas.is-idle .v2-mini { opacity: 0.35; }
.v2-canvas.is-idle .v2-mini:hover,
.v2-canvas.is-idle .v2-mini:focus-within { opacity: 1; }

/* ------------------------------------------------------------------ widget frame */

.v2-widget {
  position: fixed;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  min-height: 160px;
  border: 1px solid rgb(var(--edge) / var(--edge-a));
  border-radius: calc(var(--r-l) + 6px);
  background: linear-gradient(150deg, rgb(var(--tint) / calc(var(--glass-a) + 0.1)), rgb(var(--tint) / calc(var(--glass-a) + 0.02)));
  -webkit-backdrop-filter: blur(calc(var(--blur) + 6px)) saturate(var(--sat));
  backdrop-filter: blur(calc(var(--blur) + 6px)) saturate(var(--sat));
  box-shadow: var(--sh), 0 30px 80px rgb(0 0 0 / 0.28);
  color: rgb(var(--text-rgb));
  transition: opacity 0.45s ease, transform 0.18s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.v2-widget::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(155deg, rgb(255 255 255 / calc(var(--shine) * 0.0036)), transparent 44%);
}

.v2-widget.dragging {
  opacity: 0.92;
  transition: none;
  box-shadow: var(--sh), 0 40px 100px rgb(0 0 0 / 0.42), 0 0 0 1px var(--accent-c);
}

.v2-widget__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 8px 14px;
  border-bottom: 1px solid rgb(var(--text-rgb) / 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.v2-widget__head:active { cursor: grabbing; }

.v2-widget__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.v2-widget__title b {
  color: rgb(var(--text-rgb));
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-widget__tools { display: flex; align-items: center; gap: 2px; }

.v2-widget__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--text-rgb) / 0.2) transparent;
  touch-action: pan-y;
}

.v2-widget__resize {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgb(var(--text-rgb) / 0.1);
  border-radius: 7px;
  background: rgb(var(--tint) / 0.55);
  color: var(--muted);
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
  z-index: 3;
}
.v2-widget:hover .v2-widget__resize,
.v2-widget__resize:focus-visible { opacity: 1; }
.v2-widget__resize:hover { color: var(--accent-c); background: rgb(var(--tint) / 0.8); }

.v2-guide {
  position: fixed;
  z-index: 5;
  pointer-events: none;
  background: var(--accent-c);
  opacity: 0.5;
}
.v2-guide.v { width: 1px; top: 0; bottom: 0; }
.v2-guide.h { height: 1px; left: 0; right: 0; }

/* ------------------------------------------------------------------ miniplayer */

.v2-mini {
  position: fixed;
  z-index: 900;
  display: block;
  padding: 0;
  border-radius: calc(var(--r-l) + 8px);
  border: 1px solid rgb(var(--edge) / calc(var(--edge-a) + 0.12));
  background: linear-gradient(150deg, rgb(var(--tint) / calc(var(--glass-a) + 0.16)), rgb(var(--tint) / calc(var(--glass-a) + 0.04)));
  -webkit-backdrop-filter: blur(calc(var(--blur) + 10px)) saturate(var(--sat));
  backdrop-filter: blur(calc(var(--blur) + 10px)) saturate(var(--sat));
  box-shadow: var(--sh), 0 26px 70px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.04);
  transition: opacity 0.35s ease, box-shadow 0.2s ease, transform 0.18s ease;
  touch-action: none;
  user-select: none;
  overflow: visible;
}
.v2-mini.dragging {
  transition: none;
  box-shadow: var(--sh), 0 40px 100px rgb(0 0 0 / 0.5), 0 0 0 1px var(--accent-c);
}
.v2-mini__corners {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}
.v2-mini__corners > * { pointer-events: auto; }

.v2-mini__center {
  position: absolute;
  inset: 7%;
  z-index: 2;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgb(var(--edge) / 0.18);
  background: radial-gradient(circle at 35% 25%, rgb(var(--tint) / 0.7), rgb(var(--veil-rgb) / 0.6));
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.14), inset 0 -10px 22px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
  cursor: grab;
  padding: 0;
  color: rgb(var(--text-rgb));
  touch-action: none;
  transition: box-shadow 0.2s;
}
.v2-mini__center:active { cursor: grabbing; box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.14), inset 0 -10px 22px rgb(0 0 0 / 0.3), 0 16px 40px rgb(0 0 0 / 0.45); }
.v2-mini__center::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: inset 0 2px 8px rgb(0 0 0 / 0.32);
  pointer-events: none;
  z-index: 1;
}
.v2-mini.muted .v2-mini__center { box-shadow: inset 0 0 0 2px var(--bad), 0 10px 30px rgb(0 0 0 / 0.3); }

.v2-mini__knob-ticks {
  position: absolute;
  inset: -1%;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  background: repeating-conic-gradient(from 225deg, rgb(var(--text-rgb) / 0.55) 0 1deg, transparent 1deg 9deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 69%, #000 70% 84%, transparent 85%);
  mask: radial-gradient(circle closest-side, transparent 69%, #000 70% 84%, transparent 85%);
  opacity: 0.65;
}
.v2-mini__knob-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
  background: conic-gradient(from 225deg, var(--accent-c) calc(var(--vol, 0.8) * 270deg), rgb(var(--text-rgb) / 0.12) 0 270deg, transparent 0);
  -webkit-mask: radial-gradient(circle closest-side, transparent 76%, #000 77% 82%, transparent 83%);
  mask: radial-gradient(circle closest-side, transparent 76%, #000 77% 82%, transparent 83%);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent-c) 45%, transparent));
}
.v2-mini__face {
  position: absolute;
  inset: 6%;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 26%, rgb(255 255 255 / 0.24), transparent 42%),
    radial-gradient(circle at 50% 60%, rgb(var(--tint) / 0.9), rgb(var(--veil-rgb) / 0.92));
  border: 1px solid rgb(255 255 255 / 0.16);
  box-shadow:
    inset 0 2px 3px rgb(255 255 255 / 0.18),
    inset 0 -8px 16px rgb(0 0 0 / 0.35),
    0 2px 8px rgb(0 0 0 / 0.3);
  transform: rotate(calc(-135deg + var(--vol, 0.8) * 270deg));
  transition: transform 0.08s linear;
}
.v2-mini__face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(155deg, rgb(255 255 255 / 0.14), transparent 38%, transparent 70%, rgb(0 0 0 / 0.16));
  pointer-events: none;
}
.v2-mini__dimple {
  position: absolute;
  top: 12%;
  left: 50%;
  width: 15%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, rgb(255 255 255 / 0.55), rgb(90 100 120 / 0.95) 55%, rgb(20 26 40 / 0.95));
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.55), 0 1px 1px rgb(255 255 255 / 0.22);
  z-index: 4;
}
.v2-mini__art {
  position: absolute;
  inset: 9%;
  width: 82%;
  height: 82%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
}
.v2-mini__mono, .v2-mini__brand { position: relative; z-index: 2; transform: none; }
.v2-mini__mono {
  font: 800 23px / 1 "Inter", system-ui, sans-serif;
  letter-spacing: -0.04em;
  color: var(--tone, var(--accent-c));
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.35);
}
.v2-mini__brand {
  display: grid;
  gap: 2px;
  text-align: center;
  line-height: 1;
}
.v2-mini__brand b {
  font: 900 19px / 1 "Inter", system-ui, sans-serif;
  letter-spacing: -0.05em;
}
.v2-mini__brand i { font-style: normal; color: var(--accent-c); font-size: 10px; letter-spacing: 0.28em; }

.v2-mini__globe { width: 100%; height: 100%; }
.v2-mini__center canvas { width: 100%; height: 100%; display: block; }
.v2-mini__center .spin { animation: v2-spin 2.4s linear infinite; }

.v2-mini__btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgb(var(--edge) / 0.18);
  border-radius: 50%;
  background: rgb(var(--tint) / 0.42);
  color: rgb(var(--text-rgb) / 0.86);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.18s, background 0.18s, color 0.18s;
}
.v2-mini__btn:hover { background: rgb(var(--tint) / 0.72); color: rgb(var(--text-rgb)); transform: translateY(-1px); }
.v2-mini__logo { width: 16px; height: 16px; object-fit: contain; filter: drop-shadow(0 1px 3px rgb(0 0 0 / 0.4)); }
.v2-mini__btn:active { transform: scale(0.92); }
.v2-mini__btn.tl { top: -2px; left: -2px; }
.v2-mini__btn.tr { top: -2px; right: -2px; }
.v2-mini__btn.bl { bottom: -2px; left: -2px; }
.v2-mini__btn.br { bottom: -2px; right: -2px; }
.v2-mini__btn .v2-ico { width: 15px; height: 15px; }
.v2-mini__btn.on { color: var(--accent-c); border-color: color-mix(in srgb, var(--accent-c) 55%, transparent); }
.v2-mini__btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.v2-mini__meta {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgb(var(--tint) / 0.5);
  border: 1px solid rgb(var(--edge) / 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.v2-mini:hover .v2-mini__meta,
.v2-mini:focus-within .v2-mini__meta { opacity: 1; transform: none; }

@keyframes v2-spin { to { transform: rotate(360deg); } }
@keyframes v2-hold { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ ad slot */

.v2-ad {
  position: fixed;
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(260px, 46vw);
  padding: 8px 10px 8px 8px;
  border-radius: 14px;
  border: 1px solid rgb(var(--edge) / 0.16);
  background: rgb(var(--tint) / 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(var(--sat));
  backdrop-filter: blur(16px) saturate(var(--sat));
  color: rgb(var(--text-rgb));
  text-decoration: none;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: var(--sh-c);
  opacity: 0.92;
  transition: opacity 0.2s, transform 0.2s;
}
.v2-ad:hover { opacity: 1; transform: translateY(-1px); }
.v2-ad img { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; }
.v2-ad small { display: block; color: var(--muted); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ------------------------------------------------------------------ sheets (phones) */

.v2-sheetw {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  align-items: end;
  background: rgb(0 0 0 / 0.28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.v2-sheet {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 900px);
  min-height: 38dvh;
  border-radius: 22px 22px 0 0;
  border: 1px solid rgb(var(--edge) / var(--edge-a));
  border-bottom: 0;
  background: linear-gradient(155deg, rgb(var(--tint) / 0.94), rgb(var(--tint) / 0.82));
  -webkit-backdrop-filter: blur(calc(var(--blur) + 10px)) saturate(var(--sat));
  backdrop-filter: blur(calc(var(--blur) + 10px)) saturate(var(--sat));
  box-shadow: 0 -20px 80px rgb(0 0 0 / 0.4);
  padding-bottom: env(safe-area-inset-bottom);
  animation: v2-sheet-in 0.24s ease;
}
.v2-sheet__grab {
  display: grid;
  place-items: center;
  padding: 8px 0 2px;
  cursor: grab;
  touch-action: none;
}
.v2-sheet__grab i { width: 44px; height: 4px; border-radius: 4px; background: rgb(var(--text-rgb) / 0.24); }
.v2-sheet__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 10px 16px;
}
.v2-sheet__head h2 { margin: 0; font-size: 16px; flex: 1; }
.v2-sheet__body { overflow: auto; padding: 0 16px 20px; flex: 1; -webkit-overflow-scrolling: touch; }

@keyframes v2-sheet-in { from { transform: translateY(22px); opacity: 0.4; } }

/* ------------------------------------------------------------------ common controls */

.v2-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v2-row.between { justify-content: space-between; }
.v2-col { display: grid; gap: 10px; }
.v2-muted { color: var(--muted); }
.v2-small { font-size: 12px; }
.v2-kicker { font-size: 10px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-c); }
.v2-hr { height: 1px; background: rgb(var(--text-rgb) / 0.09); margin: 12px 0; border: 0; }
.v2-empty { display: grid; place-items: center; gap: 8px; padding: 28px 12px; text-align: center; color: var(--muted); }
.v2-empty b { color: rgb(var(--text-rgb)); }

.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgb(var(--text-rgb) / 0.14);
  background: rgb(var(--tint) / 0.34);
  color: rgb(var(--text-rgb));
  font: 600 12.5px/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
.v2-btn:hover { background: rgb(var(--tint) / 0.55); border-color: rgb(var(--text-rgb) / 0.24); }
.v2-btn:active { transform: scale(0.97); }
.v2-btn.primary { background: var(--accent-c); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent-c) 35%, transparent); }
.v2-btn.ghost { background: transparent; }
.v2-btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.v2-btn[disabled] { opacity: 0.5; pointer-events: none; }
.v2-iconbtn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: rgb(var(--text-rgb) / 0.78);
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.v2-iconbtn:hover { background: rgb(var(--text-rgb) / 0.09); color: rgb(var(--text-rgb)); }
.v2-iconbtn.on { color: var(--accent-c); background: color-mix(in srgb, var(--accent-c) 14%, transparent); }

.v2-input,
.v2-select,
.v2-textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgb(var(--text-rgb) / 0.14);
  background: rgb(var(--tint) / 0.32);
  color: rgb(var(--text-rgb));
  font: 400 13.5px/1.35 "Inter", system-ui, sans-serif;
  outline: none;
}
.v2-input:focus,
.v2-select:focus,
.v2-textarea:focus { border-color: var(--accent-c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-c) 22%, transparent); }
.v2-textarea { resize: vertical; min-height: 72px; }
.v2-label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.v2-label > span { font-weight: 650; color: rgb(var(--text-rgb) / 0.82); }
.v2-check { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.v2-check input { width: 16px; height: 16px; accent-color: var(--accent-c); }
.v2-range { display: grid; gap: 4px; }
.v2-range input { width: 100%; accent-color: var(--accent-c); }
.v2-range .v2-row { justify-content: space-between; font-size: 12px; color: var(--muted); }
.v2-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid rgb(var(--text-rgb) / 0.12);
  background: rgb(var(--tint) / 0.3);
  color: rgb(var(--text-rgb) / 0.8);
}
.v2-tag.on { color: var(--accent-c); border-color: color-mix(in srgb, var(--accent-c) 45%, transparent); background: color-mix(in srgb, var(--accent-c) 12%, transparent); }
.v2-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent-c) 30%, transparent);
  background: color-mix(in srgb, var(--accent-c) 10%, transparent);
  font-size: 12.5px;
}
.v2-banner.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.v2-banner.error { border-color: color-mix(in srgb, var(--bad) 38%, transparent); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.v2-banner > div { flex: 1; }

.v2-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.v2-tabs::-webkit-scrollbar { display: none; }
.v2-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 12.5px/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
}
.v2-tab:hover { background: rgb(var(--text-rgb) / 0.07); color: rgb(var(--text-rgb)); }
.v2-tab.on { background: rgb(var(--tint) / 0.55); border-color: rgb(var(--text-rgb) / 0.12); color: rgb(var(--text-rgb)); }

.v2-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; }
.v2-kv dt { color: var(--muted); }
.v2-kv dd { margin: 0; }

/* ------------------------------------------------------------------ quick search */

.v2-quick { display: flex; flex-direction: column; gap: 12px; min-height: 0; height: 100%; }
.v2-quick__big {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.v2-quick__btn {
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 8px 3px 7px;
  border-radius: 11px;
  border: 1px solid rgb(var(--text-rgb) / 0.08);
  background: rgb(var(--tint) / 0.26);
  color: var(--muted);
  font: 600 9.5px/1.1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  text-align: center;
}
.v2-quick__label--short { display: none; }
.v2-quick__btn:hover { background: rgb(var(--tint) / 0.45); color: rgb(var(--text-rgb)); }
.v2-quick__btn.on { color: var(--accent-c); border-color: color-mix(in srgb, var(--accent-c) 48%, transparent); background: color-mix(in srgb, var(--accent-c) 12%, transparent); }
.v2-quick__search { display: flex; gap: 8px; }
.v2-quick__search .v2-input { min-height: 40px; font-size: 15px; }
.v2-quick__pane { display: grid; gap: 10px; min-height: 0; }
.v2-quick__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; overflow: auto; min-height: 0; flex: 1; padding-right: 2px; }
.v2-quick__body.split { grid-template-columns: minmax(160px, 0.72fr) minmax(0, 1.4fr); }
.v2-quick__split { display: grid; grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.4fr); gap: 10px; min-height: 0; }
.v2-favsplit { flex: 1; overflow: hidden; }
.v2-favsplit > .v2-quick__pane { min-height: 0; overflow: auto; padding-right: 2px; }
.v2-quick__footer { flex: none; margin-top: auto; padding-top: 8px; border-top: 1px solid rgb(var(--text-rgb) / 0.1); }
.v2-quick__footer .v2-legend { border-top: 0; padding-top: 0; }
.v2-quick__list { display: grid; gap: 4px; align-content: start; max-height: 220px; overflow: auto; }
.v2-quick__opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgb(var(--tint) / 0.2);
  color: rgb(var(--text-rgb) / 0.85);
  font: 500 12px/1.2 "Inter", system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
}
.v2-quick__opt:hover { background: rgb(var(--tint) / 0.4); }
.v2-quick__opt.on { border-color: color-mix(in srgb, var(--accent-c) 45%, transparent); color: var(--accent-c); }
.v2-quick__opt em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 10.5px; }
.v2-quick__opt.recent { box-shadow: inset 3px 0 0 var(--accent-c); }

.v2-results { display: grid; gap: 6px; }
.v2-results.grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.v2-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgb(var(--text-rgb) / 0.08);
  background: rgb(var(--tint) / 0.26);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s;
}
.v2-card:hover { background: rgb(var(--tint) / 0.46); border-color: rgb(var(--text-rgb) / 0.16); }
.v2-card.on { border-color: color-mix(in srgb, var(--accent-c) 55%, transparent); background: color-mix(in srgb, var(--accent-c) 9%, transparent); }
.v2-card__logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tone, #ff6a2b) 22%, rgb(var(--tint) / 0.6));
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  color: var(--tone, var(--accent-c));
}
.v2-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.v2-card__logo-wrap .dot {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgb(var(--tint));
  background: var(--q, var(--muted));
}
.v2-card__t { min-width: 0; display: grid; gap: 1px; }
.v2-card__t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-card__t small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.v2-card__a { display: flex; align-items: center; gap: 1px; }
.v2-card__a .v2-iconbtn { width: 28px; height: 28px; }
.v2-card__a .played { color: var(--warn); }

.v2-legend {
  border-top: 1px solid rgb(var(--text-rgb) / 0.08);
  padding-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.v2-legend summary { cursor: pointer; }
.v2-legend .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 6px; }
.v2-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.v2-dot.low { background: #f87171; }
.v2-dot.mid { background: #fbbf24; }
.v2-dot.high { background: #34d399; }

.v2-map {
  position: relative;
  min-height: 220px;
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 40% 20%, #12305a, #081021 70%);
  border: 1px solid rgb(var(--text-rgb) / 0.1);
  touch-action: none;
  cursor: grab;
}
.v2-map:active { cursor: grabbing; }
.v2-map svg { display: block; width: 100%; height: 100%; }
.v2-map .land { fill: rgb(120 200 205 / 0.22); stroke: rgb(120 200 205 / 0.3); stroke-width: 0.3; }
.v2-map .station { fill: var(--accent-c); stroke: rgb(0 0 0 / 0.4); stroke-width: 0.4; cursor: pointer; }
.v2-map .station.played { fill: var(--warn); }
.v2-map__hint {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgb(0 0 0 / 0.4);
  color: #fff;
  font-size: 10.5px;
}
.v2-map__zoom { position: absolute; right: 8px; top: 8px; display: grid; gap: 4px; }

/* ------------------------------------------------------------------ profile */

.v2-profile { display: grid; gap: 12px; }
.v2-profile__tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.v2-profile__tabs button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 12px/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
}
.v2-profile__tabs button.on { color: var(--accent-c); background: color-mix(in srgb, var(--accent-c) 11%, transparent); border-color: color-mix(in srgb, var(--accent-c) 32%, transparent); }
.v2-profile__pane { display: grid; gap: 14px; }
.v2-profile__pane h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.v2-profile__pane .v2-row { gap: 8px; }
.v2-flag { font-size: 13px; }

/* ------------------------------------------------------------------ schedule / favourites / station */

.v2-sched { display: grid; gap: 10px; }
.v2-sched__item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgb(var(--tint) / 0.24);
  border: 1px solid transparent;
}
.v2-sched__item.live { border-color: color-mix(in srgb, var(--accent-c) 42%, transparent); }
.v2-sched__time { font: 700 11px/1.2 "Inter", system-ui, sans-serif; color: var(--muted); }
.v2-sched__item b { font-size: 13px; }
.v2-sched__item small { display: block; color: var(--muted); font-size: 11px; }

/* full schedule: programme rows (time, logo, text, actions) */
.v2-show {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgb(var(--tint) / 0.24);
  border: 1px solid transparent;
}
.v2-show.live { border-color: color-mix(in srgb, var(--accent-c) 42%, transparent); }
.v2-show .v2-sched__time { flex: none; width: 52px; }
.v2-show .v2-card__logo { flex: none; }
.v2-show__body { flex: 1; display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.v2-show__body b { font-size: 13px; line-height: 1.3; }
.v2-show__body small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.v2-show__actions { flex: none; display: flex; align-items: center; gap: 2px; }
.v2-sched .live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: var(--bad); vertical-align: 1px; }

.v2-list { display: grid; gap: 4px; }
.v2-list__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgb(var(--tint) / 0.24);
  font-size: 12.5px;
}
.v2-list__row b { flex: 1; font-weight: 600; }

.v2-station { display: grid; gap: 12px; }
.v2-station__hero { display: flex; align-items: center; gap: 12px; }
.v2-station__hero .v2-card__logo { width: 72px; height: 72px; border-radius: 16px; font-size: 22px; }
.v2-station__hero h3 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.v2-station__hero p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.v2-station__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.v2-station__text { font-size: 12.5px; color: rgb(var(--text-rgb) / 0.78); line-height: 1.5; }

/* ------------------------------------------------------------------ toasts */

.v2-toasts {
  position: fixed;
  z-index: 3000;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  gap: 6px;
  width: min(420px, calc(100vw - 24px));
  pointer-events: none;
}
.v2-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid rgb(var(--edge) / 0.2);
  background: rgb(var(--tint) / 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--sh-c);
  font-size: 12.5px;
  pointer-events: auto;
}
.v2-toast.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.v2-toast.error { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.v2-toast.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

/* ------------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .v2-quick__big { grid-template-columns: repeat(7, minmax(52px, 1fr)); overflow-x: auto; }
  .v2-widget { border-radius: calc(var(--r-l) + 4px); }
}

@media (max-width: 600px) {
  .v2-quick__big {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 4px;
    margin: -2px -4px 2px;
    background: rgb(var(--tint) / 0.94);
    -webkit-backdrop-filter: blur(14px) saturate(var(--sat));
    backdrop-filter: blur(14px) saturate(var(--sat));
    border-radius: 12px;
    box-shadow: 0 8px 18px rgb(0 0 0 / 0.18);
  }
  .v2-quick__btn { padding: 5px 1px 4px; font-size: 7px; line-height: 1.05; gap: 1px; letter-spacing: -0.01em; border-radius: 8px; }
  .v2-quick__btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v2-quick__btn .v2-ico { width: 14px; height: 14px; }
  .v2-quick__btn .v2-quick__label { display: none; }
  .v2-quick__btn .v2-quick__label--short { display: inline; }
  .v2-results.grid { grid-template-columns: minmax(0, 1fr); }
  .v2-mini__meta { display: none; }
  .v2-mini__btn { width: 30px; height: 30px; }
  .v2-mini__btn.tl { top: -2px; left: -2px; }
  .v2-mini__btn.tr { top: -2px; right: -2px; }
  .v2-mini__btn.bl { bottom: -2px; left: -2px; }
  .v2-mini__btn.br { bottom: -2px; right: -2px; }
  .v2-mini__btn .v2-ico { width: 14px; height: 14px; }
  .v2-mini__logo { width: 15px; height: 15px; }
  .v2-mini__mono { font-size: 19px; }
  .v2-mini__brand b { font-size: 16px; }
  .v2-canvas { touch-action: pan-y; }
  .v2-card { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .v2-card__logo { width: 40px; height: 40px; }
}

@media (hover: none) {
  .v2-mini__quick { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .v2-widget,
  .v2-mini,
  .v2-bg__layer,
  .v2-sheet { transition: none !important; animation: none !important; }
  .v2-mini__center { transition: none; }
}

/* ------------------------------------------------------------------ additions */

.v2-ico { display: block; flex: none; }

.v2-card__logo-wrap { width: 44px; height: 44px; position: relative; display: grid; place-items: center; }
.v2-card__logo-wrap .dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgb(var(--tint));
  background: var(--q, var(--muted));
}

.v2-mini__center > * { grid-area: 1 / 1; }
.v2-mini__globe { opacity: 1; transition: opacity 0.25s; pointer-events: none; }
.v2-mini__globe.hidden { opacity: 0; }
.v2-mini__muted {
  position: absolute;
  right: 16%;
  bottom: 16%;
  padding: 2px;
  border-radius: 50%;
  background: rgb(var(--tint) / 0.7);
  color: var(--bad);
  z-index: 4;
}

.v2-mini__quick {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translate(-50%, 4px);
  display: flex;
  gap: 3px;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.v2-mini:hover .v2-mini__quick,
.v2-mini:focus-within .v2-mini__quick {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.v2-mini__q {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgb(var(--edge) / 0.2);
  background: rgb(var(--tint) / 0.88);
  color: rgb(var(--text-rgb) / 0.95);
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.v2-mini__q:hover { background: var(--accent-c); color: var(--accent-ink); }
.v2-mini__q.on { color: var(--accent-c); border-color: color-mix(in srgb, var(--accent-c) 55%, transparent); }

.v2-iconbtn { width: 28px; height: 28px; }
.v2-sched__time small { display: block; color: var(--muted); font-size: 9px; font-weight: 500; }

@media (hover: none) {
  .v2-mini__q { width: 18px; height: 18px; }
  .v2-mini__quick { gap: 1px; }
}

.v2-favsplit .v2-row { flex-wrap: nowrap; }
.v2-favsplit .v2-row .v2-input { flex: 1; width: auto; min-width: 0; }
.v2-favsplit .v2-row .v2-btn { flex: none; }

/* ------------------------------------------------------------------ grid, selected result, collapsible facets */

.v2-quick__collapse {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgb(var(--text-rgb) / 0.1);
  background: rgb(var(--tint) / 0.3);
  color: rgb(var(--text-rgb));
  cursor: pointer;
  text-align: left;
}
.v2-quick__collapse b { flex: 1; font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-quick__collapse .v2-ico { color: var(--muted); transition: transform 0.18s; }
.v2-quick__collapse .v2-ico.open { transform: rotate(90deg); color: var(--accent-c); }

.v2-selected {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent-c) 45%, transparent);
  background: color-mix(in srgb, var(--accent-c) 10%, rgb(var(--tint) / 0.4));
  margin-bottom: 4px;
}
.v2-selected__t { display: grid; gap: 1px; min-width: 0; }
.v2-selected__t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-selected__t small { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-selected__a { display: flex; align-items: center; gap: 1px; }
.v2-selected__a .v2-iconbtn { width: 29px; height: 29px; }

.v2-results.v2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 7px;
}
.v2-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 13px;
  border: 1px solid rgb(var(--text-rgb) / 0.09);
  background: rgb(var(--tint) / 0.24);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
}
.v2-tile:hover { border-color: rgb(var(--text-rgb) / 0.24); transform: translateY(-1px); }
.v2-tile.on { border-color: var(--accent-c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-c) 30%, transparent); }
.v2-tile .v2-card__logo { width: 100% !important; height: 100% !important; border-radius: inherit; font-size: 18px; }
.v2-tile .v2-card__logo img { border-radius: inherit; }
.v2-tile .dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgb(var(--tint));
  background: var(--q, var(--muted));
  z-index: 2;
}
.v2-tile .played { position: absolute; left: 4px; bottom: 4px; color: var(--warn); z-index: 2; }
.v2-tile .liked { position: absolute; right: 4px; top: 4px; color: var(--accent-c); z-index: 2; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.5)); }

.v2-quick__footrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.v2-quick__footrow .v2-btn { flex: none; min-height: 28px; padding: 0 9px; font-size: 11.5px; }

@media (max-width: 600px) {
  .v2-results.v2-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
  .v2-selected { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .v2-selected .v2-card__logo { width: 38px; height: 38px; }
}

.v2-genre-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 11px;
  max-height: 198px;
  overflow: auto;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
}
.v2-genre-tag {
  border: 0;
  padding: 1px 0;
  background: none;
  color: var(--muted);
  font: 650 var(--fs, 13px) / 1.15 "Inter", system-ui, sans-serif;
  text-transform: capitalize;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, transform 0.12s;
}
.v2-genre-tag:hover { color: rgb(var(--text-rgb)); transform: translateY(-1px); }
.v2-genre-tag.on { color: var(--accent-c); }
.v2-genre-tag.recent { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-c) 60%, transparent); text-underline-offset: 3px; }

/* Mobile: the deck becomes a fixed bottom bar with a central play/stop knob. */
@media (max-width: 600px) {
  .v2-mini {
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    height: 74px !important;
    border-radius: 22px;
  }
  .v2-mini__center {
    inset: auto;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
  }
  .v2-mini__btn { top: auto; bottom: auto; width: 32px; height: 32px; }
  .v2-mini__btn.tl { top: 50%; left: 12px; right: auto; bottom: auto; transform: translateY(-50%); }
  .v2-mini__btn.bl { top: 50%; left: 54px; right: auto; bottom: auto; transform: translateY(-50%); }
  .v2-mini__btn.tr { top: 50%; left: auto; right: 54px; bottom: auto; transform: translateY(-50%); }
  .v2-mini__btn.br { top: 50%; left: auto; right: 12px; bottom: auto; transform: translateY(-50%); }
  .v2-mini__btn .v2-ico { width: 15px; height: 15px; }
  .v2-mini__quick { display: none; }
  .v2-mini__meta { display: none; }
  .v2-mini.hidden { display: none; }
}
