:root {
  color-scheme: light;
  --surface: #ffffff;
  --canvas: #f4f7f4;
  --green: #17643a;
  --green-2: #238451;
  --green-soft: #e9f5ed;
  --amber: #a65f0b;
  --amber-soft: #fff3df;
  --red: #a63834;
  --red-soft: #fdeceb;
  --blue: #315f8a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
.page-context { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 14px; }
.page-context .site-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.page-context .site-picker select { width: auto; min-width: 7.5rem; height: 32px; padding: 0 8px; }
.page-context .sync-light { font-size: 12px; }
.page-toolbar:not(.filters) { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.main .panel.page-toolbar:not(.filters) { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0 0 12px; }
.page-toolbar .segmented { margin: 0; }
.page-note { color: var(--muted); font-size: 13px; }
.page-body { min-height: 420px; min-width: 0; }
.page-body.flush { display: flex; flex-direction: column; }
.page-body.flush > .table-wrap { flex: 1; }
.page-toolbar label.page-note { display: flex; align-items: center; gap: 10px; }
.page-toolbar .standalone-select { width: auto; min-width: 140px; height: 36px; }
.gate-toolbar { align-items: stretch; }
.gate-filters { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(140px, .75fr)) auto; align-items: end; gap: 10px 12px; width: 100%; }
.gate-filters label { display: grid; gap: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-sb); }
.gate-filters input, .gate-filters select { width: 100%; }
.gate-check { display: flex !important; align-items: center; gap: 7px !important; height: 38px; white-space: nowrap; }
.gate-check input { width: auto; margin: 0; }
.gate-summary-panel { padding: 14px 16px !important; }
.gate-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }
.gate-kpis .kpi { box-shadow: none; padding: 12px 14px; }
.gate-summary-note { margin: 12px 2px 0; color: var(--muted); font-size: var(--fs-sm); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.site-picker select, .standalone-select {
  border: 1px solid var(--line); background: var(--input); color: var(--ink); border-radius: 8px; padding: 6px 28px 6px 10px;
}
.sync-light { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--brand-soft); color: var(--brand); border-radius: 999px; font-size: 12px; }
.sync-light i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.sync-light.warn { color: var(--amber); background: var(--amber-soft); }
.sync-light.warn i { background: var(--amber); box-shadow: 0 0 0 4px rgba(166,95,11,.13); }
.sync-light b { font-weight: 650; }
.sync-light[hidden] { display: none; }
.eyebrow { margin: 0; color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-sb); letter-spacing: 0; }
.head-actions { display: flex; gap: 9px; }
.button, .icon-button, .link-button { border: 0; cursor: pointer; text-decoration: none; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 8px; color: var(--ink); background: var(--btn); font-size: var(--fs-sm); font-weight: var(--fw-sb); line-height: 1.4; }
.button:hover { filter: brightness(0.97); }
.button.primary { color: #fff; background: var(--brand); }
.button.quiet { background: transparent; border: 1px solid var(--line); }
.button.danger { color: #fff; background: var(--danger); }
.button.small { padding: 5px 10px; }
.icon-button { width: 36px; height: 36px; border-radius: 10px; background: transparent; color: #4d5a52; font-size: 20px; display: grid; place-items: center; }
.icon-button:hover { background: #edf2ee; }
.link-button { color: var(--brand); background: transparent; font-weight: var(--fw-sb); padding: 4px; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi .label { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-md); }
.kpi .value { margin: 6px 0 2px; font-size: var(--fs-xl); font-weight: var(--fw-bd); letter-spacing: 0; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kpi .hint { color: var(--muted); font-size: var(--fs-sm); }
.kpi .signal { color: var(--brand); font-weight: var(--fw-sb); }
.kpi .signal.good { color: var(--brand); }
.kpi .signal.info { color: var(--blue); }
.kpi .signal.warn { color: var(--amber); }
.kpi .signal.bad { color: var(--red); }

.grid { display: grid; gap: 12px; margin-bottom: 16px; min-width: 0; }
.grid.two { grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr); }
.main .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.chart { min-height: 180px; display: flex; align-items: flex-end; gap: 8px; padding: 8px 4px 22px; position: relative; }
.chart:has(.bar) { border-bottom: 1px solid var(--line); }
.bar-group { flex: 1; min-width: 14px; height: 180px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; position: relative; }
.bar { width: min(16px, 42%); min-height: 2px; border-radius: 5px 5px 1px 1px; background: var(--brand); opacity: .85; }
.bar.refund { background: #d6a85f; }
.bar-group label { position: absolute; bottom: -22px; font-size: 9px; color: #849087; white-space: nowrap; }
.empty { display: grid; place-items: center; min-height: 140px; color: var(--muted); text-align: center; }
.queue-list { display: grid; gap: 11px; }
.queue-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf1ee; }
.queue-row:last-child { border-bottom: 0; }
.queue-row strong { font-size: 15px; }
.queue-row span { color: var(--muted); font-size: 13px; }
.queue-row b { grid-row: 1 / 3; grid-column: 2; font-size: 21px; }
.queue-row b.warn { color: var(--amber); }

.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: var(--fs-sm); }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: var(--bg); color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-sb); letter-spacing: 0.02em; }
td { border-top: 0; }
tbody tr:hover td { background: var(--hover); }
.cell-main { display: block; font-weight: 720; color: var(--ink); }
.cell-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.money { font-variant-numeric: tabular-nums; font-weight: 740; }
.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: var(--fw-sb); line-height: 1.3; background: var(--msg); color: var(--muted); }
.pill.good { background: var(--brand-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info-ink); }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 13px 16px; border-top: 1px solid var(--line); }
.pager span { margin-right: auto; color: var(--muted); font-size: 14px; }

