/* Midorado.gg Sniper — components */

/* ============================================================ titlebar */
#titlebar {
  height: var(--tb-h); display: flex; align-items: center; gap: 12px;
  padding-inline: 12px 6px;
  background: var(--bg-deep); border-bottom: 1px solid var(--line);
  position: relative; z-index: 30;
}
.tb-left { display: flex; align-items: center; gap: 10px; width: calc(var(--side-w) - 12px); flex-shrink: 0; }
.tb-logo { width: 26px; height: 26px; border-radius: 8px; overflow: hidden; flex-shrink: 0; box-shadow: 0 4px 14px -4px rgba(124, 92, 255, 0.6); }
.tb-logo img { width: 100%; height: 100%; display: block; pointer-events: none; }
.tb-title { font-family: var(--display); font-weight: 600; font-size: 14.5px; letter-spacing: -0.2px; white-space: nowrap; }
.tb-title span { color: var(--accent-hi); }
.tb-status {
  font-size: 11px; padding: 3px 9px 3px 7px; border-radius: var(--r-pill); font-weight: 600;
  border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim);
  white-space: nowrap;
}
.tb-status .dot { width: 6px; height: 6px; }
.tb-status.online { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 32%, transparent); background: var(--ok-soft); }
.tb-status.sniping { color: var(--accent-hi); border-color: var(--accent-line); background: var(--accent-soft); }
.tb-center { flex: 1; display: flex; justify-content: center; min-width: 0; height: 100%; align-items: center; }
.tb-search {
  display: inline-flex; align-items: center; gap: 9px; height: 30px; width: min(380px, 100%);
  padding-inline: 11px 6px; border-radius: var(--radius-sm);
  background: var(--raised); border: 1px solid var(--line); color: var(--text-faint); font-size: 12.5px;
  transition: background var(--trans), border-color var(--trans), color var(--trans);
}
.tb-search:hover { background: var(--raised-2); border-color: var(--line-2); color: var(--text-dim); }
.tbs-label { flex: 1; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-search kbd { font-size: 10px; padding: 1px 6px; }
.tb-right { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.tb-sep { width: 1px; height: 16px; background: var(--line-2); margin: 0 6px; }
.tb-icon, .tb-btn { width: 36px; height: 30px; border-radius: var(--radius-sm); color: var(--text-dim); display: grid; place-items: center; transition: background var(--trans), color var(--trans); }
.tb-icon:hover, .tb-btn:hover { background: var(--hover); color: var(--text); }
.tb-close:hover { background: #e11d48; color: #fff; }

/* ============================================================ shell */
#shell { height: calc(100vh - var(--tb-h)); display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
#sidebar {
  background: var(--bg-deep); border-inline-end: 1px solid var(--line);
  padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto;
}
#nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sep { height: 1px; background: var(--line); margin: 7px 10px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding-inline: 11px;
  border-radius: var(--radius-md); color: var(--text-dim); font-weight: 520; font-size: 13.5px; text-align: start;
  transition: background var(--trans), color var(--trans);
}
.nav-item .ni { color: var(--text-faint); display: inline-flex; transition: color var(--trans); }
.nav-item .nl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item:hover .ni { color: var(--text-dim); }
.nav-item.active {
  color: var(--text); font-weight: 600;
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.17), rgba(34, 211, 238, 0.04) 75%, transparent);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.2);
}
[dir="rtl"] .nav-item.active { background: linear-gradient(270deg, rgba(124, 92, 255, 0.17), rgba(34, 211, 238, 0.04) 75%, transparent); }
.nav-item.active .ni { color: var(--accent-hi); }
html[data-theme="light"] .nav-item.active { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.nav-badge {
  min-width: 20px; height: 19px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  display: none; align-items: center; justify-content: center; box-shadow: 0 0 12px -2px var(--accent);
}
.nav-badge.show { display: inline-flex; animation: pop 0.24s var(--ease); }

/* sidebar sniper control */
.side-sniper {
  margin-top: auto; padding: 11px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); box-shadow: var(--inner); display: flex; flex-direction: column; gap: 10px;
}
.side-sniper.live { border-color: var(--accent-line); background: linear-gradient(160deg, rgba(124, 92, 255, 0.12), transparent 70%), var(--panel); }
.ss-top { display: flex; align-items: center; gap: 10px; }
.ss-radar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-2); position: relative; flex-shrink: 0; }
.side-sniper.live .ss-radar { background: var(--accent-soft); border-color: var(--accent-line); }
.side-sniper.live .ss-radar::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 1.5px solid var(--accent); animation: ping 2s var(--ease) infinite; }
.ss-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ss-txt b { font-size: 13px; font-weight: 650; }
.side-sniper.live .ss-txt b { color: var(--accent-hi); }
.ss-txt span { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* account chip */
.account-chip:empty { display: none; }
.side-sniper[hidden] + .account-chip { margin-top: auto; }
.chip-user { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: var(--radius-md); transition: background var(--trans); cursor: pointer; color: var(--text-faint); }
.chip-user:hover { background: var(--hover); color: var(--text-dim); }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; color: #fff; font-size: 13.5px; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.chip-meta { min-width: 0; flex: 1; }
.chip-name { font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-sub { font-size: 11.5px; color: var(--text-faint); display: flex; align-items: center; gap: 5px; }
.verified { color: var(--accent-2); display: inline-flex; align-items: center; gap: 4px; }

.credit { padding: 6px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11px; }
.credit-by { color: var(--text-faint); } .credit-by b { color: var(--text-dim); font-weight: 600; }
.credit-link { color: var(--text-faint); cursor: pointer; transition: color var(--trans); }
.credit-link:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================ main */
#main {
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0;
  background:
    radial-gradient(900px 460px at 100% -12%, rgba(124, 92, 255, 0.07), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(34, 211, 238, 0.035), transparent 60%),
    var(--bg);
}
#topbar-progress { position: absolute; inset-inline: 0; top: 0; height: 2px; overflow: hidden; z-index: 5; }
#topbar-progress.active::after { content: ""; display: block; height: 100%; width: 35%; background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent); animation: slide 1s infinite; }
@keyframes slide { from { transform: translateX(-120%); } to { transform: translateX(360%); } }
#view { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 26px 30px 40px; }
#view > * { max-width: 1320px; margin-inline: auto; }
#view.enter > * { animation: fadeUp 0.26s var(--ease) both; }
#view.enter > *:nth-child(2) { animation-delay: 30ms; }
#view.enter > *:nth-child(3) { animation-delay: 60ms; }
#view.enter > *:nth-child(n+4) { animation-delay: 90ms; }

/* ============================================================ headings */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.ph-txt { min-width: 0; }
.page-title { font-family: var(--display); font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -0.6px; line-height: 1.15; }
.page-sub { color: var(--text-dim); font-size: 13.5px; margin-top: 5px; max-width: 640px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.sec-head h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text); letter-spacing: 0.1px; }
.sec-head h2 .ico-svg { color: var(--text-faint); }
.count { font-size: 11px; font-weight: 600; color: var(--text-dim); background: var(--raised); border: 1px solid var(--line); padding: 1px 7px; border-radius: var(--r-pill); font-variant-numeric: tabular-nums; }
.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-faint); margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3, .card-head h4 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; }
.card-head h3 .ico-svg { color: var(--text-faint); }
.link { color: var(--accent-hi); font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
[dir="rtl"] .link .ico-svg svg, [dir="rtl"] .pager .ico-svg svg, [dir="rtl"] .custom-arrow svg { transform: scaleX(-1); }

/* ============================================================ panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--inner), var(--shadow-sm); }
html[data-theme="light"] .panel { box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 14px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1180px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.stat { padding: 16px 18px; position: relative; overflow: hidden; }
.stat-label { font-size: 12px; color: var(--text-dim); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); }
.stat-value { font-family: var(--display); font-size: 26px; font-weight: 600; margin-top: 10px; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; }
.stat-value.accent { color: var(--accent-hi); }
.stat-value.ok { color: var(--ok); }
.stat-foot { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.off { background: var(--text-faint); }
.dot.live { background: var(--accent-2); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16); animation: pulse 1.6s ease-in-out infinite; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--text-dim); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; box-shadow: none; }
.pill.ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.pill.bad { color: var(--err); background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 30%, transparent); }

/* ============================================================ buttons */
.btn {
  --h: 34px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--h); padding-inline: 14px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13px; white-space: nowrap;
  background: var(--raised); border: 1px solid var(--line-2); color: var(--text); box-shadow: var(--inner);
  transition: background var(--trans), border-color var(--trans), color var(--trans), box-shadow var(--trans), transform var(--trans), filter var(--trans), opacity var(--trans);
}
.btn:hover:not(:disabled) { background: var(--raised-2); border-color: var(--line-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; }
.btn:focus-visible { outline-offset: 2px; }
.btn-sm { --h: 28px; padding-inline: 10px; font-size: 12.5px; gap: 6px; border-radius: 7px; }
.btn-lg { --h: 42px; padding-inline: 18px; font-size: 14px; border-radius: var(--radius-md); }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--grad-btn); border-color: transparent; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px -8px rgba(124, 92, 255, 0.85);
}
.btn-primary:hover:not(:disabled) { background: var(--grad-btn); border-color: transparent; filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 22px -8px rgba(124, 92, 255, 0.95); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); box-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: var(--hover); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 28%, transparent); box-shadow: none; }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--err) 20%, transparent); border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.btn-stop { background: var(--raised); color: var(--text); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn-stop .ico-svg { color: var(--err); }
.btn-stop:hover:not(:disabled) { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 55%, transparent); }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; }
.icon-btn { width: 30px; height: 30px; border-radius: 7px; display: inline-grid; place-items: center; color: var(--text-faint); transition: background var(--trans), color var(--trans); flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); color: var(--text); }

/* ============================================================ switch / checkbox */
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; display: inline-block; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; inset: 0; background: var(--raised-3); border: 1px solid var(--line-2); border-radius: 20px; transition: background var(--trans), border-color var(--trans); }
.slider::before { content: ""; position: absolute; height: 16px; width: 16px; inset-inline-start: 2px; top: 2px; background: var(--text-dim); border-radius: 50%; transition: transform var(--t-med) var(--ease), background var(--trans); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.switch input:checked + .slider { background: var(--accent); border-color: transparent; }
.switch input:checked + .slider::before { transform: translateX(16px); background: #fff; }
[dir="rtl"] .switch input:checked + .slider::before { transform: translateX(-16px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.switch:hover .slider { border-color: var(--line-3); }

input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 17px; height: 17px; flex-shrink: 0;
  border: 1.5px solid var(--line-3); border-radius: 5px;
  background: var(--input-bg); cursor: pointer;
  display: inline-grid; place-content: center;
  transition: background var(--trans), border-color var(--trans), box-shadow var(--trans);
}
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked { background: var(--accent); border-color: transparent; }
input[type="checkbox"]:checked::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }
input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
.switch input[type="checkbox"] { width: 0; height: 0; border: none; }

/* ============================================================ inputs */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.hint, .field .hint { font-size: 11.5px; color: var(--text-faint); line-height: 1.45; }
input[type="text"], input[type="number"], input[type="password"], select, textarea {
  background: var(--input-bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 8px 11px; color: var(--text); font-size: 13.5px; width: 100%; min-height: 36px;
  transition: border-color var(--trans), box-shadow var(--trans), background var(--trans);
}
input[type="text"]::placeholder, input[type="number"]::placeholder, textarea::placeholder { color: var(--text-faint); }
input[type="text"]:hover, input[type="number"]:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="number"] { font-variant-numeric: tabular-nums; }
textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.inline-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.inline-toggle:last-child { border-bottom: none; }
.it-meta { min-width: 0; }
.it-meta strong { font-size: 13.5px; font-weight: 600; }
.it-meta p { font-size: 12px; color: var(--text-faint); margin-top: 2px; line-height: 1.45; }
.it-meta p:empty { display: none; }
.field-stack { display: flex; flex-direction: column; gap: 5px; }
.lbl-flex { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.range-val { font-family: var(--mono); font-size: 11.5px; color: var(--accent-hi); font-weight: 600; background: var(--accent-soft); padding: 1px 7px; border-radius: var(--r-pill); }
input.range { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; min-height: 0; border-radius: 5px; background: var(--raised-3); border: none; outline: none; padding: 0; margin: 8px 0 4px; }
input.range:focus { box-shadow: none; }
input.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; cursor: pointer; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: transform var(--trans); }
input.range:hover::-webkit-slider-thumb { transform: scale(1.12); }
input.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }
.field-static { padding: 8px 11px; min-height: 36px; border-radius: var(--radius-sm); background: var(--raised); border: 1px solid var(--line); color: var(--text); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.field-static.mono { font-family: var(--mono); font-size: 12px; color: var(--text-dim); word-break: break-all; }
.field-static.with-copy { justify-content: space-between; padding-inline-end: 3px; }
select { -webkit-appearance: none; appearance: none; padding-inline-end: 34px; }

/* custom select */
.sel { position: relative; width: 100%; }
.sel-btn { width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--input-bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px 7px 11px; font-size: 13.5px; color: var(--text); text-align: start; transition: border-color var(--trans), box-shadow var(--trans); }
.sel-btn:hover { border-color: var(--line-3); }
.sel.open .sel-btn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sel-btn .ico-svg { color: var(--text-faint); transition: transform var(--t-med) var(--ease); flex-shrink: 0; }
.sel.open .sel-btn .ico-svg { transform: rotate(180deg); color: var(--accent-hi); }
.sel-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; min-width: 0; }
.sel-label.ph { color: var(--text-faint); }
.sel-menu { position: fixed; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 5px; z-index: 1000; animation: pop 0.14s var(--ease) both; display: flex; flex-direction: column; overflow: hidden; max-height: 320px; }
.sel-list { overflow-y: auto; max-height: 258px; }
.sel-opt { padding: 7px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; transition: background 0.1s; }
.sel-opt:hover { background: var(--hover); }
.sel-opt.sel-on { background: var(--accent-soft); color: var(--accent-hi); font-weight: 600; }
.sel-search { margin: 3px 3px 5px; padding: 7px 10px; border-radius: 7px; background: var(--input-bg); border: 1px solid var(--line-2); color: var(--text); font-size: 13px; font-family: inherit; }
.sel-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sel-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 9px; flex-shrink: 0; }

