/* Kalshi Bot dashboard. Visual language follows the MenuFit Creators site: one blue theme,
   translucent white cards, Inter, green accents. */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #12308f; --surface: rgba(255,255,255,.08); --surface-2: rgba(255,255,255,.06); --surface-solid: #1d3591;
  --ink: #ffffff; --ink-2: #c9d6ff; --muted: #9fb2e6;
  --grid: rgba(255,255,255,.12); --axis: rgba(255,255,255,.26); --border: rgba(255,255,255,.16); --hover: rgba(255,255,255,.06);
  --accent: #16a34a; --accent-ink: #86efac; --accent-wash: rgba(34,197,94,.16);
  /* status: wins and losses always come with a sign and an icon, never color alone */
  --win: #4ade80; --win-ink: #86efac; --win-wash: rgba(74,222,128,.14);
  --loss: #fca5a5; --loss-ink: #fecaca; --loss-wash: rgba(252,165,165,.14);
  --warn: #fbbf24;
  /* chart identities: amber = AI, sky = the blended fair value, white = the market */
  --ai: #fbbf24; --blend: #7dd3fc; --market: #ffffff; --value-line: rgba(255,255,255,.62);
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(3,10,40,.25);
  --shadow: 0 1px 2px rgba(3,10,40,.3), 0 16px 36px -18px rgba(3,10,40,.7);
  color-scheme: dark;
}

body { color: var(--ink); font: 14px/1.45 var(--font); background-color: var(--bg);
  background-image: radial-gradient(60% 50% at 85% 15%, rgba(59,122,247,.45), transparent 70%), radial-gradient(50% 45% at 0% 100%, rgba(34,197,94,.2), transparent 70%), linear-gradient(135deg, #0b1a4a 0%, #1638a8 52%, #0e2470 100%);
  background-attachment: fixed; }
a { color: var(--accent-ink); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.25); color: #fff; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }

/* ----- top bar ----- */
.sitebar { position: sticky; top: 0; z-index: 50; background: rgba(10,24,80,.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.08); }
.sitebar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1440px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 10px) clamp(16px, 4vw, 48px) 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.bar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; min-width: 0; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.status span { overflow: hidden; text-overflow: ellipsis; }
.status[data-state="running"] i { background: var(--win); box-shadow: 0 0 0 4px rgba(74,222,128,.22); animation: pulse 1.4s ease-in-out infinite; }
.status[data-state="waiting"] i { background: var(--win); }
.status[data-state="stalled"] i, .status[data-state="offline"] i, .status[data-state="asleep"] i { background: var(--warn); }
.status[data-state="stopped"] i, .status[data-state="never"] i { background: var(--loss); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(74,222,128,0); } }
@media (prefers-reduced-motion: reduce) { .status i { animation: none !important; } }

