/*
 * The Sports Outpost 2.0 — single shared design system.
 * Owner overrides are validated variables in #tso-theme-published, loaded from
 * Supabase RPC. This stylesheet intentionally loads AFTER all app CSS.
 * Semantic chart / win-loss colors remain distinct from chrome colors.
 */
:root{
 --outpost-orange:#ff4d1c;--outpost-gold:#ffd84d;
 --tso-sidebar-bg:#070a0f; --tso-header-bg:#070a0f;
 --tso-primary-btn:#ff4d1c; --tso-secondary-btn:#151b23;
 --tso-btn-text:#ffffff; --tso-nav-active:#24150f; --tso-focus:#ffd84d;
 --tso-page-max:1540px;--tso-page-gutter:24px;--tso-card-padding:18px;--tso-grid-gap:14px;
 --tso-body-size:13px;--tso-heading-size:30px;--tso-button-height:38px;--tso-header-height:68px;--tso-nav-item-height:52px;
 --tso-font-family:Inter,ui-sans-serif,system-ui,sans-serif;
}

/* Approved TSO 2.0 Outpost broadcast baseline (one shared preset). */
:root{
 --bg:#05070a;
 --surface:#0c1016;
 --card:#0a0d12;
 --elev:#151b23;
 --text:#f7f7f2;
 --muted:#8e9bad;
 --muted-2:#627087;
 --line:#242c37;
 --line-strong:#313b49;
}
html,body{background-color:var(--bg);color:var(--text);font-family:var(--tso-font-family)}
body{font-size:var(--tso-body-size)}
:where(.app-shell.broadcast-shell,.broadcast-shell){color:var(--text);font-family:var(--tso-font-family)}
/* The page background is a real editable token, not the historical
   hardcoded multicolor gradient from legacy page modules. */
.app-shell.broadcast-shell{background:var(--bg)}
/* Games shares the site's global content width and gutter controls.
   Responsive padding caps keep mobile player rows readable. */
.app-shell.broadcast-shell .broadcast-main:has(.gb2-root){
 max-width:var(--tso-page-max);
 padding-inline:min(var(--tso-page-gutter),4vw);
}
/* 2.0 shell chrome shares EXACT tokens regardless of active page. */
.app-shell.broadcast-shell .tso-side-nav{
 width:var(--tso-side-nav-width);
 background:var(--tso-sidebar-bg);
 border-right:1px solid var(--line-strong);
}
.app-shell.broadcast-shell{padding-left:var(--tso-side-nav-width)}
.app-shell.broadcast-shell .broadcast-header{
 background:var(--tso-header-bg);
 border-color:var(--line);
}
.app-shell.broadcast-shell .tso-side-masthead{
 height:var(--tso-header-height)!important;
}
.app-shell.broadcast-shell :is(.tso-side-item,.tso-decision-advanced-items>.tso-side-item){
 min-height:var(--tso-nav-item-height);
}
.app-shell.broadcast-shell .tso-side-item:hover,
.app-shell.broadcast-shell .tso-side-item.is-active{
 background:var(--tso-nav-active);
 border-color:var(--line-strong);
 color:var(--text);
}
.app-shell.broadcast-shell :is(.tso-side-footer,.tso-side-primary,.score-strip){
 border-color:var(--line);
}
.app-shell.broadcast-shell :is(.broadcast-content,.tso-page-body,.page-content,.decision-page){
 max-width:var(--tso-page-max);
}
.app-shell.broadcast-shell :is(.page-content,.broadcast-content,.decision-page){
 --tso-inner-gutter:var(--tso-page-gutter);
}
.app-shell.broadcast-shell :is(.page-header,.decision-intro,.gb2-page-head) h1{
 color:var(--text);font-size:clamp(24px,2.2vw,var(--tso-heading-size));
}
.app-shell.broadcast-shell :is(.page-header,.decision-intro,.gb2-page-head) p{color:var(--muted)}
/* Shared surfaces. These selectors describe STRUCTURAL chrome only; keep
   status bars, team colors, analytic heatmaps and per-sport plots intact. */