/* ============================================================ loading / empty */
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; flex-shrink: 0; }
.spinner.lg { width: 32px; height: 32px; border-width: 3px; }
.btn-primary .spinner { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
.center-load { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px; color: var(--text-dim); font-size: 13px; }
.skel { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--raised) 25%, var(--raised-2) 45%, var(--raised) 65%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skel-wrap { display: flex; flex-direction: column; gap: 12px; padding: 8px 4px; }
.skel-item { display: flex; align-items: center; gap: 12px; }
.sk-ic { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; }
.skel-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.sk-l1 { height: 11px; width: 55%; }
.sk-l2 { height: 9px; width: 80%; }
.skel-form .skel-item { gap: 12px; }
.skel-form .sk-ic { display: none; }
.skel-form .sk-l1 { height: 10px; width: 30%; }
.skel-form .sk-l2 { height: 34px; width: 100%; border-radius: 8px; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty .eico { width: 52px; height: 52px; border-radius: 15px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 14px; color: var(--text-dim); }
.empty h4 { color: var(--text); font-size: 14.5px; margin-bottom: 4px; font-weight: 600; }
.empty p { font-size: 13px; max-width: 360px; margin: 0 auto; color: var(--text-dim); }
.empty-cta { margin-top: 16px; display: flex; justify-content: center; }

/* ============================================================ dashboard: command center */
.cc {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(280px, 0.9fr); gap: 26px; align-items: center;
  padding: 24px 26px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(124, 92, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent),
    var(--panel);
  box-shadow: var(--inner), var(--shadow);
}
.cc.is-live { border-color: rgba(124, 92, 255, 0.3); }
.cc.is-live::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent); opacity: 0.7; }
html[data-theme="light"] .cc { background: radial-gradient(520px 260px at 0% 0%, rgba(106, 76, 245, 0.1), transparent 70%), var(--panel); }
.cc-radar { display: grid; place-items: center; }
.radar { position: relative; flex-shrink: 0; }
.radar svg { display: block; overflow: visible; }
.radar-sweep { transform-origin: 100px 100px; animation: spin 4s linear infinite; }
.radar.is-idle .radar-sweep { animation: none; opacity: 0.22; }
.radar-blip { animation: blip 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.radar-blip.b2 { animation-duration: 3.1s; } .radar-blip.b3 { animation-duration: 2.7s; }
@keyframes blip { 0% { opacity: 0; transform: scale(0.4); } 12% { opacity: 1; transform: scale(1.25); } 30% { transform: scale(1); } 100% { opacity: 0.15; } }
.cc-main { min-width: 0; }
.cc-state { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.3px; color: var(--text-dim); padding: 4px 11px 4px 9px; border-radius: var(--r-pill); background: var(--raised); border: 1px solid var(--line-2); }
.cc-state .dot { width: 7px; height: 7px; }
.cc-state.live { color: var(--accent-2); background: var(--info-soft); border-color: rgba(34, 211, 238, 0.28); }
.cc-greet { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.7px; line-height: 1.2; margin-top: 12px; }
.cc-greet span { color: var(--accent-hi); }
.cc-sub { color: var(--text-dim); margin-top: 6px; font-size: 13.5px; max-width: 480px; }
.cc-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.cc-go { min-width: 168px; }
.cc-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-size: 12px; color: var(--text-faint); }
.cc-mi { display: inline-flex; align-items: center; gap: 6px; }
.cc-mi b { color: var(--ok); font-weight: 600; }
.cc-mi .dot { width: 6px; height: 6px; box-shadow: none; }
/* Wrapper so the range picker can sit above the tiles and still occupy the
   command centre's third column. */
.cc-statwrap { display: flex; flex-direction: column; gap: 8px; align-self: stretch; min-width: 0; }
.cc-range { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-pill); background: var(--raised); border: 1px solid var(--line-2); align-self: flex-end; }
.cc-range button { border: 0; background: none; color: var(--text-dim); font: inherit; font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: var(--r-pill); cursor: pointer; transition: background .15s, color .15s; }
.cc-range button:hover { color: var(--text); }
.cc-range button.on { background: var(--accent-soft); color: var(--accent-hi); }
.cc-statwrap .cc-stats { flex: 1; }
.cc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; align-self: stretch; }
.cc-stat { background: var(--panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html[data-theme="midnight"] .cc-stat { background: rgba(10, 13, 26, 0.72); }
.cc-sl { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-sl .ico-svg { color: var(--text-faint); }
.cc-n { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 4px; }
.cc-stat.ok .cc-n { color: var(--ok); }
.cc-stat.accent .cc-n { color: var(--accent-hi); }
.cc-sf { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1240px) {
  .cc { grid-template-columns: auto minmax(0, 1fr); }
  .cc-statwrap { grid-column: 1 / -1; }
  .cc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.cc.welcome { grid-template-columns: auto minmax(0, 1fr); }
.welcome-feats { grid-column: 1 / -1; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.welcome-feats li { display: flex; gap: 11px; align-items: flex-start; }
.wf-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); flex-shrink: 0; }
.welcome-feats b { display: block; font-size: 13px; font-weight: 600; }
.welcome-feats span { font-size: 12px; color: var(--text-dim); line-height: 1.45; }

/* onboarding checklist */
.onboard { margin: 16px 0 0; padding: 18px 20px; border-radius: var(--radius-lg); border: 1px solid var(--accent-line); background: linear-gradient(160deg, rgba(124, 92, 255, 0.1), rgba(34, 211, 238, 0.03) 60%, transparent), var(--panel); }
.sub-banner + .onboard, #view > .onboard:first-child { margin-top: 0; margin-bottom: 16px; }
.ob-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ob-title { flex: 1; min-width: 0; }
.ob-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--accent-hi); }
.ob-title h3 { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.3px; margin-top: 4px; }
.ob-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; max-width: 360px; }
.ob-bar { flex: 1; height: 5px; border-radius: 5px; background: var(--raised-3); overflow: hidden; }
.ob-bar span { display: block; height: 100%; border-radius: 5px; background: var(--grad); transition: width 0.5s var(--ease); }
.ob-count { font-size: 11.5px; color: var(--text-dim); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
@media (max-width: 1240px) { .ob-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ob-step { display: flex; flex-direction: column; gap: 10px; padding: 13px; border-radius: var(--radius); background: var(--raised); border: 1px solid var(--line); min-width: 0; }
.ob-step > div { display: flex; flex-direction: column; gap: 3px; }
.ob-step .btn { align-self: flex-start; margin-top: auto; }
.ob-step.current { border-color: var(--accent-line); background: var(--raised-2); box-shadow: var(--glow); }
.ob-step.done { opacity: 0.78; }
.ob-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--raised-3); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.ob-step.current .ob-num { background: var(--accent); color: #fff; }
.ob-step.done .ob-num { background: var(--ok-soft); color: var(--ok); }
.ob-txt b { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ob-txt span { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.ob-opt { font-size: 10px; font-weight: 600; color: var(--text-faint); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 0 6px; }
.ob-done { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--ok); }

/* armed games strip */
.armed-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.armed-chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-align: start; transition: border-color var(--trans), background var(--trans), transform var(--trans); max-width: 280px; }
[dir="rtl"] .armed-chip { padding: 7px 7px 7px 12px; }
.armed-chip:hover { border-color: var(--accent-line); background: var(--raised); transform: translateY(-1px); }
.armed-chip .m { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 600; font-size: 12.5px; overflow: hidden; flex-shrink: 0; }
.armed-chip .m img { width: 100%; height: 100%; object-fit: cover; display: block; }
.armed-chip .info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.armed-chip .info b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.armed-chip .info span { font-size: 11px; color: var(--text-dim); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.armed-chip .ac-msg { color: var(--text-faint); }
.armed-chip .dot { width: 6px; height: 6px; }
.armed-chip.add { border-style: dashed; background: transparent; color: var(--text-dim); }
.armed-chip.add .m { background: var(--raised); color: var(--text-dim); border: 1px solid var(--line); }
.armed-chip.add:hover { color: var(--text); }

.dash-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-top: 26px; align-items: start; }
@media (max-width: 1100px) { .dash-cols { grid-template-columns: minmax(0, 1fr); } }
.feed-card { padding: 16px 16px 8px; min-width: 0; }
.feed-card .empty { padding: 26px 12px 30px; }
.mini-orders { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.mo-row { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: var(--radius-sm); text-align: start; transition: background var(--trans); width: 100%; }
.mo-row:hover { background: var(--hover); }
.mo-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); flex-shrink: 0; }
.mo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.mo-main b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-main span { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-price { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ok); }

.sub-banner { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; margin-bottom: 16px; border-radius: var(--radius); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent); color: var(--warn); font-size: 13px; font-weight: 600; }
.sub-banner .ico-svg { flex-shrink: 0; }
.sub-banner .btn { color: var(--text); }
.sub-banner.urgent { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 35%, transparent); color: var(--err); }

.app-foot { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-faint); font-size: 11.5px; margin-top: 32px; }
.af-k { display: inline-flex; gap: 3px; }
kbd { font-family: var(--mono); font-size: 10.5px; background: var(--raised); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--text-dim); line-height: 1.4; }

