/* ==========================================================================
   AnySync v2 — "devices" group: Apps · Devices · Pair device · Device detail ·
   Personal Hotspot (src/client/orbit-v2-devices*.ts). Semantic tokens only;
   class prefix v2-devices-. Layout never changes per theme.
   ========================================================================== */

/* ------------------------------------------------------- shared bits ---- */

.v2-devices-art { display: inline-block; flex: none; width: 64px; aspect-ratio: 100 / 70; }
.v2-devices-art > svg { display: block; width: 100%; height: 100%; stroke: none; fill: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .28)); }
.v2-devices-row-art { width: 66px; }
.v2-devices-art[data-fit="portrait"] { aspect-ratio: 42 / 70; }
.v2-devices-art[data-fit="portrait"][data-kind="tablet"] { aspect-ratio: 64 / 70; }

.v2-devices-name { font-weight: 600; font-size: .9375rem; line-height: 1.3; color: var(--foreground); overflow-wrap: anywhere; }
.v2-devices-os { font-size: .8125rem; color: var(--muted); }
.v2-devices-label { font-size: .8125rem; font-weight: 550; color: var(--muted); }
.v2-devices-none { margin: 0; padding: 14px 4px; color: var(--muted); }
.v2-devices-confirm-body { margin: 0; color: var(--muted); }

.v2-devices-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .875rem;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
}
.v2-devices-status.is-connected, .v2-devices-status.is-online { color: var(--tone-ink); }
.v2-devices-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 calc(8px * var(--glow-scale, 1)) color-mix(in srgb, var(--tone) 60%, transparent); }

.v2-devices-battery { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 550; color: var(--muted); font-variant-numeric: tabular-nums; }
.v2-devices-battery-cell {
  position: relative;
  width: 22px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}
.v2-devices-battery-cell::before { content: ""; position: absolute; inset: 1px auto 1px 1px; width: calc((100% - 2px) * var(--p)); border-radius: 1px; background: var(--green); }
.v2-devices-battery-cell::after { content: ""; position: absolute; right: -4px; top: 2.5px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; }
.v2-devices-battery.is-low .v2-devices-battery-cell::before { background: var(--amber); }

.v2-devices-signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.v2-devices-signal > span { width: 4px; height: calc(var(--i) * 4px + 2px); border-radius: 1.5px; background: color-mix(in srgb, var(--foreground) 22%, transparent); }
.v2-devices-signal > span.is-on { background: var(--primary); box-shadow: 0 0 calc(6px * var(--glow-scale, 1)) var(--glow); }

.v2-devices-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--surface-glass);
  color: var(--foreground);
  font: inherit;
}
.v2-devices-input:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--primary); }
.v2-devices-input::placeholder { color: var(--muted); }

/* Drop zone (Devices, Device detail) */
.v2-devices-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 6px;
  border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, var(--glass-border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  transition: background .15s, border-color .15s;
}
.v2-devices-drop.is-over { background: var(--primary-soft); border-color: var(--primary); border-style: solid; }
.v2-devices-drop-hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 132px;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--foreground);
  font: inherit;
  cursor: pointer;
}
.v2-devices-drop-hit:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-drop-icon { color: var(--primary); margin-bottom: 4px; filter: drop-shadow(0 0 calc(8px * var(--glow-scale, 1)) var(--glow)); }
.v2-devices-drop-title { font-weight: 600; font-size: 1.0625rem; }
.v2-devices-drop-sub { font-size: .875rem; color: var(--muted); }
.v2-devices-drop.is-compact .v2-devices-drop-hit { min-height: 100px; }
.v2-devices-drop-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 4px 4px; }

/* ====================================================== Devices ======== */

.v2-devices-add.is-narrow { display: none; }
@media (max-width: 599px) {
  .v2-devices-add.is-wide { display: none; }
  .v2-devices-add.is-narrow { display: inline-grid; }
}

.v2-devices-top { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.v2-devices-this-host { display: flex; min-width: 0; }
.v2-devices-this { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.v2-devices-this-head { display: flex; align-items: center; gap: 14px; }
.v2-devices-this-art { width: 132px; }
.v2-devices-this-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v2-devices-this-name { font-size: 1.1875rem; font-weight: 650; letter-spacing: -.01em; }
.v2-devices-this-sub { font-size: .9375rem; color: var(--muted); }

.v2-devices-radios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2-devices-radio {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--foreground) 4%, transparent);
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.v2-devices-radio:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--glass-border)); }
.v2-devices-radio:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-radio-icon { color: var(--muted); margin-bottom: 8px; }
.v2-devices-radio.is-on .v2-devices-radio-icon { color: var(--primary); filter: drop-shadow(0 0 calc(8px * var(--glow-scale, 1)) var(--glow)); }
.v2-devices-radio-title { font-weight: 600; font-size: .9375rem; }
.v2-devices-radio-title .is-short { display: none; }
.v2-devices-radio-state { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 550; color: var(--muted); }
.v2-devices-radio.is-on .v2-devices-radio-state { color: color-mix(in srgb, var(--green) 72%, var(--foreground)); }
.v2-devices-radio-dot { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 70%, transparent); }
.v2-devices-radio.is-on .v2-devices-radio-dot { background: var(--green); box-shadow: 0 0 calc(8px * var(--glow-scale, 1)) color-mix(in srgb, var(--green) 60%, transparent); }
.v2-devices-radio:not(.is-on) .v2-devices-radio-dot { background: var(--pink); }
.v2-devices-radio-desc { font-size: .8125rem; color: var(--muted); }

.v2-devices-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.v2-devices-scan {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px dotted var(--primary);
  animation: v2-devices-spin 2.4s linear infinite;
}
@keyframes v2-devices-spin { to { transform: rotate(360deg); } }
.v2-devices-nearby-card .v2-section-tools { flex: 1; justify-content: space-between; }