.app-shell.broadcast-shell :is(
 .decision-panel,.decision-game-card,.decision-opportunity-card,
 .research-detail-block,.research-detail-panel,.models-run-card,
 .model-engine-card,.props-board-card,.props-stats-panel,
 .tso-admin-panel,.tso-admin-stats article,.tso-admin-hero,
 .profile-card,.profile-hero,.room-card,.post-card,.live-game,
 .mi-ranked,.mi-game-vault-header,
 .gb2-card,.gb2-hero,.gb2-panel,.gb2-dock,
 .props-market-card,.props-filter-panel,.feature-game
 ){
 background:var(--card);
 border-color:var(--line-strong);
 color:var(--text);
 border-radius:var(--r);
}
.app-shell.broadcast-shell :is(
 .mi-section,.mi-reason,.mi-chart-panel,.mi-hit-panel,.mi-signal-detail,
 .mi-player.is-open,.mi-player-body,.mi-player-defender,.mi-nfl-opportunities,
 .research-detail-metrics,.mi-read-signal,
 .mi-usage-row,.gb2-empty,.edge2-call,.decision-filters,
 .tso-admin-feed-summary
 ){
 border-color:var(--line);background:var(--surface);color:var(--text);
 border-radius:var(--r-sm);
}
.app-shell.broadcast-shell :is(.decision-game-card,.model-engine-card,.gb2-card,.mi-player,.tso-admin-panel,.research-detail-block){
 box-shadow:var(--shadow);
}
.app-shell.broadcast-shell :is(.decision-panel,.tso-admin-panel,.models-run-card,.gb2-panel) :is(h2,h3,h4){
 color:var(--text);
}
.app-shell.broadcast-shell :is(.mi-game-vault-header small,.mi-ranked-head small,.gb2-hero>small,.gb2-panel>header small,.decision-section-title small,.research-detail-block-head span){
 color:var(--blue-2);
}
/* Inset scouting/market surfaces are nested inside card chrome. */
.app-shell.broadcast-shell :is(.mi-team,.mi-player,.edge2-market){
 background:var(--surface);
 border:1px solid var(--line-strong);
 border-radius:var(--r-sm);
 color:var(--text);
}
/* Controlled actions and navigation */
.app-shell.broadcast-shell :is(.button.primary,.tso-admin-form-bottom button,.mi-add,.gb2-dock button){
 background:var(--tso-primary-btn);color:var(--tso-btn-text);
 border-color:var(--tso-primary-btn);border-radius:var(--r-sm);
 min-height:var(--tso-button-height);
 box-shadow:none;
}
.app-shell.broadcast-shell :is(.button.secondary,.gb2-back,.gb2-live,.mi-filters button,.filter-button){
 background:var(--tso-secondary-btn);border-color:var(--line-strong);
 color:var(--text);border-radius:var(--r-sm);
}
.app-shell.broadcast-shell :is(button,input,select,textarea,a):focus-visible{
 outline:2px solid var(--tso-focus);outline-offset:2px;
}
.app-shell.broadcast-shell :is(.tso-admin-page,.decision-page,.gb2-root,.research-page,.models-page,.props-page,.live-page){
 --page-gap:var(--tso-grid-gap);color:var(--text);
}
.app-shell.broadcast-shell :is(.gb2-grid,.model-engine-grid,.tso-admin-grid){gap:var(--tso-grid-gap)}
.app-shell.broadcast-shell :is(.gb2-card,.tso-admin-panel,.decision-panel){padding:var(--tso-card-padding)}
/* Games has its own deep components; keep all shared tokens synchronized. */
.gb2-root{
 --gb2-panel:var(--card);--gb2-subpanel:var(--surface);--gb2-raised:var(--elev);
 --gb2-border:var(--line-strong);--gb2-rule:var(--line);
 --gb2-text:var(--text);--gb2-muted:var(--muted);
 --gb2-accent:var(--outpost-orange);--gb2-accent-light:var(--outpost-gold);
}
/* Sidebar/mobile geometry depends on existing TSO 2.0 breakpoint behavior. */
@media(max-width:900px){
 .app-shell.broadcast-shell{padding-left:0}
 .app-shell.broadcast-shell .tso-side-nav{width:min(90vw,var(--tso-side-nav-width))}
}
/* Games uses the SAME editable typography, dimensions and action sizes
   rather than separate pixel constants buried in the historical Game UI.
   The existing responsive player-prop column structure is preserved. */