/* ============================================================ sniper page */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 240px; max-width: 320px; }
.search .ico-svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.search input { padding-inline-start: 34px; }
.count-badge { font-size: 12px; color: var(--text-faint); font-weight: 600; margin-inline-start: auto; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-md); background: var(--raised); border: 1px solid var(--line); flex-wrap: wrap; }
.seg-b { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding-inline: 11px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); transition: background var(--trans), color var(--trans); }
.seg-b:hover { color: var(--text); background: var(--hover); }
.seg-b.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 0 0 1px var(--line-2); }
html[data-theme="light"] .seg-b.on { box-shadow: 0 1px 3px rgba(28, 32, 80, 0.12), inset 0 0 0 1px var(--line); }
.seg-n { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.seg-b.on .seg-n { color: var(--accent-hi); }
.game-sec + .game-sec .sec-head { margin-top: 28px; }
.game-sec:first-child .sec-head { margin-top: 0; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.game-card { padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans); min-width: 0; }
.game-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.game-card.st-armed { border-color: rgba(124, 92, 255, 0.34); background: linear-gradient(170deg, rgba(124, 92, 255, 0.09), transparent 55%), var(--panel); }
.game-card.st-armed:hover { box-shadow: var(--glow); }
.game-card.sk { pointer-events: none; }
.game-card.sk .gc-icon { width: 42px; height: 42px; border-radius: 11px; }
.gc-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.gc-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 16px; color: #fff; flex-shrink: 0; overflow: hidden; }
.gc-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-id { flex: 1; min-width: 0; }
.gc-name { font-weight: 600; font-size: 14px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.gc-cat { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.gc-hot { display: inline-flex; align-items: center; gap: 3px; color: var(--warn); font-weight: 600; }
.gc-icon-wrap { position: relative; flex-shrink: 0; }
.gc-state { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--panel); background: var(--text-faint); display: grid; place-items: center; }
.gc-state.armed { background: var(--panel); border-width: 2px; }
.gc-state.armed .dot { width: 8px; height: 8px; box-shadow: none; }
.gc-state.ready { background: var(--text-faint); }
.gc-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.2px; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; align-self: flex-start; }
.gc-pill .dot { width: 6px; height: 6px; box-shadow: none; }
.gc-pill.armed { color: var(--accent-2); background: var(--info-soft); }
.gc-pill.ready { color: var(--text-dim); background: var(--raised-2); }
.gc-pill.new { color: var(--text-faint); border: 1px dashed var(--line-2); }
.gc-facts { display: flex; flex-wrap: wrap; gap: 5px; }
.fact { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 550; padding: 2px 7px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fact .ico-svg { color: var(--text-faint); }
.fact.price { color: var(--ok); font-family: var(--mono); font-size: 11.5px; }
.fact.price .ico-svg { color: var(--ok); }
.fact.price.mode { font-family: var(--font); }
.gc-empty { font-size: 12px; color: var(--text-faint); line-height: 1.45; }
.gc-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.gc-arm-l { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.st-armed .gc-arm-l { color: var(--text); }
.gc-edit { margin-inline-start: auto; }
.gc-setup { width: 100%; }

/* ============================================================ activity / feeds */
.feed-panel { padding: 6px; }
.log-feed { display: flex; flex-direction: column; gap: 1px; }
.log-feed.compact { margin: 0 -8px; }
.log-row { display: flex; gap: 12px; padding: 11px 12px; border-radius: var(--radius-md); transition: background var(--trans); align-items: flex-start; }
.log-row:hover { background: var(--hover); }
.log-row.clickable { cursor: pointer; }
.log-row.clickable:focus-visible { outline-offset: -2px; }
.log-feed.compact .log-row { padding: 9px 8px; }
.log-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--text-dim); background: var(--raised); }
.log-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.log-ic.offer { background: var(--ok-soft); color: var(--ok); }
.log-ic.hit { background: var(--accent-soft); color: var(--accent-hi); }
.log-ic.scan { background: var(--info-soft); color: var(--accent-2); }
.log-ic.message { background: var(--warn-soft); color: var(--warn); }
.log-ic.system { background: var(--raised-2); color: var(--text-dim); }
.log-ic.error { background: var(--err-soft); color: var(--err); }
.log-ic.dm, .log-ic.order { background: var(--ok-soft); color: var(--ok); }
.log-main { flex: 1; min-width: 0; }
.log-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.log-detail { font-size: 12px; color: var(--text-dim); margin-top: 2px; word-break: break-word; }
.log-feed.compact .log-detail { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-chips { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.log-time { font-size: 11px; color: var(--text-faint); white-space: nowrap; font-family: var(--mono); padding-top: 2px; }
.log-reason { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--warn); min-width: 0; }
.log-reason.bad { color: var(--err); }
.log-reason span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 550; padding: 1px 7px; border-radius: 6px; background: var(--raised); color: var(--text-dim); border: 1px solid var(--line); white-space: nowrap; }
.chip.price { color: var(--ok); font-family: var(--mono); }
.badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: 0.4px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; background: var(--raised-2); color: var(--text-dim); }
.badge.b-success { color: var(--ok); background: var(--ok-soft); }
.badge.b-warn { color: var(--warn); background: var(--warn-soft); }
.badge.b-danger { color: var(--err); background: var(--err-soft); }
.badge.b-info { color: var(--accent-2); background: var(--info-soft); }
.badge.b-muted { color: var(--text-dim); background: var(--raised-2); }
.badge.pop { color: var(--warn); background: var(--warn-soft); }
.badge.cfg { color: var(--accent-hi); background: var(--accent-soft); }
.log-row.notif .log-main { display: flex; flex-direction: column; }
.log-row.notif .log-title .badge { font-size: 9.5px; }
.log-row > .flex { flex-shrink: 0; align-self: center; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.pager .muted, .pager-info { font-size: 12.5px; color: var(--text-dim); }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--accent-2); padding: 5px 12px 5px 10px; border-radius: var(--r-pill); background: var(--info-soft); border: 1px solid rgba(34, 211, 238, 0.24); }
.live-dot .dot { width: 7px; height: 7px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill.active { background: var(--accent-soft); color: var(--accent-hi); border-color: var(--accent-line); }

/* request detail modal */
.rd-info { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.rd-row { display: flex; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.rd-row:nth-child(even) { background: var(--raised); }
.rd-row:last-child { border-bottom: none; }
.rd-k { flex: 0 0 96px; color: var(--text-faint); font-weight: 600; font-size: 12.5px; }
.rd-v { color: var(--text); word-break: break-word; min-width: 0; user-select: text; }
.rd-th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-faint); margin: 18px 0 10px; }
.rd-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.rd-ev { display: flex; gap: 12px; align-items: flex-start; padding: 0 0 14px; position: relative; }
.rd-ev:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 14px; top: 30px; bottom: 2px; width: 1px; background: var(--line-2); }
.rd-ev .log-ic { width: 29px; height: 29px; border-radius: 50%; }
.rd-ev-main { flex: 1; min-width: 0; padding-top: 4px; }
.rd-ev-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-ev-title { font-weight: 600; font-size: 13px; }
.rd-ev-detail { font-size: 12px; color: var(--text-dim); margin-top: 3px; word-break: break-word; }
.rd-ev-time { font-size: 11px; color: var(--text-faint); white-space: nowrap; flex-shrink: 0; padding-top: 6px; font-family: var(--mono); }
.rd-why { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-md); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 38%, transparent); }
.rd-why > .ico-svg { color: var(--warn); margin-top: 2px; }
.rd-why.bad { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 38%, transparent); }
.rd-why.bad > .ico-svg { color: var(--err); }
.rd-why-txt { min-width: 0; }
.rd-why-k { font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-faint); }
.rd-why-v { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--text); margin-top: 2px; word-break: break-word; }
.rd-ev-reason { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--warn-soft); color: var(--warn); }
.rd-ev-reason.bad { background: var(--err-soft); color: var(--err); }

/* ============================================================ table / chart / market */
.table-card { padding: 4px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-faint); padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 650; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--hover); }
.rank-1 td { background: var(--ok-soft); }
.mono { font-family: var(--mono); }
.chart-card { padding: 16px; }
.barchart { display: flex; flex-direction: column; gap: 8px; }
.barrow { display: flex; align-items: center; gap: 12px; }
.barrow .bname { width: 140px; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.bartrack { flex: 1; height: 26px; background: var(--raised); border-radius: 7px; overflow: hidden; }
.barfill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, rgba(124, 92, 255, 0.55), var(--accent)); display: flex; align-items: center; justify-content: flex-end; padding-inline: 9px; color: #fff; font-size: 11.5px; font-weight: 600; font-family: var(--mono); min-width: 56px; animation: growbar 0.6s var(--ease) both; }
[dir="rtl"] .barfill { background: linear-gradient(270deg, rgba(124, 92, 255, 0.55), var(--accent)); }
.barrow.best .barfill { background: linear-gradient(90deg, rgba(52, 211, 153, 0.55), #10b981); }
.barrow.best .bname { color: var(--ok); font-weight: 600; }
@keyframes growbar { from { width: 0 !important; } }
.insight { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); margin-top: 14px; }
.insight .ii { color: var(--accent-hi); flex-shrink: 0; }
.insight .it { font-size: 13px; color: var(--text); } .insight .it b { font-family: var(--mono); color: var(--accent-hi); }
.spark { display: inline-flex; }
.scan-builder { padding: 18px 20px; }
.scan-form { margin-top: 2px; }
.scan-form .grid.cols-2 { gap: 0 12px; }
.scan-idle { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--radius-md); border: 1px dashed var(--line-2); color: var(--text-faint); font-size: 12.5px; margin-bottom: 4px; }
.scan-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.scan-note { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-faint); max-width: 560px; }
.scan-hist { padding: 14px 16px; text-align: start; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--trans), transform var(--trans); width: 100%; }
.scan-hist:hover { border-color: var(--line-2); transform: translateY(-1px); }
.sh-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sh-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 600; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.sh-ic img { width: 100%; height: 100%; object-fit: cover; }
.sh-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.sh-id strong { font-size: 13.5px; font-weight: 600; }
.sh-id span { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sh-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.scan-live { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 36px 24px; text-align: center; }
.scan-live-vis { position: relative; display: grid; place-items: center; }
.scan-live-vis > .radar { opacity: 0.55; }
.scan-live-vis > .ringx { position: absolute; border-radius: 50%; background: radial-gradient(circle, var(--panel) 0 66%, transparent 67%); }
.ringx { position: relative; width: 156px; height: 156px; }
.ringx-prog { transition: stroke-dashoffset 1s linear; }
.ringx-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ringx-num { font-family: var(--display); font-size: 42px; font-weight: 600; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.ringx-sub { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-faint); margin-top: 6px; }
.scan-stage { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.mt-16 { margin-top: 14px; } .mt-24 { margin-top: 24px; }

/* ============================================================ orders */
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ord-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ord-card.sk { min-height: 150px; }
.ord-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ord-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); flex-shrink: 0; }
.ord-game { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.ord-game strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-when { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-faint); }
.ord-price { display: flex; align-items: baseline; gap: 6px; }
.ord-price b { font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.ord-price span { font-size: 11.5px; color: var(--text-faint); font-weight: 600; }
.ord-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--raised); border: 1px solid var(--line); }
.ord-kv { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ord-k { font-size: 10.5px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.3px; }
.ord-v { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-actions { display: flex; gap: 6px; justify-content: flex-end; }
.or-panel { padding: 16px 18px; }
.or-panel.on { border-color: var(--accent-line); }
.or-panel-head { display: flex; align-items: center; gap: 12px; }
.or-panel-head strong { font-size: 14px; font-weight: 600; }
.or-panel-head p { font-size: 12.5px; color: var(--text-dim); margin-top: 1px; }
.or-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); flex-shrink: 0; }
.grow { flex: 1; min-width: 0; }
.or-dirty { opacity: 0; transform: translateY(2px); transition: opacity var(--trans), transform var(--trans); pointer-events: none; }
.or-dirty.show { opacity: 1; transform: none; }

/* ============================================================ settings */
.set-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1240px) { .set-grid { grid-template-columns: minmax(0, 1fr); } }
.set-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.set-card { padding: 0; overflow: hidden; }
.set-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.set-head h3 { font-size: 14px; font-weight: 600; }
.set-head p { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.45; }
.set-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); flex-shrink: 0; }
.set-body { padding: 16px 18px 18px; }
.set-body > .inline-toggle:first-child { padding-top: 0; }
.set-body > .inline-toggle:last-child { padding-bottom: 0; }
.set-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.set-ver { margin-inline-start: auto; font-size: 12px; font-family: var(--mono); }
.sub-head { font-size: 12.5px; font-weight: 650; color: var(--text); margin: 6px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
/* guided tour (tour.js) — above modals, below dropdown menus and toasts */
.tour-root { position: fixed; inset: 0; z-index: var(--z-tour, 900); pointer-events: none; }
.tour-block { position: fixed; pointer-events: auto; background: transparent; }
.tour-hole { position: fixed; border-radius: 10px; pointer-events: auto; box-shadow: 0 0 0 200vmax rgba(4, 5, 12, 0.66), 0 0 0 2px var(--accent), 0 0 24px 4px color-mix(in srgb, var(--accent) 45%, transparent); transition: left 0.22s var(--ease), top 0.22s var(--ease), width 0.22s var(--ease), height 0.22s var(--ease); }
.tour-root.tour-pass .tour-hole { pointer-events: none; }
.tour-root.tour-center .tour-hole { box-shadow: 0 0 0 200vmax rgba(4, 5, 12, 0.66); }
.tour-card { position: fixed; pointer-events: auto; width: min(330px, calc(100vw - 24px)); padding: 16px 16px 14px; border-radius: var(--radius-lg); background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); color: var(--text); animation: pop 0.16s var(--ease) both; }
.tour-progress { height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin: -4px 0 12px; }
.tour-progress > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.25s var(--ease); }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.tour-count { font-size: 11px; font-weight: 700; letter-spacing: 0.4px; color: var(--accent-hi); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.tour-skip { font-size: 12px; color: var(--text-faint); padding: 2px 4px; border-radius: 6px; }
.tour-skip:hover { color: var(--text); background: var(--hover); }
.tour-title { font-size: 15px; font-weight: 650; line-height: 1.35; margin-bottom: 6px; }
.tour-body { font-size: 13px; color: var(--text-dim); line-height: 1.55; white-space: pre-line; }
.tour-hint { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-hi); font-size: 12.5px; font-weight: 550; line-height: 1.45; }
.tour-hint .ico-svg { flex-shrink: 0; margin-top: 1px; }
.tour-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.tour-actions:empty { display: none; }
.tb-tour { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin-inline-end: 6px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; color: var(--accent-hi); background: var(--accent-soft); border: 1px solid var(--accent-line); transition: background var(--trans), color var(--trans); }
.tb-tour:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.ob-head-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* cloud backup */
.bk-auto { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; margin-bottom: 12px; }
.bk-auto .ico-svg { flex-shrink: 0; margin-top: 1px; }
.bk-auto.ok .ico-svg { color: var(--ok); }
.bk-auto.warn { color: var(--warn); }
.bk-list { display: flex; flex-direction: column; gap: 6px; }
.bk-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--raised); min-width: 0; }
.bk-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-hi); }
.bk-ic.auto { background: var(--ok-soft); color: var(--ok); }
.bk-meta { flex: 1; min-width: 0; }
.bk-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); min-width: 0; }
.bk-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-when { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-acts { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.bk-acts .btn { margin-inline-end: 4px; }
.bk-empty { display: flex; align-items: center; gap: 8px; padding: 12px; font-size: 12.5px; color: var(--text-faint); border: 1px dashed var(--line-2); border-radius: var(--radius-md); }
.bk-new { display: flex; gap: 8px; margin-top: 12px; }
.bk-new input { flex: 1; min-width: 0; }
.bk-new .btn { flex-shrink: 0; }
.bk-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.bk-slots { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.bk-text { font-size: 13px; color: var(--text-dim); line-height: 1.55; margin-bottom: 14px; }
p.bk-text:last-child { margin-bottom: 0; }

.routes-host { display: flex; flex-direction: column; gap: 6px; }
.route-summary { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--raised); font-size: 12.5px; min-width: 0; }
.route-summary.off { opacity: 0.65; }
.route-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.route-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.route-dot.off { background: var(--text-faint); }
.route-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; max-width: 34%; }
.route-evs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; }
.route-count { margin-inline-start: auto; font-size: 12px; white-space: nowrap; }
.route-list { display: flex; flex-direction: column; gap: 12px; }
.route-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.route-card .field { margin-bottom: 0; }
.route-card-head { display: flex; align-items: center; gap: 10px; }
.route-card-head .switch { margin-inline-start: auto; }
.event-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.event-chip { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--text-dim); background: var(--panel); transition: background var(--trans), color var(--trans), border-color var(--trans); }
.event-chip:hover { border-color: var(--line-3); color: var(--text); }
.event-chip.on { color: var(--accent-hi); border-color: var(--accent-line); background: var(--accent-soft); }