.v2-devices-table-head,
.v2-devices-nearby-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1.4fr) minmax(0, 1fr) 64px 44px 84px;
  align-items: center;
  gap: 12px;
}
.v2-devices-table-head { padding: 0 8px 6px; font-size: .8125rem; color: var(--muted); font-weight: 600; }
.v2-devices-table-head > :first-child { grid-column: 1 / 3; }
.v2-devices-nearby-row { min-height: 64px; padding: 6px 8px; border-top: 1px solid var(--glass-border); }
.v2-devices-nearby-name { display: flex; flex-direction: column; min-width: 0; }
.v2-devices-nearby-dist { font-size: .9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-devices-nearby-row .v2-btn { min-width: 76px; }

.v2-devices-mine { display: flex; flex-direction: column; }
.v2-devices-mine-row {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) minmax(0, 1fr) 70px auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 6px 8px;
  border-radius: 14px;
}
.v2-devices-mine-row + .v2-devices-mine-row { border-top: 1px solid var(--glass-border); border-radius: 0 0 14px 14px; }
.v2-devices-mine-row:hover { background: color-mix(in srgb, var(--foreground) 5%, transparent); }
.v2-devices-row-hit { position: absolute; inset: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.v2-devices-row-hit:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-mine-row > :not(.v2-devices-row-hit) { position: relative; pointer-events: none; }
.v2-devices-mine-row > .v2-devices-mine-actions { pointer-events: auto; }
.v2-devices-mine-text { display: flex; flex-direction: column; min-width: 0; }
.v2-devices-mine-sub { font-size: .8125rem; color: var(--muted); }
.v2-devices-mine-actions { display: flex; gap: 4px; }
.v2-devices-mine-chev { display: none; color: var(--muted); }

.v2-devices-xfer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.v2-devices-quick .v2-section, .v2-devices-recent .v2-section { gap: 14px; }
.v2-devices-target-wrap { display: flex; flex-direction: column; gap: 8px; }
.v2-devices-target .v2-chip-group { margin: 0; padding: 0; }
.v2-devices-active { display: flex; flex-direction: column; gap: 8px; }
.v2-devices-active:empty { display: none; }
.v2-devices-active-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--glass-border); border-radius: 14px; }
.v2-devices-active-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.v2-devices-active-top { display: flex; justify-content: space-between; gap: 8px; }
.v2-devices-active-pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-devices-active-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8125rem; color: var(--muted); }
.v2-devices-active-row.is-done .v2-devices-active-speed { color: color-mix(in srgb, var(--green) 72%, var(--foreground)); font-weight: 600; }

.v2-devices-recent-list { display: flex; flex-direction: column; }
.v2-devices-recent-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 4px; }
.v2-devices-recent-row + .v2-devices-recent-row { border-top: 1px solid var(--glass-border); }
.v2-devices-recent-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.v2-devices-recent-sub { font-size: .8125rem; color: var(--muted); }
.v2-devices-recent-text .v2-progress { margin-top: 4px; max-width: 240px; }
.v2-devices-recent-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: .8125rem; font-weight: 550; white-space: nowrap; }

.v2-devices-promo {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding-right: 24px;
  background:
    radial-gradient(120% 140% at 0% 100%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%),
    var(--surface-glass);
}
.v2-devices-promo-art { position: relative; height: 128px; }
.v2-devices-promo-art .v2-devices-art { position: absolute; bottom: 6px; }
.v2-devices-promo-art .is-phone { left: 6%; width: 64px; }
.v2-devices-promo-art .is-laptop { left: 16%; width: 170px; bottom: 10px; }
.v2-devices-promo-art .is-tablet { left: 36%; width: 92px; }
.v2-devices-promo-art .is-server { left: 51%; width: 74px; bottom: 12px; }
.v2-devices-promo-art .is-tv { left: 64%; width: 110px; }
.v2-devices-promo-title { margin: 0 0 4px; font-size: 1.25rem; font-weight: 650; }
.v2-devices-promo-sub { margin: 0; color: var(--muted); }