.app-shell.broadcast-shell .gb2-root .gb2-page-head h1{
 font-size:var(--tso-heading-size);
}
.app-shell.broadcast-shell .gb2-root .gb2-hero-team h2{
 font-size:clamp(20px,calc(var(--tso-heading-size) * .9),48px);
}
.app-shell.broadcast-shell .gb2-root .gb2-panel>header h3{
 font-size:clamp(14px,calc(var(--tso-heading-size) * .57),34px);
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-page-head p,.gb2-team-row>strong,.gb2-compare-row,.mi-player-body){
 font-size:var(--tso-body-size);
}
.app-shell.broadcast-shell .gb2-root :is(.mi-player-label>b,.mi-selection-brief b){
 font-size:calc(var(--tso-body-size) + 1px);
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-hero,.mi-player-body){
 padding:var(--tso-card-padding);
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-detail,.mi-evidence-layout){
 gap:var(--tso-grid-gap);
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-back,.gb2-live,.gb2-dock button,.mi-add,.mi-filters button){
 min-height:var(--tso-button-height);
 border-radius:var(--r-sm);
}
@media(max-width:720px){
 .app-shell.broadcast-shell .gb2-root :is(.gb2-hero,.mi-player-body){
  padding:min(var(--tso-card-padding),20px);
 }
}
/* Owner Admin shortcut keeps the original TSO action-card language. */
.app-shell.broadcast-shell .tso-admin-shortcuts>.tso-theme-shortcut{
 padding:15px;border:1px solid var(--line-strong);background:var(--card);
 color:var(--text);text-align:left;font-size:13px;font-weight:800;
 display:flex;flex-direction:column;gap:6px;cursor:pointer;border-radius:var(--r-sm);
}
.app-shell.broadcast-shell .tso-admin-shortcuts>.tso-theme-shortcut:hover{
 border-color:var(--blue);
}
.app-shell.broadcast-shell .tso-admin-shortcuts>.tso-theme-shortcut small{
 font-weight:500;color:var(--muted);font-size:11px;
}
/* TSO2_APPROVED_OUTPOST_SHARED_CHROME_V1
 * The APPROVED broadcast shell and Home page (black/orange/gold) is the
 * canonical skin. Blue remains available only for informative model/data
 * encodings, not unrelated Games or Research user-interface chrome.
 * These are semantic shared components, not one-off page theme inventions.
 */
