/* TradeAsur - Live — design tokens carried over from the previous ASURA
   dashboard (terminal dark + Dhan/Groww-style card themes). Heavy polish is
   deferred until detection is verified (handoff §6). */
:root {
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --radius: 14px; --radius-sm: 9px;
}
html[data-theme="terminal"] {
  --bg: #0a0a0c; --bg2: #131316; --bg3: #1b1b1f; --bg4: #232328;
  --border: #29292f; --text: #edeceb; --text2: #a3a2ab; --text3: #8a8994;   /* text3 ≥ 4.5:1 on the dark background (WCAG AA) */
  --gold: #d1a940; --gold-soft: rgba(209,169,64,.12); --gold-border: rgba(209,169,64,.35);
  --green: #33c078; --green-soft: rgba(51,192,120,.12); --red: #e5594f; --red-soft: rgba(229,89,79,.12);
  --amber: #e8ab48; --shadow: 0 8px 28px rgba(0,0,0,.45); --log-bg: #07070a;
}
html[data-theme^="card-"] {
  --bg: #f2f0f8; --bg2: #fff; --bg3: #f6f5fa; --bg4: #ececf3;
  --border: #e8e5f1; --text: #17151f; --text2: #55515f; --text3: #8d899a;
  --green: #1a9c5a; --green-soft: rgba(26,156,90,.10); --red: #d1403f; --red-soft: rgba(209,64,63,.10);
  --amber: #b6791b; --shadow: 0 10px 28px rgba(60,40,110,.09); --log-bg: #17151f;
  --radius: 20px; --radius-sm: 14px;
}
html[data-theme="card-purple"] { --gold: #7b2ff0; --gold-soft: rgba(123,47,240,.10); --gold-border: rgba(123,47,240,.30); }
html[data-theme="card-gold"]   { --gold: #c98a12; --gold-soft: rgba(201,138,18,.12); --gold-border: rgba(201,138,18,.32); }
html[data-theme="card-blue"]   { --gold: #1f5fa8; --gold-soft: rgba(31,95,168,.10); --gold-border: rgba(31,95,168,.30); }
html[data-theme^="card-"] .card { border: none; box-shadow: var(--shadow); }

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }   /* clip (not hidden): hidden turns body into a scroll box and breaks the sticky header */
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font-ui); -webkit-font-smoothing: antialiased; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text3); } .small { font-size: 12px; } .hidden { display: none !important; }
.err { color: var(--red); min-height: 1.2em; }
code { font-family: var(--font-mono); background: var(--bg3); padding: 1px 5px; border-radius: 5px; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; font-weight: 800; letter-spacing: .5px; white-space: nowrap; } .brand-mark { width: 22px; height: 22px; margin-right: 7px; } .brand .live-dot { margin-left: 6px; }
.brand span { color: var(--gold); } .brand.big { font-size: 26px; margin-bottom: 8px; }
.phase { font-style: normal; font-size: 10px; font-weight: 700; margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: var(--gold-soft); color: var(--gold); vertical-align: 2px; }
.hdr-pnl { margin-left: auto; font-weight: 800; font-size: 15px; padding: 4px 10px; border-radius: 999px; background: var(--bg3); white-space: nowrap; }
.hdr-pnl.pos { color: var(--green); background: var(--green-soft); } .hdr-pnl.neg { color: var(--red); background: var(--red-soft); }
.pills { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
@media (max-width: 560px) {
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; } .phase { display: none; }
  /* status pills become two coloured dots on phones (full text on hover / in Settings) */
  .pills .pill { font-size: 0; width: 10px; height: 10px; padding: 0; } .pills .pill:not(.ok):not(.bad):not(.warn) { background: var(--text3); }
  .pills .pill.ok { background: var(--green); } .pills .pill.bad { background: var(--red); } .pills .pill.warn { background: var(--amber); }
}
.pill { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg3); color: var(--text2); text-align: center; white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green); } .pill.bad { background: var(--red-soft); color: var(--red); } .pill.warn { background: var(--gold-soft); color: var(--amber); }