@media (max-width: 1099px) {
  .v2-devices-top, .v2-devices-xfer { grid-template-columns: minmax(0, 1fr); }
  .v2-devices-radios { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v2-card.v2-devices-promo { grid-template-columns: minmax(0, 1fr) auto; padding: 18px 20px; }
  .v2-devices-promo-art { display: none; }
}
@media (max-width: 599px) {
  .v2-devices-this { gap: 14px; }
  .v2-devices-this-art { width: 84px; }
  .v2-devices-radios { gap: 8px; }
  .v2-devices-radio { position: relative; align-items: center; min-height: 0; padding: 12px 4px 10px; gap: 2px; text-align: center; }
  .v2-devices-radio-icon { margin: 0 0 2px; }
  .v2-devices-radio-title { font-size: .75rem; font-weight: 550; }
  .v2-devices-radio-title .is-long, .v2-devices-radio-desc { display: none; }
  .v2-devices-radio-title .is-short { display: inline; }
  /* The state stays readable (sr) but shows as a dot beside the icon. */
  .v2-devices-radio-state { position: absolute; top: 14px; right: calc(50% - 26px); font-size: 0; }
  .v2-devices-table-head { display: none; }
  .v2-devices-nearby-row {
    grid-template-columns: 56px minmax(0, 1fr) auto auto auto;
    grid-template-areas: "art name dist sig pair" "art method dist sig pair";
    column-gap: 10px;
    row-gap: 2px;
    padding: 8px 2px;
  }
  .v2-devices-nearby-row > .v2-devices-art { grid-area: art; width: 56px; }
  .v2-devices-nearby-name { grid-area: name; }
  .v2-devices-nearby-name .v2-devices-os { display: none; }
  .v2-devices-nearby-method { grid-area: method; }
  .v2-devices-nearby-dist { grid-area: dist; font-size: .875rem; }
  .v2-devices-nearby-row > .v2-devices-signal { grid-area: sig; }
  .v2-devices-nearby-row > .v2-btn { grid-area: pair; min-width: 64px; }
  .v2-devices-mine-row { grid-template-columns: 56px minmax(0, 1fr) auto auto; min-height: 58px; padding: 4px 2px; }
  .v2-devices-mine-row .v2-devices-art { width: 56px; }
  .v2-devices-mine-sub, .v2-devices-mine-battery, .v2-devices-mine-actions { display: none; }
  .v2-devices-mine-chev { display: inline-grid; }
  .v2-card.v2-devices-promo { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 18px 20px; }
  .v2-devices-promo-cta { justify-self: start; }
  /* Phones get the device family back as a compact strip above the text. */
  .v2-devices-promo-art { display: block; height: 76px; }
  .v2-devices-promo-art .v2-devices-art { bottom: 0; }
  .v2-devices-promo-art .is-phone { left: 0; width: 46px; }
  .v2-devices-promo-art .is-laptop { left: 13%; width: 100px; bottom: 2px; }
  .v2-devices-promo-art .is-tablet { left: 42%; width: 62px; }
  .v2-devices-promo-art .is-server { left: 59%; width: 50px; bottom: 2px; }
  .v2-devices-promo-art .is-tv { left: 73%; width: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-devices-scan { animation: none; }
}

/* ========================================================= Apps ======== */

.v2-devices-apps-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: -6px; }
.v2-devices-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 340px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--surface-glass);
  color: var(--muted);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
}
.v2-devices-search:focus-within { box-shadow: var(--ring); border-color: var(--primary); }
.v2-devices-search-input { flex: 1; min-width: 0; min-height: 42px; border: 0; background: none; color: var(--foreground); font: inherit; font-size: .9375rem; }
.v2-devices-search-input:focus { outline: none; }
.v2-devices-search-input::placeholder { color: var(--muted); }
.v2-devices-apps-content { display: flex; flex-direction: column; gap: 22px; }

.v2-devices-tile-hit { position: absolute; inset: 0; z-index: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.v2-devices-tile-hit:focus-visible { outline: none; box-shadow: var(--ring); }

/* Active now */
.v2-devices-active-now { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.v2-devices-live-app { display: flex; align-items: flex-start; gap: 14px; padding: 14px; }
.v2-devices-live-app > :not(.v2-devices-tile-hit) { position: relative; z-index: 1; }
.v2-devices-live-app > .v2-icon-tile { pointer-events: none; }
.v2-devices-live-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.v2-devices-live-text .v2-btn { pointer-events: auto; }
.v2-devices-live-name { font-weight: 600; font-size: 1rem; }
.v2-devices-live-count { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; color: var(--muted); }
.v2-devices-live-count svg, .v2-devices-app-count svg { color: var(--green); }
.v2-devices-live-join { align-self: stretch; margin-top: 4px; min-height: 40px; }

/* My apps */
.v2-devices-myapps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.v2-devices-myapp,
.v2-devices-apptile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--surface-glass);
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.v2-devices-myapp { min-height: 84px; padding: 12px 14px; }
.v2-devices-myapp:hover, .v2-devices-apptile:hover { border-color: color-mix(in srgb, var(--tone) 60%, var(--glass-border)); box-shadow: var(--shadow), 0 0 calc(18px * var(--glow-scale, 1)) color-mix(in srgb, var(--tone) 35%, transparent); }
.v2-devices-myapp:focus-visible, .v2-devices-apptile:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-myapp:active, .v2-devices-apptile:active { transform: scale(.98); }
.v2-devices-myapp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v2-devices-myapp-name { font-weight: 600; font-size: .9375rem; line-height: 1.25; }
.v2-devices-myapp-count { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; color: var(--muted); }
.v2-devices-online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.v2-devices-myapp-chev { color: var(--muted); }

/* Icon grids (Games / Tools / Spatial) */
.v2-devices-appgrid { display: grid; gap: 12px; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); }
.v2-devices-appgrid.is-games { --n: 6; }
.v2-devices-appgrid.is-tools { --n: 8; }
.v2-devices-appgrid.is-spatial { --n: 4; }
.v2-devices-appgrid.is-results { --n: 6; }
.v2-devices-appgrid.is-games:not(.is-all) > :nth-child(n + 7) { display: none; }
.v2-devices-apptile {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 108px;
  padding: 14px 8px 12px;
  text-align: center;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--tone) var(--tile-alpha, 22%), transparent), color-mix(in srgb, var(--tone) 4%, transparent)),
    var(--surface-glass);
  border-color: color-mix(in srgb, var(--tone) 32%, var(--glass-border));
}
.v2-devices-appgrid.is-games .v2-devices-apptile { min-height: 116px; }
.v2-devices-apptile-name { font-size: .875rem; font-weight: 550; line-height: 1.2; }
.v2-devices-appgrid.is-spatial .v2-devices-apptile { min-height: 128px; gap: 8px; }
.v2-devices-phone-badge { position: absolute; top: 10px; right: 12px; color: var(--muted); }
.v2-devices-open-phone { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .8125rem; color: var(--muted); }