.app-shell.broadcast-shell .broadcast-main{
 width:100%;
 max-width:var(--tso-page-max);
 padding-inline:min(var(--tso-page-gutter),4vw);
}
.app-shell.broadcast-shell :is(.broadcast-title,.decision-intro,.gb2-page-head,.tso-sim-hero){
 border-color:var(--line);
 color:var(--text);
}
.app-shell.broadcast-shell :is(.orange-kicker,.broadcast-kicker,.research-kicker,
 .edge2-kicker,.gb2-page-head>div>small,.tso-sim-kicker){
 color:var(--outpost-orange);
}
.app-shell.broadcast-shell :is(.gold-kicker,.feature-label,.research-detail-hero small,
 .gb2-hero>small,.gb2-panel>header small,.mi-game-vault-header small,
 .mi-ranked-head small,.mi-read-title>b,.mi-signal-detail-head small){
 color:var(--outpost-gold);
}
.app-shell.broadcast-shell :is(.broadcast-cta,.tso-sim-control-primary,.gb2-dock button,
 .mi-add,.button.primary,.tso-admin-form-bottom button){
 background:var(--tso-primary-btn);
 border-color:var(--tso-primary-btn);
 color:var(--tso-btn-text);
 box-shadow:none;
 border-radius:var(--r-sm);
}
.app-shell.broadcast-shell :is(.gb2-live,.gb2-back,.mi-filters button,
 .button.secondary,.filter-button,.edge2-league-tab){
 background:var(--tso-secondary-btn);
 border:1px solid var(--line-strong);
 color:var(--text);
 border-radius:var(--r-sm);
}
.app-shell.broadcast-shell :is(.tso-side-item.is-active,.tso-side-sports button.is-active){
 border-color:var(--line-strong);
 background:var(--tso-nav-active);
 color:var(--text);
}
.app-shell.broadcast-shell .tso-side-item.is-active::before{
 background:var(--outpost-orange);
}
.app-shell.broadcast-shell :is(.feature-game,.heat-panel,.broadcast-model-card,
 .slate-card,.concept-model-card,.concept-pick-row,
 .research-radar-card,.research-trending-card,.research-signal-card,
 .research-recent-card,.research-detail-panel,.research-detail-hero,
 .model-spotlight-card,.edge2-market,.edge2-hero,.tso-sim-main,
 .tso-sim-matchups,.tso-sim-outlook,.tso-sim-replay,.tso-sim-final,
 .tso-sim-players,.tso-sim-dvp,.tso-sim-injury-audit){
 background:var(--card);
 border-color:var(--line-strong);
 border-radius:var(--r);
 color:var(--text);
}
.app-shell.broadcast-shell :is(.tso-sim-player,.tso-sim-game-choice,
 .edge2-league-tab,.mi-team,.mi-player,.mi-chart-panel,
 .mi-signal-factor,.gb2-root .edge2-market){
 background:var(--surface);
 border-color:var(--line-strong);
 color:var(--text);
 border-radius:var(--r-sm);
}
.app-shell.broadcast-shell :is(.tso-sim-outlook .tso-sim-prob-row,
 .tso-sim-stat-heading,.mi-form-metrics,.mi-player-body,.mi-evidence-layout){
 border-color:var(--line);
}
.app-shell.broadcast-shell :is(.gb2-root,.edge2-page,.tso-sim-page,
 .research-page,.models-page,.decision-page,.tso-admin-page){
 max-width:var(--tso-page-max);
 color:var(--text);
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-tabs button.is-active,
 .mi-filters button.is-active,.gb2-team-spread,.gb2-card-arrow,
 .mi-ranking-status,.gb2-card-bottom>div:first-child>b){
 color:var(--outpost-gold);
 border-color:var(--outpost-orange);
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-league,.gb2-hero-center strong,
 .gb2-hero-team em,.gb2-compare-row .is-best,.mi-line-model>b,
 .mi-line-odds>b,.mi-signal-kicker){
 color:var(--outpost-gold);
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-tabs button:hover,.mi-filters button.is-active,
 .mi-signal-mini,.gb2-logo){
 background:color-mix(in srgb,var(--outpost-orange) 9%,var(--surface));
 border-color:color-mix(in srgb,var(--outpost-orange) 25%,var(--line));
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-card,.gb2-hero,.gb2-panel,.gb2-dock,
 .mi-game-vault-header,.mi-ranked){
 background:var(--card);
 border-color:var(--line-strong);
 color:var(--text);
}
.app-shell.broadcast-shell .gb2-root :is(.gb2-logo,.mi-team,.mi-player,
 .mi-chart-panel,.mi-read-signal,.mi-player-defender,.edge2-market){
 background:var(--surface);
 border-color:var(--line-strong);
}
.app-shell.broadcast-shell .gb2-root .edge2-market::before,
.app-shell.broadcast-shell .gb2-root .edge2-market--moneyline::before,
.app-shell.broadcast-shell .gb2-root .edge2-market--total::before{
 background:var(--outpost-orange);
}
.app-shell.broadcast-shell .gb2-root :is(.mi-prob>b,.mi-add,.gb2-dock button){
 background:var(--tso-primary-btn);
 color:var(--tso-btn-text);
 border-color:var(--tso-primary-btn);
}
.app-shell.broadcast-shell .gb2-root :is(.mi-line-model,.mi-line-odds,
 .mi-signal-factor,.mi-selection-brief>span){
 background:var(--surface);border-color:var(--line-strong);
 border-radius:var(--r-sm);
}
@media(max-width:900px){
 .app-shell.broadcast-shell .broadcast-main{
  padding-inline:min(var(--tso-page-gutter),4vw);
 }
}
/* Simulation is a sport-specific visualization, not a separate green UI skin.
 * Keep field graphics, positive/negative signals and team identifiers meaningful.
 * Only shell/card/control surfaces are brought into the Outpost palette. */
