:root {
  color-scheme: dark;
  --bg: #0e0f11;
  --chrome: #121315;
  --panel: #151618;
  --panel-2: #1c1d20;
  --inset: #0c0d0f;
  --border: #242528;
  --border-2: #2e3034;
  --border-3: #3c3e43;
  --text: #e3e4e6;
  --text-2: #c4c6ca;
  --muted: #8e9197;
  --faint: #63666c;
  --green: #43be76;
  --green-hover: #55c985;
  --green-bg: rgba(67, 190, 118, .12);
  --red: #e5615b;
  --red-bg: rgba(229, 97, 91, .12);
  --amber: #d9a441;
  --amber-bg: rgba(217, 164, 65, .12);
  --blue: #7aa5f8;
  --blue-bg: rgba(122, 165, 248, .12);
  --focus: #5b8def;
  --roulette-red: #b8352e;
  --roulette-black: #1c1d20;
  --roulette-green: #1e7a4c;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
html { scrollbar-gutter: stable; } /* switching tabs doesn't shift the page sideways when a scrollbar appears */
/* phones: text keeps its size when turned sideways; a tap flashes faintly instead of a grey box */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(255, 255, 255, .08); }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(91, 141, 239, .4); }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration-color: rgba(255, 255, 255, .2); text-underline-offset: 3px; }
input, select {
  font: inherit; color: var(--text); background: var(--inset);
  height: 32px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 4px;
  transition: border-color .12s, background-color .12s;
}
input::placeholder { color: var(--faint); }
/* Hover looks are for a mouse only: a touch screen keeps them after a tap (a number just switched off
   in Settings would still look half on). Every :hover in this file is wrapped like this. */