/* Trending near you */
.v2-devices-trending { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.v2-devices-trend { display: flex; flex-direction: column; overflow: hidden; }
.v2-devices-trend-media { position: relative; }
.v2-devices-trend-media .v2-art { aspect-ratio: 16 / 7; }
.v2-devices-trend-media .v2-icon-tile { position: absolute; left: 14px; bottom: -18px; box-shadow: 0 0 0 3px var(--surface-glass-strong); }
.v2-devices-trend-body { display: flex; flex-direction: column; gap: 6px; padding: 26px 16px 16px; }
.v2-devices-trend-title { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.v2-devices-trend-desc { margin: 0; font-size: .875rem; color: var(--muted); }
.v2-devices-trend-rating { display: inline-flex; align-items: center; gap: 5px; font-size: .875rem; }
.v2-devices-trend-rating svg { color: var(--amber); fill: var(--amber); }
.v2-devices-trend-people { display: flex; align-items: center; gap: 10px; font-size: .8125rem; margin-bottom: 6px; }

/* App sheet + open on phone */
.v2-devices-app-sheet { display: flex; flex-direction: column; gap: 14px; }
.v2-devices-app-sheet-head { display: flex; align-items: center; gap: 16px; }
.v2-devices-app-sheet-head .v2-vstack { align-items: flex-start; gap: 8px; }
.v2-devices-app-count { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--muted); }
.v2-devices-app-desc { margin: 0; }
.v2-devices-sub-title { margin: 0; font-size: .9375rem; font-weight: 600; }
.v2-devices-app-people { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.v2-devices-app-people li { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; }
.v2-devices-phone-sheet { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.v2-devices-qr { display: grid; place-items: center; width: 200px; aspect-ratio: 1; padding: 10px; border-radius: 18px; background: var(--media-ink); }
.v2-devices-qr svg { width: 100%; height: 100%; stroke: none; }

@media (max-width: 1199px) {
  .v2-devices-appgrid.is-tools { --n: 4; }
  .v2-devices-appgrid.is-games { --n: 3; }
  .v2-devices-active-now, .v2-devices-myapps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .v2-devices-trending { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-devices-trending > :nth-child(3) { display: none; }
}
@media (max-width: 599px) {
  .v2-devices-apps-content { gap: 18px; }
  .v2-devices-apps-bar { flex-direction: column; align-items: stretch; gap: 10px; margin-top: -8px; }
  .v2-devices-search { flex: none; }
  /* Keep the bar inside the gutter: the chips scroll instead of widening the page. */
  .v2-devices-apps-bar, .v2-devices-apps-bar > * { min-width: 0; max-width: 100%; }
  .v2-devices-apps-bar .v2-chip-group { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .v2-devices-active-now { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .v2-devices-active-now > :nth-child(4) { display: none; }
  .v2-devices-live-app { flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; text-align: center; }
  .v2-devices-live-app .v2-icon-tile { width: 44px; height: 44px; border-radius: 14px; }
  .v2-devices-live-text { align-items: center; gap: 4px; }
  .v2-devices-live-name { font-size: .875rem; }
  .v2-devices-live-count { font-size: .75rem; }
  .v2-devices-live-join { display: none; }
  .v2-devices-myapps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .v2-devices-myapp { flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 0; padding: 10px 4px; text-align: center; background: none; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .v2-devices-myapp-text { align-items: center; }
  .v2-devices-myapp-name { font-size: .8125rem; }
  .v2-devices-myapp-count { font-size: .75rem; }
  .v2-devices-myapp-chev, .v2-devices-myapps .is-wide-only { display: none; }
  .v2-devices-appgrid, .v2-devices-appgrid.is-games, .v2-devices-appgrid.is-tools, .v2-devices-appgrid.is-spatial, .v2-devices-appgrid.is-results { --n: 4; gap: 8px; }
  .v2-devices-appgrid.is-games:not(.is-all) > :nth-child(n + 5) { display: none; }
  .v2-devices-apptile, .v2-devices-appgrid.is-games .v2-devices-apptile, .v2-devices-appgrid.is-spatial .v2-devices-apptile { min-height: 92px; padding: 10px 2px 8px; gap: 6px; border-radius: 18px; }
  .v2-devices-apptile .v2-icon-tile { width: 44px; height: 44px; border-radius: 14px; }
  .v2-devices-apptile-name { font-size: .75rem; }
  .v2-devices-phone-badge, .v2-devices-open-phone { display: none; }
  .v2-devices-trending {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--v2-gutter));
    padding: 2px var(--v2-gutter) 6px;
  }
  .v2-devices-trending > * { flex: 0 0 min(72%, 260px); scroll-snap-align: start; }
  .v2-devices-trending > :nth-child(3) { display: flex; }
}

/* Icons: styles.css pins every svg to 20px, so size the large ones here. */
.v2-devices-apps .v2-icon-tile.size-lg svg { width: 30px; height: 30px; }
.v2-devices-apps .v2-icon-tile.size-md svg { width: 24px; height: 24px; }
.v2-devices-app-sheet .v2-icon-tile.size-xl svg { width: 36px; height: 36px; }
.v2-devices-radio-icon svg { width: 28px; height: 28px; }
.v2-devices-drop-icon svg { width: 32px; height: 32px; }
@media (max-width: 599px) {
  .v2-devices-apps .v2-icon-tile.size-lg svg { width: 24px; height: 24px; }
}

/* ===================================================== Pair device ===== */

.v2-devices-pair-tabs { display: none; }
.v2-devices-pair-panel { display: flex; flex-direction: column; gap: 20px; max-width: 1000px; }
.v2-devices-pair-panel[hidden], .v2-devices-pair-codecard[hidden] { display: none; }
.v2-devices-pair-codecard { max-width: 640px; }
.v2-devices-pair-head { display: flex; flex-direction: column; gap: 14px; }
.v2-devices-pair-h { margin: 0; font-size: 1.375rem; font-weight: 650; letter-spacing: -.01em; }
.v2-devices-stepper { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.v2-devices-step { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 550; font-size: .9375rem; }
.v2-devices-step + .v2-devices-step::before { content: ""; width: clamp(24px, 9vw, 110px); height: 1px; margin: 0 14px; background: var(--glass-border); }
.v2-devices-step-dot {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  font-size: .875rem;
}
.v2-devices-step-dot svg { width: 16px; height: 16px; stroke-width: 2.6; }
.v2-devices-step.is-current { color: var(--foreground); }
.v2-devices-step.is-current .v2-devices-step-dot, .v2-devices-step.is-done .v2-devices-step-dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 0 calc(12px * var(--glow-scale, 1)) var(--glow); }
.v2-devices-step.is-done { color: var(--primary); }

.v2-devices-pair-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.v2-devices-pair-nearby { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.v2-devices-pair-sub { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1rem; font-weight: 600; }
.v2-devices-pair-list { display: flex; flex-direction: column; gap: 8px; }
.v2-devices-pair-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 70px;
  padding: 8px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--foreground) 4%, transparent);
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.v2-devices-pair-item:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--glass-border)); }
.v2-devices-pair-item:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-pair-item.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 calc(16px * var(--glow-scale, 1)) var(--glow); }
.v2-devices-pair-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.v2-devices-pair-method { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); }
.v2-devices-pair-method svg { width: 15px; height: 15px; }
.v2-devices-pair-near { font-size: .8125rem; font-weight: 550; color: var(--primary); }
.v2-devices-pair-item.is-selected > svg { color: var(--primary); }
.v2-devices-pair-note { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 0; font-size: .8125rem; color: var(--muted); }
.v2-devices-pair-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.v2-devices-pair-radar { display: none; }