.filters { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, .8fr)) auto; align-items: end; gap: 12px; padding: 16px; }
.filters label, .dialog-fields label { display: grid; gap: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-sb); }
.main input, .main select, .main textarea, .dialog-fields input, .dialog-fields select, .dialog-fields textarea { width: 100%; }
textarea { min-height: 94px; resize: vertical; }
.callout { display: flex; gap: 14px; align-items: center; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); border-radius: var(--radius); padding: 13px 16px; color: var(--ink-2); margin-bottom: 16px; }
.callout strong { color: var(--brand); }
.callout code { background: rgba(255,255,255,.75); border-radius: 5px; padding: 2px 5px; }
.page-body > .cards-list,
.page-body > .platform-gates,
.page-body > .kpis,
.page-body > .definitions,
.page-body > .inner-grid { margin: 16px; }
.page-body > .panel-head { margin: 16px 16px 0; }
.page-body .inner-grid { margin-bottom: 0; }
.page-toolbar label.page-note { display: flex; align-items: center; gap: 10px; }
.page-toolbar .standalone-select { width: auto; min-width: 140px; height: 38px; }
.cards-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.shop-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; }
.shop-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.shop-top h3 { margin: 0; font-size: 16px; }
.shop-top p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.shop-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 17px 0; }
.shop-meta div { padding: 10px; background: #f7f9f7; border-radius: 10px; min-width: 0; }
.shop-meta span { display: block; color: var(--muted); font-size: 10px; }
.shop-meta strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; }
.shop-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.segmented { display: inline-flex; background: var(--bg); padding: 3px; border-radius: 8px; margin: 0; }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-sb); }
.segmented button.active { background: var(--panel); color: var(--brand); box-shadow: var(--shadow); }
.stack-list { display: grid; gap: 8px; }
.stack-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.stack-row div { min-width: 0; }
.stack-row strong, .stack-row span { display: block; }
.stack-row span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.table-wrap.compact td { padding-top: 10px; padding-bottom: 10px; }