/* sticky "unsaved changes" bar */
.save-bar { display: none; position: sticky; bottom: 14px; z-index: 40; margin: 22px auto 0; max-width: 620px; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 8px 8px 16px; border-radius: var(--radius); background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
[dir="rtl"] .save-bar { padding: 8px 16px 8px 8px; }
.save-bar.show { display: flex; animation: saveBarIn 0.22s var(--ease) both; }
.save-bar-msg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.save-bar-msg svg { color: var(--warn); }
@keyframes saveBarIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.msg-sep { height: 1px; background: var(--line); margin: 16px 0; }

/* ============================================================ modal */
#modal-root:empty { display: none; }
.modal-overlay { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 100; animation: fadeIn 0.16s ease both; padding: 20px; }
.modal { width: min(560px, 92vw); max-height: 88vh; display: flex; flex-direction: column; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: pop 0.2s var(--ease) both; min-height: 0; }
.modal.wide { width: min(780px, 94vw); }
.modal.xl { width: min(1180px, 95vw); height: min(900px, 92vh); max-height: 92vh; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
[dir="rtl"] .modal-head { padding: 14px 20px 14px 16px; }
.modal-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); flex-shrink: 0; }
.modal-titles { flex: 1; min-width: 0; }
.modal-head h3 { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-titles p { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.modal-body { padding: 20px; overflow-y: auto; min-height: 0; flex: 1; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; align-items: center; gap: 8px; background: var(--panel-solid); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal-x { width: 32px; height: 32px; border-radius: 8px; color: var(--text-faint); display: grid; place-items: center; flex-shrink: 0; transition: background var(--trans), color var(--trans); }
.modal-x:hover { background: var(--hover); color: var(--text); }
.modal-foot .save-bar-msg { margin-inline-end: auto; opacity: 0; transform: translateY(2px); transition: opacity var(--trans), transform var(--trans); pointer-events: none; }
.modal-foot .save-bar-msg.show { opacity: 1; transform: none; }
.login-wait { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 6px 0; }
.lw-vis { margin-bottom: 10px; }
.lw-status { font-size: 14px; font-weight: 500; color: var(--text); }
.col { display: flex; flex-direction: column; }

/* ============================================================ config modal */
.modal.xl .modal-body { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.modal.xl .modal-body > div { flex: 1; min-height: 0; }
.modal.xl .modal-body > div > .center-load, .modal.xl .modal-body > div > .empty { margin: auto; }
.modal.xl .modal-body > div:not(.cfg-layout) { display: flex; flex-direction: column; justify-content: center; }
.cfg-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 100%; min-height: 0; }
.cfg-side { border-inline-end: 1px solid var(--line); background: var(--bg-deep); padding: 14px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
html[data-theme="light"] .cfg-side { background: var(--raised); }
.cfg-nav-list { display: flex; flex-direction: column; gap: 2px; }
.cfg-nav-b { display: flex; align-items: center; gap: 9px; height: 34px; padding-inline: 8px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 520; color: var(--text-dim); text-align: start; transition: background var(--trans), color var(--trans); }
.cfg-nav-b:hover { background: var(--hover); color: var(--text); }
.cfg-nav-b .ico-svg { color: var(--text-faint); }
.cfg-nav-b.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.cfg-nav-b.on .ico-svg { color: var(--accent-hi); }
.cnb-num { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--raised-2); color: var(--text-faint); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.cfg-nav-b.on .cnb-num { background: var(--accent); color: #fff; }
.cnb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfg-summary { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cs-title { font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-faint); }
.cs-state { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; color: var(--text-dim); }
.cs-state .dot { width: 6px; height: 6px; box-shadow: none; }
.cs-state.on { color: var(--ok); }
.cs-cat { font-size: 13px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-line { display: grid; grid-template-columns: 14px auto minmax(0, 1fr); align-items: center; gap: 7px; font-size: 12px; }
.cs-line .ico-svg { color: var(--text-faint); }
.cs-k { color: var(--text-faint); white-space: nowrap; }
.cs-v { color: var(--text); font-weight: 550; text-align: end; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-line.muted .cs-v { color: var(--text-faint); font-weight: 500; }
.cs-preview { margin-top: 5px; padding-top: 9px; border-top: 1px solid var(--line); }
.cs-pl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-faint); }
.cs-bubble { margin-top: 7px; padding: 8px 10px; border-radius: 12px 12px 12px 4px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 12px; line-height: 1.5; color: var(--text); word-break: break-word; max-height: 130px; overflow: hidden; user-select: text; }
[dir="rtl"] .cs-bubble { border-radius: 12px 12px 4px 12px; }
.cs-bubble mark { background: rgba(34, 211, 238, 0.16); color: var(--accent-2); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.cfg-scroll { position: relative; overflow-y: auto; padding: 18px 22px 40px; min-height: 0; scroll-padding-top: 12px; }
.cfg-section { padding: 18px 20px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cfg-section:last-child { margin-bottom: 0; }
.cfg-sec-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.cfg-sec-num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-family: var(--display); font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent-hi); flex-shrink: 0; }
.cfg-sec-titles { min-width: 0; }
.cfg-sec-head h4 { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 650; letter-spacing: -0.1px; line-height: 26px; }
.cfg-sec-head h4 .ico-svg { color: var(--text-faint); }
.cfg-intro { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); margin: 0; max-width: 72ch; }
.cfg-sec-body > .inline-toggle:first-child { padding-top: 4px; }
.cfg-section .inline-toggle:last-child { border-bottom: none; }
.cfg-cat-row { display: flex; align-items: flex-end; gap: 12px; }
.cfg-cat-row > .field { flex: 1; max-width: 420px; }
.io-btns { display: flex; gap: 6px; margin: 0 0 14px; }
.cfg-section .section-title { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 650; color: var(--text); margin: 22px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.cfg-section .section-title .ico-svg { color: var(--accent-hi); }
.mode-tabs-wrap { margin: 12px 0 14px; }
.mode-tabs { display: inline-flex; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 3px; gap: 2px; flex-wrap: wrap; }
.mode-tab { height: 30px; padding-inline: 13px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); transition: background var(--trans), color var(--trans); }
.mode-tab:hover { color: var(--text); background: var(--hover); }
.mode-tab.on { background: var(--accent); color: #fff; box-shadow: 0 3px 10px -4px rgba(124, 92, 255, 0.8); }

.callout { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--radius-md); background: var(--accent-soft); border: 1px solid var(--accent-line); margin: 0 0 12px; }
.callout > .ico-svg { margin-top: 1px; color: var(--accent-hi); }
.callout-body { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); min-width: 0; }
.callout-body strong { color: var(--text); font-weight: 650; }
.callout-body .kw-skip, .kw-skip { color: var(--err); font-weight: 650; }
.callout-body .kw-snipe, .kw-snipe { color: var(--ok); font-weight: 650; }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 34%, transparent); }
.callout.warn > .ico-svg { color: var(--warn); }

.price-table { display: flex; flex-direction: column; gap: 1px; max-height: 340px; overflow-y: auto; padding: 4px; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--input-bg); }
.price-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 7px; transition: background 0.1s; }
.price-row:first-child { position: sticky; top: -4px; background: var(--input-bg); z-index: 2; padding-top: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); border-radius: 0; margin: -4px -4px 2px; padding-inline: 12px; }
.price-row + .price-row:hover { background: var(--hover); }
.price-row .pr-name { flex: 1; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.price-row .pr-in { width: 116px; flex-shrink: 0; position: relative; }
.price-row .pr-in input, .price-row .pr-hr input { min-height: 32px; padding-block: 5px; }
.price-row .pr-in input { padding-inline-start: 24px; }
.price-row .pr-in::before { content: "$"; position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 12px; z-index: 1; pointer-events: none; }
.price-row .pr-in.pr-mult::before { content: "×"; }
/* per-server delivery tweak: "×1.5" / "+12h" input + a live "1 day → 2 days" chip */
.price-row .pr-time { width: 116px; flex-shrink: 0; position: relative; }
.price-row .pr-time > .ico-svg { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; z-index: 1; }
.price-row .pr-time input { min-height: 32px; padding-block: 5px; padding-inline-start: 28px; font-variant-numeric: tabular-nums; }
.price-row .pr-time input.invalid { border-color: color-mix(in srgb, var(--err) 60%, transparent); }
.price-row .pr-time input.invalid:focus { box-shadow: 0 0 0 4px var(--err-soft); }
.pr-eta-head { width: 132px; flex-shrink: 0; }
.pr-eta { width: 132px; flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding-inline: 9px; border-radius: var(--r-pill); font-size: 11.5px; white-space: nowrap; overflow: hidden; border: 1px solid transparent; font-variant-numeric: tabular-nums; transition: background var(--trans), color var(--trans), border-color var(--trans); }
.pr-eta s { opacity: 0.6; text-decoration-thickness: 1px; }
.pr-eta b { font-weight: 650; }
.pr-eta em { font-style: normal; opacity: 0.75; margin-inline-start: 2px; }
.pr-eta .ico-svg { flex-shrink: 0; opacity: 0.7; }
[dir="rtl"] .pr-eta .ico-svg { transform: scaleX(-1); }
.pr-eta.idle { color: var(--text-faint); }
.pr-eta.slower { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.pr-eta.faster { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.pr-eta.same { color: var(--text-dim); border-color: var(--line-2); border-style: dashed; cursor: help; }
.pr-eta.bad { color: var(--err); background: var(--err-soft); }
.pr-time-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pr-time-hint code { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: var(--raised); border: 1px solid var(--line); color: var(--text); }
.pr-max-head, .price-row .pr-max { width: 172px; flex-shrink: 0; }
.price-row .pr-max .sel-btn { min-height: 32px; height: 32px; font-size: 12px; }

/* Valorant RR pricing */
.mode-tab.mode-tab-rr::before { content: "RR"; font-size: 9px; font-weight: 800; letter-spacing: 0.3px; padding: 1px 4px; margin-inline-end: 6px; border-radius: 4px; background: color-mix(in srgb, #ff4655 22%, transparent); color: #ff6b77; vertical-align: 1px; }
.mode-tab.mode-tab-rr.on::before { background: rgba(255, 255, 255, 0.22); color: #fff; }
.rr-hero { margin: 4px 0 6px; padding: 14px 14px 12px; border-radius: var(--radius-md); border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, #ff4655 9%, var(--raised)), var(--raised) 60%); }
.rr-hero-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.rr-hero-head strong { font-size: 13.5px; color: var(--text); font-weight: 650; }
.rr-hero-head p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
.rr-badge { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, #ff4655, #bd3944); box-shadow: 0 6px 16px -8px #ff4655; }
.rr-track { display: flex; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.rr-seg { flex: 3; display: flex; align-items: center; justify-content: center; min-width: 0; font-size: 10.5px; font-weight: 650; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); background-image: repeating-linear-gradient(90deg, transparent 0 calc(33.333% - 1px), rgba(255, 255, 255, 0.28) calc(33.333% - 1px) 33.333%); }
.rr-seg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 3px; }
.rr-seg.t0 { background-color: #5d5d64; } .rr-seg.t1 { background-color: #8a5a3c; } .rr-seg.t2 { background-color: #8c97a3; }
.rr-seg.t3 { background-color: #c79a2c; } .rr-seg.t4 { background-color: #2f8f9b; } .rr-seg.t5 { background-color: #b06ad8; }
.rr-seg.t6 { background-color: #2e9e6a; }
.rr-seg.imm { flex: 8; background: linear-gradient(90deg, #b8324a, #e2445c 55%, #f4c77a); }
.rr-track-marks { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--text-faint); flex-wrap: wrap; }
.rr-track-marks .imm { color: var(--text-dim); font-weight: 600; }
.rr-bands { display: flex; flex-direction: column; gap: 6px; }
.rr-band { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; align-items: center; }
.rr-band-head { color: var(--text-faint); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.4px; padding: 0 2px; }
.rr-band-from { display: flex; align-items: center; gap: 8px; }
.rr-band-from span { font-size: 12px; color: var(--text-faint); flex-shrink: 0; }
.rr-band-from input:disabled { opacity: 0.6; }
.rr-cuts .price-row .pr-rr, .rr-cut-h { width: 96px; flex-shrink: 0; position: relative; }
.rr-cuts .pr-rr input { min-height: 32px; padding-block: 5px; padding-inline-end: 30px; }
.rr-cuts .pr-rr::after { content: "RR"; position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 10.5px; font-weight: 650; pointer-events: none; }
.rr-cuts .rr-cut-def .pr-name { color: var(--text); font-weight: 650; }
.rr-quote { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 12px; padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--raised); }
.rr-quote-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.rr-quote-in .field { margin-bottom: 8px; }
.rr-quote-out { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--input-bg); border: 1px dashed var(--line-2); min-height: 96px; }
.rr-q-price { font-size: 26px; font-weight: 750; color: var(--text); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.rr-q-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.rr-q-meta em { font-style: normal; color: var(--warn); font-weight: 650; }
.rr-q-why { font-size: 11.5px; color: var(--text-faint); line-height: 1.45; }
.rr-q-skip { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }
.rr-q-skip .ico-svg { flex-shrink: 0; margin-top: 2px; color: var(--err); }
@media (max-width: 720px) { .rr-quote { grid-template-columns: 1fr; } .rr-band { grid-template-columns: 1fr 1fr; } }
.price-row .pr-hr { width: 84px; flex-shrink: 0; position: relative; }
.price-row .pr-hr input { padding-inline-start: 22px; }
.price-row .pr-hr::before { content: "h"; position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 12px; z-index: 1; pointer-events: none; }
.quickfill { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-md); background: var(--raised); border: 1px solid var(--line); }
.quickfill .field { margin-bottom: 0; width: 130px; flex: 0 0 auto; }
.quickfill .btn { margin-inline-end: 10px; }
.rank-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--raised); font-size: 12.5px; color: var(--text-dim); cursor: pointer; transition: border-color var(--trans), background var(--trans), color var(--trans); }
.rank-toggle:hover { border-color: var(--line-2); }
.rank-toggle:has(input:checked) { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 40%, transparent); color: var(--err); }
.rank-toggle:has(input:checked) input { background: var(--err); }
.custom-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.custom-row { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 104px 78px 30px; gap: 8px; align-items: center; }
.custom-row.custom-head { color: var(--text-faint); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.4px; }
.custom-arrow { display: flex; justify-content: center; color: var(--text-faint); }
.custom-row .pr-in, .custom-row .pr-hr { position: relative; width: auto; }
.custom-row .pr-in input { padding-inline-start: 24px; }
.custom-row .pr-in::before { content: "$"; position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 12px; z-index: 1; pointer-events: none; }
.custom-row .pr-hr input { padding-inline-start: 22px; }
.custom-row .pr-hr::before { content: "h"; position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 12px; z-index: 1; pointer-events: none; }
.skip-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.skip-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 8px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--raised); font-size: 12.5px; color: var(--text-dim); cursor: pointer; transition: border-color var(--trans), color var(--trans), background var(--trans); }
[dir="rtl"] .skip-chip { padding: 5px 8px 5px 11px; }
.skip-chip:hover { color: var(--text); border-color: var(--line-3); }
.skip-chip input { width: 15px; height: 15px; border-radius: 50%; }
.skip-chip:has(input:checked) { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 45%, transparent); color: var(--err); }
.skip-chip:has(input:checked) input { background: var(--err); }
.skip-chip:has(input:checked) span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--err) 60%, transparent); }