.v2-devices-pair-side {
  padding: 22px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--foreground) 4%, transparent);
}
.v2-devices-pair-confirm { display: flex; flex-direction: column; gap: 14px; }
.v2-devices-pair-who { display: flex; align-items: center; gap: 16px; }
.v2-devices-pair-art { width: 72px; }
.v2-devices-pair-art[data-kind="tv"], .v2-devices-pair-art[data-kind="laptop"], .v2-devices-pair-art[data-kind="desktop"] { width: 120px; }
.v2-devices-pair-who-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.v2-devices-pair-title { margin: 0; font-size: 1.375rem; font-weight: 650; }
.v2-devices-pair-title .is-narrow-only { display: none; }
.v2-devices-pair-req { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--muted); }
.v2-devices-pair-req svg { width: 15px; height: 15px; color: var(--primary); }
.v2-devices-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--foreground) 5%, transparent);
}
.v2-devices-code-digits { font-size: 2rem; font-weight: 650; letter-spacing: .14em; color: var(--primary); font-variant-numeric: tabular-nums; text-shadow: 0 0 calc(14px * var(--glow-scale, 1)) var(--glow); }
.v2-devices-pair-hint { margin: 0; color: var(--muted); }
.v2-devices-pair-via { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--glass-border)); color: var(--primary); font-size: .875rem; font-weight: 550; }
.v2-devices-pair-via svg { width: 16px; height: 16px; }
.v2-devices-checks { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--glass-border); }
.v2-devices-check { display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: .9375rem; cursor: pointer; }
.v2-devices-check-input { width: 20px; height: 20px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.v2-devices-check-input:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-check-info { display: inline-grid; color: var(--muted); }
.v2-devices-check-info svg { width: 16px; height: 16px; }
.v2-devices-pair-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.v2-devices-pair-empty, .v2-devices-pair-done { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 6px; text-align: center; }
.v2-devices-pair-empty p, .v2-devices-pair-done p { margin: 0; max-width: 38ch; }
.v2-devices-pair-done .v2-devices-pair-actions { width: 100%; margin-top: 6px; }
.v2-devices-pair-done-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: var(--on-primary); box-shadow: 0 0 calc(26px * var(--glow-scale, 1)) var(--glow); }
.v2-devices-pair-done-icon svg { width: 34px; height: 34px; stroke-width: 2.6; }
.v2-devices-pair-done-icon.is-idle { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.v2-devices-pair-done-icon.is-idle svg { stroke-width: 1.9; }

.v2-devices-pair-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 12px; padding-top: 16px; border-top: 1px solid var(--glass-border); }
.v2-devices-pair-foot .v2-link svg { width: 16px; height: 16px; margin-right: 4px; }
.v2-devices-pair-sep { width: 1px; height: 18px; background: var(--glass-border); }
.v2-devices-pair-cant { display: none; }

.v2-devices-code-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.v2-devices-code-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--foreground) 4%, transparent);
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.v2-devices-code-opt:hover { border-color: var(--primary); }
.v2-devices-code-opt:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-code-opt-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); }
.v2-devices-code-opt-icon svg { width: 24px; height: 24px; }
.v2-devices-code-opt-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.v2-devices-code-opt > svg { color: var(--muted); }

