/* 2026-10-09 Custom Engine tab */
#tab-custom, #tab-custom * { box-sizing: border-box; min-width: 0; }
.ce-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.ce-grid label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; color: var(--muted); }
.ce-grid input, .ce-grid select, #ce-excl, .ce-range input, #ce-preset { width: 100%; max-width: 100%; padding: 0.5rem; border-radius: 10px; border: 1px solid var(--field-border); background: var(--field-bg); color: var(--text); font-size: 16px; }
/* 2026-11-18: form fields were white-on-white in light theme (old dark-only colors) - visible border + fill in both themes */
:root { --field-border: rgba(20, 20, 40, 0.30); --field-bg: #fff; }
html[data-theme="dark"] { --field-border: rgba(255, 255, 255, 0.28); --field-bg: rgba(255, 255, 255, 0.06); }
.ce-grid input:focus-visible, .ce-grid select:focus-visible, .lm-box input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.ce-grid input[aria-invalid="true"] { border-color: var(--neg, #dc2626); box-shadow: 0 0 0 3px color-mix(in srgb, var(--neg, #dc2626) 20%, transparent); }
.field-err { color: var(--neg, #dc2626); font-size: .82rem; }
.ce-checks { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; margin: 0.5rem 0; font-size: 0.88rem; }
.ce-checks label { display: inline-flex; gap: 0.3rem; align-items: center; }
.ce-range { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.6rem 0; }
.ce-range label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; color: var(--muted); }
.ce-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.ce-actions button { flex: 1 1 auto; min-height: 44px; }
#ce-run { flex: 2 1 100%; font-weight: 700; }
.ce-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.6rem 0; }
@media (min-width: 700px) { .ce-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ce-stat { padding: 0.6rem 0.7rem; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.ce-stat span { display: block; font-size: 0.75rem; color: var(--muted); }
.ce-stat strong { font-size: 1.02rem; overflow-wrap: anywhere; }
#tab-custom .pos { color: var(--good, #22c55e); } #tab-custom .neg { color: var(--bad, #ef4444); }
.ce-chart { width: 100%; height: 170px; position: relative; }
.ce-svg { width: 100%; height: 150px; display: block; }
.ce-svg .line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ce-svg.up .line { stroke: var(--good, #22c55e); } .ce-svg.down .line { stroke: var(--bad, #ef4444); }
.ce-svg .area { stroke: none; opacity: 0.12; } .ce-svg.up .area { fill: var(--good, #22c55e); } .ce-svg.down .area { fill: var(--bad, #ef4444); }
.ce-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); }
.ce-trades { display: grid; gap: 0.4rem; max-height: 60vh; overflow-y: auto; }
.ce-trade { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.6rem; border-radius: 10px; background: rgba(255,255,255,.04); }
.ce-tr-r { text-align: right; flex: 0 0 auto; }
#ce-skips .chip { margin: 0 0.2rem 0.3rem 0; display: inline-block; }

/* 2026-10-09 engine compare: Custom column (mobile: scroll inside card, never page overflow) */
#engines-swap-card .table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
#engines-swap-card .ce-cmp-pick { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.4rem; }
#engines-custom-preset { max-width: 100%; min-width: 0; padding: 0.35rem; border-radius: 8px; font-size: 16px; background: rgba(255,255,255,.04); color: inherit; border: 1px solid rgba(255,255,255,.15); }

/* 2026-10-09 ⓘ help toggles */
.ce-i { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; min-width: 26px; padding: 0; margin-left: 0.3rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--muted); font-size: 0.85rem; line-height: 1; cursor: pointer; vertical-align: middle; }
.ce-i.on { color: var(--accent, #60a5fa); border-color: currentColor; }
.ce-help { display: block; margin-top: 0.3rem; padding: 0.45rem 0.6rem; border-radius: 8px; background: rgba(96,165,250,.08); border-left: 3px solid var(--accent, #60a5fa); font-size: 0.8rem; line-height: 1.45; color: inherit; white-space: normal; overflow-wrap: anywhere; }
.ce-help[hidden] { display: none; }
.ce-checks .ce-help, #ce-form > .ce-help { flex-basis: 100%; }
.ce-help-row { margin-top: 0.4rem; }

/* 2026-10-09 account toasts + badge */
#orbit-toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 9999; display: grid; gap: 0.4rem; width: min(92vw, 420px); pointer-events: none; }
@media (max-width: 960px) { #orbit-toasts { bottom: calc(150px + env(safe-area-inset-bottom)); } }
.acct-msg { margin: .6rem 0 0; font-size: .9rem; min-height: 1.2em; }
.acct-msg.ok { color: var(--good, #0E8F5F); font-weight: 600; }
.acct-msg.err { color: var(--bad, #C93A3A); font-weight: 600; }
.orbit-toast { padding: 0.65rem 0.9rem; border-radius: 12px; background: rgba(20,24,32,.95); color: #fff; font-size: 0.9rem; box-shadow: 0 6px 20px rgba(0,0,0,.35); border-left: 4px solid #22c55e; transition: opacity .35s, transform .35s; }
.orbit-toast.err { border-left-color: #ef4444; } .orbit-toast.warn { border-left-color: #f59e0b; }
.orbit-toast.out { opacity: 0; transform: translateY(8px); }
.acct-badge { display: inline-block; margin-top: 0.2rem; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--muted); cursor: pointer; }
.acct-badge.owner { color: #22c55e; border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.1); }
.acct-badge.member { color: #60a5fa; border-color: rgba(96,165,250,.5); }
.acct-banner { padding: 0.6rem 0.75rem; border-radius: 10px; background: rgba(255,255,255,.05); border-left: 4px solid var(--muted); margin-bottom: 0.5rem; }
.acct-banner.owner { border-left-color: #22c55e; background: rgba(34,197,94,.08); } .acct-banner.member { border-left-color: #60a5fa; }

/* 2026-10-09 engine compare: 3 detail cards (wide) / stacked (mobile) */
#engines-kpi-grid.three { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
@media (min-width: 1100px) { #engines-kpi-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#engines-kpi-grid.three > .card { min-width: 0; overflow: hidden; }
#engine-custom-kv strong { overflow-wrap: anywhere; text-align: right; }

/* 2026-10-09 owner login modal */
.lm-back { position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.lm-box { width: min(420px, 100%); max-height: 90vh; overflow-y: auto; background: var(--card, #141820); color: inherit; border-radius: 16px; padding: 1.1rem; box-shadow: 0 12px 40px rgba(0,0,0,.5); display: grid; gap: 0.6rem; box-sizing: border-box; }
.lm-box h3 { margin: 0; } .lm-box label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.lm-box input { width: 100%; box-sizing: border-box; padding: 0.6rem; border-radius: 10px; border: 1px solid var(--field-border); background: var(--field-bg); color: var(--text); font-size: 16px; }
.lm-err { color: #ef4444; min-height: 1em; margin: 0; font-size: 0.85rem; }
.lm-actions { display: flex; gap: 0.5rem; } .lm-actions button { flex: 1; min-height: 44px; }

/* daily LINE summary prefs (2026-10-09) */
.sum-row { display: flex; align-items: center; gap: .45rem; min-height: 44px; }
.sum-row input[type=checkbox] { width: 22px; height: 22px; }
.sum-sec { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.06); }
.sum-sec .ce-help { flex-basis: 100%; margin-bottom: .4rem; }
.sum-pre { white-space: pre-wrap; font-size: .8rem; line-height: 1.45; background: rgba(255,255,255,.04); padding: .6rem; border-radius: 8px; max-height: 60vh; overflow: auto; }

/* owner user management (2026-10-09) */
.ua-list { display: grid; gap: .6rem; margin-top: .6rem; }
@media (min-width: 900px) { .ua-list { grid-template-columns: 1fr 1fr; } }
.ua-card { border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: .7rem; display: grid; gap: .3rem; min-width: 0; overflow-wrap: anywhere; }
.ua-card.off { opacity: .6; }
.ua-card.sub { border-style: dashed; }
.ua-acts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.ua-acts select, .ua-acts button { min-height: 40px; }
.ua-det summary { cursor: pointer; font-size: .85rem; min-height: 32px; display: flex; align-items: center; }
.ua-prefs { display: grid; gap: .2rem; padding: .4rem 0; }
.ua-hist { margin: .3rem 0 0 1rem; padding: 0; font-size: .78rem; }
.ua-kpi { font-size: 1.05rem; }
.ua-pwcode { font-size: 1.2rem; letter-spacing: .05em; user-select: all; }
.ua-sig { margin-top: .3rem; }
.ua-dtab { width: 100%; border-collapse: collapse; margin-top: .25rem; font-size: .8rem; }
.ua-dtab th, .ua-dtab td { padding: .3rem .2rem; text-align: center; border-bottom: 1px solid rgba(255,255,255,.06); }
.ua-dtab td:first-child { text-align: left; }
.ua-dtab input[type=checkbox] { width: 22px; height: 22px; }
.ua-dtab input:disabled { opacity: .35; }

/* coin column (2026-10-10) */
.coin-cell { white-space: nowrap; }
.coin-cell strong { font-weight: 700; margin-right: .25rem; }

/* plain-Thai events (2026-10-10) */
.ev-main { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .35rem; min-width: 0; overflow-wrap: anywhere; }
.ev-ico { flex: 0 0 auto; font-size: 1rem; line-height: 1.35; }
.ev-txt { flex: 1 1 0; min-width: 0; line-height: 1.4; }
.evd { flex-basis: 100%; font-size: .74rem; }
.evd summary { cursor: pointer; color: var(--muted, #8a8f98); min-height: 28px; display: inline-flex; align-items: center; }
.evd > div { display: flex; gap: .4rem; padding: .1rem 0; border-bottom: 1px dashed rgba(255,255,255,.06); }
.evd-k { color: var(--muted, #8a8f98); min-width: 6.5rem; }
.evd-v { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }

/* ── 2026-10-12 Custom Engine form redesign: grouped cards, inline ⓘ, steppers, switches ── */
.cf-form { display: grid; grid-template-columns: 1fr; gap: 12px; padding-bottom: 84px; }
@media (min-width: 600px) { .cf-form { grid-template-columns: 1fr 1fr; align-items: start; } }
.cf-card { border-radius: 16px; background: var(--panel, rgba(255,255,255,.7)); border: 1px solid var(--border, rgba(0,0,0,.08)); box-shadow: 0 2px 10px rgba(20,30,60,.05); overflow: hidden; }
.cf-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.cf-card > summary::-webkit-details-marker { display: none; }
.cf-card > summary::after { content: "▾"; margin-left: auto; opacity: .5; transition: transform .2s; }
.cf-card:not([open]) > summary::after { transform: rotate(-90deg); }
.cf-n { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; background: linear-gradient(180deg, #7b8cff, #5b6cf0); }
.cf-h { display: flex; flex-direction: column; line-height: 1.25; }
.cf-h b { font-size: .95rem; }
.cf-h small { font-size: .74rem; opacity: .65; }
.cf-body { padding: 2px 14px 12px; display: flex; flex-direction: column; }
.cf-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--text, #222) 7%, transparent); }
.cf-row:first-child { border-top: 0; }
.cf-row[hidden] { display: none; }
.cf-row.cf-col { flex-direction: column; align-items: stretch; }
.cf-lbl { font-size: .86rem; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cf-row.changed .cf-lbl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; flex: none; }
.cf-row.changed .cf-lbl { font-weight: 600; }
.cf-ctl { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; flex: none; }
.cf-ctl.cf-wide { flex: 1; }
.cf-ctl.cf-wide input { width: 100%; }
.cf-unit { font-size: .78rem; opacity: .65; min-width: 22px; }
.cf-form select, .cf-form input[type=date], .cf-form input[type=text] { min-height: 36px; border-radius: 10px; padding: 4px 10px; font-size: .86rem; max-width: 210px; }
.cf-step { display: inline-flex; align-items: center; border-radius: 10px; border: 1px solid var(--border, rgba(0,0,0,.12)); overflow: hidden; background: var(--bg, #fff); }
.cf-step input { width: 58px; border: 0 !important; text-align: center; min-height: 34px; background: transparent; font-variant-numeric: tabular-nums; font-size: .88rem; -moz-appearance: textfield; padding: 0 2px; box-shadow: none !important; }
.cf-step input::-webkit-outer-spin-button, .cf-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#ce-form .cf-step button { all: unset; width: 32px; height: 34px; display: grid; place-items: center; cursor: pointer; font-size: 1rem; color: var(--text, #222); opacity: .75; }
#ce-form .cf-step button:active { background: color-mix(in srgb, #5b6cf0 15%, transparent); }
.cf-range2 { gap: 4px; }
.cf-dash { opacity: .5; }
#ce-form .ce-i { all: unset; width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; font-style: italic; font-family: Georgia, serif; cursor: pointer; color: #5b6cf0; border: 1.3px solid currentColor; flex: none; }
.cf-pop { position: absolute; z-index: 9999; padding: 10px 12px; border-radius: 12px; font-size: .8rem; line-height: 1.45; background: #1f2433; color: #f1f3fa; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
html[data-theme="dark"] .cf-pop { background: #eef1fb; color: #1d2433; }
.cf-switch { position: relative; width: 46px; height: 28px; flex: none; }
.cf-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.cf-switch span { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in srgb, var(--text, #222) 20%, transparent); transition: background .2s; cursor: pointer; }
.cf-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.cf-switch input:checked + span { background: #34c759; }
.cf-switch input:checked + span::after { transform: translateX(18px); }
.cf-chips { gap: 6px; flex-wrap: wrap; }
.cf-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cf-chip span { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: .8rem; cursor: pointer; border: 1px solid var(--border, rgba(0,0,0,.12)); }
.cf-chip input:checked + span { background: #5b6cf0; color: #fff; border-color: transparent; }
.cf-seg { display: inline-flex; padding: 3px; border-radius: 11px; background: color-mix(in srgb, var(--text, #222) 8%, transparent); }
#ce-form .cf-seg button { all: unset; padding: 6px 12px; border-radius: 8px; font-size: .82rem; cursor: pointer; }
#ce-form .cf-seg button.on { background: var(--panel, #fff); box-shadow: 0 1px 4px rgba(0,0,0,.15); font-weight: 600; }
html[data-theme="dark"] #ce-form .cf-seg button.on { background: #3a4260; }
.cf-coins { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-coin { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; font-size: .78rem; background: color-mix(in srgb, #ef4444 12%, transparent); }
#ce-form .cf-coin button { all: unset; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; opacity: .7; }
.cf-btns { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.cf-btns button { flex: 1; min-height: 38px; }
.danger-text { color: #dc2626 !important; }
.cf-qchips { display: flex; gap: 6px; padding: 4px 0 6px; }
#ce-form .cf-q { all: unset; padding: 5px 12px; border-radius: 999px; font-size: .8rem; cursor: pointer; border: 1px solid var(--border, rgba(0,0,0,.12)); }
#ce-form .cf-q.on { background: #5b6cf0; color: #fff; border-color: transparent; }
.cf-adv { margin-top: 4px; }
.cf-adv > summary { font-size: .78rem; opacity: .7; cursor: pointer; padding: 6px 0; }
.cf-bar { position: sticky; bottom: 0; z-index: 20; grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); margin: 0 -4px; border-radius: 16px 16px 0 0;
  background: color-mix(in srgb, var(--bg, #f4f6fb) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--border, rgba(0,0,0,.08)); }
#ce-form .cf-run { width: 100%; min-height: 50px; font-size: 1.05rem; font-weight: 700; border-radius: 14px; color: #fff; background: linear-gradient(180deg, #7b8cff, #5b6cf0); border: 0; box-shadow: 0 6px 16px rgba(91,108,240,.35); }
#ce-form .cf-run:disabled { opacity: .6; }
.cf-bar #ce-status { margin: 0; text-align: center; }
/* 2026-11-20 save + apply-to-live bar */
.cf-live { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 2px 2px 4px; line-height: 1.6; }
.cf-live .chip { font-size: .72rem; }
.cf-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex: none; }
.cf-dot.off { background: #9ca3af; }
.cf-diff { color: #b45309; }
html[data-theme="dark"] .cf-diff { color: #fbbf24; }
.cf-save-row { display: flex; gap: 8px; flex-wrap: wrap; }
#ce-form .cf-save-row input { flex: 1 1 180px; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field-border, rgba(0,0,0,.18)); background: var(--field-bg, #fff); color: inherit; font: inherit; }
#ce-form .cf-save-row button { flex: 0 1 auto; min-height: 40px; }
#ce-form .cf-save { border-color: #7b8cff !important; color: #4f56c9 !important; }
#ce-form .cf-apply, .cf-dlg .cf-apply { background: #fff7ed !important; border: 1px solid #fdba74 !important; color: #b45309 !important; font-weight: 600; }
html[data-theme="dark"] #ce-form .cf-save { color: #aab3ff !important; }
html[data-theme="dark"] #ce-form .cf-apply, html[data-theme="dark"] .cf-dlg .cf-apply { background: rgba(251,146,60,.15) !important; color: #fdba74 !important; }
.cf-bar .cf-note { margin: 0; text-align: center; font-size: .72rem; }
body:not(.is-owner) .cf-save-row, body:not(.is-owner) .cf-bar .cf-note { display: none; }
.cf-dlg { border: 1px solid #fdba74; border-radius: 16px; padding: 18px; max-width: min(460px, calc(100vw - 32px)); background: var(--panel, #fffbeb); color: inherit; }
.cf-dlg::backdrop { background: rgba(15,23,42,.45); }
.cf-dlg h3 { margin: 0 0 8px; font-size: 1rem; }
.cf-dlg ul { margin: 6px 0 12px 18px; padding: 0; line-height: 1.7; font-size: .9rem; }
.cf-dlg-note { font-size: .82rem; color: #b45309; margin: 0 0 12px; }
.cf-dlg-btns { display: flex; gap: 8px; justify-content: flex-end; }
.cf-dlg-btns button { min-height: 40px; padding: 0 16px; }
/* 2026-11-24 test slots */
#ce-form .cf-slot, .cf-dlg .cf-slot { background: #ecfdf5 !important; border: 1px solid #86efac !important; color: #15803d !important; font-weight: 600; }
html[data-theme="dark"] #ce-form .cf-slot, html[data-theme="dark"] .cf-dlg .cf-slot { background: rgba(34,197,94,.14) !important; color: #86efac !important; }
#ce-form .cf-slot:disabled { opacity: .5; cursor: not-allowed; }
.cf-dlg-slot { border-color: #86efac; }
.cf-slots { grid-column: 1 / -1; border-radius: 16px; padding: 14px; background: var(--panel, #fff); border: 1px solid var(--border, rgba(0,0,0,.08)); margin-top: 10px; }
.cf-slots-h { display: flex; justify-content: space-between; align-items: center; margin: 0 0 2px; font-size: 1rem; }
.cf-slots-t { width: 100%; border-collapse: collapse; font-size: .85rem; }
.cf-slots-t th, .cf-slots-t td { padding: 8px 6px; border-bottom: 1px solid var(--border, rgba(0,0,0,.08)); text-align: left; white-space: nowrap; }
.cf-slots-t .r { text-align: right; }
.cf-st { font-size: .72rem; padding: 2px 8px; border-radius: 99px; }
.cf-st.on { background: #dcfce7; color: #15803d; } .cf-st.off { background: #f3f4f6; color: #6b7280; }
html[data-theme="dark"] .cf-st.on { background: rgba(34,197,94,.18); color: #86efac; } html[data-theme="dark"] .cf-st.off { background: rgba(255,255,255,.08); color: #cbd5e1; }
#ce-form .cf-mini, .cf-slots .cf-mini { min-height: 30px; padding: 2px 10px; font-size: .78rem; }
body:not(.is-owner) .cf-slots .cf-acts { display: none; }
/* phones: the bar is tall and the fixed bottom tabs cover a sticky bar -> let it scroll with the page */
@media (max-width: 767px) { .cf-bar { position: static; border-radius: 16px; margin: 0; } }
/* Results in Pro2-style KPI cards */
#ce-cards.ce-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { #ce-cards.ce-stats { grid-template-columns: repeat(4, 1fr); } }
#ce-cards .ce-stat { border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 4px; background: var(--panel, #fff); border: 1px solid var(--border, rgba(0,0,0,.08)); }
#ce-cards .ce-stat:nth-child(4n+1) { background: color-mix(in srgb, #ff8fab 16%, var(--panel, #fff)); }
#ce-cards .ce-stat:nth-child(4n+2) { background: color-mix(in srgb, #ffb38a 16%, var(--panel, #fff)); }
#ce-cards .ce-stat:nth-child(4n+3) { background: color-mix(in srgb, #5ee0a0 16%, var(--panel, #fff)); }
#ce-cards .ce-stat:nth-child(4n+4) { background: color-mix(in srgb, #b49cff 16%, var(--panel, #fff)); }
#ce-cards .ce-stat span { font-size: .76rem; opacity: .7; }
#ce-cards .ce-stat strong { font-size: 1.1rem; }

/* t348u: persistent invite codes + copy */
.ua-inv-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .25rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.ua-inv-row code { font-size: 1.05em; letter-spacing: .06em; user-select: all; }
.ua-inv-row.new code { outline: 2px solid var(--accent, #4ade80); border-radius: 4px; padding: 0 .2rem; }
.ua-inv-row .touch { min-height: 32px; padding: .2rem .6rem; }