@media (hover: hover) {
  a:hover { color: var(--text); text-decoration-color: currentColor; }
  input:hover, select:hover { border-color: var(--border-3); }
}
input:focus, select:focus { outline: none; border-color: var(--focus); }
select {
  appearance: none; -webkit-appearance: none; height: 30px; padding-right: 30px; cursor: pointer;
  background: var(--inset) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238e9197' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
}
input[type="number"] { font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.icon { flex: none; display: block; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 140px 20px; color: var(--muted); }
.num, .money { font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
/* a button that looks like a link (moves within the panel) */
.link { padding: 0; border: 0; background: none; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .2); text-underline-offset: 3px; }
@media (hover: hover) { .link:hover { color: var(--text); text-decoration-color: currentColor; } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  min-height: 57px; padding: 8px max(24px, calc((100% - 1400px) / 2)); background: var(--chrome);
  border-bottom: 1px solid var(--border);
}
.topbar.live { box-shadow: inset 0 2px 0 var(--red); } /* the mode, along the very top edge */
.topbar.dry { box-shadow: inset 0 2px 0 var(--amber); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.brand-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--green); display: grid; place-items: center; }
.brand-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.mode-tag { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; line-height: 1; padding: 5px 7px 4px; border-radius: 0; border: 1px solid; }
.mode-tag.live { color: var(--red); border-color: rgba(229, 97, 91, .45); background: var(--red-bg); }
.mode-tag.dry { color: var(--amber); border-color: rgba(217, 164, 65, .4); background: var(--amber-bg); }
.mode-tag.off { color: var(--muted); border-color: var(--border-2); background: var(--panel-2); }
.topbar.off { box-shadow: inset 0 2px 0 var(--border-3); }
/* website menu: the site on show as its mode dot and square logo; the other sites drop below, joined by hairlines */
.site-menu { position: relative; display: inline-flex; }
.site-pick, .site-option { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; color: inherit; text-decoration: none; }
.site-pick { border: 1px solid var(--border-2); border-radius: 2px; background: none; cursor: pointer; transition: background-color .12s, border-color .12s; }
.site-pick[aria-expanded="true"] { background: #26272b; border-color: var(--border-3); }
.site-chev { display: inline-flex; margin-left: -2px; color: var(--muted); transform: rotate(90deg); transition: transform .15s, color .12s; }
.site-pick[aria-expanded="true"] .site-chev { transform: rotate(-90deg); color: var(--text); }
.site-pick:focus-visible, .site-option:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.site-logo { display: block; flex: none; width: 20px; height: 20px; border-radius: 2px; outline: 1px solid rgba(255, 255, 255, .1); outline-offset: -1px; }
.site-logo.letters { display: grid; place-items: center; background: var(--border-2); font-size: 9px; font-weight: 700; }
.sdot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.sdot.live { background: var(--green); }
.sdot.dry { background: var(--amber); }
.sdot.off { background: transparent; box-shadow: inset 0 0 0 1px var(--faint); }
.site-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; min-width: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border-3); border-radius: 2px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.site-option { height: 36px; transition: background-color .12s; }
.site-option + .site-option { border-top: 1px solid var(--border); }
.site-option.on { background: #26272b; box-shadow: inset 2px 0 0 var(--green); }
@media (hover: hover) {
  .site-pick:hover { border-color: var(--border-3); }
  .site-pick:hover .site-chev { color: var(--text); }
  .site-option:not(.on):hover { background: rgba(255, 255, 255, .04); }
}
.loading-sites { display: flex; justify-content: center; gap: 16px; margin-top: -120px; color: var(--muted); }
.conn { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.conn.warn { color: var(--amber); }
.conn.bad { color: var(--red); }
.cdots { display: inline-flex; gap: 4px; }
.topstats { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.topstat { display: flex; flex-direction: column; align-items: flex-end; }
.topstat + .topstat { padding-left: 20px; border-left: 1px solid var(--border); }
.topstat .label { font-size: 12px; color: var(--muted); }
.topstat .value { font-size: 15px; font-weight: 600; }
.topstat .unit { font-size: 12px; font-weight: 500; color: var(--muted); }
.pill { display: inline-flex; align-items: center; min-height: 22px; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; line-height: 1.3; }
.pill.ok { color: var(--green); background: var(--green-bg); }
.pill.info { color: var(--blue); background: var(--blue-bg); }
.pill.warn, .pill.dry { color: var(--amber); background: var(--amber-bg); }
.pill.bad { color: var(--red); background: var(--red-bg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; border: 1px solid var(--border-2); background: var(--panel-2); padding: 0 12px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background-color .12s, border-color .12s; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--green); border-color: var(--green); color: #062612; font-weight: 600; }
.btn.danger { background: transparent; border-color: rgba(229, 97, 91, .4); color: var(--red); }
.btn.big { height: 34px; padding: 0 14px; }
.btn.ghost { background: transparent; }
.btn.small { font-size: 12px; }
.btn.icon { width: 28px; height: 28px; padding: 0; background: transparent; border-color: transparent; color: var(--faint); }
/* each kind of button with its own background has its own :hover, so these can follow them all */
@media (hover: hover) {
  .btn:hover { background: #232427; border-color: var(--border-3); }
  .btn:disabled:hover { background: var(--panel-2); border-color: var(--border-2); }
  .btn.primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
  .btn.primary:disabled:hover { background: var(--green); border-color: var(--green); }
  .btn.danger:hover { background: var(--red-bg); border-color: rgba(229, 97, 91, .55); }
  .btn.ghost:hover { background: var(--panel-2); }
  .btn.icon:hover { color: var(--red); background: var(--red-bg); border-color: transparent; }
}

/* ---------- tabs ---------- */
/* editor-style tabs: the active one opens into the page below, with a green line on top */
.tabs { display: flex; padding: 0 max(24px, calc((100% - 1400px) / 2)); background: var(--chrome); box-shadow: inset 0 -1px 0 var(--border); overflow-x: auto; }
.tab { height: 40px; padding: 0 16px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; transition: color .12s; }
@media (hover: hover) { .tab:hover { color: var(--text); } }
.tab:focus-visible, .seg button:focus-visible, .link:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* the language, at the far end of the tab bar: EN | RU */
.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: auto; padding-left: 12px; flex: none; }
.lang-switch button { height: 24px; padding: 0 7px; border: 1px solid transparent; border-radius: 3px; background: none; color: var(--faint); cursor: pointer; font-size: 11.5px; font-weight: 600; letter-spacing: .4px; transition: color .12s, border-color .12s; }
.lang-switch button.on { color: var(--text); border-color: var(--border-2); background: var(--panel-2); cursor: default; }
@media (hover: hover) { .lang-switch button:not(.on):hover { color: var(--text); } }
.lang-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* the sign-in page: under the card */
.signin .lang-switch { margin: 0 auto; padding: 0; }
/* Support (a Telegram chat), just before the language */
.support-link { display: flex; align-items: center; align-self: center; gap: 6px; box-sizing: border-box; height: 24px; margin-left: auto; padding: 0 9px 0 8px; flex: none;
  border: 1px solid var(--border-2); border-radius: 3px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .2px; line-height: 1; text-decoration: none; transition: color .12s, border-color .12s; }
.support-link .icon { color: var(--green); flex: none; }
@media (hover: hover) { .support-link:hover { color: var(--text); border-color: var(--muted); } }
.support-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.support-link + .lang-switch { margin-left: 0; padding-left: 10px; }
/* the top bar's copies are for phones only (below) */
.top-extras { display: none; }
.tab.active { color: var(--text); background: var(--bg); box-shadow: inset 0 2px 0 var(--green), inset 1px 0 0 var(--border), inset -1px 0 0 var(--border); }

/* ---------- frame: panels stacked in one grid with shared hairlines ---------- */
/* The frame draws the top and left edges; every block in it draws its own right and bottom edge. */
main { width: calc(100% - 48px); max-width: 1400px; margin: 24px auto 56px; }
.frame { border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.card, .toolbar, .errors { border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.grid { display: grid; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
/* the period tiles wrap; a short last row stretches, so the grid never has holes */
.grid.cols-5 { display: flex; flex-wrap: wrap; }
.grid.cols-5 > * { flex: 1 1 200px; }
.stack { display: flex; flex-direction: column; }
.stack > :last-child { flex: 1 0 auto; }
.card { background: var(--panel); padding: 20px 22px; min-width: 0; }
.card h2 { margin: 0 0 16px; min-height: 24px; font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 10px; }
.card h2 .right { margin-left: auto; font-weight: 400; }
/* strips: filters, section titles, the settings buttons */
.toolbar { background: var(--chrome); padding: 12px 22px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- lost connection: the numbers below may be out of date ---------- */
.notice { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 18px; border: 1px solid rgba(217, 164, 65, .4); background: rgba(217, 164, 65, .06); box-shadow: inset 3px 0 0 var(--amber); color: var(--amber); }
main.stale .frame, main.stale .switcher { opacity: .55; transition: opacity .3s; }

/* ---------- attention banner: above the panels, on every section ---------- */
.attention { border: 1px solid rgba(229, 97, 91, .4); background: rgba(229, 97, 91, .06); box-shadow: inset 3px 0 0 var(--red); padding: 18px 22px; margin-bottom: 16px; }
.attention .title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--red); margin-bottom: 6px; }
.attention .actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- strategy state ---------- */
.phase { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.phase .big { font-size: 28px; font-weight: 600; letter-spacing: -.5px; }
.phase .sub { color: var(--muted); }
/* misses: green, amber close to the trigger, red while money is on the table */
.meter { height: 8px; background: #232427; border-radius: 4px; overflow: hidden; margin: 14px 0 8px; }
.meter > div { height: 100%; background: var(--green); border-radius: 4px; transition: width .4s ease; }
.meter.hot > div { background: var(--amber); }
.meter.betting > div { background: var(--red); }

/* ---------- roulette numbers ---------- */
.nums { display: flex; gap: 6px; flex-wrap: wrap; }
.n { width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; flex: none; }
.n.red { background: var(--roulette-red); }
.n.black { background: var(--roulette-black); border: 1px solid #303135; }
.n.green { background: var(--roulette-green); }
.n.ours { outline: 2px solid var(--amber); outline-offset: 1.5px; }
.n.first { width: 38px; height: 38px; font-size: 16px; }

/* number picker (settings) */
.picker { display: grid; grid-template-columns: 44px repeat(12, 1fr); grid-template-rows: repeat(3, 40px); gap: 4px; max-width: 640px; }
.picker button { border: 0; border-radius: 4px; font-weight: 600; cursor: pointer; color: #fff; opacity: .4; transition: opacity .12s; }
.picker .n { width: auto; height: auto; }
@media (hover: hover) { .picker button:hover { opacity: .7; } }
.picker button.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--amber); }
.picker .zero { grid-row: 1 / span 3; }
/* the customer's numbers, shown (set by the admin): the same layout, nothing to click */
.picker.readonly > span { display: grid; place-items: center; border-radius: 4px; font-weight: 600; color: #fff; opacity: .28; }
.picker.readonly > span.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--amber); }
.ro-value { font-weight: 600; }

/* ---------- round / countdown ---------- */
.round { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.countdown { height: 3px; background: #232427; border-radius: 2px; overflow: hidden; margin-top: 12px; }
.countdown > div { height: 100%; background: var(--blue); transition: width 1s linear; }

/* ---------- tables ---------- */
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.data td { padding: 8px 10px; border-bottom: 1px solid #1e1f22; }
table.data td.r, table.data th.r { text-align: right; }
table.data tr.current td { background: var(--amber-bg); }
table.data tr.current td:first-child { box-shadow: inset 2px 0 0 var(--amber); }
table.data tr.done td { color: var(--faint); }
table.data tr.clickable { cursor: pointer; }
@media (hover: hover) { table.data tr.clickable:hover td { background: var(--panel-2); } }
table.data tr.open td { background: var(--panel-2); }
/* a row's "wide-only" columns again, as a line under its first cell: shown on phones only */
.meta { display: none; }
.chev { display: inline-block; margin-right: 8px; color: var(--faint); vertical-align: -1px; transition: transform .15s; }
tr.open .chev { transform: rotate(90deg); color: var(--text); }

/* ---------- stat tiles ---------- */
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-size: 24px; font-weight: 600; margin-top: 2px; letter-spacing: -.4px; }
.tile .detail { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- log ---------- */
.log { font-size: 13px; max-height: 420px; overflow: auto; margin: 0 -8px; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.log.full { max-height: none; }
.log .day { position: sticky; top: 0; z-index: 1; background: var(--panel); padding: 10px 8px 6px; font-size: 12px; font-weight: 500; color: var(--faint); }
.log .day:first-child { padding-top: 0; }
.log .line { display: grid; grid-template-columns: 58px 2px 1fr; gap: 0 12px; align-items: baseline; padding: 4px 8px; border-radius: 4px; }
.log.with-src .line { grid-template-columns: 58px 2px 104px 1fr; }
@media (hover: hover) { .log .line:hover { background: var(--panel-2); } }
.log .t { font-family: var(--mono); font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.log .lv { align-self: stretch; border-radius: 1px; margin: 2px 0; }
.log .src { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .msg { color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.log .line.money .lv { background: var(--green); }
.log .line.warn .lv { background: var(--amber); }
.log .line.error .lv { background: var(--red); }
.log .line.money .msg, .log .line.warn .msg { color: var(--text); }
.log .line.error .msg { color: #f08a84; }
.seg .count { margin-left: 7px; font-size: 11px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */
/* button group: joined segments with hairline dividers */
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 4px; overflow: hidden; background: var(--panel); }
.seg button { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border: 0; border-left: 1px solid var(--border-2); background: none; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 500; transition: color .12s, background-color .12s; }
.seg button:first-child { border-left: 0; }
@media (hover: hover) { .seg button:hover { color: var(--text); background: rgba(255, 255, 255, .03); } }
.seg button.on { color: var(--text); background: #26272b; cursor: default; }
.seg button.live::before, .seg button.dry::before { content: ""; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; background: var(--faint); opacity: .6; }
.seg button.on.live::before { background: var(--red); opacity: 1; }
.seg button.on.dry::before { background: var(--amber); opacity: 1; }
.errors { background: rgba(229, 97, 91, .06); box-shadow: inset 3px 0 0 var(--red); color: var(--red); padding: 12px 22px; }
.errors div + div { margin-top: 4px; }
.save-bar { display: contents; } /* Save and Discard: part of the strip here, a bar of their own on phones */
.prog input { width: 84px; text-align: right; }
input.cell { height: 30px; background: var(--inset); border-color: transparent; }
@media (hover: hover) { input.cell:hover { border-color: var(--border-2); } }
input.cell:focus { border-color: var(--focus); }

/* settings rows: label + hint on the left, control on the right */
.setting { display: grid; grid-template-columns: 1fr auto; gap: 3px 24px; align-items: center; padding: 13px 0; border-top: 1px solid var(--border); }
.setting:first-of-type { border-top: 0; padding-top: 2px; }
.setting:last-child { padding-bottom: 0; }
.setting-label { font-weight: 500; }
.setting-hint { grid-column: 1; font-size: 12px; color: var(--muted); }
.setting-control { grid-column: 2; grid-row: 1 / span 2; }
.setting input.tz { width: 180px; }
.setting input.proxy-field { width: 280px; }
.proxy-foot { margin-top: 14px; }
.proxy-live { gap: 6px 12px; }
.proxy-note { margin-top: 12px; }
.affix { display: inline-flex; align-items: center; height: 32px; width: 132px; background: var(--inset); border: 1px solid var(--border-2); border-radius: 4px; cursor: text; transition: border-color .12s; }
@media (hover: hover) { .affix:hover { border-color: var(--border-3); } }
.affix:focus-within { border-color: var(--focus); }
.affix input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; padding: 0 0 0 10px; text-align: right; }
.affix .unit { padding: 0 10px 0 6px; color: var(--faint); font-size: 12px; white-space: nowrap; }

/* on/off switch (a styled checkbox) */
input.switch { appearance: none; -webkit-appearance: none; position: relative; width: 28px; height: 16px; padding: 0; margin: 0; border: 0; border-radius: 999px; background: var(--border-3); cursor: pointer; vertical-align: middle; transition: background-color .15s; }
input.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #b9bbc0; transition: transform .15s, background-color .15s; }
input.switch:checked { background: var(--green); }
input.switch:checked::before { transform: translateX(12px); background: #fff; }
input.switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input.switch:disabled { opacity: .5; cursor: not-allowed; }
.chart-box { position: relative; height: 240px; }
.empty { color: var(--faint); padding: 30px 0; text-align: center; }
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 50; display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--border-2); padding: 11px 15px; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.toast .icon { color: var(--green); }
.toast.err { border-color: rgba(229, 97, 91, .45); color: var(--red); }
.toast.err .icon { color: var(--red); }

/* ---------- table switcher: two or more tables ---------- */
/* Kept apart from the panels: rounded tiles that read as buttons; the one on show is green. */
.switcher { margin-bottom: 24px; }
.switcher-head { display: flex; align-items: baseline; gap: 12px; margin: 0 2px 10px; }
.switcher-head .label { font-size: 13px; font-weight: 600; }
.warn-text { color: var(--amber); }
.switcher-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 8px; }
.ttile { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 13px 16px 15px; text-align: left; cursor: pointer; background: var(--panel); border: 1px solid var(--border-2); border-radius: 6px; transition: border-color .12s, background-color .12s; }
@media (hover: hover) { .ttile:hover { border-color: var(--border-3); background: #18191c; } }
.ttile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ttile.alert { border-color: rgba(229, 97, 91, .55); }
.ttile.selected { border-color: var(--green); background: #15201a; box-shadow: inset 0 0 0 1px var(--green); }
.ttile-head { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 22px; min-width: 0; }
.ttile-head .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttile-head .pill, .ttile-head .money { flex: none; }
.ttile-phase { display: flex; align-items: baseline; gap: 2px 10px; flex-wrap: wrap; }
.ttile-phase .big { font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
.ttile-phase .sub { color: var(--muted); font-size: 12px; }
.meter.thin { height: 5px; margin: auto 0 0; } /* pinned to the bottom, so meters line up across a row */
.cdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--faint); }
.cdot.online { background: var(--green); }
.cdot.starting { background: var(--blue); }
.cdot.recovering { background: var(--amber); }
.cdot.offline { background: var(--red); }
/* Follow mode: no window until a streak is close (not a problem). */
.cdot.asleep { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.tables-list .url { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px; }
.tables-edit td { vertical-align: middle; }
.tables-edit input.cell { width: 100%; }
.tables-edit .url { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px; }

@media (max-width: 1279px) {
  .switcher-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
}
/* ---------- phones (and narrow windows) ---------- */
@media (max-width: 720px) {
  /* top bar: name, mode and connection on the first line; money and the betting button on the second */
  .topbar { min-height: 0; padding: 8px 14px 10px; gap: 6px 12px; }
  .conn { margin-left: auto; }
  .conn.proxy { margin-left: 0; }
  /* wide fields go under their label */
  .setting.wide { grid-template-columns: minmax(0, 1fr); }
  .setting.wide .setting-control { grid-column: 1; grid-row: auto; margin-top: 6px; }
  .setting input.proxy-field { width: 100%; }
  .topstats { width: 100%; margin-left: 0; gap: 14px; }
  .topstat { align-items: flex-start; }
  .topstat + .topstat { padding-left: 14px; }
  .topstats .btn { margin-left: auto; }
  /* the tabs share the width, so none is hidden past the edge */
  .tabs { padding: 0; }
  .tab { flex: 1 0 auto; padding: 0 8px; }
  /* the language: one button for the other one, on the top bar's first line (the tabs have no room) */
  .tabs .lang-switch, .tabs .support-link { display: none; }
  .topbar .brand, .topbar .site-menu, .topbar .mode-tag { order: -2; }
  /* Support and the language together at the end of the first line (Support as its icon alone: no room for the word) */
  .top-extras { display: flex; align-items: center; gap: 4px; order: -1; margin-left: auto; }
  .top-extras .support-link { margin: 0; width: 26px; padding: 0; justify-content: center; border: 1px solid var(--border-2); }
  .top-extras .support-link .label { display: none; }
  .top-extras .lang-switch { margin: 0; padding: 0; }
  .topbar .lang-switch button.on { display: none; }
  .topbar .lang-switch button { border-color: var(--border-2); color: var(--muted); }

  /* panels run edge to edge: the frame's outer hairlines would only outline the screen */
  main { width: 100%; margin: 12px 0 32px; overflow-x: hidden; overflow-x: clip; }
  .frame { border-left: 0; margin-right: -1px; }
  .notice, .attention, .switcher { margin-left: 12px; margin-right: 12px; }
  .card { padding: 16px; }
  .toolbar, .errors { padding: 10px 16px; }
  .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .card h2 { flex-wrap: wrap; }

  /* attention: the answers as full-width buttons, one per line */
  .attention { padding: 14px 16px; }
  .attention .actions .btn { flex: 1 1 100%; }

  /* table switcher: compact rows, the count with its meter beside it */
  .switcher { margin-bottom: 16px; }
  .switcher-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 6px; }
  .ttile { display: grid; grid-template-columns: minmax(0, 1fr) 30%; align-items: center; gap: 6px 14px; padding: 10px 14px 12px; }
  .ttile-head { grid-column: 1 / -1; }
  .ttile-phase .big { font-size: 18px; }
  .meter.thin { margin: 0; }
  /* many tables: two small tiles per row (name / count and badge / meter), so the list stays short */
  .switcher-grid.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .switcher-grid.many .ttile {
    grid-template-columns: auto max-content minmax(0, 1fr); grid-template-areas: "dot name name" "big big badge" "meter meter meter";
    gap: 6px 8px; padding: 9px 11px 11px;
  }
  .switcher-grid.many .ttile-head { display: contents; }
  .switcher-grid.many .ttile-head .spacer, .switcher-grid.many .ttile-phase .sub { display: none; }
  .switcher-grid.many .cdot { grid-area: dot; }
  .switcher-grid.many .name { grid-area: name; font-weight: 600; }
  .switcher-grid.many .ttile-badge { grid-area: badge; display: flex; justify-content: flex-end; min-width: 0; }
  .switcher-grid.many .ttile-badge > * { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .switcher-grid.many .ttile-phase { grid-area: big; }
  .switcher-grid.many .ttile-phase .big { font-size: 17px; white-space: nowrap; }
  .switcher-grid.many .meter { grid-area: meter; }

  /* dashboard: today's numbers and the activity come before the long progression table */
  .progression { order: 1; }
  .phase .big { font-size: 24px; }
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile .value { font-size: 20px; }

  /* tables: tighter cells; the "wide-only" columns move into each row's "meta" line */
  table.data th, table.data td { padding: 8px 6px; }
  .wide-only { display: none; }
  .meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
  td.bets { padding: 4px 0 8px; }
  tr.clickable td:first-child { white-space: nowrap; } /* the chevron stays beside the sequence number */

  /* statistics */
  .grid.cols-5 > * { flex-basis: 140px; }
  .toolbar select { flex: 1 1 140px; min-width: 0; }
  .chart-box { height: 200px; }

  /* button groups wrap instead of running off the screen; the hairlines between buttons become shadows */
  .seg { flex-wrap: wrap; max-width: 100%; }
  .seg button { flex: 1 1 auto; justify-content: center; border-left: 0; box-shadow: -1px 0 0 var(--border-2), 0 -1px 0 var(--border-2); }
  .card h2 .filters { flex-basis: 100%; margin-left: 0; }
  .filters .seg { width: 100%; }

  /* log: the table's name above the message, so the message gets the full width */
  .log { max-height: none; }
  .log.with-src .line { grid-template-columns: 58px 2px minmax(0, 1fr); }
  .log.with-src .t, .log.with-src .lv { grid-row: span 2; }
  .log.with-src .src:empty { display: none; } /* an account-wide event: the message moves up next to its time */

  /* settings: each table on two lines, the switch and name on top, the URL under the name */
  .tables-edit, .tables-edit thead, .tables-edit tbody { display: block; }
  .tables-edit tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 6px 0; border-bottom: 1px solid #1e1f22; }
  .tables-edit thead tr { border-bottom-color: var(--border); }
  table.data.tables-edit th, table.data.tables-edit td { padding: 2px 0; border: 0; }
  .tables-edit th:nth-child(3), .tables-edit td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .tables-edit .url { max-width: none; }

  /* unsaved settings: Save and Discard stay at the bottom of the screen, wherever you are on the page */
  .save-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .toolbar.dirty { margin-bottom: 110px; }
  .toolbar.dirty .save-bar {
    position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--chrome); border-top: 1px solid var(--border-2); box-shadow: 0 -8px 24px rgba(0, 0, 0, .4);
  }
  .toolbar.dirty .save-bar .btn { flex: 1; }
  .toolbar.dirty .save-bar .warn-text { order: -1; flex-basis: 100%; }

  .toast { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .toast.lifted { bottom: calc(110px + env(safe-area-inset-bottom)); } /* above the save bar */
}

/* the smallest phones: the five tabs still fit side by side */
@media (max-width: 359px) {
  .tab { padding: 0 4px; font-size: 12.5px; }
}

/* the number picker stands up, as on a phone: 0 on top, then rows 1-2-3 … 34-35-36 */
@media (max-width: 560px) {
  .picker { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(13, 34px); max-width: 420px; }
  .picker .zero { grid-row: 1; grid-column: 1 / -1; }
  .picker .n:not(.zero) { grid-row: var(--row); grid-column: var(--col); }
  .picker button { font-size: 15px; }
}

/* ---------- touch screens: bigger targets for a finger ---------- */
@media (pointer: coarse) {
  .btn, .btn.big { height: 40px; }
  .site-pick { height: 40px; }
  .site-option { height: 48px; }
  .site-logo { width: 24px; height: 24px; }
  .btn.small { height: 36px; }
  .btn.icon { width: 40px; height: 40px; }
  .seg button { height: 36px; padding: 0 12px; }
  .tab { height: 44px; }
  /* 16px text: an iPhone zooms the page into any field with smaller text when it is tapped */
  input, select, .affix { height: 40px; font-size: 16px; }
  input.cell { height: 38px; }
  input.switch { width: 40px; height: 24px; }
  input.switch::before { width: 20px; height: 20px; }
  input.switch:checked::before { transform: translateX(16px); }
  /* small text links get a taller tap area without moving anything */
  .link, .card h2 a { padding: 10px 0; margin: -10px 0; }
  .tables-edit .url { padding: 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; }
}

/* progression steps that cannot be clicked before bets close */
.slow-steps { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); display: grid; gap: 4px; }

/* sign-in page (public/login.html) */
.signin-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.signin { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 18px; }
.signin-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; justify-content: center; }
.signin-card { display: flex; flex-direction: column; gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 24px; }
.signin-card h1 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 500; }
.field input { width: 100%; height: 38px; }
.signin-card .btn { width: 100%; margin-top: 4px; }
.signin-error { background: var(--red-bg); color: var(--red); border-radius: 4px; padding: 8px 10px; font-size: 13px; }
.signin-foot { margin: 0; text-align: center; color: var(--faint); font-size: 12px; }

/* Settings → Accounts: one block per site */
.account + .account { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.account-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }

/* Get started (public/onboarding.js) */
.onboarding { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.ob-rail { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 2px; }
.ob-rail-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ob-progress { height: 3px; background: var(--border); border-radius: 2px; margin-bottom: 10px; overflow: hidden; }
.ob-progress > div { height: 100%; background: var(--green); transition: width .4s ease; }
.ob-step { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 4px; cursor: pointer; color: var(--muted); }
.ob-step.current { background: var(--panel-2); color: var(--text); }
.ob-step.done { color: var(--text-2); }
.ob-step-mark { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-3); font-size: 11px; font-weight: 600; }
.ob-step.done .ob-step-mark { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.ob-step.current .ob-step-mark { border-color: var(--green); }
.ob-content { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 28px; animation: ob-in .35s ease both; }
@keyframes ob-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ob-title { margin: 0 0 10px; font-size: 21px; font-weight: 600; letter-spacing: -.3px; }
.ob-lead { margin: 0 0 22px; color: var(--text-2); max-width: 760px; }
.ob-nav { display: flex; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.ob-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; color: var(--text-2); font-size: 13px; }
.demo { background: var(--inset); border: 1px solid var(--border); border-radius: 6px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.demo-head { display: flex; align-items: center; gap: 10px; }
.demo-results { display: flex; gap: 4px; min-height: 30px; flex-wrap: wrap; }
.demo-new { animation: demo-drop .35s ease both; }
@keyframes demo-drop { from { opacity: 0; transform: translateX(-10px) scale(.8); } to { opacity: 1; transform: none; } }
.demo-pop { animation: demo-pop .4s ease both; }
@keyframes demo-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: none; } }
.demo-counter { display: flex; align-items: baseline; gap: 10px; }
.demo-counter .big { font-size: 26px; font-weight: 600; }
.demo-counter .sub { color: var(--muted); }
.demo-ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.demo-rung { border: 1px solid var(--border); border-radius: 4px; padding: 6px 8px; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); transition: all .25s; }
.demo-rung.now { border-color: var(--amber); background: var(--amber-bg); color: var(--text); }
.demo-rung.lost { border-color: rgba(229, 97, 91, .35); color: var(--red); }
.demo-rung.won { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.ob-wheel-row { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.ob-wheel { width: 300px; height: 300px; }
.ob-wheel-spin { animation: ob-spin 90s linear infinite; transform-origin: 0 0; }
@keyframes ob-spin { to { transform: rotate(360deg); } }
.ob-numbers { display: flex; flex-wrap: wrap; gap: 6px; max-width: 360px; }
.ob-demo-note { margin: 8px 0 0; }

/* Get started → Your numbers: the wheel and the board both choose */
.ob-pick { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.ob-pick-wheel { flex: none; }
.ob-pick-side { flex: 1 1 420px; min-width: 0; }
.ob-wheel.picking .ob-pocket { cursor: pointer; transition: opacity .15s; }
.ob-wheel.picking .ob-pocket.off { cursor: default; }
@media (hover: hover) { .ob-wheel.picking .ob-pocket:not(.on):not(.off):hover { opacity: .9; } }
/* the board as on the table: 0 on the left, then three rows (3-36 on top, 1-34 at the bottom) */
.ob-board { display: grid; grid-template-columns: 44px repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(3, 44px); gap: 4px; }
.ob-board > .ob-cell { grid-column: var(--c); grid-row: var(--r); }
.ob-board > .zero { grid-row: 1 / 4; }
.ob-cell { position: relative; display: grid; place-items: center; min-width: 0; border: 1px solid transparent; border-radius: 4px; color: #fff; font: inherit; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; opacity: .72; transition: opacity .12s, box-shadow .12s, transform .12s; -webkit-tap-highlight-color: transparent; }
.ob-cell.red { background: var(--roulette-red); }
.ob-cell.black { background: #26272b; border-color: #3a3c41; }
.ob-cell.green { background: var(--roulette-green); }
.ob-cell.on { opacity: 1; box-shadow: 0 0 0 2px var(--amber); }
.ob-cell.on::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.ob-cell:disabled { opacity: .22; cursor: default; }
@media (hover: hover) { .ob-cell:not(.on):not(:disabled):hover { opacity: .9; } }
.ob-cell:active:not(:disabled) { transform: scale(.94); }
.ob-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ob-pick-bar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px -28px -28px; padding: 14px 28px; background: var(--panel); border-top: 1px solid var(--border); }
.ob-pick-count { display: flex; align-items: center; gap: 12px; }
.ob-pick-count b { font-size: 16px; }
.ob-pick-dots { display: flex; gap: 3px; }
.ob-pick-dots > span { width: 6px; height: 14px; border-radius: 2px; background: var(--border-2); transition: background-color .15s; }
.ob-pick-dots > span.on { background: var(--amber); }
.ob-pick-error { margin-top: 10px; }
/* the bar replaces the step's own bottom edge */
.ob-content:has(.ob-pick-bar) .ob-nav { margin-top: 28px; }

/* Get started → Go live: each site getting ready */
.ob-ready { margin: 6px 0 22px; }
.ob-ready > p { margin: 0 0 12px; max-width: 760px; }
.ob-setup { border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ob-setup + .ob-setup { margin-top: 10px; }
.ob-setup-head { display: flex; align-items: center; gap: 10px; }
.ob-setup-row { display: grid; grid-template-columns: 20px 110px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; color: var(--text-2); }
.ob-setup-mark { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; border: 1px solid var(--border-3); align-self: center; }
.ob-setup-row.ok .ob-setup-mark { color: var(--green); border-color: var(--green); background: var(--green-bg); }
.ob-setup-row.warn .ob-setup-mark { color: var(--amber); border-color: var(--amber); background: var(--amber-bg); }
.ob-setup-row.failed .ob-setup-mark { color: var(--red); border-color: var(--red); background: var(--red-bg); }
.ob-setup-row.running .ob-setup-mark { border-color: var(--amber); border-top-color: transparent; animation: ob-turn .9s linear infinite; }
@keyframes ob-turn { to { transform: rotate(360deg); } }
.ob-setup-what { color: var(--text); }
.ob-setup-detail { overflow-wrap: anywhere; }
.ob-setup-problems { margin: 0 0 0 28px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ob-setup-problems li.failed b { color: var(--red); }
.ob-setup-problems li.warn b { color: var(--amber); }
.ob-site + .ob-site { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.ob-site h2 { font-size: 15px; margin: 0 0 12px; display: flex; gap: 10px; align-items: baseline; }
.grid.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid.ob-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ob-tiles .tile { background: var(--inset); border: 1px solid var(--border); border-radius: 4px; padding: 12px; }
.ob-chart { height: 220px; margin: 16px 0; }
.ob-relay { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 16px; }
.ob-relay-lane { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; }
.ob-relay-bar { position: relative; height: 26px; }
.ob-relay-bar > span { position: absolute; left: calc(var(--from) / var(--max) * 100%); width: calc((var(--to) - var(--from)) / var(--max) * 100%); top: 0; bottom: 0; border-radius: 4px; display: grid; place-items: center; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; animation: ob-grow .8s ease both; transform-origin: left; }
.ob-relay-bar.first > span { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); }
.ob-relay-bar.second > span { background: var(--amber-bg); border: 1px solid var(--amber); color: var(--amber); animation-delay: .5s; }
@keyframes ob-grow { from { transform: scaleX(0); } to { transform: none; } }
.ob-relay-axis { position: relative; height: 16px; margin-left: 100px; color: var(--faint); font-size: 11px; }
.ob-relay-axis > span { position: absolute; left: calc(var(--at) / var(--max) * 100%); white-space: nowrap; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.ob-relay-axis > span:first-child { transform: none; }
.ob-relay-axis > span::before { content: ""; position: absolute; left: 50%; top: -36px; height: 34px; border-left: 1px dashed var(--border-2); }
.ob-relay-axis > span:first-child::before { left: 0; }
.ob-relay-caption { margin: -4px 0 0 100px; }
.ob-note { margin: -8px 0 22px; padding: 10px 12px; border-left: 2px solid var(--amber); background: var(--amber-bg); color: var(--text-2); font-size: 13px; max-width: 760px; }
.ob-embed .card { border: 0; padding: 0; background: none; }
.ob-checks { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.ob-check { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.ob-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; }
.ob-check.ok .ob-dot { background: var(--green); }
.ob-check.optional .ob-dot { background: var(--faint); }
.ob-rules { display: flex; flex-direction: column; gap: 10px; }
.ob-rule { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.ob-rule.on { border-color: var(--green); background: var(--green-bg); }
.ob-rule input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }
.ob-rule > span { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 720px) {
  .onboarding { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 12px 0; }
  .ob-rail { position: static; }
  /* a phone shows the progress and the current step only; Back and Next move between steps */
  .ob-rail .ob-step:not(.current) { display: none; }
  .ob-content { padding: 18px; }
  .ob-facts, .grid.cols-4, .grid.ob-tiles { grid-template-columns: minmax(0, 1fr); }
  .ob-wheel { width: 240px; height: 240px; }
  /* phones: the bar label says just the steps; the board stands up (0 on top, rows of three) */
  .ob-relay-word { display: none; }
  .ob-relay-lane { grid-template-columns: 74px 1fr; }
  .ob-relay-axis { margin-left: 84px; }
  .ob-relay-caption { margin-left: 84px; }
  .ob-pick { gap: 18px; justify-content: center; }
  .ob-pick-wheel .ob-wheel { width: 220px; height: 220px; }
  .ob-pick-side { flex-basis: 100%; }
  .ob-board { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 40px; gap: 5px; }
  .ob-board > .ob-cell { grid-column: auto; grid-row: auto; }
  .ob-board > .zero { grid-column: 1 / 4; }
  .ob-cell { font-size: 15px; }
  .ob-pick-bar { margin: 18px -18px -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .ob-pick-count { gap: 8px; }
  .ob-pick-dots, .ob-pick-more, .ob-pick-long { display: none; }
  .ob-pick-bar { flex-wrap: nowrap; }
  .ob-setup-row { grid-template-columns: 20px 92px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .ob-wheel-spin, .demo-new, .demo-pop, .ob-content, .ob-relay-bar > span, .ob-setup-row.running .ob-setup-mark { animation: none; }
  .ob-cell { transition: none; }
}

/* Settings → Live browser (admin) */
.remote-bar { gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.remote-bar .btn.icon { width: 32px; padding: 0; }
.remote-go { flex: 1; min-width: 200px; }
.remote-address { width: 100%; font-family: var(--mono); font-size: 12px; }
.remote-screen { border: 1px solid var(--border-2); border-radius: 4px; overflow: hidden; background: var(--inset); outline: none; min-height: 200px; }
.remote-screen:focus { border-color: var(--focus); }
.remote-screen img { display: block; width: 100%; height: auto; cursor: default; user-select: none; }

/* control plane (public/control.js) */
.customers td { vertical-align: top; }
.customers .btn.small { white-space: nowrap; }
.pay-form, .notes-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pay-form input { width: 130px; }
.pay-form input[type="number"] { width: 100px; }
.notes-form { margin-top: 12px; }
.notes-form input { flex: 1 1 220px; }
.notes-form textarea { flex: 1 1 100%; font: inherit; color: var(--text); background: var(--inset); border: 1px solid var(--border-2); border-radius: 4px; padding: 8px 10px; resize: vertical; }
.sites-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; margin-bottom: 4px; }
.sites-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.sites-form label > input:not(.switch), .sites-form label > select { width: 100%; }
.site-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 6px; grid-column: span 1; }
.site-form.off { opacity: .6; }
.site-form label.row { flex-direction: row; color: var(--text); font-size: 14px; }
.created .v.mono, .v.mono { font-family: var(--mono); }

.telegram-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.table-picker { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 6px; }
.table-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.table-pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border: 1px solid var(--border); border-radius: 4px; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.table-pick .tick { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--border-2); border-radius: 3px; font-size: 11px; line-height: 1; }
.table-pick.on { color: var(--text); border-color: rgba(74, 222, 128, .45); background: var(--green-bg); }
.table-pick.on .tick { color: #0e0f11; background: var(--green); border-color: var(--green); }
.table-pick:disabled { cursor: default; }
.switches { display: flex; flex-direction: column; gap: 14px; }
.switches.alert { box-shadow: inset 3px 0 0 var(--red); }
.switch-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.switch-row + .switch-row { border-top: 1px solid var(--border); padding-top: 14px; }

/* ---------- Get started: the proxy step's call to the guide ---------- */
.ob-proxy-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 760px; margin: 0 0 8px; padding: 16px 18px;
  border: 1px solid rgba(67, 190, 118, .35); border-radius: 6px; background: var(--green-bg); }
.ob-proxy-cta > div { display: flex; flex-direction: column; gap: 3px; }
.ob-proxy-cta b { font-size: 15px; }
.ob-proxy-cta.done { border-color: var(--border-2); background: var(--panel); }
.ob-proxy-cta .btn { flex: none; }

/* ---------- the proxy guide (public/proxyGuide.js): full screen, picture left, what to do right ---------- */
.pg { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: var(--bg); outline: none; animation: pg-open .22s ease-out; }
@keyframes pg-open { from { opacity: 0; transform: translateY(8px); } }
.pg-head { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px max(20px, calc((100% - 1400px) / 2)); background: var(--chrome); border-bottom: 1px solid var(--border); }
.pg-name { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.pg-steps { display: flex; align-items: center; margin: 0 auto; padding: 0; list-style: none; }
.pg-steps li { display: flex; align-items: center; }
.pg-steps li:not(:last-child)::after { content: ''; width: 18px; height: 1px; margin: 0 2px; background: var(--border-3); }
.pg-steps li.done:not(:last-child)::after { background: var(--green); }
.pg-steps button { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 0; border-radius: 4px; background: none; color: var(--faint); font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.pg-steps button:disabled { cursor: default; }
@media (hover: hover) { .pg-steps button:not(:disabled):hover { color: var(--text); } }
.pg-num { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border: 1px solid var(--border-3); border-radius: 50%; font-size: 11px; font-weight: 600; }
.pg-steps li.current button { color: var(--text); }
.pg-steps li.current .pg-num { border-color: var(--green); background: var(--green); color: #08130c; box-shadow: 0 0 0 4px var(--green-bg); }
.pg-steps li.done button { color: var(--text-2); }
.pg-steps li.done .pg-num { border-color: transparent; background: var(--green-bg); color: var(--green); }
.pg-close { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
@media (hover: hover) { .pg-close:hover { background: var(--panel-2); color: var(--text); } }
.pg-close:focus-visible, .pg-steps button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pg-progress { height: 2px; background: var(--border); }
.pg-progress div { height: 100%; background: var(--green); transition: width .45s ease; }

.pg-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 40px; align-items: center; align-content: center; overflow-y: auto; overscroll-behavior: contain;
  padding: 28px max(24px, calc((100% - 1400px) / 2)) 32px; animation: pg-step .3s ease-out; }
@keyframes pg-step { from { opacity: 0; transform: translateX(10px); } }
.pg-media { position: sticky; top: 0; display: flex; justify-content: center; }
.pg-frame { position: relative; width: min(100%, calc((100dvh - 230px) * var(--ratio))); overflow: hidden; border: 1px solid var(--border-2); border-radius: 10px; background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5); }
.pg-frame img, .pg-frame video { display: block; width: 100%; height: 100%; object-fit: contain; }
.pg-frame video { cursor: pointer; }

/* a highlight: a pulsing green frame around what to click, and a label with an arrow pointing at it */
.pg-cue { position: absolute; pointer-events: none; animation: pg-cue-in .3s ease-out; }
@keyframes pg-cue-in { from { opacity: 0; transform: scale(1.15); } }
.pg-ring { position: absolute; inset: -5px; border: 2.5px solid var(--green); border-radius: 7px; box-shadow: 0 0 0 4px rgba(67, 190, 118, .22), 0 0 26px rgba(67, 190, 118, .55);
  animation: pg-pulse 1.4s ease-in-out infinite; }
@keyframes pg-pulse { 50% { transform: scale(1.035); opacity: .7; } }
.pg-label { position: absolute; left: 50%; bottom: calc(100% + 16px); translate: -50% 0; padding: 5px 10px; border-radius: 5px; background: var(--green); color: #08130c;
  font-size: 12.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); animation: pg-bob 1.2s ease-in-out infinite; }
.pg-label::after { content: ''; position: absolute; left: 50%; top: 100%; translate: -50% 0; border: 7px solid transparent; border-top-color: var(--green); }
@keyframes pg-bob { 50% { transform: translateY(-4px); } }
.pg-cue.below .pg-label { top: calc(100% + 16px); bottom: auto; animation-name: pg-bob-up; }
.pg-cue.below .pg-label::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--green); }
@keyframes pg-bob-up { 50% { transform: translateY(4px); } }
.pg-cue.end .pg-label { left: auto; right: 0; translate: 0 0; }
.pg-cue.end .pg-label::after { left: auto; right: 18px; translate: 0 0; }
.pg-cue.start .pg-label { left: 0; translate: 0 0; }
.pg-cue.start .pg-label::after { left: 18px; translate: 0 0; }
.pg-caption { position: absolute; left: 50%; bottom: 52px; translate: -50% 0; max-width: calc(100% - 24px); padding: 7px 12px; border-radius: 6px; background: rgba(14, 15, 17, .88);
  color: #fff; font-size: 13px; font-weight: 500; text-align: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: pg-fade .25s ease-out; pointer-events: none; }
.pg-caption.top { top: 12px; bottom: auto; }
@keyframes pg-fade { from { opacity: 0; } }
.pg-controls { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; padding: 3px 5px; border-radius: 7px; background: rgba(14, 15, 17, .78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pg-controls button { display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border: 0; border-radius: 4px; background: none; color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.pg-controls button.on { background: var(--green); color: #08130c; }
.pg-bar { flex: 1; height: 18px; padding: 7px 0; background: rgba(255, 255, 255, .25); background-clip: content-box; border-radius: 3px; cursor: pointer; }
.pg-bar div { height: 100%; border-radius: 3px; background: var(--green); }
.pg-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 64px; height: 64px; border: 0; border-radius: 50%;
  background: rgba(14, 15, 17, .78); color: #fff; cursor: pointer; }

/* what to do */
.pg-text { max-width: 540px; }
.pg-kicker { color: var(--green); font-size: 11.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.pg-text h2 { margin: 6px 0 12px; font-size: 23px; font-weight: 600; letter-spacing: -.3px; line-height: 1.25; }
.pg-text p { margin: 0 0 12px; color: var(--text-2); line-height: 1.6; }
.pg-open { display: inline-flex; align-items: center; gap: 8px; height: 40px; margin: 6px 0 2px; padding: 0 16px; text-decoration: none; }
.pg-note { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: 6px; background: var(--amber-bg); color: var(--amber) !important; }
.pg-note .icon { margin-top: 3px; flex: none; }
.pg-checks { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.pg-check { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 7px; background: var(--panel);
  color: var(--text-2); line-height: 1.45; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
@media (hover: hover) { .pg-check:hover { border-color: var(--border-3); } }
.pg-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pg-check:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.pg-box { display: grid; place-items: center; width: 20px; height: 20px; flex: none; margin-top: 0; border: 1.5px solid var(--border-3); border-radius: 5px; color: transparent; transition: all .15s; }
.pg-check.on { border-color: rgba(67, 190, 118, .5); background: var(--green-bg); color: var(--text); }
.pg-check.on .pg-box { border-color: var(--green); background: var(--green); color: #08130c; animation: pg-tick .25s ease-out; }
@keyframes pg-tick { 50% { transform: scale(1.2); } }
.pg-must { margin-left: 6px; padding: 1px 6px; border: 1px solid rgba(217, 164, 65, .45); border-radius: 3px; color: var(--amber); font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }

/* the last step: a box per website for the copied line */
.pg-paste { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.pg-site { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--border-2); border-radius: 7px; background: var(--panel); }
.pg-site.saved { border-color: rgba(67, 190, 118, .45); background: var(--green-bg); }
.pg-site-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.pg-site-head .pill { display: inline-flex; align-items: center; gap: 4px; }
.pg-site-head .link { margin-left: auto; }
.pg-field { display: flex; gap: 8px; width: 100%; }
.pg-field input { flex: 1; min-width: 0; height: 40px; font-size: 13px; }
.pg-field input.mono { font-family: var(--mono); }
.pg-parsed { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-parsed span { display: inline-flex; gap: 6px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--inset); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.pg-parsed i { color: var(--faint); font-family: system-ui, sans-serif; font-style: normal; }
.pg-warn { color: var(--amber); font-size: 12.5px; }
.pg-error { color: var(--red); font-size: 12.5px; overflow-wrap: anywhere; }

.pg-foot { display: flex; align-items: center; gap: 12px; padding: 12px max(20px, calc((100% - 1400px) / 2)); padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--chrome); border-top: 1px solid var(--border); }
.pg-foot .btn.big { display: inline-flex; align-items: center; gap: 6px; }
.pg-hint { color: var(--faint); font-size: 12.5px; }

@media (max-width: 1000px) {
  .pg-step-title { display: none; }
  .pg-steps li.current .pg-step-title { display: inline; }
}
@media (max-width: 720px) {
  .ob-proxy-cta { flex-direction: column; align-items: stretch; }
  .pg-head { gap: 6px; min-height: 52px; padding: 6px 8px 6px 12px; }
  .pg-name { display: none; }
  .pg-steps { margin: 0; }
  .pg-steps li:not(:last-child)::after { width: 8px; margin: 0; }
  .pg-steps button { gap: 6px; padding: 0 5px; }
  .pg-steps li.current .pg-step-title { display: none; }
  .pg-close { margin-left: auto; }
  .pg-body { grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; padding: 16px 14px 24px; }
  .pg-media { position: static; }
  .pg-frame { width: min(100%, calc((100dvh - 250px) * var(--ratio))); border-radius: 12px; }
  .pg-frame.tall { width: min(86%, calc(56dvh * var(--ratio))); min-width: min(100%, 230px); }
  .pg-label { font-size: 11px; padding: 4px 8px; bottom: calc(100% + 12px); }
  .pg-cue.below .pg-label { top: calc(100% + 12px); }
  .pg-caption { bottom: 46px; font-size: 12px; padding: 6px 10px; }
  .pg-text { max-width: none; }
  .pg-text h2 { font-size: 20px; }
  .pg-open { width: 100%; justify-content: center; height: 46px; }
  .pg-check { padding: 13px 12px; }
  .pg-hint { display: none; }
  .pg-foot { padding: 10px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .pg-foot .btn.big { flex: 1; justify-content: center; }
  .pg-foot .btn:first-child { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pg, .pg-body, .pg-cue, .pg-ring, .pg-label, .pg-caption { animation: none !important; }
}

/* ---------- Stake: connecting the account (public/stakeConnect.js) ---------- */
.sc { border: 1px solid var(--border-2); border-radius: 8px; background: var(--panel); overflow: hidden; }
.sc + .sc { margin-top: 16px; }
.sc-logo.parimatch { background: #f5d018; color: #111; }
.sc-head { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 16px; background: var(--chrome); border-bottom: 1px solid var(--border); }
.sc-logo { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 6px; background: #213743; color: #fff; font-size: 12.5px; font-weight: 800; }
.sc-stop { margin-left: auto; }
.sc-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; }
.sc-lead { margin: 0; max-width: 640px; color: var(--text-2); line-height: 1.55; }
.sc-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-how li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--inset); color: var(--text-2); font-size: 13px; line-height: 1.45; }
.sc-how li > span { display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: 11px; font-weight: 700; }
.sc-field { display: flex; flex-direction: column; gap: 6px; max-width: 420px; color: var(--muted); font-size: 12.5px; }
.sc-field i { color: var(--faint); font-style: normal; }
.sc-field input { height: 40px; font-size: 14px; }
.sc-privacy { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 12px; }
.sc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-actions .btn.big, .sc-code-row .btn.big { height: 40px; padding: 0 18px; }
.sc-note { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: 6px; background: var(--amber-bg); color: var(--amber); font-size: 13px; line-height: 1.45; }
.sc-note .icon { flex: none; margin-top: 2px; }
.sc-error { color: var(--red); font-size: 13px; line-height: 1.45; }
.sc-hint { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.sc-hint .link { margin-left: 4px; }
.sc-more { padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.sc-more summary { color: var(--muted); cursor: pointer; }
@media (hover: hover) { .sc-more summary:hover { color: var(--text); } }
.sc-more[open] summary { margin-bottom: 8px; color: var(--text); }
.sc-more p { margin: 0 0 6px; }
.sc-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; padding-left: 18px; color: var(--text-2); line-height: 1.5; }
.sc-list.numbered { list-style: decimal; }
.sc-out { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: var(--green); font-weight: 500; }

/* while connecting: four stages down the card, the current one open */
.sc-steps { display: flex; flex-direction: column; margin: 0; padding: 18px 16px; list-style: none; }
.sc-step { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; padding-bottom: 16px; }
.sc-step:last-child { padding-bottom: 0; }
.sc-step:not(:last-child)::before { content: ''; position: absolute; left: 11.5px; top: 28px; bottom: 4px; border-left: 1px solid var(--border-2); }
.sc-step.done:not(:last-child)::before { border-color: rgba(67, 190, 118, .5); }
.sc-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--border-3); border-radius: 50%; background: var(--panel); color: var(--faint); font-size: 11px; font-weight: 700; }
.sc-step.current .sc-mark { border-color: var(--green); background: var(--green); color: #08130c; box-shadow: 0 0 0 4px var(--green-bg); }
.sc-step.done .sc-mark { border-color: transparent; background: var(--green-bg); color: var(--green); }
.sc-step-title { align-self: center; color: var(--faint); font-size: 13px; font-weight: 600; }
.sc-step.current .sc-step-title { color: var(--text); }
.sc-step.done .sc-step-title { color: var(--text-2); font-weight: 500; }
.sc-step-body { grid-column: 2; display: flex; flex-direction: column; gap: 12px; margin-top: 12px; animation: sc-in .25s ease-out; }
@keyframes sc-in { from { opacity: 0; transform: translateY(4px); } }

.sc-ask { display: flex; align-items: flex-start; gap: 12px; }
.sc-ask-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 8px; background: var(--green-bg); color: var(--green); }
.sc-ask-icon.bad { background: var(--red-bg); color: var(--red); }
.sc-ask h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.sc-ask p { margin: 0; max-width: 620px; color: var(--text-2); line-height: 1.55; }

.sc-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-code { width: 9em; height: 52px; padding: 0 12px; font-family: var(--mono); font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: .3em; text-align: center; }
.sc-code::placeholder { color: var(--border-3); }
.sc-code:disabled { opacity: .6; }

.sc-working { display: flex; align-items: center; gap: 10px; color: var(--text-2); line-height: 1.45; }
.sc-working.small { color: var(--muted); font-size: 12.5px; }
.sc-spin { width: 16px; height: 16px; flex: none; border: 2px solid var(--border-3); border-top-color: var(--green); border-radius: 50%; animation: sc-turn .8s linear infinite; }
@keyframes sc-turn { to { transform: rotate(360deg); } }

.sc-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sc-choice { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--inset); color: var(--text-2); font: inherit; font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.sc-choice b { color: var(--text); font-size: 14px; }
.sc-choice.recommended { border-color: rgba(67, 190, 118, .45); background: var(--green-bg); }
@media (hover: hover) { .sc-choice:hover { border-color: var(--green); } }
.sc-choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sc-tag { align-self: flex-start; padding: 1px 7px; border-radius: 3px; background: var(--green); color: #08130c; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }

/* the guided two-factor setup: three parts, each opens once the one before is ticked */
.sc-sub { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-sub > li { border: 1px solid var(--border); border-radius: 8px; background: var(--inset); transition: border-color .15s, opacity .15s; }
.sc-sub > li.current { border-color: var(--border-3); }
.sc-sub > li.locked { opacity: .5; }
.sc-sub-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; font-size: 13.5px; }
.sc-sub-num { display: grid; place-items: center; width: 20px; height: 20px; flex: none; border: 1px solid var(--border-3); border-radius: 50%; color: var(--muted); font-size: 11px; font-weight: 700; }
.sc-sub > li.current .sc-sub-num { border-color: var(--green); color: var(--green); }
.sc-sub > li.done .sc-sub-num { border-color: transparent; background: var(--green-bg); color: var(--green); }
.sc-sub > li.done .sc-sub-head b { color: var(--text-2); font-weight: 500; }
.sc-reopen { margin-left: auto; }
.sc-sub-body { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 14px 42px; animation: sc-in .25s ease-out; }
.sc-sub-body p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.sc-stores { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-stores .btn { height: 38px; }
.sc-tick { margin: 0; }
.sc-add { display: flex; flex-direction: column; gap: 10px; }
.sc-add.with-qr { flex-direction: row; align-items: flex-start; gap: 18px; }
.sc-add > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sc-qr { width: 172px; height: 172px; flex: none; padding: 8px; border-radius: 8px; background: #fff; image-rendering: pixelated; }
.sc-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-key code { padding: 7px 10px; border: 1px solid var(--border-2); border-radius: 5px; background: var(--panel); font-family: var(--mono); font-size: 13px; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.sc-wide { height: 44px; text-decoration: none; }
.sc-switch { align-self: flex-start; }

.sc-wait { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid rgba(67, 190, 118, .35); border-radius: 8px; background: var(--green-bg); color: var(--text); font-size: 13.5px; }
.sc-pulse { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--green); animation: sc-pulse 1.4s ease-in-out infinite; }
@keyframes sc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(67, 190, 118, .55); } 50% { box-shadow: 0 0 0 7px rgba(67, 190, 118, 0); } }
.sc-link { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sc-link input { flex: 1 1 260px; min-width: 0; height: 38px; font-family: var(--mono); font-size: 12.5px; }
.sc-link .btn { height: 38px; }

.sc-done { flex-direction: row; align-items: center; gap: 12px; }
.sc-done-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.sc-done-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.sc-done-text b { font-size: 14.5px; }
.sc-done-text span { color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.sc-admin { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--border-2); overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 720px) {
  .sc-how, .sc-choices { grid-template-columns: minmax(0, 1fr); }
  .sc-body, .sc-steps { padding: 16px 14px; }
  .sc-step { column-gap: 10px; }
  /* the open step takes the card's full width (the line down the side would only squeeze it) */
  .sc-step-body { grid-column: 1 / -1; }
  .sc-step.current:not(:last-child)::before { display: none; }
  .sc-field { max-width: none; }
  .sc-code-row { flex-wrap: nowrap; }
  .sc-code { flex: 1; width: auto; min-width: 0; letter-spacing: .22em; }
  .sc-code-row .btn.big { height: 52px; }
  .sc-sub-body { padding-left: 12px; }
  .sc-add.with-qr { flex-direction: column; }
  .sc-wide { width: 100%; }
  .sc-actions .btn.big { flex: 1; }
  .sc-done { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-step-body, .sc-sub-body, .sc-spin, .sc-pulse { animation: none; }
}