/* Radar (phones) */
.v2-devices-radar { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 6px auto 18px; }
.v2-devices-radar-ring { position: absolute; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.v2-devices-radar-ring.is-1 {
  inset: 33%;
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 26%, transparent), color-mix(in srgb, var(--primary) 6%, transparent) 70%);
  box-shadow: 0 0 calc(34px * var(--glow-scale, 1)) var(--glow), inset 0 0 calc(22px * var(--glow-scale, 1)) color-mix(in srgb, var(--primary) 30%, transparent);
}
.v2-devices-radar-ring.is-2 { inset: 17%; background: radial-gradient(circle, transparent 60%, color-mix(in srgb, var(--primary) 7%, transparent)); }
.v2-devices-radar-ring.is-3 { inset: 2%; border-style: dashed; }
.v2-devices-radar-sweep {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, color-mix(in srgb, var(--primary) 26%, transparent), transparent 70deg);
  animation: v2-devices-spin 5s linear infinite;
}
.v2-devices-radar-me { position: absolute; left: 50%; top: 50%; width: 46px; transform: translate(-50%, -50%); filter: drop-shadow(0 0 calc(12px * var(--glow-scale, 1)) var(--glow)); }
.v2-devices-radar-me .v2-devices-art { width: 100%; }
.v2-devices-radar-dev {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--foreground);
  font: inherit;
  transform: translate(-50%, -36px);
  cursor: pointer;
  transition: left .8s ease, top .8s ease;
}
.v2-devices-radar-dev:focus-visible { outline: none; }
.v2-devices-radar-dev:focus-visible .v2-devices-radar-bubble { box-shadow: var(--ring); }
.v2-devices-radar-bubble {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--primary) 35%, var(--glass-border));
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--primary) 16%, var(--surface-glass-strong)), var(--surface-glass-strong) 75%);
  box-shadow: var(--shadow);
}
.v2-devices-radar-bubble .v2-devices-art { width: 56px; }
.v2-devices-radar-dev.is-selected .v2-devices-radar-bubble { border: 2px solid var(--primary); box-shadow: 0 0 calc(20px * var(--glow-scale, 1)) var(--glow); }
.v2-devices-radar-label { display: flex; flex-direction: column; align-items: center; padding: 4px 12px; border: 1px solid var(--glass-border); border-radius: 12px; background: var(--surface-glass-strong); font-size: .875rem; white-space: nowrap; -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.v2-devices-radar-label .v2-devices-pair-method { font-size: .75rem; }

@media (max-width: 899px) {
  .v2-devices-pair-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .v2-devices-pair-tabs { display: block; }
  .v2-devices-pair-panel { padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; gap: 12px; }
  .v2-devices-pair-head .v2-devices-pair-h, .v2-devices-pair-sub, .v2-devices-pair-listwrap, .v2-devices-pair-foot { display: none; }
  .v2-devices-step { font-size: .8125rem; gap: 6px; }
  .v2-devices-step-dot { width: 24px; height: 24px; font-size: .75rem; }
  .v2-devices-step + .v2-devices-step::before { width: 18px; margin: 0 8px; }
  .v2-devices-pair-radar { display: block; }
  .v2-devices-pair-grid { gap: 8px; }
  .v2-devices-pair-side { padding: 18px 16px; border-radius: var(--radius); background: var(--surface-glass); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
  .v2-devices-pair-who { align-items: center; }
  .v2-devices-pair-art { width: 50px; }
  .v2-devices-pair-art[data-kind="tv"], .v2-devices-pair-art[data-kind="laptop"], .v2-devices-pair-art[data-kind="desktop"] { width: 84px; }
  .v2-devices-pair-title { font-size: 1.125rem; }
  .v2-devices-pair-title .is-narrow-only { display: inline; }
  .v2-devices-code-digits { font-size: 1.625rem; }
  .v2-devices-pair-cant { display: inline-flex; align-self: center; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 550; cursor: pointer; }
  .v2-devices-pair-cant:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-devices-radar-sweep { animation: none; }
  .v2-devices-radar-dev { transition: none; }
}

/* =================================================== Device detail ===== */

.v2-devices-detail { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.v2-devices-detail-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.v2-devices-side-list { display: flex; flex-direction: column; gap: 6px; }
.v2-devices-side-title { margin: 4px 8px 6px; font-size: 1.0625rem; font-weight: 600; }
.v2-devices-side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: none;
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.v2-devices-side-item:hover { background: color-mix(in srgb, var(--foreground) 5%, transparent); }
.v2-devices-side-item:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-side-item.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 calc(14px * var(--glow-scale, 1)) var(--glow); }
.v2-devices-side-item > svg { color: var(--muted); }
.v2-devices-side-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.v2-devices-side-text .v2-devices-status { font-size: .8125rem; }

.v2-devices-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  background:
    radial-gradient(60% 120% at 12% 50%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    var(--surface-glass);
}
.v2-devices-hero-art { width: 190px; }
.v2-devices-hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.v2-devices-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.v2-devices-hero-names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-devices-hero-name { margin: 0; font-size: 1.5rem; font-weight: 650; letter-spacing: -.01em; }
.v2-devices-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--glass-border); background: color-mix(in srgb, var(--foreground) 5%, transparent); }
.v2-devices-pill.is-connected { border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); }
.v2-devices-pill .v2-devices-status { font-size: .8125rem; }
.v2-devices-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: .9375rem; }
.v2-devices-hero-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.v2-devices-hero-meta > span > svg { color: var(--primary); }
.v2-devices-hero-meta .v2-devices-battery { font-size: .9375rem; color: var(--foreground); }
.v2-devices-storage { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.v2-devices-storage-top { display: flex; justify-content: space-between; gap: 8px; font-size: .8125rem; font-weight: 550; }

.v2-devices-detail-drop .v2-devices-drop-hit { min-height: 118px; }

.v2-devices-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.v2-devices-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--tone) 40%, var(--glass-border));
  border-radius: 18px;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--tone) var(--tile-alpha, 22%), transparent), color-mix(in srgb, var(--tone) 4%, transparent)),
    var(--surface-glass);
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.v2-devices-action:hover { border-color: var(--tone); box-shadow: 0 0 calc(18px * var(--glow-scale, 1)) color-mix(in srgb, var(--tone) 35%, transparent); }
.v2-devices-action:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-action:active { transform: scale(.98); }
.v2-devices-action-icon { color: var(--tone-ink); }
.v2-devices-action-icon svg { width: 28px; height: 28px; }
.v2-devices-action-label { font-size: .875rem; font-weight: 550; padding-right: 14px; }
.v2-devices-action-chev { position: absolute; right: 10px; bottom: 14px; color: var(--muted); }
.v2-devices-action-chev svg { width: 16px; height: 16px; }