/* keyword capture card */
.kw-card { border: 1px solid var(--accent-line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(124, 92, 255, 0.08), transparent 60%), var(--raised); margin: 0 0 14px; overflow: hidden; transition: border-color var(--trans), box-shadow var(--trans); }
.kw-card.on { border-color: rgba(124, 92, 255, 0.6); box-shadow: var(--glow); }
.kw-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.kw-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); }
.kw-card.on .kw-ico { background: var(--accent); color: #fff; }
.kw-head-txt { flex: 1; min-width: 0; }
.kw-head-txt strong { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; }
.kw-head-txt p { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.45; }
.kw-pill { font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 2px 7px; border-radius: var(--r-pill); white-space: nowrap; background: var(--ok-soft); color: var(--ok); }
.kw-body { padding: 0 14px 14px; }
.kw-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 1100px) { .kw-lists { grid-template-columns: 1fr; } }
.kw-block { margin-top: 12px; }
.kw-lists .kw-block { margin-top: 0; }
.kw-list-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-size: 12px; font-weight: 650; color: var(--text); flex-wrap: wrap; }
.kw-list-head em { font-style: normal; font-weight: 500; color: var(--text-faint); font-size: 11.5px; }
.kw-block.ok .kw-list-head > .ico-svg { color: var(--ok); }
.kw-block.bad .kw-list-head > .ico-svg { color: var(--err); }
.kw-block.test .kw-list-head > .ico-svg { color: var(--warn); }
.kw-chipbox { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 42px; cursor: text; padding: 6px 7px; border-radius: var(--radius-sm); background: var(--input-bg); border: 1px dashed var(--line-3); transition: border-color var(--trans); }
.kw-chipbox.ok:focus-within { border-color: var(--ok); border-style: solid; }
.kw-chipbox.bad:focus-within { border-color: var(--err); border-style: solid; }
.kw-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
[dir="rtl"] .kw-chip { padding: 2px 9px 2px 4px; }
.kw-chipbox.ok .kw-chip { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.kw-chipbox.bad .kw-chip { background: var(--err-soft); border: 1px solid color-mix(in srgb, var(--err) 40%, transparent); color: var(--err); }
.kw-x { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; line-height: 1; color: inherit; opacity: 0.65; }
.kw-x:hover { opacity: 1; background: var(--hover); }
.kw-entry { flex: 1; min-width: 120px; border: 0; background: none; padding: 3px; font-size: 12.5px; color: var(--text); outline: none; min-height: 0; }
.kw-entry:focus { box-shadow: none; }
.kw-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 12px; }
.kw-opt { display: flex; align-items: center; gap: 9px; }
.kw-opt-l { font-size: 12px; font-weight: 650; color: var(--text-dim); }
.kw-seg { display: inline-flex; padding: 2px; border-radius: var(--r-pill); background: var(--input-bg); border: 1px solid var(--line); }
.kw-seg-b { padding: 4px 13px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; color: var(--text-dim); transition: background var(--trans), color var(--trans); }
.kw-seg-b:hover { color: var(--text); }
.kw-seg-b.on { background: var(--accent); color: #fff; }
.kw-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-dim); cursor: pointer; flex-wrap: wrap; }
.kw-check em { font-style: normal; color: var(--text-faint); font-size: 11.5px; }
.kw-field-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--raised); font-size: 12.5px; color: var(--text-dim); cursor: pointer; }
.kw-field-chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.kw-test-in { width: 100%; resize: vertical; min-height: 58px; }
.kw-test-out { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 11px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; background: var(--input-bg); border: 1px solid var(--line); color: var(--text-faint); }
.kw-test-out.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 38%, transparent); color: var(--ok); }
.kw-test-out.bad { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 38%, transparent); color: var(--err); }

/* message step editor */
.var-legend-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.vl-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); }
.vl-hint { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); }
.var-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.var-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--vc) 34%, transparent); background: color-mix(in srgb, var(--vc) 11%, transparent); cursor: pointer; transition: background var(--trans), border-color var(--trans), transform var(--trans); }
.var-chip:hover { background: color-mix(in srgb, var(--vc) 20%, transparent); border-color: var(--vc); transform: translateY(-1px); }
.var-chip code { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--vc); }
html[data-theme="light"] .var-chip code { color: color-mix(in srgb, var(--vc) 70%, #141733); }
.var-chip .var-desc { font-size: 11px; color: var(--text-dim); }
.msg-rows { display: flex; flex-direction: column; gap: 8px; }
.msg-row { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--raised); padding: 8px 10px 10px; transition: border-color var(--trans); counter-increment: step; }
.msg-rows { counter-reset: step; }
.msg-row:focus-within { border-color: var(--accent-line); }
.msg-row-head { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.msg-num { font-size: 11.5px; font-weight: 650; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
.msg-num::before { content: counter(step); width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--raised-3); color: var(--text-dim); font-size: 10.5px; font-weight: 700; }
.msg-delay { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; font-size: 11.5px; color: var(--text-faint); }
.msg-delay .ico-svg { color: var(--accent-hi); }
.msg-delay-inp { width: 54px !important; min-height: 26px !important; padding: 2px 6px !important; text-align: center; font-family: var(--mono); font-size: 12px !important; border-radius: 6px !important; }
.msg-del { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; border: 1px solid transparent; color: var(--text-faint); cursor: pointer; transition: background var(--trans), color var(--trans), border-color var(--trans); flex-shrink: 0; }
.msg-del:hover { color: var(--text); background: var(--hover); }
.msg-del:not(.step-up):not(.step-down):hover { color: var(--err); background: var(--err-soft); }
.msg-del:disabled { opacity: 0.3; pointer-events: none; }
.msg-ta { min-height: 64px !important; background: var(--input-bg); }
.msg-add { margin-top: 10px; align-self: flex-start; }
.step-img { display: flex; gap: 8px; align-items: center; }
.step-img-path { flex: 1; font-family: var(--mono); font-size: 12px !important; }

/* ============================================================ toast */
#toast-root { position: fixed; bottom: 18px; inset-inline-end: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 9800; pointer-events: none; }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; min-width: 260px; max-width: 400px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); animation: toastIn 0.24s var(--ease) both; font-size: 13px; }
.toast.out { animation: toastOut 0.16s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(4px); } }
.toast .ti { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.toast .tmsg { flex: 1; min-width: 0; line-height: 1.4; word-break: break-word; }
.toast.success .ti { background: var(--ok-soft); color: var(--ok); }
.toast.error .ti { background: var(--err-soft); color: var(--err); }
.toast.warn .ti { background: var(--warn-soft); color: var(--warn); }
.toast.info .ti { background: var(--accent-soft); color: var(--accent-hi); }
.toast .tclose { color: var(--text-faint); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; }
.toast .tclose:hover { color: var(--text); background: var(--hover); }
.tbar { position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: 0.35; transform-origin: left; animation: tbar linear both; }
[dir="rtl"] .tbar { transform-origin: right; }
.toast.success .tbar { color: var(--ok); } .toast.error .tbar { color: var(--err); } .toast.info .tbar { color: var(--accent); } .toast.warn .tbar { color: var(--warn); }
.toast:hover .tbar { animation-play-state: paused; }
@keyframes tbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ============================================================ command palette */
.cmdk-overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; z-index: 300; animation: fadeIn 0.12s ease both; }
.cmdk { width: min(600px, 92vw); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop 0.16s var(--ease) both; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-faint); }
.cmdk-input input { border: none; background: none; padding: 4px 0; font-size: 15px; min-height: 0; }
.cmdk-input input:focus { box-shadow: none; }
.cmdk-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.cmdk-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-faint); padding: 10px 10px 5px; font-weight: 700; }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; color: var(--text-dim); }
.cmdk-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--raised); color: var(--text-faint); }
.cmdk-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item.sel { background: var(--accent-soft); color: var(--text); }
.cmdk-item.sel .cmdk-ic { background: var(--accent); color: #fff; }
.cmdk-hint { opacity: 0; }
.cmdk-item.sel .cmdk-hint { opacity: 1; }
.cmdk-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-faint); background: var(--bg-deep); }
html[data-theme="light"] .cmdk-foot { background: var(--raised); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 5px; }

/* ============================================================ popover (account) */
.pop-menu { position: fixed; min-width: 196px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 5px; z-index: 1000; animation: pop 0.14s var(--ease) both; }
.pop-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text); }
.pop-item:hover { background: var(--hover); }
.pop-item .ico-svg { color: var(--text-dim); }
.pop-item.danger { color: var(--err); } .pop-item.danger .ico-svg { color: var(--err); }
.pop-div { height: 1px; background: var(--line); margin: 4px; }
.pop-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.pop-acct .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-acct.on { background: var(--hover); cursor: default; }
.pop-acct.locked { color: var(--text-dim); }
.pop-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; border: 1.5px solid var(--text-dim); }
.pop-dot.live { background: var(--ok, #3ecf8e); border-color: transparent; }

/* ============================================================ activation */
.act-overlay {
  position: fixed; inset: 0; z-index: 9000; display: flex; align-items: stretch; justify-content: center;
  background: var(--bg); -webkit-app-region: drag; animation: fadeIn 0.28s ease both; overflow: auto;
}
.act-shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr); width: 100%; min-height: 100%; }
.act-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 34px 44px;
  background:
    radial-gradient(640px 420px at 30% 42%, rgba(124, 92, 255, 0.2), transparent 70%),
    radial-gradient(420px 320px at 80% 90%, rgba(34, 211, 238, 0.08), transparent 70%),
    var(--bg-deep);
  border-inline-end: 1px solid var(--line);
}
html[data-theme="light"] .act-hero { background: radial-gradient(640px 420px at 30% 42%, rgba(106, 76, 245, 0.12), transparent 70%), var(--raised); }
.act-brand { display: flex; align-items: center; gap: 12px; }
.act-logo { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.7); }
.act-brandtext { display: flex; flex-direction: column; line-height: 1.1; }
.act-brandtext b { font-family: var(--display); font-size: 17px; font-weight: 600; }
.act-brandtext b span { color: var(--accent-hi); }
.act-brandtext small { font-size: 10.5px; color: var(--text-dim); letter-spacing: 3px; text-transform: uppercase; margin-top: 3px; }
.act-stage { flex: 1; display: grid; place-items: center; padding: 20px 0; min-height: 250px; }
.act-pitch h2 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.6px; line-height: 1.2; max-width: 460px; }
.act-pitch ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 20px; max-width: 480px; }
.act-pitch li { display: flex; gap: 12px; align-items: flex-start; }
.act-pitch .api { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); flex-shrink: 0; border: 1px solid var(--accent-line); }
.act-pitch li b { display: block; font-size: 13.5px; font-weight: 600; }
.act-pitch li span { font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }
.act-form-wrap { display: grid; place-items: center; padding: 40px 48px; }
.act-form { -webkit-app-region: no-drag; width: 100%; max-width: 400px; }
.act-hero .act-brand, .act-pitch { -webkit-app-region: no-drag; }
.act-title { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.6px; line-height: 1.2; }
.act-sub { color: var(--text-dim); font-size: 13.5px; line-height: 1.5; margin: 8px 0 22px; }
.act-renew { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 20px; border-radius: var(--radius-md); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.act-renew .ar-ic { color: var(--warn); }
.act-renew b { font-size: 13px; }
.act-renew p { font-size: 12.5px; color: var(--text); line-height: 1.45; }
.act-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.act-input {
  width: 100%; height: 48px; padding: 0 14px !important; border-radius: var(--radius-md) !important;
  background: var(--input-bg) !important; border: 1px solid var(--line-2) !important;
  color: var(--text); font-family: var(--mono) !important; font-size: 16px !important; letter-spacing: 1.6px; text-align: center; text-transform: uppercase;
}
.act-input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 4px var(--accent-soft); }
.act-input.invalid { border-color: color-mix(in srgb, var(--err) 60%, transparent) !important; }
.act-input.invalid:focus { box-shadow: 0 0 0 4px var(--err-soft); }
.act-err { display: none; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--err-soft); color: var(--err); font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.act-err.show { display: flex; animation: fadeUp 0.2s var(--ease) both; }
.act-err .ico-svg { margin-top: 1px; }
.act-go { margin-top: 14px; }
.act-device { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 10px 8px 10px 12px; border-radius: var(--radius-md); background: var(--raised); border: 1px solid var(--line); }
[dir="rtl"] .act-device { padding: 10px 12px 10px 8px; }
.ad-ic { color: var(--text-faint); }
.ad-label { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.ad-id { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); user-select: text; }
.act-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 18px; font-size: 12.5px; }
.act-links .muted { font-size: 12.5px; }
.act-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
@media (max-width: 1100px) {
  .act-shell { grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr); }
  .act-hero { padding: 28px 30px; }
  .act-pitch h2 { font-size: 22px; }
  .act-form-wrap { padding: 32px; }
}
@media (max-height: 760px) {
  .act-stage { min-height: 200px; padding: 8px 0; }
  .act-stage .radar, .act-stage .radar svg { width: 180px !important; height: 180px !important; }
  .act-pitch ul { gap: 9px; margin-top: 14px; }
}