.secnav { display: flex; gap: 6px; max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 10px; overflow-x: auto; scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { color: #fff; text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.secnav a:hover { background: rgba(255,255,255,.18); }
.secnav a[aria-current] { background: #fff; color: #1638a8; border-color: #fff; }

/* ----- page ----- */
.shell { max-width: 1440px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 48px) calc(env(safe-area-inset-bottom, 0px) + 56px); }
.main { display: grid; gap: 30px; min-width: 0; }
.main.stale { opacity: .55; transition: opacity .3s; }
.block { display: grid; gap: 14px; min-width: 0; scroll-margin-top: 120px; }
.block > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-end; }
.block h2 { font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.block .hint { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; max-width: 84ch; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; min-width: 0; box-shadow: var(--shadow-sm); }
.lbl { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fine { font-size: 12px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; background: var(--accent); color: #fff; border: 0; border-radius: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--border); font-weight: 550; box-shadow: var(--shadow-sm); }
.btn.secondary:hover { border-color: var(--accent-ink); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.seg button { height: 30px; padding: 0 12px; background: none; border: 0; border-radius: 10px; color: var(--ink-2); font-size: 13px; font-weight: 500; transition: background .15s, color .15s; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg button small { color: var(--muted); font-weight: 500; margin-left: 5px; font-variant-numeric: tabular-nums; }
.seg button:disabled { opacity: .4; cursor: default; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--border); color: var(--ink-2); background: var(--surface-2); white-space: nowrap; }
.tag.yes { color: #052e16; background: var(--win); border-color: var(--win); }
.tag.no { color: #3b0a0a; background: var(--loss); border-color: var(--loss); }
.tag.won { color: var(--win-ink); background: var(--win-wash); border-color: rgba(74,222,128,.4); }
.tag.lost { color: var(--loss-ink); background: var(--loss-wash); border-color: rgba(252,165,165,.4); }
.tag.warn { color: #fde68a; border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.12); }
.up { color: var(--win-ink); }
.down { color: var(--loss-ink); }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 30px 20px; color: var(--ink-2); border: 1.5px dashed var(--axis); border-radius: var(--r-lg); background: var(--surface); }
.empty b { color: var(--ink); font-size: 15px; font-weight: 600; }
.empty p { max-width: 56ch; font-size: 13.5px; }
.empty code { font-size: 12.5px; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.25); color: #fff; }
.nudge { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-wash); border: 1px solid rgba(34,197,94,.3); font-size: 13px; color: var(--ink-2); }
.nudge.warn { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35); }
.nudge b { color: var(--ink); font-weight: 650; }

/* ----- hero ----- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 28px; align-items: center; padding: 24px 26px;
  background: radial-gradient(70% 90% at 90% 10%, rgba(59,122,247,.4), transparent 70%), radial-gradient(60% 80% at 0% 110%, rgba(34,197,94,.22), transparent 70%), rgba(255,255,255,.07); }
.hero .big { font-size: clamp(44px, 6vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; margin-top: 4px; }
.hero .big small { font-size: .4em; font-weight: 600; letter-spacing: -.01em; margin-left: 8px; }
.hero .sub { color: var(--ink-2); font-size: 14px; margin-top: 8px; }
.hero .sub b { color: var(--ink); font-weight: 650; }
.hero-split { display: grid; gap: 10px; }
.split-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.split-row span { color: var(--ink-2); font-size: 13.5px; }
.split-row b { font-size: 18px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.split-row.total { background: var(--surface); }
.split-row.total b { font-size: 20px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); padding: 20px 18px; } }

/* ----- stat tiles ----- */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.tile { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile .tx { display: grid; gap: 1px; min-width: 0; flex: 1; }
.tile .k { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile .v { font-size: 26px; font-weight: 650; letter-spacing: -.025em; line-height: 1.15; }
.tile .s { font-size: 12px; color: var(--ink-2); }
.meter { position: relative; height: 6px; border-radius: 999px; background: rgba(251,191,36,.22); margin-top: 6px; overflow: hidden; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ai); transition: width .3s; }
.meter.over > i { background: var(--loss); }

/* ----- charts ----- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.charts { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 1080px) { .charts { grid-template-columns: minmax(0, 1fr); } }
.chart-card { display: grid; gap: 10px; align-content: start; }
.chart-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.chart-h h3 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.chart-h p { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key-line { display: inline-block; width: 16px; height: 2px; border-radius: 2px; }
.key-box { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.chart { position: relative; width: 100%; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axisline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .ref { stroke: rgba(255,255,255,.55); stroke-width: 1.2; stroke-dasharray: 4 4; }
.chart .ref-label { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.chart .end-label { fill: var(--ink); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: rgba(255,255,255,.55); stroke-width: 1; }
.chart .dot { stroke: var(--surface-solid); stroke-width: 2; }
.chart .bar { transition: filter .12s; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .hit:focus + .bar { filter: brightness(1.25); }
.chart .hit:focus { outline: none; }
.chart-empty { display: grid; place-items: center; min-height: 160px; color: var(--muted); font-size: 13px; text-align: center; border: 1px dashed var(--axis); border-radius: var(--r-md); }
.tbl-toggle { flex: none; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.dtable td { padding: 7px 8px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
.dtable td:not(:first-child), .dtable th:not(:first-child) { text-align: right; }
.table-wrap { max-height: 260px; overflow: auto; }

.tip { position: fixed; z-index: 100; pointer-events: none; min-width: 140px; max-width: 280px; padding: 10px 12px; border-radius: 12px; background: rgba(8,18,60,.96); border: 1px solid var(--border); box-shadow: 0 16px 30px -12px rgba(0,0,0,.7); font-size: 12.5px; color: var(--ink-2); }
.tip .t { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .r b { color: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip .r span { display: inline-flex; align-items: center; gap: 6px; }

/* ----- rows (positions, orders, trades) ----- */
.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(4, minmax(0, 1fr)); gap: 6px 16px; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); min-width: 0; }
.row .what { display: grid; gap: 3px; min-width: 0; }
.row .what .ev { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .what .tt { font-size: 14px; font-weight: 600; line-height: 1.3; }
.row .what .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.row .cell { display: grid; gap: 1px; justify-items: end; text-align: right; min-width: 0; }
.row .cell .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.row .cell .v { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .cell .s { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.orders { grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)); }
.row.trades { grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)); }
.pnl { display: inline-flex; align-items: center; gap: 4px; }
.pnl svg { width: 11px; height: 11px; fill: currentColor; }
@media (max-width: 760px) {
  .row, .row.orders, .row.trades { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 14px; }
  .row .what { grid-column: 1 / -1; }
  .row .cell { justify-items: start; text-align: left; }
}
.more { justify-self: center; }

/* ----- forecasts ----- */
.acc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .acc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; display: grid; gap: 1px; min-width: 0; }
.mini .k { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.mini .v { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.mini .s { font-size: 11.5px; color: var(--ink-2); }
.fcards { display: grid; gap: 10px; }
details.fc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
details.fc > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 14px 18px; border-radius: var(--r-lg); }
details.fc > summary::-webkit-details-marker { display: none; }
details.fc > summary:hover { background: var(--hover); }
.fc-t { display: grid; gap: 4px; min-width: 0; }
.fc-t b { font-size: 15px; font-weight: 650; }
.fc-t .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--ink-2); }
.fc-side { display: flex; align-items: center; gap: 10px; }
.chev { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
details.fc[open] .chev { transform: rotate(180deg); }
.fc-body { display: grid; gap: 14px; padding: 4px 18px 18px; border-top: 1px solid var(--grid); }
.fc-body .summary { font-size: 14px; color: var(--ink); margin-top: 12px; }
.evidence { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; display: grid; gap: 3px; }
.fm { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.fm-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fm-h b { font-size: 13.5px; font-weight: 600; }
.fm .why { font-size: 13px; color: var(--ink-2); }
.track { position: relative; height: 26px; margin: 2px 8px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: var(--grid); border-radius: 2px; }
.track .tk { position: absolute; top: 18px; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track .m { position: absolute; top: 13px; transform: translate(-50%, -50%); }
.mk-market { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--market); box-shadow: 0 0 0 2px var(--surface-solid); background: var(--surface-solid); }
.mk-ai { width: 12px; height: 12px; background: var(--ai); transform: translate(-50%, -50%) rotate(45deg) !important; box-shadow: 0 0 0 2px var(--surface-solid); }
.mk-blend { width: 12px; height: 12px; border-radius: 50%; background: var(--blend); box-shadow: 0 0 0 2px var(--surface-solid); }
.vals { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.vals span { display: inline-flex; align-items: center; gap: 6px; }
.vals b { color: var(--ink); font-weight: 650; }
.sym { display: inline-block; flex: none; }
.sym.market { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--market); }
.sym.ai { width: 8px; height: 8px; background: var(--ai); transform: rotate(45deg); margin: 0 1px; }
.sym.blend { width: 9px; height: 9px; border-radius: 50%; background: var(--blend); }

/* ----- activity ----- */
.feed { display: grid; gap: 0; padding: 6px 0; }
.act { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 18px; border-bottom: 1px solid var(--grid); }
.act:last-child { border-bottom: 0; }
.act .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); }
.act .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.act[data-tone="win"] .ic { color: var(--win-ink); background: var(--win-wash); }
.act[data-tone="loss"] .ic { color: var(--loss-ink); background: var(--loss-wash); }
.act[data-tone="ai"] .ic { color: #fde68a; background: rgba(251,191,36,.12); }
.act[data-tone="warn"] .ic { color: #fde68a; background: rgba(251,191,36,.12); }
.act .msg { font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.act .msg small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.act time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.newflash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(134,239,172,.18); } to { background: transparent; } }

/* ----- footer, dialog ----- */
.foot { display: grid; gap: 10px; color: var(--ink-2); font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
dialog { border: 1px solid var(--border); border-radius: 22px; background: #10297e; color: var(--ink); padding: 22px; max-width: min(92vw, 380px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(3,10,40,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog h3 { font-size: 18px; font-weight: 700; }
dialog p { color: var(--ink-2); font-size: 13.5px; margin: 6px 0 14px; }
dialog img { display: block; width: 100%; max-width: 260px; margin: 0 auto 14px; border-radius: 14px; background: #fff; }
dialog .acts { display: flex; gap: 8px; justify-content: flex-end; }
.err { padding: 12px 14px; border-radius: var(--r-md); background: var(--loss-wash); border: 1px solid rgba(252,165,165,.35); color: var(--loss-ink); font-size: 13px; }

#modeSeg { flex-wrap: nowrap; flex: none; }
@media (max-width: 560px) {
  .brand span { display: none; }
  .phone-btn { display: none; }
  .sitebar-in { gap: 8px; }
  .bar-right { gap: 8px; }
  .status { padding: 0 10px; }
  #modeSeg button { padding: 0 10px; }
  .shell { padding-top: 16px; }
  .panel { padding: 16px; }
  .tile .v { font-size: 24px; }
}