.v2-devices-live-host[hidden] { display: none; }
.v2-devices-live-row { display: flex; align-items: center; gap: 16px; }
.v2-devices-live-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.v2-devices-live-top { display: flex; justify-content: space-between; gap: 10px; }
.v2-devices-live-pct { font-weight: 650; font-variant-numeric: tabular-nums; }
.v2-devices-live-sub, .v2-devices-live-eta { font-size: .8125rem; color: var(--muted); }
.v2-devices-live-eta { text-align: right; font-variant-numeric: tabular-nums; }
.v2-devices-live-ctrl { display: flex; gap: 8px; }

.v2-devices-perm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v2-devices-perm { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 14px; border: 1px solid var(--glass-border); border-radius: 16px; background: color-mix(in srgb, var(--foreground) 4%, transparent); }
.v2-devices-perm-icon { color: var(--muted); }
.v2-devices-perm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.v2-devices-ok { display: inline-flex; color: var(--primary); }
.v2-devices-ok svg { width: 18px; height: 18px; }

.v2-devices-settings { display: flex; flex-direction: column; gap: 10px; }
.v2-devices-setting {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--surface-glass);
  color: var(--foreground);
  font: inherit;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
}
.v2-devices-setting > span { flex: 1; }
.v2-devices-setting > svg:first-child { color: var(--primary); }
.v2-devices-setting > svg:last-child { color: var(--muted); }
.v2-devices-setting:hover { border-color: var(--primary); }
.v2-devices-setting:focus-visible { outline: none; box-shadow: var(--ring); }
.v2-devices-setting.is-danger { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 12%, var(--surface-glass)); color: color-mix(in srgb, var(--danger) 75%, var(--foreground)); }
.v2-devices-setting.is-danger > svg { color: inherit; }

.v2-devices-trackpad { display: grid; place-items: center; min-height: 180px; border: 1px dashed var(--glass-border); border-radius: 18px; background: color-mix(in srgb, var(--foreground) 4%, transparent); touch-action: none; }
.v2-devices-remote-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.v2-devices-trust-list { display: flex; flex-direction: column; }

@media (max-width: 1199px) {
  .v2-devices-detail { grid-template-columns: 250px minmax(0, 1fr); }
  .v2-devices-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-devices-perm-grid { grid-template-columns: minmax(0, 1fr); }
  .v2-devices-hero-art { width: 140px; }
}
@media (max-width: 899px) {
  .v2-devices-detail { grid-template-columns: minmax(0, 1fr); }
  .v2-devices-side-list { display: none; }
}
@media (max-width: 599px) {
  /* Phone hero per the mockup: the render on the left, name + facts beside it, storage under both. */
  .v2-devices-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "art top" "art meta" "store store"; align-items: center; gap: 10px 14px; }
  .v2-devices-hero-main { display: contents; }
  .v2-devices-hero-art { grid-area: art; width: 100%; }
  .v2-devices-hero-top { grid-area: top; flex-direction: column; align-items: flex-start; gap: 6px; align-self: end; }
  .v2-devices-hero-name { font-size: 1.1875rem; }
  .v2-devices-hero-meta { grid-area: meta; flex-direction: column; align-items: flex-start; gap: 6px; font-size: .8125rem; align-self: start; }
  .v2-devices-hero-meta .v2-devices-battery { font-size: .8125rem; }
  .v2-devices-hero-meta > span > svg { width: 16px; height: 16px; }
  .v2-devices-storage { grid-area: store; max-width: none; }
  .v2-devices-detail-drop { display: none; }
  .v2-devices-actions { gap: 8px; }
  .v2-devices-action { min-height: 92px; padding: 12px 10px; }
  .v2-devices-action-label { font-size: .8125rem; }
  .v2-devices-live-row { flex-wrap: wrap; }
  .v2-devices-live-row .v2-icon-tile { width: 44px; height: 44px; }
  .v2-devices-live-main { flex-basis: calc(100% - 60px); }
  .v2-devices-live-ctrl { margin-left: auto; }
}

/* ================================================ Personal Hotspot ===== */