/* ============================================================ update modal */
.upd-overlay { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--overlay); animation: fadeIn 0.2s ease both; }
.upd-card { width: 100%; max-width: 440px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 22px; animation: pop 0.22s var(--ease) both; }
.upd-card.has-notes { max-width: 520px; }
.upd-top { display: flex; align-items: center; gap: 14px; }
.upd-titles { min-width: 0; }
.upd-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #fff; background: var(--grad); box-shadow: 0 10px 26px -10px rgba(124, 92, 255, 0.85); flex-shrink: 0; }
.upd-card h3 { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.upd-ver { font-size: 13px; color: var(--text-dim); margin-top: 1px; }
.upd-badge { margin-inline-start: auto; flex-shrink: 0; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.2px; color: var(--accent-hi); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 4px 10px; }

/* Release notes, grouped by what each change does for the seller. */
.upd-notes { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 44vh; overflow: auto; padding-inline-end: 4px; user-select: text; }
.upd-group { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--raised); padding: 10px 12px 11px; }
.ug-head { display: flex; align-items: center; gap: 7px; }
.ug-ic { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; }
.ug-label { font-size: 11px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; }
.ug-list { list-style: none; margin: 7px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ug-list li { display: flex; gap: 8px; font-size: 12.8px; line-height: 1.5; color: var(--text); }
.ug-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 7px; background: currentColor; opacity: 0.55; }
.upd-group.new { --ug: var(--accent-hi); }
.upd-group.faster { --ug: var(--accent-2); }
.upd-group.better { --ug: var(--warn); }
.upd-group.fixed { --ug: var(--ok); }
.upd-group.general { --ug: var(--text-dim); }
.upd-group .ug-label, .upd-group .ug-ic, .upd-group .ug-dot { color: var(--ug); }
.upd-group .ug-ic { background: color-mix(in srgb, var(--ug) 16%, transparent); }

.upd-track { margin-top: 16px; height: 6px; border-radius: 20px; background: var(--raised-3); overflow: hidden; }
.upd-track span { display: block; height: 100%; width: 0%; background: var(--grad); transition: width 0.2s ease; border-radius: 20px; }
.upd-status { margin-top: 8px; font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.upd-req, .upd-hint { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 12.2px; line-height: 1.4; }
.upd-req { color: var(--warn); }
.upd-hint { color: var(--text-faint); }
.upd-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ============================================================ utilities */
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.muted { color: var(--text-dim); font-size: 13px; }
.hidden { display: none !important; }

/* The message builder sits inside its config section: no card-in-card. */
.cfg-section .panel { background: transparent; border: none; box-shadow: none; padding: 0 !important; margin-top: 12px !important; animation: none; }
.field > .btn { align-self: flex-start; }

/* ============================================================ speed card */
/* Reaction time on the dashboard: one number that says whether the sniper is
   actually fast, with the spread beside it so a single lucky offer can't flatter it. */
.speed-card { display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 16px; }
.sp-lead { display: grid; grid-template-columns: auto; gap: 2px; }
.sp-l { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-dim); }
.sp-big { display: flex; align-items: baseline; gap: 3px; }
.sp-big b { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; }
.sp-big span { font-size: 13px; color: var(--text-dim); }
.sp-sub { font-size: 11.5px; color: var(--text-faint); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-chart { margin-inline-start: auto; line-height: 0; }
@media (max-width: 720px) { .sp-chart { display: none; } }

/* ============================================================ rivals */
.riv-stats { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 1100px) { .riv-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .riv-stats { grid-template-columns: 1fr; } }

/* The win-rate dial. The ring is the number — reading it shouldn't need the label. */
.riv-hero { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--panel); --ring: var(--accent); }
.riv-hero.ok { --ring: var(--ok); }
.riv-hero.warn { --ring: var(--warn); }
.riv-hero.bad { --ring: var(--err); }
.rh-ring { --pct: 0; position: relative; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), var(--raised-3) 0); }
.rh-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--panel-solid); }
.rh-n { position: relative; z-index: 1; font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.rh-txt h3 { font-family: var(--display); font-size: 15px; font-weight: 600; }
.rh-txt p { margin-top: 3px; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }

.riv-pending { display: flex; align-items: center; gap: 7px; margin: -4px 0 16px; padding: 9px 12px; border-radius: var(--radius-md); background: var(--info-soft); color: var(--text-dim); font-size: 12.5px; }
.riv-off { padding: 8px; }

/* Leaderboard */
.riv-board { padding: 6px 0; }
.riv-row { display: grid; grid-template-columns: 26px 32px minmax(0, 1.6fr) repeat(3, 68px) 92px; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.riv-row:last-child { border-bottom: none; }
.riv-row:hover { background: var(--hover); }
.rr-pos { font-family: var(--mono); font-size: 12px; color: var(--text-faint); text-align: center; }
.rr-av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: 0.3px; }
.rr-name { display: flex; flex-direction: column; min-width: 0; }
.rr-name b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-name span { font-size: 11.5px; color: var(--text-faint); }
.rr-stat { display: flex; flex-direction: column; align-items: center; }
.rr-stat b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rr-stat span { font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.2px; }
.rr-stat.bad b { color: var(--err); }
.rr-stat.ok b { color: var(--ok); }
.rr-price { display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rr-price span { font-size: 10.5px; font-weight: 400; color: var(--text-faint); }
@media (max-width: 860px) {
  .riv-row { grid-template-columns: 22px 30px minmax(0, 1fr) 62px 80px; }
  .riv-row .rr-stat:nth-of-type(2) { display: none; }
}

/* One decided contest */
.duel-list { display: flex; flex-direction: column; gap: 10px; }
.duel { padding: 13px 16px; border-inline-start: 3px solid var(--line-2); }
.duel.won { border-inline-start-color: var(--ok); }
.duel.lost { border-inline-start-color: var(--err); }
.duel-top { display: flex; align-items: center; gap: 10px; }
.duel-id { display: flex; flex-direction: column; min-width: 0; }
.duel-id strong { font-size: 13.5px; font-weight: 600; }
.duel-id span { font-size: 11.5px; color: var(--text-faint); }
.duel-top .log-time { margin-inline-start: auto; flex-shrink: 0; }
.duel-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.2px; }
.duel-chip.won { color: var(--ok); background: var(--ok-soft); }
.duel-chip.lost { color: var(--err); background: var(--err-soft); }
.duel-chip.none { color: var(--text-dim); background: var(--raised-2); }

.duel-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 11px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--raised); }
.duel-side { display: flex; flex-direction: column; min-width: 0; }
.ds-l { font-size: 11px; color: var(--text-faint); }
.duel-side b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.duel-side.theirs b { color: var(--text-dim); }
.duel.lost .duel-side.theirs b { color: var(--err); }
.duel.won .duel-side.mine b { color: var(--ok); }
.duel-vs { color: var(--text-faint); display: grid; place-items: center; }
.duel-gap { margin-inline-start: auto; font-size: 11.5px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 3px 10px; }
.duel-gap.flat { color: var(--text-dim); background: var(--raised-3); font-weight: 400; }

.duel-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.duel-more { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; background: none; border: none; color: var(--text-dim); font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.duel-more:hover { color: var(--text); background: var(--hover); }
.duel-more .ico-svg { transition: transform 0.18s var(--ease); }
.duel-more.open .ico-svg { transform: rotate(180deg); }

.duel-bids { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; }
.duel-bid { display: grid; grid-template-columns: 18px minmax(0, 1fr) 48px 68px 76px; align-items: center; gap: 8px; padding: 6px 4px; font-size: 12.5px; border-radius: 7px; }
.duel-bid.me { background: var(--accent-soft); }
.duel-bid.win .db-name { font-weight: 600; }
.db-rank { display: grid; place-items: center; color: var(--text-faint); }
.duel-bid.win .db-rank { color: var(--warn); }
.db-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-fb, .db-del { font-size: 11.5px; color: var(--text-faint); text-align: center; }
.db-price { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  .duel-bid { grid-template-columns: 18px minmax(0, 1fr) 76px; }
  .db-fb, .db-del { display: none; }
}

/* Settings: active-hours window */
.hours-row[hidden] { display: none; }

/* ─────────────────────────────────────────────────────────────────────────────
   v0.2.1 — "New" markers, Free now, buyer safety, offer preview, msg variants
   ───────────────────────────────────────────────────────────────────────────── */

/* A quiet marker on things a recent update added. It removes itself after three
   days (see NEW_IN in main.js), so it never becomes furniture. */
.new-pill {
  display: inline-flex; align-items: center; margin-inline-start: 7px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-hi); background: var(--accent-soft);
  border: 1px solid var(--accent-line); white-space: nowrap;
  animation: newPulse 3.2s var(--ease) infinite;
}
@keyframes newPulse {
  0%, 62%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
  76% { box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.14); }
}
@media (prefers-reduced-motion: reduce) { .new-pill { animation: none; } }

/* ---- Free now ------------------------------------------------------------ */
/* Sits beside Start/Configure as the third, quieter action: a pill, not a slab,
   so the hierarchy still reads Start, then Configure, then this. */
.free-btn { position: relative; gap: 8px; border-radius: 999px; margin-inline-start: 2px; }
.free-btn.on {
  color: var(--warn); border-color: rgba(251, 191, 36, 0.42); background: var(--warn-soft);
}
.free-btn.on .ico-svg { animation: freeSpark 2.4s var(--ease) infinite; }
.free-btn.on b { font-variant-numeric: tabular-nums; }
@keyframes freeSpark { 0%, 70%, 100% { opacity: 1; } 85% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .free-btn.on .ico-svg { animation: none; } }

/* A small anchored panel — no backdrop, closes on outside click / Esc / scroll. */
.pop-panel {
  position: fixed; z-index: 90; min-width: 236px; max-width: 300px;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 12px;
  opacity: 0; transform: translateY(-4px) scale(0.985);
  transition: opacity 0.14s var(--ease), transform 0.14s var(--ease);
}
.pop-panel.in { opacity: 1; transform: none; }
.free-pop .fp-head { display: flex; align-items: center; gap: 7px; color: var(--warn); }
.free-pop .fp-head strong { color: var(--text); font-size: 13.5px; }
.free-pop .fp-sub { margin: 6px 0 10px; font-size: 12px; line-height: 1.45; color: var(--text-dim); }
.fp-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hour-chip {
  padding: 8px 0; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--text); background: var(--raised-3); border: 1px solid var(--line);
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), transform 0.14s var(--ease);
}
.hour-chip:hover { background: var(--hover); border-color: var(--line-3); transform: translateY(-1px); }
.hour-chip.sug { border-color: var(--accent-line); color: var(--accent-hi); }

/* ---- Offer preview ------------------------------------------------------- */
/* The button lives under the live summary — on screen from every section of the
   config window — and opens the panel as a sheet over it. */
