:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --border: #161616;
  --border-active: #222222;
  --text-primary: #ffffff;
  --text-secondary: #8c8c8c;
  --text-muted: #4d4d4d;
  /* Awaiting-queue accent — amber: warm and clearly visible, distinct from the
     red alerts without competing with them. Drives the hourglass + queue modal. */
  --accent-hot: #f5a623;
  --accent-hot-soft: rgba(245, 166, 35, 0.14);
  --accent-hot-border: rgba(245, 166, 35, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-weight: 400;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(10px, 2vw, 24px);
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
}

/* While a popup overlay is open, freeze the page behind it so a tall log list scrolls
   only inside the modal and never drags the main page (no second scrollbar). The
   scrollable element is <html> (it carries `overflow-y: scroll`), so locking it is
   enough. We deliberately do NOT set overflow:hidden on <body>: that would make the
   body a block formatting context, which contains the header's negative top margin
   (its bleed to the very top) and drops the navbar down by the body padding while a
   modal is open. The modal's own list/terminal handles its internal scrolling. */
html.modal-open {
  overflow: hidden;
}

/* ── Ambient background ───────────────────────────────────────────────
   Two subtle monochrome layers, back→front:
     body::after (-4)  slow-drifting cool-white aurora haze
     .bg-fx      (-1)  always-on corner vignette */
body::after {
  content: "";
  position: fixed;
  inset: -8%;
  background:
    radial-gradient(38% 38% at 22% 30%, rgba(255, 255, 255, 0.050), transparent 70%),
    radial-gradient(34% 34% at 80% 68%, rgba(200, 210, 225, 0.038), transparent 70%),
    radial-gradient(30% 30% at 58% 18%, rgba(255, 255, 255, 0.034), transparent 70%),
    radial-gradient(40% 40% at 40% 85%, rgba(170, 180, 195, 0.032), transparent 70%);
  filter: none;
  contain: strict;
  will-change: transform, opacity;
  backface-visibility: hidden;
  z-index: -4;
  pointer-events: none;
  animation: auroraDrift 34s ease-in-out infinite alternate;
}

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Always-on corner vignette (independent of the cursor). */
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.06) 20%, rgba(0, 0, 0, 0.88) 100%);
}

@keyframes auroraDrift {
  0%   { transform: translate3d(-2%, -1.5%, 0) scale(1.035); opacity: .82; }
  50%  { transform: translate3d(1.5%, 2%, 0) scale(1.07); opacity: 1; }
  100% { transform: translate3d(2%, -2%, 0) scale(1.035); opacity: .86; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

.app-container {
  width: 100%;
  max-width: 1800px;
  margin: 0 Auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - clamp(20px, 4vw, 48px));
  min-height: calc(100svh - clamp(20px, 4vw, 48px));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  /* Bleed over the body's responsive padding so the frosted bar spans edge-to-edge
     and leaves no scrolling gap above it while stuck. */
  margin: calc(-1 * clamp(10px, 2vw, 24px)) calc(-1 * clamp(10px, 2vw, 24px)) 10px;
  padding: 6px clamp(10px, 2vw, 24px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Fully transparent — the frosted backdrop now lives on the .nav-pill and
     fades in only as you scroll (driven by setupHeaderScroll in app.js). */
  background: transparent;
}

.nav-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  /* Sit above the nav-morph SVG (z-index:-1) without needing isolation on the
     pill. This lets tooltip ::after pseudo-elements escape the pill's bounds. */
  position: relative;
  z-index: 1;
  /* Pin the buttons to the pixel grid on their own GPU layer so they never
     shimmer as the pill's backdrop recomposites underneath them. */
  transform: translateZ(0);
}

/* ───────────────────────── Nav pill (scroll draw) ──────────────────────────
   At rest nothing shows — the header is transparent and the buttons float. As
   you scroll, JS (setupHeaderScroll in app.js) draws the pill outline (the
   .nav-morph stroke) from the bottom centre outward: the bottom line draws out,
   the ends climb the sides rounding the corners, and they meet at the top to
   close the pill. In step, the pill's own translucent backdrop + blur fade in
   (background-color + --nav-blur, both set per-frame from JS). */
.nav-pill {
  position: relative;
  /* No isolation: isolate here — that created a stacking context which trapped
     tooltip z-indexes inside the pill, preventing ::after bubbles from rendering
     above other page elements. The nav-morph SVG (z-index:-1) sits behind the
     buttons (z-index:1, set on .nav-cluster below) without needing isolation. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px 11px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(var(--nav-blur, 0)) saturate(150%);
          backdrop-filter: blur(var(--nav-blur, 0)) saturate(150%);
  /* Keep the pill on a stable GPU layer so fading the backdrop-filter in/out
     per scroll frame doesn't re-snap pixels (which jittered the icons + outline
     on mobile during fast scroll). */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}

.nav-morph {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1; /* behind the buttons, inside this stacking context */
  overflow: visible;
  pointer-events: none;
}

.nav-morph path {
  fill: none;
  stroke: var(--border-active);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mute-toggle-btn,
.queue-toggle-btn,
.logs-toggle-btn,
.profile-toggle-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: radial-gradient(circle at 50% 35%, #161616 0%, #0a0a0a 70%, #060606 100%);
  border: 1.5px solid #2c2c2c;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.04), 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.mute-toggle-btn:focus-visible,
.queue-toggle-btn:focus-visible,
.logs-toggle-btn:focus-visible,
.profile-toggle-btn:focus-visible {
  outline: none;
  border-color: var(--text-secondary);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

/* ── Custom tooltips ──────────────────────────────────────────────────────
   Our dark, bordered tooltip below each nav button (header sits at the top).
   ::after is the label, ::before the little upward caret. Shown on hover
   (fine-pointer devices) or keyboard focus; hidden on touch. */
.nav-cluster [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.97);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 400;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-cluster [data-tooltip]::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  border: 5px solid transparent;
  border-bottom-color: var(--border-active);
  pointer-events: none;
  opacity: 0;
  z-index: 400;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-cluster [data-tooltip]:focus-visible::after,
.nav-cluster [data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .nav-cluster [data-tooltip]:hover::after,
  .nav-cluster [data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.mute-toggle-btn svg,
.profile-toggle-btn svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  pointer-events: none;
}

.logs-toggle-btn svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.logs-toggle-btn.is-active {
  color: var(--text-primary);
  border-color: #3d3d3d;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06), 0 0 10px rgba(255, 255, 255, 0.12);
}

/* Event-driven glow when an alert fires (chime/push relayed to the open tab). */
.profile-toggle-btn.bell-alerting {
  color: var(--text-primary);
  border-color: rgba(255, 59, 48, 0.6);
  animation: bellAlertGlow 1.1s ease;
}

.queue-toggle-btn svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

/* ── Animated hourglass ───────────────────────────────────────────────
   One 2.8s loop, glass stays upright (no flip): sand drains top→bottom over
   the first half while a thin stream falls, then the flow reverses — sand
   climbs back bottom→top over the second half — and the loop repeats. */
.hourglass .hg-frame {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hourglass .hg-sand {
  fill: currentColor;
  transform-box: fill-box;
}

.hourglass .hg-stream {
  fill: currentColor;
  opacity: 0;
}

.hourglass .hg-rotor {
  transform-box: fill-box;
  transform-origin: center;
}

.queue-toggle-btn.has-queue .hg-sand-top {
  animation: hgDrainTop 2.8s ease-in-out infinite;
}

.queue-toggle-btn.has-queue .hg-sand-bot {
  animation: hgFillBot 2.8s ease-in-out infinite;
}

.queue-toggle-btn.has-queue .hg-stream {
  animation: hgStream 2.8s linear infinite;
}

/* Hover: no glass flip — instead the sand fills BOTH chambers, growing out from
   the neck toward each end, and holds full while hovered. The awaiting modal
   (aria-expanded) still just snaps the sand to its full resting state. */
.queue-toggle-btn.has-queue:hover .hg-sand-top {
  animation: hgHoverFillTop 0.55s ease-out forwards;
}
.queue-toggle-btn.has-queue:hover .hg-sand-bot {
  animation: hgHoverFillBot 0.55s ease-out forwards;
}
.queue-toggle-btn.has-queue[aria-expanded="true"] .hg-sand-top,
.queue-toggle-btn.has-queue[aria-expanded="true"] .hg-sand-bot,
.queue-toggle-btn.has-queue[aria-expanded="true"] .hg-stream {
  animation: none;
}

.queue-toggle-btn.has-queue:hover .hg-stream,
.queue-toggle-btn.has-queue[aria-expanded="true"] .hg-stream {
  animation: none;
  opacity: 0;
}

/* Both chambers fill from the neck outward — top grows upward, bottom grows
   downward — so the sand appears to fill to both sides. */
@keyframes hgHoverFillTop {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}
@keyframes hgHoverFillBot {
  from { transform: scaleY(0); transform-origin: top; }
  to   { transform: scaleY(1); transform-origin: top; }
}

/* Top chamber: drains over the first half (surface lowers toward the neck), holds
   empty at the turn, then refills over the second half as the flow reverses. The
   origin stays pinned at the neck (bottom) so it both shrinks toward and grows from
   the neck. */
@keyframes hgDrainTop {
  0% { transform: scaleY(1); transform-origin: bottom; }
  42% { transform: scaleY(0); transform-origin: bottom; }
  50% { transform: scaleY(0); transform-origin: bottom; }
  92% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(1); transform-origin: bottom; }
}

/* Bottom chamber: mirror of the top — fills over the first half, holds full at the
   turn, then drains back over the second half. */
@keyframes hgFillBot {
  0% { transform: scaleY(0); transform-origin: bottom; }
  42% { transform: scaleY(1); transform-origin: bottom; }
  50% { transform: scaleY(1); transform-origin: bottom; }
  92% { transform: scaleY(0); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Stream visible while sand moves in either direction, off at the two turns. */
@keyframes hgStream {
  0%, 3% { opacity: 0; }
  6%, 40% { opacity: 0.9; }
  44%, 56% { opacity: 0; }
  60%, 94% { opacity: 0.9; }
  97%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .queue-toggle-btn.has-queue .hg-rotor,
  .queue-toggle-btn.has-queue .hg-sand-top,
  .queue-toggle-btn.has-queue .hg-sand-bot,
  .queue-toggle-btn.has-queue .hg-stream {
    animation: none;
  }
  .queue-toggle-btn.has-queue .hg-stream { opacity: 0; }
}

@media (hover: hover) and (pointer: fine) {
  .mute-toggle-btn:hover,
  .queue-toggle-btn:hover,
  .logs-toggle-btn:hover,
  .profile-toggle-btn:hover {
    color: var(--text-primary);
    border-color: #3d3d3d;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06), 0 2px 10px rgba(0, 0, 0, 0.6);
  }

  /* Hover comes alive: the log page lifts + tilts, the bell rings. The hourglass
     no longer flips — its sand fills both chambers (see the hg-sand hover rules). */
  .logs-toggle-btn:hover svg {
    animation: logsHoverNudge 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .mute-toggle-btn:hover svg {
    transform-origin: 50% 18%;
    animation: bellHoverSwing 0.7s ease;
  }
}

@keyframes logsHoverNudge {
  0%   { transform: translateY(0) rotate(0); }
  45%  { transform: translateY(-2.5px) rotate(-6deg); }
  75%  { transform: translateY(0) rotate(3deg); }
  100% { transform: translateY(0) rotate(0); }
}

@keyframes bellHoverSwing {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-17deg); }
  40% { transform: rotate(13deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(4deg); }
}

/* Event-driven (not hover): the bell rings + glows whenever an alert fires — the 90'
   next-goal chime or a push relayed to the open tab. */
.mute-toggle-btn.bell-alerting {
  color: var(--text-primary);
  border-color: rgba(255, 59, 48, 0.6);
  animation: bellAlertGlow 1.1s ease;
}
.mute-toggle-btn.bell-alerting svg {
  transform-origin: 50% 18%;
  animation: bellAlertSwing 1.1s ease;
}
@keyframes bellAlertGlow {
  0%, 100% { box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.04), 0 2px 6px rgba(0, 0, 0, 0.5); }
  30% { box-shadow: 0 0 15px 2px rgba(255, 59, 48, 0.55); }
}
@keyframes bellAlertSwing {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(-22deg); }
  25% { transform: rotate(18deg); }
  40% { transform: rotate(-13deg); }
  55% { transform: rotate(9deg); }
  70% { transform: rotate(-5deg); }
  85% { transform: rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .logs-toggle-btn:hover svg,
  .mute-toggle-btn:hover svg,
  .queue-toggle-btn.has-queue:hover .hg-sand-top,
  .queue-toggle-btn.has-queue:hover .hg-sand-bot,
  .mute-toggle-btn.bell-alerting,
  .mute-toggle-btn.bell-alerting svg {
    animation: none;
  }
}

.mute-toggle-btn.is-muted {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.55);
}

@media (hover: hover) and (pointer: fine) {
  .mute-toggle-btn.is-muted:hover {
    color: #ff6b6b;
    border-color: rgba(239, 68, 68, 0.8);
  }
}

.queue-toggle-btn.has-queue {
  color: var(--accent-hot);
  border-color: var(--accent-hot-border);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 12px var(--accent-glow);
}

@media (hover: hover) and (pointer: fine) {
  .queue-toggle-btn.has-queue:hover {
    color: var(--accent-hot);
    border-color: var(--accent-hot-border);
  }
}

.queue-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Empty queue: badge stays muted to match the idle hourglass colour. */
  background: var(--text-secondary);
  color: #0a0a0a;
  font-size: 10px;
  font-weight: 800;
  font-family: monospace;
  line-height: 1;
  border-radius: 9px;
  border: 2px solid #000000;
  box-sizing: border-box;
  box-shadow: none;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.queue-badge[hidden] { display: none; }

/* Active queue: badge lights up amber alongside the lit hourglass. */
.queue-toggle-btn.has-queue .queue-badge {
  background: color-mix(in srgb, var(--accent-hot) 82%, white);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* System-log badge — same shape/placement as the awaiting badge, but tinted the
   system-exclusion red (matches the logger status dot). Only shown when there is
   at least one active exclusion (hidden via [hidden] otherwise). */
.logs-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ff6a60 0%, #ff3b30 100%);
  color: #0a0a0a;
  font-size: 10px;
  font-weight: 800;
  font-family: monospace;
  line-height: 1;
  border-radius: 9px;
  border: 2px solid #000000;
  box-sizing: border-box;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.5);
}

.logs-badge[hidden] { display: none; }

/* Light the button itself red while exclusions are present. */
.logs-toggle-btn.has-logs {
  color: var(--text-primary);
  border-color: rgba(255, 59, 48, 0.55);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 12px rgba(255, 59, 48, 0.3);
}

.view-viewport {
  width: 100%;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view-pane {
  width: 100%;
  box-sizing: border-box;
  padding: 0 10px;
  display: none;
  opacity: 0;
}

.view-live-active .pane-live {
  display: block;
  animation: paneFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes paneFadeIn {
  from {
    opacity: 0;
    transform: scale(0.99) translateY(4px);
  }
  to {
    opacity: 1;
    /* Resting state MUST be `none`, not `scale(1)`: a lingering non-none
       transform (kept alive by `forwards`) turns .pane-live into the containing
       block for the position:fixed .no-matches-placeholder, so its top:50% would
       resolve against the collapsed pane (top of page) instead of the viewport.
       `none` lets the placeholder centre against the real viewport. */
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .view-pane {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(12px, 2vw, 20px);
  width: 100%;
  margin-top: 10px;
  margin-bottom: 20px;
  position: relative;
  justify-content: center;
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 340px));
    justify-content: center;
  }
}

/* Live pane centers its content (grid stretches full width). Must match the
   specificity of `.view-live-active .pane-live { display: block }` to win. */
.view-live-active .pane-live {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Vertically centre the cards (and the empty-state placeholder) in the pane.
     `safe center` keeps them centred when they fit, but falls back to top-aligned
     once the grid is taller than the viewport so nothing gets clipped above the
     scroll origin. The height chain is app-container(min-height:100vh, flex col)
     → view-viewport(flex:1, flex col) → pane-live(flex:1). */
  justify-content: safe center;
  flex: 1 1 auto;
  min-height: 0;
  /* Small mobile default: on a phone a single card already nearly fills 100svh
     (shrunk further by the URL bar), so a large bottom nudge would push the
     document past the viewport and force a page scrollbar even with one card.
     The desktop nudge below re-applies the taller spacing on wider screens. */
  padding-bottom: 16px;
}
/* Desktop lift: nudge the vertically-centred cards higher under the header so they
   don't sit dead-centre. Gated on viewport HEIGHT, not just width — a card with the
   timeline is ~630px tall, so on a short desktop window the reserved bottom space
   would push the document past the viewport and force a page scrollbar (same overflow
   the mobile fix addressed). Short windows: no nudge (cards fit, no scrollbar). Tall
   monitors: the full lift. Tiered so the nudge scales with the spare vertical room. */
@media (min-width: 768px) and (min-height: 860px) {
  .view-live-active .pane-live { padding-bottom: 8vh; }
}
@media (min-width: 768px) and (min-height: 1000px) {
  .view-live-active .pane-live { padding-bottom: 14vh; }
}
.pane-live .dashboard-grid { align-self: stretch; }

/* Empty state only: nudge the AWAITING placeholder slightly above true centre.
   The base .pane-live rule already centres vertically; the bottom padding here
   pushes the flex-centred box upward so it reads as better balanced under the
   header. (Cards use plain `safe center` from the base rule.) */
.view-live-active .pane-live:has(.no-matches-placeholder) {
  justify-content: safe center;
  padding-bottom: 12vh;
}

.no-matches-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #020202;
  border: 1px solid var(--border-active);
  border-radius: 8px;
  padding: 16px 32px;
  color: var(--text-muted);
  font-size: 11px !important;
  line-height: 16px !important;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* In-flow box; the parent pane (.pane-live:has(...)) centres it vertically and
     the grid (justify-self) centres it horizontally. No position:fixed — that was
     fragile against transformed/animated ancestors becoming the containing block,
     which pinned it to the top. */
  position: static;
  margin: 0 auto;
  max-width: 320px;
  width: calc(100% - 32px);
  text-align: center;
  grid-column: 1 / -1;
  justify-self: center;
}

.awaiting-modal-overlay[hidden] {
  display: none;
}

.awaiting-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  /* Vertically centred. The panel grows symmetrically as rows are added (so it
     shifts higher while staying centred) until it hits max-height:100%, after
     which the inner list scrolls. `safe` falls back to top-aligned if the panel
     ever exceeds the viewport, so nothing clips above the scroll origin. */
  align-items: safe center;
  justify-content: center;
  padding: clamp(12px, 5vh, 64px) 16px;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.awaiting-modal-overlay.is-open {
  opacity: 1;
}

.awaiting-modal-panel {
  width: 100%;
  max-width: 720px;
  /* Never taller than the overlay's content box (viewport minus its paddings).
     This is what makes the overlay's own overflow-y:auto NEVER engage: the panel
     is structurally clamped to the available space and the inner list/terminal
     scrolls instead. Replaces the old fragile JS pixel-sizing. */
  max-height: 100%;
  min-height: 0;
  background-color: #020202;
  border: 1px solid var(--border-active);
  border-radius: 12px;
  /* overflow:visible so ::after tooltip pseudo-elements on header buttons (e.g.
     the export link) can render outside the panel bounds without being clipped.
     Corner rounding is handled by giving each scrollable child its own explicit
     border-bottom-radius + overflow:hidden instead (see .awaiting-list and
     .logger-terminal below). */
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.awaiting-modal-overlay.is-open .awaiting-modal-panel {
  transform: translateY(0) scale(1);
}

.awaiting-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  padding: 5px;
  margin-left: 4px;
  background-color: #121212;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

.awaiting-close-btn svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .awaiting-close-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-active);
  }
}

/* Export-log button — sits in the SYSTEM EXCLUSION LOG header, left of the close button. Same
   chip shape as the close button; opens the permanent /api/system-log.json in a new tab. */
.logs-export-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  padding: 5px;
  background-color: #121212;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

.logs-export-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .logs-export-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-active);
  }
}

/* Tooltip — same dark bubble as the nav/brand tooltips, anchored below the button. */
.logs-export-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.97);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 400;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.logs-export-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .logs-export-btn[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.awaiting-header {
  padding: 10px 24px;
  height: auto;
  background-color: #050505;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.awaiting-status-dot {
  width: 8px;
  height: 8px;
  background-color: #555;
  border-radius: 50%;
}

.awaiting-status-dot.is-active {
  background-color: var(--accent-hot);
  box-shadow: 0 0 8px 1px rgba(245, 166, 35, 0.6);
}

.awaiting-header h2 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  margin: 0;
  margin-right: auto;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.awaiting-count {
  font-size: 12px;
  font-family: monospace;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  background-color: #121212;
  border: 1px solid var(--border);
  padding: 5px 12px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.awaiting-list {
  padding: 8px;
  max-height: min(70vh, 620px);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #000000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  /* Explicit radius (not inherit) + overflow:hidden so the #000000 background
     is painted with rounded corners, masking the square-corner bleed without
     affecting the header's tooltip (which lives in a sibling element above). */
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.awaiting-list::-webkit-scrollbar { width: 4px; }
.awaiting-list::-webkit-scrollbar-track { background: transparent; }
.awaiting-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.awaiting-empty-state {
  text-align: center;
  padding: 32px 16px;
  font-size: 11px !important;
  line-height: 16px !important;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  font-style: italic;
}

.awaiting-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  background-color: #030303;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .awaiting-row:hover {
    border-color: var(--border-active);
    background-color: #050505;
  }
}

.awaiting-row-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.awaiting-min {
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--accent-hot);
  background-color: var(--accent-hot-soft);
  border: 1px solid var(--accent-hot-border);
  /* Tighter right padding: monospace renders the apostrophe in a full-width cell,
     so equal padding looks like trailing space after the "'". */
  padding: 3px 5px 3px 8px;
  border-radius: 5px;
  text-align: left;
  flex-shrink: 0;
}

.awaiting-league {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-right: auto;
  /* Full league name, wrapping to a second line rather than truncating. */
  overflow-wrap: anywhere;
  padding-top: 2px;
}

.awaiting-1w-link {
  flex-shrink: 0;
  height: 18px;   /* keep prior size here; the 22px bump is only for the card pill (matches the star) */
}

.awaiting-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.awaiting-team {
  flex: 1 1 0;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: var(--text-primary);
  /* Show the full club name — wrap instead of clipping with an ellipsis. */
  overflow-wrap: anywhere;
}

.awaiting-team-home { text-align: right; }
.awaiting-team-away { text-align: left; }

.awaiting-score {
  font-family: monospace;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  background-color: #0a0a0a;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 6px;
  flex-shrink: 0;
}

.awaiting-row-eta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.awaiting-eta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.awaiting-eta-value {
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

@media (max-width: 767px) {
  /* Full-screen sheet: panel fills the viewport, header stays pinned at the
     top and only the list scrolls inside it (mirrors the desktop behaviour). */
  .awaiting-modal-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
  }
  .awaiting-modal-panel {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: translateY(0) scale(1);
  }
  .awaiting-modal-overlay .awaiting-modal-panel {
    transform: translateY(8px);
  }
  .awaiting-modal-overlay.is-open .awaiting-modal-panel {
    transform: translateY(0);
  }
  .awaiting-header {
    /* Pinned header — clears the status bar / notch via safe-area inset. */
    flex-shrink: 0;
    height: auto;
    min-height: 52px;
    padding: 10px 18px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    gap: 8px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
  .awaiting-header h2 {
    font-size: 12px;
    letter-spacing: 0.12em;
  }
  .awaiting-count {
    font-size: 11px;
    padding: 4px 9px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
  }
  .awaiting-header .awaiting-close-btn {
    width: 24px;
    height: 24px;
    padding: 4px;
    box-sizing: border-box;
  }
  .awaiting-header .awaiting-close-btn svg {
    width: 13px;
    height: 13px;
  }
  .awaiting-list {
    /* The only scrolling region; fills the remaining height under the header. */
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    padding: 8px 6px calc(16px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }
  .awaiting-row {
    padding: 11px 12px;
  }
  .awaiting-team {
    font-size: 13px;
  }
  .awaiting-score {
    font-size: 15px;
    padding: 3px 10px;
  }
  /* Cap the other-markets list to exactly 4 rows before scrolling. !important is required because
     the base .odds-other-list rule appears LATER in the file (same specificity), so without it the
     desktop 100px wins on source order and a 5th row peeks through. ~21px/row + 1px gap → 88px. */
  .odds-other-list {
    height: 88px !important;
  }
}

.match-card {
  background-color: #020202;
  border: 1px solid var(--border);
  border-radius: 12px;
  /* visible (not hidden) so the header pills' data-tooltip can hang below the
     card edge without being clipped. Nothing inside paints to the rounded
     corners (header is bg-less, body content is inset by 14-16px padding), so
     dropping the clip costs no corner rounding. */
  overflow: visible;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: scale(1);
  transition: transform 0.3s ease, opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  height: 100%;
}

.match-card.no-goal-entry-active {
  border-color: var(--accent-hot-border);
  box-shadow:
    0 0 0 1px var(--accent-hot-soft),
    0 0 14px var(--accent-hot-soft);
}

.match-card.removing {
  opacity: 0;
  transform: scale(0.93) translateY(16px);
  pointer-events: none;
}

.card-header {
  padding: 0 14px;
  /* Min height keeps the header at 40px when the league name is short;
     the row auto-expands for multi-line names instead of truncating. */
  min-height: 40px;
  height: auto;
  padding-top: 6px;
  padding-bottom: 6px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  /* Grow so the league name takes all space before the right-side buttons,
     and set min-width:0 so the flex child (card-logo-text) can shrink/wrap. */
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.card-logo-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-transform: uppercase;
  /* Allow long league names to wrap to a second line instead of overflowing
     or being truncated. overflow-wrap:anywhere handles strings with no natural
     break points (e.g. very long single words / abbreviation chains). */
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.pulse-dot.active {
  background-color: #ef4444;
  box-shadow: 0 0 7px 1px rgba(239, 68, 68, 0.75);
}

.card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  min-height: 650px;
}

.match-view-toggle {
  appearance: none;
}

.match-view-toggle.is-active {
  border-color: rgba(245, 166, 35, 0.78);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.16), 0 0 10px rgba(245, 166, 35, 0.2);
}

.match-view-toggle.is-loading .brand-1w-logo {
  animation: match-view-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes match-view-pulse { to { opacity: 0.35; } }

.match-view-panel {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 0 0 11px 11px;
  background: #050505;
}

/* The native Windows/Android WebView is layered directly over this reserved
   card surface. Legacy framebuffer controls stay out of layout entirely. */
.match-view-panel > :is(.match-view-display, .match-view-tools, .match-view-soft-input) {
  display: none !important;
}

/* The viewer is a replacement for the card body, never an additional row.
   Explicit !important rules avoid author display:flex defeating [hidden]. */
.card-body[hidden],
.match-view-panel[hidden],
.match-card.is-match-viewing .card-body {
  display: none !important;
}

.match-card.is-match-viewing .match-view-panel:not([hidden]) {
  display: block !important;
}

.match-view-display {
  position: absolute;
  inset: 0 0 30px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  background: #050505;
  touch-action: none;
}

.match-view-display > div {
  flex: 0 0 auto;
}

.match-view-status {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  background: rgba(3, 3, 3, 0.94);
}

.match-view-status[hidden] { display: none; }
.match-view-status.is-error { color: #fca5a5; }
.match-view-status b { max-width: 270px; font-size: 12px; line-height: 1.5; }
.match-view-spinner { width: 22px; height: 22px; border: 2px solid #292929; border-top-color: var(--accent-hot, #f5a623); border-radius: 50%; animation: match-view-spin .8s linear infinite; }
@keyframes match-view-spin { to { transform: rotate(360deg); } }

.match-view-tools {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  background: #090909;
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.match-view-tools button {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 7px;
  color: var(--text-secondary);
  background: #111;
  font: inherit;
  cursor: pointer;
}

.match-view-soft-input {
  position: fixed;
  left: -9999px;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.score-row-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 96px;
  margin-bottom: 14px;
}

.teams-score-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 48px;
}

.team-name-lbl {
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--text-secondary);
  text-transform: uppercase;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow-wrap: anywhere;
}

.team-name-lbl.name-size-md {
  font-size: 11.5px !important;
}
.team-name-lbl.name-size-sm {
  font-size: 10px !important;
}
.team-name-lbl.name-size-xs {
  font-size: 9px !important;
  letter-spacing: -0.02em;
}

.home-team-lbl { text-align: right; }
.away-team-lbl { text-align: left; }

.match-score {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: monospace;
  background: #000000;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.match-score-text {
  font-family: monospace;
  font-size: 18px;
  font-weight: bold;
}

.match-live-phase {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 6px;
  transition: color 0.2s ease;
}

.match-live-phase.live-active { color: #ef4444; }

.match-live-time {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin-top: 2px;
  transition: color 0.2s ease;
}

.match-live-time.live-active { color: #ef4444; }

.odds-wrapper {
  border-top: 1px solid #111111;
  padding-top: 12px;
  margin-top: 12px;
}

.odds-header {
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  text-align: center;
}

/* Single bordered container holding the two pinned markets (Full Time Result + No-Goal) and,
   below a divider, the other-markets accordion. The accordion list has its own fixed height and
   scrolls internally, so opening/closing a row never changes this container's height — the card
   stays put on hover. */
.odds-combined {
  position: relative;   /* anchor for the centered suspend banner */
  background-color: #030303;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  box-sizing: border-box;
  /* Fixed height: tall enough for the fullest state (FTR + No-Goal + the Other-markets head and its
     100px internal-scroll list ≈ 209px of content). Every other state — two markets only, or the
     suspend banner — pads up to the same height so the box never changes size and the timeline below
     stays pinned regardless of suspend/market state. */
  min-height: 210px;
  display: flex;
  flex-direction: column;
}

.odds-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* Borderless — the .odds-combined wrapper provides the frame. Base well height;
     the Next-goal list overrides it below. */
  height: 68px;
  max-height: 68px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* When the market list overflows, JS toggles .odds-scroll so the scrollbar (incl. mobile
   overlay bars) rides beside the values instead of on top of them. No overflow → no
   padding → no empty gap. */
.odds-list.odds-scroll { padding-right: 8px; }

.odds-list::-webkit-scrollbar { width: 4px; }
.odds-list::-webkit-scrollbar-track { background: transparent; }
.odds-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.odds-list::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Next-goal market: a single "No Goal" row (the parser surfaces only that outcome). Its
   height is reserved like Full Time Result so the box stays a constant size whether or not
   the market is priced — a card showing neither FTR nor No-Goal is the same height as one
   showing both, which keeps the "Other markets open" footer pinned at the same place. */
.odds-list--nextgoal {
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  overflow: hidden;
}

/* Full Time Result market: a single row — "Full time result" label + the three 1/X/2
   prices inline on the right. */
.odds-list--fulltime {
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  overflow: hidden;
}
.odds-row--ftr .ftr-vals {
  display: flex;
  gap: 4px;
  align-items: center;
}

.odds-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  height: 20px;
  flex-shrink: 0;
}

.odds-line { font-weight: 500; transition: color 0.6s ease; }
.odds-val {
  font-family: monospace;
  color: #22c55e;
  font-weight: 600;
  background: #000;
  display: inline-flex;
  align-items: center;
  height: 18px;
  box-sizing: border-box;
  padding: 0 6px;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

/* ≤1.05 — "take action": red text + pulsing box outline, no row fill. */
.odds-row-action .odds-line { color: #f87171; font-weight: 700; }
.odds-row-action .odds-val {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.65);
  animation: oddsActionPulse 1.4s ease-in-out infinite;
}

@keyframes oddsActionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 7px 1px rgba(239, 68, 68, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
  .odds-row-action .odds-val { animation: none; }
}

/* Full Time Result + No-Goal share one container and read as a single merged list — no
   divider line between them (the bet signal is "both blocks visible at once"). Just a small
   gap so the 1/X/2 rows don't collide with the No-Goal row. */
.odds-section { position: relative; }
.odds-section + .odds-section {
  margin-top: 4px;
}

/* Full-event suspend badge — shown when 1win is not accepting bets; both market rows are hidden
   (their states forced "off") so this is the only thing in the odds box. A small, dark, muted pill
   centered in the box — deliberately low-key (theme grays, not amber) so a brief suspend reads as
   "paused", not an alarm. */
.odds-suspend {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: calc(100% - 24px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: #0a0a0a;
  border: 1px solid var(--border-active);
  border-radius: 5px;
  padding: 5px 10px;
  text-align: center;
}
.odds-suspend[hidden] { display: none; }

/* When a market is off it collapses entirely (no reserved gap). */
.odds-section.is-off { display: none; }

/* Exception: Full Time Result AND No-Goal each keep their single-row height reserved even
   when off, so the box is a constant size regardless of which markets are active — a card
   showing neither row stays the same height as one showing both, keeping the "Other markets
   open" footer at the same vertical position. The row is hidden (no label/prices) but its
   20px box still occupies space. */
.odds-section--fulltime.is-off,
.odds-section--nextgoal.is-off {
  display: block;
  visibility: hidden;
}

/* The section header sits above its list; both sections reuse .odds-header. */
.odds-section .odds-header { margin-bottom: 6px; }

.odds-placeholder {
  display: flex;
  align-items: center;
  /* Left-aligned so the placeholder lines up with the real market labels ("Full time result",
     "Other markets open") — a centred placeholder broke the column when a market was absent. */
  justify-content: flex-start;
  height: 100%;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  font-style: italic;
}

/* Compact "all other markets" list under the No-Goal block: every market still live on the
   fixture besides FTR + No-Goal, each with its legs as small label+odds chips. Separated from the
   two pinned markets by a divider; scrolls internally when many markets are open. Driven straight
   off the odds payload, so a suspended market shows muted and a removed one disappears at once. */
.odds-other {
  position: relative;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.odds-other[hidden] { display: none; }

.odds-other-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}
.odds-other-count {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: #000;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}


/* One ROW per market — full-width name header; the odds for a market reveal inline when its row is
   open (hover on desktop, tap on mobile), so the default view is a clean vertical list of names.
   The list has a FIXED height with internal scroll, so opening a row scrolls inside the panel and
   never grows the card (no height shift on hover). */
.odds-other-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  height: 100px;          /* fits 4 market rows (~22px each + 1px gaps) without scrolling; 5+ scroll */
  overflow-y: auto;
  overflow-x: hidden;
  /* Hidden scrollbar keeps wheel/touch scrolling while leaving the right edge clear. */
  scrollbar-width: none;  /* scrollable, but no visible scrollbar stealing the right edge */
  -ms-overflow-style: none;
}
.odds-other-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* No box around a row — the label stays flush-left with the FTR/No-Goal labels above. "Open" is
   signalled by the rotated chevron, the brighter label, and the revealed odds below. */
.odds-mkt-row { border-radius: 5px; }
.odds-mkt-row.is-suspended { opacity: 0.5; }

.odds-mkt-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
  /* Match the Full Time Result / No-Goal rows so the market labels read as one continuous list:
     same 11px size and the same left edge (no extra horizontal padding — the row border is
     transparent and accounted for so the text starts flush with "Full time result" above). */
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease;
}
.odds-mkt-head:hover,
.odds-mkt-row.is-open .odds-mkt-head { color: var(--text-primary); }
.odds-mkt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Chevron that rotates when the row opens.
   margin-top: -2px nudges the chevron's visual centre up to match the badge's
   vertical centre. The badge (.odds-other-count) is ~15px tall (11px font +
   2px padding + 2px border); the chevron is 6px — flex align-items:center puts
   the chevron ~2px below the badge midpoint without the nudge. The correction is
   the same for 1-digit and 2-digit counts because the badge height never changes
   (only its width does). */
.odds-mkt-chev {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(-45deg);   /* points right when closed */
  transition: transform 0.18s ease;
  margin-top: -2px;
  margin-right: 8px;
}
.odds-mkt-row.is-open .odds-mkt-chev { transform: rotate(45deg); border-color: #22c55e; } /* points down */

/* Inline detail: the market's legs as chips. Always in the DOM (empty when closed) so the row's
   layout box is stable; shown only when open. */
.odds-mkt-detail {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 0 8px;
}
.odds-mkt-row.is-open .odds-mkt-detail { display: flex; }
.odds-chip-mkt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: monospace;
  font-size: 10px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
.odds-chip-mkt .chip-leg { color: var(--text-secondary); font-weight: 500; }
.odds-chip-mkt .chip-odd { color: #22c55e; font-weight: 700; }
.odds-mkt-empty { font-size: 10px; color: var(--text-muted); font-style: italic; }

/* Suspended market: amber SUSP tag on the name. */
.odds-other-susp {
  margin-left: 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0b232;
  border: 1px solid rgba(240, 178, 50, 0.4);
  border-radius: 3px;
  padding: 0 3px;
  vertical-align: middle;
}

.skeleton-container { display: none; position: absolute; top: 16px; left: 20px; right: 20px; bottom: 16px; }
.is-loading .skeleton-container { display: block; }
.is-loading .score-row-wrapper,
.is-loading .odds-wrapper,
.is-loading .timeline-container { opacity: 0; pointer-events: none; }

.score-row-wrapper, .odds-wrapper, .timeline-container { opacity: 1; transition: opacity 0.3s ease; }
.skeleton-scoreboard { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; }
.skeleton-pred { text-align: center; }

@keyframes skeletonPulse { 0% { background-color: #121212; } 50% { background-color: #222222; } 100% { background-color: #121212; } }

.skeleton-element { background-color: #121212; animation: skeletonPulse 1.5s infinite ease-in-out; border-radius: 4px; }
.skeleton-timeline { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.skeleton-timeline .skeleton-text { margin-bottom: 12px; }
.skeleton-timeline .skeleton-box { width: 100%; height: 32px; border-radius: 4px; margin-bottom: 8px; }
.skeleton-timeline .skeleton-box:last-child { margin-bottom: 0; }

.timeline-container {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
}

.timeline-header { font-size: 9px; letter-spacing: 0.18em; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.timeline-header-title { white-space: nowrap; }

.event-log {
  background-color: #000000;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 8px;
  height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  contain: content;
}

.timeline-period-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #050505;
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-top: 12px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.timeline-period-header:first-child { margin-top: 0; }
.period-score { font-family: monospace; font-size: 10px; color: var(--text-primary); }

.timeline-empty-period {
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  background-color: #080808;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.timeline-row-compact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 8px;
  background-color: #080808;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.timeline-row-compact:last-child {
  margin-bottom: 0;
}

.tl-time {
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 28px;
  margin-top: 1px;
}

.tl-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.tl-icon svg {
  width: 16px !important;
  height: 16px !important;
}

.tl-event {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.event-log::-webkit-scrollbar { width: 4px; }
.event-log::-webkit-scrollbar-track { background: transparent; }
.event-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.event-log::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.brand-link-1w {
  position: relative;   /* anchor for the data-tooltip pseudo-elements */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #0d0d0d;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 0 6px;
  height: 22px;            /* match the favorite (star) button exactly — same 22px pill height */
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.05em;
  line-height: 17px;
  box-sizing: border-box;
}

/* The 1win wordmark tinted to match the favorite star's colour (--text-secondary #8c8c8c). invert(1)
   flips the black source to white (keeping the antialiased edges darker so the "1W" stays outlined,
   not a flat blob), then brightness(0.55) drops the white strokes to ~#8c8c8c — the same grey as the
   star's default fill. Height drives the size; width auto preserves the ~2:1 ratio. One rule covers
   all three pill variants (card, log list, awaiting). */
.brand-1w-logo {
  height: 10px;
  width: auto;
  display: block;
  filter: invert(1) brightness(0.55);
}
/* Slightly smaller logo in the compact log-list pill (16px tall). */
.log-1w-link .brand-1w-logo,
.awaiting-1w-link .brand-1w-logo { height: 9px; }

@media (hover: hover) and (pointer: fine) {
  .brand-link-1w:hover {
    background-color: #0d0d0d;
    color: var(--text-primary);
    /* Softer than straight white — a muted white-grey so the hover reads as a gentle highlight. */
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

.brand-link-1w:active { transform: translateY(0); }

.log-1w-link {
  height: 16px;
  font-size: 10px;
  line-height: 15px;
  padding: 0 5px;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.favorite-card-btn {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: #0d0d0d;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  flex: 0 0 auto;
}

.favorite-card-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .favorite-card-btn:hover {
    color: #f5a623;
    border-color: rgba(245, 166, 35, 0.55);
  }
}

.favorite-card-btn.is-active {
  color: #f5a623;
  background-color: #0d0d0d;
  border-color: #f5a623;
  box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.2);
}

.favorite-card-btn:active {
  transform: translateY(1px);
}

/* ── Favorite-button tooltip ──────────────────────────────────────────────
   Same dark, bordered look as the nav-cluster tooltips. Centred horizontally
   below the button with the caret pointing up — the 1W brand link to its right
   leaves enough room that the centred bubble stays inside the card's clipped
   bounds. Shown on hover (fine pointers) or focus. */
.favorite-card-btn {
  position: relative;
}

.favorite-card-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.97);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 400;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.favorite-card-btn[data-tooltip]::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  border: 5px solid transparent;
  border-bottom-color: var(--border-active);
  pointer-events: none;
  opacity: 0;
  z-index: 400;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.favorite-card-btn[data-tooltip]:focus-visible::after,
.favorite-card-btn[data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .favorite-card-btn[data-tooltip]:hover::after,
  .favorite-card-btn[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ── 1W brand-link tooltip ────────────────────────────────────────────────
   Same dark bubble as the favorite/nav tooltips, centred under the pill: both
   caret and bubble use left:50% + translateX(-50%) so they line up on the
   logo's middle. */
/* brand-link tooltip removed in favor of global js tooltips */

.logger-header {
  padding: 10px 24px;
  height: auto;
  background-color: #050505;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.logger-status-dot {
  width: 8px;
  height: 8px;
  background-color: #555;
  border-radius: 50%;
}

.logger-status-dot.is-active {
  background-color: #ff3b30;
  box-shadow: 0 0 8px 1px rgba(255, 59, 48, 0.7);
}

.logger-header h2 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  margin: 0;
  margin-right: auto;
}

.logger-count {
  font-size: 13px;
  font-family: monospace;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  background-color: #121212;
  border: 1px solid var(--border);
  padding: 5px 12px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  box-sizing: border-box;
}

.logger-terminal {
  padding: 8px;
  /* The single scrolling region. The panel above is clamped to max-height:100%,
     so this flexes to fill whatever height remains under the header and scrolls
     its rows INTERNALLY — the overlay never needs a scrollbar. (Same robust
     flexbox pattern the mobile .awaiting-list already used; no JS sizing.) */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background-color: #000000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  /* Explicit radius + overflow:hidden clips this child's #000000 background
     to rounded bottom corners so the panel's border-radius shows through.
     The header tooltip is in .logger-header (a sibling), so it is unaffected. */
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.logger-terminal::-webkit-scrollbar { width: 4px; }
.logger-terminal::-webkit-scrollbar-track { background: transparent; }
.logger-terminal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.logger-empty-state {
  text-align: center;
  padding: 32px 16px;
  font-size: 11px !important;
  line-height: 16px !important;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  font-style: italic;
}

.logger-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px;
  background-color: #030303;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .logger-row:hover {
    border-color: var(--border-active);
    background-color: #050505;
  }
}

/* A freshly logged exclusion slides+fades in and flashes its border, so a new entry is
   noticeable the moment it lands in the terminal. */
.logger-row--enter {
  animation: loggerRowEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes loggerRowEnter {
  0% { opacity: 0; transform: translateY(-10px); border-color: rgba(255, 59, 48, 0.65); }
  60% { border-color: rgba(255, 59, 48, 0.45); }
  100% { opacity: 1; transform: translateY(0); border-color: var(--border); }
}
@media (prefers-reduced-motion: reduce) {
  .logger-row--enter { animation: none; }
}

.log-header-line {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.log-tag {
  font-family: monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  display: inline-block;
  min-width: 80px;
}

.log-tag.tag-alert-red { background-color: rgba(255, 59, 48, 0.08); border: 1px solid rgba(255, 59, 48, 0.25); color: #ff3b30; }
.log-tag.tag-alert-goal { background-color: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.25); color: #ef4444; }
.log-tag.tag-filt-url { background-color: rgba(234, 179, 8, 0.08); border: 1px solid rgba(234, 179, 8, 0.25); color: #eab308; }
.log-tag.tag-filt-limits { background-color: rgba(168, 85, 247, 0.08); border: 1px solid rgba(168, 85, 247, 0.25); color: #a855f7; }
.log-tag.tag-filt-odds { background-color: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.25); color: #3b82f6; }
.log-tag.tag-sys-ft { background-color: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.25); color: #22c55e; }
.log-tag.tag-sys-time { background-color: rgba(156, 163, 175, 0.08); border: 1px solid rgba(156, 163, 175, 0.25); color: #9ca3af; }
.log-tag.tag-sys-filt { background-color: rgba(156, 163, 175, 0.1); border: 1px solid rgba(156, 163, 175, 0.25); color: #9ca3af; }

.log-time {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-secondary);
}

.log-match-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.log-telemetry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  background-color: #000000;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 4px;
  width: 100%;
}

.tel-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.tel-box:last-child {
  border-right: none;
}

.tel-lbl {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.tel-val {
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.tel-val.tel-score {
  color: var(--text-primary);
}

.tel-val.tel-time {
  color: #ef4444;
}

/* Odds box living inside the SCORE/MIN/EST telemetry row. Given a little extra width so the
   chips breathe. Chips are laid out in a fixed 2-column grid (a tidy 2x2 for the usual 4
   lines) rather than free-wrapping, which packed 3-then-1. */
.tel-box-odds {
  grid-column: span 2;
  padding: 0 6px;
}

.tel-box-odds .tel-val {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 5px;
  width: 100%;
}

.tel-box-odds .odds-chip {
  font-size: 11px;
  padding: 2px 7px;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

/* Dynamic balancing: a 2-column grid normally leaves a lone trailing chip
   stuck in the left cell. When the LAST chip lands on an odd index (totals of
   1, 3, 5 …) let it span both columns and center — so 1 chip sits dead-center,
   3 chips read as two-up + one centered below, etc. Even counts (2, 4 …) keep
   the tidy corner / 2×2 grid. */
.tel-box-odds .odds-chip:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: auto;
  min-width: 48%;
}

.tel-box-odds .odds-chip-line {
  font-size: 10px;
}

.log-odds-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #000000;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  width: 100%;
}

.odds-strip-lbl {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.odds-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.odds-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  background-color: rgba(234, 179, 8, 0.06);
  border: 1px solid rgba(234, 179, 8, 0.20);
  border-radius: 5px;
  padding: 3px 9px;
  line-height: 1.35;
}

.odds-chip-line {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.odds-chip-sep {
  color: var(--text-muted);
}

.odds-chip-val {
  color: #eab308;
}

.odds-chip-empty {
  color: var(--text-muted);
  background-color: transparent;
  border-color: var(--border);
}


.log-reason-pane {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.reason-title {
  font-size: 9px;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.log-reason {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: normal;
}

.log-expiry {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: monospace;
  font-size: 11px;
  flex-shrink: 0;
}

.expiry-label {
  color: var(--text-muted);
  font-weight: 700;
}

.expiry-value {
  color: #ff3b30;
  font-weight: 700;
}

/* Tablet view mapping and responsive rules */
@media (max-width: 1279px) and (min-width: 769px) {
  .log-reason-pane {
    display: flex;
    min-width: 0;
  }
  .log-reason {
    white-space: normal;
  }
}

/* =========================================================================
   TOAST NOTIFICATION SYSTEM (GLOBAL STYLES)
   ========================================================================= */
.toast-container {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}

@media (min-width: 769px) {
  .toast-container {
    right: 24px;
    top: 24px;
    bottom: auto;
    left: auto;
    width: 360px;
    align-items: flex-end;
  }
}

.custom-toast {
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
  background-color: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  border-radius: 8px;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
  animation: toastEntranceRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

@keyframes toastEntranceRight {
  from {
    opacity: 0;
    transform: translateX(32px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.custom-toast.toast-fade-out {
  opacity: 0;
  transform: translateX(24px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.toast-warn-icon {
  flex-shrink: 0;
}

.toast-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-match-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-reason {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: #F5A623;
  width: 100%;
  animation: toastProgressDecrease 4.5s linear forwards;
  transform-origin: left;
}

@keyframes toastProgressDecrease {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@keyframes toastEntranceBottom {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .mute-toggle-btn,
  .queue-toggle-btn,
  .logs-toggle-btn,
  .profile-toggle-btn {
    flex: 0 0 auto;
    /* Match the desktop footprint on mobile — the icons read clearly and the
       tap targets are comfortable. SVG sizes inherit the desktop rules. */
    width: 42px;
    height: 42px;
  }

  .dashboard-grid {
    margin-bottom: 0;
  }

  .no-matches-placeholder {
    /* Same fixed centring as desktop — keep it dead-centre on mobile too. */
    max-width: 290px;
    width: calc(100% - 32px);
  }

  .logger-row {
    gap: 9px;
    padding: 12px;
  }

  .log-match-name {
    font-size: 13px;
  }

  .log-telemetry {
    margin: 2px 0;
    /* Fixed SCORE | MIN | EST columns; the wide ODDS box drops to its own row
       below (see .tel-box-odds) so its chips never cram or push the card wider
       than the viewport. */
    grid-template-columns: 1fr 1fr 1fr;
    row-gap: 8px;
  }

  /* Let every cell shrink below its content width instead of forcing overflow. */
  .log-telemetry .tel-box {
    min-width: 0;
  }

  .tel-box-odds {
    grid-column: 1 / -1;
    border-right: none;
    border-top: 1px solid var(--border);
    padding-top: 7px;
    margin-top: 1px;
  }

  /* Match desktop: a fixed 2-column grid so the usual pair sits 50/50 and a lone
     trailing chip (totals of 1, 3, 5…) centers below at partial width instead of
     stretching the full row. The last-odd-child centering rule (.tel-box-odds
     .odds-chip:last-child:nth-child(odd), defined above) is intentionally NOT
     overridden here, so that desktop centering carries through on mobile too. */
  .tel-box-odds .tel-val {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .tel-box-odds .odds-chip {
    width: 100%;
    min-width: 0;
  }

  .log-reason-pane {
    display: flex;
  }

  .log-reason {
    white-space: normal;
    font-size: 10px;
  }

  /* Single row on mobile too: dot + title share the line with the count badge and
     the close button (no wrapped second row). The title shrinks/ellipsises first. */
  .logger-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    height: auto; /* Reset fixed desktop height */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .logger-status-dot {
    margin-top: 0;
    flex-shrink: 0;
  }

  .logger-header h2 {
    font-size: 11px;
    letter-spacing: 0.08em;
    line-height: 1.3;
    margin-right: auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .logs-modal-panel .awaiting-close-btn {
    width: 24px;
    height: 24px;
    padding: 4px;
    box-sizing: border-box;
    margin-left: 0;
    margin-top: 0;
    flex-shrink: 0;
  }
  .logs-modal-panel .awaiting-close-btn svg {
    width: 13px;
    height: 13px;
  }

  .logger-header .logs-export-btn {
    width: 24px;
    height: 24px;
    padding: 4px;
    box-sizing: border-box;
  }
  .logger-header .logs-export-btn svg {
    width: 12px;
    height: 12px;
  }

  .logger-count {
    font-size: 10px;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    top: auto;
    width: auto;
    max-width: none;
    align-items: center;
  }

  .custom-toast {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    animation: toastEntranceBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .custom-toast.toast-fade-out {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .toast-header {
    margin-bottom: 6px;
  }

  .toast-match-name {
    font-size: 13px !important;
    line-height: 1.3;
  }

  .toast-reason {
    font-size: 10px !important;
  }

  .toast-progress-bar {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  /* Compact match card on mobile to fit the screen and prevent page scrolling when one match is available */
  .card-body {
    padding: 12px 14px;
    min-height: 440px;
  }

  .score-row-wrapper {
    height: 90px;
    margin-bottom: 12px;
  }

  .odds-wrapper {
    padding-top: 11px;
    margin-top: 11px;
  }

  .odds-combined {
    min-height: 200px;
  }

  .odds-other {
    margin-top: 12px;
    padding-top: 10px;
  }

  .odds-other-list {
    height: 88px !important; /* fits exactly 4 rows */
  }

  .timeline-container {
    padding-top: 12px;
    margin-top: 12px;
  }

  .event-log {
    height: 195px;
  }
}

/* ── Auth Modal Gate ────────────────────────────────────────────────────── */
html.auth-active, body.auth-active {
  overflow: hidden !important;
}

.auth-blur-wrapper {
  transition: filter 0.3s ease;
}
/* While signed out, the real app is fully hidden — not just blurred — so the
   navbar never shows behind the sign-in modal. The inline <head> script sets
   auth-active before first paint, so a reload never flashes the UI either. */
html.auth-active .auth-blur-wrapper {
  display: none;
}

/* ── Sign-in modal (fully custom, on-theme) ────────────────────────────────
   Frosted-glass card with a muted dark-gold accent (deliberately deeper than
   the app's bright --accent-hot amber, per design), floating labels, sliding
   segmented control and custom dropdowns. No native <select> anywhere.
   The accent lives in modal-scoped vars so it can be retuned in one place. */
.auth-modal-overlay,
.auth-drop-panel {
  --aa: 166, 133, 38;      /* dark-gold RGB, for rgba() glows/tints */
  --aa-solid: #a68526;     /* solid dark gold */
  --aa-bright: #c2a038;    /* lighter tip for gradients / hover */
}
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(90% 70% at 50% -10%, rgba(var(--aa), 0.10), transparent 60%),
    radial-gradient(70% 60% at 50% 120%, rgba(var(--aa), 0.05), transparent 60%),
    rgba(3, 3, 4, 0.86);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  opacity: 0;
  /* Non-interactive unless actually open, so a closing/faded overlay never eats
     clicks meant for the app. Author display:flex overrides UA [hidden]{none},
     hence the explicit rule below. */
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.auth-modal-overlay[hidden] { display: none; }

.auth-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 424px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: none;
  /* Solid near-black to match the match-card surface (#020202 / --border). */
  background: #020202;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 32px 28px 22px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.72),
    0 0 70px rgba(var(--aa), 0.06),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.42s ease;
}
.auth-card::-webkit-scrollbar { display: none; }

.auth-modal-overlay.is-open .auth-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Static amber hairline along the card's top edge. A single white glint
   sweeps across it once, only as the card settles in — not on a loop. */
.auth-card-sheen {
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(var(--aa), 0.7), transparent);
  opacity: 0.7;
}
.auth-card-sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  width: 40%;
  transform: translateX(-160%);
  opacity: 0;
}
.auth-modal-overlay.is-open .auth-card-sheen::after {
  animation: authSheen 1.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s 1;
}
@keyframes authSheen {
  0%   { transform: translateX(-160%); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateX(360%); opacity: 0; }
}

/* Soft amber halo behind the logo */
.auth-card-halo {
  position: absolute;
  top: -56px; left: 50%;
  width: 260px; height: 240px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(var(--aa), 0.18), transparent 62%);
  pointer-events: none;
  filter: blur(10px);
}

/* Hero */
.auth-hero {
  position: relative;
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px; height: 66px;
  margin-bottom: 15px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(32, 32, 37, 0.9), rgba(12, 12, 15, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 28px rgba(var(--aa), 0.20), 0 1px 0 rgba(255, 255, 255, 0.10) inset;
}
.auth-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(var(--aa), 0.6), transparent 45%, transparent 60%, rgba(var(--aa), 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.auth-logo {
  width: 34px; height: 34px;
  object-fit: contain;
}
/* Logo eases in once when the modal opens, then rests — no perpetual bobbing. */
.auth-modal-overlay.is-open .auth-logo-wrap {
  animation: authLogoIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}
@keyframes authLogoIn {
  from { opacity: 0; transform: translateY(6px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 300px;
  margin: 0 auto;
}

/* Segmented control with sliding glider */
.auth-seg {
  position: relative;
  display: flex;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 22px;
}
.auth-seg--sm {
  margin-bottom: 20px;
}
.auth-seg-glider {
  position: absolute;
  top: 5px; bottom: 5px; left: 5px;
  width: calc(50% - 5px);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(48, 48, 54, 0.9), rgba(28, 28, 32, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45), 0 0 16px rgba(var(--aa), 0.12), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-seg[data-active="1"] .auth-seg-glider { transform: translateX(100%); }
.auth-seg-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 9px 8px;
  cursor: pointer;
  transition: color 0.25s ease;
}
.auth-seg--sm .auth-seg-btn { font-size: 11.5px; padding: 7px; }
.auth-seg-btn.active { color: #fff; }
.auth-seg-btn:not(.active):hover { color: #c9c9c9; }

/* Body + panes */
.auth-body { position: relative; }

.auth-pane { display: none; }
.auth-pane.active { display: block; animation: authPaneIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes authPaneIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Staggered field rise when a pane becomes active.
   Use `backwards` (not `both`): it holds the pre-start state during the stagger
   delay but does NOT persist a transform after finishing. A lingering transform
   would create a stacking context on every field and trap an open dropdown's
   z-index inside it (panel would hide behind later fields). */
.auth-pane.active .auth-form:not([hidden]) > * {
  animation: authRise 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.auth-pane.active .auth-form:not([hidden]) > *:nth-child(1) { animation-delay: 0.04s; }
.auth-pane.active .auth-form:not([hidden]) > *:nth-child(2) { animation-delay: 0.10s; }
.auth-pane.active .auth-form:not([hidden]) > *:nth-child(3) { animation-delay: 0.16s; }
.auth-pane.active .auth-form:not([hidden]) > *:nth-child(4) { animation-delay: 0.22s; }
.auth-pane.active .auth-form:not([hidden]) > *:nth-child(5) { animation-delay: 0.28s; }
@keyframes authRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Error alert */
.auth-alert {
  display: none;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: 10px;
  padding: 11px 13px;
  color: #ff6b6b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 16px;
  animation: shakeError 0.4s ease;
}

/* Fields */
.auth-form { margin-top: 2px; }
.auth-field { margin-bottom: 13px; }
.auth-lbl {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 7px;
}

/* Inputs (glass, with floating labels) */
.auth-inp-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-inp {
  width: 100%;
  height: 56px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  color: #fff;
  padding: 0 15px;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.auth-inp::placeholder { color: transparent; }
.auth-inp:hover { border-color: rgba(255, 255, 255, 0.16); }
.auth-inp:focus {
  border-color: rgba(var(--aa), 0.75);
  background: rgba(var(--aa), 0.05);
  box-shadow: 0 0 0 3px rgba(var(--aa), 0.14), 0 0 22px rgba(var(--aa), 0.12);
}
.auth-inp-wrap:has(.auth-eye) .auth-inp { padding-right: 46px; }

/* Chrome/Edge autofill paints its own opaque light-blue/white background and
   dark text via a UA style that normal `background`/`color` can't override. The
   only reliable defeat is an inset box-shadow that repaints the field surface,
   plus -webkit-text-fill-color for the text. The huge transition delay keeps the
   UA background from flashing through before our shadow is applied. */
.auth-inp:-webkit-autofill,
.auth-inp:-webkit-autofill:hover,
.auth-inp:-webkit-autofill:focus,
.auth-inp:-webkit-autofill:active {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #0b0b0b inset;
          box-shadow: 0 0 0 1000px #0b0b0b inset;
  border-color: rgba(255, 255, 255, 0.09);
  transition: background-color 6000s ease-in-out 0s, border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-inp:-webkit-autofill:focus {
  border-color: rgba(var(--aa), 0.75);
  -webkit-box-shadow: 0 0 0 1000px #0b0b0b inset, 0 0 0 3px rgba(var(--aa), 0.14), 0 0 22px rgba(var(--aa), 0.12);
          box-shadow: 0 0 0 1000px #0b0b0b inset, 0 0 0 3px rgba(var(--aa), 0.14), 0 0 22px rgba(var(--aa), 0.12);
}
/* Keep the floating label lifted when the field was autofilled (Chrome reports
   an autofilled field as not :placeholder-shown, but this makes it explicit). */
.auth-inp:-webkit-autofill ~ .auth-float {
  top: 0;
  transform: translateY(-50%) scale(0.86);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--aa-solid);
  background: #020202;
}

/* Floating label: rests centered inside the field as a placeholder, then rises
   to sit ON the top border line (notched-outline style) once the field is
   focused or filled. Its background matches the card (#020202) so it cleanly
   cuts through the border rather than crowding the text inside. */
.auth-float {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
  padding: 0 4px;
  font-size: 14.5px;
  font-weight: 500;
  color: #74747c;
  background: transparent;
  pointer-events: none;
  transition: top 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.18s ease,
              background 0.18s ease;
}
.auth-inp:focus ~ .auth-float,
.auth-inp:not(:placeholder-shown) ~ .auth-float {
  top: 0;
  transform: translateY(-50%) scale(0.86);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--aa-solid);
  background: #020202;
}

/* Password show/hide eye */
.auth-eye {
  position: absolute;
  right: 8px;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #55555c;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.auth-eye:hover { color: #b0b0b6; background: rgba(255, 255, 255, 0.04); }
.auth-eye.on { color: var(--aa-solid); }
.auth-eye svg { width: 19px; height: 19px; }
.auth-eye .eye-slash { opacity: 0; transition: opacity 0.15s ease; }
.auth-eye.on .eye-slash { opacity: 1; }

/* Phone row: country dropdown + number */
.auth-phone-row {
  display: flex;
  gap: 10px;
}
.auth-phone-row .auth-inp-wrap { flex: 1; min-width: 0; }

/* ── Custom dropdown ─────────────────────────────────────────────────────── */
.auth-drop { position: relative; }
/* Lift an open dropdown above sibling fields/buttons below it so its panel
   overlays them instead of hiding behind their stacking contexts. */
.auth-drop.open { z-index: 60; }
.auth-drop-mount { display: block; }
.auth-phone-row .auth-drop-mount { flex: 0 0 auto; }

.auth-drop-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  width: 100%;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  color: #fff;
  font-size: 14.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.auth-drop-trigger:hover { border-color: rgba(255, 255, 255, 0.16); }
.auth-drop.open .auth-drop-trigger {
  border-color: rgba(var(--aa), 0.75);
  background: rgba(var(--aa), 0.05);
  box-shadow: 0 0 0 3px rgba(var(--aa), 0.14), 0 0 22px rgba(var(--aa), 0.12);
}
.auth-drop-ico { display: inline-flex; align-items: center; font-size: 17px; line-height: 1; }
.auth-drop-val { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* Real SVG country flags (flagcdn) — replace the Windows-broken emoji flags. */
.auth-flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 1px 2px rgba(0, 0, 0, 0.5);
}
.auth-drop-caret {
  width: 16px; height: 16px;
  color: #55555c;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}
.auth-drop.open .auth-drop-caret { transform: rotate(180deg); color: var(--aa-solid); }

.auth-drop-panel {
  position: fixed;
  z-index: 10000;
  min-width: 100%;
  background: #0d0d10;
  border: 1px solid #26262b;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-drop-panel--search { min-width: 268px; }
.auth-drop-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.auth-drop-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.auth-drop-search svg {
  position: absolute;
  left: 11px;
  width: 15px; height: 15px;
  color: #4d4d52;
  pointer-events: none;
}
.auth-drop-search-inp {
  width: 100%;
  height: 38px;
  background: #060607;
  border: 1px solid #1e1e22;
  border-radius: 9px;
  color: #fff;
  padding: 0 12px 0 34px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.auth-drop-search-inp:focus { border-color: rgba(var(--aa), 0.55); }
.auth-drop-search-inp::placeholder { color: #3a3a3f; }

.auth-drop-list {
  max-height: 244px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2a30 transparent;
}
.auth-drop-list::-webkit-scrollbar { width: 8px; }
.auth-drop-list::-webkit-scrollbar-thumb { background: #26262b; border-radius: 8px; border: 2px solid #0d0d10; }

.auth-drop-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: #cfcfd4;
  font-size: 13.5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.auth-drop-opt:hover { background: rgba(255, 255, 255, 0.045); color: #fff; }
.auth-drop-opt.active { background: rgba(var(--aa), 0.14); color: var(--aa-bright); }
.auth-drop-opt-ico { display: inline-flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1; width: 24px; flex-shrink: 0; }
.auth-drop-opt-main { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-drop-opt-sec { font-size: 12px; color: #55555c; font-variant-numeric: tabular-nums; }
.auth-drop-opt.active .auth-drop-opt-sec { color: rgba(var(--aa), 0.85); }
.auth-drop-empty { padding: 18px; text-align: center; font-size: 12.5px; color: #4d4d52; }

/* Custom checkbox */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 20px;
  cursor: pointer;
  user-select: none;
}
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check-box {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 1px;
  border: 1px solid #2a2a30;
  border-radius: 6px;
  background: #0b0b0d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #050505;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.auth-check-box svg { width: 14px; height: 14px; opacity: 0; transform: scale(0.5); transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1); }
.auth-check input:checked + .auth-check-box {
  background: linear-gradient(180deg, var(--aa-bright), var(--aa-solid));
  border-color: var(--aa-solid);
}
.auth-check input:checked + .auth-check-box svg { opacity: 1; transform: scale(1); }
.auth-check input:focus-visible + .auth-check-box { box-shadow: 0 0 0 3px rgba(var(--aa), 0.25); }
.auth-check-txt { font-size: 11.5px; line-height: 1.5; color: var(--text-secondary); }
.auth-check-txt a { color: var(--aa-bright); text-decoration: none; }
.auth-check-txt a:hover { text-decoration: underline; }

/* Primary CTA with shimmer */
.auth-cta {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 48px;
  margin-top: 6px;
  background: linear-gradient(180deg, var(--aa-bright) 0%, var(--aa-solid) 100%);
  border: none;
  border-radius: 15px;
  color: #1a1400;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
  box-shadow: 0 8px 22px rgba(var(--aa), 0.30), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.auth-cta span { position: relative; z-index: 1; }
.auth-cta::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-180%) skewX(-18deg);
  transition: transform 0.7s ease;
}
.auth-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(var(--aa), 0.42), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  filter: brightness(1.08);
}
.auth-cta:hover::after { transform: translateX(320%) skewX(-18deg); }
.auth-cta:active { transform: translateY(1px) scale(0.99); }

/* Footer trust line */
.auth-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #141416;
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
}
.auth-foot-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  flex-shrink: 0;
  animation: authFootPulse 3s ease-in-out infinite;
}
@keyframes authFootPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* ── Progress overlay (shown while signing in) ─────────────────────────────── */
.auth-progress {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: linear-gradient(180deg, #08080a 0%, #030304 100%);
  border-radius: 20px;
  padding: 34px 26px 26px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.auth-progress.active { opacity: 1; pointer-events: auto; }

.auth-progress-core { text-align: center; margin-bottom: 18px; }

/* Orbit spinner */
.auth-orbit {
  position: relative;
  width: 60px; height: 60px;
  margin: 6px auto 18px;
}
.auth-orbit i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid transparent;
}
.auth-orbit i:nth-child(1) { border-top-color: var(--aa-solid); animation: authSpin 1.1s linear infinite; }
.auth-orbit i:nth-child(2) { inset: 8px; border-right-color: rgba(var(--aa), 0.55); animation: authSpin 1.5s linear infinite reverse; }
.auth-orbit i:nth-child(3) { inset: 16px; border-bottom-color: rgba(var(--aa), 0.3); animation: authSpin 0.9s linear infinite; }
.auth-orbit b {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--aa-solid);
  box-shadow: 0 0 14px rgba(var(--aa), 0.9);
  animation: authFootPulse 1.4s ease-in-out infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-progress-core h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--aa-bright);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.auth-progress-core p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 0 auto;
}

.auth-progress-terminal {
  flex: 1;
  min-height: 150px;
  background: #000;
  border: 1px solid #141416;
  border-radius: 12px;
  padding: 15px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  line-height: 1.7;
  color: #00e676;
  overflow-y: auto;
  scrollbar-width: none;
  text-align: left;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.9);
}
.auth-progress-terminal::-webkit-scrollbar { display: none; }

.auth-terminal-line {
  margin-bottom: 3px;
  opacity: 0;
  transform: translateY(4px);
  animation: lineEntrance 0.3s forwards;
}
.auth-terminal-line.success { color: #00e676; }
.auth-terminal-line.info { color: #9aa0a6; }
.auth-terminal-line.warn { color: var(--aa-bright); }

@keyframes lineEntrance {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE & SETTINGS MODAL
   Theme tokens are scoped to the modal so the app-wide dark UI stays untouched.
   They default to the current dark values (pixel-identical), and the
   [data-theme="light"] block below overrides them for the modal + auth card.
   ═══════════════════════════════════════════════════════════════════════════ */
.profile-modal-overlay {
  --pm-panel: #020202;
  --pm-surface: #080808;
  --pm-surface-2: #101010;
  --pm-border: var(--border, #1c1c1c);
  --pm-border-strong: var(--border, #2a2a2a);
  --pm-text: #ffffff;
  --pm-text-2: #9a9a9a;
  --pm-text-muted: #5c5c5c;
  --pm-accent: #f5a623;
  --pm-good: #00e676;
  --pm-danger: #ef4444;
}

.profile-modal-overlay {
  background-color: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.profile-modal-overlay .profile-modal-panel {
  max-width: 460px;
  height: min(92vh, 785px);
  background-color: var(--pm-panel);
  border: 1px solid var(--pm-border-strong);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  /* A springier entrance than the base modal for a more "impressive" feel. */
  transform: translateY(14px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-modal-overlay.is-open .profile-modal-panel {
  transform: translateY(0) scale(1);
}

/* Ambient accent glow behind the panel top — the "impressive" light source. */
.profile-modal-glow {
  display: none;
}
html[data-panel-bg="black"] .profile-modal-overlay {
  --pm-panel: #000000;
  --pm-surface: #050505;
  --pm-surface-2: #0b0b0b;
}
@keyframes pmGlowIn { to { opacity: 1; } }

/* ── Hero / identity banner ──────────────────────────────────────────────── */
.profile-hero {
  position: relative;
  z-index: 1;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--pm-surface);
  border-bottom: 1px solid var(--pm-border);
}
.profile-hero-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--pm-border-strong);
  color: var(--pm-text-2);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.profile-hero-close svg { width: 16px; height: 16px; }
.profile-hero-close:hover {
  color: var(--pm-text);
  border-color: var(--pm-danger);
  background-color: rgba(239, 68, 68, 0.08);
  transform: rotate(90deg);
}

.profile-hero-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 38px;
}

.profile-avatar {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--pm-text-2);
  background-color: var(--pm-surface-2);
  box-shadow: none;
}
.profile-avatar-ring {
  display: none;
}
@keyframes pmRingPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0; transform: scale(1.14); }
}

.profile-identity-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: auto;
  min-width: 0;
}
.profile-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--pm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-handle {
  font-size: 12px;
  color: var(--pm-text-2);
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--pm-good);
  background-color: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.25);
}

/* ── Balance spotlight card ──────────────────────────────────────────────── */
.profile-balance-card {
  border-radius: 14px;
  padding: 14px 16px;
  background-color: var(--pm-panel);
  border: 1px solid var(--pm-border-strong);
}
.profile-balance-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.profile-balance-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.profile-balance-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pm-text-2);
}
.profile-balance-amount {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.profile-balance-amount #profile-user-balance {
  font-size: 30px;
  font-weight: 800;
  color: var(--pm-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
}
.profile-balance-cur {
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-accent);
}
.profile-balance-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--pm-text-muted);
}

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.profile-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 2px;
  padding: 8px 12px 0;
  background-color: var(--pm-panel);
  border-bottom: 1px solid var(--pm-border);
}
.profile-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--pm-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.profile-tab svg { width: 15px; height: 15px; }
.profile-tab span { line-height: 1; }
.profile-tab:hover { color: var(--pm-text-2); }
.profile-tab.active {
  color: var(--pm-accent);
  border-bottom-color: var(--pm-accent);
}

.profile-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--pm-border-strong) transparent;
  border-bottom-left-radius: 19px;
  border-bottom-right-radius: 19px;
}
.profile-modal-panel[data-active-pane="account"] .profile-scroll {
  overflow-y: auto;
  scrollbar-width: none;
}
.profile-modal-panel[data-active-pane="account"] .profile-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.profile-scroll::-webkit-scrollbar { width: 8px; }
.profile-scroll::-webkit-scrollbar-thumb { background: var(--pm-border-strong); border-radius: 4px; }

/* ── Panes (one per tab) ─────────────────────────────────────────────────── */
.profile-pane { display: none; flex-direction: column; gap: 16px; }
.profile-pane.active {
  display: flex;
  animation: pmPaneIn 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pmPaneIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pm-text-2);
  padding-left: 2px;
}
.profile-section-head svg {
  width: 15px;
  height: 15px;
  opacity: 0.8;
}
.profile-section-head--split {
  justify-content: space-between;
}
.profile-section-head--split > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-section--feature {
  margin-top: 2px;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.profile-info-card,
.profile-signal-card,
.profile-control-card,
.profile-feature-card,
.profile-toggle-card,
.profile-mode-card {
  background-color: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 12px;
}
.profile-info-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 14px;
}
.profile-info-card--wide {
  grid-column: 1 / -1;
}
.profile-info-k,
.profile-feature-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pm-text-muted);
}
.profile-info-card strong {
  color: var(--pm-text);
  font-size: 18px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-info-card small,
.profile-signal-card small,
.profile-control-card small,
.profile-feature-card small,
.profile-toggle-card small,
.profile-mode-card small {
  color: var(--pm-text-muted);
  font-size: 11px;
  line-height: 1.3;
}

.profile-signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.profile-signal-grid--one {
  grid-template-columns: 1fr;
}
.profile-signal-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px;
}
.profile-signal-card--wide {
  justify-content: space-between;
}
.profile-signal-card > span:not(.profile-signal-dot) {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.profile-signal-card b,
.profile-control-card b,
.profile-feature-card b,
.profile-toggle-card b,
.profile-mode-card b {
  color: var(--pm-text);
  font-size: 13px;
  line-height: 1.2;
}
.profile-signal-card small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-signal-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background-color: var(--pm-good);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.8);
  flex-shrink: 0;
}
.profile-signal-dot--amber {
  background-color: var(--pm-accent);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.7);
}
.profile-signal-dot--soft {
  background-color: var(--pm-text-2);
  box-shadow: none;
}

.profile-feature-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}
.profile-feature-card > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.profile-feature-card--alerts {
  border-color: rgba(0, 230, 118, 0.22);
}
.profile-feature-card--look {
  border-color: rgba(245, 166, 35, 0.24);
}

.profile-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-mode-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.profile-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  min-height: 86px;
  padding: 13px;
  color: var(--pm-text-2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.12s ease;
}
.profile-mode-card:active {
  transform: scale(0.98);
}
.profile-mode-card.active {
  border-color: rgba(245, 166, 35, 0.62);
  background-color: rgba(245, 166, 35, 0.08);
}
.profile-mode-icon {
  width: 22px;
  height: 22px;
  color: var(--pm-accent);
}
.profile-mode-icon svg {
  width: 100%;
  height: 100%;
}

.profile-control-card,
.profile-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}
.profile-control-card > span:first-child,
.profile-toggle-card > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.profile-control-card--range {
  align-items: center;
}
.profile-toggle-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-switch--large {
  width: 52px;
  height: 30px;
}
.profile-switch--large .profile-switch-knob {
  width: 24px;
  height: 24px;
}
.profile-switch--large[aria-checked="true"] .profile-switch-knob {
  transform: translateX(22px);
}

.profile-rows {
  display: flex;
  flex-direction: column;
  background-color: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: 12px;
  overflow: hidden;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  min-height: 50px;
}
html.compact-account .profile-modal-panel[data-active-pane="account"] .profile-scroll {
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 12px;
}
html.compact-account .profile-modal-panel[data-active-pane="account"] .profile-row {
  min-height: 42px;
  padding: 9px 14px;
}
html.compact-account .profile-modal-panel[data-active-pane="account"] .profile-stat {
  padding: 12px 8px;
}
html.compact-account .profile-modal-panel[data-active-pane="account"] .profile-stat-num {
  font-size: 21px;
}
.profile-row + .profile-row {
  border-top: 1px solid var(--pm-border);
}
.profile-row--interactive { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .profile-row--interactive:hover { background-color: var(--pm-surface-2); }
}

.profile-row-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-row-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--pm-text);
}

.profile-row-sub {
  font-size: 11px;
  color: var(--pm-text-muted);
  line-height: 1.3;
}

.profile-row-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-text);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-conn-val {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--pm-good);
  font-weight: 600;
  font-size: 13px;
}

.profile-balance-val {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid var(--pm-border-strong);
  background-color: var(--pm-surface-2);
  color: var(--pm-text-2);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.profile-refresh-btn svg { width: 15px; height: 15px; pointer-events: none; }
.profile-avatar svg { width: 24px; height: 24px; }
@media (hover: hover) and (pointer: fine) {
  .profile-refresh-btn:hover { color: var(--pm-text); border-color: var(--pm-accent); }
}
.profile-refresh-btn.spinning svg { animation: pmSpin 0.7s linear; }
@keyframes pmSpin { to { transform: rotate(360deg); } }

/* ── Toggle switch ───────────────────────────────────────────────────────── */
.profile-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--pm-border-strong);
  background-color: var(--pm-surface-2);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.22s ease, border-color 0.22s ease;
}
.profile-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #d0d0d0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.22s ease;
}
.profile-switch[aria-checked="true"] {
  background-color: var(--pm-accent);
  border-color: var(--pm-accent);
}
.profile-switch[aria-checked="true"] .profile-switch-knob {
  transform: translateX(18px);
  background-color: #0a0a0a;
}

.profile-mini-btn {
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--pm-border-strong);
  background-color: var(--pm-surface-2);
  color: var(--pm-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .profile-mini-btn:hover { border-color: var(--pm-accent); color: var(--pm-accent); }
}

.profile-range-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.profile-range {
  width: 112px;
  accent-color: var(--pm-accent);
}
.profile-range-val {
  width: 38px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--pm-text-2);
  font-variant-numeric: tabular-nums;
}

/* ── Segmented theme control ─────────────────────────────────────────────── */
.profile-seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background-color: var(--pm-surface-2);
  border: 1px solid var(--pm-border-strong);
}
.profile-seg-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--pm-text-2);
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.profile-seg-btn.active {
  color: #0a0a0a;
  background-color: var(--pm-text);
}
@media (hover: hover) and (pointer: fine) {
  .profile-seg-btn:not(.active):hover { color: var(--pm-text); }
}

/* ── Session stat grid ───────────────────────────────────────────────────── */
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  border-radius: 12px;
  background-color: var(--pm-surface);
  border: 1px solid var(--pm-border);
}
.profile-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--pm-text);
  font-variant-numeric: tabular-nums;
}
.profile-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pm-text-muted);
}

/* ── Footer + logout ─────────────────────────────────────────────────────── */
.profile-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: auto;
  padding: 12px 18px 16px;
  font-size: 11px;
  color: var(--pm-text-muted);
  background-color: var(--pm-panel);
  border-top: 1px solid var(--pm-border);
}
.profile-foot-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background-color: var(--pm-good);
  box-shadow: 0 0 8px var(--pm-good);
}

.profile-status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--pm-good, #00e676);
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
  color: var(--pm-good, #00e676);
  flex-shrink: 0;
}

.profile-logout-btn {
  width: 100%;
  height: 40px;
  margin-top: 4px;
  background-color: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--pm-danger);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.profile-logout-btn:hover {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: var(--pm-danger);
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTO-BET TAB
   ═══════════════════════════════════════════════════════════════════════════ */
/* Master status banner. */
.autobet-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--pm-border);
  background-color: var(--pm-surface);
  transition: border-color 0.24s ease, box-shadow 0.24s ease;
}
.autobet-hero.is-live {
  border-color: rgba(0, 230, 118, 0.46);
  box-shadow: 0 0 26px rgba(0, 230, 118, 0.08);
}
.autobet-hero-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.autobet-hero-main > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.autobet-hero-main b {
  color: var(--pm-text);
  font-size: 15px;
}
.autobet-hero-main small {
  color: var(--pm-text-2);
  font-size: 11px;
  line-height: 1.35;
}
.autobet-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--pm-border-strong);
  background-color: var(--pm-surface);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.autobet-status.is-live {
  border-color: rgba(0, 230, 118, 0.45);
  background-color: var(--pm-surface);
  box-shadow: 0 0 22px rgba(0, 230, 118, 0.12);
}
.autobet-status-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.autobet-status-dot {
  width: 10px; height: 10px; flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--pm-text-muted);
}
.autobet-status-dot.live {
  background-color: var(--pm-good);
  box-shadow: 0 0 12px var(--pm-good);
  animation: pmDotPulse 1s ease-in-out infinite;
}
@keyframes pmDotPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.autobet-status-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.autobet-status-title { font-size: 13px; font-weight: 700; color: var(--pm-text); }
.autobet-status-sub { font-size: 11px; color: var(--pm-text-2); line-height: 1.3; }
.autobet-status-sub.autobet-flash { color: var(--pm-accent); font-weight: 600; }

.autobet-safety-engine {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pm-accent) 20%, var(--pm-border));
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pm-panel) 96%, var(--pm-accent) 4%), var(--pm-panel));
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}

/* Document-level 1W tooltip. Its bottom edge is anchored above the button so
   an active native match surface cannot cover it. */
.onewin-global-tooltip {
  position: fixed;
  z-index: 2147483000;
  transform: translate(-50%, -100%);
  padding: 6px 9px;
  border: 1px solid var(--border-active);
  border-radius: 8px;
  color: var(--text-primary);
  background: rgba(16, 16, 16, .98);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .6);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
}
.onewin-global-tooltip[hidden] { display: none !important; }
.autobet-safety-engine summary {
  position: relative;
  min-height: 66px;
  display: grid;
  grid-template-columns: 40px minmax(110px,1fr) minmax(80px,130px) auto 18px;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.autobet-safety-engine summary::-webkit-details-marker { display: none; }
.safety-engine-copy { min-width: 0; display: grid; gap: 3px; }
.safety-engine-copy b { color: var(--pm-text); font-size: 14px; }
.safety-engine-copy small { color: var(--pm-text-2); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.safety-engine-core { position: relative; width: 38px; height: 38px; border-radius: 50%; background:conic-gradient(from 0deg,transparent 0 18%,var(--pm-accent) 24% 32%,transparent 38% 68%,color-mix(in srgb,var(--pm-accent) 55%,transparent) 76% 84%,transparent 90%); box-shadow:0 0 18px color-mix(in srgb,var(--pm-accent) 24%,transparent); animation:safetySpin 2.8s linear infinite; }
.safety-engine-core::before { content:""; position:absolute; inset:5px; border-radius:50%; background:var(--pm-panel); border:1px solid color-mix(in srgb, var(--pm-accent) 62%, transparent); animation:safetyCore 1.5s ease-in-out infinite; }
.safety-engine-core i { position:absolute; width:4px; height:4px; border-radius:50%; background:var(--pm-accent); box-shadow:0 0 8px var(--pm-accent); }
.safety-engine-core i:nth-child(1){left:17px;top:2px}.safety-engine-core i:nth-child(2){right:3px;bottom:8px}.safety-engine-core i:nth-child(3){left:3px;bottom:8px}
.safety-engine-flow { position:relative; height:18px; display:flex; justify-content:space-between; align-items:center; }
.safety-engine-flow::before { content:""; position:absolute; left:5px; right:5px; height:1px; background:var(--pm-border-strong); }
.safety-engine-flow i { z-index:1; width:7px; height:7px; border-radius:50%; background:var(--pm-panel); border:1px solid color-mix(in srgb, var(--pm-accent) 62%, transparent); }
.safety-engine-flow em { position:absolute; z-index:2; left:0; width:6px; height:6px; border-radius:50%; background:var(--pm-accent); box-shadow:0 0 9px var(--pm-accent); animation:safetyTravel 2.4s ease-in-out infinite; }
.safety-engine-core { display:block; overflow:visible; background:none; box-shadow:none; animation:none; }
.safety-core-track { fill:none; stroke:var(--pm-border-strong); stroke-width:2; }
.safety-core-live { fill:none; stroke:var(--pm-accent); stroke-width:2.5; stroke-linecap:round; stroke-dasharray:34 61; filter:drop-shadow(0 0 3px var(--pm-accent)); transform-origin:20px 20px; animation:safetyRing 1.8s linear infinite; }
.safety-core-pulse { fill:var(--pm-accent); filter:drop-shadow(0 0 4px var(--pm-accent)); animation:safetyPulse 1.15s ease-in-out infinite; }
.safety-engine-flow { display:block; overflow:visible; }
.safety-engine-flow path { fill:none; stroke:var(--pm-border-strong); stroke-width:1.5; }
.safety-engine-flow circle:not(.safety-flow-particle) { fill:var(--pm-panel); stroke:var(--pm-accent); stroke-width:1.5; }
.safety-flow-particle { fill:var(--pm-accent); filter:drop-shadow(0 0 4px var(--pm-accent)); animation:safetyParticle 2s ease-in-out infinite; }
.safety-engine-state { padding:5px 8px; border-radius:999px; color:var(--pm-good); background:color-mix(in srgb,var(--pm-good) 8%,transparent); border:1px solid color-mix(in srgb,var(--pm-good) 25%,transparent); font-size:9px; font-weight:800; letter-spacing:.08em; }
.safety-engine-chevron { width:18px; height:18px; fill:none; stroke:var(--pm-text-2); stroke-width:1.5; transition:transform .2s ease; }
.autobet-safety-engine[open] .safety-engine-chevron { transform:rotate(180deg); }
.safety-engine-detail { border-top:1px solid var(--pm-border); padding:5px 12px 11px; }
.safety-engine-detail article { display:grid; grid-template-columns:25px minmax(0,1fr) auto; align-items:center; gap:9px; padding:10px 2px; border-bottom:1px solid color-mix(in srgb,var(--pm-border) 72%,transparent); }
.safety-group-icon { width:23px; height:23px; display:grid; place-items:center; border-radius:7px; color:var(--pm-accent); background:color-mix(in srgb,var(--pm-accent) 8%,transparent); font-size:7px; font-weight:800; }
.safety-engine-detail article div { min-width:0; display:grid; gap:2px; }
.safety-engine-detail b { color:var(--pm-text); font-size:12px; }
.safety-engine-detail small { color:var(--pm-text-2); font-size:11px; line-height:1.45; }
.safety-engine-detail article em { color:var(--pm-text-muted); font-size:9px; font-style:normal; white-space:nowrap; }
.safety-engine-detail p { margin:11px 2px 2px; color:var(--pm-text-muted); font-size:10px; line-height:1.45; }
@keyframes safetyCore { 0%,100%{transform:scale(.82);opacity:.45} 50%{transform:scale(1);opacity:1} }
@keyframes safetySpin { to{transform:rotate(360deg)} }
@keyframes safetyTravel { 0%{left:0;opacity:0} 12%{opacity:1} 88%{opacity:1} 100%{left:calc(100% - 6px);opacity:0} }
@keyframes safetyRing { to{transform:rotate(360deg)} }
@keyframes safetyPulse { 0%,100%{opacity:.35;transform:scale(.7);transform-origin:20px 20px} 50%{opacity:1;transform:scale(1.25);transform-origin:20px 20px} }
@keyframes safetyParticle { 0%{transform:translateX(0);opacity:0} 12%{opacity:1} 88%{opacity:1} 100%{transform:translateX(116px);opacity:0} }
@media (prefers-reduced-motion: reduce) { .safety-engine-core,.safety-engine-core::before,.safety-engine-flow em,.safety-core-live,.safety-core-pulse,.safety-flow-particle{animation:none} }
@media (max-width:560px) { .autobet-safety-engine summary{grid-template-columns:40px minmax(0,1fr) auto 18px}.safety-engine-flow{position:absolute;left:13px;right:13px;bottom:4px;height:5px}.safety-engine-state{font-size:8px}.safety-engine-copy small{white-space:normal} }

.autobet-filter-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pm-accent) 24%, var(--pm-border));
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--pm-accent) 10%, transparent), transparent 38%),
    linear-gradient(145deg, color-mix(in srgb, var(--pm-panel) 94%, var(--pm-accent) 6%), var(--pm-panel));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 12px 32px rgba(0,0,0,.14);
}

.autobet-filter-head {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--pm-border);
}

.autobet-filter-head > div { display: grid; gap: 2px; }
.autobet-filter-head b { color: var(--pm-text); font-size: 12px; letter-spacing: .02em; }
.autobet-filter-head small { color: var(--pm-text-2); font-size: 9px; line-height: 1.35; }
.autobet-filter-head em {
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--pm-accent) 36%, transparent);
  border-radius: 999px;
  color: var(--pm-accent);
  background: color-mix(in srgb, var(--pm-accent) 8%, transparent);
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .1em;
}

.autobet-filter-orbit {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--pm-accent) 44%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 14px color-mix(in srgb, var(--pm-accent) 18%, transparent);
}

.autobet-filter-orbit::before,
.autobet-filter-orbit::after,
.autobet-filter-orbit i {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.autobet-filter-orbit::before { inset: 6px; border: 1px solid color-mix(in srgb, var(--pm-accent) 60%, transparent); }
.autobet-filter-orbit::after { inset: 12px; background: var(--pm-accent); box-shadow: 0 0 8px var(--pm-accent); }
.autobet-filter-orbit i { width: 4px; height: 4px; top: 1px; left: 13px; background: var(--pm-accent); }

.autobet-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1px;
  background: var(--pm-border);
}

.autobet-filter-grid article {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr);
  gap: 8px;
  padding: 10px 11px;
  background: color-mix(in srgb, var(--pm-panel) 97%, transparent);
}

.autobet-filter-grid article > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--pm-accent);
  background: color-mix(in srgb, var(--pm-accent) 9%, transparent);
  font-size: 7px;
  font-weight: 800;
}
.autobet-filter-grid article > div { min-width: 0; display: grid; gap: 2px; }
.autobet-filter-grid b { color: var(--pm-text); font-size: 9px; line-height: 1.25; }
.autobet-filter-grid small { color: var(--pm-text-2); font-size: 8px; line-height: 1.35; }

@media (max-width: 560px) {
  .autobet-filter-grid { grid-template-columns: 1fr; }
  .autobet-filter-head { grid-template-columns: 30px minmax(0,1fr); }
  .autobet-filter-head em { display: none; }
}

.autobet-seg { width: 100%; }
.autobet-seg .profile-seg-btn { flex: 1; text-align: center; }

/* Numeric input rows. */
.autobet-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.autobet-input {
  width: 84px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--pm-border-strong);
  background-color: var(--pm-surface-2);
  color: var(--pm-text);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  transition: border-color 0.2s ease;
}
.autobet-input::-webkit-outer-spin-button,
.autobet-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.autobet-input:focus {
  outline: none;
  border-color: var(--pm-accent);
}
.autobet-input-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--pm-text-2);
  min-width: 26px;
}

/* Placement log. */
.autobet-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--pm-border-strong) transparent;
}
.autobet-log::-webkit-scrollbar { width: 6px; }
.autobet-log::-webkit-scrollbar-thumb { background: var(--pm-border-strong); border-radius: 3px; }
.autobet-log-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--pm-text-muted);
  background-color: var(--pm-surface);
  border: 1px dashed var(--pm-border-strong);
  border-radius: 10px;
}
.autobet-log-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background-color: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-left-width: 3px;
  animation: loggerRowEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.autobet-log-row.placed { border-left-color: var(--pm-good); }
.autobet-log-row.error { border-left-color: var(--pm-danger); }
.autobet-log-row.skip { border-left-color: var(--pm-border-strong); }
.autobet-log-badge {
  flex-shrink: 0;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background-color: var(--pm-surface-2);
  color: var(--pm-text-2);
}
.autobet-log-row.placed .autobet-log-badge { background-color: rgba(0, 230, 118, 0.14); color: var(--pm-good); }
.autobet-log-row.error .autobet-log-badge { background-color: rgba(239, 68, 68, 0.14); color: var(--pm-danger); }
.autobet-log-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.autobet-log-match { font-size: 12.5px; font-weight: 700; color: var(--pm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autobet-log-meta { font-size: 10.5px; color: var(--pm-text-2); font-variant-numeric: tabular-nums; }
.autobet-log-note { font-size: 10.5px; color: var(--pm-text-muted); line-height: 1.35; }
.autobet-log-time { font-size: 10px; color: var(--pm-text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }

.profile-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.profile-confirm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.profile-confirm-panel {
  width: min(390px, 100%);
  border-radius: 12px;
  border: 1px solid var(--ps-border-strong, var(--pm-border-strong, var(--border)));
  background-color: #020202;
  color: var(--ps-text, var(--pm-text, #fff));
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s ease;
}
.profile-confirm-overlay.is-open .profile-confirm-panel {
  transform: translateY(0) scale(1);
}
.profile-confirm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--pm-good, #00e676);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.profile-confirm-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
}
.profile-confirm-panel p {
  margin: 0;
  color: var(--ps-soft, var(--pm-text-2, #9a9a9a));
  font-size: 13px;
  line-height: 1.45;
}
.profile-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.profile-confirm-primary {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 230, 118, 0.42);
  background-color: rgba(0, 230, 118, 0.12);
  color: var(--pm-good, #00e676);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* ═══════ LIGHT THEME (modal + auth for now; app-wide colors are a follow-up) ═ */
[data-theme="light"] .profile-modal-overlay {
  --pm-panel: #ffffff;
  --pm-surface: #f4f5f7;
  --pm-surface-2: #eaecef;
  --pm-border: #e2e5ea;
  --pm-border-strong: #d2d6dd;
  --pm-text: #14171c;
  --pm-text-2: #5c636e;
  --pm-text-muted: #8b929c;
  --pm-accent: #e08a00;
  --pm-good: #17924d;
  --pm-danger: #d63b3b;
}
[data-theme="light"] .profile-modal-overlay { background-color: rgba(20, 23, 28, 0.42); }
[data-theme="light"] .profile-switch-knob { background-color: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
[data-theme="light"] .profile-seg-btn.active { color: #ffffff; background-color: #14171c; }
[data-theme="light"] .profile-avatar { color: #ffffff; }
[data-theme="light"] .autobet-input { background-color: #ffffff; }
[data-theme="light"] .profile-hero-close { background-color: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .profile-modal-glow { background: radial-gradient(circle at 50% 40%, rgba(224, 138, 0, 0.18), transparent 62%); }

/* Profile modal redesign: spacious dashboard layout with resilient card grids. */
.profile-modal-overlay {
  --pm-panel: #050505;
  --pm-surface: #0d0d0d;
  --pm-surface-2: #151515;
  --pm-elevated: #111111;
  --pm-border: #202020;
  --pm-border-strong: #303030;
  --pm-text: #ffffff;
  --pm-text-2: #b7b7b7;
  --pm-text-muted: #727272;
  --pm-accent: var(--accent-hot, #f5a623);
  --pm-good: #00e676;
  --pm-danger: #ef4444;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(245, 166, 35, 0.11), transparent 62%),
    rgba(0, 0, 0, 0.74);
}

.profile-modal-overlay .profile-modal-panel {
  width: min(980px, calc(100vw - 32px));
  max-width: none;
  height: min(94vh, 780px);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 170px),
    var(--pm-panel);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(245, 166, 35, 0.06) inset;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(330px, 0.92fr);
  align-items: stretch;
  gap: 14px;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.13), transparent 42%),
    linear-gradient(180deg, #101010, #080808);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.profile-hero::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pm-accent), rgba(0, 230, 118, 0.8), transparent);
  opacity: 0.9;
}

.profile-hero-inner,
.profile-balance-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.profile-hero-inner {
  align-items: center;
  gap: 15px;
  padding: 14px 58px 14px 14px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  color: #090909;
  background:
    linear-gradient(160deg, #ffd58d, var(--pm-accent) 54%, #a76200);
  box-shadow: 0 16px 32px rgba(245, 166, 35, 0.18);
}

.profile-avatar-ring {
  display: block;
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(245, 166, 35, 0.28);
  border-radius: 10px;
  opacity: 0.75;
}

.profile-avatar svg {
  width: 28px;
  height: 28px;
}

.profile-name {
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0;
}

.profile-handle {
  font-size: 12px;
  color: var(--pm-text-2);
}

.profile-hero-close {
  top: 18px;
  right: 22px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.06);
}

.profile-balance-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  padding-right: 58px;
  background:
    linear-gradient(135deg, rgba(0, 230, 118, 0.08), transparent 48%),
    rgba(0, 0, 0, 0.3);
}

.profile-balance-lbl,
.profile-info-k,
.profile-feature-kicker,
.profile-section-head,
.profile-stat-lbl {
  letter-spacing: 0.08em;
}

.profile-balance-amount #profile-user-balance {
  font-size: clamp(30px, 3.7vw, 40px);
  letter-spacing: 0;
}

.profile-balance-cur {
  color: var(--pm-good);
}

.profile-balance-hint {
  color: var(--pm-text-2);
}

.profile-live-chip {
  border-radius: 8px;
  color: var(--pm-good);
  background-color: rgba(0, 230, 118, 0.09);
}

.profile-tabs {
  gap: 6px;
  margin: 12px 20px 0;
  padding: 5px;
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  background-color: var(--pm-surface);
}

.profile-tab {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--pm-text-2);
  font-size: 12px;
  font-weight: 750;
}

.profile-tab.active {
  color: #0a0a0a;
  border-color: rgba(245, 166, 35, 0.75);
  background: linear-gradient(180deg, #ffc567, var(--pm-accent));
  box-shadow: 0 8px 22px rgba(245, 166, 35, 0.18);
}

.profile-tab.active svg {
  color: #0a0a0a;
}

.profile-scroll {
  padding: 18px 20px 20px;
  gap: 0;
}

.profile-modal-panel[data-active-pane="account"] .profile-scroll {
  scrollbar-width: thin;
}

.profile-modal-panel[data-active-pane="account"] .profile-scroll::-webkit-scrollbar {
  width: 8px;
  height: auto;
}

.profile-pane {
  gap: 12px 14px;
}

.profile-pane.active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.profile-pane[data-pane="account"].active {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.profile-pane[data-pane="autobet"].active {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.profile-pane[data-pane="appearance"].active {
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
}

.profile-pane[data-pane="account"] .profile-section:nth-of-type(3),
.profile-pane[data-pane="autobet"] .profile-section--feature,
.profile-pane[data-pane="autobet"] .profile-section:nth-of-type(4),
.profile-pane[data-pane="appearance"] .profile-section--feature,
.profile-pane[data-pane="appearance"] .profile-section:nth-of-type(4) {
  grid-column: 1 / -1;
}

.profile-pane[data-pane="account"] .profile-logout-btn {
  align-self: end;
  height: 86px;
  margin-top: 26px;
}

.profile-pane[data-pane="alerts"].active,
.profile-pane[data-pane="appearance"].active {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-pane[data-pane="alerts"] .profile-section--feature {
  grid-column: 1 / -1;
}

.profile-pane[data-pane="alerts"] .profile-section:nth-of-type(2),
.profile-pane[data-pane="alerts"] .profile-section:nth-of-type(3) {
  align-self: stretch;
}

.profile-pane[data-pane="alerts"] .profile-section:nth-of-type(2) .profile-signal-grid,
.profile-pane[data-pane="alerts"] .profile-section:nth-of-type(2) .profile-signal-card,
.profile-pane[data-pane="alerts"] .profile-section:nth-of-type(3) .profile-control-card {
  height: 100%;
}

.profile-section {
  min-width: 0;
  gap: 8px;
}

.profile-section-head {
  min-height: 18px;
  color: var(--pm-text-2);
  font-size: 10px;
}

.profile-info-card,
.profile-signal-card,
.profile-control-card,
.profile-feature-card,
.profile-toggle-card,
.profile-mode-card,
.profile-stat,
.autobet-hero,
.autobet-log-empty,
.autobet-log-row {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--pm-surface);
  border-color: rgba(255, 255, 255, 0.08);
}

.profile-info-card,
.profile-control-card,
.profile-toggle-card {
  min-height: 82px;
  padding: 14px;
}

.profile-info-card strong {
  font-size: 17px;
  letter-spacing: 0;
}

.profile-signal-grid,
.profile-info-grid,
.profile-mode-grid,
.profile-stat-grid {
  gap: 9px;
}

.profile-signal-card {
  min-height: 70px;
  padding: 13px 14px;
}

.profile-signal-card b,
.profile-control-card b,
.profile-feature-card b,
.profile-toggle-card b,
.profile-mode-card b {
  font-size: 14px;
}

.profile-signal-card small,
.profile-control-card small,
.profile-feature-card small,
.profile-toggle-card small,
.profile-mode-card small {
  font-size: 11px;
  color: var(--pm-text-2);
}

.profile-feature-card {
  min-height: 92px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.12), transparent 48%),
    var(--pm-surface);
}

.profile-feature-card--alerts {
  background:
    linear-gradient(135deg, rgba(0, 230, 118, 0.12), transparent 48%),
    var(--pm-surface);
}

.profile-mode-card {
  min-height: 96px;
  padding: 14px;
}

.profile-mode-card.active {
  border-color: rgba(245, 166, 35, 0.7);
  background:
    linear-gradient(180deg, rgba(245, 166, 35, 0.16), rgba(245, 166, 35, 0.06)),
    var(--pm-surface);
}

.profile-control-card--range {
  min-height: 92px;
}

.profile-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-switch,
.profile-switch--large {
  border-radius: 999px;
  background-color: #232323;
}

.profile-switch-knob {
  background-color: #f4f4f4;
}

.profile-switch[aria-checked="true"] {
  background-color: var(--pm-accent);
}

.profile-mini-btn,
.profile-refresh-btn,
.profile-logout-btn,
.autobet-input {
  border-radius: 8px;
}

.profile-mini-btn {
  min-height: 34px;
  color: var(--pm-text);
}

.profile-stat {
  align-items: flex-start;
  justify-content: center;
  min-height: 86px;
  padding: 14px 16px;
}

.profile-stat-num {
  font-size: 28px;
  line-height: 1;
}

.profile-foot {
  justify-content: center;
  padding: 11px 20px;
  background-color: #060606;
}

.profile-logout-btn {
  height: 44px;
  margin-top: 0;
}

.autobet-hero {
  min-height: 90px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(0, 230, 118, 0.09), transparent 48%),
    var(--pm-surface);
}

.autobet-input {
  width: 100px;
  height: 38px;
}

.autobet-log {
  max-height: 280px;
}

.autobet-log-row {
  align-items: center;
}

[data-theme="light"] .profile-modal-overlay {
  --pm-panel: #fbfbfc;
  --pm-surface: #ffffff;
  --pm-surface-2: #eef0f3;
  --pm-elevated: #ffffff;
  --pm-border: #dfe3e8;
  --pm-border-strong: #cbd1d8;
  --pm-text: #15171b;
  --pm-text-2: #555e68;
  --pm-text-muted: #858d97;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(224, 138, 0, 0.18), transparent 62%),
    rgba(20, 23, 28, 0.46);
}

[data-theme="light"] .profile-modal-overlay .profile-modal-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 170px),
    var(--pm-panel);
  border-color: rgba(20, 23, 28, 0.12);
}

[data-theme="light"] .profile-hero {
  background:
    linear-gradient(135deg, rgba(224, 138, 0, 0.16), transparent 42%),
    linear-gradient(180deg, #ffffff, #f4f5f7);
}

[data-theme="light"] .profile-hero-inner,
[data-theme="light"] .profile-balance-card {
  background-color: rgba(255, 255, 255, 0.72);
  border-color: rgba(20, 23, 28, 0.1);
}

[data-theme="light"] .profile-tab.active {
  color: #111111;
}

@media (max-width: 860px) {
  .profile-modal-overlay .profile-modal-panel {
    width: min(620px, calc(100vw - 24px));
    height: min(92vh, 820px);
  }

  .profile-hero,
  .profile-pane.active,
  .profile-pane[data-pane="alerts"].active,
  .profile-pane[data-pane="appearance"].active {
    grid-template-columns: 1fr;
  }

  .profile-pane[data-pane="account"] .profile-section:nth-of-type(3),
  .profile-pane[data-pane="account"] .profile-logout-btn,
  .profile-pane[data-pane="autobet"] .profile-section--feature,
  .profile-pane[data-pane="autobet"] .profile-section:nth-of-type(4),
  .profile-pane[data-pane="appearance"] .profile-section--feature,
  .profile-pane[data-pane="appearance"] .profile-section:nth-of-type(4),
  .profile-pane[data-pane="alerts"] .profile-section--feature {
    grid-column: auto;
  }

  .profile-pane[data-pane="account"] .profile-logout-btn {
    height: 44px;
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .profile-modal-overlay {
    align-items: stretch;
    padding: 10px;
  }

  .profile-modal-overlay .profile-modal-panel {
    width: 100%;
    height: calc(100svh - 20px);
    border-radius: 14px;
  }

  .profile-hero {
    gap: 10px;
    padding: 16px;
  }

  .profile-hero::before {
    left: 16px;
    right: 16px;
  }

  .profile-hero-inner {
    padding: 14px 46px 14px 14px;
  }

  .profile-avatar {
    width: 50px;
    height: 50px;
  }

  .profile-name {
    font-size: 18px;
  }

  .profile-balance-card {
    padding: 14px;
  }

  .profile-balance-meta {
    align-items: flex-start;
  }

  .profile-balance-actions {
    gap: 6px;
  }

  .profile-tabs {
    margin: 10px 12px 0;
    gap: 4px;
    overflow-x: visible;
  }

  .profile-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 5px;
    gap: 4px;
    font-size: 11px;
  }

  .profile-tab svg {
    width: 13px;
    height: 13px;
  }

  .profile-scroll {
    padding: 14px;
  }

  .profile-info-grid,
  .profile-signal-grid,
  .profile-mode-grid,
  .profile-mode-grid--three,
  .profile-stat-grid,
  .profile-toggle-grid {
    grid-template-columns: 1fr;
  }

  .profile-signal-card--wide,
  .profile-control-card,
  .profile-toggle-card {
    align-items: flex-start;
  }

  .profile-signal-card--wide,
  .profile-control-card {
    flex-direction: column;
  }

  .profile-range-wrap,
  .profile-range {
    width: 100%;
  }

  .profile-range-val {
    flex-shrink: 0;
  }

  .profile-foot {
    align-items: flex-start;
    justify-content: center;
    font-size: 10px;
    text-align: center;
  }
}

/* Respect the in-app reduce-motion preference (mirrors the OS media query). */
html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

@media (max-width: 480px) {
  .auth-card {
    max-width: 100%;
    padding: 28px 18px 18px;
    border-radius: 22px;
  }
  .auth-drop-panel--search { min-width: 240px; }
}

/* Profile modal final layout reset. Keep this block last for predictable geometry. */
.profile-modal-overlay {
  --pm-panel: #050505;
  --pm-surface: #101010;
  --pm-surface-2: #171717;
  --pm-line: rgba(255, 255, 255, 0.1);
  --pm-line-strong: rgba(255, 255, 255, 0.16);
  --pm-text: #ffffff;
  --pm-text-2: #b8b8b8;
  --pm-text-muted: #747474;
  --pm-accent: var(--accent-hot, #f5a623);
  --pm-good: #00e676;
  --pm-danger: #ef4444;
  padding: 18px;
  background:
    radial-gradient(880px 520px at 50% -14%, rgba(245, 166, 35, 0.14), transparent 62%),
    rgba(0, 0, 0, 0.76);
}

.profile-modal-overlay .profile-modal-panel {
  width: min(920px, calc(100vw - 36px));
  max-width: none;
  height: min(92svh, 744px);
  max-height: none;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--pm-line-strong);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 170px),
    var(--pm-panel);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.78);
}

.profile-modal-glow,
.profile-avatar-ring {
  display: none;
}

.profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, #101010, #080808);
  border-bottom: 1px solid var(--pm-line);
}

.profile-hero::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pm-accent), var(--pm-good), transparent);
}

.profile-hero-inner,
.profile-balance-card {
  min-width: 0;
  min-height: 98px;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.profile-hero-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 56px 14px 14px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  color: #090909;
  background: linear-gradient(160deg, #ffd58d, var(--pm-accent) 58%, #a76200);
  box-shadow: none;
}

.profile-avatar svg {
  width: 27px;
  height: 27px;
}

.profile-identity-text {
  min-width: 0;
}

.profile-name {
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.profile-handle {
  color: var(--pm-text-2);
}

.profile-hero-close {
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border-color: var(--pm-line);
  background: rgba(255, 255, 255, 0.055);
}

.profile-balance-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 56px 14px 16px;
}

.profile-balance-meta {
  margin-bottom: 5px;
}

.profile-balance-lbl,
.profile-info-k,
.profile-feature-kicker,
.profile-section-head,
.profile-stat-lbl {
  letter-spacing: 0.08em;
}

.profile-balance-amount #profile-user-balance {
  font-size: clamp(30px, 3.5vw, 38px);
  line-height: 1;
  letter-spacing: 0;
}

.profile-balance-cur {
  color: var(--pm-good);
}

.profile-balance-hint,
.profile-info-card small,
.profile-signal-card small,
.profile-control-card small,
.profile-feature-card small,
.profile-toggle-card small,
.profile-mode-card small {
  color: var(--pm-text-2);
}

.profile-live-chip,
.profile-refresh-btn,
.profile-mini-btn,
.profile-logout-btn,
.profile-info-card,
.profile-signal-card,
.profile-control-card,
.profile-feature-card,
.profile-toggle-card,
.profile-mode-card,
.profile-stat,
.autobet-hero,
.autobet-input,
.autobet-log-empty,
.autobet-log-row {
  border-radius: 8px;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--pm-line);
  background: rgba(255, 255, 255, 0.018);
}

.profile-tab {
  min-width: 0;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
  background: var(--pm-surface);
  color: var(--pm-text-2);
  font-size: 12px;
  font-weight: 750;
}

.profile-tab.active {
  color: #090909;
  border-color: rgba(245, 166, 35, 0.72);
  background: linear-gradient(180deg, #ffc568, var(--pm-accent));
  box-shadow: none;
}

.profile-tab svg {
  width: 14px;
  height: 14px;
}

.profile-tab.active svg {
  color: #090909;
}

.profile-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  border-radius: 0;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a transparent;
}

.profile-scroll::-webkit-scrollbar,
.profile-modal-panel[data-active-pane="account"] .profile-scroll::-webkit-scrollbar {
  width: 8px;
  height: auto;
}

.profile-scroll::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 8px;
}

.profile-modal-panel[data-active-pane="account"] .profile-scroll {
  scrollbar-width: thin;
}

.profile-pane {
  display: none;
  gap: 12px;
}

.profile-pane.active,
.profile-pane[data-pane="account"].active,
.profile-pane[data-pane="autobet"].active,
.profile-pane[data-pane="alerts"].active,
.profile-pane[data-pane="appearance"].active {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.profile-section {
  min-width: 0;
  gap: 8px;
}

.profile-section-head {
  min-height: 18px;
  padding: 0;
  color: var(--pm-text-2);
  font-size: 10px;
}

.profile-info-card,
.profile-signal-card,
.profile-control-card,
.profile-feature-card,
.profile-toggle-card,
.profile-mode-card,
.profile-stat,
.autobet-hero,
.autobet-log-empty,
.autobet-log-row {
  border: 1px solid var(--pm-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent), var(--pm-surface);
}

.profile-info-card,
.profile-control-card,
.profile-toggle-card,
.profile-mode-card,
.profile-stat {
  min-height: 78px;
  padding: 13px;
}

.profile-info-card strong,
.profile-signal-card b,
.profile-control-card b,
.profile-feature-card b,
.profile-toggle-card b,
.profile-mode-card b {
  color: var(--pm-text);
  font-size: 14px;
  line-height: 1.2;
}

.profile-info-card strong {
  font-size: 16px;
}

.profile-info-grid,
.profile-signal-grid,
.profile-mode-grid,
.profile-stat-grid,
.profile-toggle-grid {
  gap: 8px;
}

.profile-info-grid,
.profile-signal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-info-card--wide,
.profile-signal-card--wide {
  grid-column: 1 / -1;
}

.profile-signal-card {
  min-height: 64px;
  padding: 12px;
}

.profile-feature-card,
.autobet-hero {
  min-height: 86px;
  padding: 15px;
}

.profile-mode-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-stat {
  justify-content: center;
  align-items: flex-start;
}

.profile-stat-num {
  font-size: 26px;
  line-height: 1;
}

.profile-pane[data-pane="account"] .profile-section:nth-of-type(1) { grid-column: 1 / span 6; }
.profile-pane[data-pane="account"] .profile-section:nth-of-type(2) { grid-column: 7 / span 6; }
.profile-pane[data-pane="account"] .profile-section:nth-of-type(3) { grid-column: 1 / span 9; }
.profile-pane[data-pane="account"] .profile-logout-btn {
  grid-column: 10 / span 3;
  align-self: end;
  width: 100%;
  height: 78px;
  margin: 26px 0 0;
}

.profile-pane[data-pane="autobet"] .profile-section:nth-of-type(1) { grid-column: 1 / -1; }
.profile-pane[data-pane="autobet"] .profile-section:nth-of-type(2) { grid-column: 1 / span 6; }
.profile-pane[data-pane="autobet"] .profile-section:nth-of-type(3) { grid-column: 7 / span 6; }
.profile-pane[data-pane="autobet"] .profile-section:nth-of-type(4) { grid-column: 1 / -1; }

.profile-pane[data-pane="autobet"] .autobet-hero {
  min-height: 76px;
  padding: 14px;
}

.profile-pane[data-pane="autobet"] .profile-mode-card,
.profile-pane[data-pane="autobet"] .profile-control-card,
.profile-pane[data-pane="autobet"] .profile-stat {
  min-height: 70px;
}

.profile-pane[data-pane="autobet"] .profile-mode-card {
  padding: 12px;
}

.profile-pane[data-pane="autobet"] .autobet-log-row {
  padding: 9px 12px;
}

.profile-pane[data-pane="autobet"] .autobet-log-note {
  line-height: 1.2;
}

.profile-pane[data-pane="alerts"] .profile-section:nth-of-type(1) { grid-column: 1 / -1; }
.profile-pane[data-pane="alerts"] .profile-section:nth-of-type(2) { grid-column: 1 / span 6; }
.profile-pane[data-pane="alerts"] .profile-section:nth-of-type(3) { grid-column: 7 / span 6; }

.profile-pane[data-pane="appearance"] .profile-section:nth-of-type(1) { grid-column: 1 / -1; }
.profile-pane[data-pane="appearance"] .profile-section:nth-of-type(2) { grid-column: 1 / span 6; }
.profile-pane[data-pane="appearance"] .profile-section:nth-of-type(3) { grid-column: 7 / span 6; }
.profile-pane[data-pane="appearance"] .profile-section:nth-of-type(4) { grid-column: 1 / -1; }

.profile-toggle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-switch,
.profile-switch--large {
  border-radius: 999px;
  background: #252525;
}

.profile-switch[aria-checked="true"] {
  background: var(--pm-accent);
  border-color: var(--pm-accent);
}

.profile-switch-knob {
  background: #f5f5f5;
}

.profile-mini-btn {
  min-height: 34px;
}

.profile-range-wrap {
  min-width: min(220px, 100%);
}

.profile-range {
  width: 150px;
}

.autobet-input {
  width: 96px;
  height: 38px;
}

.autobet-log {
  max-height: 180px;
}

.autobet-log-row {
  align-items: center;
}

.profile-foot {
  min-height: 38px;
  justify-content: center;
  padding: 10px 16px;
  border-top: 1px solid var(--pm-line);
  background: #060606;
  text-align: center;
}

[data-theme="light"] .profile-modal-overlay {
  --pm-panel: #fbfbfc;
  --pm-surface: #ffffff;
  --pm-surface-2: #eef0f3;
  --pm-line: rgba(20, 23, 28, 0.1);
  --pm-line-strong: rgba(20, 23, 28, 0.16);
  --pm-text: #15171b;
  --pm-text-2: #555e68;
  --pm-text-muted: #858d97;
}

[data-theme="light"] .profile-hero {
  background: linear-gradient(180deg, #ffffff, #f4f5f7);
}

[data-theme="light"] .profile-foot {
  background: #ffffff;
}

@media (max-width: 760px) {
  .profile-modal-overlay {
    align-items: stretch;
    padding: 10px;
  }

  .profile-modal-overlay .profile-modal-panel {
    width: 100%;
    height: calc(100svh - 20px);
    border-radius: 12px;
  }

  .profile-hero {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .profile-hero::before {
    left: 14px;
    right: 14px;
  }

  .profile-hero-inner {
    min-height: 82px;
    padding: 12px 48px 12px 12px;
  }

  .profile-avatar {
    width: 48px;
    height: 48px;
  }

  .profile-name {
    font-size: 18px;
  }

  .profile-balance-card {
    min-height: 96px;
    padding: 13px;
  }

  .profile-balance-amount #profile-user-balance {
    font-size: 30px;
  }

  .profile-tabs {
    gap: 4px;
    padding: 10px 12px;
  }

  .profile-tab {
    height: 38px;
    padding: 0 4px;
    gap: 4px;
    font-size: 11px;
  }

  .profile-tab svg {
    width: 13px;
    height: 13px;
  }

  .profile-scroll {
    padding: 12px;
  }

  .profile-pane.active,
  .profile-pane[data-pane="account"].active,
  .profile-pane[data-pane="autobet"].active,
  .profile-pane[data-pane="alerts"].active,
  .profile-pane[data-pane="appearance"].active {
    grid-template-columns: 1fr;
  }

  .profile-pane[data-pane] .profile-section,
  .profile-pane[data-pane] .profile-logout-btn {
    grid-column: 1 / -1 !important;
  }

  .profile-pane[data-pane="account"] .profile-logout-btn {
    height: 44px;
    margin-top: 0;
  }

  .profile-info-grid,
  .profile-signal-grid,
  .profile-mode-grid,
  .profile-mode-grid--three,
  .profile-stat-grid,
  .profile-toggle-grid {
    grid-template-columns: 1fr;
  }

  .profile-control-card,
  .profile-signal-card--wide {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-range-wrap,
  .profile-range {
    width: 100%;
  }

  .profile-foot {
    font-size: 10px;
  }
}



/* From-zero profile modal rebuild. Uses a new DOM/CSS namespace. */
.neo-profile-overlay[hidden] {
  display: none;
}

.ng-stability-ring {
  --ng-stability-progress: 0deg;
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--card-bg, #050505) 57%, transparent 59%),
    conic-gradient(#f59e0b var(--ng-stability-progress), #242424 0);
  transition: background 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.ng-stability-ring.is-ready {
  background:
    radial-gradient(circle at center, var(--card-bg, #050505) 57%, transparent 59%),
    conic-gradient(#2fbf71 360deg, #242424 0);
  color: #2fbf71;
  filter: drop-shadow(0 0 5px rgba(47, 191, 113, 0.5));
}

.ng-stability-ring.is-off {
  background:
    radial-gradient(circle at center, var(--card-bg, #050505) 57%, transparent 59%),
    conic-gradient(#343434 360deg, #242424 0);
  color: #777;
}

@media (width < 0px) {
/* Retired graphite experiment retained only as inert history. */
/* Graphite profile surface — restrained reflections inspired by the reference
   dashboard. Kept as the final layer so older profile experiments cannot leak
   bright accent borders back into this modal. */
.profile-settings-shell {
  --profile-amber: #f5a524;
  --profile-line: rgba(255, 255, 255, 0.09);
  --profile-line-soft: rgba(255, 255, 255, 0.055);
  background:
    radial-gradient(650px 310px at 48% -8%, rgba(255, 255, 255, 0.075), transparent 64%),
    linear-gradient(145deg, #141414 0%, #0b0b0b 48%, #111 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.85) !important;
}

.profile-settings-shell::after {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 34%;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
  mask-image: linear-gradient(#000, transparent);
}

.profile-settings-rail,
.profile-settings-main,
.profile-settings-content {
  background: transparent !important;
}

.profile-settings-rail {
  border-right-color: var(--profile-line) !important;
  box-shadow: inset -1px 0 rgba(0,0,0,.52);
}

.profile-settings-account,
.profile-settings-wallet,
.profile-settings-vitals,
.profile-settings-shell .profile-control-band,
.profile-settings-shell .profile-input-band,
.profile-settings-shell .profile-smart-card,
.profile-settings-shell .profile-log-panel,
.profile-settings-shell .profile-theme-cards,
.profile-settings-shell .profile-palette-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.012) 52%, rgba(0,0,0,.14)) !important;
  border-color: var(--profile-line) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.045),
    0 10px 28px rgba(0,0,0,.18) !important;
}

.profile-settings-wallet {
  position: relative;
  overflow: hidden;
}

.profile-settings-wallet::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 90px;
  right: -52px;
  top: -45px;
  background: radial-gradient(circle, rgba(245,165,36,.14), transparent 68%);
  pointer-events: none;
}

.profile-settings-wallet strong,
.profile-settings-shell .fresh-profile-tab.active,
.profile-settings-shell .profile-choice-card.active,
.profile-settings-shell .profile-smart-head,
.profile-settings-shell .profile-future-input b {
  color: var(--profile-amber) !important;
}

.profile-settings-shell .fresh-profile-tab,
.profile-settings-shell .profile-choice-card,
.profile-settings-shell .fresh-profile-mini,
.profile-settings-shell .fresh-profile-tool,
.profile-settings-shell .profile-theme-card {
  background: linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.018)) !important;
  border-color: var(--profile-line) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 5px 15px rgba(0,0,0,.16) !important;
}

.profile-settings-shell .fresh-profile-tab:hover,
.profile-settings-shell .fresh-profile-mini:hover,
.profile-settings-shell .fresh-profile-tool:hover,
.profile-settings-shell .profile-choice-card:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.026)) !important;
  border-color: rgba(255,255,255,.16) !important;
}

.profile-settings-shell .fresh-profile-tab.active,
.profile-settings-shell .profile-choice-card.active,
.profile-settings-shell .profile-theme-card.active {
  background: linear-gradient(180deg, rgba(245,165,36,.13), rgba(245,165,36,.045)) !important;
  border-color: rgba(245,165,36,.48) !important;
  box-shadow: inset 0 1px 0 rgba(255,210,123,.12), 0 0 22px rgba(245,165,36,.055) !important;
  outline: 0 !important;
}

.profile-settings-shell .profile-info-grid,
.profile-settings-shell .profile-vital-grid,
.profile-settings-shell .fresh-profile-log {
  border-color: var(--profile-line) !important;
  background: rgba(0,0,0,.18) !important;
  box-shadow: inset 0 1px 7px rgba(0,0,0,.36) !important;
}

.profile-settings-shell .profile-info-tile,
.profile-settings-shell .profile-vital-grid article {
  border-color: var(--profile-line-soft) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent) !important;
}

.profile-settings-shell .fresh-profile-switch[aria-checked="true"] {
  background: var(--profile-amber) !important;
  border-color: #ffc45f !important;
  box-shadow: 0 0 18px rgba(245,165,36,.18), inset 0 1px rgba(255,255,255,.28) !important;
}

.profile-settings-shell .profile-pane-title {
  border-bottom: 1px solid var(--profile-line-soft);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.profile-settings-shell .profile-pane-title strong {
  letter-spacing: -0.025em;
}

[data-theme="light"] .profile-settings-shell {
  background:
    radial-gradient(650px 310px at 48% -8%, rgba(255,255,255,.62), transparent 64%),
    linear-gradient(145deg, #ededeb, #d9d8d4) !important;
  border-color: rgba(0,0,0,.13) !important;
  box-shadow: 0 30px 80px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.85) !important;
}
}

.neo-profile-overlay {
  --neo-bg: #030303;
  --neo-panel: #0b0b0c;
  --neo-card: rgba(255, 255, 255, 0.055);
  --neo-card-2: rgba(255, 255, 255, 0.085);
  --neo-line: rgba(255, 255, 255, 0.12);
  --neo-line-strong: rgba(255, 255, 255, 0.2);
  --neo-text: var(--text-primary, #ffffff);
  --neo-muted: var(--text-secondary, #8c8c8c);
  --neo-faint: var(--text-muted, #4d4d4d);
  --neo-accent: var(--accent-hot, #f5a623);
  --neo-accent-soft: var(--accent-hot-soft, rgba(245, 166, 35, 0.14));
  --neo-good: #00e676;
  --neo-danger: #ef4444;
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
  background:
    radial-gradient(900px 560px at 18% 0%, rgba(245, 166, 35, 0.18), transparent 58%),
    radial-gradient(720px 500px at 88% 100%, rgba(0, 230, 118, 0.12), transparent 60%),
    rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(22px) saturate(1.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.neo-profile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.neo-profile-dialog {
  position: relative;
  width: min(1060px, calc(100vw - 28px));
  height: min(86svh, 720px);
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--neo-line-strong);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 38%),
    linear-gradient(180deg, #101010, var(--neo-bg));
  box-shadow: 0 44px 120px rgba(0, 0, 0, 0.78);
  transform: translateY(26px) scale(0.96);
}

.neo-profile-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(245, 166, 35, 0.38), transparent) top / 100% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(0, 230, 118, 0.22), transparent) right / 1px 100% no-repeat;
}

.neo-profile-overlay.is-open .neo-profile-dialog {
  animation: neoProfileIn 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.neo-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
}

.neo-icon-btn,
.neo-mini-btn {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--neo-line);
  border-radius: 8px;
  color: var(--neo-muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.neo-icon-btn {
  width: 36px;
  height: 36px;
}

.neo-icon-btn svg,
.neo-mini-btn svg {
  width: 16px;
  height: 16px;
}

.neo-icon-btn:hover,
.neo-mini-btn:hover {
  color: var(--neo-text);
  border-color: rgba(245, 166, 35, 0.5);
  background: rgba(245, 166, 35, 0.14);
  transform: translateY(-1px);
}

.neo-profile-side {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
  border-right: 1px solid var(--neo-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 42%),
    rgba(255, 255, 255, 0.018);
}

.neo-person-card,
.neo-balance-card,
.neo-panel,
.neo-tile,
.neo-signal,
.neo-stat,
.neo-hero-control,
.neo-toggle-row {
  border: 1px solid var(--neo-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    var(--neo-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.neo-person-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 14px;
}

.neo-avatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #070707;
  background: linear-gradient(145deg, #ffe0a8, var(--neo-accent) 54%, #9f5b00);
  box-shadow: 0 18px 38px rgba(245, 166, 35, 0.22);
}

.neo-avatar svg {
  width: 28px;
  height: 28px;
}

.neo-person-copy,
.neo-balance-card,
.neo-tile,
.neo-panel,
.neo-range-row,
.neo-toggle-row span {
  min-width: 0;
}

.neo-kicker,
.neo-card-topline,
.neo-section-title,
.neo-tile > span,
.neo-stat > span,
.neo-pane-head > span {
  color: var(--neo-faint);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.neo-person-copy strong {
  display: block;
  overflow: hidden;
  color: var(--neo-text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neo-person-copy small,
.neo-tile small,
.neo-panel small,
.neo-signal small,
.neo-range-row small,
.neo-toggle-row small {
  color: var(--neo-muted);
  font-size: 11px;
  line-height: 1.35;
}

.neo-balance-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.neo-balance-card::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neo-accent), var(--neo-good), transparent);
}

.neo-card-topline,
.neo-balance-actions,
.neo-panel-head,
.neo-range-row,
.neo-toggle-row,
.neo-hero-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.neo-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(0, 230, 118, 0.28);
  border-radius: 999px;
  color: var(--neo-good);
  background: rgba(0, 230, 118, 0.1);
  font-size: 10px;
  font-weight: 900;
}

.neo-live-dot,
.neo-signal-dot,
.autobet-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--neo-good);
  box-shadow: 0 0 0 5px rgba(0, 230, 118, 0.09);
}

.neo-signal-dot.amber,
.autobet-status-dot {
  background: var(--neo-accent);
  box-shadow: 0 0 0 5px rgba(245, 166, 35, 0.1);
}

.neo-signal-dot.alert {
  background: var(--neo-danger);
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.1);
}

.autobet-status-dot.live {
  background: var(--neo-good);
  box-shadow: 0 0 0 5px rgba(0, 230, 118, 0.1);
}

.neo-balance-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0 10px;
}

.neo-balance-value span {
  color: var(--neo-text);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 950;
  line-height: 0.95;
}

.neo-balance-value small {
  color: var(--neo-good);
  font-size: 13px;
  font-weight: 900;
}

.neo-balance-actions > span {
  color: var(--neo-muted);
  font-size: 11px;
  line-height: 1.35;
}

.neo-profile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
}

.neo-profile-nav-btn {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--neo-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.neo-profile-nav-btn svg {
  width: 16px;
  height: 16px;
}

.neo-profile-nav-btn:hover {
  color: var(--neo-text);
  background: rgba(255, 255, 255, 0.045);
  transform: translateX(2px);
}

.neo-profile-nav-btn.active {
  color: var(--neo-text);
  border-color: rgba(245, 166, 35, 0.34);
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.2), rgba(245, 166, 35, 0.04));
}

.neo-profile-nav-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--neo-accent);
}

.neo-profile-body {
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.neo-profile-body::-webkit-scrollbar {
  width: 8px;
}

.neo-profile-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
  background-clip: content-box;
}

.neo-profile-pane {
  display: none;
}

.neo-profile-pane.active {
  display: block;
  animation: neoPaneIn 280ms ease-out both;
}

.neo-pane-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.neo-pane-head strong {
  color: var(--neo-text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
}

.neo-grid {
  display: grid;
  gap: 12px;
}

.neo-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.neo-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.neo-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.neo-span-2 { grid-column: span 2; }
.neo-grid.compact { gap: 10px; }

.neo-tile,
.neo-panel,
.neo-signal,
.neo-stat {
  padding: 14px;
}

.neo-tile {
  min-height: 92px;
}

.neo-tile strong,
.neo-signal b,
.neo-panel b,
.neo-range-row b,
.neo-toggle-row b,
.neo-hero-main b {
  display: block;
  color: var(--neo-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.neo-tile strong {
  margin: 9px 0 3px;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neo-section-title {
  margin: 20px 0 10px;
}

.neo-signal {
  min-height: 78px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

.neo-signal.wide {
  grid-template-columns: 14px minmax(0, 1fr) auto;
}

.neo-signal small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.neo-stat {
  min-height: 78px;
}

.neo-stat strong {
  display: block;
  color: var(--neo-text);
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.neo-danger-action {
  min-height: 78px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.08));
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

/* Auto-bet confirmation follows the user's selected accent palette. */
.profile-confirm-panel {
  border-color: color-mix(in srgb, var(--accent-hot) 24%, var(--app-line-strong));
}

.profile-confirm-kicker {
  color: var(--accent-hot);
}

.profile-confirm-kicker .profile-status-dot {
  color: var(--accent-hot);
  background: var(--accent-hot);
  box-shadow: 0 0 8px var(--accent-glow);
}

.profile-confirm-primary {
  border-color: var(--accent-hot-border);
  color: var(--accent-hot);
  background: var(--accent-hot-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-hot) 10%, transparent);
}

.profile-confirm-primary:hover {
  border-color: color-mix(in srgb, var(--accent-hot) 72%, var(--app-line));
  background: color-mix(in srgb, var(--accent-hot) 16%, var(--app-panel));
  box-shadow: 0 0 16px var(--accent-glow);
}

body.modal-open .profile-confirm-overlay {
  z-index: 10090;
}

.neo-danger-action:hover {
  border-color: rgba(239, 68, 68, 0.58);
  background: rgba(239, 68, 68, 0.2);
}

.neo-hero-control {
  min-height: 98px;
  margin-bottom: 12px;
  padding: 16px;
  border-color: rgba(245, 166, 35, 0.24);
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.16), rgba(0, 230, 118, 0.05)),
    var(--neo-card);
}

.neo-hero-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.neo-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.neo-choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.neo-choice {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--neo-line);
  border-radius: 8px;
  color: var(--neo-text);
  background: var(--neo-card);
  cursor: pointer;
}

.neo-choice svg {
  width: 16px;
  height: 16px;
  color: var(--neo-accent);
}

.neo-choice.active {
  border-color: rgba(245, 166, 35, 0.6);
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.24), transparent), var(--neo-card-2);
}

.neo-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--neo-line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.neo-input-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.autobet-input {
  width: 104px;
  height: 40px;
  border: 1px solid var(--neo-line);
  border-radius: 8px;
  color: var(--neo-text);
  background: rgba(0, 0, 0, 0.28);
  text-align: right;
  font-weight: 900;
}

.autobet-input-unit {
  color: var(--neo-good);
  font-size: 11px;
  font-weight: 900;
}

.neo-panel-head {
  margin-bottom: 10px;
  color: var(--neo-text);
  font-size: 13px;
  font-weight: 900;
}

.neo-mini-btn {
  min-width: 64px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
}

.neo-log {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--neo-line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.neo-log .autobet-log-empty,
.neo-log .autobet-log-row {
  border-radius: 8px;
  background: var(--neo-card);
}

.neo-switch {
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--neo-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.neo-switch.big {
  width: 58px;
  height: 32px;
}

.neo-switch span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 180ms ease;
}

.neo-switch.big span {
  width: 26px;
  height: 26px;
}

.neo-switch[aria-checked="true"] {
  border-color: rgba(245, 166, 35, 0.7);
  background: linear-gradient(90deg, var(--neo-accent), #ffcb76);
}

.neo-switch[aria-checked="true"] span {
  transform: translateX(20px);
}

.neo-switch.big[aria-checked="true"] span {
  transform: translateX(26px);
}

.neo-range-row {
  min-height: 96px;
}

.neo-range-row label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.neo-range {
  width: min(190px, 32vw);
  accent-color: var(--neo-accent);
}

.neo-toggle-row {
  min-height: 88px;
  padding: 14px;
}

[data-theme="light"] .neo-profile-overlay {
  --neo-bg: #f8f9fb;
  --neo-panel: #ffffff;
  --neo-card: rgba(255, 255, 255, 0.84);
  --neo-card-2: #ffffff;
  --neo-line: rgba(20, 23, 28, 0.12);
  --neo-line-strong: rgba(20, 23, 28, 0.18);
  --neo-text: #15171b;
  --neo-muted: #59616b;
  --neo-faint: #828a95;
  background:
    radial-gradient(900px 560px at 18% 0%, rgba(245, 166, 35, 0.18), transparent 58%),
    radial-gradient(720px 500px at 88% 100%, rgba(0, 166, 84, 0.1), transparent 60%),
    rgba(20, 23, 28, 0.42);
}

html.reduce-motion .neo-profile-dialog,
html.reduce-motion .neo-profile-pane.active {
  animation: none !important;
}

@keyframes neoProfileIn {
  0% { opacity: 0; transform: translateY(26px) scale(0.96); filter: blur(10px); }
  65% { opacity: 1; transform: translateY(-3px) scale(1.006); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes neoPaneIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 860px) {
  .neo-profile-overlay {
    align-items: stretch;
    padding: 10px;
  }

  .neo-profile-dialog {
    width: 100%;
    height: calc(100svh - 20px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 14px;
  }

  .neo-close {
    top: 14px;
    right: 14px;
  }

  .neo-profile-side {
    grid-template-rows: auto auto auto;
    gap: 10px;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--neo-line);
  }

  .neo-person-card {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 82px;
    padding: 12px 48px 12px 12px;
  }

  .neo-avatar {
    width: 52px;
    height: 52px;
  }

  .neo-balance-card {
    padding: 13px;
  }

  .neo-balance-value span {
    font-size: 31px;
  }

  .neo-profile-nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
  }

  .neo-profile-nav-btn {
    flex: 1 0 max(72px, 22%);
    justify-content: center;
    min-height: 40px;
    gap: 6px;
    padding: 0 8px;
    font-size: 11px;
  }

  .neo-profile-nav-btn.active::before {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 0;
    width: auto;
    height: 2px;
  }

  .neo-profile-body {
    padding: 14px;
  }

  .neo-pane-head strong {
    font-size: 20px;
  }

  .neo-grid-2,
  .neo-grid-3,
  .neo-grid-4,
  .neo-choice-grid,
  .neo-choice-grid.three {
    grid-template-columns: 1fr;
  }

  .neo-span-2 {
    grid-column: auto;
  }

  .neo-signal.wide,
  .neo-range-row,
  .neo-toggle-row,
  .neo-input-row,
  .neo-hero-control {
    align-items: flex-start;
    flex-direction: column;
  }

  .neo-range,
  .neo-range-row label {
    width: 100%;
  }
}

/* Low-cost Safety Engine motion: one compositor-owned SVG transform replaces
   the former requestAnimationFrame loop and its per-frame DOM writes. */
.profile-settings-shell [data-pane="autobet"] .safety-circuit-packet {
  opacity: 0;
  transform-box: view-box;
  transform-origin: 0 0;
  will-change: transform, opacity !important;
  animation: safetyCircuitPacketDesktop 10s linear infinite;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-flow-mobile .safety-circuit-packet {
  animation-name: safetyCircuitPacketMobile;
}
@keyframes safetyCircuitPacketDesktop {
  0% { transform: translate3d(10px,13px,0); opacity: 1; }
  14%,21% { transform: translate3d(75px,13px,0); opacity: 1; }
  30%,35% { transform: translate3d(140px,13px,0); opacity: 1; }
  36%,100% { transform: translate3d(140px,13px,0); opacity: 0; }
}
@keyframes safetyCircuitPacketMobile {
  0% { transform: translate3d(20px,13px,0); opacity: 1; }
  14%,21% { transform: translate3d(150px,13px,0); opacity: 1; }
  30%,35% { transform: translate3d(280px,13px,0); opacity: 1; }
  36%,100% { transform: translate3d(280px,13px,0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-settings-shell [data-pane="autobet"] .safety-circuit-packet { animation: none; }
}

/* Fresh profile modal rebuild. New namespace, new layout, no inherited modal chrome. */
.fresh-profile-overlay[hidden] { display: none; }

.fresh-profile-overlay {
  --fresh-ink: #f4f7f8;
  --fresh-soft: #aab7bd;
  --fresh-dim: #65747d;
  --fresh-line: rgba(226, 236, 240, 0.16);
  --fresh-panel: rgba(9, 18, 21, 0.94);
  --fresh-card: rgba(21, 35, 39, 0.74);
  --fresh-card-strong: rgba(29, 48, 53, 0.94);
  --fresh-cyan: #55d7e6;
  --fresh-blue: #5b8dff;
  --fresh-lime: #9ee86f;
  --fresh-red: #ff6b6b;
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 30px);
  color: var(--fresh-ink);
  background:
    linear-gradient(120deg, rgba(2, 8, 10, 0.92), rgba(12, 26, 31, 0.78)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 80px);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.fresh-profile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fresh-profile-sheet {
  width: min(980px, calc(100vw - 28px));
  height: min(84svh, 700px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--fresh-line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 170px),
    var(--fresh-panel);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58);
  transform: translateY(16px);
}

.fresh-profile-overlay.is-open .fresh-profile-sheet {
  animation: freshProfileIn 260ms ease-out both;
}

.fresh-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: stretch;
  padding: 18px;
  border-bottom: 1px solid var(--fresh-line);
}

.fresh-profile-identity,
.fresh-profile-wallet,
.fresh-profile-data,
.fresh-profile-box,
.fresh-profile-action,
.fresh-profile-status,
.fresh-profile-count,
.fresh-profile-toggle {
  border: 1px solid var(--fresh-line);
  border-radius: 6px;
  background: var(--fresh-card);
}

.fresh-profile-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.fresh-profile-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #061114;
  background: linear-gradient(135deg, var(--fresh-cyan), var(--fresh-lime));
}

.fresh-profile-mark svg,
.fresh-profile-tab svg,
.fresh-profile-tool svg,
.fresh-profile-choice svg {
  width: 18px;
  height: 18px;
}

.fresh-profile-label,
.fresh-profile-title span,
.fresh-profile-data span,
.fresh-profile-count span {
  color: var(--fresh-dim);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fresh-profile-identity h2 {
  margin: 3px 0 2px;
  overflow: hidden;
  color: var(--fresh-ink);
  font-size: 22px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fresh-profile-identity p,
.fresh-profile-title p,
.fresh-profile-data small,
.fresh-profile-action small,
.fresh-profile-status small,
.fresh-profile-choice small,
.fresh-profile-toggle small,
.fresh-profile-input small,
.fresh-profile-range small {
  margin: 0;
  color: var(--fresh-soft);
  font-size: 12px;
  line-height: 1.35;
}

.fresh-profile-wallet {
  min-width: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
}

.fresh-profile-wallet .fresh-profile-label {
  grid-column: 1 / -1;
}

.fresh-profile-wallet strong {
  color: var(--fresh-ink);
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.fresh-profile-wallet small {
  margin-left: 6px;
  color: var(--fresh-lime);
  font-size: 12px;
  font-weight: 850;
}

.fresh-profile-tool,
.fresh-profile-mini {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--fresh-line);
  border-radius: 6px;
  color: var(--fresh-soft);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.fresh-profile-tool {
  width: 38px;
  height: 38px;
}

.fresh-profile-close {
  align-self: start;
}

.fresh-profile-tool:hover,
.fresh-profile-mini:hover {
  color: var(--fresh-ink);
  border-color: rgba(85, 215, 230, 0.62);
  background: rgba(85, 215, 230, 0.12);
}

.fresh-profile-tool.spinning svg {
  animation: pmSpin 0.7s linear;
}

.fresh-profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--fresh-line);
}

.fresh-profile-tab {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--fresh-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.fresh-profile-tab.active {
  color: var(--fresh-ink);
  border-bottom-color: var(--fresh-cyan);
  background: linear-gradient(180deg, rgba(85, 215, 230, 0.1), rgba(85, 215, 230, 0.025));
}

.fresh-profile-content {
  min-width: 0;
  overflow: auto;
  padding: 18px;
}

.fresh-profile-pane { display: none; }

.fresh-profile-pane.active {
  display: block;
  animation: freshPaneIn 180ms ease-out both;
}

.fresh-profile-title {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.fresh-profile-title strong {
  color: var(--fresh-ink);
  font-size: 25px;
  line-height: 1.05;
}

.fresh-profile-mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.fresh-profile-data,
.fresh-profile-status,
.fresh-profile-count,
.fresh-profile-box,
.fresh-profile-action {
  padding: 14px;
}

.fresh-profile-data {
  grid-column: span 3;
  min-height: 104px;
}

.fresh-profile-data.wide {
  grid-column: span 6;
}

.fresh-profile-data strong {
  display: block;
  margin: 12px 0 4px;
  overflow: hidden;
  color: var(--fresh-ink);
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fresh-profile-status {
  grid-column: span 3;
  min-height: 88px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.fresh-profile-status.wide {
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.fresh-profile-status > span,
.fresh-profile-hot-dot,
.autobet-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--fresh-lime);
  box-shadow: 0 0 0 4px rgba(158, 232, 111, 0.12);
}

.fresh-profile-hot-dot {
  display: inline-block;
  background: var(--fresh-red);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.12);
}

.autobet-status-dot {
  display: inline-block;
  margin-right: 9px;
  background: var(--fresh-blue);
  box-shadow: 0 0 0 4px rgba(91, 141, 255, 0.12);
}

.autobet-status-dot.live {
  background: var(--fresh-lime);
}

.fresh-profile-status b,
.fresh-profile-action b,
.fresh-profile-box h3,
.fresh-profile-choice b,
.fresh-profile-toggle b,
.fresh-profile-range b,
.fresh-profile-input span {
  display: block;
  color: var(--fresh-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.fresh-profile-count {
  grid-column: span 2;
  min-height: 88px;
}

.fresh-profile-count strong {
  display: block;
  color: var(--fresh-ink);
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.fresh-profile-danger {
  grid-column: span 3;
  min-height: 88px;
  border: 1px solid rgba(255, 107, 107, 0.34);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 107, 107, 0.16);
  font-weight: 900;
  cursor: pointer;
}

.fresh-profile-danger:hover {
  background: rgba(255, 107, 107, 0.24);
}

.fresh-profile-action {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(85, 215, 230, 0.16), rgba(91, 141, 255, 0.08)), var(--fresh-card);
}

.fresh-profile-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.fresh-profile-box h3 {
  margin: 0 0 12px;
}

.fresh-profile-choice-grid,
.fresh-profile-count-grid,
.fresh-profile-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fresh-profile-choice-grid.three,
.fresh-profile-count-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fresh-profile-choice {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--fresh-line);
  border-radius: 6px;
  color: var(--fresh-ink);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
}

.fresh-profile-choice svg {
  color: var(--fresh-cyan);
  margin-bottom: 8px;
}

.fresh-profile-choice.active {
  border-color: rgba(85, 215, 230, 0.7);
  background: rgba(85, 215, 230, 0.14);
}

.fresh-profile-input,
.fresh-profile-range,
.fresh-profile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fresh-profile-input {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--fresh-line);
  border-radius: 6px;
}

.fresh-profile-input div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fresh-profile-input em {
  color: var(--fresh-lime);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.autobet-input {
  width: 104px;
  height: 38px;
  border: 1px solid var(--fresh-line);
  border-radius: 6px;
  color: var(--fresh-ink);
  background: rgba(0, 0, 0, 0.2);
  text-align: right;
  font-weight: 900;
}

.fresh-profile-box-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.fresh-profile-box-head h3 {
  margin: 0;
}

.fresh-profile-mini {
  min-width: 72px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
}

.fresh-profile-log {
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--fresh-line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
}

.fresh-profile-switch {
  width: 46px;
  height: 25px;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--fresh-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.fresh-profile-switch.large {
  width: 60px;
  height: 32px;
}

.fresh-profile-switch span {
  display: block;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--fresh-ink);
  transition: transform 160ms ease;
}

.fresh-profile-switch.large span {
  width: 26px;
  height: 26px;
}

.fresh-profile-switch[aria-checked="true"] {
  border-color: rgba(85, 215, 230, 0.76);
  background: linear-gradient(90deg, var(--fresh-cyan), var(--fresh-blue));
}

.fresh-profile-switch[aria-checked="true"] span {
  transform: translateX(21px);
}

.fresh-profile-switch.large[aria-checked="true"] span {
  transform: translateX(28px);
}

.fresh-profile-range input {
  width: min(220px, 30vw);
  accent-color: var(--fresh-cyan);
}

.fresh-profile-toggle {
  min-height: 86px;
  padding: 13px;
}

[data-theme="light"] .fresh-profile-overlay {
  --fresh-ink: #102025;
  --fresh-soft: #53666d;
  --fresh-dim: #7b8a90;
  --fresh-line: rgba(16, 32, 37, 0.14);
  --fresh-panel: rgba(245, 249, 250, 0.96);
  --fresh-card: rgba(255, 255, 255, 0.78);
  --fresh-card-strong: #ffffff;
  background:
    linear-gradient(120deg, rgba(228, 244, 247, 0.88), rgba(237, 241, 255, 0.76)),
    repeating-linear-gradient(90deg, rgba(16, 32, 37, 0.05) 0 1px, transparent 1px 80px);
}

html.reduce-motion .fresh-profile-sheet,
html.reduce-motion .fresh-profile-pane.active {
  animation: none !important;
}

@keyframes freshProfileIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes freshPaneIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .fresh-profile-overlay {
    align-items: stretch;
    padding: 10px;
  }

  .fresh-profile-sheet {
    width: 100%;
    height: calc(100svh - 20px);
  }

  .fresh-profile-header,
  .fresh-profile-tabs,
  .fresh-profile-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .fresh-profile-header {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .fresh-profile-wallet {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }

  .fresh-profile-close {
    grid-column: 2;
    grid-row: 1;
  }

  .fresh-profile-tabs {
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(88px, 1fr));
  }

  .fresh-profile-tab {
    min-height: 46px;
    font-size: 11px;
  }

  .fresh-profile-mosaic,
  .fresh-profile-split,
  .fresh-profile-choice-grid,
  .fresh-profile-choice-grid.three,
  .fresh-profile-count-grid,
  .fresh-profile-toggle-grid {
    grid-template-columns: 1fr;
  }

  .fresh-profile-data,
  .fresh-profile-data.wide,
  .fresh-profile-status,
  .fresh-profile-count,
  .fresh-profile-danger {
    grid-column: auto;
  }

  .fresh-profile-action,
  .fresh-profile-status.wide,
  .fresh-profile-input,
  .fresh-profile-range,
  .fresh-profile-toggle {
    align-items: flex-start;
    flex-direction: column;
  }

  .fresh-profile-range input {
    width: 100%;
  }
}

/* Compact profile modal pass: align with the rest of the app modals. */
.fresh-profile-overlay {
  --fresh-ink: var(--pm-text, #ffffff);
  --fresh-soft: var(--pm-text-2, #9a9a9a);
  --fresh-dim: var(--pm-text-muted, #666666);
  --fresh-line: var(--pm-border, #202020);
  --fresh-line-strong: var(--pm-border-strong, #303030);
  --fresh-panel: var(--pm-panel, #020202);
  --fresh-card: var(--pm-surface, #0b0b0b);
  --fresh-cyan: var(--pm-accent, #f5a623);
  --fresh-blue: var(--pm-accent, #f5a623);
  --fresh-lime: var(--pm-good, #00e676);
  --fresh-red: var(--pm-danger, #ef4444);
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.fresh-profile-sheet {
  width: min(520px, calc(100vw - 28px));
  height: min(88svh, 680px);
  border-color: var(--fresh-line-strong);
  border-radius: 14px;
  background: var(--fresh-panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
}

.fresh-profile-header {
  grid-template-columns: minmax(0, 1fr) 140px 34px;
  gap: 10px;
  padding: 14px;
  background: var(--fresh-card);
}

.fresh-profile-identity,
.fresh-profile-wallet,
.fresh-profile-data,
.fresh-profile-box,
.fresh-profile-action,
.fresh-profile-status,
.fresh-profile-count,
.fresh-profile-toggle {
  border-color: var(--fresh-line);
  border-radius: 10px;
  background: var(--fresh-panel);
  box-shadow: none;
}

.fresh-profile-identity {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  min-height: 58px;
  padding: 9px;
  border: 0;
  background: transparent;
}

.fresh-profile-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--fresh-cyan);
  background: rgba(245, 166, 35, 0.09);
  border: 1px solid rgba(245, 166, 35, 0.22);
}

.fresh-profile-mark svg,
.fresh-profile-tab svg,
.fresh-profile-tool svg,
.fresh-profile-choice svg {
  width: 15px;
  height: 15px;
}

.fresh-profile-identity h2 {
  margin: 2px 0;
  font-size: 16px;
  font-weight: 750;
}

.fresh-profile-identity p {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
}

.fresh-profile-label,
.fresh-profile-title span,
.fresh-profile-data span,
.fresh-profile-count span {
  font-size: 10px;
  font-weight: 800;
  color: var(--fresh-dim);
}

.fresh-profile-wallet {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 5px 8px;
  padding: 9px;
}

.fresh-profile-wallet strong {
  font-size: 19px;
  font-weight: 800;
}

.fresh-profile-wallet small {
  color: var(--fresh-cyan);
  font-size: 11px;
}

.fresh-profile-tool {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

.fresh-profile-tool:hover,
.fresh-profile-mini:hover {
  border-color: var(--fresh-cyan);
  background: rgba(245, 166, 35, 0.09);
}

.fresh-profile-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 12px 0;
  background: var(--fresh-panel);
}

.fresh-profile-tab {
  flex: 1;
  min-height: 40px;
  gap: 6px;
  padding: 0 4px 8px;
  color: var(--fresh-dim);
  font-size: 11px;
  font-weight: 700;
}

.fresh-profile-tab.active {
  color: var(--fresh-cyan);
  border-bottom-color: var(--fresh-cyan);
  background: transparent;
}

.fresh-profile-content {
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--fresh-line-strong) transparent;
}

.fresh-profile-pane.active {
  animation: pmPaneIn 0.22s ease-out both;
}

.fresh-profile-title {
  margin-bottom: 10px;
  gap: 2px;
}

.fresh-profile-title strong {
  font-size: 16px;
  font-weight: 750;
}

.fresh-profile-title p,
.fresh-profile-data small,
.fresh-profile-choice small,
.fresh-profile-toggle small,
.fresh-profile-input small,
.fresh-profile-range small {
  display: none;
}

.fresh-profile-mosaic {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fresh-profile-data,
.fresh-profile-data.wide,
.fresh-profile-status,
.fresh-profile-count,
.fresh-profile-danger {
  grid-column: auto;
}

.fresh-profile-data,
.fresh-profile-status,
.fresh-profile-count,
.fresh-profile-box,
.fresh-profile-action {
  padding: 10px;
}

.fresh-profile-data {
  min-height: 66px;
}

.fresh-profile-data strong {
  margin: 7px 0 0;
  font-size: 14px;
  font-weight: 750;
}

.fresh-profile-status {
  min-height: 58px;
  grid-template-columns: 9px minmax(0, 1fr);
}

.fresh-profile-status b,
.fresh-profile-action b,
.fresh-profile-box h3,
.fresh-profile-choice b,
.fresh-profile-toggle b,
.fresh-profile-range b,
.fresh-profile-input span {
  font-size: 12px;
}

.fresh-profile-status small,
.fresh-profile-action small {
  color: var(--fresh-dim);
  font-size: 11px;
}

.fresh-profile-count {
  min-height: 58px;
}

.fresh-profile-count strong {
  font-size: 22px;
  font-weight: 800;
}

.fresh-profile-danger {
  min-height: 58px;
  border-color: rgba(239, 68, 68, 0.28);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.09);
  color: var(--fresh-red);
  font-size: 12px;
}

.fresh-profile-action {
  min-height: 66px;
  margin-bottom: 8px;
  background: var(--fresh-card);
}

.fresh-profile-split {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.fresh-profile-box h3 {
  margin-bottom: 9px;
  color: var(--fresh-soft);
}

.fresh-profile-choice-grid,
.fresh-profile-choice-grid.three,
.fresh-profile-count-grid,
.fresh-profile-toggle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fresh-profile-choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fresh-profile-choice {
  min-height: 58px;
  padding: 10px;
  border-radius: 10px;
  background: var(--fresh-panel);
}

.fresh-profile-choice svg {
  margin-bottom: 5px;
  color: var(--fresh-cyan);
}

.fresh-profile-choice.active {
  border-color: rgba(245, 166, 35, 0.52);
  background: rgba(245, 166, 35, 0.08);
}

.fresh-profile-input,
.fresh-profile-range,
.fresh-profile-toggle {
  min-height: 54px;
  padding: 10px;
  border-radius: 10px;
}

.fresh-profile-input {
  margin-top: 8px;
  background: var(--fresh-panel);
}

.autobet-input {
  height: 34px;
  width: 90px;
  border-color: var(--fresh-line-strong);
  border-radius: 9px;
  background: #000;
}

.fresh-profile-input em {
  color: var(--fresh-cyan);
}

.fresh-profile-box-head {
  margin-bottom: 8px;
}

.fresh-profile-mini {
  min-width: 64px;
  min-height: 30px;
  border-radius: 9px;
  font-size: 11px;
}

.fresh-profile-log {
  max-height: 150px;
  border-radius: 10px;
}

.fresh-profile-switch {
  width: 42px;
  height: 23px;
}

.fresh-profile-switch.large {
  width: 50px;
  height: 28px;
}

.fresh-profile-switch span {
  width: 17px;
  height: 17px;
}

.fresh-profile-switch.large span {
  width: 22px;
  height: 22px;
}

.fresh-profile-switch[aria-checked="true"] {
  border-color: rgba(245, 166, 35, 0.56);
  background: rgba(245, 166, 35, 0.95);
}

.fresh-profile-switch[aria-checked="true"] span {
  transform: translateX(19px);
}

.fresh-profile-switch.large[aria-checked="true"] span {
  transform: translateX(22px);
}

.fresh-profile-range input {
  width: min(170px, 40vw);
  accent-color: var(--fresh-cyan);
}

.fresh-profile-status > span,
.fresh-profile-hot-dot,
.autobet-status-dot {
  background: var(--fresh-lime);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.7);
}

.fresh-profile-hot-dot {
  background: var(--fresh-red);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.65);
}

.autobet-status-dot {
  background: var(--fresh-cyan);
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.62);
}

[data-theme="light"] .fresh-profile-overlay {
  --fresh-ink: #14171c;
  --fresh-soft: #5c636e;
  --fresh-dim: #8b929c;
  --fresh-line: #e2e5ea;
  --fresh-line-strong: #d2d6dd;
  --fresh-panel: #ffffff;
  --fresh-card: #f4f5f7;
  --fresh-cyan: #e08a00;
  --fresh-lime: #17924d;
  --fresh-red: #d63b3b;
  background: rgba(20, 23, 28, 0.42);
}

@media (max-width: 560px) {
  .fresh-profile-overlay {
    padding: 10px;
  }

  .fresh-profile-sheet {
    width: 100%;
    height: calc(100svh - 20px);
  }

  .fresh-profile-header {
    grid-template-columns: minmax(0, 1fr) 34px;
    padding: 12px;
  }

  .fresh-profile-wallet {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .fresh-profile-close {
    grid-column: 2;
    grid-row: 1;
  }

  .fresh-profile-mosaic,
  .fresh-profile-choice-grid.three,
  .fresh-profile-count-grid,
  .fresh-profile-toggle-grid {
    grid-template-columns: 1fr;
  }
}

/* Final modal polish: compact professional sizing and resilient grids. */
.fresh-profile-sheet {
  width: clamp(360px, 44vw, 560px);
  height: clamp(500px, 86svh, 700px);
  max-width: calc(100vw - 28px);
  max-height: calc(100svh - 28px);
  border-radius: 16px;
}

.fresh-profile-header {
  grid-template-columns: minmax(0, 1fr) minmax(112px, 138px) 34px;
  align-items: center;
}

.fresh-profile-content {
  min-height: 0;
  overscroll-behavior: contain;
}

.fresh-profile-data,
.fresh-profile-box,
.fresh-profile-action,
.fresh-profile-status,
.fresh-profile-count,
.fresh-profile-danger,
.fresh-profile-choice,
.fresh-profile-input,
.fresh-profile-toggle {
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.fresh-profile-data:hover,
.fresh-profile-box:hover,
.fresh-profile-status:hover,
.fresh-profile-count:hover,
.fresh-profile-choice:hover {
  border-color: var(--fresh-line-strong);
  background-color: #050505;
}

.fresh-profile-mosaic {
  align-items: stretch;
}

.fresh-profile-count-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fresh-profile-count-grid .fresh-profile-count {
  min-width: 0;
}

.fresh-profile-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.fresh-profile-input div {
  justify-self: end;
}

.autobet-input {
  width: 68px;
  min-width: 0;
  padding: 0 8px;
}

.fresh-profile-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 170px) 38px;
}

.fresh-profile-range input {
  width: 100%;
}

.fresh-profile-range > span {
  color: var(--fresh-cyan);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.fresh-profile-choice-grid.three .fresh-profile-choice {
  min-height: 66px;
}

.fresh-profile-pane[data-pane="appearance"] .fresh-profile-box {
  max-width: 100%;
}

.fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice {
  display: grid;
  align-content: center;
  text-align: center;
}

.fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice b {
  font-size: 13px;
}

@media (min-width: 620px) {
  .fresh-profile-sheet {
    width: min(560px, calc(100vw - 36px));
  }
}

@media (max-width: 460px) {
  .fresh-profile-sheet {
    width: 100%;
    height: calc(100svh - 20px);
    max-height: calc(100svh - 20px);
  }

  .fresh-profile-overlay {
    padding: 10px;
  }

  .fresh-profile-header {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .fresh-profile-wallet {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .fresh-profile-tabs {
    padding-inline: 8px;
  }

  .fresh-profile-tab {
    font-size: 10px;
  }

  .fresh-profile-tab svg {
    width: 13px;
    height: 13px;
  }

  .fresh-profile-mosaic,
  .fresh-profile-choice-grid,
  .fresh-profile-choice-grid.three,
  .fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice-grid.three {
    grid-template-columns: 1fr;
  }

  .fresh-profile-count-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .fresh-profile-count-grid .fresh-profile-count {
    min-height: 54px;
    padding: 8px;
  }

  .fresh-profile-count-grid .fresh-profile-count strong {
    font-size: 20px;
  }

  .fresh-profile-input,
  .fresh-profile-range {
    grid-template-columns: 1fr;
  }

  .fresh-profile-input div {
    justify-self: stretch;
  }

  .autobet-input {
    width: min(96px, 100%);
  }
}

@media (max-height: 620px) {
  .fresh-profile-sheet {
    height: calc(100svh - 20px);
    max-height: calc(100svh - 20px);
  }

  .fresh-profile-header {
    padding-block: 10px;
  }

  .fresh-profile-content {
    padding-block: 10px;
  }

  .fresh-profile-data,
  .fresh-profile-status,
  .fresh-profile-count,
  .fresh-profile-danger {
    min-height: 52px;
  }

  .fresh-profile-log {
    max-height: 110px;
  }
}

/* Visual QA corrections from modal screenshots. */
.fresh-profile-sheet {
  width: min(520px, calc(100vw - 28px));
}

.fresh-profile-header {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 150px) 34px;
}

.fresh-profile-mosaic {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fresh-profile-data,
.fresh-profile-status,
.fresh-profile-count,
.fresh-profile-danger {
  min-height: 64px;
}

.fresh-profile-action {
  flex-direction: row;
  align-items: center;
  min-height: 76px;
}

.fresh-profile-action > div {
  min-width: 0;
}

.fresh-profile-action .fresh-profile-switch {
  margin-left: auto;
}

.fresh-profile-count-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fresh-profile-count-grid .fresh-profile-count {
  min-height: 70px;
}

.fresh-profile-pane[data-pane="autobet"] .fresh-profile-box {
  overflow: hidden;
}

.fresh-profile-pane[data-pane="autobet"] .fresh-profile-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fresh-profile-input {
  grid-template-columns: minmax(0, 1fr) auto;
}

.fresh-profile-input div {
  width: auto;
}

.autobet-input {
  width: 64px;
}

body.modal-open .toast-container {
  top: auto;
  bottom: 24px;
}

body.modal-open .custom-toast {
  max-width: min(360px, calc(100vw - 32px));
}

@media (max-width: 460px) {
  .fresh-profile-sheet {
    width: calc(100vw - 20px);
  }

  .fresh-profile-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fresh-profile-data,
  .fresh-profile-status,
  .fresh-profile-count,
  .fresh-profile-danger {
    min-height: 62px;
    padding: 9px;
  }

  .fresh-profile-data strong {
    font-size: 13px;
  }

  .fresh-profile-status {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .fresh-profile-count strong {
    font-size: 20px;
  }

  .fresh-profile-action {
    flex-direction: row;
    align-items: center;
  }

  .fresh-profile-action small {
    display: none;
  }

  .fresh-profile-count-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fresh-profile-pane[data-pane="autobet"] .fresh-profile-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fresh-profile-choice {
    min-height: 56px;
    padding: 9px;
  }

  .fresh-profile-input {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .fresh-profile-input div {
    justify-self: end;
  }

  .autobet-input {
    width: 58px;
  }

  .fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 340px) {
  .fresh-profile-mosaic,
  .fresh-profile-pane[data-pane="autobet"] .fresh-profile-choice-grid,
  .fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice-grid.three {
    grid-template-columns: 1fr;
  }
}

/* Second screenshot QA pass: content-aware height and balanced account rows. */
.fresh-profile-sheet {
  height: auto;
  max-height: calc(100svh - 28px);
  grid-template-rows: auto auto auto;
}

.fresh-profile-header {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 150px) 34px;
}

.fresh-profile-wallet,
.fresh-profile-close {
  grid-column: auto;
  grid-row: auto;
}

.fresh-profile-content {
  max-height: calc(100svh - 205px);
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-mosaic {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-data,
.fresh-profile-pane[data-pane="account"] .fresh-profile-status {
  grid-column: span 3;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-count {
  grid-column: span 2;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-danger {
  grid-column: 1 / -1;
  min-height: 54px;
}

.fresh-profile-pane[data-pane="appearance"] {
  min-height: 0;
}

@media (max-width: 460px) {
  .fresh-profile-sheet {
    height: auto;
    max-height: calc(100svh - 20px);
  }

  .fresh-profile-header {
    grid-template-columns: minmax(0, 1fr) minmax(118px, 132px) 34px;
  }

  .fresh-profile-wallet,
  .fresh-profile-close {
    grid-column: auto;
    grid-row: auto;
  }

  .fresh-profile-content {
    max-height: calc(100svh - 190px);
  }

  .fresh-profile-pane[data-pane="account"] .fresh-profile-mosaic {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .fresh-profile-header {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .fresh-profile-wallet {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .fresh-profile-close {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 340px) {
  .fresh-profile-pane[data-pane="account"] .fresh-profile-mosaic {
    grid-template-columns: 1fr;
  }

  .fresh-profile-pane[data-pane="account"] .fresh-profile-data,
  .fresh-profile-pane[data-pane="account"] .fresh-profile-status,
  .fresh-profile-pane[data-pane="account"] .fresh-profile-count,
  .fresh-profile-pane[data-pane="account"] .fresh-profile-danger {
    grid-column: auto;
  }
}

.fresh-profile-overlay {
  align-items: center;
  justify-items: center;
}

.fresh-profile-sheet {
  align-content: start;
}

.fresh-profile-overlay.is-open .fresh-profile-sheet,
.fresh-profile-pane.active {
  animation: none;
  opacity: 1;
  transform: none;
}

@media (max-height: 620px) {
  .fresh-profile-sheet {
    height: auto;
    max-height: calc(100svh - 20px);
  }

  .fresh-profile-header {
    padding: 8px 12px;
  }

  .fresh-profile-identity {
    min-height: 46px;
    padding: 6px;
  }

  .fresh-profile-mark {
    width: 32px;
    height: 32px;
  }

  .fresh-profile-wallet {
    padding: 7px;
  }

  .fresh-profile-wallet strong {
    font-size: 17px;
  }

  .fresh-profile-tabs {
    padding-top: 6px;
  }

  .fresh-profile-tab {
    min-height: 36px;
    padding-bottom: 6px;
  }

  .fresh-profile-content {
    max-height: calc(100svh - 152px);
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .fresh-profile-title {
    margin-bottom: 8px;
  }

  .fresh-profile-action {
    min-height: 62px;
  }

  .fresh-profile-box {
    padding: 9px;
  }

  .fresh-profile-choice,
  .fresh-profile-count-grid .fresh-profile-count {
    min-height: 54px;
  }
}

/* Direction trial: compact quick-settings + premium minimal dark panel. */
.fresh-profile-overlay {
  background:
    radial-gradient(520px 360px at 50% 12%, rgba(245, 166, 35, 0.08), transparent 62%),
    rgba(0, 0, 0, 0.72);
}

.fresh-profile-sheet {
  width: min(500px, calc(100vw - 24px));
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: #0a0a0a;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.74), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.fresh-profile-header {
  padding: 16px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent), #101010;
}

.fresh-profile-identity {
  padding: 0;
  min-height: 46px;
}

.fresh-profile-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(245, 166, 35, 0.12);
}

.fresh-profile-wallet {
  border-radius: 12px;
  background: #050505;
}

.fresh-profile-close {
  border-radius: 12px;
}

.fresh-profile-tabs {
  padding: 0 16px;
  gap: 0;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: #090909;
}

.fresh-profile-tab {
  min-height: 46px;
  padding: 0 4px;
  border-bottom-width: 2px;
}

.fresh-profile-content {
  padding: 16px;
}

.fresh-profile-title {
  margin-bottom: 12px;
}

.fresh-profile-title strong {
  font-size: 18px;
}

.fresh-profile-data,
.fresh-profile-status,
.fresh-profile-count,
.fresh-profile-danger,
.fresh-profile-action,
.fresh-profile-box,
.fresh-profile-choice,
.fresh-profile-input,
.fresh-profile-toggle {
  border-color: rgba(255, 255, 255, 0.095);
  background: #070707;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-mosaic {
  gap: 8px;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-data,
.fresh-profile-pane[data-pane="account"] .fresh-profile-status {
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 10px 12px;
}

.fresh-profile-data strong {
  margin-top: 5px;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-count {
  min-height: 62px;
  padding: 11px 12px;
  background: #050505;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-danger {
  min-height: 48px;
  background: rgba(239, 68, 68, 0.08);
}

.fresh-profile-action {
  min-height: 72px;
  padding: 12px;
  background: #101010;
}

.fresh-profile-box {
  padding: 12px;
  background: #080808;
}

.fresh-profile-choice {
  min-height: 64px;
  background: #030303;
}

.fresh-profile-choice.active {
  background: rgba(245, 166, 35, 0.1);
}

.fresh-profile-input {
  min-height: 50px;
  padding: 10px;
  background: #030303;
}

.fresh-profile-count-grid .fresh-profile-count {
  min-height: 62px;
}

.fresh-profile-log {
  max-height: 116px;
  background: #030303;
}

.fresh-profile-pane[data-pane="appearance"] .fresh-profile-box {
  padding: 12px;
}

.fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice {
  min-height: 58px;
}

@media (max-width: 460px) {
  .fresh-profile-sheet {
    width: calc(100vw - 20px);
  }

  .fresh-profile-header {
    padding: 14px;
  }

  .fresh-profile-tabs {
    padding-inline: 10px;
  }

  .fresh-profile-content {
    padding: 14px;
  }
}

/* Content redesign: cleaner rows, badges, and compact cards inside each pane. */
.fresh-profile-content {
  background: #070707;
}

.fresh-profile-title {
  padding: 0 2px;
}

.fresh-profile-title span {
  color: #6f6f6f;
}

.fresh-profile-title strong {
  letter-spacing: 0;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-data,
.fresh-profile-pane[data-pane="account"] .fresh-profile-status {
  grid-column: auto;
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent), #0b0b0b;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-data span,
.fresh-profile-pane[data-pane="account"] .fresh-profile-status b {
  grid-column: 1;
  color: #8a8a8a;
  font-size: 11px;
  font-weight: 750;
  text-transform: none;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-data strong,
.fresh-profile-pane[data-pane="account"] .fresh-profile-status small {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  max-width: 210px;
  color: #f7f7f7;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-status {
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-status > span {
  grid-column: 1;
  grid-row: 1;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-status div {
  display: contents;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-status b {
  grid-column: 2;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-status small {
  grid-column: 3;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-count {
  grid-column: auto;
  min-height: 62px;
  border-radius: 12px;
  background: #050505;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-count:nth-of-type(7) {
  margin-top: 4px;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-count:nth-of-type(7),
.fresh-profile-pane[data-pane="account"] .fresh-profile-count:nth-of-type(8),
.fresh-profile-pane[data-pane="account"] .fresh-profile-count:nth-of-type(9) {
  display: inline-grid;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-mosaic {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-data,
.fresh-profile-pane[data-pane="account"] .fresh-profile-status,
.fresh-profile-pane[data-pane="account"] .fresh-profile-danger {
  grid-column: 1 / -1;
}

.fresh-profile-pane[data-pane="account"] .fresh-profile-count {
  grid-column: span 1;
}

.fresh-profile-danger {
  margin-top: 4px;
  min-height: 46px;
  border-radius: 12px;
}

.fresh-profile-action {
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(90deg, rgba(245, 166, 35, 0.08), transparent 44%),
    #0d0d0d;
}

.fresh-profile-action b {
  font-size: 13px;
}

.fresh-profile-action small {
  margin-top: 3px;
}

.fresh-profile-box {
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.08);
  background: #0a0a0a;
}

.fresh-profile-box h3 {
  color: #8d8d8d;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.fresh-profile-choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-content: center;
  border-radius: 12px;
}

.fresh-profile-choice svg {
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
}

.fresh-profile-choice b {
  align-self: end;
}

.fresh-profile-choice small {
  display: block;
  color: #747474;
  font-size: 10.5px;
}

.fresh-profile-choice.active {
  border-color: rgba(245, 166, 35, 0.72);
  box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.08);
}

.fresh-profile-input,
.fresh-profile-range,
.fresh-profile-status.wide {
  border-radius: 12px;
  background: #050505;
}

.fresh-profile-input label {
  min-width: 0;
}

.fresh-profile-input small,
.fresh-profile-range small {
  display: block;
  color: #6f6f6f;
  font-size: 10.5px;
}

.autobet-input {
  background: #0b0b0b;
}

.fresh-profile-count-grid {
  gap: 8px;
}

.fresh-profile-count-grid .fresh-profile-count {
  display: grid;
  align-content: center;
  border-radius: 12px;
  background: #050505;
}

.fresh-profile-log {
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 12px;
}

.fresh-profile-log .autobet-log-empty {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: #a7a7a7;
  font-size: 12px;
}

.fresh-profile-mini {
  border-radius: 999px;
  background: #151515;
}

.fresh-profile-range {
  padding: 12px;
}

.fresh-profile-range input {
  height: 4px;
}

.fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice {
  grid-template-columns: 1fr;
  place-items: center;
  text-align: center;
}

.fresh-profile-pane[data-pane="appearance"] .fresh-profile-choice small {
  display: none;
}

@media (max-width: 460px) {
  .fresh-profile-pane[data-pane="account"] .fresh-profile-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fresh-profile-pane[data-pane="account"] .fresh-profile-data,
  .fresh-profile-pane[data-pane="account"] .fresh-profile-status,
  .fresh-profile-pane[data-pane="account"] .fresh-profile-danger {
    grid-column: 1 / -1;
  }

  .fresh-profile-pane[data-pane="account"] .fresh-profile-data strong,
  .fresh-profile-pane[data-pane="account"] .fresh-profile-status small {
    max-width: 150px;
  }

  .fresh-profile-choice small {
    display: none;
  }
}

/* iOS-inspired grouped sheet redesign. */
.fresh-profile-sheet {
  width: min(430px, calc(100vw - 22px));
  border-radius: 22px;
  background: #111112;
}

.fresh-profile-header {
  grid-template-columns: minmax(0, 1fr) auto 34px;
  padding: 14px 16px;
  background: #1c1c1e;
}

.fresh-profile-wallet {
  width: 148px;
  border: 0;
  background: #0b0b0c;
}

.fresh-profile-tabs {
  padding: 6px 10px;
  gap: 4px;
  background: #111112;
}

.fresh-profile-tab {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  color: #8e8e93;
}

.fresh-profile-tab.active {
  color: #fff;
  background: rgba(245, 166, 35, 0.16);
}

.fresh-profile-content {
  padding: 14px 16px 16px;
  background: #000;
}

.ios-pane-title {
  margin: 0 0 10px;
}

.ios-pane-title span {
  display: block;
  color: #8e8e93;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ios-pane-title strong {
  display: block;
  color: #f5f5f7;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.1;
}

.ios-list-group,
.ios-log-group {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: #1c1c1e;
}

.ios-list-group + .ios-metric-strip,
.ios-metric-strip + .ios-log-group,
.ios-list-group + .ios-log-group {
  margin-top: 12px;
}

.ios-list-row {
  min-height: 47px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255,255,255,0.075);
}

.ios-list-row:last-child {
  border-bottom: 0;
}

.ios-list-row > span {
  min-width: 0;
  color: #d9d9dd;
  font-size: 14px;
  font-weight: 650;
}

.ios-list-row > strong {
  max-width: 190px;
  overflow: hidden;
  color: #f5f5f7;
  font-size: 14px;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ios-list-row small {
  display: block;
  margin-top: 2px;
  color: #8e8e93;
  font-size: 11px;
  font-weight: 500;
}

.ios-list-row i {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  background: #30d158;
  box-shadow: 0 0 10px rgba(48, 209, 88, 0.65);
}

.ios-list-row.control > span,
.ios-list-row.action > span {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 8px;
}

.ios-list-row.control i,
.ios-list-row.action i {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
}

.ios-list-row.control b,
.ios-list-row.action b,
.ios-list-row.input b,
.ios-list-row.range b {
  color: #f5f5f7;
  font-size: 14px;
  font-weight: 750;
}

.ios-list-row.control small,
.ios-list-row.action small {
  grid-column: 2;
}

.ios-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.075);
}

.ios-choice-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 0;
}

.ios-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  color: #f5f5f7;
  background: #0b0b0c;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.ios-chip svg {
  width: 14px;
  height: 14px;
  color: #ffb020;
}

.ios-chip.active,
.ios-chip:hover {
  border-color: rgba(255, 176, 32, 0.7);
  background: rgba(255, 176, 32, 0.15);
}

.ios-list-row.input label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ios-list-row.input .autobet-input {
  width: 48px;
  height: 30px;
  border-radius: 9px;
}

.ios-list-row.input em,
.ios-list-row.range em {
  color: #ffb020;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.ios-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ios-metric-strip article {
  min-height: 62px;
  display: grid;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 15px;
  background: #1c1c1e;
}

.ios-metric-strip strong {
  color: #f5f5f7;
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
}

.ios-metric-strip span {
  margin-top: 5px;
  color: #8e8e93;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.ios-danger-row {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 1px solid rgba(255, 69, 58, 0.22);
  border-radius: 15px;
  color: #ff453a;
  background: rgba(255, 69, 58, 0.1);
  font-weight: 800;
}

.ios-log-group {
  padding: 10px;
}

.ios-log-group > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.ios-log-group > div:first-child span {
  color: #d9d9dd;
  font-size: 13px;
  font-weight: 760;
}

.ios-log-group .fresh-profile-log {
  border: 0;
  background: #0b0b0c;
}

.ios-list-row.range {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 1fr) 38px;
}

.ios-list-row.range input {
  width: 100%;
  accent-color: #ffb020;
}

.fresh-profile-hot-dot {
  background: #ff453a !important;
  box-shadow: 0 0 10px rgba(255, 69, 58, 0.62) !important;
}

.autobet-status-dot {
  background: #ffb020 !important;
  box-shadow: 0 0 10px rgba(255, 176, 32, 0.62) !important;
}

.fresh-profile-switch {
  background: #3a3a3c;
  border: 0;
}

.fresh-profile-switch span {
  background: #fff;
}

.fresh-profile-switch[aria-checked="true"] {
  background: #30d158;
  border: 0;
}

@media (max-width: 460px) {
  .fresh-profile-sheet {
    width: calc(100vw - 20px);
  }

  .fresh-profile-header {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 130px) 34px;
    padding: 13px;
  }

  .fresh-profile-content {
    padding: 13px;
  }

  .ios-list-row {
    padding-inline: 12px;
  }

  .ios-list-row > strong {
    max-width: 128px;
  }

  .ios-list-row.range {
    grid-template-columns: 1fr;
  }
}

/* Match existing app modal system: awaiting/logs modal visual language. */
.fresh-profile-overlay {
  z-index: 1000;
  padding: clamp(12px, 5vh, 64px) 16px;
  align-items: safe center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.fresh-profile-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;
  border: 1px solid var(--border-active);
  border-radius: 12px;
  background: #020202;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

@media (min-width: 768px) {
  .fresh-profile-sheet {
    width: min(560px, calc(100vw - 32px));
  }
}

.fresh-profile-header {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 27px;
  gap: 10px;
  align-items: center;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
  background: #050505;
}

.fresh-profile-identity {
  min-height: 27px;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  padding: 0;
}

.fresh-profile-mark {
  width: 8px;
  height: 8px;
  align-self: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent-hot);
  box-shadow: 0 0 8px 1px rgba(245, 166, 35, 0.6);
}

.fresh-profile-mark svg {
  display: none;
}

.fresh-profile-label {
  display: none;
}

.fresh-profile-identity h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.fresh-profile-identity p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.fresh-profile-wallet {
  width: auto;
  min-width: 116px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #121212;
}

.fresh-profile-wallet .fresh-profile-label {
  display: none;
}

.fresh-profile-wallet div {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.fresh-profile-wallet strong {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
  font-family: monospace;
  line-height: 1;
}

.fresh-profile-wallet small {
  margin: 0;
  color: var(--accent-hot);
  font-size: 10px;
  font-weight: 800;
}

.fresh-profile-tool {
  width: 27px;
  height: 27px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  background: #121212;
}

.fresh-profile-tool svg {
  width: 15px;
  height: 15px;
}

.fresh-profile-tool:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: #121212;
}

.fresh-profile-tabs {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: #000;
}

.fresh-profile-tab {
  flex: 1;
  min-height: 31px;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  background: #030303;
  font-size: 11px;
  font-weight: 800;
}

.fresh-profile-tab svg {
  width: 14px;
  height: 14px;
}

.fresh-profile-tab.active {
  color: var(--accent-hot);
  border-color: var(--accent-hot-border);
  background: var(--accent-hot-soft);
}

.fresh-profile-content {
  min-height: 0;
  max-height: min(70vh, 620px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  background: #000;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.fresh-profile-content::-webkit-scrollbar { width: 4px; }
.fresh-profile-content::-webkit-scrollbar-track { background: transparent; }
.fresh-profile-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.ios-pane-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 8px 8px;
}

.ios-pane-title span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.ios-pane-title strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
}

.ios-list-group,
.ios-log-group {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ios-list-row,
.ios-choice-row,
.ios-log-group {
  background: #030303;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ios-list-row {
  min-height: 44px;
  margin-bottom: 6px;
  padding: 10px 14px;
}

.ios-list-row:last-child {
  border-bottom: 1px solid var(--border);
}

.ios-list-row:hover,
.ios-choice-row:hover,
.ios-log-group:hover,
.ios-metric-strip article:hover {
  border-color: var(--border-active);
  background: #050505;
}

.ios-list-row > span,
.ios-list-row.control b,
.ios-list-row.action b,
.ios-list-row.input b,
.ios-list-row.range b {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.ios-list-row > strong {
  color: var(--text-primary);
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
}

.ios-list-row small {
  color: var(--text-muted);
  font-size: 10.5px;
}

.ios-list-row i {
  width: 8px;
  height: 8px;
  margin-right: 0;
}

.ios-choice-row {
  margin-bottom: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.ios-chip {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0a0a0a;
  font-size: 12px;
  font-weight: 800;
}

.ios-chip.active {
  color: var(--accent-hot);
  border-color: var(--accent-hot-border);
  background: var(--accent-hot-soft);
}

.ios-metric-strip {
  gap: 6px;
  margin-top: 8px;
}

.ios-metric-strip article {
  min-height: 62px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #030303;
}

.ios-metric-strip strong {
  font-family: monospace;
  font-size: 22px;
}

.ios-metric-strip span {
  color: var(--text-muted);
  font-size: 10px;
}

.ios-danger-row {
  min-height: 42px;
  margin-top: 8px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
}

.ios-log-group {
  margin-top: 8px;
  padding: 10px;
}

.ios-log-group .fresh-profile-log {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #000;
}

.fresh-profile-mini {
  min-height: 27px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #121212;
}

.fresh-profile-switch {
  width: 44px;
  height: 24px;
  border: 1px solid var(--border);
  background: #222;
}

.fresh-profile-switch.large {
  width: 50px;
  height: 28px;
}

.fresh-profile-switch span {
  width: 18px;
  height: 18px;
}

.fresh-profile-switch.large span {
  width: 22px;
  height: 22px;
}

.fresh-profile-switch[aria-checked="true"] {
  border-color: var(--accent-hot-border);
  background: var(--accent-hot);
}

.autobet-input {
  width: 48px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0a0a0a;
}

.ios-list-row.range {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 1fr) 38px;
}

@media (max-width: 767px) {
  .fresh-profile-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
  }

  .fresh-profile-sheet {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .fresh-profile-header {
    border-radius: 0;
    padding: 10px 18px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }

  .fresh-profile-tabs {
    flex-shrink: 0;
  }

  .fresh-profile-content {
    flex: 1 1 auto;
    max-height: none;
    border-radius: 0;
  }
}

/* Final ownership layer for the payout cockpit. This intentionally follows all
   legacy profile rules so the component cannot fall back to modal-era geometry. */
#autowithdraw-card { overflow:visible !important; padding:16px !important; background:linear-gradient(150deg,#070707 0%,#030303 58%,#090603 100%) !important; }
#autowithdraw-card #autowithdraw-inline-host { width:100% !important; margin:4px 0 0 !important; }
#autowithdraw-card #autowithdraw-workspace {
  width:100% !important; max-width:none !important; min-width:0 !important; border:1px solid rgba(255,180,35,.22) !important;
  border-radius:18px !important; background:radial-gradient(circle at 88% -10%,rgba(255,167,38,.14),transparent 34%),linear-gradient(145deg,#0c0c0d,#070708 56%,#0a0805) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.055),0 22px 55px rgba(0,0,0,.38),0 0 42px rgba(255,164,26,.035) !important;
}
#autowithdraw-card #autowithdraw-workspace::after { content:""; position:absolute; left:8%; right:8%; top:0; height:1px; z-index:3; background:linear-gradient(90deg,transparent,#ffb52b,transparent); filter:drop-shadow(0 0 7px #f59e0b); animation:awTopBeam 4.6s ease-in-out infinite !important; }
#autowithdraw-card .autowithdraw-ambient i { display:block !important; opacity:.24 !important; filter:blur(48px) !important; }
#autowithdraw-card .autowithdraw-panel { width:100% !important; max-width:none !important; min-width:0 !important; margin:0 !important; padding:20px !important; display:grid !important; gap:15px !important; background:transparent !important; box-shadow:none !important; }
#autowithdraw-card .autowithdraw-console-head { width:100% !important; display:flex !important; flex-direction:row !important; align-items:center !important; justify-content:space-between !important; gap:16px !important; }
#autowithdraw-card .autowithdraw-console-head>div { min-width:0 !important; display:block !important; }
#autowithdraw-card .autowithdraw-console-head h3 { margin:5px 0 0 !important; font-size:20px !important; line-height:1.08 !important; letter-spacing:-.035em !important; }
#autowithdraw-card .profile-confirm-kicker { display:flex !important; align-items:center !important; gap:7px !important; color:#ffb020 !important; font-size:8px !important; font-weight:950 !important; letter-spacing:.13em !important; }
#autowithdraw-card .autowithdraw-live-pill { flex:0 0 auto !important; display:flex !important; align-items:center !important; gap:7px !important; padding:7px 10px !important; border:1px solid rgba(52,211,153,.28) !important; border-radius:999px !important; color:#5ee6ad !important; background:rgba(16,185,129,.075) !important; font-size:8px !important; font-weight:950 !important; letter-spacing:.12em !important; box-shadow:inset 0 0 14px rgba(16,185,129,.04) !important; }
#autowithdraw-card .autowithdraw-live-pill i { display:block !important; width:6px !important; height:6px !important; border-radius:50% !important; background:#55e6aa !important; box-shadow:0 0 10px #34d399 !important; animation:awSecurePulse 1.5s ease-in-out infinite !important; }
#autowithdraw-card .autowithdraw-panel>p { max-width:620px !important; margin:-2px 0 1px !important; color:#97979d !important; font-size:11px !important; line-height:1.55 !important; }
#autowithdraw-card .autowithdraw-methods { width:100% !important; display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; margin:0 !important; padding:0 !important; }
#autowithdraw-card .autowithdraw-methods .profile-choice-card { position:relative !important; min-width:0 !important; min-height:72px !important; padding:13px 14px !important; display:grid !important; grid-template-columns:36px minmax(0,1fr) !important; grid-template-rows:1fr 1fr !important; column-gap:11px !important; align-items:center !important; border:1px solid rgba(255,255,255,.1) !important; border-radius:14px !important; color:#77777e !important; background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.012)) !important; box-shadow:inset 0 1px rgba(255,255,255,.025) !important; transition:transform .32s cubic-bezier(.16,1,.3,1),border-color .25s ease,box-shadow .25s ease,background .25s ease !important; }
#autowithdraw-card .autowithdraw-methods .profile-choice-card:hover { transform:translateY(-3px) !important; border-color:rgba(255,176,32,.28) !important; }
#autowithdraw-card .autowithdraw-methods .profile-choice-card.active { color:#ffb326 !important; border-color:rgba(255,177,30,.62) !important; background:radial-gradient(circle at 12% 50%,rgba(255,174,26,.16),transparent 40%),linear-gradient(145deg,rgba(255,174,26,.10),rgba(255,174,26,.025)) !important; box-shadow:inset 0 0 0 1px rgba(255,174,26,.08),0 14px 32px rgba(0,0,0,.26),0 0 25px rgba(255,164,20,.055) !important; }
#autowithdraw-card .autowithdraw-methods .profile-choice-card>span { grid-row:1/3 !important; width:36px !important; height:36px !important; display:grid !important; place-items:center !important; border:1px solid currentColor !important; border-radius:11px !important; font-size:15px !important; background:rgba(255,255,255,.025) !important; }
#autowithdraw-card .autowithdraw-methods .profile-choice-card.active>span { animation:awMethodFloat 2.7s ease-in-out infinite !important; box-shadow:0 0 18px rgba(255,174,26,.12) !important; }
#autowithdraw-card .autowithdraw-methods .profile-choice-card>b { align-self:end !important; color:#eeeef1 !important; font-size:11px !important; font-weight:900 !important; }
#autowithdraw-card .autowithdraw-methods .profile-choice-card>small { align-self:start !important; color:#85858c !important; font-size:8.5px !important; font-weight:650 !important; }
#autowithdraw-card .autowithdraw-route-line { display:block !important; position:relative !important; width:calc(100% - 54px) !important; height:12px !important; margin:-7px auto -5px !important; overflow:hidden !important; }
#autowithdraw-card .autowithdraw-fields { width:100% !important; display:grid !important; gap:12px !important; margin:0 !important; padding:14px !important; border:1px solid rgba(255,255,255,.09) !important; border-radius:14px !important; background:linear-gradient(145deg,rgba(255,255,255,.025),rgba(255,255,255,.012)) !important; box-shadow:inset 0 1px rgba(255,255,255,.02) !important; }
#autowithdraw-card .autowithdraw-fields label { display:grid !important; gap:7px !important; margin:0 !important; color:#74747b !important; font-size:8px !important; font-weight:900 !important; letter-spacing:.1em !important; }
#autowithdraw-card .autowithdraw-fields input,#autowithdraw-card .autowithdraw-fields select { width:100% !important; height:46px !important; padding:0 13px !important; border:1px solid rgba(255,255,255,.13) !important; border-radius:11px !important; color:#f2f2f4 !important; background:#101011 !important; font-size:12px !important; box-shadow:inset 0 1px 3px rgba(0,0,0,.3) !important; }
#autowithdraw-card .autowithdraw-fields input:focus,#autowithdraw-card .autowithdraw-fields select:focus { border-color:rgba(255,177,31,.66) !important; box-shadow:0 0 0 3px rgba(255,174,25,.09),inset 0 1px 3px rgba(0,0,0,.3) !important; }
#autowithdraw-card #autowithdraw-crypto-fields { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px !important; }
#autowithdraw-card #autowithdraw-crypto-fields[hidden],#autowithdraw-card #autowithdraw-card-fields[hidden] { display:none !important; }
#autowithdraw-card .autowithdraw-state { min-height:42px !important; display:flex !important; align-items:center !important; margin:0 !important; padding:10px 13px !important; border:1px solid rgba(255,255,255,.08) !important; border-radius:11px !important; color:#9b9ba1 !important; background:rgba(255,255,255,.018) !important; font-size:9px !important; line-height:1.45 !important; }
#autowithdraw-card .autowithdraw-progress { width:100% !important; display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:9px !important; margin:0 !important; padding:0 !important; list-style:none !important; counter-reset:none !important; }
#autowithdraw-card .autowithdraw-progress>li { min-width:0 !important; min-height:54px !important; display:flex !important; align-items:center !important; gap:9px !important; margin:0 !important; padding:9px 10px !important; list-style:none !important; border:1px solid rgba(255,255,255,.085) !important; border-radius:12px !important; color:#68686f !important; background:rgba(255,255,255,.018) !important; }
#autowithdraw-card .autowithdraw-progress>li::marker { content:"" !important; font-size:0 !important; }
#autowithdraw-card .autowithdraw-progress>li>i { width:26px !important; height:26px !important; flex:0 0 auto !important; display:grid !important; place-items:center !important; border:1px solid currentColor !important; border-radius:9px !important; font-size:8px !important; font-style:normal !important; font-weight:950 !important; }
#autowithdraw-card .autowithdraw-progress>li>span { min-width:0 !important; display:grid !important; gap:2px !important; }
#autowithdraw-card .autowithdraw-progress>li b { color:#dddde0 !important; font-size:9px !important; font-weight:900 !important; }
#autowithdraw-card .autowithdraw-progress>li small { overflow:hidden !important; color:#6f6f76 !important; font-size:7.5px !important; text-overflow:ellipsis !important; white-space:nowrap !important; }
#autowithdraw-card .autowithdraw-progress>li.is-current { color:#ffb326 !important; border-color:rgba(255,176,30,.38) !important; background:rgba(255,172,25,.055) !important; box-shadow:0 8px 20px rgba(0,0,0,.19) !important; animation:awCurrent 2.4s ease-in-out infinite !important; }
#autowithdraw-card .autowithdraw-progress>li.is-complete { color:#55dfa8 !important; border-color:rgba(52,211,153,.28) !important; background:rgba(16,185,129,.045) !important; }
#autowithdraw-card .autowithdraw-actions { width:100% !important; display:flex !important; align-items:center !important; justify-content:flex-end !important; gap:8px !important; margin:0 !important; padding:0 !important; }
#autowithdraw-card .autowithdraw-actions button { min-height:38px !important; border-radius:10px !important; }
@keyframes awTopBeam{0%,100%{opacity:.25;transform:scaleX(.45)}50%{opacity:1;transform:scaleX(1)}}
@keyframes awSecurePulse{50%{opacity:.45;transform:scale(.78);box-shadow:0 0 18px #34d399}}
@keyframes awMethodFloat{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-3px) rotate(3deg)}}
@keyframes awCurrent{50%{box-shadow:0 0 0 1px rgba(255,174,26,.13),0 10px 26px rgba(255,164,20,.07)}}
@media(max-width:460px){#autowithdraw-card .autowithdraw-panel{padding:14px!important}#autowithdraw-card .autowithdraw-methods{grid-template-columns:1fr!important}#autowithdraw-card #autowithdraw-crypto-fields{grid-template-columns:1fr!important}#autowithdraw-card .autowithdraw-progress{grid-template-columns:1fr!important}#autowithdraw-card .autowithdraw-live-pill{display:none!important}}
@media(prefers-reduced-motion:reduce){#autowithdraw-card *,#autowithdraw-card *::before,#autowithdraw-card *::after{animation:none!important;transition-duration:.001ms!important}}

/* Inline payout cockpit: method selection, secure card enrollment, verification
   and arming remain visible inside the Auto-withdraw card. */
.autowithdraw-card { position:relative; overflow:hidden; isolation:isolate; }
.autowithdraw-inline-host { min-width:0; margin-top:2px; }
.autowithdraw-workspace {
  --aw-glow: color-mix(in srgb, var(--ps-accent) 62%, #7c3aed);
  position:relative; min-width:0; overflow:hidden; border:1px solid color-mix(in srgb,var(--ps-accent) 24%,var(--ps-border));
  border-radius:15px; background:linear-gradient(145deg,color-mix(in srgb,var(--ps-surface) 92%,#090316),var(--ps-bg));
  box-shadow:inset 0 1px rgba(255,255,255,.045),0 18px 44px rgba(0,0,0,.14);
}
.autowithdraw-workspace::before {
  content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(105deg,transparent 10%,color-mix(in srgb,var(--ps-accent) 7%,transparent) 45%,transparent 70%);
  transform:translateX(-115%); animation:awSheen 7s cubic-bezier(.2,.8,.2,1) infinite;
}
.autowithdraw-panel { position:relative; z-index:1; display:grid; gap:13px; padding:18px; }
.autowithdraw-console-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.autowithdraw-console-head h3 { margin:4px 0 0; color:var(--ps-text); font-size:16px; letter-spacing:-.025em; }
.autowithdraw-panel>p { margin:0; max-width:680px; color:var(--ps-muted); font-size:10.5px; line-height:1.55; }
.autowithdraw-live-pill { display:flex; align-items:center; gap:6px; padding:6px 9px; border:1px solid color-mix(in srgb,var(--ps-good) 35%,var(--ps-border)); border-radius:999px; color:var(--ps-good); background:color-mix(in srgb,var(--ps-good) 8%,transparent); font-size:8px; font-weight:900; letter-spacing:.1em; }
.autowithdraw-live-pill i { width:6px; height:6px; border-radius:50%; background:currentColor; box-shadow:0 0 0 0 color-mix(in srgb,var(--ps-good) 45%,transparent); animation:awLive 1.8s ease-out infinite; }
.autowithdraw-ambient { position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
.autowithdraw-ambient i { position:absolute; width:180px; height:180px; border-radius:50%; filter:blur(58px); opacity:.12; background:var(--aw-glow); animation:awDrift 11s ease-in-out infinite alternate; }
.autowithdraw-ambient i:nth-child(1){left:-90px;top:-100px}.autowithdraw-ambient i:nth-child(2){right:-90px;top:25%;animation-delay:-4s}.autowithdraw-ambient i:nth-child(3){left:42%;bottom:-150px;animation-delay:-7s}
.autowithdraw-methods { position:relative; display:grid!important; grid-template-columns:1fr 1fr; gap:9px!important; margin:2px 0!important; }
.autowithdraw-methods .profile-choice-card { min-height:66px!important; display:grid!important; grid-template-columns:30px 1fr; grid-template-rows:auto auto; column-gap:10px; padding:11px 13px!important; text-align:left; border-radius:12px!important; overflow:hidden; }
.autowithdraw-methods .profile-choice-card>span { grid-row:1/3; width:30px; height:30px; align-self:center; display:grid; place-items:center; border:1px solid currentColor; border-radius:9px; font-size:16px; transition:transform .45s cubic-bezier(.2,1.5,.4,1); }
.autowithdraw-methods .profile-choice-card>b { align-self:end; color:var(--ps-text); font-size:11px; }
.autowithdraw-methods .profile-choice-card>small { align-self:start; color:var(--ps-muted); font-size:8.5px; }
.autowithdraw-methods .profile-choice-card.active { border-color:color-mix(in srgb,var(--ps-accent) 62%,var(--ps-border))!important; background:linear-gradient(135deg,color-mix(in srgb,var(--ps-accent) 15%,var(--ps-surface)),var(--ps-surface-2))!important; box-shadow:0 0 0 1px color-mix(in srgb,var(--ps-accent) 12%,transparent),0 10px 28px color-mix(in srgb,var(--ps-accent) 9%,transparent); }
.autowithdraw-methods .profile-choice-card.active>span { transform:rotate(-7deg) scale(1.08); }
.autowithdraw-route-line { position:relative; height:10px; margin:-5px 34px 0; overflow:hidden; }
.autowithdraw-route-line::before { content:""; position:absolute; left:0; right:0; top:4px; height:1px; background:linear-gradient(90deg,transparent,var(--ps-border-strong),transparent); }
.autowithdraw-route-line i,.autowithdraw-route-line b,.autowithdraw-route-line em { position:absolute; top:2px; width:5px; height:5px; border-radius:50%; background:var(--ps-accent); box-shadow:0 0 10px var(--ps-accent); animation:awPacket 3.8s linear infinite; }
.autowithdraw-route-line b{animation-delay:-1.25s}.autowithdraw-route-line em{animation-delay:-2.5s}
.autowithdraw-fields { margin:0!important; padding:13px; border:1px solid var(--ps-border); border-radius:12px; background:color-mix(in srgb,var(--ps-surface-2) 84%,transparent); }
.autowithdraw-fields>label>input,.autowithdraw-fields select { transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease!important; }
.autowithdraw-fields>label>input:focus,.autowithdraw-fields select:focus { transform:translateY(-1px); }
.autowithdraw-secure-entry { position:relative; display:grid; gap:4px; padding:12px 12px 12px 42px; border:1px solid color-mix(in srgb,var(--ps-good) 28%,var(--ps-border)); border-radius:11px; background:linear-gradient(110deg,color-mix(in srgb,var(--ps-good) 7%,var(--ps-surface)),var(--ps-surface)); }
.autowithdraw-secure-entry::before { content:"◆"; position:absolute; left:13px; top:50%; width:20px; height:20px; display:grid; place-items:center; transform:translateY(-50%) rotate(45deg); color:var(--ps-good); border:1px solid color-mix(in srgb,var(--ps-good) 45%,transparent); border-radius:6px; animation:awShield 2.8s ease-in-out infinite; }
.autowithdraw-secure-entry span { color:var(--ps-good); font-size:8px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.autowithdraw-secure-entry b { color:var(--ps-text); font-size:10px; line-height:1.4; }.autowithdraw-secure-entry small{color:var(--ps-muted);font-size:8.5px;line-height:1.4}
.autowithdraw-card-actions { display:flex; gap:8px; flex-wrap:wrap; }.autowithdraw-card-actions button{min-height:34px}
.autowithdraw-progress { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:0; padding:0; list-style:none; }
.autowithdraw-progress li { position:relative; min-width:0; display:flex; align-items:center; gap:8px; padding:9px; border:1px solid var(--ps-border); border-radius:10px; color:var(--ps-muted); background:color-mix(in srgb,var(--ps-surface) 75%,transparent); transition:.35s cubic-bezier(.2,.8,.2,1); }
.autowithdraw-progress li>i { width:23px; height:23px; flex:0 0 auto; display:grid; place-items:center; border:1px solid currentColor; border-radius:8px; font-size:8px; font-style:normal; font-weight:900; }
.autowithdraw-progress li>span { min-width:0; display:grid; gap:2px; }.autowithdraw-progress li b{color:var(--ps-text);font-size:9px}.autowithdraw-progress li small{overflow:hidden;font-size:7.5px;text-overflow:ellipsis;white-space:nowrap}
.autowithdraw-progress li.is-current,.autowithdraw-progress li.is-complete { color:var(--ps-accent); border-color:color-mix(in srgb,var(--ps-accent) 38%,var(--ps-border)); transform:translateY(-2px); box-shadow:0 8px 20px color-mix(in srgb,var(--ps-accent) 8%,transparent); }
.autowithdraw-progress li.is-complete { color:var(--ps-good); }
.autowithdraw-state { position:relative; overflow:hidden; }.autowithdraw-state::after { content:""; position:absolute; left:0; bottom:0; width:35%; height:1px; background:linear-gradient(90deg,transparent,var(--ps-accent),transparent); animation:awStateScan 3s ease-in-out infinite; }
.withdraw-approval-viewer { animation:awViewerIn .5s cubic-bezier(.16,1,.3,1) both; }
.autowithdraw-card.is-card-entry .withdraw-approval-viewer { border-color:color-mix(in srgb,var(--ps-good) 42%,var(--ps-border))!important; box-shadow:0 18px 48px rgba(0,0,0,.22)!important; }
.secure-entry-orbit { width:28px; height:28px; display:block; margin:0 auto 10px; border:2px solid color-mix(in srgb,var(--ps-good) 20%,transparent); border-top-color:var(--ps-good); border-radius:50%; animation:awSpin 1s linear infinite; }
.autowithdraw-workspace.enrollment-complete { animation:awComplete .8s cubic-bezier(.2,1.5,.4,1); }
@keyframes awSheen{0%,58%{transform:translateX(-115%)}82%,100%{transform:translateX(115%)}}
@keyframes awLive{70%,100%{box-shadow:0 0 0 8px transparent}}
@keyframes awDrift{to{transform:translate3d(35px,-18px,0) scale(1.18)}}
@keyframes awPacket{from{left:-8px;opacity:0}12%{opacity:1}88%{opacity:1}to{left:100%;opacity:0}}
@keyframes awShield{50%{transform:translateY(-50%) rotate(225deg) scale(1.08);box-shadow:0 0 18px color-mix(in srgb,var(--ps-good) 25%,transparent)}}
@keyframes awStateScan{0%{transform:translateX(-130%)}100%{transform:translateX(380%)}}
@keyframes awViewerIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@keyframes awSpin{to{transform:rotate(360deg)}}
@keyframes awComplete{40%{box-shadow:0 0 0 3px color-mix(in srgb,var(--ps-good) 28%,transparent),0 0 44px color-mix(in srgb,var(--ps-good) 18%,transparent)}}
@media(max-width:620px){.autowithdraw-panel{padding:13px}.autowithdraw-methods{grid-template-columns:1fr!important}.autowithdraw-progress{grid-template-columns:1fr}.autowithdraw-card-actions{display:grid}.autowithdraw-card-actions button{width:100%}.autowithdraw-console-head{align-items:center}.autowithdraw-route-line{display:none}}
@media(prefers-reduced-motion:reduce){.autowithdraw-workspace::before,.autowithdraw-workspace *{animation:none!important;transition-duration:.001ms!important}}
html.reduce-motion .autowithdraw-workspace::before,html.reduce-motion .autowithdraw-workspace *{animation:none!important;transition-duration:.001ms!important}

/* ==========================================================================
   APP-WIDE THEME CONTRACT
   This final layer intentionally owns every live application surface. Legacy
   blocks above may keep their component geometry, but color now comes from
   these semantic tokens so Light/System/Custom affect the whole product.
   ========================================================================== */
:root {
  color-scheme: dark;
  --app-canvas: #000000;
  --app-panel: #000000;
  --app-panel-2: #090909;
  --app-panel-3: #0f0f0f;
  --app-control: #121212;
  --app-line: rgba(255,255,255,.09);
  --app-line-strong: rgba(255,255,255,.16);
  --app-overlay: rgba(0,0,0,.74);
  --app-shadow: rgba(0,0,0,.68);
  --app-hover: rgba(255,255,255,.045);
  --app-inset: rgba(255,255,255,.035);
  --accent-glow: color-mix(in srgb, var(--accent-hot) 32%, transparent);
  --bg: var(--app-canvas);
  --surface: var(--app-panel-2);
  --border: var(--app-line);
  --border-active: var(--app-line-strong);
}

html[data-theme="light"] {
  color-scheme: light;
  --app-canvas: #f3f5f7;
  --app-panel: #ffffff;
  --app-panel-2: #f8f9fa;
  --app-panel-3: #eef1f4;
  --app-control: #e8ebef;
  --app-line: rgba(20,28,38,.12);
  --app-line-strong: rgba(20,28,38,.22);
  --app-overlay: rgba(28,34,42,.42);
  --app-shadow: rgba(25,35,48,.18);
  --app-hover: rgba(20,28,38,.055);
  --app-inset: rgba(255,255,255,.72);
  --text-primary: #141820;
  --text-secondary: #59616d;
  --text-muted: #8a929d;
  --bg: var(--app-canvas);
  --surface: var(--app-panel-2);
  --border: var(--app-line);
  --border-active: var(--app-line-strong);
}

body {
  background: var(--app-canvas);
  color: var(--text-primary);
  transition: background-color .22s ease, color .22s ease;
}

body::after {
  background:
    radial-gradient(38% 38% at 22% 30%, color-mix(in srgb, var(--text-primary) 5%, transparent), transparent 70%),
    radial-gradient(34% 34% at 80% 68%, color-mix(in srgb, var(--accent-hot) 4%, transparent), transparent 70%),
    radial-gradient(30% 30% at 58% 18%, color-mix(in srgb, var(--text-primary) 3%, transparent), transparent 70%);
}

.bg-fx {
  background: radial-gradient(circle at center, transparent 20%, color-mix(in srgb, var(--app-canvas) 88%, transparent) 100%);
}

/* Navigation and shared controls */
.mute-toggle-btn,
.queue-toggle-btn,
.logs-toggle-btn,
.profile-toggle-btn {
  background: radial-gradient(circle at 50% 35%, var(--app-control), var(--app-panel-2) 72%, var(--app-panel) 100%);
  border-color: var(--app-line-strong);
  color: var(--text-secondary);
  box-shadow: inset 0 1px 0 var(--app-inset), 0 3px 10px var(--app-shadow);
}

.nav-cluster [data-tooltip]::after,
.favorite-card-btn[data-tooltip]::after,
.logs-export-btn[data-tooltip]::after {
  background: color-mix(in srgb, var(--app-panel) 96%, transparent);
  border-color: var(--app-line-strong);
  color: var(--text-primary);
  box-shadow: 0 8px 22px var(--app-shadow);
}

.no-matches-placeholder,
.match-card,
.awaiting-modal-panel,
.auth-card {
  background: var(--app-panel);
  border-color: var(--app-line-strong);
  color: var(--text-primary);
  box-shadow: 0 20px 55px var(--app-shadow);
}

.match-score,
.odds-combined,
.event-log,
.awaiting-list,
.logger-terminal {
  background: var(--app-panel-2);
  border-color: var(--app-line);
}

.timeline-period-header,
.timeline-empty-period,
.timeline-row-compact,
.awaiting-row,
.logger-row,
.awaiting-score,
.brand-link-1w,
.favorite-card-btn,
.awaiting-close-btn,
.logs-export-btn,
.awaiting-count,
.logger-count {
  background: var(--app-panel-3);
  border-color: var(--app-line);
  color: var(--text-secondary);
}

.awaiting-row:hover,
.logger-row:hover,
.brand-link-1w:hover,
.favorite-card-btn:hover {
  background: color-mix(in srgb, var(--app-panel-3) 94%, var(--text-primary) 6%);
  border-color: var(--app-line-strong);
}

.awaiting-header,
.logger-header,
.card-header {
  background: var(--app-panel);
  border-color: var(--app-line);
}

.awaiting-modal-overlay,
.logs-modal-overlay,
.fresh-profile-overlay {
  background: var(--app-overlay);
}

/* Custom accent owns all interactive/selected states across the dashboard. */
.queue-toggle-btn.has-queue,
.favorite-card-btn.is-active,
.profile-settings-shell .fresh-profile-tab.active,
.profile-settings-shell .profile-choice-card.active,
.profile-settings-shell .profile-theme-card.active,
.profile-settings-shell .profile-sound-grid button.active,
.appearance-inline-segment button.active {
  color: var(--accent-hot);
  border-color: var(--accent-hot-border);
  background: var(--accent-hot-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-hot) 12%, transparent), 0 0 18px color-mix(in srgb, var(--accent-hot) 8%, transparent);
}

.favorite-card-btn:is(:hover,.is-active) {
  color: var(--accent-hot);
  border-color: var(--accent-hot-border);
}

.awaiting-status-dot.is-active,
.autobet-status-dot,
.fresh-profile-hot-dot {
  background: var(--accent-hot);
  box-shadow: 0 0 9px var(--accent-glow);
}

.queue-toggle-btn.has-queue .queue-badge,
.queue-badge,
.profile-settings-shell .fresh-profile-switch[aria-checked="true"] {
  background: var(--accent-hot);
  border-color: var(--accent-hot-border);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Authentication inherits both the selected theme and accent. */
.auth-modal-overlay,
.auth-drop-panel {
  --aa-solid: var(--accent-hot);
  --aa-bright: color-mix(in srgb, var(--accent-hot) 70%, white);
}

.auth-modal-overlay {
  background:
    radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--accent-hot) 10%, transparent), transparent 62%),
    var(--app-overlay);
}

.auth-card,
.auth-drop-panel,
.auth-input-wrap,
.auth-drop-trigger,
.auth-drop-search,
.auth-terminal {
  background-color: var(--app-panel);
  border-color: var(--app-line);
  color: var(--text-primary);
}

.auth-tab.active,
.auth-submit-btn {
  border-color: var(--accent-hot-border);
  background: var(--accent-hot);
}

/* Current profile modal and every pane now follow the global theme. */
.profile-settings-shell {
  --ps-bg: var(--app-panel);
  --ps-panel: var(--app-panel);
  --ps-surface: var(--app-panel-2);
  --ps-hover: var(--app-hover);
  --ps-border: var(--app-line);
  --ps-border-strong: var(--app-line-strong);
  --ps-text: var(--text-primary);
  --ps-soft: var(--text-secondary);
  --ps-muted: var(--text-muted);
  --ps-accent: var(--accent-hot);
  background: var(--app-panel);
  border-color: var(--app-line-strong);
  color: var(--text-primary);
  box-shadow: 0 28px 80px var(--app-shadow);
}

.profile-settings-layout,
.profile-settings-rail,
.profile-settings-main,
.profile-settings-content {
  background: var(--app-panel);
  border-color: var(--app-line);
  color: var(--text-primary);
}

.profile-settings-wallet,
.profile-settings-vitals,
.profile-settings-shell .fresh-profile-log,
.profile-settings-shell .profile-smart-card,
.profile-settings-shell .profile-input-band label,
.profile-settings-shell .fresh-profile-mini,
.profile-settings-shell .fresh-profile-tool,
.appearance-color-trigger {
  background: var(--app-panel-2);
  border-color: var(--app-line);
  color: var(--text-primary);
}

.profile-settings-shell .fresh-profile-tab,
.profile-settings-shell .profile-choice-card,
.profile-settings-shell .profile-sound-grid button,
.appearance-inline-segment button {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.profile-settings-shell .profile-choice-card,
.profile-settings-shell .profile-sound-grid button,
.appearance-inline-segment button {
  background: var(--app-panel-2);
  border-color: var(--app-line);
}

.profile-settings-shell .profile-info-tile,
.profile-settings-shell .profile-control-band,
.profile-settings-shell .profile-input-band,
.profile-settings-shell .profile-range-band,
.profile-account-storage,
.profile-settings-shell .profile-action-band,
.profile-settings-shell .profile-log-panel,
.profile-settings-shell .profile-smart-grid,
.profile-settings-shell .profile-pane-title {
  border-color: var(--app-line);
  color: var(--text-primary);
}

html[data-theme="light"] .fresh-profile-overlay,
html[data-theme="light"] .profile-settings-shell,
html[data-theme="light"] .profile-settings-layout,
html[data-theme="light"] .profile-settings-rail,
html[data-theme="light"] .profile-settings-main,
html[data-theme="light"] .profile-settings-content {
  background: var(--app-panel);
}

html[data-theme="light"] .profile-settings-shell .fresh-profile-close,
html[data-theme="light"] .profile-settings-shell .fresh-profile-mark {
  background: var(--app-panel-2);
  border-color: var(--app-line);
  color: var(--accent-hot);
}

html[data-theme="light"] .profile-settings-wallet strong,
html[data-theme="light"] .profile-settings-account h2,
html[data-theme="light"] .profile-pane-title strong,
html[data-theme="light"] .profile-info-tile strong,
html[data-theme="light"] .profile-smart-card strong,
html[data-theme="light"] .profile-control-band b,
html[data-theme="light"] .profile-input-band b,
html[data-theme="light"] .profile-action-band b {
  color: var(--text-primary);
}

/* Smooth only paint properties; geometry remains stable while picking colors. */
.match-card,
.awaiting-modal-panel,
.auth-card,
.profile-settings-shell,
.profile-settings-rail,
.profile-settings-content,
.profile-settings-wallet,
.profile-settings-shell button {
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: .18s;
  transition-timing-function: ease;
}

/* Pixel fixes: align status dots and tighten numeric controls. */
.fresh-profile-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 13px 14px;
}

.fresh-profile-action > div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 9px;
  row-gap: 2px;
  align-items: center;
}

.fresh-profile-action .autobet-status-dot,
.fresh-profile-action .fresh-profile-hot-dot {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  margin: 0;
}

.fresh-profile-action b {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  line-height: 1.1;
}

.fresh-profile-action small {
  grid-column: 2;
  grid-row: 2;
  line-height: 1.25;
}

.fresh-profile-action .fresh-profile-switch {
  margin-left: 0;
}

.fresh-profile-status > span,
.fresh-profile-hot-dot,
.autobet-status-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.09), 0 0 10px rgba(245, 166, 35, 0.55);
}

.fresh-profile-input {
  min-height: 46px;
  padding: 8px 10px;
}

.fresh-profile-input div {
  gap: 7px;
}

.autobet-input {
  width: 54px;
  height: 32px;
  padding: 0 7px;
  border-radius: 9px;
  font-size: 13px;
}

.fresh-profile-input em {
  min-width: 30px;
  font-size: 10px;
  text-align: left;
}

.fresh-profile-choice {
  min-height: 58px;
  padding: 10px 11px;
}

.fresh-profile-choice svg {
  width: 14px;
  height: 14px;
}

.fresh-profile-count-grid .fresh-profile-count {
  min-height: 58px;
  padding: 10px;
}

.fresh-profile-box {
  padding: 11px;
}

.fresh-profile-log .autobet-log-empty {
  min-height: 38px;
  font-size: 11.5px;
}

@media (max-width: 460px) {
  .fresh-profile-action {
    min-height: 64px;
    padding: 12px;
  }

  .autobet-input {
    width: 48px;
  }
}

/* Profile command-center redesign. */
.fresh-profile-overlay {
  --pc-bg: #000000;
  --pc-panel: #030303;
  --pc-panel-2: #080808;
  --pc-panel-3: #101010;
  --pc-border: rgba(255, 255, 255, 0.095);
  --pc-border-strong: rgba(255, 255, 255, 0.18);
  --pc-text: #ffffff;
  --pc-soft: #b7b7b7;
  --pc-muted: #6c6c6c;
  --pc-amber: #f5a623;
  --pc-amber-soft: rgba(245, 166, 35, 0.14);
  --pc-cyan: #55d7e6;
  --pc-good: #00e676;
  --pc-danger: #ff4d4d;
  z-index: 1000;
  padding: clamp(12px, 4vh, 44px) 18px;
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(85, 215, 230, 0.08), transparent 32%),
    rgba(0, 0, 0, 0.80);
  backdrop-filter: blur(18px) saturate(138%);
  -webkit-backdrop-filter: blur(18px) saturate(138%);
}

.profile-command-shell {
  position: relative;
  width: min(860px, calc(100vw - 36px));
  height: min(720px, calc(100svh - 32px));
  max-width: none;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--pc-border-strong);
  border-radius: 18px;
  color: var(--pc-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 120px),
    var(--pc-bg);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset;
  transform: translateY(18px) scale(0.975);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
}

.profile-command-shell::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 166, 35, 0.86), rgba(85, 215, 230, 0.55), transparent);
  pointer-events: none;
}

.fresh-profile-overlay.is-open .profile-command-shell {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.profile-command-header {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(182px, auto) 36px;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto;
  padding: 16px 18px;
  border-bottom: 1px solid var(--pc-border);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(245, 166, 35, 0.08), transparent 36%),
    var(--pc-panel);
}

.profile-command-identity {
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-command-shell .fresh-profile-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 166, 35, 0.42);
  border-radius: 14px;
  color: var(--pc-amber);
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.20), rgba(85, 215, 230, 0.08)),
    #0a0a0a;
  box-shadow: 0 0 24px rgba(245, 166, 35, 0.14);
}

.profile-command-shell .fresh-profile-mark svg {
  width: 22px;
  height: 22px;
  display: block;
}

.profile-command-shell .fresh-profile-label,
.profile-command-kicker,
.profile-pane-title span,
.profile-info-tile span,
.profile-vital-grid span {
  color: var(--pc-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.profile-command-identity h2 {
  max-width: 100%;
  margin: 4px 0 2px;
  overflow: hidden;
  color: var(--pc-text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
}

.profile-command-identity p {
  margin: 0;
  overflow: hidden;
  color: var(--pc-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-command-wallet {
  width: auto;
  min-width: 182px;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  padding: 9px 9px 9px 13px;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--pc-panel-3), var(--pc-panel-2));
}

.profile-command-wallet .fresh-profile-label {
  display: block;
  grid-column: 1;
}

.profile-command-wallet div {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.profile-command-wallet strong {
  overflow: hidden;
  color: var(--pc-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-command-wallet small {
  color: var(--pc-amber);
  font-size: 11px;
  font-weight: 900;
}

.profile-command-wallet .fresh-profile-tool {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.profile-command-shell .fresh-profile-tool,
.profile-command-shell .fresh-profile-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  color: var(--pc-soft);
  background: #151515;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.profile-command-shell .fresh-profile-tool {
  width: 34px;
  height: 34px;
  padding: 7px;
}

.profile-command-shell .fresh-profile-tool svg {
  width: 16px;
  height: 16px;
}

.profile-command-shell .fresh-profile-tool:hover,
.profile-command-shell .fresh-profile-mini:hover {
  color: var(--pc-text);
  border-color: rgba(245, 166, 35, 0.62);
  background: rgba(245, 166, 35, 0.12);
}

.profile-command-shell .fresh-profile-tool:active,
.profile-command-shell .fresh-profile-mini:active,
.profile-choice-card:active {
  transform: translateY(1px);
}

.profile-command-body {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.022), transparent 35%),
    #000;
}

.profile-command-side {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: 96px auto auto 1fr;
  gap: 16px;
  padding: 22px 18px;
  border-right: 1px solid var(--pc-border);
  background:
    linear-gradient(180deg, rgba(245, 166, 35, 0.10), transparent 42%),
    var(--pc-panel);
}

.profile-command-orbit {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 166, 35, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.16), rgba(85, 215, 230, 0.07)),
    #090909;
}

.profile-command-orbit::before,
.profile-command-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
}

.profile-command-orbit::before {
  inset: 14px;
}

.profile-command-orbit::after {
  inset: 30px;
  border-color: rgba(245, 166, 35, 0.34);
}

.profile-command-orbit span {
  position: absolute;
  width: 46px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--pc-amber), transparent);
  transform-origin: center;
}

.profile-command-orbit span:nth-child(1) { transform: rotate(0deg); }
.profile-command-orbit span:nth-child(2) { transform: rotate(60deg); opacity: 0.7; }
.profile-command-orbit span:nth-child(3) { transform: rotate(120deg); opacity: 0.45; }

.profile-session-copy {
  min-width: 0;
}

.profile-session-copy strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--pc-text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: 0;
  text-overflow: ellipsis;
}

.profile-session-copy small {
  display: block;
  margin-top: 8px;
  color: var(--pc-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.profile-vital-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  background: var(--pc-border);
}

.profile-vital-grid article {
  min-width: 0;
  min-height: 72px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 12px 10px;
  background: var(--pc-panel-2);
  text-align: center;
}

.profile-vital-grid strong {
  overflow: hidden;
  color: var(--pc-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-overflow: ellipsis;
}

.profile-side-feed {
  align-self: end;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  background: var(--pc-panel-2);
}

.profile-side-feed > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pc-good);
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.62);
}

.profile-side-feed b {
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
}

.profile-side-feed small {
  grid-column: 2;
  overflow: hidden;
  color: var(--pc-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-command-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.profile-command-shell .fresh-profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--pc-border);
  background: #020202;
}

.profile-command-shell .fresh-profile-tab {
  min-width: 0;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  color: var(--pc-soft);
  background: var(--pc-panel-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
}

.profile-command-shell .fresh-profile-tab svg {
  width: 16px;
  height: 16px;
}

.profile-command-shell .fresh-profile-tab.active {
  color: var(--pc-text);
  border-color: rgba(245, 166, 35, 0.65);
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.26), rgba(85, 215, 230, 0.08)),
    var(--pc-panel-3);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.10) inset;
}

.profile-command-shell .fresh-profile-content {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px;
  border-radius: 0;
  background: #000;
  scrollbar-width: thin;
  scrollbar-color: var(--pc-border-strong) transparent;
}

.profile-command-shell .fresh-profile-content::-webkit-scrollbar {
  width: 5px;
}

.profile-command-shell .fresh-profile-content::-webkit-scrollbar-track {
  background: transparent;
}

.profile-command-shell .fresh-profile-content::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--pc-border-strong);
}

.profile-command-shell .fresh-profile-pane {
  display: none;
}

.profile-command-shell .fresh-profile-pane.active {
  display: block;
  animation: profileCommandPaneIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.profile-pane-title {
  margin-bottom: 14px;
}

.profile-pane-title strong {
  display: block;
  margin-top: 4px;
  color: var(--pc-text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-info-tile,
.profile-control-band,
.profile-input-band,
.profile-action-band,
.profile-range-band,
.profile-log-panel,
.profile-choice-card {
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
    var(--pc-panel-2);
}

.profile-info-tile {
  min-width: 0;
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 14px;
}

.profile-info-tile.wide {
  grid-column: 1 / -1;
}

.profile-info-tile strong {
  overflow: hidden;
  color: var(--pc-text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-danger-action {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 12px;
  border: 1px solid rgba(255, 77, 77, 0.38);
  border-radius: 14px;
  color: #ff6b6b;
  background: rgba(255, 77, 77, 0.12);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.profile-danger-action svg {
  width: 16px;
  height: 16px;
}

.profile-danger-action:hover {
  border-color: rgba(255, 77, 77, 0.62);
  background: rgba(255, 77, 77, 0.18);
}

.profile-control-band {
  min-height: 92px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.profile-control-band > .autobet-status-dot,
.profile-control-band > .fresh-profile-hot-dot {
  width: 10px;
  height: 10px;
  margin: 0;
  display: block;
  border-radius: 50%;
  background: var(--pc-amber) !important;
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.12), 0 0 18px rgba(245, 166, 35, 0.58) !important;
}

.profile-control-band > .fresh-profile-hot-dot {
  background: var(--pc-danger) !important;
  box-shadow: 0 0 0 4px rgba(255, 77, 77, 0.12), 0 0 18px rgba(255, 77, 77, 0.55) !important;
}

.profile-control-band .autobet-status-dot.live {
  background: var(--pc-good) !important;
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.12), 0 0 18px rgba(0, 230, 118, 0.58) !important;
}

.profile-control-band b,
.profile-input-band b,
.profile-action-band b,
.profile-range-band b {
  display: block;
  color: var(--pc-text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

.profile-control-band small,
.profile-input-band small,
.profile-action-band small,
.profile-range-band small {
  display: block;
  margin-top: 5px;
  color: var(--pc-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.profile-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.profile-choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.profile-choice-grid + .profile-choice-grid,
.profile-choice-grid + .profile-action-band,
.profile-action-band + .profile-action-band {
  margin-top: 10px;
}

.profile-choice-card {
  min-width: 0;
  min-height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 15px;
  color: var(--pc-soft);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.profile-choice-card svg {
  width: 17px;
  height: 17px;
  color: var(--pc-amber);
}

.profile-choice-card.active,
.profile-choice-card:hover {
  color: var(--pc-text);
  border-color: rgba(245, 166, 35, 0.65);
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.20), rgba(85, 215, 230, 0.06)),
    var(--pc-panel-3);
}

.profile-input-band,
.profile-action-band,
.profile-range-band {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  padding: 14px 16px;
}

.profile-input-band label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-command-shell .autobet-input {
  width: 82px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--pc-border-strong);
  border-radius: 11px;
  color: var(--pc-text);
  background: #050505;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 900;
  text-align: right;
}

.profile-input-band em,
.profile-range-band em {
  color: var(--pc-amber);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.autobet-vitals {
  margin-top: 10px;
}

.profile-log-panel {
  margin-top: 10px;
  padding: 13px;
}

.profile-log-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.profile-log-panel > div:first-child span {
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 900;
}

.profile-command-shell .fresh-profile-mini {
  min-width: 78px;
  min-height: 34px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 850;
}

.profile-command-shell .fresh-profile-log {
  max-height: 178px;
  overflow: auto;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: #020202;
}

.profile-command-shell .fresh-profile-log .autobet-log-empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--pc-soft);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.profile-range-band {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 1fr) 46px;
}

.profile-range-band input {
  width: 100%;
  accent-color: var(--pc-amber);
}

.profile-range-band em {
  text-align: right;
}

.profile-command-shell .fresh-profile-switch {
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--pc-border-strong);
  border-radius: 999px;
  background: #2a2a2a;
  cursor: pointer;
}

.profile-command-shell .fresh-profile-switch.large {
  width: 58px;
  height: 32px;
}

.profile-command-shell .fresh-profile-switch span {
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-command-shell .fresh-profile-switch.large span {
  width: 24px;
  height: 24px;
}

.profile-command-shell .fresh-profile-switch[aria-checked="true"] {
  border-color: rgba(0, 230, 118, 0.48);
  background: linear-gradient(90deg, #00b86b, var(--pc-good));
}

.profile-command-shell .fresh-profile-switch[aria-checked="true"] span {
  transform: translateX(22px);
}

.profile-command-shell .fresh-profile-switch.large[aria-checked="true"] span {
  transform: translateX(26px);
}

html.compact-account .profile-command-shell .profile-info-tile {
  min-height: 70px;
  padding-block: 12px;
}

html.compact-account .profile-command-shell .profile-info-tile strong {
  font-size: 16px;
}

html[data-panel-bg="black"] .profile-command-shell {
  --pc-bg: #000000;
  --pc-panel: #000000;
  --pc-panel-2: #050505;
  --pc-panel-3: #0b0b0b;
}

[data-theme="light"] .fresh-profile-overlay {
  --pc-bg: #f6f7f8;
  --pc-panel: #ffffff;
  --pc-panel-2: #f2f4f6;
  --pc-panel-3: #e9edf1;
  --pc-border: rgba(13, 22, 28, 0.13);
  --pc-border-strong: rgba(13, 22, 28, 0.22);
  --pc-text: #101820;
  --pc-soft: #51606a;
  --pc-muted: #73808a;
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.15), transparent 34%),
    linear-gradient(315deg, rgba(85, 215, 230, 0.14), transparent 32%),
    rgba(246, 248, 250, 0.84);
}

[data-theme="light"] .profile-command-shell,
[data-theme="light"] .profile-command-main,
[data-theme="light"] .profile-command-shell .fresh-profile-content {
  background: var(--pc-bg);
}

[data-theme="light"] .profile-command-header,
[data-theme="light"] .profile-command-side,
[data-theme="light"] .profile-command-shell .fresh-profile-tabs {
  background: var(--pc-panel);
}

[data-theme="light"] .profile-command-shell .fresh-profile-tool,
[data-theme="light"] .profile-command-shell .fresh-profile-mini {
  background: var(--pc-panel-3);
}

[data-theme="light"] .profile-command-shell .autobet-input,
[data-theme="light"] .profile-command-shell .fresh-profile-log {
  background: #ffffff;
}

html.reduce-motion .profile-command-shell,
html.reduce-motion .profile-command-shell .fresh-profile-pane.active,
html.reduce-motion .profile-command-shell .fresh-profile-switch span {
  animation: none !important;
  transition: none !important;
}

@keyframes profileCommandPaneIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .fresh-profile-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
  }

  .profile-command-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: translateY(8px);
  }

  .profile-command-shell::before {
    left: 0;
    right: 0;
  }

  .profile-command-header {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 10px;
    min-height: 0;
    padding: calc(13px + env(safe-area-inset-top, 0px)) 14px 13px;
  }

  .profile-command-wallet {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .fresh-profile-close {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-command-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .profile-command-side {
    grid-template-columns: 70px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "signal copy"
      "vitals vitals"
      "feed feed";
    gap: 12px;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--pc-border);
  }

  .profile-command-orbit {
    grid-area: signal;
    width: 70px;
    height: 70px;
    border-radius: 15px;
  }

  .profile-command-orbit::before { inset: 10px; }
  .profile-command-orbit::after { inset: 22px; }
  .profile-command-orbit span { width: 34px; }

  .profile-session-copy {
    grid-area: copy;
    align-self: center;
  }

  .profile-session-copy strong {
    font-size: 20px;
  }

  .profile-vital-grid {
    grid-area: vitals;
  }

  .profile-vital-grid article {
    min-height: 58px;
    padding: 9px;
  }

  .profile-vital-grid strong {
    font-size: 21px;
  }

  .profile-side-feed {
    grid-area: feed;
    align-self: auto;
  }

  .profile-command-main {
    min-height: 0;
  }

  .profile-command-shell .fresh-profile-tabs {
    gap: 6px;
    padding: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .profile-command-shell .fresh-profile-tabs::-webkit-scrollbar {
    display: none;
  }

  .profile-command-shell .fresh-profile-tab {
    min-width: 86px;
    min-height: 42px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .profile-command-shell .fresh-profile-content {
    padding: 14px;
  }

  .profile-pane-title strong {
    font-size: 22px;
  }
}

@media (max-width: 520px) {
  .profile-control-band,
  .profile-input-band,
  .profile-action-band {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-control-band {
    grid-template-columns: 12px minmax(0, 1fr) auto;
    padding: 14px;
  }

  .profile-range-band {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .profile-range-band em {
    text-align: left;
  }

  .profile-choice-card {
    min-height: 56px;
  }
}

@media (max-width: 380px) {
  .profile-info-grid,
  .profile-choice-grid,
  .profile-choice-grid.three {
    grid-template-columns: 1fr;
  }

  .profile-info-tile.wide {
    grid-column: auto;
  }

  .profile-command-orbit {
    display: none;
  }

  .profile-command-side {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "vitals"
      "feed";
  }

  .profile-command-wallet strong {
    font-size: 18px;
  }

  .profile-command-shell .fresh-profile-tab span {
    display: none;
  }

  .profile-command-shell .fresh-profile-tab {
    min-width: 54px;
  }
}

/* Profile settings-dialog redesign: pure black, no gradient treatment. */
.fresh-profile-overlay {
  --ps-bg: #000000;
  --ps-surface: #050505;
  --ps-surface-2: #0a0a0a;
  --ps-hover: #111111;
  --ps-border: #1f1f1f;
  --ps-border-strong: #303030;
  --ps-text: #f7f7f7;
  --ps-soft: #b8b8b8;
  --ps-muted: #737373;
  --ps-accent: #f5a623;
  --ps-good: #16d67a;
  --ps-danger: #ff5a5a;
  z-index: 10060;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.profile-settings-shell {
  width: min(860px, calc(100vw - 34px));
  height: min(680px, calc(100svh - 34px));
  max-width: none;
  max-height: none;
  display: block;
  overflow: hidden;
  border: 1px solid var(--ps-border);
  border-radius: 16px;
  color: var(--ps-text);
  background: var(--ps-bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72);
  transform: translateY(14px) scale(0.985);
  opacity: 0;
}

.profile-settings-shell::before {
  display: none;
}

.fresh-profile-overlay.is-open .profile-settings-shell {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.profile-settings-shell .fresh-profile-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.profile-settings-layout {
  height: 100%;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--ps-bg);
}

.profile-settings-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 24px;
  border-right: 1px solid var(--ps-border);
  background: var(--ps-bg);
}

.profile-settings-account {
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 0 40px 0 0;
  border: 0;
  background: transparent;
}

.profile-settings-shell .fresh-profile-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ps-border-strong);
  border-radius: 12px;
  color: var(--ps-accent);
  background: var(--ps-surface);
  box-shadow: none;
}

.profile-settings-shell .fresh-profile-mark svg,
.profile-settings-shell .fresh-profile-tab svg,
.profile-danger-action svg,
.profile-choice-card svg {
  width: 16px;
  height: 16px;
}

.profile-settings-shell .fresh-profile-label,
.profile-pane-title span,
.profile-info-tile span,
.profile-vital-grid span {
  color: var(--ps-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.profile-settings-account h2 {
  margin: 3px 0 1px;
  overflow: hidden;
  color: var(--ps-text);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-account p {
  margin: 0;
  overflow: hidden;
  color: var(--ps-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-wallet {
  width: auto;
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 5px 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  background: var(--ps-surface);
}

.profile-settings-wallet .fresh-profile-label,
.profile-settings-wallet div,
.profile-settings-hint {
  grid-column: 1;
}

.profile-settings-wallet div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.profile-settings-wallet strong {
  overflow: hidden;
  color: var(--ps-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-wallet small {
  color: var(--ps-accent);
  font-size: 11px;
  font-weight: 800;
}

.profile-settings-wallet .profile-settings-hint {
  overflow: hidden;
  color: var(--ps-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-wallet .fresh-profile-tool {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.profile-settings-shell .fresh-profile-tool,
.profile-settings-shell .fresh-profile-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ps-border);
  border-radius: 9px;
  color: var(--ps-soft);
  background: var(--ps-surface-2);
  box-shadow: none;
  cursor: pointer;
}

.profile-settings-shell .fresh-profile-tool {
  width: 34px;
  height: 34px;
  padding: 8px;
}

.profile-settings-shell .fresh-profile-tool:hover,
.profile-settings-shell .fresh-profile-mini:hover {
  color: var(--ps-text);
  border-color: var(--ps-border-strong);
  background: var(--ps-hover);
}

.profile-settings-shell .profile-settings-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-settings-shell .fresh-profile-tab {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ps-soft);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  cursor: pointer;
}

.profile-settings-shell .fresh-profile-tab:hover {
  color: var(--ps-text);
  background: var(--ps-surface);
}

.profile-settings-shell .fresh-profile-tab.active {
  color: var(--ps-text);
  border-color: #3c2b12;
  background: #171005;
  box-shadow: none;
}

.profile-settings-shell .fresh-profile-tab.active svg {
  color: var(--ps-accent);
}

.profile-settings-vitals {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  height: 44px;
  margin-top: auto;
  margin-bottom: 0;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  background: var(--ps-border);
}

.profile-settings-vitals article {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 5px 9px;
  background: var(--ps-surface);
  text-align: center;
}

.profile-settings-vitals strong {
  overflow: hidden;
  color: var(--ps-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
}

.profile-settings-feed {
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  column-gap: 9px;
  row-gap: 3px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  background: var(--ps-surface);
}

.profile-settings-feed > span,
.profile-control-band > .autobet-status-dot,
.profile-control-band > .fresh-profile-hot-dot {
  width: 8px;
  height: 8px;
  display: block;
  border-radius: 50%;
  background: var(--ps-good) !important;
  box-shadow: none !important;
}

.profile-settings-feed b {
  overflow: hidden;
  color: var(--ps-text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-feed small {
  grid-column: 2;
  overflow: hidden;
  color: var(--ps-muted);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-rail .profile-settings-vitals,
.profile-settings-rail .profile-settings-feed {
  align-self: stretch;
  width: 100%;
}

.profile-settings-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  background: var(--ps-bg);
}

.profile-settings-content {
  width: 100%;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 24px 24px 22px;
  border-radius: 0;
  background: var(--ps-bg);
  scrollbar-width: thin;
  scrollbar-color: var(--ps-border-strong) transparent;
}

.profile-settings-content::-webkit-scrollbar {
  width: 5px;
}

.profile-settings-content::-webkit-scrollbar-track {
  background: transparent;
}

.profile-settings-content::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--ps-border-strong);
}

.profile-settings-shell .fresh-profile-pane {
  display: none;
}

.profile-settings-shell .fresh-profile-pane.active {
  display: block;
  animation: profileSettingsIn 0.18s ease both;
}

@media (min-width: 768px) {
  .profile-settings-shell .profile-settings-content {
    overflow: hidden;
  }
}

.profile-settings-shell .profile-account-pane.active {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.profile-pane-title {
  margin: 0 42px 18px 0;
}

.profile-pane-title strong {
  display: block;
  margin-top: 5px;
  color: var(--ps-text);
  font-size: 24px;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.profile-info-grid,
.profile-choice-grid,
.profile-choice-grid.three {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  background: var(--ps-border);
}

.profile-choice-grid + .profile-choice-grid,
.profile-choice-grid + .profile-action-band,
.profile-action-band + .profile-action-band {
  margin-top: 12px;
}

.profile-info-tile,
.profile-control-band,
.profile-input-band,
.profile-action-band,
.profile-range-band,
.profile-log-panel,
.profile-choice-card {
  border: 0;
  border-radius: 0;
  background: var(--ps-surface);
  box-shadow: none;
}

.profile-info-tile {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
}

.profile-info-tile + .profile-info-tile,
.profile-control-band + .profile-choice-grid,
.profile-input-band,
.profile-action-band,
.profile-range-band,
.profile-log-panel {
  border-top: 1px solid var(--ps-border);
}

.profile-info-tile.wide {
  grid-column: auto;
}

.profile-info-tile strong {
  overflow: hidden;
  color: var(--ps-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-danger-action {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid #4a2020;
  border-radius: 12px;
  color: var(--ps-danger);
  background: #120606;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.profile-account-footer {
  margin-top: auto;
  padding-top: 16px;
}

.profile-danger-action:hover {
  border-color: #6f2a2a;
  background: #180707;
}

.profile-control-band,
.profile-input-band,
.profile-action-band,
.profile-range-band {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 14px 15px;
}

.profile-control-band {
  grid-template-columns: 10px minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--ps-border);
  border-radius: 12px 12px 0 0;
}

.profile-control-band > .fresh-profile-hot-dot {
  background: var(--ps-danger) !important;
}

.profile-control-band .autobet-status-dot.live {
  background: var(--ps-good) !important;
}

.profile-control-band b,
.profile-input-band b,
.profile-action-band b,
.profile-range-band b,
.profile-log-panel > div:first-child span {
  display: block;
  color: var(--ps-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
}

.profile-control-band small,
.profile-input-band small,
.profile-action-band small,
.profile-range-band small {
  display: block;
  margin-top: 4px;
  color: var(--ps-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.profile-choice-card {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 15px;
  color: var(--ps-soft);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  cursor: pointer;
}

.profile-choice-card + .profile-choice-card {
  border-top: 1px solid var(--ps-border);
}

.profile-choice-card:hover {
  color: var(--ps-text);
  background: var(--ps-hover);
}

.profile-choice-card.active {
  color: var(--ps-text);
  background: #171005;
  box-shadow: inset 3px 0 0 var(--ps-accent);
}

.profile-choice-card svg {
  color: var(--ps-accent);
}

.profile-input-band label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-settings-shell .autobet-input {
  width: 86px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--ps-border-strong);
  border-radius: 9px;
  color: var(--ps-text);
  background: var(--ps-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.profile-input-band em,
.profile-range-band em {
  color: var(--ps-accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.autobet-vitals {
  margin-top: 10px;
}

.profile-log-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
}

.profile-log-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-settings-shell .fresh-profile-mini {
  min-width: 72px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 750;
}

.profile-settings-shell .fresh-profile-log {
  max-height: 106px;
  overflow: auto;
  border: 1px solid var(--ps-border);
  border-radius: 10px;
  background: var(--ps-bg);
}

.profile-settings-shell .fresh-profile-log .autobet-log-empty {
  min-height: 52px;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--ps-muted);
  font-size: 12px;
  text-align: center;
}

.profile-range-band {
  grid-template-columns: minmax(0, 1fr) minmax(140px, 1fr) 44px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
}

.profile-range-band input {
  width: 100%;
  accent-color: var(--ps-accent);
}

.profile-range-band em {
  text-align: right;
}

.profile-settings-shell .fresh-profile-switch {
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--ps-border-strong);
  border-radius: 999px;
  background: #151515;
  cursor: pointer;
}

.profile-settings-shell .fresh-profile-switch.large {
  width: 56px;
  height: 30px;
}

.profile-settings-shell .fresh-profile-switch span {
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 50%;
  background: var(--ps-soft);
  box-shadow: none;
  transition: transform 0.18s ease, background 0.18s ease;
}

.profile-settings-shell .fresh-profile-switch.large span {
  width: 22px;
  height: 22px;
}

.profile-settings-shell .fresh-profile-switch[aria-checked="true"] {
  border-color: #5b3b0a;
  background: #2a1a03;
}

.profile-settings-shell .fresh-profile-switch[aria-checked="true"] span {
  background: var(--ps-accent);
  transform: translateX(20px);
}

.profile-settings-shell .fresh-profile-switch.large[aria-checked="true"] span {
  transform: translateX(26px);
}

/* Profile inner controls: compact segmented choices and tighter numeric inputs. */
.profile-settings-shell .profile-choice-grid,
.profile-settings-shell .profile-choice-grid.three {
  width: fit-content;
  max-width: 100%;
  display: grid;
  gap: 8px;
  overflow: visible;
  margin: 12px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell .profile-choice-grid {
  grid-template-columns: repeat(2, minmax(108px, 132px));
}

.profile-settings-shell .profile-choice-grid.three {
  grid-template-columns: repeat(3, minmax(92px, 112px));
  margin-top: 0;
}

.profile-settings-shell .profile-choice-card {
  min-height: 38px;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--ps-border);
  border-radius: 10px;
  color: var(--ps-soft);
  background: var(--ps-surface);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.profile-settings-shell .profile-choice-card + .profile-choice-card {
  border-top: 1px solid var(--ps-border);
}

.profile-settings-shell .profile-choice-card:hover {
  color: var(--ps-text);
  border-color: var(--ps-border-strong);
  background: var(--ps-hover);
}

.profile-settings-shell .profile-choice-card.active {
  color: var(--ps-text);
  border-color: #6b450b;
  background: #171005;
  box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.12);
}

.profile-settings-shell .profile-choice-card svg {
  width: 14px;
  height: 14px;
}

.profile-settings-shell #autobet-rule-seg {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-smart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.profile-smart-card {
  min-width: 0;
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  background: var(--ps-surface);
}

.profile-smart-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ps-accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-smart-head svg {
  width: 15px;
  height: 15px;
}

.profile-smart-card strong {
  color: var(--ps-text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.1;
}

.profile-smart-card small {
  color: var(--ps-muted);
  font-size: 12px;
  line-height: 1.35;
}

.profile-smart-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.profile-smart-chips span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--ps-border);
  border-radius: 999px;
  color: var(--ps-soft);
  background: #030303;
  font-size: 11px;
  font-weight: 750;
}

.profile-smart-chips span.active {
  color: var(--ps-text);
  border-color: #6b450b;
  background: #171005;
}

.profile-smart-card.is-disabled {
  opacity: 1;
}

.profile-smart-card .fresh-profile-switch {
  align-self: end;
  justify-self: start;
  pointer-events: none;
}

.profile-theme-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.profile-theme-card {
  min-width: 0;
  min-height: 86px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  color: var(--ps-soft);
  background: var(--ps-surface);
  text-align: left;
  cursor: pointer;
}

.profile-theme-card svg {
  width: 18px;
  height: 18px;
  color: var(--ps-accent);
}

.profile-theme-card b,
.profile-theme-card small {
  display: block;
}

.profile-theme-card b {
  color: var(--ps-text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
}

.profile-theme-card small {
  margin-top: 4px;
  color: var(--ps-muted);
  font-size: 11px;
  line-height: 1.25;
}

.profile-theme-card:hover {
  border-color: var(--ps-border-strong);
  background: var(--ps-hover);
}

.profile-theme-card.active {
  border-color: #6b450b;
  background: #171005;
  box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.12);
}

.profile-settings-shell .profile-smart-card:nth-child(1) {
  border-color: color-mix(in srgb, var(--custom-info, #55d7e6) 34%, transparent);
}

.profile-settings-shell .profile-smart-card:nth-child(1) .profile-smart-head {
  color: var(--custom-info, #55d7e6);
}

.profile-settings-shell .profile-smart-card:nth-child(2) {
  border-color: color-mix(in srgb, var(--ps-good) 28%, transparent);
}

.profile-settings-shell .profile-smart-card:nth-child(2) .profile-smart-head {
  color: var(--ps-good);
}

.profile-future-input {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding: 0 10px;
  border: 1px solid var(--ps-border);
  border-radius: 9px;
  background: #030303;
}

.profile-future-input span {
  color: var(--ps-muted);
  font-size: 11px;
  font-weight: 750;
}

.profile-future-input b {
  color: var(--custom-info, #55d7e6);
  font-size: 11px;
  font-weight: 850;
}

.profile-sound-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.profile-sound-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.profile-sound-head b {
  color: var(--ps-text);
  font-size: 14px;
  font-weight: 850;
}

.profile-sound-grid button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--ps-border);
  border-radius: 9px;
  color: var(--ps-soft);
  background: var(--ps-surface);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.profile-sound-grid button:hover {
  color: var(--ps-text);
  border-color: var(--ps-border-strong);
  background: var(--ps-hover);
}

.profile-sound-grid button.active {
  color: var(--ps-good);
  border-color: color-mix(in srgb, var(--ps-good) 46%, transparent);
  background: color-mix(in srgb, var(--ps-good) 8%, transparent);
}

.profile-theme-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.profile-theme-card {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 850;
}

.profile-theme-card svg,
.profile-theme-card small {
  display: none;
}

.profile-theme-card b {
  font-size: inherit;
}

.profile-theme-card.active {
  border-color: #6b450b;
  background: #171005;
  box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.12);
}

/* Auto-Bet deliberately uses one restrained palette: amber for actions and
   state, gray for secondary/future controls. */
.profile-settings-shell [data-pane="autobet"] .autobet-status-dot,
.profile-settings-shell [data-pane="autobet"] .autobet-status-dot.live,
.profile-settings-shell [data-pane="autobet"] .profile-smart-head,
.profile-settings-shell [data-pane="autobet"] .profile-future-input b {
  color: var(--ps-accent);
  background-color: var(--ps-accent) !important;
}

.profile-settings-shell [data-pane="autobet"] .profile-smart-card,
.profile-settings-shell [data-pane="autobet"] .profile-smart-card:nth-child(1),
.profile-settings-shell [data-pane="autobet"] .profile-smart-card:nth-child(2) {
  border-color: var(--ps-border);
}

.profile-settings-shell [data-pane="autobet"] .profile-smart-head,
.profile-settings-shell [data-pane="autobet"] .profile-smart-card:nth-child(1) .profile-smart-head,
.profile-settings-shell [data-pane="autobet"] .profile-smart-card:nth-child(2) .profile-smart-head,
.profile-settings-shell [data-pane="autobet"] .profile-future-input b {
  background: transparent !important;
  color: var(--ps-accent);
}

.profile-palette-panel {
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(5, 48px);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  background: var(--ps-surface);
}

.profile-palette-panel b,
.profile-palette-panel small {
  display: block;
}

.profile-palette-panel b {
  color: var(--ps-text);
  font-size: 14px;
  font-weight: 850;
}

.profile-palette-panel small {
  margin-top: 4px;
  color: var(--ps-muted);
  font-size: 12px;
  line-height: 1.25;
}

.profile-palette-panel > span {
  display: none;
}

.profile-palette-panel label {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--ps-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-palette-panel input[type="color"] {
  width: 32px;
  height: 32px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ps-border-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.profile-palette-panel input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.profile-palette-panel input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

.profile-settings-shell .profile-input-band {
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ps-border);
  border-radius: 12px;
  background: var(--ps-surface);
}

.profile-settings-shell .profile-input-band label {
  min-width: 0;
  width: auto;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--ps-border-strong);
  border-radius: 10px;
  background: var(--ps-bg);
}

.profile-settings-shell .profile-input-band .autobet-input {
  width: 2ch;
  min-width: 2ch;
  max-width: 9ch;
  field-sizing: content;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
}

html.compact-account .profile-settings-shell .profile-info-tile {
  min-height: 52px;
  padding-block: 11px;
}

[data-theme="light"] .fresh-profile-overlay,
[data-theme="light"] .profile-settings-shell,
[data-theme="light"] .profile-settings-layout,
[data-theme="light"] .profile-settings-rail,
[data-theme="light"] .profile-settings-main,
[data-theme="light"] .profile-settings-content {
  background: #000000;
}

[data-theme="light"] .profile-settings-shell {
  color: var(--ps-text);
}

html.reduce-motion .profile-settings-shell,
html.reduce-motion .profile-settings-shell .fresh-profile-pane.active,
html.reduce-motion .profile-settings-shell .fresh-profile-switch span {
  animation: none !important;
  transition: none !important;
}

@keyframes profileSettingsIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .fresh-profile-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .profile-settings-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .profile-settings-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .profile-settings-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--ps-border);
  }

  .profile-settings-account {
    padding-right: 40px;
  }

  .profile-settings-wallet {
    grid-column: 1 / -1;
  }

  .profile-settings-shell .profile-settings-tabs {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }

  .profile-settings-shell .fresh-profile-tab {
    width: auto;
    min-width: 0;
    justify-content: center;
    gap: 6px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .profile-settings-vitals,
  .profile-settings-feed {
    display: none;
  }

  .profile-settings-content {
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .profile-pane-title {
    margin-right: 38px;
  }

  .profile-pane-title strong {
    font-size: 21px;
  }

  .profile-settings-shell .fresh-profile-tab {
    gap: 4px;
    padding-inline: 4px;
    font-size: 11px;
  }

  .profile-info-tile,
  .profile-control-band,
  .profile-input-band,
  .profile-action-band,
  .profile-range-band {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .profile-control-band {
    grid-template-columns: 10px minmax(0, 1fr) auto;
  }

  .profile-settings-shell .profile-input-band {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .profile-settings-shell .profile-action-band {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .profile-settings-shell .profile-action-band .fresh-profile-mini {
    width: auto;
    min-width: 88px;
    justify-self: end;
  }

  .profile-settings-shell .profile-range-band {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .profile-settings-shell .profile-range-band input {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .profile-settings-shell .profile-range-band em {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    text-align: right;
  }

  .profile-info-tile strong {
    text-align: left;
  }

  .profile-range-band em {
    text-align: left;
  }

  .profile-smart-grid,
  .profile-theme-cards {
    grid-template-columns: 1fr;
  }

  .profile-settings-shell .profile-theme-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-palette-panel {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .profile-palette-panel > div {
    grid-column: 1 / -1;
  }

  .profile-sound-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-smart-card {
    min-height: 0;
  }
}

/* Appearance tab: settings-page composition from the supplied reference. */
.profile-settings-shell [data-pane="appearance"] {
  --appearance-line: rgba(255,255,255,.09);
  --appearance-muted: #858585;
}

.profile-settings-shell [data-pane="appearance"] .appearance-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 16px;
  margin-bottom: 0;
}

.profile-settings-shell [data-pane="appearance"] .appearance-heading small,
.appearance-section-copy small {
  display: block;
  color: var(--appearance-muted);
  font-size: 11px;
  line-height: 1.35;
}

.appearance-settings-section,
.appearance-preference-list,
.profile-settings-shell [data-pane="appearance"] .profile-action-band {
  border-top: 1px solid var(--appearance-line);
}

.appearance-settings-section {
  padding: 22px 0;
}

.appearance-section-copy b {
  color: var(--ps-text);
  font-size: 12px;
  font-weight: 850;
}

.appearance-accent-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 17px;
}

.appearance-accent-row > button {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
  cursor: pointer;
}

.appearance-accent-row > button.active {
  border-color: var(--ps-panel);
  box-shadow: 0 0 0 2px var(--swatch), 0 0 0 4px rgba(255,255,255,.16);
}

.appearance-custom-color {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 5px;
  color: var(--ps-soft);
  font-size: 11px;
  font-weight: 800;
}

.appearance-custom-color > input {
  width: 70px;
  height: 30px;
  padding: 3px;
  border: 1px solid var(--appearance-line);
  border-radius: 7px;
  background: var(--ps-surface);
}

.appearance-custom-color {
  position: relative;
  flex: 0 0 auto;
}

.appearance-color-trigger {
  box-sizing: border-box;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 9px;
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  color: var(--ps-text);
  background: var(--ps-surface);
  cursor: pointer;
}

.appearance-color-trigger i {
  width: 24px;
  height: 18px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 3px;
}

.appearance-color-trigger b {
  width: 7ch;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: .02em;
  text-align: left;
}

.appearance-color-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  width: 234px;
  padding: 0 0 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  background: #f7f7f7;
  box-shadow: 0 18px 40px rgba(0,0,0,.42);
}

.appearance-color-popover[hidden] { display: none; }

.appearance-sv {
  --picker-hue: #f5a623;
  position: relative;
  height: 138px;
  cursor: crosshair;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, transparent),
    var(--picker-hue);
}

.appearance-sv > span,
.appearance-hue > span {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #222;
  pointer-events: none;
}

.appearance-sv > span { width: 12px; height: 12px; }

.appearance-picker-tools {
  display: grid;
  grid-template-columns: 22px 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px 13px 6px;
}

.appearance-eyedropper {
  color: #111;
  font-size: 25px;
  font-weight: 900;
  transform: rotate(-45deg);
}

.appearance-picker-tools > i {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 50%;
}

.appearance-hue {
  position: relative;
  height: 14px;
  cursor: ew-resize;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}

.appearance-hue > span {
  top: 50%;
  width: 12px;
  height: 20px;
}

.appearance-rgb-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 0 22px;
}

.appearance-rgb-fields label {
  display: grid;
  gap: 5px;
  color: #111;
  text-align: center;
  font-size: 11px;
}

.appearance-rgb-fields input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 4px;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  color: #111;
  background: #fff;
  text-align: center;
  font-size: 13px;
}

.interface-copy {
  padding: 22px 0 14px;
  border-top: 1px solid var(--appearance-line);
}

.profile-settings-shell [data-pane="appearance"] .profile-theme-cards {
  display: grid;
  grid-template-columns: repeat(3, 168px);
  justify-content: start;
  gap: 14px;
  margin: 0 0 22px;
}

.profile-settings-shell [data-pane="appearance"] .profile-theme-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 0;
  border: 0;
  color: var(--ps-soft);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.profile-settings-shell [data-pane="appearance"] .profile-theme-card.active {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.profile-settings-shell [data-pane="appearance"] .profile-theme-card b {
  position: relative;
  padding-left: 18px;
  font-size: 11px;
  color: var(--ps-soft);
}

.profile-settings-shell [data-pane="appearance"] .profile-theme-card b::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ps-border-strong);
  border-radius: 50%;
  transform: translateY(-50%);
}

.profile-settings-shell [data-pane="appearance"] .profile-theme-card.active b::before {
  border-color: var(--ps-accent);
  background: var(--ps-accent);
  box-shadow: inset 0 0 0 2px var(--ps-panel);
}

.appearance-preview {
  position: relative;
  display: block;
  height: 112px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 9px;
  background: #ececec;
  box-shadow: inset 0 1px rgba(255,255,255,.18);
}

.profile-theme-card.active .appearance-preview {
  outline: 2px solid var(--ps-accent);
  outline-offset: 1px;
}

.appearance-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(80,80,80,.12) 22% 23%, transparent 23%),
    linear-gradient(rgba(80,80,80,.12), rgba(80,80,80,.12)) 8px 25px / 13% 3px no-repeat,
    linear-gradient(rgba(80,80,80,.08), rgba(80,80,80,.08)) 8px 34px / 10% 3px no-repeat;
}

.appearance-preview i {
  position: absolute;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef5555;
}
.appearance-preview i:nth-of-type(1) { left: 8px; background: #ef5555; }
.appearance-preview i:nth-of-type(2) { left: 16px; background: #f2b94a; }
.appearance-preview i:nth-of-type(3) { left: 24px; background: #46b96c; }
.appearance-preview-light { background: #f2f2f2; }
.appearance-preview-dark { background: #242424; }
.appearance-preview-dark::before { filter: invert(1); opacity: .5; }
.appearance-preview-system { background: #242424; }

.preview-system-half {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.preview-system-light {
  left: 0;
  width: calc(52% + 1px);
  background: #f2f2f2;
}

.preview-system-dark {
  right: 0;
  width: 48%;
  background: #242424;
}

.appearance-preview-system > i,
.appearance-preview-system .preview-sidebar,
.appearance-preview-system .preview-actions,
.appearance-preview-system .preview-content {
  z-index: 2;
}

.appearance-preview > strong {
  position: absolute;
  top: 26px;
  left: 31%;
  z-index: 2;
  color: #202020;
  font-size: clamp(6px, .7vw, 9px);
  font-weight: 850;
}

.appearance-preview-dark > strong { color: #dedede; }
.appearance-preview-system > strong { color: #ddd; mix-blend-mode: difference; }

.preview-sidebar {
  position: absolute;
  inset: 20px auto 0 0;
  width: 23%;
  padding: 10px 7px;
  border-right: 1px solid rgba(100,100,100,.14);
}

.preview-sidebar em {
  display: block;
  width: 70%;
  height: 4px;
  margin-bottom: 7px;
  border-radius: 2px;
  background: rgba(95,95,95,.15);
}

.preview-sidebar em:first-child { width: 35%; background: var(--ps-accent); }

.preview-actions {
  position: absolute;
  top: 25px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.preview-actions em {
  width: 20px;
  height: 7px;
  border-radius: 2px;
  background: rgba(90,90,90,.33);
}

.preview-content {
  position: absolute;
  top: 42px;
  right: 8px;
  bottom: 8px;
  left: 31%;
  border-radius: 4px;
  background: rgba(100,100,100,.1);
}

.appearance-preview-dark .preview-sidebar em,
.appearance-preview-dark .preview-actions em { background-color: rgba(220,220,220,.16); }
.appearance-preview-dark .preview-sidebar em:first-child { background: var(--ps-accent); }

.appearance-preference-list > div {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--appearance-line);
  color: var(--ps-text);
  font-size: 12px;
  font-weight: 750;
}

.appearance-inline-segment {
  display: inline-flex;
  gap: 4px;
}

.appearance-inline-segment button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--ps-border);
  border-radius: 7px;
  color: var(--ps-muted);
  background: var(--ps-surface);
  font-size: 10px;
  font-weight: 800;
}

.appearance-inline-segment button.active {
  color: var(--ps-accent);
  border-color: color-mix(in srgb, var(--ps-accent) 50%, transparent);
}

.profile-settings-shell [data-pane="appearance"] .profile-action-band {
  margin-top: 14px;
  padding-top: 14px;
  background: transparent;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}

@media (max-width: 620px) {
  .profile-settings-shell [data-pane="appearance"] .profile-theme-cards {
    grid-template-columns: repeat(3, 76px);
    justify-content: space-between;
    gap: 6px;
  }

  .appearance-preview {
    box-sizing: border-box;
    width: 72px;
    height: 138px;
    justify-self: center;
    border: 4px solid #111;
    border-radius: 17px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 5px 14px rgba(0,0,0,.25);
  }

  .appearance-preview::after {
    content: "";
    position: absolute;
    z-index: 5;
    top: 3px;
    left: 50%;
    width: 27px;
    height: 7px;
    border-radius: 0 0 6px 6px;
    background: #111;
    transform: translateX(-50%);
  }

  .appearance-preview > i { display: none; }

  .appearance-preview::before {
    background:
      linear-gradient(rgba(80,80,80,.12), rgba(80,80,80,.12)) 9px 28px / 44px 4px no-repeat,
      linear-gradient(rgba(80,80,80,.08), rgba(80,80,80,.08)) 9px 39px / 34px 4px no-repeat,
      linear-gradient(rgba(80,80,80,.08), rgba(80,80,80,.08)) 9px 50px / 40px 28px no-repeat;
  }

  .preview-sidebar {
    inset: 19px auto 5px 4px;
    width: 20px;
    padding: 8px 3px;
  }

  .preview-sidebar em {
    width: 13px;
    height: 3px;
    margin-bottom: 7px;
  }

  .preview-actions {
    top: 18px;
    right: 5px;
    gap: 2px;
  }

  .preview-actions em {
    width: 10px;
    height: 4px;
  }

  .preview-content {
    top: 31px;
    right: 5px;
    bottom: 7px;
    left: 29px;
  }

  .appearance-preview-system { background: #242424; }
  .appearance-preview-system .preview-system-half { left: 0; right: 0; width: auto; }
  .appearance-preview-system .preview-system-light { top: 0; bottom: auto; height: calc(52% + 1px); }
  .appearance-preview-system .preview-system-dark { top: 52%; bottom: 0; height: auto; }
  .profile-settings-shell [data-pane="appearance"] .profile-theme-card b { text-align: center; padding-left: 0; }
  .profile-settings-shell [data-pane="appearance"] .profile-theme-card b::before { position: relative; display: inline-block; margin-right: 5px; top: 1px; transform: none; }
  .appearance-custom-color { margin-left: 0; }
}

/* Tablet theme models: bridge the desktop browser-window previews and the
   phone previews using a real tablet bezel and tablet-scaled UI geometry. */
@media (min-width:621px) and (max-width:767px) {
  .profile-settings-shell [data-pane="appearance"] .profile-theme-cards{
    grid-template-columns:repeat(3,minmax(0,1fr));
    justify-content:stretch;
    gap:12px;
  }
  .profile-settings-shell [data-pane="appearance"] .profile-theme-card{
    min-width:0;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-preview{
    box-sizing:border-box;
    width:100%;
    height:auto;
    aspect-ratio:4 / 3;
    border:5px solid #111;
    border-radius:14px;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.11),0 5px 14px rgba(0,0,0,.22);
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-preview::after{
    content:"";
    position:absolute;
    z-index:5;
    top:4px;
    left:50%;
    width:5px;
    height:5px;
    border-radius:50%;
    background:#292929;
    box-shadow:0 0 0 1px rgba(255,255,255,.08);
    transform:translateX(-50%);
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-preview>i{
    display:none;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-preview::before{
    background:
      linear-gradient(90deg,transparent 0 27%,rgba(80,80,80,.12) 27% 28%,transparent 28%),
      linear-gradient(rgba(80,80,80,.12),rgba(80,80,80,.12)) 9px 22px / 17% 3px no-repeat,
      linear-gradient(rgba(80,80,80,.08),rgba(80,80,80,.08)) 9px 31px / 13% 3px no-repeat;
  }
  .profile-settings-shell [data-pane="appearance"] .preview-sidebar{
    inset:17px auto 5px 3px;
    width:27%;
    padding:10px 6px;
  }
  .profile-settings-shell [data-pane="appearance"] .preview-sidebar em{
    height:3px;
    margin-bottom:6px;
  }
  .profile-settings-shell [data-pane="appearance"] .preview-actions{
    top:19px;
    right:7px;
  }
  .profile-settings-shell [data-pane="appearance"] .preview-actions em{
    width:17px;
    height:6px;
  }
  .profile-settings-shell [data-pane="appearance"] .preview-content{
    top:36px;
    right:7px;
    bottom:7px;
    left:34%;
  }
  .profile-settings-shell [data-pane="appearance"] .profile-theme-card b{
    text-align:center;
    padding-left:0;
  }
  .profile-settings-shell [data-pane="appearance"] .profile-theme-card b::before{
    position:relative;
    display:inline-block;
    margin-right:5px;
    top:1px;
    transform:none;
  }
}

/* Security uses the same settings primitives and rhythm as the other panes. */
.profile-settings-shell .security-pane {
  gap: 0;
}

.profile-settings-shell .security-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 18px;
  margin-bottom: 0;
}

.profile-settings-shell .security-heading small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.profile-settings-shell .security-session-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell .security-session-grid .profile-info-tile {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--app-line);
  border-bottom: 1px solid var(--app-line);
  background: transparent;
}

.profile-settings-shell .security-session-grid .profile-info-tile:nth-child(2n) {
  border-right: 0;
}

.profile-settings-shell .security-session-grid .profile-info-tile strong {
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
}

.profile-settings-shell #security-session-status {
  color: var(--ps-good);
}

.profile-settings-shell .security-guidance {
  margin-top: 14px;
}

.profile-settings-shell .security-guidance > div:first-child em {
  color: var(--text-muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-settings-shell .security-guidance-list {
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-panel);
}

.profile-settings-shell .security-guidance-list article {
  padding: 10px 12px;
}

.profile-settings-shell .security-guidance-list article:first-child {
  border-top: 0;
}

/* Final immutable override: Balance Target heartbeat is intentionally static. */
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg path,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg path {
  animation:none !important;
  filter:none !important;
  transform:none !important;
}

/* Final Auto-Bet motion budget. */
.profile-settings-shell [data-pane="autobet"] .safety-core-live{animation:none!important;transform:none!important;will-change:auto!important}
.profile-settings-shell [data-pane="autobet"] .safety-core-pulse{display:none!important;animation:none!important;will-change:auto!important}
.profile-settings-shell [data-pane="autobet"] #autobet-status.is-live .autobet-status-dot,
.profile-settings-shell [data-pane="autobet"] .autobet-status-dot.live{animation:none!important;transform:none!important;box-shadow:none!important;will-change:auto!important}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle{animation:safetyParticleLite 2.4s ease-in-out infinite!important;filter:none!important;will-change:transform,opacity}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle-mobile{animation:safetyParticleMobileLite 2.4s ease-in-out infinite!important;filter:none!important;will-change:transform,opacity}

/* Notification Center: uninterrupted pure-black surface. */
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel,
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel > header,
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list label {
  background:#000 !important;
  background-image:none !important;
}
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel::before {
  display:none !important;
  content:none !important;
  background:none !important;
}
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list label:hover {
  background:#050505 !important;
}

/* Auto-Bet low-cost motion: static scanner/status, one transform-only timeline particle. */
.profile-settings-shell [data-pane="autobet"] .safety-core-live {
  animation:none !important;
  transform:none !important;
  will-change:auto !important;
}
.profile-settings-shell [data-pane="autobet"] .safety-core-pulse {
  display:none !important;
  animation:none !important;
  will-change:auto !important;
}
.profile-settings-shell [data-pane="autobet"] #autobet-status.is-live .autobet-status-dot,
.profile-settings-shell [data-pane="autobet"] .autobet-status-dot,
.profile-settings-shell [data-pane="autobet"] .autobet-status-dot.live {
  animation:none !important;
  transform:none !important;
  box-shadow:none !important;
  will-change:auto !important;
}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle {
  animation:safetyParticleLite 2.4s ease-in-out infinite !important;
  filter:none !important;
  will-change:transform,opacity;
}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle-mobile {
  animation:safetyParticleMobileLite 2.4s ease-in-out infinite !important;
  filter:none !important;
  will-change:transform,opacity;
}
@keyframes safetyParticleLite {
  0%{transform:translate3d(0,0,0);opacity:0}
  12%,88%{opacity:1}
  100%{transform:translate3d(116px,0,0);opacity:0}
}
@keyframes safetyParticleMobileLite {
  0%{transform:translate3d(0,0,0);opacity:0}
  12%,88%{opacity:1}
  100%{transform:translate3d(266px,0,0);opacity:0}
}

/* Profile motion performance pass: preserve the visuals using compositor-only motion. */
.profile-settings-shell .notification-radar,
.profile-settings-shell .safety-engine-core,
.profile-settings-shell .safety-engine-flow,
.profile-settings-shell .account-signal-track,
.profile-settings-shell .automation-setting-icon {
  contain:layout paint;
}
.profile-settings-shell .notification-radar i,
.profile-settings-shell .safety-core-live,
.profile-settings-shell .safety-core-pulse,
.profile-settings-shell .safety-flow-particle,
.profile-settings-shell .safety-flow-particle-mobile,
.profile-settings-shell .account-signal-track i {
  will-change:transform,opacity;
  filter:none !important;
}
.profile-settings-shell .account-signal-track i {
  left:0 !important;
  box-shadow:none;
}
.profile-settings-shell .account-signal-map.is-live .account-signal-track i {
  animation:accountSignalTravelGpu 2.4s ease-in-out infinite;
}
.profile-settings-shell .account-signal-map.is-scrubbing .account-signal-track i {
  left:0 !important;
  transform:translate3d(var(--account-signal-x,0),0,0) scale(1.2);
  transition:transform .04s linear;
}
@keyframes accountSignalTravelGpu {
  0%{transform:translate3d(0,0,0);opacity:0}
  12%{opacity:1}
  88%{opacity:1}
  100%{transform:translate3d(var(--account-signal-distance,240px),0,0);opacity:0}
}
.profile-settings-shell [data-pane="autobet"] .safety-core-live,
.profile-settings-shell [data-pane="autobet"] .safety-core-pulse,
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle,
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle-mobile {
  filter:none !important;
}
.profile-settings-shell [data-pane="autobet"] #autobet-status.is-live .autobet-status-dot {
  box-shadow:none !important;
}
.profile-settings-shell [data-pane="account"] .account-signal-map,
.profile-settings-shell [data-pane="alerts"] .notification-preference-panel,
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine {
  isolation:isolate;
}

/* Light-theme bridge for all recently added monitoring and notification surfaces. */
html[data-theme="light"] .autobet-safety-engine {
  border-color:#d9dde3;
  background:linear-gradient(135deg,#ffffff,#f5f7fa);
  box-shadow:inset 0 1px #ffffff,0 8px 24px rgba(22,30,42,.07);
}
html[data-theme="light"] .safety-engine-copy b,
html[data-theme="light"] .safety-engine-detail b { color:#161a20; }
html[data-theme="light"] .safety-engine-copy small,
html[data-theme="light"] .safety-engine-detail small,
html[data-theme="light"] .safety-engine-detail > p { color:#667080; }
html[data-theme="light"] .safety-engine-flow path,
html[data-theme="light"] .safety-engine-flow-mobile path { stroke:#c9cfd8 !important; }
html[data-theme="light"] .safety-engine-flow circle:not(.safety-flow-particle),
html[data-theme="light"] .safety-engine-flow-mobile circle:not(.safety-flow-particle-mobile) { fill:#ffffff !important; }
html[data-theme="light"] .safety-engine-detail { background:linear-gradient(180deg,rgba(245,166,35,.045),transparent 45%); }
html[data-theme="light"] .safety-engine-detail article {
  border-color:#dfe3e8 !important;
  background:linear-gradient(155deg,#ffffff,#f7f8fa) !important;
  box-shadow:inset 0 1px #ffffff,0 7px 18px rgba(30,40,55,.065) !important;
}
html[data-theme="light"] .safety-engine-detail article header em { color:#697383;background:#eef1f4; }
html[data-theme="light"] .safety-chip-row span { border-color:#d9dee5 !important;background:#f5f7f9 !important;color:#303742 !important; }
html[data-theme="light"] .safety-group-icon { background:#fff5df;color:#b86e00; }
html[data-theme="light"] .safety-engine-state { background:#eaf8f0;color:#187a48;border-color:#bfe6d0; }
html[data-theme="light"] .safety-core-track { stroke:#c8ced7 !important; }

html[data-theme="light"] .notification-preference-panel {
  border-color:#d9dde3 !important;
  background:#ffffff !important;
  box-shadow:inset 0 1px #ffffff,0 8px 24px rgba(22,30,42,.07) !important;
}
html[data-theme="light"] .notification-preference-panel::before { background:radial-gradient(circle at 12% 0%,rgba(245,166,35,.08),transparent 34%),linear-gradient(115deg,rgba(255,255,255,.7),transparent 35%) !important; }
html[data-theme="light"] .notification-preference-panel > header { border-color:#e1e4e9 !important; }
html[data-theme="light"] .notification-preference-panel header b,
html[data-theme="light"] .notification-choice-list label b { color:#181c22; }
html[data-theme="light"] .notification-preference-panel header small,
html[data-theme="light"] .notification-choice-list label small { color:#697383; }
html[data-theme="light"] .notification-choice-list { background:#e1e4e9; }
html[data-theme="light"] .notification-choice-list label { background:#fbfcfd; }
html[data-theme="light"] .notification-choice-list label:hover { background:#fff8eb; }
html[data-theme="light"] .notification-choice-icon { border-color:#ead4a9;background:#fff7e7;color:#b86e00; }
html[data-theme="light"] .notification-choice-list input { border-color:#b8c0ca;background:#ffffff; }
html[data-theme="light"] .notification-choice-list input:checked { border-color:#e69400;background:#f5a623; }

html[data-theme="light"] .account-signal-map {
  border-color:#d9dde3 !important;
  background:linear-gradient(145deg,#ffffff,#f5f7fa) !important;
  box-shadow:inset 0 1px #ffffff,0 8px 24px rgba(22,30,42,.07) !important;
}
html[data-theme="light"] .account-signal-map::before { background:radial-gradient(circle,rgba(245,166,35,.1),transparent 68%); }
html[data-theme="light"] .account-signal-map > header b,
html[data-theme="light"] .account-signal-nodes article b { color:#181c22; }
html[data-theme="light"] .account-signal-map > header small,
html[data-theme="light"] .account-signal-nodes article small { color:#697383; }
html[data-theme="light"] .account-signal-track { background:#d8dde4; }
html[data-theme="light"] .account-signal-nodes article { border-color:#dfe3e8;background:#fbfcfd;color:#929aa6; }
html[data-theme="light"] .account-signal-nodes article.is-active { border-color:#e6c47e;background:#fffaf0;color:#b86e00; }
html[data-theme="light"] .account-signal-map.is-live .account-signal-nodes article.is-active { box-shadow:inset 0 1px #ffffff,0 6px 15px rgba(175,112,0,.08); }

html[data-theme="light"] .ng-stability-ring {
  background:radial-gradient(circle at center,#ffffff 57%,transparent 59%),conic-gradient(#e69400 var(--ng-stability-progress),#d9dee5 0);
}
html[data-theme="light"] .ng-stability-ring.is-ready {
  background:radial-gradient(circle at center,#ffffff 57%,transparent 59%),conic-gradient(#229b5d 360deg,#d9dee5 0);
}
html[data-theme="light"] .ng-stability-ring.is-off {
  background:radial-gradient(circle at center,#ffffff 57%,transparent 59%),conic-gradient(#c8ced6 360deg,#e2e6eb 0);
}

/* Safety-engine graphics live at the end of the cascade so the many historical profile theme
   bridges cannot suppress or recolor them. */
.profile-settings-shell [data-pane="autobet"] svg.safety-engine-core {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  overflow: visible !important;
  color: #f5a623 !important;
  z-index: 2;
}
.profile-settings-shell [data-pane="autobet"] .safety-core-track {
  display: block !important;
  fill: none !important;
  stroke: #383838 !important;
  stroke-width: 2 !important;
}
.profile-settings-shell [data-pane="autobet"] .safety-core-live {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  fill: none !important;
  stroke: #f5a623 !important;
  stroke-width: 3 !important;
  stroke-dasharray: 34 61 !important;
  animation: safetyRing 1.8s linear infinite !important;
}
.profile-settings-shell [data-pane="autobet"] .safety-core-pulse {
  display: block !important;
  visibility: visible !important;
  fill: #f5a623 !important;
  animation: safetyPulse 1.15s ease-in-out infinite !important;
}
.profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: 22px !important;
  overflow: visible !important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-flow path { stroke: #3a3a3a !important; }
.profile-settings-shell [data-pane="autobet"] .safety-engine-flow circle:not(.safety-flow-particle) { fill: #050505 !important; stroke: #f5a623 !important; }
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle {
  display: block !important;
  visibility: visible !important;
  fill: #f5a623 !important;
  animation: safetyParticle 2s ease-in-out infinite !important;
}
@media (prefers-reduced-motion: reduce) {
  .profile-settings-shell [data-pane="autobet"] .safety-core-live,
  .profile-settings-shell [data-pane="autobet"] .safety-core-pulse,
  .profile-settings-shell [data-pane="autobet"] .safety-flow-particle { animation: none !important; }
}

/* Purposeful Auto-Bet motion: communicate live state, never decorate inactive controls. */
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail {
  transform-origin: top;
  animation: safetyDetailOpen .28s cubic-bezier(.2,.8,.2,1) both;
}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail article {
  animation: safetyRuleEnter .32s cubic-bezier(.2,.8,.2,1) both;
}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail article:nth-child(2) { animation-delay: .045s; }
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail article:nth-child(3) { animation-delay: .09s; }
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state {
  animation: safetyProtected .55s ease-out both;
}

.profile-settings-shell [data-pane="autobet"] #autobet-status.is-live .autobet-status-dot {
  animation: autoLivePulse 1.7s ease-in-out infinite !important;
}
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon {
  position: relative;
  animation: targetHeartbeat 2.2s ease-in-out infinite;
}
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg {
  filter: drop-shadow(0 0 4px #f5a623);
}
.profile-settings-shell [data-pane="autobet"] .autowithdraw-card.is-active .automation-setting-icon {
  position: relative;
  animation: withdrawTransfer 2.6s cubic-bezier(.4,0,.2,1) infinite;
}
.profile-settings-shell [data-pane="autobet"] .autowithdraw-card.is-active .automation-setting-icon::after {
  content:"";
  position:absolute;
  inset:-5px;
  border:1px solid color-mix(in srgb,#f5a623 42%,transparent);
  border-radius:12px;
  animation: withdrawWave 2.6s ease-out infinite;
}

@keyframes safetyDetailOpen {
  from { opacity:0; transform:translateY(-8px) scaleY(.94); }
  to { opacity:1; transform:translateY(0) scaleY(1); }
}
@keyframes safetyRuleEnter {
  from { opacity:0; transform:translateX(-10px); }
  to { opacity:1; transform:translateX(0); }
}
@keyframes safetyProtected {
  0% { box-shadow:0 0 0 rgba(47,191,113,0); }
  45% { box-shadow:0 0 18px rgba(47,191,113,.3); }
  100% { box-shadow:0 0 0 rgba(47,191,113,0); }
}
@keyframes autoLivePulse {
  0%,100% { transform:scale(.82); opacity:.62; box-shadow:0 0 0 2px rgba(245,166,35,.08),0 0 4px rgba(245,166,35,.25); }
  50% { transform:scale(1.12); opacity:1; box-shadow:0 0 0 5px rgba(245,166,35,.08),0 0 12px rgba(245,166,35,.65); }
}
@keyframes targetHeartbeat {
  0%,72%,100% { transform:scale(1); box-shadow:none; }
  78% { transform:scale(1.08); box-shadow:0 0 16px rgba(245,166,35,.22); }
  84% { transform:scale(.98); }
  90% { transform:scale(1.05); }
}
@keyframes withdrawTransfer {
  0%,100% { transform:translateY(0) rotate(0); }
  35% { transform:translateY(-2px) rotate(-7deg); }
  65% { transform:translateY(1px) rotate(7deg); }
}
@keyframes withdrawWave {
  0%,35% { opacity:0; transform:scale(.82); }
  55% { opacity:.65; }
  100% { opacity:0; transform:scale(1.28); }
}
@media (prefers-reduced-motion: reduce) {
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail article,
  .profile-settings-shell [data-pane="autobet"] #autobet-status.is-live .autobet-status-dot,
  .profile-settings-shell [data-pane="autobet"] .automation-setting-icon,
  .profile-settings-shell [data-pane="autobet"] .automation-setting-icon::after { animation:none !important; }
}

/* Refined expanded safety view: short visual tokens instead of compressed prose. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  padding:11px 12px 12px;
  background:linear-gradient(180deg,rgba(245,166,35,.025),transparent 45%);
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:9px;
  min-width:0;
  padding:10px;
  border:1px solid #202020;
  border-radius:11px;
  background:#070707;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header {
  display:grid;
  grid-template-columns:24px minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header b { font-size:11px; }
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header em { color:#8e8e8e; font-size:8px; font-style:normal; }
.profile-settings-shell [data-pane="autobet"] .safety-chip-row { display:flex; flex-wrap:wrap; gap:5px; }
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span {
  padding:4px 6px;
  border:1px solid #292929;
  border-radius:6px;
  color:#c8c8c8;
  background:#0d0d0d;
  font-size:9px;
  line-height:1.2;
  white-space:nowrap;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail > p {
  grid-column:1/-1;
  display:flex;
  align-items:center;
  gap:7px;
  margin:1px 2px 0;
  font-size:10px;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail > p i {
  width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#f5a623;box-shadow:0 0 7px rgba(245,166,35,.6);
}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail {
  animation:safetyPanelReveal .36s cubic-bezier(.16,1,.3,1) both;
}
@keyframes safetyPanelReveal {
  from{opacity:0;clip-path:inset(0 0 100% 0 round 0 0 12px 12px);transform:translateY(-6px)}
  to{opacity:1;clip-path:inset(0 0 0 0 round 0 0 12px 12px);transform:translateY(0)}
}

/* Animate the heartbeat trace itself, not its surrounding Balance Target tile. */
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon { animation:none !important; }
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg path {
  stroke-dasharray:30;
  stroke-dashoffset:30;
  animation:balanceHeartbeatTrace 2.25s ease-in-out infinite;
}
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg path {
  animation-duration:1.55s;
  filter:drop-shadow(0 0 4px #f5a623);
}
@keyframes balanceHeartbeatTrace {
  0%,15%{stroke-dashoffset:30;opacity:.35}
  48%,72%{stroke-dashoffset:0;opacity:1}
  100%{stroke-dashoffset:-30;opacity:.35}
}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail{grid-template-columns:1fr}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail > p{grid-column:1}
}
@media(prefers-reduced-motion:reduce){
  .profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg path,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail{animation:none!important}
}

/* Safety stage cards: stronger hierarchy, quieter copy, and a visible three-stage progression. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article {
  position:relative;
  overflow:hidden;
  min-height:142px;
  padding:12px;
  border-color:#292929;
  background:linear-gradient(155deg,#0c0c0c 0%,#060606 72%);
  box-shadow:inset 0 1px rgba(255,255,255,.035),0 8px 24px rgba(0,0,0,.18);
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article::before {
  content:"";position:absolute;left:0;right:0;top:0;height:2px;
  background:linear-gradient(90deg,transparent,#f5a623,transparent);
  opacity:.72;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article::after {
  content:"";position:absolute;width:70px;height:70px;right:-35px;top:-40px;border-radius:50%;
  background:rgba(245,166,35,.055);filter:blur(4px);
}
@media(hover:hover){
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article:hover {
    transform:translateY(-2px);border-color:#4a3515;box-shadow:inset 0 1px rgba(255,255,255,.05),0 12px 28px rgba(0,0,0,.26);
  }
}

/* Safety diagnostics readability pass. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header b{font-size:14px!important;line-height:1.2!important}
.profile-settings-shell [data-pane="autobet"] .safety-group-icon{font-size:9px!important}
.profile-settings-shell [data-pane="autobet"] .safety-stage-gauge>span b{font-size:30px!important}
.profile-settings-shell [data-pane="autobet"] .safety-stage-gauge>span small{font-size:11px!important}
.profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>small{font-size:10px!important;line-height:1.25!important}
.profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>b{font-size:10px!important;line-height:1.2!important}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span{min-height:34px!important;font-size:11px!important;line-height:1.3!important;padding-right:27px!important}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span::after{width:17px!important;height:17px!important;font-size:9px!important}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header b{font-size:14px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>small,
  .profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>b{font-size:10px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-chip-row span{font-size:12px!important;min-height:38px!important}
}

/* One full-width entry-rules console replaces the old three-stage cards. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail:has(article[data-stage="rules"]){grid-template-columns:1fr!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="rules"]{
  width:100%!important;min-height:0!important;padding:18px!important;
  background:linear-gradient(145deg,color-mix(in srgb,var(--ps-accent) 8%,var(--app-panel)),var(--app-panel) 42%)!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="rules"]::after{content:"RULES"!important;font-size:64px!important;right:10px!important;bottom:-18px!important}
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-stage-visual{
  grid-template-columns:96px minmax(0,1fr)!important;min-height:112px!important;padding:10px 4px 14px!important;
}
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-stage-gauge,
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-stage-gauge svg{width:90px!important;height:90px!important}
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0 18px!important;margin-top:4px!important;
}
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row span{
  min-height:42px!important;font-size:11px!important;line-height:1.35!important;padding:8px 29px 8px 3px!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="rules"]{
  background:linear-gradient(145deg,color-mix(in srgb,var(--ps-accent) 7%,#fff),#fff 44%)!important;
}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row{grid-template-columns:1fr!important}
  .profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row span{font-size:12px!important;min-height:46px!important}
}

/* Light theme count badges keep their fills without a dark ring. */
html[data-theme="light"] .logs-badge,
html[data-theme="light"] .queue-badge,
html[data-theme="light"] .queue-toggle-btn.has-queue .queue-badge{border:0!important}

/* Remove native mobile tap/focus rectangles from custom profile controls. */
@media(max-width:620px), (pointer:coarse){
  .profile-settings-shell summary,
  .profile-settings-shell button,
  .profile-settings-shell [role="switch"],
  .profile-settings-shell [role="tab"],
  .profile-settings-shell label,
  .profile-settings-shell input{
    -webkit-tap-highlight-color:transparent!important;
  }
  .profile-settings-shell summary:focus,
  .profile-settings-shell summary:focus-visible,
  .profile-settings-shell button:focus,
  .profile-settings-shell button:focus-visible,
  .profile-settings-shell [role="switch"]:focus,
  .profile-settings-shell [role="switch"]:focus-visible,
  .profile-settings-shell [role="tab"]:focus,
  .profile-settings-shell [role="tab"]:focus-visible{
    outline:none!important;
  }
}

@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-log-match{
    white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
    overflow-wrap:anywhere!important;word-break:normal!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-circuit-labels text{
    font-size:14px!important;font-weight:900!important;fill:var(--text-primary)!important;
    letter-spacing:0!important;
  }
}

/* Real CSS-pixel labels for the mobile Safety timeline. */
.profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{display:none}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-rows:44px 54px!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{
    grid-column:1/5!important;grid-row:2!important;align-self:start!important;height:27px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow-mobile .safety-circuit-labels{display:none!important}
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    grid-column:1/5;grid-row:2;align-self:end;display:grid!important;grid-template-columns:repeat(3,1fr);
    padding:0 1px;color:var(--text-secondary);font-size:12px;font-weight:800;line-height:16px;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels b:nth-child(1){text-align:left}
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels b:nth-child(2){text-align:center}
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels b:nth-child(3){text-align:right}
}

/* Alerts notification categories. */
.profile-settings-shell [data-pane="alerts"] .notification-preference-panel{position:relative;overflow:hidden;border:1px solid var(--app-line);border-radius:14px;background:#000;box-shadow:inset 0 1px rgba(255,255,255,.035),0 10px 28px rgba(0,0,0,.18)}
.profile-settings-shell [data-pane="alerts"] .notification-preference-panel::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 12% 0%,rgba(245,166,35,.07),transparent 34%),linear-gradient(115deg,rgba(255,255,255,.025),transparent 35%);z-index:0}.profile-settings-shell [data-pane="alerts"] .notification-preference-panel>*{position:relative;z-index:1}
.profile-settings-shell [data-pane="alerts"] .notification-preference-panel>header{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;padding:13px;border-bottom:1px solid var(--app-line)}
.notification-preference-panel header>div{display:grid;gap:2px}.notification-preference-panel header b{font-size:13px}.notification-preference-panel header small{color:var(--text-secondary);font-size:10px}.notification-preference-panel header em{padding:4px 7px;border:1px solid #3a2a0e;border-radius:999px;color:#f5a623;background:#140d02;font-size:8px;font-style:normal;font-weight:800}
.notification-radar{position:relative;width:30px;height:30px;border:1px solid #5f410d;border-radius:50%}.notification-radar::before,.notification-radar::after,.notification-radar i{content:"";position:absolute;border-radius:50%}.notification-radar::before{inset:5px;border:1px solid #6b490e}.notification-radar::after{inset:12px;background:#f5a623;box-shadow:0 0 7px #f5a623}.notification-radar i{left:14px;top:0;width:1px;height:14px;background:#f5a623;transform-origin:50% 15px;animation:notificationSweep 2.6s linear infinite}
.notification-choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--app-line)}
.notification-choice-list label{display:grid;grid-template-columns:34px minmax(0,1fr) 20px;align-items:center;gap:9px;padding:12px;background:#080808;cursor:pointer;transition:background .18s ease}.notification-choice-list label:hover{background:#110d06}.notification-choice-list label>span:nth-child(2){display:grid;gap:2px}.notification-choice-list label b{font-size:11px}.notification-choice-list label small{color:var(--text-secondary);font-size:9px;line-height:1.35}.notification-choice-icon{width:30px;height:30px;display:grid;place-items:center;border:1px solid #3c2b0d;border-radius:9px;color:#f5a623;background:#120c02;font-size:8px;font-weight:850}.notification-choice-icon svg{width:16px!important;height:16px!important}.notification-choice-list input{appearance:none;width:18px;height:18px;margin:0;border:1px solid #444;border-radius:5px;background:#0d0d0d;display:grid;place-content:center}.notification-choice-list input::before{content:"";width:8px;height:5px;border-left:2px solid #050505;border-bottom:2px solid #050505;transform:rotate(-45deg) scale(0);transition:transform .14s ease}.notification-choice-list input:checked{border-color:#f5a623;background:#f5a623}.notification-choice-list input:checked::before{transform:rotate(-45deg) scale(1)}
@keyframes notificationSweep{to{transform:rotate(360deg)}}
.profile-settings-shell [data-pane="alerts"] .notification-choice-list label{background:#000}
.profile-settings-shell [data-pane="alerts"] .notification-choice-list label:hover{background:#0b0803}
@media(max-width:620px){.notification-choice-list{grid-template-columns:1fr}.notification-choice-list label{padding:11px}.notification-preference-panel header em{font-size:7px}}
@media(prefers-reduced-motion:reduce){.notification-radar i{animation:none}}

.safety-engine-flow-mobile{display:none}
@keyframes safetyParticleMobile{0%{transform:translateX(0);opacity:0}12%{opacity:1}88%{opacity:1}100%{transform:translateX(266px);opacity:0}}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{display:none!important}
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{display:block!important;visibility:visible!important;grid-column:2/4;grid-row:2;align-self:center;justify-self:stretch;width:100%!important;height:20px!important;overflow:visible}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow-mobile path{fill:none;stroke:#3a3a3a;stroke-width:1.5}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow-mobile circle:not(.safety-flow-particle-mobile){fill:#050505;stroke:#f5a623;stroke-width:1.5}
  .profile-settings-shell [data-pane="autobet"] .safety-flow-particle-mobile{fill:#f5a623;filter:drop-shadow(0 0 4px #f5a623);animation:safetyParticleMobile 2s ease-in-out infinite}
}
@media(prefers-reduced-motion:reduce){.safety-flow-particle-mobile{animation:none!important}}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg path,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg path {
  animation:none !important;
  filter:none !important;
  transform:none !important;
}

/* Account connection map: motion communicates a genuinely live profile/session/wallet link. */
.profile-settings-shell [data-pane="account"] .account-signal-map{position:relative;overflow:hidden;padding:13px 14px 14px;border:1px solid var(--app-line);border-radius:14px;background:#000;box-shadow:inset 0 1px rgba(255,255,255,.035)}
.account-signal-map::before{content:"";position:absolute;width:180px;height:180px;right:-90px;top:-120px;border-radius:50%;background:radial-gradient(circle,rgba(245,166,35,.08),transparent 68%);pointer-events:none}
.account-signal-map>header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.account-signal-map>header>div{display:grid;gap:2px}.account-signal-map>header b{font-size:13px}.account-signal-map>header small{color:var(--text-secondary);font-size:10px}.account-signal-map>header em{padding:4px 7px;border:1px solid #3b2a0d;border-radius:999px;color:#f5a623;background:#120c02;font-size:8px;font-style:normal;font-weight:850;letter-spacing:.08em}.account-signal-map.is-live>header em{color:#31c978;border-color:#174d31;background:#06140d;box-shadow:0 0 12px rgba(49,201,120,.12)}
.account-signal-track{position:absolute;left:48px;right:48px;top:78px;height:2px;background:#242424}.account-signal-track span{position:absolute;inset:0;background:linear-gradient(90deg,#f5a623,#31c978);transform:scaleX(.05);transform-origin:left;transition:transform .45s ease}.account-signal-map.is-live .account-signal-track span{transform:scaleX(1)}.account-signal-track i{position:absolute;left:0;top:-3px;width:8px;height:8px;border-radius:50%;background:#f5a623;box-shadow:0 0 8px #f5a623;opacity:0}.account-signal-map.is-live .account-signal-track i{animation:accountSignalTravel 2.4s ease-in-out infinite}.account-signal-map.is-scrubbing .account-signal-track i{left:var(--account-signal-x,0)!important;opacity:1!important;animation:none!important;transform:scale(1.2);transition:left .04s linear,transform .12s ease}.account-signal-map.is-scrubbing .account-signal-track span{transform:scaleX(1);filter:brightness(1.18)}
.account-signal-nodes{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.account-signal-nodes article{min-width:0;display:flex;align-items:center;gap:9px;padding:10px;border:1px solid #222;border-radius:11px;background:#070707;color:#696969;transition:border-color .25s ease,color .25s ease,transform .2s ease}.account-signal-nodes article.is-active{color:#f5a623;border-color:#49330e}.account-signal-nodes article svg{width:20px!important;height:20px!important;flex:0 0 20px}.account-signal-nodes article>span{min-width:0;display:grid;gap:2px}.account-signal-nodes article b{color:#ededed;font-size:11px}.account-signal-nodes article small{overflow:hidden;color:#8d8d8d;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.account-signal-map.is-live .account-signal-nodes article.is-active{box-shadow:inset 0 1px rgba(255,255,255,.025),0 0 16px rgba(245,166,35,.04)}
@media(hover:hover){.account-signal-nodes article:hover{transform:translateY(-2px);border-color:#443316}}
@keyframes accountSignalTravel{0%{left:0;opacity:0}12%{opacity:1}88%{opacity:1}100%{left:calc(100% - 8px);opacity:0}}
@media(max-width:620px){.account-signal-map{padding:12px!important}.account-signal-track{left:36px;right:36px;top:76px}.account-signal-nodes{gap:6px}.account-signal-nodes article{justify-content:center;padding:9px 6px}.account-signal-nodes article svg{width:18px!important;height:18px!important}.account-signal-nodes article>span{display:none}}
@media(prefers-reduced-motion:reduce){.account-signal-map.is-live .account-signal-track i{animation:none}}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header b { font-size:12px;letter-spacing:.01em; }
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header em { padding:3px 5px;border-radius:5px;background:#111;color:#a5a5a5; }
.profile-settings-shell [data-pane="autobet"] .safety-chip-row { align-content:flex-start; }
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span { padding:5px 7px;border-color:#303030;background:#101010;color:#dedede;font-size:10px; }

/* Replay expansion choreography on every open; JS toggles is-revealing after a forced reflow. */
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail,
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail article { animation:none; }
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine.is-revealing .safety-engine-detail { animation:safetyPanelReveal .36s cubic-bezier(.16,1,.3,1) both; }
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine.is-revealing .safety-engine-detail article { animation:safetyRuleEnter .34s cubic-bezier(.16,1,.3,1) both; }
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine.is-revealing .safety-engine-detail article:nth-child(2){animation-delay:.055s}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine.is-revealing .safety-engine-detail article:nth-child(3){animation-delay:.11s}

/* Balance Target: the complete heartbeat glyph beats as one icon, and only while enabled. */
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg path {
  animation:none !important;
  stroke-dasharray:none;
  stroke-dashoffset:0;
  filter:none;
  transform-origin:center;
}
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg {
  animation:balanceWholeBeat 1.8s ease-in-out infinite !important;
  filter:drop-shadow(0 0 4px rgba(245,166,35,.5));
}
@keyframes balanceWholeBeat {
  0%,68%,100%{transform:scale(1);opacity:.72}
  74%{transform:scale(1.18);opacity:1}
  80%{transform:scale(.94);opacity:.82}
  86%{transform:scale(1.1);opacity:1}
  94%{transform:scale(1);opacity:.78}
}
@media(prefers-reduced-motion:reduce){
  .profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine.is-revealing .safety-engine-detail,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine.is-revealing .safety-engine-detail article{animation:none!important}
}

/* Final expansion behavior: one simple top-down appearance, no clipping, staging, or JS replay. */
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail {
  animation:safetySimpleDrop .16s ease-out both !important;
}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail article,
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state {
  animation:none !important;
}
@keyframes safetySimpleDrop {
  from{opacity:0;transform:translateY(-6px)}
  to{opacity:1;transform:translateY(0)}
}
@media(prefers-reduced-motion:reduce){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail{animation:none!important}
}

/* Mobile Safety Engine: compact two-row scanner layout without stretching SVG checkpoints. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine summary{
    min-height:78px;
    grid-template-columns:40px minmax(0,1fr) auto 18px;
    grid-template-rows:auto 20px;
    column-gap:9px;
    row-gap:2px;
    padding:10px 12px 8px;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-core{
    grid-column:1;
    grid-row:1/3;
    align-self:center;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{
    grid-column:2;
    grid-row:1;
    align-self:end;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy b{font-size:13px}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy small{font-size:10px;line-height:1.25}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    grid-column:3;
    grid-row:1;
    align-self:center;
    padding:4px 6px;
    font-size:7px;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-chevron{
    grid-column:4;
    grid-row:1;
    align-self:center;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
    position:static !important;
    grid-column:2/4;
    grid-row:2;
    justify-self:start;
    align-self:center;
    width:130px !important;
    height:20px !important;
    max-width:100%;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail{
    gap:7px;
    padding:8px;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{
    min-height:0;
    padding:10px;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-chip-row span{
    font-size:9px;
    padding:5px 7px;
  }
}

/* Immutable mobile Safety header geometry. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    position:relative!important;display:block!important;box-sizing:border-box!important;
    min-height:116px!important;height:116px!important;padding:12px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-badge{
    position:absolute!important;left:12px!important;top:12px!important;width:40px!important;height:40px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{
    position:absolute!important;left:62px!important;top:15px!important;right:112px!important;display:grid!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    position:absolute!important;right:12px!important;top:13px!important;left:auto!important;min-width:88px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-chevron,
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{display:none!important}
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{
    position:absolute!important;display:block!important;left:12px!important;right:12px!important;top:65px!important;
    width:calc(100% - 24px)!important;height:27px!important;max-width:none!important;min-width:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    position:absolute!important;display:grid!important;left:12px!important;right:12px!important;bottom:8px!important;
    width:auto!important;grid-template-columns:20px minmax(0,1fr) 20px!important;padding:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels b{
    text-align:center!important;font-size:12px!important;font-weight:800!important;line-height:16px!important;
  }
}

/* Auto-bet placement history is operational information, so keep it comfortably readable. */
.profile-settings-shell [data-pane="autobet"] .fresh-profile-log {
  min-height: 126px;
  max-height: 210px;
}

.profile-settings-shell [data-pane="autobet"] .autobet-log-row {
  gap: 12px;
  min-height: 76px;
  padding: 13px 14px;
}

.profile-settings-shell [data-pane="autobet"] .autobet-log-badge {
  padding: 4px 8px;
  font-size: 10.5px;
}

.profile-settings-shell [data-pane="autobet"] .autobet-log-body {
  gap: 4px;
}

.profile-settings-shell [data-pane="autobet"] .autobet-log-match {
  font-size: 14.5px;
  line-height: 1.3;
}

.profile-settings-shell [data-pane="autobet"] .autobet-log-meta {
  font-size: 12.5px;
  line-height: 1.35;
}

.profile-settings-shell [data-pane="autobet"] .autobet-log-note {
  font-size: 12.5px;
  line-height: 1.45;
}

.profile-settings-shell [data-pane="autobet"] .autobet-log-time {
  padding-top: 2px;
  font-size: 11.5px;
}

@media (max-width: 620px) {
  .profile-settings-shell [data-pane="autobet"] .fresh-profile-log { min-height: 150px; max-height: 260px; }
  .profile-settings-shell [data-pane="autobet"] .autobet-log-row { flex-wrap: wrap; }
  .profile-settings-shell [data-pane="autobet"] .autobet-log-body { min-width: calc(100% - 74px); }
}

/* Queue and system-log cards communicate hover through the border only. */
@media (hover: hover) and (pointer: fine) {
  .awaiting-row:hover,
  .logger-row:hover {
    border-color: var(--app-line-strong) !important;
    background: var(--app-panel-3) !important;
  }

  html[data-theme="dark"] .awaiting-row:hover,
  html[data-theme="dark"] .logger-row:hover {
    background: #000000 !important;
  }
}

/* System Log match cards stay pure black in dark mode. */
html[data-theme="dark"] .logs-modal-panel .logger-row,
html[data-theme="dark"] .logs-modal-panel .logger-row:hover {
  background: #000000 !important;
}

.profile-settings-shell .security-clear-row {
  margin-top: 14px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
}

.profile-settings-shell .security-privacy-band {
  margin-top: 14px;
  border-radius: 12px;
}

.profile-settings-shell .security-auto-hide-band {
  margin-top: 12px;
  border-radius: 12px;
}

.profile-settings-shell .security-privacy-dot,
.profile-settings-shell .security-focus-dot {
  width: 8px;
  height: 8px;
  display: block;
  border-radius: 50%;
  background: var(--text-muted);
}

.profile-settings-shell .security-privacy-band:has(.fresh-profile-switch[aria-checked="true"]) .security-privacy-dot {
  background: var(--accent-hot);
  box-shadow: 0 0 10px var(--accent-glow);
}

.profile-settings-shell .security-auto-hide-band:has(.fresh-profile-switch[aria-checked="true"]) .security-focus-dot {
  background: var(--accent-hot);
  box-shadow: 0 0 10px var(--accent-glow);
}

.profile-settings-shell .security-verify-row {
  margin-top: 14px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
}

.profile-settings-shell #security-verify-session:disabled {
  opacity: .6;
  cursor: wait;
}

html.privacy-mode #profile-user-name,
html.privacy-mode #profile-user-handle,
html.privacy-mode #profile-user-balance,
html.privacy-mode #profile-user-currency,
html.privacy-mode #profile-row-login,
html.privacy-mode #profile-row-id,
html.privacy-mode #profile-row-wallet {
  filter: blur(5px);
  user-select: none;
}

@media (max-width: 620px) {
  .profile-settings-shell .security-session-grid {
    grid-template-columns: 1fr;
  }

  .profile-settings-shell .security-session-grid .profile-info-tile {
    border-right: 0;
  }
}

/* Complete profile shell: flat black settings surface with a divided account rail. */
.fresh-profile-overlay {
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(8px);
}

.profile-settings-shell {
  border: 1px solid rgba(255,255,255,.12);
  background: #050505;
  box-shadow: 0 28px 80px rgba(0,0,0,.72);
}

.profile-settings-layout {
  grid-template-columns: 252px minmax(0, 1fr);
  background: #050505;
}

.profile-settings-rail {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 22px 18px 18px;
  border-right: 1px solid rgba(255,255,255,.09);
  background: #050505;
}

.profile-settings-account {
  min-height: 64px;
  grid-template-columns: 46px minmax(0,1fr);
  gap: 12px;
  padding: 0 36px 18px 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.09);
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell .fresh-profile-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #0b0b0b;
}

.profile-settings-account h2 {
  margin: 4px 0 2px;
  color: var(--ps-text);
  font-size: 16px;
  font-weight: 900;
}

.profile-settings-account p {
  color: var(--ps-muted);
  font-size: 10px;
}

.profile-settings-wallet {
  min-height: 88px;
  margin: 0;
  padding: 17px 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.09);
  border-radius: 0;
  background: transparent;
}

.profile-settings-wallet strong {
  color: var(--ps-text);
  font-size: 25px;
  letter-spacing: -.03em;
}

.profile-settings-wallet small {
  color: var(--ps-accent);
  font-size: 11px;
}

.profile-settings-shell .profile-settings-tabs {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: transparent;
}

.profile-settings-shell .fresh-profile-tab {
  min-height: 42px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ps-muted);
  background: transparent;
  box-shadow: none;
}

.profile-settings-shell .fresh-profile-tab:hover {
  color: var(--ps-text);
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
}

.profile-settings-shell .fresh-profile-tab.active {
  color: var(--ps-accent);
  border-color: color-mix(in srgb, var(--ps-accent) 32%, transparent);
  background: color-mix(in srgb, var(--ps-accent) 9%, transparent);
  box-shadow: none;
}

.profile-settings-vitals {
  min-height: 66px;
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: #090909;
}

.profile-settings-vitals article {
  min-height: 64px;
  border-color: rgba(255,255,255,.07);
  background: transparent;
}

.profile-settings-vitals strong {
  color: var(--ps-text);
  font-size: 17px;
}

.profile-settings-main,
.profile-settings-content {
  background: #050505;
}

.profile-settings-shell .fresh-profile-close {
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: #0b0b0b;
}

@media (max-width: 767px) {
  .profile-settings-layout {
    grid-template-columns: 1fr;
  }

  .profile-settings-rail {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
    padding: calc(14px + env(safe-area-inset-top,0px)) 14px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.09);
  }

  .profile-settings-account {
    min-height: 52px;
    padding: 0 40px 12px 0;
    border-bottom: 0;
  }

  .profile-settings-wallet {
    grid-column: 1 / -1;
    min-height: 78px;
    padding: 14px 12px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 11px;
    background: #080808;
  }

  .profile-settings-shell .profile-settings-tabs {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 4px;
    padding: 10px 0 12px;
    border-bottom: 0;
  }

  .profile-settings-shell .fresh-profile-tab {
    min-height: 38px;
    justify-content: center;
    gap: 5px;
    padding: 0 4px;
  }
}

/* Mobile profile navigation: labels may shrink, icons never do. */
@media (max-width: 767px) {
  .profile-settings-shell .fresh-profile-tab svg {
    flex: 0 0 15px;
    width: 15px;
    min-width: 15px;
    max-width: 15px;
    height: 15px;
    min-height: 15px;
    aspect-ratio: 1;
  }

  .profile-settings-shell .fresh-profile-tab > span {
    min-width: 0;
    flex: 0 1 auto;
    white-space: nowrap;
  }

}

@media (max-width: 767px) and (min-height: 720px) {
  /* At normal phone heights Appearance fits completely. Avoid an inert inner
     scroller/blank overscroll after the Reset row; short phones keep scrolling. */
  .profile-settings-content:has([data-pane="appearance"].active) {
    overflow-y: hidden;
    overscroll-behavior: none;
  }
}

/* Account uses the same clean settings sections, with useful session details. */
.profile-settings-shell [data-pane="account"] {
  --account-line: rgba(255,255,255,.09);
  --account-muted: #858585;
}

.profile-settings-shell [data-pane="account"] .account-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 18px;
  margin-bottom: 0;
}

.profile-settings-shell [data-pane="account"] .account-heading small {
  display: block;
  color: var(--account-muted);
  font-size: 11px;
  line-height: 1.35;
}

.profile-settings-shell [data-pane="account"] .profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-width: 1px 0 0;
  border-color: var(--account-line);
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell [data-pane="account"] .profile-info-tile,
.profile-settings-shell [data-pane="account"] .profile-info-tile.wide {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--account-line);
  border-bottom: 1px solid var(--account-line);
  background: transparent;
}

.profile-settings-shell [data-pane="account"] .profile-info-tile:nth-child(2n) {
  border-right: 0;
}

.profile-settings-shell [data-pane="account"] .profile-info-tile strong {
  overflow: hidden;
  color: var(--ps-text);
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-settings-shell [data-pane="account"] #profile-row-feed {
  color: var(--ps-accent);
}

.profile-settings-shell [data-pane="account"] #profile-row-session-status {
  color: var(--ps-good);
}

.profile-account-storage {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--account-line);
}

.profile-account-storage > div {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.profile-account-storage svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--ps-accent);
}

.profile-account-storage b,
.profile-account-storage small {
  display: block;
}

.profile-account-storage b {
  color: var(--ps-text);
  font-size: 12px;
  font-weight: 850;
}

.profile-account-storage small {
  max-width: 390px;
  margin-top: 4px;
  color: var(--account-muted);
  font-size: 10px;
  line-height: 1.35;
}

.profile-account-storage em {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--ps-accent) 38%, transparent);
  border-radius: 999px;
  color: var(--ps-accent);
  background: color-mix(in srgb, var(--ps-accent) 8%, transparent);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.profile-settings-shell [data-pane="account"] .profile-account-footer {
  margin-top: auto;
  padding-top: 16px;
}

@media (max-width: 620px) {
  .profile-settings-shell [data-pane="account"] .account-heading {
    padding-bottom: 11px;
  }

  .profile-settings-shell [data-pane="account"] .profile-info-tile,
  .profile-settings-shell [data-pane="account"] .profile-info-tile.wide {
    min-height: 51px;
    padding: 8px 9px;
    gap: 4px;
  }

  .profile-account-storage {
    min-height: 64px;
    padding: 10px 2px;
  }

  .profile-account-storage small {
    font-size: 9px;
  }
}

/* Auto-Bet follows the same divided settings language as Alerts/Display. */
.profile-settings-shell [data-pane="autobet"] {
  --autobet-line: rgba(255,255,255,.09);
  --autobet-muted: #858585;
}

.profile-settings-shell [data-pane="autobet"] .autobet-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 18px;
  margin-bottom: 0;
}

.profile-settings-shell [data-pane="autobet"] .autobet-heading small {
  display: block;
  color: var(--autobet-muted);
  font-size: 11px;
  line-height: 1.35;
}

.profile-settings-shell [data-pane="autobet"] .profile-control-band {
  min-height: 70px;
  margin: 0;
  padding: 14px 12px;
  border-width: 1px 0 0;
  border-color: var(--autobet-line);
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell [data-pane="autobet"] .profile-control-band b,
.profile-settings-shell [data-pane="autobet"] .profile-input-band b {
  color: var(--ps-text);
  font-size: 13px;
  font-weight: 850;
}

.profile-settings-shell [data-pane="autobet"] .profile-control-band small,
.profile-settings-shell [data-pane="autobet"] .profile-input-band small {
  margin-top: 4px;
  color: var(--autobet-muted);
  font-size: 11px;
}

.profile-settings-shell [data-pane="autobet"] #autobet-rule-seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--autobet-line);
}

.profile-settings-shell [data-pane="autobet"] .profile-choice-card {
  min-height: 42px;
  border-radius: 9px;
  color: var(--ps-soft);
  background: var(--ps-surface);
}

.profile-settings-shell [data-pane="autobet"] .profile-choice-card.active {
  color: var(--ps-accent);
  border-color: color-mix(in srgb, var(--ps-accent) 52%, transparent);
  background: color-mix(in srgb, var(--ps-accent) 9%, var(--ps-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ps-accent) 12%, transparent);
}

.profile-settings-shell [data-pane="autobet"] .profile-input-band {
  min-height: 62px;
  margin: 0;
  padding: 12px 2px;
  border-width: 1px 0 0;
  border-color: var(--autobet-line);
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell [data-pane="autobet"] .profile-input-band label {
  background: var(--ps-surface);
}

.profile-settings-shell [data-pane="autobet"] .profile-smart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--autobet-line);
}

.profile-settings-shell [data-pane="autobet"] .profile-smart-card,
.profile-settings-shell [data-pane="autobet"] .profile-smart-card:nth-child(1),
.profile-settings-shell [data-pane="autobet"] .profile-smart-card:nth-child(2) {
  min-height: 112px;
  padding: 13px;
  border-color: var(--ps-border);
  border-radius: 10px;
  background: var(--ps-surface);
}

.profile-settings-shell [data-pane="autobet"] .profile-smart-card small {
  color: var(--autobet-muted);
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active {
  border-color: color-mix(in srgb, var(--ps-accent) 50%, var(--ps-border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ps-accent) 10%, transparent);
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card .profile-smart-head {
  width: 100%;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card .profile-smart-head .fresh-profile-switch {
  margin-left: auto;
  pointer-events: auto;
}

.profile-settings-shell [data-pane="autobet"] .autowithdraw-card .profile-smart-head {
  width: 100%;
}

.profile-settings-shell [data-pane="autobet"] .autowithdraw-card .profile-smart-head .fresh-profile-switch {
  margin-left: auto;
  pointer-events: auto;
}

.profile-settings-shell [data-pane="autobet"] .autowithdraw-card.is-active {
  border-color: color-mix(in srgb, var(--ps-good) 52%, var(--ps-border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ps-good) 10%, transparent);
}

.profile-settings-shell [data-pane="autobet"] .autowithdraw-configure {
  width: fit-content;
  min-height: 30px;
  margin-top: 2px;
}

.autowithdraw-panel {
  width: min(520px, calc(100vw - 28px));
}

.autowithdraw-fields {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
}
.autowithdraw-methods { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }
.autowithdraw-methods .profile-choice-card { min-height:42px; justify-content:center; }
#autowithdraw-crypto-fields, #autowithdraw-card-fields { display:grid; gap:10px; }
#autowithdraw-crypto-fields[hidden], #autowithdraw-card-fields[hidden] { display:none !important; }
.autowithdraw-fields select {
  width:100%; min-height:42px; padding:0 12px; border:1px solid var(--ps-line, #334155); border-radius:10px;
  background:var(--ps-input, #0f172a); color:var(--ps-text, #f8fafc); font:inherit;
}
#autowithdraw-load-cards { justify-self:start; }

.autowithdraw-fields label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.autowithdraw-fields input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--app-line-strong);
  border-radius: 10px;
  outline: 0;
  color: var(--text-primary);
  background: var(--app-control);
  font-size: 13px;
  font-weight: 700;
}

.autowithdraw-fields input:focus {
  border-color: var(--accent-hot-border);
  box-shadow: 0 0 0 3px var(--accent-hot-soft);
}

.autowithdraw-state {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  color: var(--text-secondary);
  background: var(--app-panel-2);
  font-size: 11px;
  line-height: 1.4;
}

.autowithdraw-state.is-error {
  color: var(--ps-danger);
  border-color: color-mix(in srgb, var(--ps-danger) 38%, var(--app-line));
}

.autowithdraw-actions,
.autowithdraw-verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.automation-settings-stack {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--autobet-line);
}

.automation-setting-section {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--app-line);
  border-radius: 11px;
  background: var(--app-panel-2);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.automation-setting-section.is-active {
  border-color: color-mix(in srgb, var(--accent-hot) 46%, var(--app-line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-hot) 9%, transparent);
}

.automation-setting-head.profile-smart-head {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  color: var(--text-primary);
  text-transform: none;
}

.automation-setting-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent-hot) 24%, var(--app-line));
  border-radius: 9px;
  color: var(--accent-hot);
  background: var(--accent-hot-soft);
}

.automation-setting-icon svg {
  width: 15px;
  height: 15px;
}

.automation-setting-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.automation-setting-head > div > span {
  color: var(--accent-hot);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.automation-setting-head strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 750 !important;
  line-height: 1.2;
}

.automation-setting-head small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.automation-setting-head .fresh-profile-switch {
  margin: 0 !important;
  pointer-events: auto !important;
}

.automation-setting-body {
  min-width: 0;
  margin-left: 41px;
  padding-top: 11px;
  border-top: 1px solid var(--app-line);
}

.automation-setting-body .autobet-target-field {
  grid-template-columns: minmax(110px, .55fr) minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
  margin: 0;
}

.autowithdraw-setting-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.autowithdraw-setting-body > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.autowithdraw-setting-body b {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 800;
}

.autowithdraw-setting-body small {
  color: var(--text-muted);
  font-size: 10px;
}

.automation-setting-section.is-locked .automation-setting-body {
  opacity: .44;
}

@media (max-width: 620px) {
  .automation-settings-stack { gap: 8px; padding: 8px 0; }
  .automation-setting-section { gap: 9px; padding: 11px; }
  .automation-setting-head.profile-smart-head { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 9px; }
  .automation-setting-icon { width: 28px; height: 28px; }
  .automation-setting-head small { white-space: normal; }
  .automation-setting-body { margin-left: 0; padding-top: 9px; }
  .automation-setting-body .autobet-target-field { grid-template-columns: 1fr; gap: 6px; }
  .autowithdraw-setting-body { align-items: stretch; flex-direction: column; }
  .autowithdraw-setting-body .fresh-profile-mini { width: 100%; }
}

.autowithdraw-verify-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--app-line);
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-field {
  min-width: 0;
  display: grid;
  gap: 6px;
  margin-top: 3px;
  cursor: text;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-field > span:first-child {
  color: var(--autobet-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-control {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--app-line-strong);
  border-radius: 9px;
  background: var(--app-control);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-control:focus-within {
  border-color: color-mix(in srgb, var(--ps-accent) 72%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ps-accent) 13%, transparent);
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-control input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ps-text);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-control input::-webkit-outer-spin-button,
.profile-settings-shell [data-pane="autobet"] .autobet-target-control input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-control input::placeholder {
  color: var(--autobet-muted);
  font-size: 12px;
  font-weight: 650;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-control b {
  color: var(--ps-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-locked {
  border-color: var(--ps-border);
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-locked .autobet-target-field {
  cursor: not-allowed;
  opacity: .42;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-locked .autobet-target-control {
  border-color: var(--app-line);
  background: color-mix(in srgb, var(--app-control) 68%, transparent);
  box-shadow: none;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-locked .autobet-target-control input,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-locked .autobet-target-control b {
  color: var(--text-muted);
  cursor: not-allowed;
}

.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-locked .fresh-profile-switch {
  opacity: .48;
  cursor: not-allowed;
}

.profile-settings-shell [data-pane="autobet"] .autobet-vitals {
  min-height: 64px;
  margin: 0;
  border-width: 1px 0 0;
  border-color: var(--autobet-line);
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell [data-pane="autobet"] .autobet-vitals article {
  min-height: 62px;
  background: transparent;
}

.profile-settings-shell [data-pane="autobet"] .profile-log-panel {
  margin: 0;
  padding: 13px 0 0;
  border-width: 1px 0 0;
  border-color: var(--autobet-line);
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell [data-pane="autobet"] .fresh-profile-log {
  min-height: 126px;
  max-height: 210px;
  margin-top: 9px;
  background: var(--ps-surface);
}

@media (max-width: 620px) {
  .profile-settings-shell [data-pane="autobet"] .autobet-heading {
    padding-bottom: 11px;
  }

  .profile-settings-shell [data-pane="autobet"] .profile-control-band {
    min-height: 58px;
    padding: 9px 12px;
  }

  .profile-settings-shell [data-pane="autobet"] #autobet-rule-seg {
    gap: 8px;
    padding: 8px 0;
  }

  .profile-settings-shell [data-pane="autobet"] .profile-choice-card {
    min-height: 36px;
  }

  .profile-settings-shell [data-pane="autobet"] .profile-input-band {
    min-height: 52px;
    padding: 8px 2px;
  }

  .profile-settings-shell [data-pane="autobet"] .profile-smart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px 0;
  }

  .profile-settings-shell [data-pane="autobet"] .profile-smart-card,
  .profile-settings-shell [data-pane="autobet"] .profile-smart-card:nth-child(1),
  .profile-settings-shell [data-pane="autobet"] .profile-smart-card:nth-child(2) {
    min-height: 86px;
    padding: 9px;
  }

  .profile-settings-shell [data-pane="autobet"] .profile-smart-card small {
    display: none;
  }

  .profile-settings-shell [data-pane="autobet"] .autobet-vitals,
  .profile-settings-shell [data-pane="autobet"] .autobet-vitals article {
    min-height: 50px;
  }

  .profile-settings-shell [data-pane="autobet"] .profile-log-panel {
    padding-top: 9px;
  }
}

@media (max-width: 767px) and (min-height: 720px) {
  .profile-settings-content:has([data-pane="autobet"].active) {
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .profile-settings-shell .fresh-profile-pane[data-pane="autobet"].active {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .profile-settings-shell [data-pane="autobet"] .profile-log-panel {
    margin-top: auto;
  }
}

/* Auto-bet usability overrides: the pane must always scroll and its signals stay calm and legible. */
.profile-settings-shell .profile-settings-content {
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.profile-settings-shell [data-pane="autobet"] .profile-choice-card svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  stroke-width: 2.2;
}

.profile-settings-shell [data-pane="autobet"] .automation-setting-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.profile-settings-shell [data-pane="autobet"] .automation-setting-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.profile-settings-shell [data-pane="autobet"] .automation-setting-head.profile-smart-head {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.profile-settings-shell [data-pane="autobet"] .automation-setting-body {
  margin-left: 47px;
}

.profile-settings-shell [data-pane="autobet"] .autobet-status-dot,
.profile-settings-shell [data-pane="autobet"] .autobet-status-dot.live {
  animation: none !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-hot) 10%, transparent), 0 0 7px color-mix(in srgb, var(--accent-hot) 42%, transparent) !important;
  transition: background-color .25s ease, box-shadow .25s ease;
}

@media (max-width: 620px) {
  .profile-settings-shell [data-pane="autobet"] .automation-setting-head.profile-smart-head {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .profile-settings-shell [data-pane="autobet"] .automation-setting-icon {
    width: 34px;
    height: 34px;
  }

  .profile-settings-shell [data-pane="autobet"] .automation-setting-body {
    margin-left: 0;
  }
}

/* Alerts tab uses the same spacious, divided settings language as Appearance. */
.profile-settings-shell [data-pane="alerts"] {
  --alerts-line: rgba(255,255,255,.09);
  --alerts-muted: #858585;
}

.profile-settings-shell [data-pane="alerts"] .alerts-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 18px;
  margin-bottom: 0;
}

.alerts-heading small,
.profile-settings-shell [data-pane="alerts"] .profile-sound-head small {
  display: block;
  color: var(--alerts-muted);
  font-size: 11px;
  line-height: 1.35;
}

.profile-settings-shell [data-pane="alerts"] .alert-band {
  min-height: 76px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 13px;
  margin: 0;
  padding: 16px 2px;
  border-width: 1px 0 0;
  border-color: var(--alerts-line);
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell [data-pane="alerts"] .alert-band b {
  color: var(--ps-text);
  font-size: 13px;
  font-weight: 850;
}

.profile-settings-shell [data-pane="alerts"] .alert-band small {
  margin-top: 4px;
  color: var(--alerts-muted);
  font-size: 11px;
}

.profile-settings-shell [data-pane="alerts"] .fresh-profile-hot-dot {
  width: 8px;
  height: 8px;
  background: var(--ps-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ps-accent) 12%, transparent);
}

.profile-settings-shell [data-pane="alerts"] .profile-sound-head {
  min-height: 68px;
  margin: 0;
  padding: 16px 0 12px;
  border-top: 1px solid var(--alerts-line);
}

.profile-settings-shell [data-pane="alerts"] .profile-sound-head b {
  font-size: 12px;
}

.profile-settings-shell [data-pane="alerts"] .profile-sound-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.profile-settings-shell [data-pane="alerts"] .profile-sound-grid button {
  position: relative;
  min-height: 52px;
  padding: 18px 8px 7px;
  border-radius: 10px;
  background: var(--ps-surface);
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}

.profile-settings-shell [data-pane="alerts"] .profile-sound-grid button::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 22px;
  height: 6px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent 0 5%, currentColor 5% 12%, transparent 12% 22%, currentColor 22% 33%, transparent 33% 44%, currentColor 44% 55%, transparent 55% 67%, currentColor 67% 76%, transparent 76% 88%, currentColor 88% 95%, transparent 95%);
  opacity: .42;
}

.profile-settings-shell [data-pane="alerts"] .profile-sound-grid button:hover {
  transform: translateY(-1px);
}

.profile-settings-shell [data-pane="alerts"] .profile-sound-grid button.active {
  color: var(--ps-accent);
  border-color: color-mix(in srgb, var(--ps-accent) 52%, transparent);
  background: color-mix(in srgb, var(--ps-accent) 9%, var(--ps-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ps-accent) 12%, transparent);
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 18px 0;
  border-width: 1px 0 0;
  border-color: var(--alerts-line);
  border-radius: 0;
  background: transparent;
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--ps-accent);
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band em {
  grid-column: 2;
  grid-row: 1;
  min-width: 45px;
  padding: 5px 8px;
  border: 1px solid var(--ps-border);
  border-radius: 7px;
  color: var(--ps-text);
  background: var(--ps-surface);
  text-align: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 620px) {
  .profile-settings-shell [data-pane="alerts"] .profile-sound-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
    margin-bottom: 10px;
  }

  .profile-settings-shell [data-pane="alerts"] .profile-sound-grid button {
    min-height: 38px;
    padding: 14px 6px 4px;
    border-radius: 8px;
    font-size: 11px;
  }

  .profile-settings-shell [data-pane="alerts"] .profile-sound-grid button::before {
    top: 7px;
    height: 5px;
  }

  .profile-settings-shell [data-pane="alerts"] .alerts-heading {
    padding-bottom: 12px;
  }

  .profile-settings-shell [data-pane="alerts"] .alert-band {
    min-height: 62px;
    padding: 10px 2px;
  }

  .profile-settings-shell [data-pane="alerts"] .profile-sound-head {
    min-height: 54px;
    padding: 10px 0 8px;
  }

  .profile-settings-shell [data-pane="alerts"] .profile-range-band {
    padding: 11px 0 8px;
    gap: 7px;
  }
}

@media (max-width: 767px) and (min-height: 720px) {
  .profile-settings-content:has([data-pane="alerts"].active) {
    overflow-y: hidden;
    overscroll-behavior: none;
  }

  .profile-settings-shell .fresh-profile-pane[data-pane="alerts"].active {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .profile-settings-shell [data-pane="alerts"] .profile-sound-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: repeat(5, minmax(38px, 1fr));
    align-content: stretch;
  }

  .profile-settings-shell [data-pane="alerts"] .profile-sound-grid button {
    height: 100%;
  }

  .profile-settings-shell [data-pane="alerts"] .profile-range-band {
    margin-top: 0;
    flex: 0 0 auto;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }
}

/* Final bridge for the newest profile rules (kept last intentionally). */
.profile-settings-shell {
  --ps-bg: var(--app-panel);
  --ps-panel: var(--app-panel);
  --ps-surface: var(--app-panel-2);
  --ps-hover: var(--app-hover);
  --ps-border: var(--app-line);
  --ps-border-strong: var(--app-line-strong);
  --ps-text: var(--text-primary);
  --ps-soft: var(--text-secondary);
  --ps-muted: var(--text-muted);
  --ps-accent: var(--accent-hot);
  background: var(--app-panel) !important;
  border-color: var(--app-line-strong) !important;
  color: var(--text-primary);
  box-shadow: 0 28px 80px var(--app-shadow) !important;
}

.profile-settings-layout,
.profile-settings-rail,
.profile-settings-main,
.profile-settings-content {
  background: var(--app-panel) !important;
  border-color: var(--app-line) !important;
  color: var(--text-primary);
}

.profile-settings-wallet,
.profile-settings-vitals,
.profile-settings-shell .fresh-profile-log,
.profile-settings-shell .profile-smart-card,
.profile-settings-shell .profile-input-band label,
.profile-settings-shell .fresh-profile-mini,
.profile-settings-shell .fresh-profile-tool,
.appearance-color-trigger,
.profile-settings-shell .profile-choice-card,
.profile-settings-shell .profile-sound-grid button,
.appearance-inline-segment button {
  background: var(--app-panel-2) !important;
  border-color: var(--app-line) !important;
  color: var(--text-primary);
}

.profile-settings-shell .fresh-profile-tab {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--text-secondary) !important;
}

.profile-settings-shell .fresh-profile-tab:hover {
  background: var(--app-hover) !important;
  border-color: var(--app-line) !important;
  color: var(--text-primary) !important;
}

.profile-settings-shell .fresh-profile-tab.active,
.profile-settings-shell .profile-choice-card.active,
.profile-settings-shell .profile-theme-card.active,
.profile-settings-shell .profile-sound-grid button.active,
.appearance-inline-segment button.active {
  color: var(--accent-hot) !important;
  border-color: var(--accent-hot-border) !important;
  background: var(--accent-hot-soft) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-hot) 12%, transparent) !important;
}

.profile-settings-shell .profile-info-grid,
.profile-settings-shell .profile-info-tile,
.profile-settings-shell .profile-control-band,
.profile-settings-shell .profile-input-band,
.profile-settings-shell .profile-range-band,
.profile-account-storage,
.profile-settings-shell .profile-action-band,
.profile-settings-shell .profile-log-panel,
.profile-settings-shell .profile-smart-grid,
.profile-settings-shell .profile-pane-title,
.profile-settings-account,
.profile-settings-shell .profile-settings-tabs {
  background: transparent !important;
  border-color: var(--app-line) !important;
}

.profile-settings-shell .fresh-profile-close,
.profile-settings-shell .fresh-profile-mark {
  background: var(--app-panel-2) !important;
  border-color: var(--app-line) !important;
  color: var(--accent-hot) !important;
}

.profile-settings-wallet strong,
.profile-settings-account h2,
.profile-pane-title strong,
.profile-info-tile strong,
.profile-smart-card strong,
.profile-control-band b,
.profile-input-band b,
.profile-action-band b,
.profile-account-storage b {
  color: var(--text-primary) !important;
}

.profile-settings-shell .fresh-profile-switch[aria-checked="true"],
.profile-settings-shell .autobet-status-dot,
.profile-settings-shell .fresh-profile-hot-dot {
  background: var(--accent-hot) !important;
  border-color: var(--accent-hot-border) !important;
  box-shadow: 0 0 10px var(--accent-glow) !important;
}

.profile-settings-shell #profile-row-feed,
.profile-settings-shell .profile-smart-head,
.profile-settings-wallet small {
  color: var(--accent-hot) !important;
}

/* Theme completeness: remove the last legacy literal-black component fills. */
.odds-wrapper,
.timeline-container { border-color: var(--app-line); }

.odds-val,
.odds-other-count,
.odds-chip-mkt,
.awaiting-score,
.awaiting-count,
.logger-count,
.match-meta-chip,
.profile-future-input,
.profile-settings-shell .autobet-input {
  background: var(--app-control) !important;
  border-color: var(--app-line-strong) !important;
}

.profile-settings-shell .fresh-profile-switch {
  background: var(--app-control) !important;
  border-color: var(--app-line-strong) !important;
}

.profile-settings-shell .fresh-profile-switch span {
  background: var(--text-muted) !important;
  box-shadow: 0 1px 3px var(--app-shadow);
}

.profile-settings-shell .fresh-profile-switch[aria-checked="true"] {
  background: var(--accent-hot) !important;
}

.profile-settings-shell .fresh-profile-switch[aria-checked="true"] span {
  background: #fff !important;
}

.profile-danger-action {
  border-color: color-mix(in srgb, var(--ps-danger) 34%, var(--app-line)) !important;
  background: color-mix(in srgb, var(--ps-danger) 8%, var(--app-panel)) !important;
}

.profile-danger-action:hover {
  border-color: color-mix(in srgb, var(--ps-danger) 55%, var(--app-line)) !important;
  background: color-mix(in srgb, var(--ps-danger) 13%, var(--app-panel)) !important;
}

html[data-theme="light"] .odds-val,
html[data-theme="light"] .odds-chip-mkt .chip-odd { color: #08783f; }

html[data-theme="light"] .match-card,
html[data-theme="light"] .profile-settings-shell,
html[data-theme="light"] .awaiting-modal-panel,
html[data-theme="light"] .logger-modal-panel {
  box-shadow: 0 18px 48px rgba(25,35,48,.14) !important;
}

/* Accent interactions must never fall back to the legacy amber hover color. */
@media (hover: hover) and (pointer: fine) {
  .queue-toggle-btn.has-queue:hover {
    color: var(--accent-hot) !important;
    border-color: var(--accent-hot-border) !important;
    background: var(--accent-hot-soft) !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-hot) 14%, transparent), 0 0 16px var(--accent-glow) !important;
  }

  .awaiting-row:hover {
    border-color: var(--accent-hot-border) !important;
    background: color-mix(in srgb, var(--app-panel-3) 88%, var(--accent-hot) 12%) !important;
  }
}

.queue-toggle-btn.has-queue {
  box-shadow: inset 0 1px 0 var(--app-inset), 0 0 12px var(--accent-glow) !important;
}

.queue-toggle-btn.has-queue .queue-badge {
  background: color-mix(in srgb, var(--accent-hot) 82%, white) !important;
  box-shadow: 0 0 8px var(--accent-glow) !important;
}

/* Keep the empty dashboard state subdued. */
.no-matches-placeholder {
  color: var(--text-secondary);
}

/* One authoritative surface for all three header controls. ID scope prevents
   open/active/hover state rules from giving Profile a different fill. */
#nav-logs,
#awaiting-toggle-btn,
#profile-toggle-btn,
#nav-logs:hover,
#awaiting-toggle-btn:hover,
#profile-toggle-btn:hover {
  background: radial-gradient(circle at 50% 35%, var(--app-control), var(--app-panel-2) 72%, var(--app-panel) 100%) !important;
}

.appearance-color-trigger.active {
  border-color: var(--accent-hot-border) !important;
  box-shadow: 0 0 0 2px var(--accent-hot-soft) !important;
}

/* Preserve the original pure-black wells in Dark/System-dark mode. */
html[data-theme="dark"] .match-card,
html[data-theme="dark"] .awaiting-modal-panel,
html[data-theme="dark"] .logger-modal-panel,
html[data-theme="dark"] .awaiting-list,
html[data-theme="dark"] .logger-terminal,
html[data-theme="dark"] .event-log,
html[data-theme="dark"] .match-score,
html[data-theme="dark"] .odds-val,
html[data-theme="dark"] .odds-other-count,
html[data-theme="dark"] .odds-chip-mkt,
html[data-theme="dark"] .profile-future-input,
html[data-theme="dark"] .profile-settings-shell .autobet-input {
  background: #000000 !important;
}

/* The stake amount is one compound control; its numeric input must not paint a
   second dark rectangle over the label background. */
html[data-theme="dark"] .profile-settings-shell .profile-input-band .autobet-input,
.profile-settings-shell .profile-input-band .autobet-input {
  background: transparent !important;
}

/* Light-theme polish for the remaining native/legacy surfaces. */
.log-telemetry,
.log-odds-strip {
  background: var(--app-panel-2) !important;
  border-color: var(--app-line) !important;
}

.logs-modal-panel .logger-row .log-telemetry {
  background: var(--app-panel-2) !important;
}

.logs-modal-panel .logger-row .log-telemetry .tel-box {
  background: transparent !important;
}

/* System logs — light theme
   The legacy logger was designed as a black terminal and previously forced its
   telemetry well to black after the app-wide theme layer. Give the light theme
   a deliberate, paper-like hierarchy while leaving the dark terminal intact. */
html[data-theme="light"] .logs-modal-overlay {
  background: rgba(42, 52, 64, 0.38);
  backdrop-filter: blur(7px) saturate(.82);
  -webkit-backdrop-filter: blur(7px) saturate(.82);
}

html[data-theme="light"] .logs-modal-panel {
  background: #ffffff;
  border-color: rgba(20, 28, 38, .16);
  box-shadow:
    0 28px 70px rgba(24, 34, 48, .22),
    0 2px 8px rgba(24, 34, 48, .08),
    inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

html[data-theme="light"] .logs-modal-panel .logger-header {
  background: #ffffff;
  border-bottom-color: rgba(20, 28, 38, .11);
}

html[data-theme="light"] .logs-modal-panel .logger-status-dot.is-active {
  box-shadow: 0 0 0 4px rgba(255, 59, 48, .09), 0 0 9px rgba(255, 59, 48, .42);
}

html[data-theme="light"] .logs-modal-panel .logger-count,
html[data-theme="light"] .logs-modal-panel .logs-export-btn,
html[data-theme="light"] .logs-modal-panel .awaiting-close-btn {
  background: #f2f5f7 !important;
  border-color: rgba(20, 28, 38, .14) !important;
  color: #596574;
  box-shadow: inset 0 1px 0 #ffffff;
}

html[data-theme="light"] .logs-modal-panel .logger-terminal {
  background: #f3f6f8 !important;
  scrollbar-color: rgba(20, 28, 38, .22) transparent;
}

html[data-theme="light"] .logs-modal-panel .logger-row,
html[data-theme="light"] .logs-modal-panel .logger-row:hover {
  background: #ffffff !important;
  border-color: rgba(20, 28, 38, .14) !important;
  box-shadow: 0 1px 2px rgba(24, 34, 48, .04);
}

html[data-theme="light"] .logs-modal-panel .logger-row:hover {
  border-color: rgba(20, 28, 38, .24) !important;
  box-shadow: 0 5px 16px rgba(24, 34, 48, .07);
}

html[data-theme="light"] .logs-modal-panel .log-telemetry,
html[data-theme="light"] .logs-modal-panel .log-odds-strip {
  background: #f3f6f8 !important;
  border-color: rgba(20, 28, 38, .12) !important;
  box-shadow: inset 0 1px 2px rgba(24, 34, 48, .035);
}

html[data-theme="light"] .logs-modal-panel .tel-box {
  border-color: rgba(20, 28, 38, .12);
}

html[data-theme="light"] .logs-modal-panel .tel-lbl,
html[data-theme="light"] .logs-modal-panel .reason-title,
html[data-theme="light"] .logs-modal-panel .expiry-label {
  color: #7a8592;
}

html[data-theme="light"] .logs-modal-panel .tel-val.tel-score {
  color: #18202a;
}

html[data-theme="light"] .logs-modal-panel .log-reason {
  color: #596574;
}

html[data-theme="light"] .logs-modal-panel .log-tag.tag-sys-ft {
  color: #08783f;
  background: rgba(16, 185, 129, .09);
  border-color: rgba(5, 150, 105, .25);
}

html[data-theme="dark"] .logs-modal-panel .logger-row .log-telemetry {
  background: #000000 !important;
}

.profile-settings-shell [data-pane="account"] .profile-info-tile strong[data-tone="good"] { color: var(--ps-good); }
.profile-settings-shell [data-pane="account"] .profile-info-tile strong[data-tone="accent"] { color: var(--ps-accent); }
.profile-settings-shell [data-pane="account"] .profile-info-tile strong[data-tone="danger"] { color: var(--ps-danger); }

.event-log {
  box-sizing: border-box;
  overflow-x: hidden;
  color-scheme: inherit;
}

.profile-settings-wallet {
  background: var(--app-panel) !important;
  border-color: var(--app-line) !important;
}

.profile-settings-shell [data-pane="appearance"] .profile-theme-card,
.profile-settings-shell [data-pane="appearance"] .profile-theme-card.active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band input[type="range"] {
  height: 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid var(--app-line-strong);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-hot) 0 var(--range-fill, 50%), var(--app-control) var(--range-fill, 50%) 100%);
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--accent-hot);
  box-shadow: 0 0 0 2px var(--app-panel);
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: var(--app-control);
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--accent-hot);
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-hot);
}

/* Restore the match-card silhouette without clipping its external tooltips. */
.match-card {
  border-radius: 12px !important;
  border-color: var(--app-line) !important;
  background-clip: padding-box;
}

.match-card.no-goal-entry-active {
  border-color: var(--accent-hot-border) !important;
}

.match-card .odds-combined,
.match-card .odds-val,
.match-card .odds-other-count,
.match-card .odds-chip-mkt,
.match-card .event-log,
.match-card .timeline-period-header,
.match-card .timeline-empty-period,
.match-card .timeline-row-compact {
  border-color: var(--app-line) !important;
}

.match-card :is(.odds-val, .odds-chip-mkt) {
  border: 1px solid color-mix(in srgb, var(--text-primary) 9%, transparent) !important;
}

.match-card > .card-header {
  border-radius: 11px 11px 0 0;
  background-clip: padding-box;
}

/* Profile opening must not reflow or animate the text geometry. */
.profile-settings-shell,
.fresh-profile-overlay.is-open .profile-settings-shell {
  transform: none !important;
}

.profile-settings-shell {
  transition: opacity 160ms ease !important;
}

.profile-settings-shell [data-pane="account"] {
  --account-line: var(--app-line);
  --account-muted: var(--text-muted);
}

.profile-account-storage {
  border-top: 1px solid var(--account-line) !important;
  border-bottom: 1px solid var(--account-line) !important;
}

html[data-theme="dark"] .awaiting-row {
  background: #000000 !important;
}

html[data-theme="dark"] .odds-combined,
html[data-theme="dark"] .timeline-period-header,
html[data-theme="dark"] .timeline-empty-period,
html[data-theme="dark"] .timeline-row-compact {
  background: #000000 !important;
}

html[data-theme="light"] .tl-icon .event-icon-disc > circle {
  fill: #ffffff !important;
}

/* Keep these interaction fixes after every profile theme bridge. */
.profile-settings-shell .profile-settings-content {
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.profile-settings-shell [data-pane="autobet"] .profile-choice-card svg {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px;
}

.profile-settings-shell [data-pane="autobet"] .automation-setting-icon {
  width: 36px;
  height: 36px;
}

.profile-settings-shell [data-pane="autobet"] .automation-setting-icon svg {
  width: 19px;
  height: 19px;
}

.profile-settings-shell [data-pane="autobet"] .autobet-status-dot,
.profile-settings-shell [data-pane="autobet"] .autobet-status-dot.live {
  animation: none !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-hot) 9%, transparent), 0 0 6px color-mix(in srgb, var(--accent-hot) 34%, transparent) !important;
}

@media (hover: hover) and (pointer: fine) {
  .awaiting-row:hover,
  .logger-row:hover {
    border-color: var(--app-line-strong) !important;
    background: var(--app-panel-3) !important;
  }

  html[data-theme="dark"] .awaiting-row:hover,
  html[data-theme="dark"] .logger-row:hover {
    background: #000000 !important;
  }
}

/* Profile modal refinement: give the identity mark more presence while keeping
   the information hierarchy, but ease back the overly heavy display weights. */
.profile-settings-shell .fresh-profile-mark svg {
  width: 30px !important;
  height: 30px !important;
}

.profile-settings-shell .profile-settings-account h2,
.profile-settings-shell .profile-pane-title strong,
.profile-settings-shell .profile-settings-wallet strong,
.profile-settings-shell .profile-smart-card strong {
  font-weight: 600 !important;
}

.profile-settings-shell .profile-info-tile strong,
.profile-settings-shell .profile-control-band b,
.profile-settings-shell .profile-input-band b,
.profile-settings-shell .profile-action-band b,
.profile-settings-shell .profile-range-band b,
.profile-settings-shell .profile-account-storage b,
.profile-settings-shell .profile-sound-head b,
.profile-settings-shell .appearance-section-copy b {
  font-weight: 600 !important;
}

/* Keep the live queue alert control on the same compact 44px row as the
   Disconnect profile action. */
.profile-settings-shell [data-pane="alerts"] .alert-band {
  min-height: 44px;
  padding: 7px 2px;
}

/* Left-rail Live / Queue / Alerts strip matches the 44px Disconnect action. */
.profile-settings-shell .profile-settings-vitals {
  min-height: 44px;
}

.profile-settings-shell .profile-settings-vitals article {
  min-height: 42px;
  padding-block: 3px;
}

/* Prevent the native range accent from bleeding through as an amber end-cap. */
.profile-settings-shell [data-pane="alerts"] .profile-range-band input[type="range"] {
  accent-color: auto;
}

.profile-settings-shell [data-pane="alerts"] .profile-range-band input[type="range"]::-webkit-slider-runnable-track {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--app-line-strong);
  background: linear-gradient(90deg, var(--accent-hot) 0 var(--range-fill, 50%), var(--app-control) var(--range-fill, 50%) 100%) padding-box;
}

/* Awaiting count uses the same dark 2px badge ring as the System Logs count. */
.queue-badge,
.queue-toggle-btn.has-queue .queue-badge {
  border: 2px solid #000000 !important;
}

/* Security profile pane */
.profile-settings-shell .security-pane {
  gap: 18px;
}

.security-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.security-status-grid article {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-panel-2);
}

.security-status-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-hot-border);
  border-radius: 10px;
  color: var(--accent-hot);
  background: var(--accent-hot-soft);
}

.security-status-icon svg {
  width: 19px;
  height: 19px;
}

.security-status-grid article div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.security-status-grid small,
.security-status-grid em,
.security-section small,
.security-section p,
.security-actions small {
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
}

.security-status-grid b,
.security-section b,
.security-actions b {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 650;
}

.security-status-grid em {
  color: var(--text-secondary);
}

.security-section {
  padding: 14px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-panel-2);
}

.security-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.security-section-title > div {
  display: grid;
  gap: 4px;
}

.security-section-title > span {
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--ps-good) 35%, var(--app-line));
  border-radius: 999px;
  color: var(--ps-good);
  background: color-mix(in srgb, var(--ps-good) 8%, transparent);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.security-guidance article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--app-line);
}

.security-guidance article > i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-line-strong);
  border-radius: 9px;
  color: var(--accent-hot);
  background: var(--accent-hot-soft);
  font-style: normal;
}

.security-guidance article > i svg {
  width: 16px;
  height: 16px;
}

.security-guidance article > div {
  display: grid;
  gap: 2px;
}

.security-guidance article > span {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.security-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.security-actions > button {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--app-panel-2);
  text-align: left;
  cursor: pointer;
}

.security-actions > button > i {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-line-strong);
  border-radius: 10px;
  color: var(--text-secondary);
  background: var(--app-control);
}

.security-actions > button > i svg {
  width: 18px;
  height: 18px;
}

.security-actions > button span {
  display: grid;
  gap: 3px;
}

.security-actions > button em {
  color: var(--text-secondary);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.security-actions > button:hover {
  border-color: var(--app-line-strong);
  background: var(--app-hover);
}

@media (max-width: 620px) {
  .security-status-grid,
  .security-actions {
    grid-template-columns: 1fr;
  }

}

/* Final Security alignment with the shared profile-pane system. */
.profile-settings-shell .security-pane {
  gap: 0;
}

.profile-settings-shell .security-guidance-list article {
  padding: 10px 12px;
}

.profile-settings-shell .security-guidance-list article:first-child {
  border-top: 0;
}

/* Last-rule guarantee: the Balance Target heartbeat remains static in every state. */
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card .automation-setting-icon svg path,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg,
.profile-settings-shell [data-pane="autobet"] .autobet-target-card.is-active .automation-setting-icon svg path {
  animation:none !important;
  filter:none !important;
  transform:none !important;
}

/* Final Auto-Bet motion budget: only the timeline particle stays animated. */
.profile-settings-shell [data-pane="autobet"] .safety-core-live{animation:none!important;transform:none!important;will-change:auto!important}
.profile-settings-shell [data-pane="autobet"] .safety-core-pulse{display:none!important;animation:none!important;will-change:auto!important}
.profile-settings-shell [data-pane="autobet"] #autobet-status.is-live .autobet-status-dot,
.profile-settings-shell [data-pane="autobet"] .autobet-status-dot.live{animation:none!important;transform:none!important;box-shadow:none!important;will-change:auto!important}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle{animation:safetyParticleLite 2.4s ease-in-out infinite!important;filter:none!important;will-change:transform,opacity}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle-mobile{animation:safetyParticleMobileLite 2.4s ease-in-out infinite!important;filter:none!important;will-change:transform,opacity}

/* Final dark Alerts surface guarantee. */
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel,
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel > header,
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list label{background:#000!important;background-image:none!important}
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel::before{display:none!important;content:none!important;background:none!important}
html[data-theme="dark"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list label:hover{background:#050505!important}

/* Safety Engine identity: static shield badge replaces the old animated ring. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-badge{
  width:38px;height:38px;display:grid;place-items:center;box-sizing:border-box;
  border:1px solid color-mix(in srgb,var(--ps-accent) 45%,var(--app-line));
  border-radius:11px;color:var(--ps-accent);background:color-mix(in srgb,var(--ps-accent) 9%,#000);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ps-accent) 7%,transparent);
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-badge svg{width:19px!important;height:19px!important;stroke-width:2.2;animation:none!important;filter:none!important}
@media(max-width:620px){.profile-settings-shell [data-pane="autobet"] .safety-engine-badge{width:38px;height:38px;grid-column:1;grid-row:1}}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-engine-badge{background:#fff8e9;border-color:#dfbd76;box-shadow:inset 0 0 0 1px #fff}

/* Checkpoint motion: travel, wait at the middle station, then continue. */
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle{animation:safetyParticleStation 3.2s linear infinite!important}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle-mobile{animation:safetyParticleMobileStation 3.2s linear infinite!important}
@keyframes safetyParticleStation{
  0%{transform:translate3d(0,0,0);opacity:0}
  8%{opacity:1}
  36%{transform:translate3d(58px,0,0);opacity:1}
  56%{transform:translate3d(58px,0,0);opacity:1}
  88%{transform:translate3d(116px,0,0);opacity:1}
  96%{transform:translate3d(116px,0,0);opacity:1}
  100%{transform:translate3d(116px,0,0);opacity:0}
}
@keyframes safetyParticleMobileStation{
  0%{transform:translate3d(0,0,0);opacity:0}
  8%{opacity:1}
  36%{transform:translate3d(133px,0,0);opacity:1}
  56%{transform:translate3d(133px,0,0);opacity:1}
  88%{transform:translate3d(266px,0,0);opacity:1}
  96%{transform:translate3d(266px,0,0);opacity:1}
  100%{transform:translate3d(266px,0,0);opacity:0}
}
/* JS owns the repeatable open/close transition; suppress legacy one-shot rules. */
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail,
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-detail article,
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state{animation:none!important}

/* New profile components inherit the user-selected accent. */
.profile-settings-shell [data-pane="account"] .account-signal-nodes article.is-active{
  color:var(--ps-accent)!important;
  border-color:color-mix(in srgb,var(--ps-accent) 48%,var(--app-line))!important;
  background:color-mix(in srgb,var(--ps-accent) 5%,#000)!important;
}
.profile-settings-shell [data-pane="account"] .account-signal-map::before{
  background:radial-gradient(circle,color-mix(in srgb,var(--ps-accent) 10%,transparent),transparent 68%)!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-flow circle:not(.safety-flow-particle),
.profile-settings-shell [data-pane="autobet"] .safety-engine-flow-mobile circle:not(.safety-flow-particle-mobile){
  stroke:var(--ps-accent)!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle,
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle-mobile{fill:var(--ps-accent)!important}
.profile-settings-shell [data-pane="alerts"] .notification-preference-panel header em{
  color:var(--ps-accent)!important;
  border-color:color-mix(in srgb,var(--ps-accent) 38%,var(--app-line))!important;
  background:color-mix(in srgb,var(--ps-accent) 9%,#000)!important;
}
.profile-settings-shell [data-pane="alerts"] .notification-radar,
.profile-settings-shell [data-pane="alerts"] .notification-radar::before{
  border-color:color-mix(in srgb,var(--ps-accent) 55%,var(--app-line))!important;
}
.profile-settings-shell [data-pane="alerts"] .notification-radar::after,
.profile-settings-shell [data-pane="alerts"] .notification-radar i{background:var(--ps-accent)!important}
.profile-settings-shell [data-pane="alerts"] .notification-radar::after{box-shadow:0 0 7px color-mix(in srgb,var(--ps-accent) 68%,transparent)!important}
.profile-settings-shell [data-pane="alerts"] .notification-choice-icon{
  color:var(--ps-accent)!important;
  border-color:color-mix(in srgb,var(--ps-accent) 35%,var(--app-line))!important;
  background:color-mix(in srgb,var(--ps-accent) 8%,#000)!important;
}
.profile-settings-shell [data-pane="alerts"] .notification-choice-list input:checked{
  border-color:var(--ps-accent)!important;background:var(--ps-accent)!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="account"] .account-signal-nodes article.is-active,
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-engine-badge,
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-choice-icon{
  color:var(--ps-accent)!important;
  border-color:color-mix(in srgb,var(--ps-accent) 40%,#dfe3e8)!important;
  background:color-mix(in srgb,var(--ps-accent) 8%,#fff)!important;
}

/* Safety circuit: SVG-native validation route with checkpoint dwell. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-flow,
.profile-settings-shell [data-pane="autobet"] .safety-engine-flow-mobile{height:34px!important;overflow:visible!important}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-rail{
  fill:none!important;stroke:color-mix(in srgb,var(--ps-accent) 66%,var(--app-line))!important;
  stroke-width:1.6!important;stroke-linecap:round;stroke-dasharray:3 3;
}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-ghost{
  fill:none!important;stroke:color-mix(in srgb,var(--ps-accent) 18%,var(--app-line))!important;
  stroke-width:1!important;stroke-linecap:round;
}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-gate rect{
  fill:var(--app-panel)!important;stroke:var(--ps-accent)!important;stroke-width:1.5!important;
  transform-box:fill-box;transform-origin:center;transform:rotate(45deg);
}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-packet{color:var(--ps-accent)}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-packet>circle:not(.safety-packet-halo){fill:var(--ps-accent)!important;stroke:none!important}
.profile-settings-shell [data-pane="autobet"] .safety-packet-halo{
  fill:color-mix(in srgb,var(--ps-accent) 18%,transparent)!important;
  stroke:color-mix(in srgb,var(--ps-accent) 50%,transparent)!important;stroke-width:1!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle,
.profile-settings-shell [data-pane="autobet"] .safety-flow-particle-mobile{display:none!important;animation:none!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-state{color:var(--ps-accent)!important;letter-spacing:.08em}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{height:26px!important}
}
@media(prefers-reduced-motion:reduce){
  .profile-settings-shell [data-pane="autobet"] .safety-circuit-packet animateMotion{display:none}
}

/* Safety console composition: straight staged timeline with live rule telemetry. */
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine{
  border-color:color-mix(in srgb,var(--ps-accent) 18%,var(--app-line))!important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--ps-accent) 4%,#000),#000 48%)!important;
}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{position:relative}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary::after{
  content:"";position:absolute;left:12px;right:12px;bottom:0;height:1px;
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--ps-accent) 32%,transparent),transparent);
}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-progress{
  fill:none!important;stroke:color-mix(in srgb,var(--ps-accent) 42%,transparent)!important;
  stroke-width:2!important;stroke-dasharray:2 16;stroke-linecap:round;
}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-gate circle{
  fill:var(--app-panel)!important;stroke:color-mix(in srgb,var(--ps-accent) 72%,var(--app-line))!important;stroke-width:1.4!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-core circle{fill:var(--ps-accent)!important;stroke:none!important}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-labels text{
  fill:var(--text-muted)!important;stroke:none!important;font-size:5.5px;font-weight:700;letter-spacing:.02em;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-state{
  min-width:58px;display:grid!important;justify-items:end;gap:1px;padding:5px 7px!important;
  border:1px solid color-mix(in srgb,var(--ps-accent) 32%,var(--app-line));border-radius:8px;
  background:color-mix(in srgb,var(--ps-accent) 7%,#000);
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-state b{font-size:10px;line-height:1;color:var(--ps-accent)}
.profile-settings-shell [data-pane="autobet"] .safety-engine-state small{font-size:6px;line-height:1;color:var(--text-muted);letter-spacing:.12em}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine{background:linear-gradient(135deg,color-mix(in srgb,var(--ps-accent) 5%,#fff),#fff 52%)!important}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-engine-state{background:color-mix(in srgb,var(--ps-accent) 7%,#fff)}

/* Give the rule timeline visual priority in the Safety Engine header. */
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
  min-height:82px!important;
  grid-template-columns:40px minmax(132px,.8fr) minmax(190px,1.45fr) 72px 18px!important;
  gap:12px!important;
  padding:12px 14px!important;
}
.profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
  width:100%!important;height:42px!important;min-width:190px!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-circuit-labels text{font-size:7px!important}
.profile-settings-shell [data-pane="account"] .account-signal-map{margin-bottom:12px!important}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    min-height:104px!important;
    grid-template-columns:40px minmax(0,1fr) 72px 18px!important;
    grid-template-rows:44px 42px!important;
    gap:4px 9px!important;
    padding:10px 12px!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{
    grid-column:1/5!important;grid-row:2!important;width:100%!important;height:40px!important;min-width:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{grid-column:2!important;grid-row:1!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{grid-column:3!important;grid-row:1!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-chevron{grid-column:4!important;grid-row:1!important}
}

/* Final light-theme bridge for Account Link and Notification Center. */
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel,
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel>header{
  background:#fff!important;background-image:none!important;border-color:#d9dde3!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel::before{display:none!important;content:none!important}
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list{background:#dfe3e8!important}
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list label{
  background:#fbfcfd!important;color:#181c22!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list label:hover{background:color-mix(in srgb,var(--ps-accent) 6%,#fff)!important}
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list label b{color:#181c22!important}
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-choice-list label small{color:#697383!important}
html[data-theme="light"] .profile-settings-shell [data-pane="alerts"] .notification-preference-panel header em{
  color:var(--ps-accent)!important;background:color-mix(in srgb,var(--ps-accent) 8%,#fff)!important;
  border-color:color-mix(in srgb,var(--ps-accent) 38%,#d9dde3)!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="account"] .account-signal-map.is-live>header em{
  color:#147a47!important;background:#edf9f2!important;border-color:#a9dcc0!important;box-shadow:none!important;
}

/* Expand affordance and diagnostic rule cards. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-state{min-width:84px!important;justify-items:center!important;padding:7px 8px!important;cursor:pointer;transition:border-color .16s ease,background-color .16s ease!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-state b{font-size:8px!important;white-space:nowrap}
.profile-settings-shell [data-pane="autobet"] .safety-engine-state small{font-size:5.5px!important;white-space:nowrap}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine summary:hover .safety-engine-state{border-color:var(--ps-accent)!important;background:color-mix(in srgb,var(--ps-accent) 13%,#000)!important}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b{font-size:0!important}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b::after{content:"HIDE RULES";font-size:8px}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small{font-size:0!important}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{content:"CLICK TO COLLAPSE";font-size:5.5px}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{display:flex!important;flex-direction:column;align-items:stretch!important;gap:10px!important;padding:13px!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header{display:grid!important;grid-template-columns:27px minmax(0,1fr) auto!important;width:100%}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header em{color:#3ed487!important;background:color-mix(in srgb,#31c978 10%,transparent)!important;border:1px solid color-mix(in srgb,#31c978 28%,transparent);padding:4px 6px!important;border-radius:999px!important;font-size:7px!important;font-weight:850}
.profile-settings-shell [data-pane="autobet"] .safety-stage-meter{display:flex;gap:3px;width:100%;height:3px}
.profile-settings-shell [data-pane="autobet"] .safety-stage-meter i{flex:1;border-radius:99px;background:var(--ps-accent);opacity:.9}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px!important;width:100%}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span{position:relative;padding:7px 7px 7px 23px!important;border-radius:7px!important;white-space:normal!important;background:color-mix(in srgb,var(--ps-accent) 4%,var(--app-panel))!important}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span::before{content:"✓";position:absolute;left:7px;top:50%;transform:translateY(-50%);width:11px;height:11px;display:grid;place-items:center;border-radius:50%;color:#08130d;background:#31c978;font-size:7px;font-weight:950}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="execution"] .safety-chip-row{grid-template-columns:1fr}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine summary:hover .safety-engine-state{background:color-mix(in srgb,var(--ps-accent) 10%,#fff)!important}
@media(max-width:620px){.profile-settings-shell [data-pane="autobet"] .safety-engine-state{min-width:70px!important;padding:6px!important}.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{padding:11px!important}}

/* Remaining light-theme dashboard surfaces. */
html[data-theme="light"] .queue-toggle-btn{border-color:var(--accent-hot)!important;color:var(--accent-hot)!important;background:#fff!important;box-shadow:0 3px 10px rgba(20,28,38,.12)!important}
html[data-theme="light"] .queue-toggle-btn .hourglass .hg-frame{stroke:#171a1f!important}
/* An empty awaiting queue is an idle navigation control, not an active accent
   state. Match the Logs/Profile silhouette and keep the complete hourglass
   neutral until `has-queue` is applied. */
html[data-theme="light"] .queue-toggle-btn:not(.has-queue){
  color:var(--text-secondary)!important;
  border-color:var(--app-line-strong)!important;
  background:radial-gradient(circle at 50% 35%,var(--app-control),var(--app-panel-2) 72%,var(--app-panel) 100%)!important;
  box-shadow:inset 0 1px 0 var(--app-inset),0 3px 10px var(--app-shadow)!important;
}
html[data-theme="light"] .queue-toggle-btn:not(.has-queue) .hourglass .hg-frame{
  stroke:currentColor!important;
}
html[data-theme="light"] .tl-icon .event-icon-penalty>circle,
html[data-theme="light"] .tl-icon .event-icon-penalty>polygon,
html[data-theme="light"] .tl-icon .event-icon-penalty>rect{fill:#fff!important}
html[data-theme="light"] .tl-icon .event-icon-penalty>text{fill:#17202a!important}
html[data-theme="light"] .odds-suspend{color:#596474!important;background:#f5f7f9!important;border-color:#cbd2da!important;box-shadow:0 1px 2px rgba(25,35,48,.06)!important}

/* Safety timeline light-theme bridge. */
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-circuit-rail{
  stroke:#aeb8c5!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-circuit-gate circle{
  fill:#fff!important;stroke:var(--ps-accent)!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-circuit-core circle,
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-circuit-packet>circle:not(.safety-packet-halo){
  fill:var(--ps-accent)!important;stroke:none!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-packet-halo{
  fill:color-mix(in srgb,var(--ps-accent) 14%,transparent)!important;
  stroke:color-mix(in srgb,var(--ps-accent) 52%,transparent)!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-circuit-labels text{
  fill:#718096!important;stroke:none!important;
}

/* Safety inspection lanes: compact telemetry, not checkbox cards. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail{
  gap:10px!important;padding:12px!important;background:transparent!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{
  position:relative!important;min-height:240px!important;overflow:hidden!important;padding:16px 14px 14px!important;
  border:1px solid color-mix(in srgb,var(--ps-accent) 18%,var(--app-line))!important;border-radius:13px!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--ps-accent) 7%,var(--app-panel)) 0,var(--app-panel) 42%)!important;
  box-shadow:inset 0 1px color-mix(in srgb,#fff 4%,transparent)!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article::before{
  content:""!important;position:absolute!important;left:0!important;top:0!important;bottom:0!important;width:3px!important;height:auto!important;
  background:linear-gradient(180deg,var(--ps-accent),color-mix(in srgb,var(--ps-accent) 16%,transparent))!important;opacity:1!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article::after{
  content:attr(data-stage)!important;position:absolute!important;right:-4px!important;bottom:-15px!important;width:auto!important;height:auto!important;
  color:color-mix(in srgb,var(--ps-accent) 7%,transparent)!important;background:none!important;filter:none!important;
  font-size:42px!important;font-weight:950!important;line-height:1!important;text-transform:uppercase!important;letter-spacing:-.06em!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header{
  position:relative;z-index:1;grid-template-columns:31px minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-group-icon{
  width:29px!important;height:29px!important;border:1px solid color-mix(in srgb,var(--ps-accent) 30%,transparent)!important;
  border-radius:9px!important;color:var(--ps-accent)!important;background:color-mix(in srgb,var(--ps-accent) 10%,transparent)!important;font-size:8px!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header b{
  font-size:11px!important;line-height:1.15!important;white-space:nowrap!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header em{
  color:var(--ps-accent)!important;background:color-mix(in srgb,var(--ps-accent) 9%,transparent)!important;
  border-color:color-mix(in srgb,var(--ps-accent) 26%,transparent)!important;font-size:6.5px!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-stage-meter{position:relative;z-index:1;height:2px!important;gap:2px!important;margin:1px 0 2px}
.profile-settings-shell [data-pane="autobet"] .safety-stage-meter i{background:var(--ps-accent)!important;border-radius:0!important}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row{
  position:relative;z-index:1;display:flex!important;flex-direction:column!important;gap:0!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span{
  min-height:30px;display:flex!important;align-items:center!important;padding:6px 24px 6px 2px!important;
  border:0!important;border-bottom:1px solid var(--app-line)!important;border-radius:0!important;
  color:var(--text-secondary)!important;background:transparent!important;font-size:9px!important;line-height:1.2!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span:last-child{border-bottom:0!important}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span::before{display:none!important}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span::after{
  content:"✓";position:absolute;right:2px;width:15px;height:15px;display:grid;place-items:center;
  border:1px solid color-mix(in srgb,var(--ps-accent) 38%,transparent);border-radius:50%;
  color:var(--ps-accent);background:color-mix(in srgb,var(--ps-accent) 8%,transparent);font-size:8px;font-weight:900;
}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{
  background:linear-gradient(180deg,color-mix(in srgb,var(--ps-accent) 7%,#fff),#fff 42%)!important;
  box-shadow:0 8px 22px rgba(35,48,65,.055)!important;
}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-chip-row span{color:#4e5968!important;border-color:#e3e7ec!important}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{min-height:0!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header b{white-space:normal!important}
}

/* Safety diagnostics deck: visual gauges lead, rule text supports. */
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{
  min-height:300px!important;padding:14px!important;border-color:color-mix(in srgb,var(--ps-accent) 24%,var(--app-line))!important;
  background:linear-gradient(160deg,color-mix(in srgb,var(--ps-accent) 9%,var(--app-panel)) 0,var(--app-panel) 45%)!important;
}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header em{display:none!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article header b{font-size:12px!important}
.profile-settings-shell [data-pane="autobet"] .safety-stage-visual{
  position:relative;z-index:1;display:grid;grid-template-columns:82px minmax(0,1fr);align-items:center;gap:10px;
  min-height:94px;padding:8px 0 10px;border-bottom:1px solid var(--app-line);
}
.profile-settings-shell [data-pane="autobet"] .safety-stage-gauge{position:relative;width:78px;height:78px;display:grid;place-items:center}
.profile-settings-shell [data-pane="autobet"] .safety-stage-gauge svg{position:absolute;inset:0;width:78px!important;height:78px!important;transform:rotate(-90deg)}
.profile-settings-shell [data-pane="autobet"] .safety-stage-gauge circle{fill:none!important;stroke-width:5!important}
.profile-settings-shell [data-pane="autobet"] .safety-gauge-track{stroke:color-mix(in srgb,var(--ps-accent) 12%,var(--app-line))!important}
.profile-settings-shell [data-pane="autobet"] .safety-gauge-value{
  stroke:var(--ps-accent)!important;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:0;
}
.profile-settings-shell [data-pane="autobet"] .safety-stage-gauge>span{position:relative;display:flex;align-items:baseline;color:var(--text-primary)}
.profile-settings-shell [data-pane="autobet"] .safety-stage-gauge>span b{font-size:25px!important;line-height:1;color:var(--ps-accent)!important}
.profile-settings-shell [data-pane="autobet"] .safety-stage-gauge>span small{font-size:9px;color:var(--text-muted)}
.profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry{min-width:0;display:grid;gap:4px}
.profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>small{color:var(--text-muted);font-size:8px;white-space:nowrap}
.profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>b{color:var(--ps-accent);font-size:8px;letter-spacing:.12em}
.profile-settings-shell [data-pane="autobet"] .safety-signal-bars{height:24px;display:flex;align-items:flex-end;gap:3px;margin-top:3px}
.profile-settings-shell [data-pane="autobet"] .safety-signal-bars i{
  width:3px;height:100%;border-radius:2px 2px 0 0;background:linear-gradient(180deg,var(--ps-accent),color-mix(in srgb,var(--ps-accent) 28%,transparent));
  transform-origin:bottom;
}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row{margin-top:1px}
.profile-settings-shell [data-pane="autobet"] .safety-chip-row span{min-height:27px!important;font-size:8.5px!important}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{
  background:linear-gradient(160deg,color-mix(in srgb,var(--ps-accent) 8%,#fff),#fff 48%)!important;
}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article{min-height:0!important}
  .profile-settings-shell [data-pane="autobet"] .safety-stage-visual{grid-template-columns:76px minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){
  .profile-settings-shell [data-pane="autobet"] .safety-gauge-value{stroke-dashoffset:0!important}
}

/* Mobile Account Link keeps its meaning: icon + label + compact status. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="account"] .account-signal-nodes article{
    min-height:74px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;
    align-items:center!important;gap:5px!important;padding:8px 4px!important;text-align:center;
  }
  .profile-settings-shell [data-pane="account"] .account-signal-nodes article>span{
    min-width:0!important;width:100%!important;display:grid!important;gap:2px!important;
  }
  .profile-settings-shell [data-pane="account"] .account-signal-nodes article b{
    font-size:11px!important;line-height:1.15!important;
  }
  .profile-settings-shell [data-pane="account"] .account-signal-nodes article small{
    display:block!important;overflow:hidden!important;font-size:8.5px!important;line-height:1.2!important;
    text-overflow:ellipsis!important;white-space:nowrap!important;
  }
}

/* Final Rules simplification and local-only expand affordance hover. */
.profile-settings-shell [data-pane="autobet"] .safety-circuit-packet{
  opacity:0;
  transform-box:view-box;
  transform-origin:0 0;
  will-change:transform,opacity!important;
  animation:safetyCircuitPacketDesktop 10s linear infinite;
}
.profile-settings-shell [data-pane="autobet"] .autobet-safety-engine summary:hover .safety-engine-state{border-color:color-mix(in srgb,var(--ps-accent) 32%,var(--app-line))!important;background:color-mix(in srgb,var(--ps-accent) 7%,#000)!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-state:hover{border-color:var(--ps-accent)!important;background:color-mix(in srgb,var(--ps-accent) 13%,#000)!important}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine summary:hover .safety-engine-state{background:color-mix(in srgb,var(--ps-accent) 7%,#fff)!important}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-engine-state:hover{background:color-mix(in srgb,var(--ps-accent) 12%,#fff)!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail:has(article[data-stage="rules"]){grid-template-columns:1fr!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="rules"]{width:100%!important;min-height:0!important;padding:14px 18px!important;border-left-width:1px!important;background:var(--app-panel)!important}
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="rules"]::before,
.profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="rules"]::after{display:none!important;content:none!important}
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-stage-visual,
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] header,
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-stage-meter{display:none!important}
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0 18px!important;margin:0!important}
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row span{padding:10px 3px!important;min-height:44px!important;font-size:11px!important;line-height:1.35!important}
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row span::before,
.profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row span::after{display:none!important;content:none!important}
html[data-theme="light"] .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="rules"]{background:#fff!important}
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row{grid-template-columns:1fr!important}
  .profile-settings-shell [data-pane="autobet"] article[data-stage="rules"] .safety-chip-row span{font-size:12px!important;min-height:46px!important}
}

/* Final mobile Account Link readability. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="account"] .account-signal-nodes article{min-height:88px!important;gap:7px!important}
  .profile-settings-shell [data-pane="account"] .account-signal-nodes article svg{width:22px!important;height:22px!important}
  .profile-settings-shell [data-pane="account"] .account-signal-nodes article b{font-size:13px!important;line-height:1.2!important}
  .profile-settings-shell [data-pane="account"] .account-signal-nodes article small{font-size:10.5px!important;line-height:1.2!important}
}

/* Exact mobile Safety timeline/label alignment. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-columns:40px minmax(0,1fr) auto!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{grid-column:2!important;grid-row:1!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{grid-column:3!important;grid-row:1!important;justify-self:end!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-chevron{display:none!important}
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{display:none!important}
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{
    display:block!important;grid-column:1/4!important;grid-row:2!important;justify-self:stretch!important;
    width:100%!important;max-width:none!important;min-width:0!important;height:27px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    grid-column:1/4!important;grid-row:2!important;justify-self:stretch!important;width:100%!important;
    display:grid!important;grid-template-columns:20px minmax(0,1fr) 20px!important;padding:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels b{
    display:block;text-align:center!important;font-size:12px!important;font-weight:800!important;
  }
}

/* Absolute final mobile Safety geometry — keep this at EOF. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{position:relative!important;display:block!important;box-sizing:border-box!important;min-height:116px!important;height:116px!important;padding:12px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-badge{position:absolute!important;left:12px!important;top:12px!important;width:40px!important;height:40px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{position:absolute!important;left:62px!important;top:15px!important;right:112px!important;display:grid!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{position:absolute!important;right:12px!important;top:13px!important;left:auto!important;min-width:88px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-chevron,
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{display:none!important}
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{position:absolute!important;display:block!important;left:12px!important;right:12px!important;top:65px!important;width:calc(100% - 24px)!important;height:27px!important;max-width:none!important;min-width:0!important}
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{position:absolute!important;display:grid!important;left:22px!important;right:22px!important;bottom:8px!important;width:calc(100% - 44px)!important;grid-template-columns:auto minmax(0,1fr) auto!important;padding:0!important}
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels b{text-align:center!important;font-size:12px!important;font-weight:800!important;line-height:16px!important}
}

/* Unified mobile identity + wallet header. */
@media(max-width:620px){
  .profile-settings-shell .profile-settings-rail{
    display:grid!important;grid-template-columns:minmax(0,1fr) 118px!important;
    grid-template-rows:auto auto!important;column-gap:12px!important;row-gap:10px!important;
    padding:calc(14px + env(safe-area-inset-top,0px)) 14px 0!important;
  }
  .profile-settings-shell .profile-settings-account{
    grid-column:1!important;grid-row:1!important;min-width:0!important;min-height:58px!important;
    padding:0!important;margin:0!important;border:0!important;align-self:center!important;
  }
  .profile-settings-shell .profile-settings-wallet{
    grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;min-height:54px!important;
    margin:0!important;padding:5px 42px 5px 12px!important;border:0!important;border-left:1px solid var(--app-line)!important;
    border-radius:0!important;background:transparent!important;box-shadow:none!important;
  }
  .profile-settings-shell .profile-settings-wallet .fresh-profile-label{
    display:block!important;margin-bottom:5px!important;font-size:8px!important;line-height:1!important;white-space:nowrap!important;
  }
  .profile-settings-shell .profile-settings-wallet div{display:flex!important;align-items:baseline!important;gap:4px!important;white-space:nowrap!important}
  .profile-settings-shell .profile-settings-wallet strong{font-size:19px!important;line-height:1!important}
  .profile-settings-shell .profile-settings-wallet small{font-size:9px!important;line-height:1!important}
  .profile-settings-shell .profile-settings-tabs{
    grid-column:1/-1!important;grid-row:2!important;margin:0!important;padding:8px 0 12px!important;
  }
}

/* Stable mobile navbar: keep the small frosted pill, but avoid transformed
   sticky descendants. Mobile scroll logic snaps between 0 and 14px blur, so
   this does not animate backdrop-filter on every scroll frame. */
@media(max-width:767px){
  .app-header{transform:none!important;will-change:auto!important;backface-visibility:visible!important}
  .nav-pill{
    transform:none!important;will-change:auto!important;backface-visibility:visible!important;
    -webkit-backdrop-filter:blur(var(--nav-blur,0)) saturate(150%)!important;
    backdrop-filter:blur(var(--nav-blur,0)) saturate(150%)!important;
  }
  .nav-cluster{transform:none!important;will-change:auto!important}
}

/* One-line mobile profile descriptions. */
@media(max-width:620px){
  .profile-settings-shell .profile-pane-title>small,
  .profile-settings-shell .profile-control-band small,
  .profile-settings-shell .automation-setting-copy small,
  .profile-settings-shell .automation-setting-head small,
  .profile-settings-shell .automation-setting-section small{
    display:block!important;max-width:100%!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:ellipsis!important;line-height:1.3!important;
  }
}

/* Composed profile header for phones and tablets. Keep identity and wallet on
   one row throughout the entire compact/modal viewport range. */
@media(max-width:767px){
  .profile-settings-shell .profile-settings-rail{
    grid-template-columns:minmax(0,1fr) 168px!important;
    grid-template-rows:64px auto auto!important;
  }
  .profile-settings-shell .profile-settings-account{grid-column:1!important;grid-row:1!important;height:64px!important}
  .profile-settings-shell .profile-settings-wallet{
    grid-column:2!important;grid-row:1!important;height:54px!important;min-height:54px!important;
    width:124px!important;min-width:124px!important;box-sizing:border-box!important;
    padding:8px 11px!important;justify-self:start!important;align-self:center!important;
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:5px!important;
    border:1px solid var(--app-line)!important;border-radius:10px!important;
    background:color-mix(in srgb,var(--ps-accent) 3%,var(--app-panel))!important;
  }
  .profile-settings-shell .profile-settings-wallet::before,
  .profile-settings-shell .profile-settings-wallet::after{display:none!important;content:none!important}
  .profile-settings-shell .profile-settings-wallet .fresh-profile-label{margin:0!important;font-size:7px!important;line-height:1!important;letter-spacing:.08em!important}
  .profile-settings-shell .profile-settings-wallet div{width:100%!important;min-width:0!important;display:flex!important;align-items:baseline!important;gap:4px!important;line-height:1!important}
  .profile-settings-shell .profile-settings-wallet strong{min-width:0!important;max-width:82px!important;font-size:16px!important;line-height:1!important}
  .profile-settings-shell .profile-settings-wallet small{flex:0 0 auto!important;font-size:8px!important;line-height:1!important}
  .profile-settings-shell .profile-settings-tabs{grid-column:1/-1!important;grid-row:2!important}
  .profile-settings-shell .profile-settings-vitals{grid-column:1/-1!important;grid-row:3!important}
}

/* Phone readability floor for every modal. Keep helper copy legible and let it wrap. */
@media(max-width:620px){
  :is(.fresh-profile-overlay,.auth-modal-overlay,.awaiting-modal-overlay,.profile-confirm-overlay)
  :is(p,small){
    font-size:clamp(11px,2.8vw,12px)!important;
    line-height:1.4!important;
  }

  .profile-settings-shell :is(
    .profile-pane-title>small,
    .profile-control-band small,
    .automation-setting-copy small,
    .automation-setting-head small,
    .automation-setting-section small,
    .notification-preference-panel header small,
    .notification-choice-list label small,
    .account-signal-map header small,
    .account-signal-nodes article small
  ){
    display:block!important;
    max-width:none!important;
    overflow:visible!important;
    white-space:normal!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
  }

  .profile-settings-shell .profile-pane-title>small{margin-top:3px!important}
  .profile-settings-shell .notification-preference-panel header b{font-size:13px!important;line-height:1.25!important}
  .profile-settings-shell .notification-choice-list label{
    min-height:58px!important;padding:11px 10px!important;gap:10px!important;
  }
  .profile-settings-shell .notification-choice-list label b{font-size:12px!important;line-height:1.25!important}
  .profile-settings-shell .notification-choice-list label small{font-size:10.5px!important;line-height:1.35!important}
  .profile-settings-shell .notification-preference-panel header em,
  .profile-settings-shell .account-signal-map>header em{font-size:10px!important;line-height:1!important}

  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy small,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small,
  .profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>small,
  .profile-settings-shell [data-pane="autobet"] .safety-stage-gauge>span small{
    font-size:10px!important;line-height:1.25!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-chip-row span{font-size:11px!important;line-height:1.35!important}
  .profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>b{font-size:10px!important;line-height:1.2!important}

  .profile-settings-shell .profile-settings-wallet .fresh-profile-label,
  .profile-settings-shell .fresh-profile-label{font-size:10px!important;line-height:1.15!important}
  .profile-settings-shell .profile-settings-wallet small{font-size:10px!important;line-height:1!important}

  .awaiting-modal-panel :is(.awaiting-row-sub,.awaiting-empty,.logs-row-meta),
  .profile-confirm-panel :is(p,small),
  .auth-modal-overlay :is(.auth-subtitle,.auth-help,.auth-status,small){
    font-size:11px!important;line-height:1.4!important;
    white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  }
}

/* Keep the expanded mobile Safety Engine inside the viewport. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail{
    width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine{overflow:hidden!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-detail article[data-stage="rules"]{
    width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-chip-row,
  .profile-settings-shell [data-pane="autobet"] .safety-chip-row span{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}

  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small{font-size:5px!important;line-height:1!important;letter-spacing:.08em!important;white-space:nowrap!important}
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small{font-size:0!important}
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{font-size:5px!important;line-height:1!important;white-space:nowrap!important}
}

/* Stable, centered mobile Safety Engine expand control. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{right:126px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    width:112px!important;min-width:112px!important;max-width:112px!important;
    box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
    align-items:center!important;justify-content:center!important;gap:2px!important;text-align:center!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state b,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state b::after,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small::after{
    width:100%!important;display:block!important;box-sizing:border-box!important;
    margin:0!important;text-align:center!important;text-indent:0!important;
    font-size:7.5px!important;line-height:1!important;letter-spacing:.06em!important;white-space:nowrap!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small{font-size:0!important}
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b::after,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{font-size:7.5px!important}
}

/* Desktop readability floor. The phone view already promotes helper text and
   lets it wrap; apply the same policy from compact laptops through wide
   monitors instead of shrinking copy to 6-10px just because more room exists. */
@media (min-width:621px) {
  :is(.fresh-profile-overlay,.auth-modal-overlay,.awaiting-modal-overlay,.profile-confirm-overlay)
  :is(p,small){
    font-size:12px!important;
    line-height:1.45!important;
  }

  .profile-settings-shell :is(
    .profile-pane-title>small,
    .profile-control-band small,
    .automation-setting-copy small,
    .automation-setting-head small,
    .automation-setting-section small,
    .notification-preference-panel header small,
    .notification-choice-list label small,
    .account-signal-map header small,
    .account-signal-nodes article small
  ){
    display:block!important;
    max-width:none!important;
    overflow:visible!important;
    white-space:normal!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
  }

  .profile-settings-shell .profile-pane-title>small{margin-top:3px!important}
  .profile-settings-shell .notification-preference-panel header b{font-size:14px!important;line-height:1.3!important}
  .profile-settings-shell .notification-choice-list label{min-height:62px!important;padding:12px!important;gap:11px!important}
  .profile-settings-shell .notification-choice-list label b{font-size:13px!important;line-height:1.3!important}
  .profile-settings-shell .notification-choice-list label small{font-size:12px!important;line-height:1.4!important}
  .profile-settings-shell .notification-preference-panel header em,
  .profile-settings-shell .account-signal-map>header em{font-size:11px!important;line-height:1.1!important}
  .profile-settings-shell .account-signal-nodes article b{font-size:13px!important;line-height:1.25!important}
  .profile-settings-shell .account-signal-nodes article small{font-size:11px!important;line-height:1.3!important}

  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy small,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small,
  .profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>small,
  .profile-settings-shell [data-pane="autobet"] .safety-stage-gauge>span small{
    font-size:11px!important;
    line-height:1.3!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-chip-row span{font-size:11px!important;line-height:1.4!important}
  .profile-settings-shell [data-pane="autobet"] .safety-stage-telemetry>b{font-size:11px!important;line-height:1.25!important}
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-columns:40px minmax(120px,.8fr) minmax(150px,1.45fr) 140px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    grid-column:4!important;
    justify-self:end!important;
    width:140px!important;
    min-width:140px!important;
    max-width:140px!important;
    box-sizing:border-box!important;
    justify-items:center!important;
    padding:7px 6px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state b{
    font-size:10px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small{
    display:block!important;
    width:100%!important;
    font-size:9px!important;
    line-height:1.15!important;
    letter-spacing:.02em!important;
    text-align:center!important;
    white-space:nowrap!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-chevron{
    display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small{
    font-size:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b::after,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{
    display:block!important;
    width:100%!important;
    margin:0!important;
    font-size:9px!important;
    line-height:1.15!important;
    letter-spacing:.02em!important;
    text-align:center!important;
    white-space:nowrap!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b::after{
    font-size:10px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{
    font-size:9px!important;
  }
  .profile-settings-shell .fresh-profile-label,
  .profile-settings-shell .profile-settings-wallet .fresh-profile-label{font-size:11px!important;line-height:1.2!important}
  .profile-settings-shell .profile-settings-wallet small{font-size:11px!important;line-height:1.1!important}

  .awaiting-modal-panel :is(.awaiting-row-sub,.awaiting-empty,.logs-row-meta),
  .profile-confirm-panel :is(p,small),
  .auth-modal-overlay :is(.auth-subtitle,.auth-help,.auth-status,small){
    font-size:12px!important;
    line-height:1.45!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }

  .match-card :is(.odds-line,.odds-val,.odds-chip-mkt,.timeline-period-header,.timeline-empty-period,.timeline-row-compact,.event-log),
  .logger-row :is(small,.logger-row-meta),
  .awaiting-row :is(small,.awaiting-row-sub){
    font-size:max(11px,.72rem)!important;
    line-height:1.4!important;
  }
}

/* Final phone Safety Engine coordinates: one compact canvas for header, route
   and labels, avoiding the old 116px timeline stretch. */
@media (max-width:620px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    min-height:100px!important;
    height:100px!important;
    padding:10px 12px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-badge{
    top:10px!important;
    width:38px!important;
    height:38px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{
    left:60px!important;
    top:12px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    top:11px!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{
    top:50px!important;
    height:24px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    bottom:5px!important;
  }
}

/* Normalize profile-tab icon/text geometry. SVGs no longer participate in the
   text baseline, so every pair shares the same true vertical center. */
.profile-settings-shell .fresh-profile-tab{
  display:flex!important;
  align-items:center!important;
}
.profile-settings-shell .fresh-profile-tab svg{
  display:block!important;
  flex:0 0 15px!important;
  width:15px!important;
  min-width:15px!important;
  max-width:15px!important;
  height:15px!important;
  min-height:15px!important;
  margin:0!important;
  transform:none!important;
  vertical-align:middle!important;
  position:relative!important;
  top:0!important;
}
.profile-settings-shell .fresh-profile-tab>span{
  display:flex!important;
  align-items:center!important;
  min-height:15px!important;
  margin:0!important;
  line-height:1!important;
}
@media (max-width:767px){
  .profile-settings-shell .profile-settings-tabs .fresh-profile-tab{
    justify-content:center!important;
    gap:6px!important;
    padding-inline:4px!important;
    text-align:center!important;
  }
  .profile-settings-shell .fresh-profile-tab[data-tab="autobet"] svg path{
    transform:translateX(1.5px)!important;
    transform-box:view-box!important;
  }
}

/* Wide Filter Engine route uses the same coordinate system as compact views.
   This removes the final SVG-only layout and keeps rail, stations, labels and
   packet locked to one 5% / 50% / 95% model at every container width. */
@container safety-pane (min-width:741px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow-mobile{
    display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels{
    --safety-station-start:5%;--safety-station-middle:50%;--safety-station-end:95%;--safety-rail-center:8px;
    position:relative!important;inset:auto!important;grid-column:3!important;grid-row:1!important;
    align-self:center!important;justify-self:stretch!important;display:block!important;
    width:100%!important;max-width:none!important;height:38px!important;margin:0!important;padding:0!important;
    transform:none!important;
    background:repeating-linear-gradient(90deg,color-mix(in srgb,var(--ps-accent) 72%,transparent) 0 4px,transparent 4px 7px)
      center calc(var(--safety-rail-center) - 1px)/90% 2px no-repeat!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels::before{
    content:""!important;position:absolute!important;z-index:0!important;left:0!important;right:0!important;top:0!important;
    height:17px!important;transform:none!important;opacity:1!important;
    background:
      radial-gradient(circle at var(--safety-station-start) var(--safety-rail-center),var(--app-panel) 0 2.7px,color-mix(in srgb,var(--app-panel) 45%,var(--ps-accent)) 3px,var(--ps-accent) 3.3px 4.65px,color-mix(in srgb,var(--ps-accent) 45%,transparent) 4.95px,transparent 5.3px),
      radial-gradient(circle at var(--safety-station-middle) var(--safety-rail-center),var(--app-panel) 0 2.7px,color-mix(in srgb,var(--app-panel) 45%,var(--ps-accent)) 3px,var(--ps-accent) 3.3px 4.65px,color-mix(in srgb,var(--ps-accent) 45%,transparent) 4.95px,transparent 5.3px),
      radial-gradient(circle at var(--safety-station-end) var(--safety-rail-center),var(--app-panel) 0 2.7px,color-mix(in srgb,var(--app-panel) 45%,var(--ps-accent)) 3px,var(--ps-accent) 3.3px 4.65px,color-mix(in srgb,var(--ps-accent) 45%,transparent) 4.95px,transparent 5.3px)!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels::after{
    content:""!important;position:absolute!important;z-index:3!important;
    left:var(--safety-station-start);top:var(--safety-rail-center)!important;
    width:6px!important;height:6px!important;border-radius:50%!important;background:var(--ps-accent)!important;
    box-shadow:0 0 0 4px color-mix(in srgb,var(--ps-accent) 18%,transparent),0 0 9px color-mix(in srgb,var(--ps-accent) 70%,transparent)!important;
    transform:translate3d(-50%,-50%,0)!important;opacity:0;will-change:left,opacity!important;
    animation:safetyCompactPacket 10s linear infinite!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b{
    position:absolute!important;z-index:1!important;top:23px!important;right:auto!important;
    display:block!important;min-width:max-content!important;margin:0!important;padding:0!important;
    color:var(--text-secondary)!important;font-size:7px!important;font-weight:750!important;line-height:10px!important;
    text-align:center!important;transform:translateX(-50%)!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b::before{
    content:none!important;display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b:first-child{
    left:var(--safety-station-start)!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b:nth-child(2){
    left:var(--safety-station-middle)!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b:last-child{
    left:var(--safety-station-end)!important;
  }
}

.profile-settings-shell .profile-danger-action{
  gap:10px!important;
}
.profile-settings-shell .profile-danger-action svg{
  width:20px!important;height:20px!important;min-width:20px!important;flex:0 0 20px!important;
}

/* Responsive Safety timeline models. Each route has a native maximum and a
   zero-safe grid track, so resizing scales it before labels or controls can
   overlap. */
@media (min-width:901px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-columns:40px minmax(120px,.8fr) minmax(120px,150px) 140px!important;
    gap:12px!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
    justify-self:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:150px!important;
    overflow:hidden!important;
  }
}

@media (min-width:621px) and (max-width:900px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-columns:40px minmax(90px,1fr) 150px clamp(112px,18vw,140px)!important;
    gap:8px!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
    justify-self:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:150px!important;
    overflow:hidden!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    width:clamp(112px,18vw,140px)!important;
    min-width:0!important;
    max-width:140px!important;
  }
}

/* Native-width phone Safety timeline. Do not stretch the 300-unit SVG across
   wide phones; center it and shrink only when the card is below 324px wide. */
@media (max-width:620px){
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{
    left:50%!important;
    right:auto!important;
    width:min(300px,calc(100% - 24px))!important;
    max-width:calc(100% - 24px)!important;
    transform:translateX(-50%)!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    left:50%!important;
    right:auto!important;
    width:min(300px,calc(100% - 44px))!important;
    max-width:calc(100% - 44px)!important;
    transform:translateX(-50%)!important;
  }
}

/* Narrow desktop: retain the desktop modal and desktop preview models, but let
   fixed-width components contract before the tablet breakpoint is reached. */
@media (min-width:768px) and (max-width:900px){
  .profile-settings-shell [data-pane="appearance"] .profile-theme-cards{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;
    max-width:100%!important;
    gap:10px!important;
  }
  .profile-settings-shell [data-pane="appearance"] .profile-theme-card{
    min-width:0!important;
    width:auto!important;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-preview{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    aspect-ratio:3 / 2!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-columns:40px minmax(90px,1fr) 170px 120px!important;
    gap:8px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    width:120px!important;
    min-width:120px!important;
    max-width:120px!important;
    padding-inline:4px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{min-width:0!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy small{font-size:10px!important}
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{
    font-size:8px!important;
    letter-spacing:0!important;
  }
}

/* Continuous desktop theme-preview sizing. The cards keep the default
   168x112 maximum and only scale down proportionally when space is tighter;
   crossing the narrow-desktop boundary no longer changes their dimensions. */
@media (min-width:768px){
  .profile-settings-shell [data-pane="appearance"] .profile-theme-cards{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:min(100%,532px)!important;
    max-width:532px!important;
    gap:14px!important;
  }
  .profile-settings-shell [data-pane="appearance"] .profile-theme-card{
    min-width:0!important;
    width:auto!important;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-preview{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    aspect-ratio:3 / 2!important;
  }
}

/* Final discrete Safety timeline models. Desktop keeps one arrangement until
   768px; tablet switches once to the centered second-row route. */
@media (min-width:768px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-columns:40px minmax(80px,1fr) 150px 140px!important;
    gap:8px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{
    min-width:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
    display:block!important;
    width:150px!important;
    min-width:150px!important;
    max-width:150px!important;
    justify-self:center!important;
    overflow:hidden!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile,
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    grid-column:4!important;
    justify-self:end!important;
    width:140px!important;
    min-width:140px!important;
    max-width:140px!important;
  }
}

@media (min-width:621px) and (max-width:767px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    position:relative!important;
    display:block!important;
    box-sizing:border-box!important;
    min-height:100px!important;
    height:100px!important;
    padding:10px 12px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-badge{
    position:absolute!important;left:12px!important;top:10px!important;width:38px!important;height:38px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{
    position:absolute!important;left:60px!important;right:152px!important;top:12px!important;display:grid!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    position:absolute!important;right:12px!important;top:11px!important;left:auto!important;
    width:132px!important;min-width:132px!important;max-width:132px!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
    display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{
    position:absolute!important;display:block!important;left:50%!important;right:auto!important;top:50px!important;
    width:300px!important;min-width:0!important;max-width:calc(100% - 24px)!important;height:24px!important;
    transform:translateX(-50%)!important;overflow:visible!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    position:absolute!important;display:grid!important;left:50%!important;right:auto!important;bottom:5px!important;
    width:300px!important;max-width:calc(100% - 44px)!important;transform:translateX(-50%)!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;padding:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels b{
    text-align:center!important;font-size:12px!important;font-weight:800!important;line-height:16px!important;
  }
}

/* Compact/tablet profile corrections. */
@media (max-width:767px){
  .profile-settings-content:has([data-pane="alerts"].active){
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
  }
  .profile-settings-shell .fresh-profile-pane[data-pane="alerts"].active{
    min-height:0!important;
    display:block!important;
  }
  .profile-settings-shell [data-pane="alerts"] .profile-sound-grid{
    flex:none!important;
    min-height:0!important;
    grid-template-rows:none!important;
    align-content:start!important;
    margin-bottom:12px!important;
  }
  .profile-settings-shell [data-pane="alerts"] .profile-sound-grid button{
    height:auto!important;
  }
  .profile-settings-shell [data-pane="alerts"] .profile-range-band{
    display:grid!important;
    margin-top:0!important;
    padding:14px 0 max(12px,env(safe-area-inset-bottom,0px))!important;
  }
}

@media (min-width:621px) and (max-width:767px){
  .profile-settings-shell .profile-settings-wallet{
    width:140px!important;
    min-width:140px!important;
    padding-inline:12px!important;
  }
  .profile-settings-shell .profile-settings-wallet .fresh-profile-label{
    width:100%!important;
    margin:0!important;
    font-size:10px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
}

/* Match the Alerts sound-button surface. The semantic token resolves to the
   correct dark or light panel color with the selected theme. */
.profile-settings-shell [data-pane="autobet"] :is(
  .autobet-target-card,
  .autobet-target-card.is-active,
  .autobet-target-card.is-locked,
  .autowithdraw-card,
  .autowithdraw-card.is-active
){
  background:var(--app-panel-2)!important;
  background-image:none!important;
}

/* Live account state: a quiet accent-colored signal dot replaces the fixed
   green text badge. The LIVE text stays in the DOM for assistive technology. */
.profile-settings-shell [data-pane="account"] .account-signal-map.is-live>header em{
  width:10px!important;
  min-width:10px!important;
  height:10px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  color:transparent!important;
  background:var(--ps-accent)!important;
  box-shadow:none!important;
  font-size:0!important;
  line-height:0!important;
  letter-spacing:0!important;
  overflow:hidden!important;
}

/* The disconnected/syncing state follows the selected profile accent too. */
.profile-settings-shell [data-pane="account"] .account-signal-map:not(.is-live)>header em{
  color:var(--ps-accent)!important;
  border-color:color-mix(in srgb,var(--ps-accent) 42%,var(--app-line))!important;
  background:color-mix(in srgb,var(--ps-accent) 10%,#000)!important;
  box-shadow:0 0 12px color-mix(in srgb,var(--ps-accent) 14%,transparent)!important;
}

/* Authoritative Safety Engine layouts. Keep this after all legacy experiments
   so only two predictable models remain. */
@media (min-width:768px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    position:relative!important;display:grid!important;
    grid-template-columns:40px minmax(90px,1fr) 150px 120px!important;
    grid-template-rows:auto!important;align-items:center!important;
    gap:8px!important;min-height:82px!important;height:auto!important;padding:12px 14px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-badge,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    position:relative!important;inset:auto!important;transform:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-badge{grid-column:1!important;grid-row:1!important;width:38px!important;height:38px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{grid-column:2!important;grid-row:1!important;min-width:0!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy b{font-size:13px!important;line-height:1.2!important;white-space:nowrap!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy small{font-size:9px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
    position:relative!important;inset:auto!important;grid-column:3!important;grid-row:1!important;
    display:block!important;width:170px!important;min-width:170px!important;max-width:170px!important;height:38px!important;
    transform:none!important;overflow:hidden!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    grid-column:4!important;grid-row:1!important;justify-self:end!important;
    width:120px!important;min-width:120px!important;max-width:120px!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile,
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{display:none!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow .safety-circuit-labels text{
    fill:var(--text-secondary)!important;font-size:7.5px!important;font-weight:700!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow .safety-circuit-rail{stroke-width:1.8!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow .safety-circuit-gate circle{stroke-width:1.7!important}
}

@media (min-width:901px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-columns:40px minmax(90px,1fr) 170px 120px!important;
    gap:8px!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{
    width:170px!important;
    min-width:170px!important;
    max-width:170px!important;
    height:38px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow .safety-circuit-labels text{
    fill:var(--text-secondary)!important;
    font-size:7.5px!important;
    font-weight:700!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow .safety-circuit-rail{
    stroke-width:1.8!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow .safety-circuit-gate circle{
    stroke-width:1.7!important;
  }
}

@media (max-width:767px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    position:relative!important;display:grid!important;
    grid-template-columns:40px minmax(0,1fr) 132px!important;
    grid-template-rows:42px 42px!important;align-items:center!important;
    gap:4px 10px!important;min-height:104px!important;height:104px!important;padding:10px 12px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-badge,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy,
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state,
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile,
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    position:relative!important;inset:auto!important;transform:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-badge{grid-column:1!important;grid-row:1!important;width:38px!important;height:38px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy{grid-column:2!important;grid-row:1!important;min-width:0!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy b{font-size:13px!important;line-height:1.2!important;white-space:nowrap!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy small{font-size:9px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state{
    grid-column:3!important;grid-row:1!important;justify-self:end!important;
    width:132px!important;min-width:132px!important;max-width:132px!important;
    height:38px!important;min-height:38px!important;max-height:38px!important;
    box-sizing:border-box!important;padding:6px 8px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state b{
    display:block!important;width:100%!important;margin:0!important;
    font-size:10px!important;line-height:12px!important;letter-spacing:.02em!important;text-align:center!important;white-space:nowrap!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small{
    display:block!important;width:100%!important;margin:0!important;
    font-size:9px!important;line-height:11px!important;letter-spacing:.02em!important;text-align:center!important;white-space:nowrap!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small{font-size:0!important;line-height:0!important}
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b::after{
    display:block!important;content:"HIDE RULES"!important;font-size:10px!important;line-height:12px!important;letter-spacing:.02em!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{
    display:block!important;content:"CLICK TO COLLAPSE"!important;font-size:9px!important;line-height:11px!important;letter-spacing:.02em!important;
  }
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow{display:none!important}
  .profile-settings-shell [data-pane="autobet"] svg.safety-engine-flow-mobile{
    grid-column:1/4!important;grid-row:2!important;align-self:start!important;justify-self:center!important;
    display:block!important;width:min(300px,100%)!important;min-width:0!important;max-width:300px!important;height:24px!important;
    overflow:visible!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-flow-mobile .safety-circuit-labels{
    display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels{
    grid-column:1/4!important;grid-row:2!important;align-self:end!important;justify-self:center!important;
    display:grid!important;width:min(300px,100%)!important;max-width:300px!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;padding:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-mobile-labels b{
    display:block!important;color:var(--text-secondary)!important;
    font-size:11px!important;font-weight:700!important;line-height:13px!important;text-align:center!important;
  }
}

/* Tablet Auto-Bet readability and invariant expand-control typography. */
@media (min-width:621px) and (max-width:767px){
  .profile-settings-shell [data-pane="autobet"] .profile-pane-title>small,
  .profile-settings-shell [data-pane="autobet"] .profile-control-band small,
  .profile-settings-shell [data-pane="autobet"] .automation-setting-copy small,
  .profile-settings-shell [data-pane="autobet"] .automation-setting-head small,
  .profile-settings-shell [data-pane="autobet"] .automation-setting-section small{
    display:block!important;font-size:11px!important;line-height:1.4!important;
    white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  }
  .profile-settings-shell [data-pane="autobet"] .automation-setting-head strong,
  .profile-settings-shell [data-pane="autobet"] .profile-control-band b{
    font-size:13px!important;line-height:1.3!important;
  }
  .profile-settings-shell [data-pane="autobet"] .automation-setting-head>div>span,
  .profile-settings-shell [data-pane="autobet"] .automation-setting-body>span,
  .profile-settings-shell [data-pane="autobet"] .autobet-target-field>span:first-child{
    font-size:10px!important;line-height:1.25!important;
  }
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy b{font-size:13px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-copy small{font-size:11px!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state b{font-size:10px!important;line-height:1.15!important}
  .profile-settings-shell [data-pane="autobet"] .safety-engine-state small{font-size:9px!important;line-height:1.15!important;letter-spacing:.02em!important}
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small{font-size:0!important}
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b::after{
    display:block!important;font-size:10px!important;line-height:1.15!important;letter-spacing:.02em!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{
    display:block!important;font-size:9px!important;line-height:1.15!important;letter-spacing:.02em!important;
  }
}

/* Mobile custom-color picker: anchored popup, not an in-flow panel. */
@media(max-width:620px){
  .profile-settings-shell [data-pane="appearance"] .appearance-accent-row{
    position:relative!important;width:100%!important;box-sizing:border-box!important;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-custom-color{
    position:relative!important;flex:1 0 100%!important;width:100%!important;min-width:0!important;
    display:grid!important;grid-template-columns:auto 112px!important;justify-content:start!important;
    align-items:center!important;gap:8px!important;box-sizing:border-box!important;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-color-popover{
    position:absolute!important;z-index:100!important;grid-column:auto!important;
    top:calc(100% + 8px)!important;right:auto!important;left:0!important;
    width:234px!important;max-width:calc(100vw - 48px)!important;min-width:0!important;box-sizing:border-box!important;
    margin:0!important;overflow:hidden!important;
    border-radius:10px!important;box-shadow:0 18px 40px rgba(0,0,0,.48)!important;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-sv{height:150px!important}
  .profile-settings-shell [data-pane="appearance"] .appearance-picker-tools{
    grid-template-columns:24px 34px minmax(0,1fr)!important;padding:10px 12px 7px!important;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-rgb-fields{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;padding:0 12px!important;gap:8px!important;
  }
  .profile-settings-shell [data-pane="appearance"] .appearance-rgb-fields input{
    width:100%!important;min-width:0!important;box-sizing:border-box!important;
  }
}

/* Safety Engine responds to the space inside the settings pane, not the outer
   viewport. The sidebar can leave a tablet-width card on a desktop viewport;
   in that state the route gets its own row instead of squeezing between the
   title and action. Keep this final so it supersedes the legacy viewport rules. */
.profile-settings-shell .fresh-profile-pane[data-pane="autobet"]{
  container-name:safety-pane;
  container-type:inline-size;
}

@container safety-pane (min-width:741px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    grid-template-columns:40px minmax(112px,1fr) minmax(170px,220px) clamp(108px,20cqi,120px)!important;
    grid-template-rows:auto!important;gap:clamp(8px,1.5cqi,12px)!important;
    min-height:82px!important;height:auto!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow{
    display:block!important;width:100%!important;min-width:0!important;max-width:220px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-state{
    width:clamp(108px,20cqi,120px)!important;min-width:0!important;max-width:120px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow-mobile,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels{
    display:none!important;
  }
}

@container safety-pane (max-width:740px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine>summary{
    position:relative!important;display:grid!important;
    grid-template-columns:40px minmax(0,1fr) clamp(104px,25cqi,116px)!important;
    grid-template-rows:42px 54px!important;align-items:center!important;
    gap:6px 10px!important;min-height:118px!important;height:118px!important;padding:10px 12px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-badge,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-copy,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-state,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow-mobile,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels{
    position:relative!important;inset:auto!important;transform:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-badge{
    grid-column:1!important;grid-row:1!important;width:38px!important;height:38px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-copy{
    grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;height:38px!important;
    display:flex!important;flex-direction:column!important;justify-content:center!important;gap:2px!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-copy b{
    display:block!important;margin:0!important;font-size:13px!important;line-height:15px!important;white-space:nowrap!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-copy small{
    display:block!important;margin:0!important;font-size:9px!important;line-height:11px!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:ellipsis!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-state{
    grid-column:3!important;grid-row:1!important;justify-self:end!important;
    width:clamp(104px,25cqi,116px)!important;min-width:0!important;max-width:116px!important;
    height:38px!important;min-height:38px!important;max-height:38px!important;
    box-sizing:border-box!important;padding:5px 6px!important;display:flex!important;flex-direction:column!important;
    align-items:center!important;justify-content:center!important;gap:1px!important;text-align:center!important;overflow:hidden!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-state b,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-state small{
    display:block!important;width:100%!important;height:auto!important;margin:0!important;text-align:center!important;white-space:nowrap!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-state b{
    font-size:9px!important;line-height:11px!important;letter-spacing:.03em!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-engine-state small{
    font-size:6.5px!important;line-height:9px!important;letter-spacing:.04em!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small{
    font-size:0!important;line-height:0!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state b::after{
    content:"HIDE RULES"!important;display:block!important;font-size:9px!important;line-height:11px!important;letter-spacing:.03em!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine[open] .safety-engine-state small::after{
    content:"CLICK TO COLLAPSE"!important;display:block!important;font-size:6.5px!important;line-height:9px!important;letter-spacing:.04em!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow{display:none!important}
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow-mobile{
    display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels{
    --safety-station-start:5%;--safety-station-middle:50%;--safety-station-end:95%;--safety-rail-center:9px;
    position:relative!important;grid-column:1/4!important;grid-row:2!important;
    align-self:stretch!important;justify-self:stretch!important;display:block!important;
    width:calc(100% - 16px)!important;max-width:none!important;height:48px!important;
    margin:0 8px!important;padding:0!important;transform:none!important;
    background:repeating-linear-gradient(90deg,color-mix(in srgb,var(--ps-accent) 72%,transparent) 0 4px,transparent 4px 7px)
      center calc(var(--safety-rail-center) - 1px)/90% 2px no-repeat!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels::before{
    content:""!important;position:absolute!important;z-index:0!important;
    left:0!important;right:0!important;top:0!important;height:18px!important;transform:none!important;
    background:
      radial-gradient(circle at var(--safety-station-start) var(--safety-rail-center),var(--app-panel) 0 2.7px,color-mix(in srgb,var(--app-panel) 45%,var(--ps-accent)) 3px,var(--ps-accent) 3.3px 4.65px,color-mix(in srgb,var(--ps-accent) 45%,transparent) 4.95px,transparent 5.3px),
      radial-gradient(circle at var(--safety-station-middle) var(--safety-rail-center),var(--app-panel) 0 2.7px,color-mix(in srgb,var(--app-panel) 45%,var(--ps-accent)) 3px,var(--ps-accent) 3.3px 4.65px,color-mix(in srgb,var(--ps-accent) 45%,transparent) 4.95px,transparent 5.3px),
      radial-gradient(circle at var(--safety-station-end) var(--safety-rail-center),var(--app-panel) 0 2.7px,color-mix(in srgb,var(--app-panel) 45%,var(--ps-accent)) 3px,var(--ps-accent) 3.3px 4.65px,color-mix(in srgb,var(--ps-accent) 45%,transparent) 4.95px,transparent 5.3px)!important;
    opacity:1!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels::after{
    content:""!important;position:absolute!important;z-index:3!important;
    left:var(--safety-station-start);top:var(--safety-rail-center)!important;
    width:6px!important;height:6px!important;border-radius:50%!important;background:var(--ps-accent)!important;
    box-shadow:0 0 0 4px color-mix(in srgb,var(--ps-accent) 18%,transparent),0 0 9px color-mix(in srgb,var(--ps-accent) 70%,transparent)!important;
    transform:translate3d(-50%,-50%,0)!important;opacity:0;will-change:left,opacity!important;
    animation:safetyCompactPacket 10s linear infinite!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b{
    position:absolute!important;z-index:1!important;top:27px!important;display:block!important;
    min-width:max-content!important;padding:0!important;color:var(--text-secondary)!important;
    font-size:10px!important;font-weight:750!important;line-height:13px!important;text-align:center!important;
    transform:translateX(-50%)!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b::before{
    content:none!important;display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b:first-child{
    left:var(--safety-station-start)!important;right:auto!important;text-align:center!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b:nth-child(2){
    left:var(--safety-station-middle)!important;right:auto!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels b:last-child{
    left:var(--safety-station-end)!important;right:auto!important;text-align:center!important;
  }
}

@keyframes safetyCompactPacket{
  0%{left:var(--safety-station-start);opacity:1}
  45%,55%{left:var(--safety-station-middle);opacity:1}
  90%,98%{left:var(--safety-station-end);opacity:1}
  100%{left:var(--safety-station-end);opacity:0}
}

/* The compact route is drawn by a pseudo-element, so JS restarts it through
   its host when Auto-Bet becomes the active pane. */
.profile-settings-shell [data-pane="autobet"] .safety-mobile-labels.restart-safety-packet::after{
  animation:none!important;
}

@media (prefers-reduced-motion:reduce){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels::after{
    left:var(--safety-station-middle)!important;opacity:1!important;animation:none!important;
  }
}

/* Compact profile header: identity, wallet and close are real members of one
   row. Keeping the close control in the grid prevents it from floating above
   the account information or colliding with the wallet at narrow widths. */
@media (max-width:767px){
  .profile-settings-shell .profile-settings-rail{
    grid-template-columns:minmax(0,1fr) clamp(104px,35vw,140px) 38px!important;
    grid-template-rows:auto auto auto!important;
    column-gap:12px!important;
    align-items:center!important;
  }
  .profile-settings-shell .profile-settings-account{
    grid-column:1!important;
    grid-row:1!important;
    min-width:0!important;
    padding-right:0!important;
  }
  .profile-settings-shell .profile-settings-wallet{
    grid-column:2!important;
    grid-row:1!important;
    justify-self:stretch!important;
    min-width:0!important;
    min-height:56px!important;
    height:56px!important;
    margin:0!important;
    padding:8px 9px!important;
  }
  .profile-settings-shell .profile-settings-wallet .fresh-profile-label{
    overflow:hidden!important;
    font-size:9px!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .profile-settings-shell .profile-settings-wallet strong{
    font-size:16px!important;
  }
  .profile-settings-shell .fresh-profile-close{
    position:static!important;
    grid-column:3!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:end!important;
    margin:0!important;
  }
  .profile-settings-shell .profile-settings-tabs,
  .profile-settings-shell .profile-settings-vitals{
    grid-column:1/-1!important;
  }
  .profile-settings-shell .profile-settings-tabs{grid-row:2!important}
  .profile-settings-shell .profile-settings-vitals{grid-row:3!important}
}

/* Final wide-route selection after the legacy authoritative media block. */
@container safety-pane (min-width:741px){
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow,
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine svg.safety-engine-flow-mobile{
    display:none!important;
  }
  .profile-settings-shell [data-pane="autobet"] .autobet-safety-engine .safety-mobile-labels{
    display:block!important;
  }
}
.withdraw-approval-viewer{position:fixed;inset:0;z-index:10050;background:rgba(3,7,18,.92);backdrop-filter:blur(18px);padding:clamp(0px,2vw,24px)}
.withdraw-approval-viewer[hidden]{display:none}.withdraw-approval-shell{height:100%;max-width:1500px;margin:auto;display:grid;grid-template-rows:auto 1fr auto;background:#080d18;border:1px solid rgba(148,163,184,.2);border-radius:22px;overflow:hidden;box-shadow:0 28px 90px #000}
.withdraw-approval-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 18px;background:linear-gradient(135deg,#111827,#0b1220);border-bottom:1px solid rgba(148,163,184,.16)}
.withdraw-approval-head>div:first-child{display:grid;gap:2px}.withdraw-approval-head small{color:#22c55e;font-weight:800;letter-spacing:.12em}.withdraw-approval-head strong{font-size:18px;color:#fff}.withdraw-approval-head span{font-size:12px;color:#94a3b8}.withdraw-approval-tools{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.withdraw-approval-tools button{border:1px solid #334155;background:#172033;color:#e5e7eb;border-radius:10px;padding:9px 12px;font-weight:700}
.withdraw-approval-display{position:relative;overflow:hidden;display:flex;align-items:flex-start;justify-content:center;background:#020617;touch-action:none}.withdraw-approval-display>div:not(.withdraw-approval-loading){transform-origin:top center}.withdraw-approval-loading{margin:auto;color:#cbd5e1;font-weight:700}.withdraw-approval-loading.is-error{color:#fca5a5}.withdraw-approval-shell footer{display:flex;justify-content:space-between;gap:16px;padding:10px 16px;color:#94a3b8;background:#0b1220;border-top:1px solid rgba(148,163,184,.16)}.withdraw-approval-shell footer b{color:#f8fafc;font-variant-numeric:tabular-nums}body.withdraw-approval-open{overflow:hidden}
@media(max-width:700px){.withdraw-approval-viewer{padding:0}.withdraw-approval-shell{border:0;border-radius:0}.withdraw-approval-head{align-items:flex-start;padding:10px 12px}.withdraw-approval-tools button{padding:8px;font-size:12px}.withdraw-approval-shell footer{font-size:11px;padding:8px 10px}}

/* WebView2 supplies its own password reveal/clear affordances. The application
   already has an accessible custom eye, so never render the duplicate native UI. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
.auth-inp::-ms-reveal,
.auth-inp::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

/* Desktop Tauri chrome. This class is injected only by the Windows shell, so
   browsers and Android retain their native window/status surfaces. */
html.tauri-desktop {
  --native-titlebar-height: 38px;
  --native-page-pad: clamp(10px, 2vw, 24px);
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
}

html.tauri-desktop body {
  min-height: 100dvh;
  padding-top: calc(var(--native-titlebar-height) + var(--native-page-pad));
  overscroll-behavior: none;
}

html.tauri-desktop .app-container {
  min-height: calc(100dvh - var(--native-titlebar-height) - (2 * var(--native-page-pad)));
}

html.tauri-desktop .app-header {
  top: var(--native-titlebar-height);
}

/* At phone-width desktop windows the profile becomes a full-height sheet, but
   the desktop titlebar is still HTML layered above it. Reserve that exact band
   for the sheet header and close control just as Android reserves system bars
   natively. */
@media (max-width: 767px) {
  html.tauri-desktop .profile-settings-shell .profile-settings-rail {
    padding-top: calc(14px + var(--native-titlebar-height)) !important;
  }

  html.tauri-desktop .profile-settings-shell .fresh-profile-close {
    top: calc(14px + var(--native-titlebar-height)) !important;
  }
}

/* The desktop shell already reserves its outer breathing room on <body>.
   Keeping the web dashboard's bottom margin and live-pane padding as well adds
   36px after the cards and creates a document scrollbar even when every card
   visibly fits inside the window. */
html.tauri-desktop .pane-live {
  padding-bottom: 0;
  /* A native window has less usable height than the equivalent browser
     viewport because of its titlebar. Centering a full timeline card inside
     the remaining flex space pushes the card down and can make the document a
     few pixels taller than the WebView. Keep live cards anchored immediately
     below the navigation; the empty-state rule still centers its placeholder. */
  justify-content: flex-start;
}

html.tauri-desktop .pane-live .dashboard-grid {
  margin-bottom: 0;
}

.native-titlebar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20000;
  height: var(--native-titlebar-height, 38px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  color: #b8b8bc;
  background: #000;
  border-bottom: 1px solid #111;
  user-select: none;
  -webkit-user-select: none;
}

html[data-theme="light"].tauri-desktop .native-titlebar {
  color: #45454b;
  background: var(--bg);
  border-bottom-color: var(--app-line, #d9d9dd);
}

html[data-theme="light"].tauri-desktop .native-titlebar-drag,
html[data-theme="light"].tauri-desktop .native-window-controls,
html[data-theme="light"].tauri-desktop .native-window-controls button {
  color: #55555b;
  background: var(--bg);
}

html[data-theme="light"].tauri-desktop .native-window-controls button:hover {
  color: #111114;
  background: rgba(0, 0, 0, .07);
}

html[data-theme="light"].tauri-desktop .native-window-controls .native-window-close:hover {
  color: #fff;
  background: #c42b1c;
}

.native-titlebar-drag {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .01em;
  cursor: default;
}

.native-titlebar-logo {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

/* Final compact-header ownership: the mobile close button is a real third
   grid item beside identity and wallet, so it cannot drift into the content. */
.profile-close-mobile { display:none!important; }
@media (max-width:767px) {
  .profile-settings-shell .profile-settings-rail > .profile-close-mobile {
    display:inline-flex!important;
    position:static!important;
    grid-column:3!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:end!important;
    margin:0!important;
    z-index:4;
  }
  .profile-settings-shell .profile-settings-main > #profile-close-btn {
    display:none!important;
  }
}

/* SYNCING follows the chosen accent while using a true light-theme surface. */
html[data-theme="light"] .profile-settings-shell [data-pane="account"] .account-signal-map:not(.is-live)>header em {
  color:var(--ps-accent)!important;
  border-color:color-mix(in srgb,var(--ps-accent) 40%,#d9dde3)!important;
  background:color-mix(in srgb,var(--ps-accent) 9%,#fff)!important;
  box-shadow:none!important;
}

/* The live Account Link state is rendered as a status dot in every theme.
   Override the legacy light-theme LIVE badge colors as well, otherwise its
   near-white badge fill makes the compact dot disappear on the white panel. */
html[data-theme="light"] .profile-settings-shell [data-pane="account"] .account-signal-map.is-live>header em {
  width:10px!important;
  min-width:10px!important;
  height:10px!important;
  padding:0!important;
  border:0!important;
  color:transparent!important;
  background:var(--ps-accent)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--ps-accent) 18%,transparent)!important;
}

.native-window-controls {
  height: 100%;
  display: flex;
}

.native-window-controls button {
  width: 46px;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: #a8a8ad;
  background: transparent;
  transition: color .14s ease, background-color .14s ease;
}

.native-window-controls button:hover {
  color: #fff;
  background: #181818;
}

.native-window-controls .native-window-close:hover {
  color: #fff;
  background: #c42b1c;
}

.native-window-controls svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.native-window-controls .restore-icon,
html.window-maximized .native-window-controls .maximize-icon {
  display: none;
}

html.window-maximized .native-window-controls .restore-icon {
  display: block;
}
/* The hosted monitor-only profile has no browser or money-moving automation. */
.monitor-only [data-tab="autobet"],
.monitor-only [data-pane="autobet"],
.monitor-only [data-tab="account"],
.monitor-only [data-pane="account"],
.monitor-only .profile-settings-account,
.monitor-only .profile-settings-wallet,
.monitor-only #profile-row-autobet,
.monitor-only #profile-row-withdraw,
.monitor-only label:has(#profile-alert-autobet),
.monitor-only label:has(#profile-alert-safety),
.monitor-only label:has(#profile-alert-withdraw) {
  display: none !important;
}

/* Profile-style authentication sheet. The black surface is intentionally
   independent of the dashboard theme so sign-in and Profile feel related. */
html.auth-modal-active,
body.auth-modal-active {
  overflow: hidden !important;
}

.auth-modal-overlay {
  --auth-bg: #000;
  --auth-surface: #050505;
  --auth-surface-2: #0a0a0a;
  --auth-line: #1f1f1f;
  --auth-line-strong: #303030;
  --auth-text: #f7f7f7;
  --auth-soft: #a0a0a0;
  --auth-muted: #646464;
  --aa-solid: var(--accent-hot, #f5a623);
  --aa-bright: color-mix(in srgb, var(--accent-hot, #f5a623) 72%, white);
  z-index: 10080;
  padding: 18px;
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: opacity 180ms ease;
}

.auth-profile-sheet.auth-card {
  width: min(760px, calc(100vw - 36px));
  max-width: none;
  height: min(560px, calc(100dvh - 36px));
  max-height: none;
  padding: 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  color: var(--auth-text);
  background: var(--auth-bg) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72);
  transform: translate3d(0, 18px, 0) scale(0.985);
  opacity: 0;
  transition: transform 420ms cubic-bezier(.16,1,.3,1), opacity 220ms ease;
}

.auth-modal-overlay.is-open .auth-profile-sheet {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.auth-profile-sheet .auth-card-sheen {
  left: 250px;
  right: 0;
  z-index: 4;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--aa-solid) 70%, transparent), transparent);
}

.auth-profile-sheet .auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  color: var(--auth-soft);
  background: var(--auth-surface-2);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.auth-profile-sheet .auth-close:hover { color: var(--aa-solid); border-color: color-mix(in srgb, var(--aa-solid) 55%, transparent); transform: rotate(5deg); }
.auth-profile-sheet .auth-close:disabled { opacity: .35; pointer-events: none; }
.auth-profile-sheet .auth-close svg { width: 17px; height: 17px; }

.auth-profile-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  border-right: 1px solid var(--auth-line);
  background: var(--auth-bg);
}

.auth-brand-lockup {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--auth-line);
}

.auth-profile-sheet .auth-logo-wrap {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 12px;
  border-color: var(--auth-line-strong);
  background: var(--auth-surface-2);
  box-shadow: none;
}
.auth-profile-sheet .auth-logo-wrap::before { display: none; }
.auth-profile-sheet .auth-logo { width: 25px; height: 25px; }
.auth-brand-lockup div:last-child { min-width: 0; display: grid; gap: 3px; }
.auth-brand-lockup span,
.auth-kicker,
.auth-main-head > span {
  color: var(--auth-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.auth-brand-lockup strong { overflow: hidden; color: var(--auth-text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.auth-rail-copy { padding: 34px 0 26px; }
.auth-rail-copy h2 { margin: 7px 0 8px; color: var(--auth-text); font-size: 24px; line-height: 1.08; letter-spacing: -.035em; }
.auth-rail-copy p { margin: 0; color: var(--auth-soft); font-size: 11px; line-height: 1.55; }

.auth-signal-map {
  position: relative;
  display: grid;
  gap: 17px;
  padding-left: 2px;
}
.auth-signal-point { position: relative; z-index: 2; display: grid; grid-template-columns: 31px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.auth-signal-point > span { width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--auth-line); border-radius: 9px; color: var(--auth-muted); background: var(--auth-surface); }
.auth-signal-point svg { width: 15px; height: 15px; }
.auth-signal-point div { display: grid; gap: 2px; }
.auth-signal-point b { color: var(--auth-soft); font-size: 11px; }
.auth-signal-point small { color: var(--auth-muted); font-size: 9px; }
.auth-signal-point em { min-width: 43px; padding: 3px 5px; border: 1px solid transparent; border-radius: 999px; color: #555; background: transparent; font-size: 7px; font-style: normal; font-weight: 850; letter-spacing: .08em; line-height: 1; text-align: center; transition: color 220ms ease, border-color 220ms ease, background-color 220ms ease; }
.auth-signal-point > span { position: relative; transition: color 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease; }
.auth-signal-point > span::before { content: ""; position: absolute; inset: -1px; border: 1px solid var(--aa-solid); border-radius: inherit; opacity: 0; transform: scale(.88); }
.auth-signal-point > span::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #001a0d; font-size: 15px; font-weight: 950; opacity: 0; transform: scale(.55); transition: opacity 180ms ease, transform 260ms cubic-bezier(.16,1,.3,1); }
.auth-signal-point.active > span { color: var(--aa-solid); border-color: color-mix(in srgb, var(--aa-solid) 65%, transparent); background: color-mix(in srgb, var(--aa-solid) 8%, var(--auth-surface)); }
.auth-signal-point.active > span::before { animation: authRailStagePulse 1.8s ease-out infinite; }
.auth-signal-point.active b { color: var(--auth-text); }
.auth-signal-point.active em { color: var(--aa-solid); border-color: color-mix(in srgb, var(--aa-solid) 28%, transparent); background: color-mix(in srgb, var(--aa-solid) 9%, transparent); }
.auth-signal-point.complete > span { color: transparent; border-color: color-mix(in srgb, #16d67a 68%, transparent); background: #16d67a; box-shadow: 0 0 0 3px color-mix(in srgb, #16d67a 10%, transparent); }
.auth-signal-point.complete > span svg { opacity: 0; transform: scale(.72); }
.auth-signal-point.complete > span::after { opacity: 1; transform: scale(1); }
.auth-signal-point.complete b { color: var(--auth-text); }
.auth-signal-point.complete small { color: var(--auth-soft); }
.auth-signal-point.complete em { color: #20df86; border-color: color-mix(in srgb, #16d67a 28%, transparent); background: color-mix(in srgb, #16d67a 9%, transparent); }
.auth-signal-track { position: absolute; z-index: 1; left: 17px; top: 16px; bottom: 16px; width: 1px; overflow: hidden; background: var(--auth-line); }
.auth-signal-track i { position: absolute; inset: 0; background: linear-gradient(var(--aa-solid), color-mix(in srgb, var(--aa-solid) 12%, transparent)); transform: scaleY(.08); transform-origin: top; opacity: .55; }
.auth-signal-track b { position: absolute; top: 0; left: -2px; width: 5px; height: 18px; border-radius: 5px; background: var(--aa-solid); opacity: 0; }
.auth-modal-overlay[data-state="loading"] .auth-signal-track i { animation: authRailCharge 1.4s cubic-bezier(.16,1,.3,1) forwards; }
.auth-modal-overlay[data-state="loading"] .auth-signal-track b { animation: authRailPacket 1.8s ease-in-out infinite; }
.auth-modal-overlay[data-state="success"] .auth-signal-track i { transform: scaleY(1); opacity: 1; }

.auth-trust { margin-top: auto; display: flex; align-items: flex-start; gap: 8px; padding-top: 16px; border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: 9px; line-height: 1.45; }
.auth-profile-sheet .auth-foot-dot { width: 5px; height: 5px; margin-top: 4px; animation: none; box-shadow: none; }

.auth-profile-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--auth-bg);
}
.auth-entry-view,
.auth-profile-sheet .auth-progress,
.auth-success { height: 100%; padding: 34px 34px 28px; }
.auth-entry-view { display: flex; flex-direction: column; }
.auth-main-head { display: grid; gap: 5px; margin-bottom: 24px; padding-right: 35px; }
.auth-main-head strong { color: var(--auth-text); font-size: 22px; line-height: 1.1; letter-spacing: -.03em; }
.auth-main-head small { color: var(--auth-muted); font-size: 11px; line-height: 1.45; }

.auth-profile-sheet .auth-alert {
  margin: -8px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,90,90,.34);
  border-radius: 9px;
  color: #ff7777;
  background: rgba(255,90,90,.08);
  font-size: 11px;
  animation: authErrorIn 260ms cubic-bezier(.16,1,.3,1);
  outline: none;
}

.auth-conflict { margin: -8px 0 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--aa-solid) 40%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--aa-solid) 7%, transparent); }
.auth-conflict > div:first-child { display: grid; gap: 4px; }
.auth-conflict b { color: var(--auth-text); font-size: 12px; }
.auth-conflict small { color: var(--auth-soft); font-size: 10px; line-height: 1.4; }
.auth-conflict > div:last-child { display: flex; justify-content: flex-end; gap: 7px; margin-top: 11px; }
.auth-conflict button { min-height: 32px; padding: 0 11px; border: 1px solid var(--auth-line-strong); border-radius: 8px; color: var(--auth-soft); background: var(--auth-surface-2); font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.auth-conflict #auth-replace-confirm { border-color: color-mix(in srgb, var(--aa-solid) 55%, transparent); color: #160f00; background: var(--aa-solid); }

.auth-profile-sheet .auth-pane.active { animation: none; }
.auth-profile-sheet .auth-seg { padding: 3px; margin-bottom: 18px; border-radius: 10px; border-color: var(--auth-line); background: var(--auth-surface); }
.auth-profile-sheet .auth-seg-glider { inset: 3px auto 3px 3px; width: calc(50% - 3px); border: 1px solid var(--auth-line-strong); border-radius: 7px; background: var(--auth-surface-2); box-shadow: none; }
.auth-profile-sheet .auth-seg-btn { min-height: 34px; padding: 6px; color: var(--auth-muted); font-size: 11px; }
.auth-profile-sheet .auth-seg-btn.active { color: var(--auth-text); }
.auth-profile-sheet .auth-form { margin: 0; }
.auth-profile-sheet .auth-pane.active .auth-form:not([hidden]) > * { animation: authFieldIn 420ms cubic-bezier(.16,1,.3,1) backwards; }
.auth-profile-sheet .auth-pane.active .auth-form:not([hidden]) > *:nth-child(2) { animation-delay: 45ms; }
.auth-profile-sheet .auth-pane.active .auth-form:not([hidden]) > *:nth-child(3) { animation-delay: 90ms; }
.auth-profile-sheet .auth-field { margin-bottom: 11px; }
.auth-profile-sheet .auth-inp,
.auth-profile-sheet .auth-drop-trigger { height: 50px; border-radius: 11px; border-color: var(--auth-line); color: var(--auth-text); background: var(--auth-surface); box-shadow: none; }
.auth-profile-sheet .auth-inp:hover,
.auth-profile-sheet .auth-drop-trigger:hover { border-color: var(--auth-line-strong); }
.auth-profile-sheet .auth-inp:focus,
.auth-profile-sheet .auth-drop.open .auth-drop-trigger { border-color: color-mix(in srgb, var(--aa-solid) 70%, transparent); background: var(--auth-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--aa-solid) 12%, transparent); }
.auth-profile-sheet .auth-float { color: var(--auth-muted); font-size: 13px; }
.auth-profile-sheet .auth-inp:focus ~ .auth-float,
.auth-profile-sheet .auth-inp:not(:placeholder-shown) ~ .auth-float,
.auth-profile-sheet .auth-inp:-webkit-autofill ~ .auth-float { color: var(--aa-solid); background: var(--auth-bg); }
.auth-profile-sheet .auth-eye { color: var(--auth-muted); }

.auth-profile-sheet .auth-cta {
  height: 46px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  color: #181000;
  background: var(--aa-solid);
  box-shadow: none;
  transition: transform 160ms ease, background 160ms ease;
}
.auth-profile-sheet .auth-cta::after { display: none; }
.auth-profile-sheet .auth-cta:hover { transform: translateY(-1px); background: var(--aa-bright); box-shadow: none; filter: none; }
.auth-profile-sheet .auth-cta svg { width: 16px; height: 16px; transition: transform 200ms cubic-bezier(.16,1,.3,1); }
.auth-profile-sheet .auth-cta:hover svg { transform: translateX(3px); }
.auth-mobile-trust { display: none; }

.auth-profile-sheet .auth-progress {
  position: relative;
  inset: auto;
  z-index: auto;
  display: none;
  flex-direction: column;
  border-radius: 0;
  color: var(--auth-text);
  background: var(--auth-bg);
  opacity: 1;
  pointer-events: auto;
  transition: none;
}
.auth-modal-overlay[data-state="loading"] .auth-entry-view,
.auth-modal-overlay[data-state="success"] .auth-entry-view { display: flex; }
.auth-modal-overlay[data-state="loading"] .auth-progress,
.auth-modal-overlay[data-state="success"] .auth-progress { display: none; }
.auth-modal-overlay[data-state="loading"] .auth-entry-view input,
.auth-modal-overlay[data-state="success"] .auth-entry-view input { color: var(--auth-soft); }
.auth-modal-overlay[data-state="loading"] .auth-cta,
.auth-modal-overlay[data-state="success"] .auth-cta { cursor: wait; }
.auth-stage-visual { position: relative; height: 84px; margin: 2px 0 20px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--auth-line); border-radius: 11px; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--aa-solid) 9%, transparent), transparent 38%), var(--auth-surface); }
.auth-stage-route { position: absolute; left: 11%; right: 11%; top: 50%; height: 1px; overflow: visible; container-type: inline-size; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--aa-solid) 45%, var(--auth-line-strong)) 18%, color-mix(in srgb, var(--aa-solid) 45%, var(--auth-line-strong)) 82%, transparent); }
.auth-stage-route i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--aa-solid) 30%, var(--aa-solid) 70%, transparent); transform: scaleX(1); opacity: .25; animation: authRouteCharge 2.6s ease-in-out infinite; }
.auth-stage-route b { position: absolute; top: -1px; left: 0; width: 72px; height: 3px; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--aa-solid) 42%, #fff1c5 55%, var(--aa-solid) 68%, transparent); animation: authRoutePacket 2.6s cubic-bezier(.45,0,.2,1) infinite; }
.auth-stage-lock { position: relative; z-index: 2; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--aa-solid) 72%, transparent); border-radius: 14px; color: var(--aa-solid); background: color-mix(in srgb, var(--aa-solid) 8%, #050505); box-shadow: 0 0 0 6px rgba(0,0,0,.72); }
.auth-stage-lock::before,
.auth-stage-lock::after { content: ""; position: absolute; inset: -1px; border: 1px solid color-mix(in srgb, var(--aa-solid) 60%, transparent); border-radius: inherit; opacity: 0; animation: authShieldRing 2.6s cubic-bezier(.16,1,.3,1) infinite; }
.auth-stage-lock::after { animation-delay: 1.3s; }
.auth-stage-lock svg { width: 20px; height: 20px; }
.auth-stage-lock .auth-scan-ring { transform-box: fill-box; transform-origin: center; animation: authScanTurn 2.6s linear infinite; }
.auth-stage-list { margin: 0; padding: 0; display: grid; list-style: none; border: 1px solid var(--auth-line); border-radius: 11px; overflow: hidden; }
.auth-stage-list li { min-height: 58px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--auth-line); color: var(--auth-muted); }
.auth-stage-list li:last-child { border-bottom: 0; }
.auth-stage-list li > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--auth-line); border-radius: 8px; background: var(--auth-surface); }
.auth-stage-list svg { width: 14px; height: 14px; }
.auth-stage-list li > div { display: grid; gap: 2px; }
.auth-stage-list b { color: var(--auth-soft); font-size: 11px; }
.auth-stage-list small { font-size: 9px; }
.auth-stage-list em { font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .08em; }
.auth-stage-list li.complete > span,
.auth-stage-list li.active > span { border-color: color-mix(in srgb, var(--aa-solid) 45%, transparent); color: var(--aa-solid); }
.auth-stage-list li.complete em { color: #16d67a; }
.auth-stage-list li.active em { color: var(--aa-solid); }
.auth-stage-list li.active { background: color-mix(in srgb, var(--aa-solid) 5%, transparent); }
.auth-wait-note { margin: auto 0 0; color: var(--auth-muted); font-size: 9px; text-align: center; }

.auth-success { display: none; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.auth-modal-overlay[data-state="success"] .auth-success { display: none; }
.auth-success-mark { position: relative; width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 20px; border: 1px solid color-mix(in srgb, var(--aa-solid) 55%, transparent); border-radius: 20px; color: var(--aa-solid); background: color-mix(in srgb, var(--aa-solid) 7%, transparent); }
.auth-success-mark svg { width: 29px; height: 29px; }
.auth-success-mark i { position: absolute; inset: -1px; border: 1px solid var(--aa-solid); border-radius: inherit; animation: authSuccessRing 700ms cubic-bezier(.16,1,.3,1) forwards; }
.auth-success > span { color: var(--aa-solid); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-success > strong { margin-top: 8px; color: var(--auth-text); font-size: 22px; }
.auth-success > small { margin-top: 6px; color: var(--auth-muted); font-size: 10px; }

@keyframes authFieldIn { from { opacity: 0; transform: translate3d(0,8px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes authViewIn { from { opacity: 0; transform: translate3d(8px,0,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes authErrorIn { from { opacity: 0; transform: translate3d(0,-5px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes authRailCharge { to { transform: scaleY(1); } }
@keyframes authRailPacket { 0% { opacity: 0; transform: translateY(-16px); } 12% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(110px); } }
@keyframes authRailStagePulse { 0% { opacity: .48; transform: scale(.88); } 72%,100% { opacity: 0; transform: scale(1.32); } }
@keyframes authRouteCharge { 0%,100% { opacity: .18; } 50% { opacity: .72; } }
@keyframes authRoutePacket { 0% { opacity: 0; transform: translateX(-72px); } 14% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; transform: translateX(100cqw); } }
@keyframes authShieldRing { 0% { opacity: .62; transform: scale(.92); } 68%,100% { opacity: 0; transform: scale(1.55); } }
@keyframes authScanTurn { to { transform: rotate(360deg); } }
@keyframes authSuccessRing { from { opacity: .8; transform: scale(.8); } to { opacity: 0; transform: scale(1.55); } }

html[data-theme="light"] .auth-modal-overlay,
html[data-theme="light"] .auth-profile-sheet,
html[data-theme="light"] .auth-profile-rail,
html[data-theme="light"] .auth-profile-main,
html[data-theme="light"] .auth-entry-view,
html[data-theme="light"] .auth-profile-sheet .auth-progress { background-color: #000 !important; color: var(--auth-text); }

@media (max-width: 767px) {
  .auth-modal-overlay { padding: 12px; align-items: center; justify-content: center; }
  .auth-profile-sheet.auth-card {
    width: min(460px, calc(100vw - 24px));
    height: auto;
    max-height: calc(100dvh - 24px);
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    border: 1px solid var(--auth-line);
    border-radius: 16px;
  }
  .auth-profile-sheet .auth-card-sheen { left: 0; }
  .auth-profile-rail { padding: 14px; border-right: 0; border-bottom: 1px solid var(--auth-line); }
  .auth-brand-lockup { padding: 0; border: 0; }
  .auth-rail-copy,
  .auth-trust { display: none; }
  .auth-signal-map { display: none; }
  .auth-modal-overlay[data-state="loading"] .auth-signal-map,
  .auth-modal-overlay[data-state="success"] .auth-signal-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
    padding: 0 3px;
  }
  .auth-modal-overlay[data-state="loading"] .auth-signal-track,
  .auth-modal-overlay[data-state="success"] .auth-signal-track {
    /* The three equal grid cells put the endpoint node centres at 1/6 and
       5/6. Anchoring the rail to those exact centres prevents its one-pixel
       stroke from protruding past Protected or Connected. */
    left: calc(100% / 6);
    right: calc(100% / 6);
    top: 14px;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .auth-modal-overlay[data-state="loading"] .auth-signal-track i,
  .auth-modal-overlay[data-state="success"] .auth-signal-track i {
    transform: scaleX(.08);
    transform-origin: left;
  }
  .auth-modal-overlay[data-state="loading"] .auth-signal-track i { animation: authMobileRailCharge 1.4s cubic-bezier(.16,1,.3,1) forwards; }
  .auth-modal-overlay[data-state="success"] .auth-signal-track i { transform: scaleX(1); }
  .auth-modal-overlay[data-state="loading"] .auth-signal-track b,
  .auth-modal-overlay[data-state="success"] .auth-signal-track b { display: none; }
  .auth-modal-overlay[data-state="loading"] .auth-signal-point,
  .auth-modal-overlay[data-state="success"] .auth-signal-point {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    text-align: center;
  }
  .auth-modal-overlay[data-state="loading"] .auth-signal-point > span,
  .auth-modal-overlay[data-state="success"] .auth-signal-point > span { width: 28px; height: 28px; border-radius: 8px; }
  .auth-modal-overlay[data-state="loading"] .auth-signal-point div,
  .auth-modal-overlay[data-state="success"] .auth-signal-point div { display: block; }
  .auth-modal-overlay[data-state="loading"] .auth-signal-point b,
  .auth-modal-overlay[data-state="success"] .auth-signal-point b { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .auth-modal-overlay[data-state="loading"] .auth-signal-point small,
  .auth-modal-overlay[data-state="success"] .auth-signal-point small,
  .auth-modal-overlay[data-state="loading"] .auth-signal-point em,
  .auth-modal-overlay[data-state="success"] .auth-signal-point em { display: none; }
  .auth-entry-view,
  .auth-profile-sheet .auth-progress,
  .auth-success { height: auto; padding: 22px 16px 18px; }
  .auth-profile-main { overflow-y: auto; }
  .auth-profile-sheet .auth-progress { min-height: min(480px, calc(100dvh - 95px)); }
  .auth-success { min-height: min(380px, calc(100dvh - 95px)); }
  .auth-main-head { margin-bottom: 20px; }
  .auth-main-head strong { font-size: 21px; }
  .auth-mobile-trust { margin-top: 18px; padding-top: 0; display: flex; justify-content: center; gap: 7px; color: var(--auth-muted); font-size: 9px; }
  .auth-stage-visual { height: 66px; margin-bottom: 15px; }
  .auth-stage-list li { min-height: 54px; }
  .auth-profile-sheet .auth-close { top: 18px; right: 14px; }
}

/* Phone live view: every dashboard scroller keeps touch/wheel behaviour but
   contributes no scrollbar chrome. Modal overlays are siblings of .pane-live,
   so their deliberately visible internal scrollbars remain untouched. */
@media (max-width: 767px) {
  .pane-live,
  .pane-live * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .pane-live::-webkit-scrollbar,
  .pane-live *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
}

@keyframes authMobileRailCharge { to { transform: scaleX(1); } }

/* Unified keyboard focus language.
   Chromium/WebView2 otherwise injects a bright rectangular focus ring on
   controls (most visibly the Phone tab when the auth gate opens). Keep focus
   accessible, but make it follow the control shape and the selected accent. */
:where(
  button,
  a[href],
  input,
  select,
  textarea,
  summary,
  [role="button"],
  [role="tab"],
  [role="switch"],
  [tabindex]:not([tabindex="-1"])
):focus {
  outline: none !important;
}

:where(
  button,
  a[href],
  summary,
  [role="button"],
  [role="tab"],
  [role="switch"],
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-hot, #f5a623) 78%, white) !important;
  outline-offset: 2px;
}

:where(input, select, textarea):focus-visible {
  outline: none !important;
  border-color: color-mix(in srgb, var(--accent-hot, #f5a623) 68%, transparent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-hot, #f5a623) 13%, transparent) !important;
}

.auth-profile-sheet .auth-seg-btn:focus-visible {
  outline: none !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--aa-solid) 72%, transparent) !important;
  border-radius: 7px;
}

@media (max-height: 610px) and (min-width: 768px) {
  .auth-profile-sheet.auth-card { height: calc(100dvh - 24px); }
  .auth-entry-view,
  .auth-profile-sheet .auth-progress,
  .auth-success { padding-top: 24px; padding-bottom: 22px; }
  .auth-main-head { margin-bottom: 17px; }
  .auth-rail-copy { padding: 24px 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-profile-sheet,
  .auth-profile-sheet *,
  .auth-profile-sheet *::before,
  .auth-profile-sheet *::after { animation: none !important; transition-duration: .001ms !important; }
}

html.reduce-motion .auth-profile-sheet,
html.reduce-motion .auth-profile-sheet *,
html.reduce-motion .auth-profile-sheet *::before,
html.reduce-motion .auth-profile-sheet *::after { animation: none !important; transition-duration: .001ms !important; }

/* Final payout and mobile-sheet pass. The 1win approval surface belongs to the
   Auto-withdraw card, so it inherits the profile theme and never takes over the
   whole application. */
.withdraw-approval-viewer {
  position: relative !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 310px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  overflow: hidden !important;
  border: 1px solid var(--ps-border-strong) !important;
  border-radius: 12px !important;
  color: var(--ps-text) !important;
  background: var(--ps-bg) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.withdraw-approval-viewer[hidden] { display: none !important; }
.autowithdraw-card.approval-is-open {
  border-color: color-mix(in srgb, var(--ps-accent) 52%, var(--ps-border)) !important;
}
.withdraw-approval-head {
  min-height: 52px !important;
  padding: 9px 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  border-bottom: 1px solid var(--ps-border) !important;
  background: var(--ps-surface) !important;
}
.withdraw-approval-head > div:first-child { min-width: 0; display: grid; gap: 2px; }
.withdraw-approval-head small { color: var(--ps-accent) !important; font-size: 8px !important; font-weight: 900 !important; letter-spacing: .1em !important; }
.withdraw-approval-head strong { color: var(--ps-text) !important; font-size: 12px !important; }
.withdraw-approval-head span { color: var(--ps-muted) !important; font-size: 10px !important; }
.withdraw-approval-tools { display: flex !important; gap: 6px !important; flex-wrap: nowrap !important; }
.withdraw-approval-tools button {
  min-height: 30px !important;
  padding: 0 9px !important;
  border: 1px solid var(--ps-border-strong) !important;
  border-radius: 8px !important;
  color: var(--ps-soft) !important;
  background: var(--ps-surface-2) !important;
  font: inherit !important;
  font-size: 9px !important;
  font-weight: 800 !important;
}
.withdraw-approval-display {
  position: relative !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  background: #050505 !important;
  touch-action: none !important;
}
.withdraw-approval-display > div:not(.withdraw-approval-loading) { transform-origin: top center !important; }
.withdraw-approval-loading { margin: auto !important; padding: 14px !important; color: var(--ps-soft) !important; font-size: 11px !important; font-weight: 750 !important; text-align: center !important; }
.withdraw-approval-loading.is-error { color: var(--ps-danger) !important; }
.withdraw-approval-viewer footer {
  min-height: 34px !important;
  padding: 7px 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  border-top: 1px solid var(--ps-border) !important;
  color: var(--ps-muted) !important;
  background: var(--ps-surface) !important;
  font-size: 9px !important;
}
.withdraw-approval-viewer footer b { flex: 0 0 auto; color: var(--ps-text) !important; font-size: 10px !important; font-variant-numeric: tabular-nums; }

.autowithdraw-actions { margin-top: 12px; justify-content: flex-end; }
.autowithdraw-actions > button[hidden] { display: none !important; }

html.auth-active .toast-container,
body.auth-active .toast-container { display: none !important; }
html.auth-active :is(#awaiting-modal, #logs-modal, #profile-modal, .profile-confirm-overlay),
body.auth-active :is(#awaiting-modal, #logs-modal, #profile-modal, .profile-confirm-overlay) {
  display: none !important;
}

@media (max-width: 767px) {
  .fresh-profile-overlay {
    inset: 0 !important;
    width: 100dvw !important;
    height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  .profile-settings-shell {
    width: 100dvw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .profile-settings-shell::after { display: none !important; content: none !important; }
  .profile-settings-shell .profile-settings-rail {
    padding: env(safe-area-inset-top, 0px) 12px 10px !important;
    row-gap: 8px !important;
    align-content: start !important;
    border-top: 0 !important;
  }
  .profile-settings-shell .profile-settings-account,
  .profile-settings-shell .profile-settings-wallet,
  .profile-settings-shell .fresh-profile-close { margin-top: 6px !important; }
  .profile-settings-shell .profile-settings-account { height: 54px !important; min-height: 54px !important; }
  .profile-settings-shell .profile-settings-wallet { height: 50px !important; min-height: 50px !important; }

  .awaiting-modal-overlay,
  .awaiting-modal-panel {
    inset: 0 !important;
    width: 100dvw !important;
    height: 100dvh !important;
    margin: 0 !important;
  }
  .awaiting-header {
    position: relative !important;
    top: 0 !important;
    min-height: calc(52px + env(safe-area-inset-top, 0px)) !important;
    padding: env(safe-area-inset-top, 0px) 14px 0 !important;
    align-items: center !important;
    border-top: 0 !important;
  }

  .withdraw-approval-viewer { height: clamp(250px, 42dvh, 320px) !important; border-radius: 10px !important; }
  .withdraw-approval-head { min-height: 48px !important; padding: 7px 8px !important; }
  .withdraw-approval-tools button { min-height: 28px !important; padding-inline: 7px !important; }
  .withdraw-approval-viewer footer { font-size: 8px !important; }
}

/* Android already applies status/cutout/navigation insets to the native WebView.
   Do not apply the browser safe-area inset a second time inside full-screen
   sheets, otherwise their headers begin one status-bar too low. */
@media (max-width: 767px) {
  html.tauri-android .profile-settings-shell .profile-settings-rail {
    padding-top: 0 !important;
  }
  html.tauri-android .awaiting-header {
    min-height: 52px !important;
    padding-top: 0 !important;
  }
}

/* Keep the profile close control owned by the content pane on desktop. */
@media (min-width: 768px) {
  .profile-settings-shell .profile-settings-main {
    position: relative;
  }

  .profile-settings-shell .profile-settings-main > .fresh-profile-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    margin: 0 !important;
    z-index: 4;
  }
}

/* On compact layouts it remains in the top-right of the modal header. */
@media (max-width: 767px) {
  .profile-settings-shell .profile-settings-main {
    position: static;
  }

  .profile-settings-shell .profile-settings-main > .fresh-profile-close {
    position: absolute !important;
    top: calc(14px + env(safe-area-inset-top, 0px)) !important;
    right: 14px !important;
    margin: 0 !important;
    z-index: 4;
  }
}

/* Auto-withdraw payout dialog final alignment pass. Keep the route label and
   encrypted badge on the same visual baseline, and make card/crypto panes swap
   without changing the modal footprint. */
#autowithdraw-card .autowithdraw-heading-copy {
  min-width: 0 !important;
}

#autowithdraw-card .autowithdraw-heading-meta {
  min-height: 24px !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}

#autowithdraw-card #autowithdraw-kicker,
#autowithdraw-card .autowithdraw-live-pill {
  height: 24px !important;
  min-height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

#autowithdraw-card #autowithdraw-kicker {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

#autowithdraw-card .autowithdraw-live-pill {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-self: center !important;
}

#autowithdraw-card .autowithdraw-form {
  grid-template-rows: auto minmax(256px, auto) auto !important;
}

#autowithdraw-card #autowithdraw-crypto-fields,
#autowithdraw-card #autowithdraw-card-fields {
  min-height: 256px !important;
  align-content: start !important;
}

#autowithdraw-card #autowithdraw-crypto-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#autowithdraw-card #autowithdraw-card-fields {
  display: grid !important;
  grid-template-rows: auto auto auto;
  gap: 10px !important;
}

#autowithdraw-card #autowithdraw-card-fields[hidden],
#autowithdraw-card #autowithdraw-crypto-fields[hidden] {
  display: none !important;
}

@media (max-width: 460px) {
  #autowithdraw-card .autowithdraw-heading-meta {
    flex-wrap: wrap !important;
    align-items: center !important;
  }

  #autowithdraw-card #autowithdraw-crypto-fields,
  #autowithdraw-card #autowithdraw-card-fields {
    min-height: 300px !important;
  }

  #autowithdraw-card #autowithdraw-crypto-fields {
    grid-template-columns: 1fr !important;
  }
}

.native-update-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  width: min(360px, calc(100vw - 36px));
  padding: 14px 44px 14px 16px;
  border: 1px solid rgba(245,166,35,.45);
  border-radius: 14px;
  background: rgba(20,18,12,.96);
  color: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
}
.native-update-toast strong,.native-update-toast span,.native-update-toast small { display:block; }
.native-update-toast strong { color:#f5a623; margin-bottom:4px; }
.native-update-toast span { font-size:13px; }
.native-update-toast small { margin-top:5px; color:#aaa; }
.native-update-toast button { position:absolute; top:8px; right:8px; border:0; background:transparent; color:#aaa; cursor:pointer; }