.v2-devices-hs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.v2-devices-hs-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.v2-devices-hs-area { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.v2-devices-hs-lead { margin: -6px 0 2px; color: var(--muted); font-size: .9375rem; }
.v2-devices-hs-list { display: flex; flex-direction: column; gap: 8px; }

/* sharing */
.v2-devices-hs-share { display: flex; flex-direction: column; gap: 16px; background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 60%), var(--surface-glass); }
.v2-devices-hs-share-head { display: flex; align-items: center; gap: 16px; }
.v2-devices-hs-beacon {
  display: grid;
  place-items: center;
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent), 0 0 calc(24px * var(--glow-scale, 1)) var(--glow);
}
.v2-devices-hs-beacon svg { width: 36px; height: 36px; }
.v2-devices-hs-share.is-off .v2-devices-hs-beacon { color: var(--muted); background: color-mix(in srgb, var(--foreground) 6%, transparent); box-shadow: none; }
.v2-devices-hs-share-names { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.v2-devices-hs-name { margin: 0; font-size: 1.25rem; font-weight: 650; overflow-wrap: anywhere; }
.v2-devices-hs-share-body { display: flex; align-items: center; gap: 16px; }
.v2-devices-hs-pw { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.v2-devices-hs-pw-field { display: flex; align-items: center; gap: 2px; min-height: 52px; padding: 0 6px 0 16px; border: 1px solid var(--glass-border); border-radius: 16px; background: color-mix(in srgb, var(--foreground) 5%, transparent); }
.v2-devices-hs-pw-text { flex: 1; min-width: 0; font-size: 1.0625rem; font-weight: 600; letter-spacing: .08em; overflow-wrap: anywhere; }
.v2-devices-hs-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; font-size: .8125rem; color: var(--muted); }
.v2-devices-qr.is-small { width: 112px; padding: 6px; border-radius: 12px; }
.v2-devices-hs-share.is-off .v2-devices-hs-share-body { opacity: .5; }

.v2-devices-hs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v2-devices-hs-stat { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 14px; border: 1px solid var(--glass-border); border-radius: 18px; background: var(--surface-glass); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.v2-devices-hs-stat > svg { color: var(--primary); }
.v2-devices-hs-stat-value { font-size: 1.0625rem; font-weight: 650; }
.v2-devices-hs-stat-label { font-size: .8125rem; color: var(--muted); }

.v2-devices-hs-row, .v2-devices-hs-net { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 10px; border-radius: 16px; }
.v2-devices-hs-row + .v2-devices-hs-row { border-top: 1px solid var(--glass-border); border-radius: 0 0 16px 16px; }
.v2-devices-hs-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.v2-devices-hs-row-text .v2-devices-os { display: inline-flex; align-items: center; gap: 6px; }
.v2-devices-hs-row-text .v2-devices-os svg { width: 14px; height: 14px; }
.v2-devices-hs-row .v2-devices-art, .v2-devices-hs-net .v2-devices-art { width: 60px; }
.v2-devices-hs-net { border: 1px solid transparent; }
.v2-devices-hs-net + .v2-devices-hs-net { border-top-color: var(--glass-border); }
.v2-devices-hs-net.is-current { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 calc(14px * var(--glow-scale, 1)) var(--glow); }
.v2-devices-hs-net.is-current + .v2-devices-hs-net { border-top-color: transparent; }
.v2-devices-os.is-paired { color: var(--primary); }
.v2-devices-hs-router { display: grid; place-items: center; flex: none; width: 60px; }
.v2-devices-hs-net .v2-btn { min-width: 76px; }
.v2-devices-hs-join .v2-devices-setting { margin-top: 6px; }
.v2-icon-btn.is-spinning svg { animation: v2-devices-spin .9s linear infinite; }

/* settings */
.v2-devices-hs-settings-list { display: flex; flex-direction: column; }
.v2-devices-hs-setting { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 4px; }
.v2-devices-hs-setting + .v2-devices-hs-setting { border-top: 1px solid var(--glass-border); }
.v2-devices-hs-setting > svg { color: var(--muted); }
.v2-devices-hs-setting-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-weight: 550; }
.v2-devices-hs-limit { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.v2-devices-hs-limit .v2-progress { flex: 1; max-width: 260px; }
.v2-devices-select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--surface-glass-strong);
  color: var(--foreground);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.v2-devices-select:focus-visible { outline: none; box-shadow: var(--ring); }

/* connected via */
.v2-devices-hs-via .v2-section { gap: 14px; }
.v2-devices-hs-via-tags { display: flex; align-items: center; gap: 10px; margin-top: -6px; }
.v2-devices-hs-via-dev { display: flex; align-items: center; gap: 14px; }
.v2-devices-hs-via-art { width: 58px; }
.v2-devices-hs-via-name { font-size: 1.125rem; font-weight: 600; }
.v2-devices-hs-speed-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--glass-border); border-radius: 18px; background: color-mix(in srgb, var(--foreground) 4%, transparent); }
.v2-devices-hs-speeds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--glass-border); }
.v2-devices-hs-speed { display: flex; align-items: center; gap: 10px; }
.v2-devices-hs-speed svg { width: 24px; height: 24px; }
.v2-devices-hs-speed.is-down svg { color: var(--primary); }
.v2-devices-hs-speed.is-up svg { color: var(--pink); }
.v2-devices-hs-speed strong { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.v2-devices-hs-usage { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 18px; }
.v2-devices-hs-usage-value { font-size: 1.75rem; font-weight: 650; letter-spacing: -.01em; }
.v2-devices-hs-chart { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v2-devices-hs-bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.v2-devices-hs-bars > span { flex: 1; height: calc(var(--h) * 100%); border-radius: 3px 3px 1px 1px; background: var(--primary); opacity: .9; }
.v2-devices-hs-bars > span.is-future { background: color-mix(in srgb, var(--foreground) 18%, transparent); opacity: 1; }
.v2-devices-hs-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.v2-devices-hs-autojoin { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 16px; border: 1px solid var(--glass-border); border-radius: 18px; font-weight: 550; }
.v2-devices-hs-autojoin > svg { color: var(--primary); }
.v2-devices-hs-autojoin > span { flex: 1; }
.v2-devices-hs-disconnect.v2-btn { min-height: 56px; border-color: color-mix(in srgb, var(--danger) 60%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); color: color-mix(in srgb, var(--danger) 75%, var(--foreground)); }
.v2-devices-hs-disconnect.v2-btn:hover { background: color-mix(in srgb, var(--danger) 20%, transparent); border-color: var(--danger); }

@media (max-width: 899px) {
  .v2-devices-hs { grid-template-columns: minmax(0, 1fr); }
  .v2-devices-hs-col { display: contents; }
  .v2-devices-hs-area.is-share { order: 1; }
  .v2-devices-hs-area.is-clients { order: 2; }
  .v2-devices-hs-area.is-settings { order: 3; }
  .v2-devices-hs-area.is-join { order: 4; }
  .v2-devices-hs-area.is-via { order: 5; }
}
@media (max-width: 599px) {
  .v2-devices-hs { gap: 12px; }
  .v2-devices-hs-beacon { width: 60px; height: 60px; }
  .v2-devices-hs-beacon svg { width: 30px; height: 30px; }
  .v2-devices-qr.is-small { width: 96px; }
  .v2-devices-hs-stats { gap: 8px; }
  .v2-devices-hs-stat { flex-direction: row; gap: 8px; padding: 8px 10px; }
  .v2-devices-hs-stat > svg { width: 20px; height: 20px; }
  .v2-devices-hs-stat-value { font-size: .9375rem; }
  .v2-devices-hs-stat-label { font-size: .75rem; }
  .v2-devices-hs-usage { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-icon-btn.is-spinning svg { animation: none; }
}