.cfg-try { width: 100%; justify-content: center; margin-top: 10px; }
.cfg-try .ico-svg { color: var(--accent-2); }
.pv-overlay { padding: 24px; }
.pv-modal { width: min(720px, 100%); }
.pv-modal .modal-body { padding-top: 4px; }
.cfg-preview { padding: 0; }
.pv-sub { margin: 0; font-size: 12px; color: var(--text-dim); }
.pv-fields { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pv-fields .field { flex: 1 1 150px; min-width: 130px; margin: 0; }
.pv-fields .field > label { font-size: 11px; }
.pv-num { width: 100%; }
.pv-fields .pv-optf { flex: 1 1 100%; min-width: 100%; }
.pv-opts { display: flex; flex-wrap: wrap; gap: 6px; }
/* What an option would DO once it's on: a skip, or the multiplier it carries. */
.pv-tag {
  display: inline-flex; align-items: center; margin-inline-start: 6px; padding: 0 6px;
  border-radius: 999px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--text-dim); background: var(--raised-3); border: 1px solid var(--line);
}
.pv-tag.skip { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.3); }
.pv-tag.hint { text-transform: none; font-weight: 600; }
.event-chip.on .pv-tag { border-color: transparent; }
.pv-text { width: 100%; min-height: 54px; resize: vertical; font: inherit; }
.pv-none { margin: 9px 0 0; font-size: 12px; color: var(--text-dim); }
.pv-out { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; min-height: 46px; }
.pv-verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-verdict.skip { color: var(--text-dim); font-size: 12.5px; }
.pv-verdict.skip .ico-svg { color: var(--warn); }
.pv-verdict.skip b { color: var(--text); }
.pv-price {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--ok);
}
.pv-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; color: var(--text-dim); background: var(--raised-3); border: 1px solid var(--line);
}
.pv-chip.hot { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.3); }
.pv-note { margin: 8px 0 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
.pv-err { font-size: 12.5px; color: var(--text-dim); }

/* ---- Message variants ---------------------------------------------------- */
.msg-var-add {
  display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 8px;
  padding: 2px 8px; border-radius: 999px; cursor: pointer;
  font-size: 11px; color: var(--text-dim); background: transparent; border: 1px dashed var(--line-2);
  transition: color 0.14s var(--ease), border-color 0.14s var(--ease), background 0.14s var(--ease);
}
.msg-var-add:hover { color: var(--accent-hi); border-color: var(--accent-line); background: var(--accent-soft); }
.msg-vars { display: flex; flex-direction: column; gap: 7px; }
.msg-var { position: relative; display: flex; align-items: flex-start; gap: 7px; }
.msg-var .var-tag {
  display: none; flex: 0 0 auto; width: 19px; height: 19px; margin-top: 7px; border-radius: 6px;
  align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: var(--text-dim); background: var(--raised-3);
}
.msg-vars.multi .var-tag { display: flex; }
.msg-var textarea { flex: 1 1 auto; }
.msg-var .var-del { flex: 0 0 auto; margin-top: 4px; }
.msg-var-hint { display: flex; align-items: center; gap: 6px; margin: 7px 0 0; font-size: 11.5px; color: var(--text-faint); }
.msg-var-hint[hidden] { display: none; }

/* ---- On hold (requests a setting turned away) ----------------------------- */
.hold-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; }
.hold-lead { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1 1 260px; }
.hold-ic {
  display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 10px; color: var(--warn); background: var(--warn-soft);
}
.hold-titles strong { display: block; font-size: 13.5px; }
.hold-titles p { margin: 2px 0 0; font-size: 12px; color: var(--text-dim); }
.hold-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hold-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; }
.hold-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px;
  border-radius: 10px; background: var(--raised); border: 1px solid var(--line);
}
.hr-main { min-width: 0; flex: 1 1 auto; }
.hr-main strong { font-size: 13px; }
.hr-fields { display: block; margin-top: 2px; font-size: 12px; color: var(--text-dim); }
.hr-why { display: flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 11.5px; color: var(--warn); }
.hr-when { flex: 0 0 auto; font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }

/* ---- Licence: what you just bought, the friend pass, adding time ---------- */
.lw { display: flex; flex-direction: column; gap: 16px; }
.lw-hero { display: flex; align-items: center; gap: 13px; }
.lw-check {
  display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 14px; color: var(--ok); background: var(--ok-soft);
}
.lw-hero h3 { margin: 0; font-size: 16px; }
.lw-hero p { margin: 3px 0 0; font-size: 13px; color: var(--text-dim); }
.lw-rows { display: flex; flex-direction: column; gap: 1px; border-radius: 12px; overflow: hidden; }
.lw-row {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  background: var(--raised); font-size: 12.5px;
}
.lw-row .ico-svg { color: var(--text-faint); }
.lw-k { color: var(--text-dim); }
.lw-v { margin-inline-start: auto; font-weight: 600; text-align: end; }
.lw-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.lw-note .ico-svg { flex: 0 0 auto; margin-top: 2px; color: var(--accent-hi); }

.lw-pass { border-top: 1px solid var(--line); padding-top: 14px; }
.lw-pass.in-settings { border-top: 0; padding-top: 0; }
.lw-pass-head { display: flex; align-items: center; gap: 7px; }
.lw-pass-head .ico-svg { color: var(--accent-2); }
.lw-pass-head strong { font-size: 13px; }
.lw-pass-sub { margin: 5px 0 10px; font-size: 12px; color: var(--text-dim); line-height: 1.5; }
/* The list grows for as long as someone keeps renewing, so it scrolls and pages
   rather than stretching the window it sits in. */
.pass-list { display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow-y: auto; padding-inline-end: 2px; }
.pass-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.pass-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; cursor: pointer;
  border-radius: 999px; font-size: 11.5px; color: var(--text-dim);
  background: var(--raised-3); border: 1px solid transparent;
  transition: color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.pass-tab:hover { color: var(--text); }
.pass-tab.on { color: var(--accent-hi); border-color: var(--accent-line); background: var(--accent-soft); }
.pt-n { font-variant-numeric: tabular-nums; opacity: 0.75; }
.pass-when { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.pass-more {
  align-self: center; margin-top: 2px; padding: 5px 12px; cursor: pointer;
  border-radius: 999px; font-size: 11.5px; color: var(--text-dim);
  background: none; border: 1px dashed var(--line-2);
}
.pass-more:hover { color: var(--text); border-color: var(--line-3); }
.pass-none { margin: 0; font-size: 12.5px; }
.pass-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; background: var(--raised); border: 1px solid var(--line);
}
.pass-key { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; letter-spacing: 0.02em; white-space: nowrap; }
.pass-row.unused .pass-key { color: var(--ok); }
.pass-state {
  margin-inline-start: auto; flex: 0 0 auto; font-size: 11px; color: var(--text-dim);
  background: var(--raised-3); border-radius: 999px; padding: 2px 9px;
}
.pass-row.active .pass-state { color: var(--accent-hi); background: var(--accent-soft); }
.pass-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* ============================================================ messages (live chat) */
#view.is-chat { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 22px; }
#view.is-chat > .page-head { flex-shrink: 0; width: 100%; }
#view.is-chat > .ch-shell, #view.is-chat > .panel { flex: 1; min-height: 0; width: 100%; }
.ch-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); overflow: hidden; }
@media (max-width: 980px) { .ch-shell { grid-template-columns: 270px minmax(0, 1fr); } }

.ch-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; padding: 5px 12px 5px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--text-dim); background: var(--raised); }
.ch-live .dot { width: 7px; height: 7px; }
.ch-live.up { color: var(--accent-2); background: var(--info-soft); border-color: rgba(34, 211, 238, 0.24); }