.app-shell.broadcast-shell .tso-sim-page{
 --sim-bg:var(--bg);--sim-line:var(--line-strong);--sim-ink:var(--text);
 --sim-cool:var(--muted);--sim-amber:var(--outpost-orange);
 --sim-green:var(--green);
 background:transparent;color:var(--text);
 padding-inline:min(var(--tso-page-gutter),4vw);
}
.app-shell.broadcast-shell .tso-sim-page :is(.tso-sim-hero-pill,.tso-sim-disclosure,
 .tso-sim-matchups-head,.tso-sim-prob-row,.tso-sim-scoreboard,
 .tso-sim-scoreclock,.tso-sim-commentary,.tso-sim-final,
 .tso-sim-players,.tso-sim-game-choice,.tso-sim-dvp){
 background:var(--card);border-color:var(--line-strong);
 color:var(--text);border-radius:var(--r-sm);
}
.app-shell.broadcast-shell .tso-sim-page :is(.tso-sim-outlook,.tso-sim-replay,.tso-sim-injury-audit){
 background:var(--card);border-color:var(--line-strong);color:var(--text);
}
.app-shell.broadcast-shell .tso-sim-page :is(.tso-sim-game-choice.is-active,.tso-sim-hero-pill){
 border-color:var(--outpost-orange);
}
.app-shell.broadcast-shell .tso-sim-page :is(.tso-sim-kicker,.tso-sim-game-title small,.tso-sim-matchups-head b,
 .tso-sim-outlook-bridge b,.tso-sim-side-name){
 color:var(--outpost-orange);
}
.app-shell.broadcast-shell .tso-sim-page :is(.tso-sim-hero h1,.tso-sim-game-title h2,.tso-sim-outlook-team strong){
 color:var(--text);
}
.app-shell.broadcast-shell .tso-sim-page :is(.tso-sim-matchups-head,
 .tso-sim-outlook-team small,.tso-sim-outlook-team span,
 .tso-sim-game-title p,.tso-sim-disclosure){
 color:var(--muted);
}
.app-shell.broadcast-shell .tso-sim-page :is(.tso-sim-controls button,.tso-sim-speed select){
 color:var(--text);background:var(--tso-secondary-btn);
 border:1px solid var(--line-strong);border-radius:var(--r-sm);
 min-height:var(--tso-button-height);
}
.app-shell.broadcast-shell .tso-sim-page .tso-sim-controls .tso-sim-control-primary{
 color:var(--tso-btn-text);background:var(--tso-primary-btn);
 border-color:var(--tso-primary-btn);
}
.app-shell.broadcast-shell .tso-sim-page :is(.tso-sim-seeker input,.tso-sim-controls input){
 accent-color:var(--outpost-orange);
}
/* Theme Studio is part of the SAME design system */
.tso-theme-studio{max-width:var(--tso-page-max);margin:auto;padding:20px var(--tso-page-gutter) 75px;color:var(--text)}
.tso-theme-header{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap}
.tso-theme-kicker{font-weight:900;letter-spacing:.13em;font-size:10px;color:var(--blue-2)}
.tso-theme-header h1{font-size:clamp(25px,2.6vw,38px);margin:7px 0;letter-spacing:-.03em;color:var(--text)}
.tso-theme-header p{color:var(--muted);margin:5px 0 14px;max-width:740px;font-size:13px}
.tso-theme-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tso-theme-studio button{cursor:pointer}
.tso-theme-studio button:disabled{opacity:.5;cursor:wait}
.tso-theme-btn{border:1px solid var(--line-strong);background:var(--elev);color:var(--text);border-radius:var(--r-sm);min-height:37px;padding:8px 13px;font-weight:800;font-size:11px}
.tso-theme-btn.primary{background:var(--tso-primary-btn);border-color:var(--tso-primary-btn);color:var(--tso-btn-text)}
.tso-theme-btn.danger{color:var(--red)}
.tso-theme-tabs{display:flex;gap:4px;padding:5px;border:1px solid var(--line);background:var(--card);border-radius:var(--r-sm);width:max-content;max-width:100%;overflow:auto;margin:13px 0}
.tso-theme-tabs button{border:0;border-radius:8px;background:transparent;color:var(--muted);padding:10px 15px;font-size:12px;font-weight:800;white-space:nowrap}
.tso-theme-tabs button[aria-selected="true"]{background:var(--elev);color:var(--text);box-shadow:inset 0 -2px var(--blue)}
.tso-theme-status{color:var(--muted);font-size:12px;min-height:26px;margin:8px 0}
.tso-theme-status.is-good{color:var(--green)}.tso-theme-status.is-error{color:var(--red)}
.tso-theme-main{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(290px,.8fr);gap:var(--tso-grid-gap);align-items:start}
.tso-theme-pane,.tso-theme-preview,.tso-theme-advanced{border:1px solid var(--line-strong);background:var(--card);border-radius:var(--r);min-width:0}
.tso-theme-pane-head{padding:17px 18px;border-bottom:1px solid var(--line)}
.tso-theme-pane-head h2{font-size:17px;margin:0 0 5px;color:var(--text)}
.tso-theme-pane-head p{font-size:11px;line-height:1.5;color:var(--muted);margin:0}
.tso-theme-controls{padding:15px 18px;display:grid;gap:16px;max-height:calc(100vh - 270px);overflow:auto}
.tso-theme-category h3{font-size:12px;letter-spacing:.08em;color:var(--blue-2);margin:7px 0 12px;border-bottom:1px solid var(--line);padding-bottom:9px}
.tso-theme-category-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tso-theme-field{display:flex;flex-direction:column;gap:6px;min-width:0;padding:10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface)}
.tso-theme-field>label{font-size:11px;color:var(--text);font-weight:800}
.tso-theme-field>small{font-size:9px;color:var(--muted);word-break:break-word}
.tso-theme-field-row{display:flex;align-items:center;gap:7px}
.tso-theme-field :is(input[type="text"],input[type="number"],select){width:100%;min-width:0;min-height:35px;color:var(--text);background:var(--elev);border:1px solid var(--line-strong);border-radius:8px;padding:7px 9px;font:12px/1.2 inherit}
.tso-theme-field input[type="color"]{width:38px;height:35px;flex:none;padding:2px;cursor:pointer;border:1px solid var(--line-strong);border-radius:8px;background:var(--elev)}
.tso-theme-field button{border:0;background:transparent;color:var(--muted);padding:5px;font-size:13px}
.tso-theme-field.is-edited{border-color:var(--blue)}
.tso-theme-search{width:100%;border:1px solid var(--line-strong);border-radius:9px;background:var(--elev);padding:10px 12px;color:var(--text);font-size:12px;margin-top:11px}
.tso-theme-preview{position:sticky;top:83px;overflow:hidden}
.tso-theme-preview-inner{padding:16px;background:var(--bg)}
.tso-theme-mini-nav{display:grid;grid-template-columns:95px 1fr;min-height:205px;border:1px solid var(--line-strong);border-radius:12px;overflow:hidden}
.tso-theme-mini-sidebar{background:var(--tso-sidebar-bg);padding:13px 9px;border-right:1px solid var(--line)}
.tso-theme-mini-sidebar b{color:var(--outpost-gold);font-size:11px}
.tso-theme-mini-sidebar span{display:block;margin-top:13px;color:var(--muted);font-size:10px;padding:6px}
.tso-theme-mini-sidebar span.is-on{background:var(--tso-nav-active);color:var(--text);border-left:2px solid var(--outpost-orange)}
.tso-theme-mini-content{background:var(--bg);min-width:0}
.tso-theme-mini-content>header{background:var(--tso-header-bg);padding:10px;color:var(--muted);font-size:10px;border-bottom:1px solid var(--line)}
.tso-theme-mini-card{margin:12px;padding:12px;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--card)}
.tso-theme-mini-card>small{font-size:10px;color:var(--blue-2)}
.tso-theme-mini-card h4{margin:7px 0 8px;color:var(--text);font-size:14px}
.tso-theme-mini-card p{margin:0 0 10px;color:var(--muted);font-size:10px}
.tso-theme-mini-card button{background:var(--tso-primary-btn);color:var(--tso-btn-text);border:0;border-radius:var(--r-sm);padding:8px;font-size:10px}
.tso-theme-swatch-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:12px}
.tso-theme-swatch-grid>div{height:37px;border:1px solid var(--line-strong);border-radius:7px}
.tso-theme-preview-help{color:var(--muted);font-size:11px;line-height:1.5;margin:13px 0 0}
.tso-theme-advanced{padding:0 0 18px}
.tso-theme-advanced-body{padding:16px;display:grid;gap:10px}
.tso-theme-advanced textarea{background:var(--surface);border:1px solid var(--line-strong);border-radius:8px;padding:12px;color:var(--text);font:12px/1.55 ui-monospace,monospace;min-height:180px;width:100%;resize:vertical}
.tso-theme-advanced textarea[data-theme-css]{min-height:240px}
.tso-theme-advanced label{font-size:11px;color:var(--text);font-weight:850}
.tso-theme-rule-search{display:flex;gap:9px}.tso-theme-rule-search input{min-width:0;flex:1;background:var(--elev);border:1px solid var(--line-strong);color:var(--text);padding:10px;border-radius:8px}
.tso-theme-rule-result{display:grid;gap:5px}
.tso-theme-rule-result article{border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--surface);font-size:11px}
.tso-theme-rule-result code{color:var(--blue-2);white-space:normal;word-break:break-word}
.tso-theme-rule-result pre{color:var(--muted);white-space:pre-wrap;word-break:break-word;max-height:120px;overflow:auto;font-size:10px}
.tso-theme-history{display:grid;gap:8px;padding:15px}
.tso-theme-history article{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:9px}
.tso-theme-history article span{font-size:11px;color:var(--muted)}
.tso-theme-hidden{display:none!important}
@media(max-width:980px){.tso-theme-main{grid-template-columns:1fr}.tso-theme-preview{position:static}.tso-theme-controls{max-height:none}}
@media(max-width:610px){.tso-theme-studio{padding:14px 10px 45px}.tso-theme-category-fields{grid-template-columns:1fr}.tso-theme-preview{max-width:100%}.tso-theme-tabs{width:100%}.tso-theme-tabs button{flex:1;padding:10px 7px}.tso-theme-header{display:block}}