.platform-gates { display: grid; gap: 14px; }
.gate-platform { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gate-platform-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 16px 18px; background: #f8faf8; }
.gate-platform-head h3 { margin: 0; }
.gate-platform-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.gate-platform-head p.gate-hold { color: #879188; }
/* GOV2-P1-L3：未开放平台的内测申请 */
.gate-pilot { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
.gate-pilot:empty { display: none; }
.gate-platform-signals { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.gate-platform-signals .gate-real { color: var(--muted); font-size: 11px; white-space: nowrap; }
.gate-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.gate-cell { background: #fff; min-height: 95px; padding: 12px; border: 0; color: inherit; text-align: left; cursor: pointer; }
.gate-cell:hover { background: #fbfdfb; }
.gate-cell:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--brand); outline-offset: -2px; }
.gate-cell span { display: block; color: var(--muted); font-size: 10px; }
.gate-cell strong { display: block; margin: 7px 0 4px; }
.gate-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #879188; }
.gate-cell.has-evidence small { color: var(--brand); }
.definitions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.definition { padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.definition strong { display: block; color: var(--green); }
.definition span { color: var(--muted); font-size: 12px; }

.drawer { position: fixed; inset: 0 0 0 auto; width: min(660px, 94vw); background: var(--surface); box-shadow: -18px 0 50px rgba(25,44,31,.16); z-index: 80; transform: translateX(105%); transition: transform .24s ease; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); z-index: 2; }
.drawer-head h2 { margin: 2px 0 0; }
.drawer-body { padding: 22px 24px 50px; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(12,25,17,.24); z-index: 70; backdrop-filter: blur(2px); }
.detail-hero { background: #edf5ef; border-radius: 15px; padding: 18px; margin-bottom: 14px; }
.detail-hero h3 { margin: 0 0 4px; }
.detail-hero p { margin: 0; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 14px 0; }
.detail-field { border: 1px solid var(--line); border-radius: 10px; padding: 11px; min-width: 0; }
.detail-field span { display: block; color: var(--muted); font-size: 10px; }
.detail-field strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.detail-section { margin-top: 22px; }
.detail-section h3 { font-size: 14px; margin: 0 0 10px; }
.timeline { border-left: 2px solid #dfe8e2; padding-left: 16px; display: grid; gap: 12px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); left: -21px; top: 6px; }
.timeline-item strong { display: block; font-size: 12px; }
.timeline-item span { color: var(--muted); font-size: 11px; }

dialog { width: min(580px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 14px; padding: 0; color: var(--ink); background: var(--panel); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 2px 0 0; }
.dialog-fields { padding: 20px 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-height: 65vh; overflow-y: auto; }
.dialog-fields label.wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px 20px; }
.toast { position: fixed; left: 50%; right: auto; top: auto; bottom: 24px; transform: translate(-50%, 20px); padding: 10px 15px; color: #fff; background: #1c3224; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 120; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #852e2a; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 30% 20%, #e4f3e9, transparent 34%), var(--canvas); }
.gate-card { width: min(420px, 100%); text-align: center; padding: 38px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.app-header .brand-mark { width: 32px; height: 32px; margin: 0; background: transparent; border-radius: 0; }
.gate-card .brand-mark { width: 52px; height: 52px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--brand); color: #fff; border-radius: 12px; font-size: 23px; font-weight: 800; }
.gate-card h1 { margin: 0 0 8px; }
.gate-card p { color: var(--muted); margin: 0 0 20px; }

@media (max-width: 1120px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.two { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .gate-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gate-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .grid.two, .cards-list { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .gate-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .definitions { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
  .filters, .dialog-fields { grid-template-columns: 1fr; }
  .gate-filters { grid-template-columns: 1fr; }
  .dialog-fields label.wide { grid-column: auto; }
  .shop-meta, .detail-grid { grid-template-columns: 1fr; }
}

/* GOV 2026-10-08：接入治理三页 */
.inner-grid > section { min-width: 0; }
.grid.two.mapping-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); }
.stack-row strong .pill { display: inline-flex; margin: 0 0 0 6px; font-size: var(--fs-xs); vertical-align: 1px; }
.stack-row strong code { font-size: 13px; }
.shop-steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 14px 0 0; padding: 0; }
.shop-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-sb); }
.shop-steps li b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: 11px; }
.shop-steps li.done { background: var(--brand-soft); color: var(--ok); }
.shop-steps li.done b { background: var(--brand); color: #fff; }
.shop-warn { margin: 12px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.shop-warn.bad { background: var(--danger-soft); color: var(--danger); }
.shop-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; }
.shop-meta div { background: var(--bg); }
.shop-meta span { font-size: var(--fs-xs); }
.shop-card.is-archived { opacity: .72; }
.onboarding { gap: 10px; padding: 32px 16px; grid-column: 1 / -1; }
.onboarding strong { color: var(--ink); font-size: 16px; }
.onboarding ol { margin: 0; padding-left: 20px; text-align: left; color: var(--muted); line-height: 1.8; }
.row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.dialog-note { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.copy-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.copy-row code { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); overflow-wrap: anywhere; font-size: 12px; }
pre.sample { max-height: 60vh; overflow: auto; padding: 14px; border-radius: 10px; background: var(--bg); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
td.wrap { white-space: normal; min-width: 160px; color: var(--muted); }
.progress { display: inline-block; width: 120px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; vertical-align: middle; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.gate-progress { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.gate-platform-head h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gate-platform-head p { font-size: var(--fs-xs); }
.gate-platform-signals { flex-direction: column; align-items: flex-end; gap: 4px; }
.gate-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 14px 18px 4px; counter-reset: gate; }
.gate-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 6px; border: 1px solid var(--line); border-radius: 10px; font-size: var(--fs-xs); counter-increment: gate; }
.gate-chip::before { content: counter(gate); display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 10px; }
.gate-chip.na { opacity: .5; }
.gate-chip small { color: var(--info-ink); }
.gate-need { margin: 6px 18px 14px; color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 1120px) {
  .grid.two.mapping-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .stack-row { flex-wrap: wrap; }
  .gate-platform-head { flex-direction: column; }
  .gate-platform-signals { align-items: flex-start; }
  .shop-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* SHOP-REG 2026-10-12：店铺登记向导（四步 + 平台卡片） */
dialog:has(.platform-picker) { width: min(760px, calc(100vw - 28px)); }
.dialog-dyn { display: contents; }
.wizard-steps { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.wizard-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-sb); }
.wizard-steps li b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: 11px; }
.wizard-steps li.done { background: var(--brand-soft); color: var(--ok); }
.wizard-steps li.done b, .wizard-steps li.current b { background: var(--brand); color: #fff; }
.wizard-steps li.current { color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand); }
.platform-picker { grid-column: 1 / -1; border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 12px; }
.platform-picker legend { padding: 0; margin-bottom: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-sb); }
.pp-group-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pp-group-head strong { color: var(--ink); font-size: var(--fs-sm); }
.pp-group-head span { color: var(--muted); font-size: var(--fs-xs); }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dialog-fields .pp-card { position: relative; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); cursor: pointer; font-weight: normal; min-width: 0; }
.dialog-fields .pp-card input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pp-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.pp-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
.pp-card.is-selected, .pp-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.pp-card.is-disabled { cursor: not-allowed; opacity: .55; }
.pp-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.pp-name { font-weight: var(--fw-sb); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-top .pill { flex-shrink: 0; font-size: var(--fs-xs); }
.pp-sub { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; overflow-wrap: anywhere; }
.dialog-advanced { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.dialog-advanced summary { cursor: pointer; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-sb); }
.dialog-advanced-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.dialog-advanced-body label.wide { grid-column: 1 / -1; }
.onboarding-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(760px, 100%); text-align: left; }
.onboarding-paths section { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--panel); }
.onboarding-paths h4 { margin: 0 0 6px; color: var(--ink); }
.onboarding-paths p { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
@media (max-width: 820px) {
  .pp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onboarding-paths { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pp-grid, .dialog-advanced-body { grid-template-columns: 1fr; }
  .dialog-advanced-body label.wide { grid-column: auto; }
}
.pp-more { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 12px; }
.pp-more summary { cursor: pointer; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-sb); }
.pp-more[open] summary { margin-bottom: 4px; }