/* conversation list */
.ch-list { display: flex; flex-direction: column; min-height: 0; border-inline-end: 1px solid var(--line); background: color-mix(in srgb, var(--bg-deep) 45%, var(--panel)); }
.ch-list-top { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.ch-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: var(--radius-md); background: var(--input-bg); border: 1px solid var(--line-2); color: var(--text-faint); transition: border-color var(--trans), box-shadow var(--trans); }
.ch-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ch-search .ch-search-in { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; box-shadow: none; font-size: 13px; color: var(--text); }
.ch-search .ch-search-in:focus { box-shadow: none; }
.ch-filters { display: flex; gap: 4px; flex-shrink: 0; }
.ch-f { height: 34px; padding: 0 10px; border-radius: var(--radius-md); border: 1px solid var(--line-2); color: var(--text-dim); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: background var(--trans), color var(--trans), border-color var(--trans); }
.ch-f:hover { color: var(--text); background: var(--hover); }
.ch-f.on { color: var(--accent-hi); background: var(--accent-soft); border-color: var(--accent-line); }
.ch-f-n:empty { display: none; }
.ch-f-n { min-width: 17px; height: 17px; padding: 0 5px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ch-rows { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.ch-row { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: var(--radius-md); text-align: start; transition: background var(--trans); position: relative; flex-shrink: 0; }
.ch-row:hover { background: var(--hover); }
.ch-row.on { background: linear-gradient(90deg, rgba(124, 92, 255, 0.16), rgba(124, 92, 255, 0.04)); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.22); }
[dir="rtl"] .ch-row.on { background: linear-gradient(270deg, rgba(124, 92, 255, 0.16), rgba(124, 92, 255, 0.04)); }
html[data-theme="light"] .ch-row.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.ch-row.sk { pointer-events: none; }
.ch-row.sk .sk-l1 { height: 10px; width: 45%; } .ch-row.sk .sk-l2 { height: 9px; width: 75%; }
.ch-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ch-row-top, .ch-row-bot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ch-name { font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ch-time { margin-inline-start: auto; flex-shrink: 0; font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.ch-prev { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-you { color: var(--text-faint); margin-inline-end: 3px; }
.ch-row.unread .ch-prev { color: var(--text); font-weight: 550; }
.ch-row.unread .ch-time { color: var(--accent-hi); font-weight: 600; }
.ch-unread { flex-shrink: 0; min-width: 19px; height: 19px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 12px -3px var(--accent); font-variant-numeric: tabular-nums; }
.ch-kind { flex-shrink: 0; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 1px 6px; border-radius: var(--r-pill); }
.ch-kind.order { color: var(--ok); background: var(--ok-soft); }
.ch-kind.request { color: var(--accent-2); background: var(--info-soft); }
.ch-more { display: flex; justify-content: center; padding: 8px; flex-shrink: 0; }
.ch-list-empty .empty { padding: 36px 12px; }

/* avatars */
.ch-av { position: relative; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; color: #fff; font-family: var(--display); font-weight: 600; }
.ch-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-av.md { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.ch-av.lg { width: 42px; height: 42px; border-radius: 12px; font-size: 14.5px; }
.ch-av.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.ch-av-gap { width: 28px; flex-shrink: 0; }

/* thread */
.ch-thread { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ch-pick { flex: 1; display: grid; place-items: center; }
.ch-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ch-head-txt { flex: 1; min-width: 0; }
.ch-head-name { display: flex; align-items: center; gap: 8px; font-size: 15px; min-width: 0; }
.ch-head-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.ch-head-meta { margin-top: 2px; font-size: 12.5px; color: var(--accent-2); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-head-acts { display: flex; gap: 6px; flex-shrink: 0; }
.ch-body-wrap { position: relative; flex: 1; min-height: 0; }
.ch-body { position: absolute; inset: 0; overflow-y: auto; padding: 10px 20px 14px; background: radial-gradient(600px 300px at 50% 0%, rgba(124, 92, 255, 0.035), transparent 70%); }
.ch-msgs { display: flex; flex-direction: column; gap: 2px; }
.ch-older { display: none; justify-content: center; padding: 8px; }
.ch-older.show { display: flex; }
.ch-thread-load { display: grid; place-items: center; min-height: 260px; }
.ch-start { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 4px; font-size: 11.5px; color: var(--text-faint); }
.ch-day { align-self: center; margin: 14px 0 6px; position: sticky; top: 0; z-index: 2; }
.ch-day span { display: inline-block; padding: 3px 11px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600; color: var(--text-dim); background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
.ch-sys { align-self: center; max-width: 80%; margin: 6px 0; text-align: center; }
.ch-sys span { display: inline-block; padding: 4px 12px; border-radius: 10px; font-size: 11.5px; color: var(--text-dim); background: color-mix(in srgb, var(--raised) 70%, transparent); border: 1px dashed var(--line-2); }

.ch-msg { display: flex; align-items: flex-end; gap: 8px; max-width: min(72%, 560px); }
.ch-msg.new { animation: fadeUp 0.2s var(--ease) both; }
.ch-msg.first { margin-top: 8px; }
.ch-msg.theirs { align-self: flex-start; }
.ch-msg.mine { align-self: flex-end; }
.ch-bub { position: relative; min-width: 64px; display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 6px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; color: var(--text); background: var(--raised-2); border: 1px solid var(--line-2); overflow-wrap: anywhere; }
.ch-msg.theirs:not(.first) .ch-bub { border-start-start-radius: 6px; }
.ch-msg.theirs:not(.last) .ch-bub { border-end-start-radius: 6px; }
.ch-msg.mine .ch-bub { color: #fff; border-color: transparent; background: linear-gradient(135deg, #7c5cff 0%, #6a5cf6 55%, #4f7cf0 100%); box-shadow: 0 6px 18px -10px rgba(124, 92, 255, 0.8); }
.ch-msg.mine:not(.first) .ch-bub { border-start-end-radius: 6px; }
.ch-msg.mine:not(.last) .ch-bub { border-end-end-radius: 6px; }
.ch-txt { white-space: pre-wrap; }
.ch-txt ul { margin: 2px 0; padding-inline-start: 18px; }
.ch-txt code { font-family: var(--mono); font-size: 12px; padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, 0.22); }
.ch-link { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; word-break: break-all; }
.ch-msg.mine .ch-link { color: #fff; }
.ch-mention, .ch-action { font-weight: 600; }
.ch-meta { align-self: flex-end; display: inline-flex; align-items: center; gap: 4px; margin-top: -2px; font-size: 10.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-msg.mine .ch-meta { color: rgba(255, 255, 255, 0.72); }
.ch-seen { display: inline-flex; color: var(--accent-2); }
.ch-msg.mine .ch-seen { color: #bff3ff; }
.ch-edited { font-style: italic; }

/* media inside bubbles */
.ch-bub.media, .ch-msg.mine .ch-bub.media { padding: 4px; background: var(--raised-2); border: 1px solid var(--line-2); box-shadow: none; }
.ch-bub.media .ch-meta { position: absolute; inset-inline-end: 10px; bottom: 9px; padding: 1px 7px; border-radius: var(--r-pill); background: rgba(0, 0, 0, 0.55); color: #fff; }
.ch-img { display: block; width: 320px; max-width: 100%; max-height: 360px; border-radius: 12px; overflow: hidden; background: var(--bg-deep); cursor: zoom-in; padding: 0; }
.ch-img img { display: block; width: 100%; height: 100%; max-height: 360px; object-fit: cover; }
.ch-img.broken, .ch-img.ph { display: flex; align-items: center; gap: 8px; padding: 14px; width: auto; min-width: 180px; color: var(--text-dim); cursor: default; font-size: 12.5px; }
.ch-msg.mine .ch-img.ph { color: #fff; background: rgba(0, 0, 0, 0.18); }
.ch-video { display: block; width: 320px; max-width: 100%; border-radius: 12px; background: #000; }
.ch-audio { width: 260px; max-width: 100%; }
.ch-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.18); color: inherit; text-align: start; min-width: 200px; }
.ch-file:hover { background: rgba(0, 0, 0, 0.28); }
.ch-file-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); flex-shrink: 0; }
.ch-file-txt { min-width: 0; display: flex; flex-direction: column; }
.ch-file-txt b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-file-txt span { font-size: 11px; opacity: 0.7; }

/* not-yet-confirmed sends */
.ch-msg.pending .ch-bub { opacity: 0.72; }
.ch-clock { display: inline-flex; animation: pulse 1.4s ease-in-out infinite; }
.ch-msg.failed { flex-direction: column; align-items: flex-end; gap: 3px; }
.ch-msg.failed .ch-bub { opacity: 1; background: var(--err-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--err) 45%, transparent); box-shadow: none; }
.ch-msg.failed .ch-meta { color: var(--err); }
.ch-fail { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ch-fail-acts { display: flex; gap: 12px; }
.ch-fail-acts .link.muted { color: var(--text-faint); }

.ch-jump { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; box-shadow: var(--glow); z-index: 3; }
.ch-jump.show { display: inline-flex; }

/* composer */
.ch-compose { flex-shrink: 0; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.ch-compose-row { display: flex; align-items: flex-end; gap: 8px; }
.ch-compose .ch-ta { flex: 1; min-height: 40px; max-height: 160px; resize: none; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; overflow-y: auto; }
.ch-tool { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; color: var(--text-dim); background: var(--raised); border: 1px solid var(--line-2); transition: color var(--trans), border-color var(--trans), background var(--trans); }
.ch-tool:hover { color: var(--accent-hi); border-color: var(--accent-line); background: var(--accent-soft); }
.ch-send { height: 40px; border-radius: 12px; flex-shrink: 0; }
.ch-atts { display: none; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.ch-atts.show { display: flex; }
.ch-att { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--raised); display: grid; place-items: center; color: var(--text-dim); animation: pop 0.18s var(--ease); }
.ch-att img { width: 100%; height: 100%; object-fit: cover; }
.ch-att-x { position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.62); color: #fff; }
.ch-att-x:hover { background: var(--err); }
.ch-drop { position: absolute; inset: 8px; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--accent-line); border-radius: 14px; background: rgba(124, 92, 255, 0.1); backdrop-filter: blur(3px); color: var(--accent-hi); font-weight: 600; pointer-events: none; }
.ch-drop.show { display: flex; }

/* image viewer */
.ch-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgba(4, 6, 14, 0.9); backdrop-filter: blur(6px); animation: fadeIn 0.16s ease both; }
.ch-lb-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #fff; }
.ch-lb-name { flex: 1; min-width: 0; font-size: 13px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-lb-x { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.ch-lb-x:hover { background: rgba(255, 255, 255, 0.1); }
.ch-lb-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 24px 24px; cursor: zoom-out; }
.ch-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); cursor: default; }
@media (prefers-reduced-motion: reduce) { .ch-msg.new, .ch-att { animation: none; } .ch-clock { animation: none; } }

/* a chat Eldorado has closed: still readable, no longer answerable */
.ch-row.closed { opacity: 0.55; }
.ch-row.closed .ch-av { filter: grayscale(1); }
.ch-row.closed:hover, .ch-row.closed.on { opacity: 0.85; }
.ch-kind.closed { display: inline-flex; align-items: center; gap: 3px; color: var(--text-dim); background: var(--raised-2); }
.ch-thread.closed .ch-head .ch-av, .ch-thread.closed .ch-msg .ch-av { filter: grayscale(1); }
.ch-thread.closed .ch-msg.mine .ch-bub:not(.media) { background: var(--raised-3); box-shadow: none; }
.ch-thread.closed .ch-head-meta { color: var(--text-faint); }
.ch-closed-bar { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--raised); color: var(--text-dim); font-size: 12.5px; }
.ch-closed-bar b { display: block; color: var(--text); font-size: 13px; font-weight: 600; margin-bottom: 1px; }
.ch-closed-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--raised-3); color: var(--text-dim); }

/* the deal behind a request chat */
.ch-offchip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); color: var(--accent-hi); background: var(--accent-soft); font-variant-numeric: tabular-nums; }
.ch-offchip.accepted { color: var(--ok); background: var(--ok-soft); }

/* AI negotiator: the switch on top of Messages, its chip in the list, its line in a chat */
#view.is-chat > .ch-ai-bar { flex-shrink: 0; width: 100%; }
.ch-ai-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 16px; border-radius: var(--r-lg, 14px); border: 1px solid var(--accent-line); background: linear-gradient(100deg, rgba(124, 92, 255, 0.16), rgba(124, 92, 255, 0.03) 60%), var(--panel); }
.ch-ai-bar.on { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: linear-gradient(100deg, rgba(52, 211, 153, 0.14), rgba(124, 92, 255, 0.05) 60%), var(--panel); }
.ch-ai-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: linear-gradient(135deg, var(--accent, #7c5cff), var(--accent-2, #22d3ee)); box-shadow: 0 6px 18px -6px rgba(124, 92, 255, 0.7); }
.ch-ai-txt { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-ai-title { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ch-ai-free { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 7px; border-radius: var(--r-pill); color: var(--ok); background: var(--ok-soft); }
.ch-ai-sub { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.ch-ai-field { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text-dim); }
.ch-ai-field input { height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font-size: 12.5px; }
.ch-ai-pct { display: inline-flex; align-items: center; gap: 4px; color: var(--text); }
.ch-ai-pct input { width: 58px; }
.ch-ai-field.kw input { width: 190px; }
.ch-ai-field.notes { flex: 1 1 100%; }
.ch-ai-field select { height: 30px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font-size: 12.5px; }
.ch-ai-custom { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ch-ai-custom .ch-ai-field { flex: 1 1 160px; }
.ch-ai-custom .ch-ai-field input { width: 100%; }
.ch-ai-unlock { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex-wrap: wrap; }
.ch-ai-key { height: 30px; width: 230px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: 12.5px var(--mono, ui-monospace, monospace); letter-spacing: .02em; }
.ch-ai-bar.locked .ch-ai-free { color: var(--accent-hi); background: var(--accent-soft); }
.ch-ai-notes { width: 100%; min-height: 44px; resize: vertical; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: inherit; font-size: 12.5px; line-height: 1.4; }
.ch-ai-toggle { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.ch-ai-state { font-size: 12.5px; color: var(--text-dim); }
.ch-ai-bar.on .ch-ai-state { color: var(--ok); }
.ch-aichip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); color: var(--accent-hi); background: var(--accent-soft); }
.ch-aichip.need { color: var(--warn); background: var(--warn-soft); }
.ch-aichip.deal { color: var(--ok); background: var(--ok-soft); }
.ch-ai-line { display: flex; align-items: center; gap: 8px; padding: 7px 18px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--accent-hi); }
.ch-ai-msg { flex: 1; min-width: 0; }
.ch-ai-line.handoff { color: var(--warn); background: var(--warn-soft); }
.ch-ai-line.agreed { color: var(--ok); }
.ch-ai-line.paused, .ch-ai-line.off { color: var(--text-dim); }
@media (max-width: 900px) { .ch-ai-field.kw { display: none; } }
.ch-offer { flex-shrink: 0; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(124, 92, 255, 0.07), transparent 70%), var(--panel); }
[dir="rtl"] .ch-offer { background: linear-gradient(270deg, rgba(124, 92, 255, 0.07), transparent 70%), var(--panel); }
.ch-offer.st-accepted { background: linear-gradient(90deg, rgba(52, 211, 153, 0.09), transparent 70%), var(--panel); }
.ch-offer.st-lost, .ch-offer.st-closed { background: var(--panel); }
.ch-off-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; min-height: 54px; }
.ch-off-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; color: var(--accent-hi); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.st-accepted .ch-off-ic { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.st-lost .ch-off-ic, .st-closed .ch-off-ic { color: var(--text-faint); background: var(--raised); border-color: var(--line-2); }
.ch-off-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ch-off-label { font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-dim); }
.ch-off-price { font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ch-off-price small { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.ch-off-dim { font-size: 12.5px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
.ch-off-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.ch-off-rank { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.ch-off-pill { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; color: var(--text-dim); background: var(--raised-2); }
.ch-off-pill.pending { color: var(--warn); background: var(--warn-soft); }
.ch-off-pill.accepted { color: var(--ok); background: var(--ok-soft); }
.ch-off-pill.lost { color: var(--err); background: var(--err-soft); }
.ch-off-pill.none { color: var(--accent-2); background: var(--info-soft); }
.ch-off-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ch-off-wd.armed { color: var(--err); background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.ch-off-more { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--text-dim); border: 1px solid var(--line-2); transition: transform var(--trans), color var(--trans); }
.ch-off-more:hover { color: var(--text); }
.ch-off-more.on { transform: rotate(180deg); color: var(--accent-hi); }

.ch-off-list { padding: 0 18px 12px; display: flex; flex-direction: column; gap: 3px; max-height: 220px; overflow-y: auto; animation: fadeIn 0.16s ease both; }
.ch-off-fields { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); padding: 0 2px 6px; }
.ch-off-bid { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto 76px; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line); font-size: 12.5px; }
.ch-off-bid.me { border-color: var(--accent-line); background: var(--accent-soft); }
.ch-off-bid.won { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.ch-off-n { color: var(--text-faint); font-weight: 700; font-variant-numeric: tabular-nums; }
.ch-off-seller { min-width: 0; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.ch-off-seller b { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ch-off-seller small { color: var(--text-faint); font-size: 11px; }
.ch-off-amt { text-align: end; font-variant-numeric: tabular-nums; }

.ch-off-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 2px 18px 14px; animation: fadeIn 0.16s ease both; }
.ch-off-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-dim); }
.ch-off-form select { height: 34px; min-width: 130px; padding: 0 10px; }
.ch-off-form label.qty input { width: 80px; height: 34px; }
.ch-off-money { display: flex; align-items: center; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--input-bg); overflow: hidden; }
.ch-off-money:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ch-off-money i { font-style: normal; padding: 0 4px 0 10px; color: var(--text-faint); font-weight: 600; }
.ch-off-money input { width: 100px; height: 100%; border: 0; background: none; box-shadow: none; padding: 0 10px 0 2px; font-weight: 700; }
.ch-off-money input:focus { box-shadow: none; }
.ch-off-go { display: flex; gap: 6px; margin-inline-start: auto; }
.ch-off-hint { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-faint); margin: 0; }
@media (max-width: 1100px) { .ch-off-rank { display: none; } .ch-off-bid { grid-template-columns: 26px minmax(0, 1fr) auto 70px; } .ch-off-bid > :nth-child(3) { display: none; } }

/* ✓ sent / ✓✓ read */
.ch-ticks { display: inline-flex; align-items: center; }
.ch-ticks .ico-svg + .ico-svg, .ch-ticks svg + svg { margin-inline-start: -7px; }
.ch-ticks.seen { color: #7dd3fc; }
.ch-msg.mine .ch-ticks { color: rgba(255, 255, 255, 0.7); }
.ch-msg.mine .ch-ticks.seen { color: #a5f3fc; }
.ch-bub.media .ch-ticks.seen { color: #a5f3fc; }

/* the buyer is typing */
.ch-prev.typing { color: var(--accent-2); font-style: italic; font-weight: 550; }
.ch-typing-row { display: none; align-self: flex-start; margin-top: 8px; padding-inline-start: 36px; }
.ch-typing-row.show { display: block; animation: fadeUp 0.18s var(--ease) both; }
.ch-typing { display: inline-flex; align-items: center; gap: 4px; padding: 11px 14px; border-radius: 16px; border-end-start-radius: 6px; background: var(--raised-2); border: 1px solid var(--line-2); }
.ch-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); animation: chTyping 1.2s ease-in-out infinite; }
.ch-typing i:nth-child(2) { animation-delay: 0.15s; }
.ch-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ch-typing i { animation: none; } }