.banner { margin: 10px 16px 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red); font-weight: 600; }
main { padding: 12px 16px; max-width: 1200px; margin: 0 auto; }
.tab-panel { display: none; } .tab-panel.active { display: block; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; min-width: 0; }
.card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; margin-bottom: 10px; }
.rail { width: 4px; height: 14px; border-radius: 2px; background: var(--gold); display: inline-block; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.stat { background: var(--bg3); border-radius: var(--radius-sm); padding: 8px 10px; }
.stat .k { font-size: 11px; color: var(--text3); } .stat .v { font-size: 17px; font-weight: 700; }
.pos { color: var(--green); } .neg { color: var(--red); }

.btn { border: 1px solid var(--border); background: var(--bg3); color: var(--text); padding: 9px 14px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; min-height: 40px; }
.btn.primary { background: var(--gold); color: #111; border-color: var(--gold); }
.btn.danger { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input, select { background: var(--bg3); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 14px; min-height: 38px; max-width: 100%; }
.form-col { display: flex; flex-direction: column; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.filters label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); }

/* Three always-visible charts: spot full width, call + put side by side on
   wide screens, stacked on phones. */
/* ── Layout for every screen ──
   phone  (<768):  everything stacked
   tablet (≥768):  spot full width, call + put side by side
   laptop / desktop (≥1280): charts + a side column (position, today)
   wide / TV (≥1900): spot, call and put in one row, bigger type */
:root { --chart-h: clamp(300px, 42vh, 460px); --chart-h-prem: clamp(280px, 38vh, 420px); }
.live-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.charts { display: grid; gap: 12px; grid-template-columns: 1fr; min-width: 0; }
.side { display: grid; gap: 12px; align-content: start; min-width: 0; }
.side .card { margin: 0; }
@media (min-width: 768px) { .charts { grid-template-columns: 1fr 1fr; } #card_spot { grid-column: 1 / -1; } .side { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { main { max-width: none; } .live-grid { grid-template-columns: minmax(0, 1fr) 340px; } .side { grid-template-columns: 1fr; position: sticky; top: 70px; } }
@media (min-width: 1900px) {
  html { font-size: 15px; } :root { --chart-h: clamp(420px, 62vh, 1100px); --chart-h-prem: var(--chart-h); }
  .charts { grid-template-columns: 1fr 1fr 1fr; } #card_spot { grid-column: auto; }
  .live-grid { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (min-width: 2600px) { html { font-size: 18px; } body { font-size: 16px; } .dh-sym, .dh-ltp { font-size: 20px; } .live-grid { grid-template-columns: minmax(0, 1fr) 460px; } }
.grid3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.kpis .v { font-size: clamp(15px, 3.6vw, 20px); overflow-wrap: anywhere; }
.chip { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.mini-chart { height: 220px; background: #fff; border-radius: var(--radius-sm); }
.sens-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sens-grid .tbl td, .sens-grid .tbl th { padding: 4px 6px; }
tr.current td { background: var(--gold-soft); font-weight: 700; }
tr.best td { color: var(--green); }
.small-btn { min-height: 28px; padding: 2px 8px; font-size: 12px; }
/* Chart cards always use Dhan's own light chart look, whatever the app theme. */
.chart-card { background: #fff; color: #1b1b1f; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #e6e6ea; min-width: 0; }
.chart-card.locked { box-shadow: 0 0 0 2px #d1a940; }
.dh-head { padding: 10px 12px 4px; font-family: var(--font-ui); }
.dh-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dh-sym { font-size: 16px; font-weight: 500; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dh-row.price { justify-content: flex-start; gap: 10px; }
.dh-ltp { font-size: 16px; font-weight: 600; color: #111; } .dh-chg { font-size: 14px; color: #111; }
.dh-chg.up { color: #0f9d58; } .dh-chg.down { color: #d93025; }
.dh-tag { font-size: 10px; font-weight: 800; letter-spacing: .5px; color: #8a6d1f; background: #fbf1d3; padding: 2px 6px; border-radius: 5px; margin-left: auto; }
.dh-tag:empty { display: none; }
.dh-ohlc { font-size: 11px; color: #555; min-height: 15px; }
.dh-legend { font-size: 11.5px; color: #333; } .dh-legend span { margin-left: 6px; }
.dh-actions { display: flex; gap: 6px; align-items: center; }
.fs-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #ececef; color: #333; font-size: 16px; cursor: pointer; line-height: 1; }
.exit-btn { height: 32px; padding: 0 14px; border-radius: 8px; border: 0; background: #e5302a; color: #fff; font-weight: 700; cursor: pointer; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: var(--chart-h); }
.chart.prem { height: var(--chart-h-prem); }
@media (max-width: 600px) { :root { --chart-h: 340px; --chart-h-prem: 320px; } }
/* phones (charts stacked): the traded option's chart moves up, right under spot */
@media (max-width: 767px) { #card_spot { order: 0; } #card_ce { order: 1; } #card_pe { order: 2; } .charts.pe-first #card_pe { order: 1; } .charts.pe-first #card_ce { order: 2; } }
/* countdown badge sits under the last-price label on the price scale, like Dhan */
.countdown { position: absolute; right: 0; z-index: 3; pointer-events: none; background: #111; color: #fff; font-size: 11px; padding: 1px 4px; border-radius: 2px; display: none; }
/* full screen: one chart fills the viewport, other UI hidden behind it */
.chart-card.fs { position: fixed; inset: 0; z-index: 80; border-radius: 0; margin: 0; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.chart-card.fs .chart-wrap { flex: 1; min-height: 0; } .chart-card.fs .chart { height: 100% !important; }
body.fs-open { overflow: hidden; } body.fs-open .tabbar, body.fs-open .topbar { visibility: hidden; }

.open-trade .big { font-size: 20px; font-weight: 800; }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; margin: 10px 0; }
.levels div { background: var(--bg3); border-radius: 8px; padding: 6px 8px; } .levels .k { font-size: 11px; color: var(--text3); }

.setup { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; }
.setup-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--bg4); color: var(--text2); }
.badge.OPEN { background: var(--gold-soft); color: var(--gold); } .badge.CLOSED { background: var(--bg4); }
.badge.SKIPPED { background: var(--bg4); color: var(--text3); }
.badge.win { background: var(--green-soft); color: var(--green); } .badge.loss { background: var(--red-soft); color: var(--red); }
details summary { cursor: pointer; color: var(--text2); font-size: 12px; margin-top: 6px; }
details pre { white-space: pre-wrap; word-break: break-word; font: 11px/1.4 var(--font-mono); background: var(--bg3); padding: 8px; border-radius: 8px; max-height: 320px; overflow: auto; }

.table-wrap { overflow-x: auto; } .tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th, .tbl td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tbl th { color: var(--text3); font-weight: 600; }

.log-box { background: var(--log-bg); color: #d6d5dc; font: 11.5px/1.5 var(--font-mono); padding: 10px; border-radius: var(--radius-sm); height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.log-box .WARN { color: #e8ab48; } .log-box .ERROR { color: #ff6b61; } .log-box .DEBUG { color: #8a8994; }


.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; gap: 4px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); background: var(--bg2); border-top: 1px solid var(--border); }
/* each tab >= 48 px tall with a gap between: no mis-taps (WCAG 2.5.8 target size) */
.tabbar button { flex: 1 1 0; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; border-radius: 10px;
  color: var(--text3); font: 600 11px/1 var(--font-ui); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar button.active { color: var(--gold); background: var(--gold-soft); }
.tabbar button:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (min-width: 900px) { .tabbar button { flex-direction: row; font-size: 13px; gap: 8px; } }

.live-dot { font-style: normal; font-size: 10px; font-weight: 800; color: var(--red); letter-spacing: 1px; vertical-align: 2px; }
.live-dot::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 4px; vertical-align: 1px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ── Splash ── */
.splash { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #17161c 0%, #0a0a0c 70%); transition: opacity .5s ease, visibility .5s; }
.splash.done { opacity: 0; visibility: hidden; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.splash-mark { width: 120px; height: 120px; border-radius: 26px; animation: markIn 1s cubic-bezier(.2,.8,.2,1) both, glow 2.4s .9s ease-in-out infinite; }
@keyframes markIn { from { opacity: 0; transform: scale(.6) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.06) rotate(1deg); } to { transform: none; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 rgba(217,174,69,0); } 50% { box-shadow: 0 0 44px rgba(217,174,69,.35); } }
.splash-title { font-weight: 900; font-size: 40px; letter-spacing: -.5px; color: #edeceb; animation: logoIn .8s .2s cubic-bezier(.2,.8,.2,1) both; }
.splash-title .t2 { color: #d1a940; }
.splash-live { font-weight: 800; font-size: 12px; letter-spacing: 4px; color: #e5594f; animation: logoIn .6s .6s both; }
.splash-live i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e5594f; margin-right: 6px; animation: pulse 1.2s ease-in-out infinite; }
.splash-bar { width: 160px; height: 3px; border-radius: 3px; background: #232328; overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 40%; background: #d1a940; border-radius: 3px; animation: loadbar 1.1s ease-in-out infinite; }
@keyframes logoIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes loadbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .splash *, .live-dot::before { animation: none !important; } }

.auth-step { display: flex; flex-direction: column; gap: 10px; }
.gsi-slot { min-height: 44px; display: flex; justify-content: center; margin-top: 8px; }
.login-card .brand.big { text-align: center; margin: 4px 0 6px; }
.center, .login-card .auth-step > p, .login-card .err { text-align: center; }
.gsi-alt summary { cursor: pointer; color: var(--text2); text-align: center; }
/* Slide-to-sign-in: drag the Google "G" to the right end. */
.g-slide { position: relative; height: 56px; border-radius: 28px; background: #131314; border: 1px solid #3c4043; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.g-fill { position: absolute; inset: 0 auto 0 0; width: 56px; border-radius: 28px; background: linear-gradient(90deg, rgba(66,133,244,.25), rgba(52,168,83,.35)); }
.g-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 48px; font-weight: 600; font-size: 15px; color: #e3e3e3; pointer-events: none;
  background: linear-gradient(90deg, #8e918f 0%, #fff 45%, #8e918f 60%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: g-shine 2.6s linear infinite; }
.g-knob { position: absolute; top: 4px; left: 4px; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 11px; background: #fff; cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,.45); touch-action: none; }
.g-knob:active { cursor: grabbing; }
.g-knob:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.g-knob svg { width: 100%; height: 100%; display: block; }
.g-slide.snap .g-knob, .g-slide.snap .g-fill { transition: transform .25s ease, width .25s ease; }
.g-slide.done .g-text { animation: none; -webkit-text-fill-color: #fff; }
.g-slide.busy { opacity: .7; pointer-events: none; }
@keyframes g-shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .g-text { animation: none; -webkit-text-fill-color: #e3e3e3; } }
.trust { display: flex; gap: 8px; align-items: flex-start; color: var(--text2); }
.code-input { font-size: 26px; letter-spacing: 10px; text-align: center; }
.link-btn { background: none; border: 0; color: var(--gold); cursor: pointer; font-size: 13px; padding: 4px; }
.qr-box { display: flex; justify-content: center; } .qr-box img, .qr-box svg { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 8px; }
.secret { display: block; word-break: break-all; margin-top: 6px; user-select: all; }
.codes { background: var(--bg3); padding: 10px; border-radius: 8px; font-size: 14px; line-height: 1.8; white-space: pre; user-select: all; }
.sub-title { font-weight: 700; font-size: 13px; margin: 14px 0 6px; }
.login { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 16px; }
.login-card { max-width: 380px; width: 100%; display: flex; flex-direction: column; gap: 10px; }

/* ── stats extras ── */
.stat.wide { grid-column: 1 / -1; } .stat .small-v { font-size: 13px; }
.kill-state { margin-top: 8px; } .kill-state.on { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red); font-weight: 600; }

/* ── Settings groups (collapsible) ── */
.group { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
html[data-theme^="card-"] .group { border: none; box-shadow: var(--shadow); }
.group > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; min-height: 52px; margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--text3); border-bottom: 2px solid var(--text3); transform: rotate(45deg); margin-left: 8px; transition: transform .2s; }
.group[open] > summary::after { transform: rotate(-135deg); }
.g-title { white-space: nowrap; }
.g-state { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text2); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.group-body { padding: 0 16px 16px; }
.settings-groups fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px 12px; margin: 0 0 10px; min-width: 0; }
.settings-groups legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--text2); }
.settings-groups .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.settings-groups .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text2); }
.settings-groups .field.toggle { flex-direction: row; align-items: center; gap: 8px; }
.settings-groups .field.changed input, .settings-groups .field.changed select { border-color: var(--gold); }
.settings-groups .hint { font-size: 11px; color: var(--text3); }
.sticky-actions { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: var(--bg2); padding: 8px 0; z-index: 2; }
.style-grid { display: grid; gap: 10px; margin-bottom: 10px; }
.style-row { display: grid; grid-template-columns: minmax(110px, 1fr) 44px minmax(80px, 2fr) 70px; gap: 10px; align-items: center; font-size: 13px; }
.style-row input[type=color] { width: 44px; height: 36px; padding: 2px; }
.style-row input[type=range] { width: 100%; min-height: 0; padding: 0; accent-color: var(--gold); }
.style-row select { min-height: 32px; padding: 4px; }

/* ── Analysis ── */
.a-status { margin: 6px 0 10px; } .progress { height: 6px; border-radius: 3px; background: var(--bg4); overflow: hidden; margin-top: 6px; } .progress > i { display: block; height: 100%; background: var(--gold); transition: width .4s; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chips-row .btn.active { background: var(--gold); color: #111; border-color: var(--gold); }
.delta { font-size: 11px; margin-left: 4px; } .delta.pos { color: var(--green); } .delta.neg { color: var(--red); }
.changes { white-space: normal !important; min-width: 180px; font-size: 11.5px; }

/* ── Confirm dialog ── */
.modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.modal-card { width: 100%; max-width: 420px; background: var(--bg2); color: var(--text); border-radius: var(--radius); padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal-card h3 { margin: 0 0 8px; font-size: 17px; } .modal-body { color: var(--text2); font-size: 14px; margin-bottom: 16px; }
.modal-body input { width: 100%; margin-top: 10px; }
.modal-actions { justify-content: flex-end; } .modal-actions .btn { min-width: 110px; min-height: 44px; }
.brand.big { justify-content: center; } .brand-mark.big { width: 40px; height: 40px; }
.wm { font-weight: inherit; }
