/* Guided builder presentation. Never loaded by the PNG renderer or other card hosts. */
.th.gb { padding-top:28px; padding-bottom:32px; }
.th.gb [hidden] { display:none !important; }
.th.gb button,.th.gb input,.th.gb select,.th.gb textarea { font:inherit; }
.th.gb button { cursor:pointer; }
.th.gb button:focus-visible,.th.gb [role=button]:focus-visible,.th.gb summary:focus-visible,.th.gb input:focus-visible,.th.gb select:focus-visible,.th.gb textarea:focus-visible { outline:2px solid var(--th-focus-color); outline-offset:3px; }
.gb svg { height:17px; width:17px; flex:none; }
.gb .gb-hero { position:relative; display:flex; align-items:center; min-height:210px; padding:28px 34px; border:1px solid var(--th-gold-line); border-radius:20px; background:radial-gradient(ellipse at 85% 50%,var(--th-gold-faint),transparent 58%),var(--th-surface-1); box-shadow:inset 0 0 0 5px var(--th-surface-1),inset 0 0 0 6px var(--th-gold-faint),var(--th-shadow-1); }
.gb .gb-hero h1 { font-size:42px; margin:0; letter-spacing:-.025em; }
.gb .gb-hero-art { position:absolute; right:4%; bottom:-10px; height:230px; width:280px; object-fit:contain; pointer-events:none; filter:var(--th-art-drop); }
.gb .gb-hero-copy-main { max-width:calc(100% - 270px); }
.gb .gb-hero > div { position:relative; }
.gb .gb-hero .th-kicker { font-size:10px; margin:0 0 7px; }
.gb .gb-hero p:not(.th-kicker) { color:var(--th-ink-3); font-size:13px; margin:8px 0 0; }
.gb .gb-top-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:20px; }
.gb .th-btn { font-size:13px; min-height:40px; }
.gb .gb-steps { position:sticky; top:var(--th-sticky-top); z-index:15; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin:23px 0; padding:5px; border:1px solid var(--th-line-2); border-radius:16px; background:var(--th-surface-sunk); box-shadow:var(--th-shadow-1); }
.gb .gb-steps b { font-weight:600; }
.gb .gb-steps small { display:block; margin-top:4px; font-weight:400; font-size:11px; color:var(--th-ink-3); }
.gb .gb-steps button { display:flex; align-items:center; gap:12px; padding:10px 16px; border:1px solid transparent; border-radius:11px; background:none; color:var(--th-ink-3); text-align:left; font-size:13px; }
.gb .gb-steps button > span { display:grid; place-items:center; height:26px; width:26px; border:1px solid var(--th-line-2); border-radius:50%; font-size:10px; }
.gb .gb-steps [aria-current=step] { background:var(--th-surface-2); border-color:var(--th-line-2); color:var(--th-ink); font-weight:700; }
.gb .gb-steps [aria-current=step] > span { background:var(--th-sel-bg); color:var(--th-sel-ink); border-color:transparent; }
.gb .gb-step-label { margin:0 0 10px; font-size:10px; }
.gb .tb-panel-head h2 { scroll-margin-top:calc(var(--th-sticky-top) + 99px); }
.gb .gb-grid { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:22px; align-items:start; }
.gb .team-builder-main.gb-stage { display:block; max-width:none; min-width:0; min-height:480px; padding:0; margin:0; }
.gb .gb-stage > .tb-panel { display:block; padding:27px; margin:0; border:1px solid var(--th-line-2); border-top-color:var(--th-gold-line); border-radius:16px; background:var(--th-surface-1); box-shadow:var(--th-shadow-1); }
.gb .gb-stage > .tb-panel > .tb-panel-head { padding:0; margin:0 0 24px; cursor:default; border:0; }
.gb .tb-panel-head h2 { font-family:"CookieRun KR",sans-serif; font-size:29px; color:var(--th-heading); }
.gb .tb-panel-note { color:var(--th-ink-3); font-size:13px; line-height:1.6; max-width:640px; }
.gb .gb-stage > .tb-panel > .tb-panel-head::after { display:none; }
.gb .tb-type-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.gb .gb-mode-card { display:flex; align-items:center; gap:13px; position:relative; min-width:0; min-height:96px; padding:10px 14px 10px 8px; text-align:left; border:1px solid var(--th-line-2); border-radius:12px; background:var(--th-wash); color:var(--th-ink); box-shadow:0 3px 0 var(--th-ledge); transition:background .16s,border-color .16s,transform .16s; }
.gb .gb-mode-art { position:relative; flex:none; width:70px; height:70px; border-radius:10px; background:radial-gradient(ellipse,var(--th-gold-faint),transparent 72%); }
.gb .gb-mode-art img { position:absolute; inset:0; width:100%; height:100%; max-height:100%; object-fit:contain; filter:var(--th-art-drop); }
.gb .gb-mode-copy { min-width:0; flex:1; }
.gb .gb-mode-copy strong { display:block; font:700 16px/1.3 "CookieRun KR",sans-serif; }
.gb .gb-mode-copy small { display:block; margin-top:6px; font-size:12px; line-height:1.4; color:var(--th-ink-3); }
.gb .gb-mode-arrow { flex:none; color:var(--th-ink-3); }
.gb .gb-mode-card.is-active { background:var(--th-surface-2); border-color:var(--th-focus-color); }
.gb .gb-mode-card.is-active .gb-mode-arrow { color:var(--th-link); }
.gb .gb-mode-card:hover { background:var(--th-surface-2); border-color:var(--th-focus-color); transform:translateY(-2px); }
.gb .tb-chip { color:var(--th-ink-2); border:1px solid var(--th-line-2); background:var(--th-btn-bg); border-radius:999px; box-shadow:none; font-size:13px; padding:11px 16px; text-shadow:none; }
.gb .tb-type-row .tb-chip { min-height:62px; padding:14px 18px; border-radius:14px; font-family:"CookieRun KR",sans-serif; text-align:left; }
.gb .tb-chip.is-active,.gb .tb-chip[aria-pressed=true] { color:var(--th-sel-ink); background:var(--th-sel-bg); border-color:transparent; box-shadow:var(--th-sel-shadow); }
.gb .tb-type-row .tb-chip.is-active { color:var(--th-ink); background:var(--th-surface-2); border-color:var(--th-focus-color); }
.gb .gb-context,.gb .gb-rules { padding:0; margin:0 0 18px; border:1px solid var(--th-line-2); border-radius:12px; background:var(--th-wash); }
.gb .gb-context > summary,.gb .gb-rules > summary { display:flex; justify-content:space-between; gap:10px; padding:12px 15px; cursor:pointer; color:var(--th-ink-2); font-size:12px; }
.gb #tbGuidedContextBody,.gb #tbGuidedRulesBody { padding:0 15px 15px; }
.gb .tb-context-wrap,.gb .tb-other-wrap { margin:0; padding:0; border:0; background:none; }
.gb .tb-context-label { font-size:12px; color:var(--th-ink-3); }
.gb .tb-context-row { gap:8px; }
.gb .tb-floors { margin-top:12px; padding-top:12px; border-top:1px solid var(--th-line-2); }
.gb .tb-floors .tb-context-label em { font-style:normal; font-weight:500; color:var(--th-ink-3); text-transform:none; letter-spacing:0; }
.gb .tb-floors .tb-context-hint { color:var(--th-ink-3); font-size:12px; }
.gb .tb-season-wrap[data-pending] { min-height:0; }
.gb .gb-lineup,.gb .gb-review { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:30px 16px; padding-top:20px; }
.gb .gb-plate { position:relative; display:grid; grid-template-columns:112px minmax(0,1fr); grid-template-rows:1fr auto; padding:0; color:var(--th-ink); text-align:left; border:1px solid var(--th-plate-edge); border-radius:15px; background:linear-gradient(115deg,rgba(var(--th-el),.3),rgba(var(--th-el),.06) 58%,transparent),linear-gradient(var(--th-plate-1),var(--th-plate-2)); box-shadow:inset 0 0 0 3px rgba(var(--th-plate-ring-rgb),.45),inset 0 0 0 4px rgba(var(--th-el),.28),var(--th-shadow-1); }
.gb .gb-plate::before,.gb .gb-plate::after { content:""; position:absolute; z-index:3; height:7px; width:7px; transform:rotate(45deg); background:var(--th-gold-gem); box-shadow:0 0 0 1px var(--th-plate-gem-edge); pointer-events:none; }
.gb .gb-plate::before { top:-4px; right:23px; }
.gb .gb-plate::after { bottom:-4px; left:23px; }
.gb .gb-art-stage { display:block; position:relative; min-height:126px; border-radius:14px 0 0 0; border-right:1px solid rgba(var(--th-el),.35); background:radial-gradient(ellipse at 50% 70%,rgba(var(--th-el),.5),transparent 75%); clip-path:inset(-42px 0 0 -12px); }
.gb .gb-cookie-art { position:absolute; bottom:1px; left:var(--th-ax,50%); height:calc(100% + 30px); width:auto; max-width:none; transform-origin:50% 100%; transform:translate(-50%,var(--th-ay,0%)) scale(var(--th-as,1)); filter:var(--th-art-drop); }
.gb .gb-plate-copy { display:flex; flex-direction:column; gap:9px; min-width:0; padding-bottom:13px; }
.gb .gb-plate-copy > strong { display:block; padding:9px 11px 8px; border-radius:0 13px 0 0; background:linear-gradient(90deg,rgba(var(--th-el),var(--th-el-band)),rgba(var(--th-el),.07)); border-bottom:1px solid var(--th-gold-line); font-family:"CookieRun KR",sans-serif; font-weight:700; font-size:16px; line-height:1.25; color:var(--th-heading); overflow-wrap:anywhere; }
.gb .gb-rarity { display:block; margin-left:11px; line-height:1; }
.gb .gb-rarity img { display:block; height:15px; width:auto; max-width:100%; object-fit:contain; }
.gb .gb-traits { display:flex; flex-wrap:wrap; gap:7px 11px; margin-left:11px; padding-right:8px; color:var(--th-ink-2); font-size:11px; font-weight:500; }
.gb .gb-traits > span { display:inline-flex; align-items:center; gap:5px; }
.gb .gb-traits img { height:16px; width:16px; object-fit:contain; }
.gb .gb-elements { position:absolute; left:7px; bottom:7px; top:7px; z-index:2; display:flex; flex-direction:column-reverse; flex-wrap:wrap; align-content:start; gap:3px; pointer-events:none; }
.gb .gb-elements img { display:block; height:24px; width:24px; object-fit:contain; filter:var(--th-art-drop); }
.gb .gb-elements[data-count="5"] img { height:19px; width:19px; }
.gb .gb-plate-foot { grid-column:1/-1; display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:30px; padding:6px 12px; background:var(--th-surface-sunk); color:var(--th-ink-3); border-top:1px solid var(--th-gold-line); border-radius:0 0 14px 14px; font-size:10px; }
.gb .gb-plate-foot > span:last-child { display:flex; align-items:center; gap:7px; color:var(--th-ink-2); }
.gb .gb-plate-foot svg { height:11px; width:11px; }
.gb .gb-plate--empty { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:8px; min-height:138px; background:var(--th-wash); border:1px dashed var(--th-line-3); box-shadow:none; color:var(--th-ink-2); }
.gb button.gb-plate { transition:transform .16s,border-color .16s; }
.gb button.gb-plate:hover { transform:translateY(-2px); border-color:var(--th-focus-color); }
.gb .gb-plate--empty::before,.gb .gb-plate--empty::after { display:none; }
.gb .gb-plate--empty small { color:var(--th-ink-3); }
.gb .gb-add { display:grid; place-items:center; height:34px; width:34px; border:1px dashed var(--th-line-3); border-radius:50%; color:var(--th-gold); }
.gb .gb-dark-art .gb-cookie-art { filter:drop-shadow(0 0 1px var(--th-ink-2)) drop-shadow(0 0 10px rgba(var(--th-el),.75)) brightness(1.15); }
.gb .gb-recipe { display:flex; align-items:center; gap:5px; padding:0 11px; font-size:11px; line-height:1.4; color:var(--th-ink-2); }
.gb .gb-recipe > img { flex:none; width:22px; height:22px; object-fit:contain; }
.gb .gb-recipe > span { min-width:0; }
.gb .gb-recipe small { display:block; margin-top:3px; color:var(--th-ink-3); font-size:10px; }
.gb .gb-loadout { display:flex; align-items:center; gap:20px; padding:15px; margin-top:24px; border:1px solid var(--th-line-2); border-radius:13px; background:var(--th-wash); }
.gb .gb-leader,.gb .gb-treasures { display:flex; align-items:center; gap:12px; min-width:0; }
.gb .gb-leader { flex:1; }
.gb .gb-leader button { min-width:0; font-size:11px; white-space:normal; }
.gb .gb-leader img { height:30px; width:30px; object-fit:contain; }
.gb .gb-treasures > div { display:flex; flex-wrap:wrap; gap:6px; }
.gb .gb-treasures button { height:40px; width:40px; padding:2px; color:var(--th-ink-2); background:var(--th-field-bg); border:1px solid var(--th-line-2); border-radius:10px; }
.gb .gb-treasures img { width:100%; height:100%; object-fit:contain; }
.gb .gb-team-tabs { display:flex; gap:8px; margin-bottom:22px; }
.gb .gb-team-tabs button { flex:1; gap:9px; font-size:12px; }
.gb .gb-team-tabs button > span { font-size:10px; }
.gb .gb-team-tabs [aria-pressed=true] { background:var(--th-sel-bg); color:var(--th-sel-ink); }
.gb .gb-cookie-tabs { display:grid; grid-template-columns:repeat(auto-fit,minmax(65px,1fr)); gap:8px; margin-bottom:28px; }
.gb .gb-cookie-tabs button { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; gap:7px; padding:10px 6px; color:var(--th-ink-3); background:var(--th-wash); border:1px solid var(--th-line-2); border-radius:12px; }
.gb .gb-cookie-tabs button[aria-pressed=true] { background:var(--th-surface-2); color:var(--th-ink); border-color:var(--th-focus-color); }
.gb .gb-cookie-tabs img { width:32px; height:32px; object-fit:cover; border-radius:8px; }
.gb .gb-cookie-tabs span { max-width:100%; font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gb .gb-step-actions { display:flex; justify-content:space-between; gap:12px; margin-top:25px; padding-top:20px; border-top:1px solid var(--th-line-2); }
.gb .gb-step-actions:empty { display:none; }
.gb .gb-action-hint { align-self:center; color:var(--th-ink-3); font-size:11px; text-align:center; }
.gb .gb-overview { position:sticky; top:calc(var(--th-sticky-top) + 96px); min-width:0; background:var(--th-surface-1); border:1px solid var(--th-line-2); border-radius:16px; overflow:hidden; }
.gb .gb-overview summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:21px 20px 17px; cursor:pointer; }
.gb .gb-overview summary strong { display:block; margin-top:6px; font-family:"CookieRun KR",sans-serif; font-size:21px; color:var(--th-heading); overflow-wrap:anywhere; }
.gb .gb-overview-count { color:var(--th-ink-2); font-size:15px; text-align:right; flex:none; }
.gb .gb-overview-count > span { display:block; font-size:10px; margin-top:3px; color:var(--th-ink-3); }
.gb .gb-overview-count svg { display:none; }
.gb .gb-overview-body { padding:0 20px 20px; }
.gb .gb-overview-body > p { color:var(--th-ink-3); font-size:12px; }
.gb .gb-overview-mode { display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid var(--th-line-2); padding-bottom:14px; font-size:12px; }
.gb .gb-overview-team { display:block; width:100%; padding:12px; margin-top:10px; text-align:left; color:var(--th-ink-2); background:var(--th-wash); border:1px solid var(--th-line-2); border-radius:11px; }
.gb .gb-overview-team[aria-pressed=true] { border-color:var(--th-focus-color); }
.gb .gb-overview-team > span:first-child { display:flex; justify-content:space-between; font-size:12px; }
.gb .gb-overview-team small { color:var(--th-ink-3); }
.gb .gb-faces { display:flex; flex-wrap:wrap; gap:8px; padding-top:12px; }
.gb .gb-faces img,.gb .gb-faces > span { display:grid; place-items:center; height:28px; width:28px; border-radius:7px; object-fit:cover; background:var(--th-surface-3); }
.gb .gb-private { line-height:1.7; margin:18px 0 0; }
.gb .gb-build-facts { margin:18px 0; font-size:12px; }
.gb .gb-build-facts > div { display:flex; justify-content:space-between; gap:12px; margin-top:10px; }
.gb .gb-build-facts dt { color:var(--th-ink-3); }
.gb .gb-build-facts dd { margin:0; font-variant-numeric:tabular-nums; }
.gb .gb-guide-note { display:flex; align-items:start; gap:9px; padding-top:18px; border-top:1px solid var(--th-gold-line); }
.gb .gb-guide-note > svg { color:var(--th-gold); }
.gb .gb-guide-note strong { color:var(--th-ink-2); font-size:12px; line-height:1.4; }
.gb .gb-guide-note p { color:var(--th-ink-3); font-size:12px; line-height:1.65; margin:7px 0 0; }
.gb .gb-library-link { width:100%; margin-top:15px; }
.gb .gb-cookie-nav { display:none; align-items:center; justify-content:space-between; gap:10px; margin:16px 0; color:var(--th-ink-3); font-size:12px; }
.gb .gb-cookie-nav > div { display:flex; gap:8px; }
.gb[data-step=build] .gb-cookie-nav { display:flex; }

/* Existing, authoritative editor controls inside the selected cookie's build. */
.gb .tb-team { --tb-fill:var(--th-surface-1); --tb-text:var(--th-ink); --tb-text-soft:var(--th-ink-2); --tb-border:var(--th-line-2); --tb-gold:var(--th-gold); --tb-tile-scale:1; font-family:"Outfit",sans-serif; }
.gb .tb-editor-host .tb-team--edit { display:block; width:100%; border:0; padding:0; background:none; box-shadow:none; }
.gb .tb-editor-host .tb-team--edit > .tb-header,.gb .tb-editor-host .tb-team--edit > .tb-notes-section { display:none; }
.gb .tb-editor-host .tb-team--edit > .tb-team-section { border:0; background:none; padding:0; margin:0; box-shadow:none; }
.gb .tb-editor-host .tb-team-grid { display:block; }
.gb .tb-editor-host .tb-team--edit .tb-cookie-tile { display:block; min-width:0; width:100%; padding:0; margin:0; background:var(--th-wash); border:1px solid var(--th-plate-edge); border-radius:15px; box-shadow:none; overflow:visible; }
.gb .tb-editor-host .tb-team--edit .tb-cookie-tile[data-gb-active=false] { display:none; }
.gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-cookie-art-wrap,.gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-cookie-name,.gb .tb-editor-host .tb-team--edit .tb-dexcard { display:none; }
.gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .gb-slot-hero { position:relative; display:grid; grid-template-columns:155px minmax(0,1fr); width:100%; max-width:none; margin:0; text-align:left; background:linear-gradient(110deg,rgba(var(--th-el),.3),rgba(var(--th-el),.04)); border-radius:14px 14px 0 0; border-bottom:1px solid var(--th-gold-line); }
.gb .tb-editor-host .gb-slot-hero > .gb-art-button { display:block; width:100%; max-width:none; height:100%; aspect-ratio:auto; padding:0; margin:0; border:0; border-radius:14px 0 0 0; background:none; box-shadow:none; overflow:visible; cursor:pointer; transform:none; }
.gb .gb-slot-hero .gb-art-stage { width:100%; height:100%; min-height:180px; }
.gb .gb-hero-copy { display:flex; flex-direction:column; align-items:start; min-width:0; gap:11px; padding:18px 20px; }
.gb .gb-hero-copy h3 { font-size:24px; margin:0; }
.gb .gb-hero-copy .gb-rarity,.gb .gb-hero-copy .gb-traits { margin-left:0; }
.gb .gb-hero-copy .th-label { font-size:10px; }
.gb .gb-hero-copy .th-btn { min-height:31px; font-size:11px; }
.gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-topping-grid { display:grid; grid-area:auto; width:auto; max-width:none; grid-template-columns:repeat(6,minmax(0,1fr)); gap:9px; padding:13px; margin:18px; border:1px solid var(--th-line-2); border-radius:12px; background:var(--th-surface-1); box-shadow:none; }
.gb .gb-field-title { margin:18px 18px -6px; font-size:15px; }
.gb .tb-editor-host .tb-team--edit .tb-topping-cell { width:100%; aspect-ratio:1; max-height:82px; border:1px solid var(--th-line-2); border-radius:10px; background:var(--th-field-bg); box-shadow:none; }
.gb .tb-editor-host .tb-topping-cell img { max-height:72px; object-fit:contain; }
.gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-beascuit-card { display:grid; grid-area:auto; grid-template-columns:80px minmax(0,1fr); grid-template-rows:auto auto auto; min-height:0; width:auto; max-width:none; padding:15px; gap:10px 15px; margin:18px; border:1px solid var(--th-line-2); border-radius:12px; background:var(--th-surface-1); box-shadow:none; }
.gb .tb-editor-host .tb-team--edit .gb-beascuit-pick { grid-row:1; grid-column:2; justify-self:start; min-height:31px; padding:0 12px; font-size:12px; }
.gb .tb-editor-host .tb-team--edit .tb-beascuit-name--overlay { position:static; display:block; grid-row:2; grid-column:2; width:auto; max-width:none; min-height:0; height:auto; aspect-ratio:auto; place-self:start; border:0; padding:0; margin:0; background:none; box-shadow:none; font-size:14px; color:var(--th-ink); text-shadow:none; text-align:left; }
.gb .tb-editor-host .tb-team--edit .tb-beascuit-card > .tb-beascuit-art-wrap { grid-row:1/3; grid-column:1; width:80px; height:80px; max-width:none; aspect-ratio:1; border:1px solid var(--th-line-2); background:var(--th-field-bg); box-shadow:none; }
.gb .tb-editor-host .tb-beascuit-step { display:none; }
.gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-beascuit-card > .tb-beascuit-effects { position:static; display:grid; grid-area:3 / 1 / 4 / -1; width:100%; max-width:none; height:auto; margin:0; padding:0; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; transform:none; }
.gb .tb-editor-host .tb-beascuit-effect { min-height:39px; height:auto; padding:8px; border:1px solid var(--th-line-2); border-radius:999px; background:var(--th-btn-bg); color:var(--th-ink-2); font-size:12px; text-shadow:none; }
.gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-detail-row { grid-area:auto; width:auto; margin:18px; padding:0; display:flex; gap:12px; }
.gb .tb-editor-host .tb-detail-frame { border:1px solid var(--th-line-2); border-radius:12px; background:var(--th-field-bg); color:var(--th-ink); box-shadow:none; }
.gb .tb-editor-host .tb-detail-title { color:var(--th-gold); font-size:11px; }
.gb .tb-editor-host .tb-ghost-chips { margin:15px 18px; }
.gb .tb-editor-host .tb-ghost-chip { min-height:40px; padding:8px 12px; border:1px dashed var(--th-line-3); color:var(--th-ink-2); border-radius:999px; background:var(--th-btn-bg); font-size:12px; }
.gb .tb-editor-host .tb-cookie-tile.is-empty { min-height:230px; padding:35px; border-style:dashed; color:var(--th-ink-2); text-align:center; }
.gb .tb-editor-host .tb-cookie-tile.is-empty .is-scaffold { display:none; }
.gb .tb-editor-host .tb-empty-slot-mark { font-size:35px; color:var(--th-gold); }
/* The shared card hangs the slot menu off the tile's top edge (-16px), but here
   the tile sits flush with the top of .tb-team, which clips (overflow:hidden),
   so the trigger was cut off and no click reached it. Inside the tile's
   top-right corner, beside the slot hero's copy, nothing else owns that spot. */
.gb .tb-editor-host .tb-tile-menu { z-index:5; top:12px; right:12px; left:auto; color:var(--th-ink-2); background:var(--th-surface-2); border-color:var(--th-line-2); font-size:20px; }
.gb .tb-editor-host .tb-imported-note { margin:12px 18px; font-size:12px; color:var(--th-ink-3); }
.gb .tb-team-block { margin:0; padding:0; border:0; background:none; }
.gb .tb-team-block-head { display:none; }
.gb .tb-team-block-body { padding:0; }
.gb .tb-team-block.is-collapsed { display:none; }
.gb .tb-team-block-body > .tb-meta-grid { margin-bottom:22px; }
.gb .tb-field-label { font-size:11px; color:var(--th-ink-3); }
.gb input,.gb textarea,.gb select { border:1px solid var(--th-line-2); background:var(--th-field-bg); border-radius:10px; color:var(--th-ink); padding:11px 13px; font-size:13px; }
.gb input::placeholder,.gb textarea::placeholder { color:var(--th-ink-3); opacity:1; }
.gb .btn-glow,.gb .tb-mini { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:9px 17px; border:0; border-radius:999px; color:var(--th-ink-2); background:var(--th-btn-bg); box-shadow:none; text-shadow:none; font-size:13px; }
.gb .tb-action-primary,.gb .tb-mini-primary { background:var(--th-gold-btn); color:var(--th-on-gold); }
.gb .tb-status { min-height:0; color:var(--th-ink-2); font-size:13px; margin:18px 0 0; }
.gb .tb-status:empty { display:none; }
.gb .tb-status.is-error { color:var(--th-down); }
.gb .tb-status.is-success { color:var(--th-up); }
.gb { --tbs-panel-bg:var(--th-surface-1); --tbs-card-bg:var(--th-surface-1); --tbs-panel-line:var(--th-line-2); --tbs-card-line:var(--th-line-2); --tbs-control-bg:var(--th-field-bg); --tbs-control-line:var(--th-line-2); --tbs-portrait-bg:var(--th-surface-2); --tbs-portrait-line:var(--th-line-2); }
.gb .tb-build-title,.gb .tb-build-title a { color:var(--th-heading); }
.gb .tb-build-meta,.gb .tb-signin-note,.gb .tb-collection-empty { color:var(--th-ink-3); }
.gb .tb-build-row { background:var(--th-surface-1); border-color:var(--th-line-2); }
.gb .tb-build-row.is-editing { border-color:var(--th-focus-color); box-shadow:0 0 0 1px var(--th-gold-faint); }
.gb .tb-build-row .tb-build-badge { background:var(--th-surface-3); color:var(--th-ink-2); border-color:var(--th-line-2); box-shadow:none; text-shadow:none; }
.gb .tb-build-menu { background:var(--th-surface-2); color:var(--th-ink); border-color:var(--th-line-2); box-shadow:var(--th-shadow-pop); }
/* Retire the legacy category wash on this route, including its pseudo-layer. */
.th.gb .tb-chip[class*="tb-cat-tone--"]::before { display:none; }
.th.gb .tb-chip[class*="tb-cat-tone--"] { background:var(--th-btn-bg); color:var(--th-ink-2); border-color:var(--th-line-2); box-shadow:none; }
.th.gb .tb-chip[class*="tb-cat-tone--"].is-active { background:var(--th-sel-bg); color:var(--th-sel-ink); border-color:transparent; }
.gb .tb-actions { gap:10px; margin-top:24px; }
.gb .tb-actions [data-action=save] { order:-1; min-width:170px; }
.gb .tb-status:not(:empty) { position:sticky; bottom:18px; z-index:16; width:fit-content; max-width:100%; padding:13px 18px; border:1px solid var(--th-line-3); border-radius:12px; background:var(--th-surface-2); box-shadow:var(--th-shadow-pop); }
.gb .tb-season-panel,.gb .tb-beacon { background:var(--th-wash); color:var(--th-ink-2); border-color:var(--th-line-2); box-shadow:none; }

/* Step visibility is presentation only; fields stay mounted and retain values. */
.gb #tbCollectionPanel,.gb #tbGuidedLineup,.gb #tbGuidedReview,.gb #tbGuidedCookieTabs,.gb #tbTeamBlocks,.gb #tbActions,.gb .gb-review-fields,.gb #tbCredit { display:none; }
.gb[data-view=build]:not([data-step=mode]) #tbDestinationPanel,.gb[data-step=mode] #tbBuilderPanel { display:none; }
.gb[data-step=cookies] #tbGuidedLineup,.gb[data-step=review] #tbGuidedReview { display:grid; }
.gb[data-step=build] #tbGuidedCookieTabs { display:grid; }
.gb[data-step=build] #tbTeamBlocks { display:block; }
.gb[data-step=review] .gb-review-fields { display:grid; margin-bottom:24px; }
.gb[data-step=review] #tbActions { display:flex; }
.gb[data-step=review] #tbCredit:not([hidden]) { display:block; margin-top:24px; }
.gb[data-view=collection] .gb-grid { grid-template-columns:1fr; margin-top:23px; }
.gb[data-view=collection] #tbDestinationPanel,.gb[data-view=collection] #tbBuilderPanel,.gb[data-view=collection] .gb-steps,.gb[data-view=collection] #tbGuidedSummary { display:none; }
.gb[data-view=collection] #tbCollectionPanel { display:block; }

/* All real pickers are viewport overlays, never sections below a roster. */
body.team-builder-page.gb-modal-open { overflow:hidden; }
body.team-builder-page .tb-picker.gb-picker { position:fixed; inset:0; width:100%; height:100%; max-width:none; margin:0; padding:20px; display:flex; justify-content:center; align-items:center; z-index:2200; background:var(--th-veil); }
body.team-builder-page .tb-picker.gb-picker[hidden] { display:none; }
body.team-builder-page .gb-picker .tb-picker-panel { display:flex; flex-direction:column; width:min(780px,100%); max-height:calc(100dvh - 40px); min-height:0; padding:22px; overflow:hidden; color:var(--th-ink); background:var(--th-surface-1); border:1px solid var(--th-gold-line); border-radius:20px; box-shadow:var(--th-shadow-pop); }
body.team-builder-page .gb-picker .tb-picker-head { flex:none; padding:0; margin:0 0 18px; }
body.team-builder-page .gb-picker h3 { color:var(--th-heading); font-size:25px; }
body.team-builder-page .gb-picker .tb-picker-close,body.team-builder-page .gb-popover-close { border:0; border-radius:50%; background:var(--th-btn-bg); color:var(--th-ink-2); width:34px; height:34px; cursor:pointer; }
body.team-builder-page .gb-picker #tbPickerSearch { flex:none; width:100%; border-radius:999px; background:var(--th-field-bg); border:1px solid var(--th-line-2); color:var(--th-ink); padding:12px 16px; font:inherit; }
body.team-builder-page #tbPicker .tb-picker-panel { width:min(880px,100%); }
body.team-builder-page #tbPicker .tb-picker-panel:has(.gb-cookie-grid) { height:820px; }
body.team-builder-page .gb-picker-filters { flex:none; margin-top:12px; padding:0 12px; max-height:34dvh; overflow:auto; border:1px solid var(--th-line-2); border-radius:12px; background:var(--th-field-bg); }
body.team-builder-page .gb-picker-filters[hidden] { display:none; }
body.team-builder-page .gb-picker-filters summary { min-height:40px; padding:10px 0; cursor:pointer; color:var(--th-ink-2); font-size:13px; font-weight:600; }
body.team-builder-page #tbPickerFilterCount { margin-left:8px; color:var(--th-ink-3); font-size:11px; font-weight:400; }
body.team-builder-page .gb-picker-filter-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:2px 0 12px; }
body.team-builder-page .gb-picker-filter-fields label { display:flex; flex-direction:column; gap:5px; color:var(--th-ink-3); font-size:11px; font-weight:600; }
body.team-builder-page .gb-picker select { min-width:0; max-width:100%; min-height:40px; padding:7px 24px 7px 9px; border:1px solid var(--th-line-2); border-radius:8px; background:var(--th-surface-1); color:var(--th-ink); font:500 12px "Outfit",sans-serif; }
body.team-builder-page .gb-picker select:focus-visible,body.team-builder-page .gb-picker-filters summary:focus-visible { outline:2px solid var(--th-focus-color); outline-offset:2px; }
body.team-builder-page .gb-picker-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; flex:none; }
body.team-builder-page .gb-picker-sort { display:flex; align-items:center; gap:8px; margin-left:auto; color:var(--th-ink-3); font-size:12px; }
body.team-builder-page .gb-picker-sort[hidden] { display:none; }
body.team-builder-page #tbPickerReset { min-height:34px; font-size:11px; }
body.team-builder-page #tbPickerReset:disabled { opacity:.45; cursor:default; }
body.team-builder-page #tbPickerResult { color:var(--th-ink-3); font-size:12px; }
body.team-builder-page .gb-picker-empty { grid-column:1/-1; text-align:center; padding:28px 14px; color:var(--th-ink-3); font-size:14px; line-height:1.7; }
body.team-builder-page .gb-picker .tb-picker-grid { min-height:0; overflow:auto; overscroll-behavior:contain; padding:18px 1px; }
body.team-builder-page .gb-picker .tb-picker-item { background:var(--th-field-bg); border:1px solid var(--th-line-2); border-radius:12px; box-shadow:none; color:var(--th-ink); }
body.team-builder-page .gb-picker .tb-picker-item.is-picked { border-color:var(--th-focus-color); background:var(--th-surface-2); }
body.team-builder-page .gb-picker .tb-picker-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:29px 13px; padding-top:25px; }
/* Compact Dex-style choices: square portraits, rarity edges, readable names.
   These are local selection buttons, so they carry no Dex navigation actions. */
body.team-builder-page .gb-picker .gb-cookie-grid { flex:1; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:14px 10px; padding:16px 3px; align-content:start; }
body.team-builder-page .gb-picker .gb-picker-cookie { position:relative; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:0; padding:4px; border:1px solid transparent; border-radius:14px; background:transparent; text-align:center; color:var(--th-ink); transition:background .15s,border-color .15s; }
body.team-builder-page .gb-picker .gb-picker-cookie:hover { background:var(--th-surface-2); border-color:var(--th-line-3); }
body.team-builder-page .gb-picker .gb-picker-cookie.is-picked { background:var(--th-gold-faint); border-color:var(--th-gold); }
body.team-builder-page .gb-picker .gb-picker-cookie:focus-visible { outline:2px solid var(--th-focus-color); outline-offset:1px; }
body.team-builder-page .gb-picker-cookie .gb-picker-face { position:relative; display:block; width:100%; aspect-ratio:1; border-radius:22%; overflow:hidden; background:var(--th-surface-3); box-shadow:var(--th-shadow-1); }
body.team-builder-page .gb-picker-cookie .gb-picker-face::after { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; box-shadow:inset 0 0 0 2px var(--th-rc,var(--th-line-3)); }
body.team-builder-page .gb-picker-cookie:is(.r-ancient,.r-beast,.r-witch) .gb-picker-face::after { box-shadow:inset 0 0 0 2px var(--th-rc),inset 0 0 0 3px var(--th-gold); }
body.team-builder-page .gb-picker .gb-picker-cookie img { box-sizing:border-box; border:0; border-radius:0; background:transparent; }
body.team-builder-page .gb-picker .gb-picker-portrait { display:block; width:100%; height:100%; object-fit:cover; }
body.team-builder-page .gb-picker .gb-picker-elements { position:absolute; top:5px; left:5px; display:flex; align-items:center; gap:1px; overflow:visible; filter:var(--th-art-drop); }
body.team-builder-page .gb-picker .gb-picker-elements img { width:18px; height:18px; object-fit:contain; }
body.team-builder-page .gb-picker-elements b { padding:2px 3px; border-radius:4px; background:var(--th-surface-1); color:var(--th-ink); font:600 9px "Outfit",sans-serif; }
body.team-builder-page .gb-picker .gb-picker-type { position:absolute; right:5px; bottom:5px; width:22px; height:22px; padding:3px; border-radius:50%; background:var(--th-surface-1); object-fit:contain; }
body.team-builder-page .gb-picker-cookie .gb-picker-name { margin-top:7px; min-height:2.4em; overflow:visible; font:700 12px/1.2 "CookieRun KR","Outfit",sans-serif; color:var(--th-heading); overflow-wrap:anywhere; text-wrap:balance; }
body.team-builder-page .gb-picker-name small { display:block; margin-top:2px; font:500 10px/1.2 "Outfit",sans-serif; color:var(--th-ink-2); }
body.team-builder-page .gb-picker-cookie .gb-picker-rarity { margin-top:3px; color:var(--th-rc-ink,var(--th-rc)); font:500 10px/1.2 "Outfit",sans-serif; }
body.team-builder-page .gb-picker-cookie .tb-picker-order { position:absolute; right:5px; top:5px; display:grid; place-items:center; width:24px; height:24px; border:1px solid var(--th-on-gold); border-radius:50%; background:var(--th-gold-btn); color:var(--th-on-gold); font:700 12px "Outfit",sans-serif; }
body.team-builder-page .gb-picker .tb-chip { border:1px solid var(--th-line-2); background:var(--th-btn-bg); color:var(--th-ink-2); border-radius:999px; padding:9px 13px; }
body.team-builder-page .gb-picker .tb-chip.is-active { color:var(--th-sel-ink); background:var(--th-sel-bg); }
body.team-builder-page .gb-picker .tb-mini { border:0; background:var(--th-btn-bg); color:var(--th-ink-2); border-radius:999px; padding:10px 15px; }
body.team-builder-page .gb-picker .tb-mini-primary { background:var(--th-gold-btn); color:var(--th-on-gold); }
body.team-builder-page .gb-picker .tb-picker-modes,body.team-builder-page .gb-picker .tb-picker-footer { flex:none; }
body.team-builder-page .gb-picker .tb-picker-hint { color:var(--th-ink-3); font-size:12px; }
body.team-builder-page .gb-picker .tb-leader-body { min-height:0; overflow:auto; overscroll-behavior:contain; }
body.team-builder-page .gb-picker .tb-leader-foot { flex:none; }
body.team-builder-page .gb-editor-scrim { position:fixed; inset:0; width:100%; height:100%; max-width:none; margin:0; padding:0; background:var(--th-veil); z-index:2199; }
body.team-builder-page .tb-popover.gb-popover { position:fixed; top:50% !important; left:50% !important; transform:translate(-50%,-50%); width:min(650px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 40px); margin:0; padding:20px; overflow:auto; z-index:2200; color:var(--th-ink); background:var(--th-surface-1); border:1px solid var(--th-gold-line); border-radius:18px; box-shadow:var(--th-shadow-pop); }
body.team-builder-page .gb-popover .tb-popover-title { color:var(--th-heading); font-family:"CookieRun KR",sans-serif; padding-right:40px; font-size:22px; }
body.team-builder-page .gb-popover-close { position:absolute; top:13px; right:13px; }
body.team-builder-page .gb-popover .tb-popover-option,body.team-builder-page .gb-popover .tb-popover-action { color:var(--th-ink-2); background:var(--th-field-bg); border:1px solid var(--th-line-2); border-radius:12px; }
body.team-builder-page .gb-popover .is-selected { border-color:var(--th-focus-color); background:var(--th-surface-2); }
body.team-builder-page .gb-popover [role=button]:focus-visible { outline:2px solid var(--th-focus-color); outline-offset:2px; }

@container th (max-width:1080px) {
 .gb .gb-grid { grid-template-columns:minmax(0,1fr) 240px; gap:18px; }
 .gb .gb-stage > .tb-panel { padding:22px; }
 .gb .gb-lineup,.gb .gb-review { gap:29px 14px; }
 .gb .gb-plate { grid-template-columns:128px minmax(0,1fr); }
 .gb .gb-loadout { display:block; }
 .gb .gb-treasures { margin-top:13px; }
 .gb .gb-cookie-tabs span { display:none; }
 .gb .gb-cookie-tabs { grid-template-columns:repeat(auto-fit,minmax(40px,1fr)); }
 .gb .gb-top-actions { flex-wrap:wrap; justify-content:start; }
 .gb .gb-steps small { display:none; }
 .gb .gb-mode-art { width:54px; height:60px; }
 .gb .gb-mode-copy strong { font-size:14px; }
 .gb .gb-mode-arrow { display:none; }
}
@container th (max-width:900px) {
 .gb .gb-lineup,.gb .gb-review { grid-template-columns:1fr; }
 .gb .tb-type-row { grid-template-columns:1fr; }
}
@container th (max-width:700px) {
 .th.gb { padding-top:20px; }
 .gb .gb-hero { display:block; min-height:0; padding:21px 18px; }
 .gb .gb-hero-art { display:block; right:3px; bottom:auto; top:4px; width:110px; height:104px; }
 .gb .gb-hero-copy-main { max-width:none; }
 .gb .gb-hero h1 { padding-right:75px; }
 .gb .gb-hero p:not(.th-kicker) { max-width:210px; }
 .gb .gb-hero h1 { font-size:30px; }
 .gb .gb-hero .th-kicker { font-size:8px; }
 .gb .gb-top-actions { margin-top:17px; flex-direction:row; align-items:center; gap:8px; }
 .gb .gb-top-actions .th-seg { display:flex; min-width:185px; }
 .gb .gb-top-actions .th-seg button { flex:1; padding:0 12px; font-size:11px; min-height:36px; white-space:nowrap; }
 .gb .gb-top-actions > .th-btn { align-self:center; font-size:11px; min-height:36px; padding:0 12px; }
 .gb .gb-steps { top:var(--th-sticky-top); margin:17px 0; gap:3px; padding:4px; }
 .gb .gb-steps button { flex-direction:column; gap:5px; padding:8px 3px; font-size:10px; }
 .gb .gb-steps button > span { height:23px; width:23px; font-size:9px; }
 .gb .gb-grid { grid-template-columns:1fr; gap:15px; }
 .gb .gb-overview { position:static; grid-row:1; border-radius:12px; }
 .gb[data-step=mode] .gb-overview { display:none; }
 .gb .gb-overview-count { display:flex; align-items:center; gap:7px; font-size:12px; }
 .gb .gb-overview-count > span { margin:0; }
 .gb .gb-overview-count svg { display:block; width:14px; }
 .gb .gb-overview details[open] .gb-overview-count svg { transform:rotate(180deg); }
 .gb .gb-overview summary { padding:13px 15px; }
 .gb .gb-overview summary strong { font-size:17px; margin-top:4px; }
 .gb .gb-overview-body { padding:0 15px 16px; }
 .gb .gb-stage > .tb-panel { padding:21px 14px; border-radius:16px; }
 .gb .tb-panel-head h2 { font-size:25px; }
 .gb .tb-panel-note { font-size:12px; }
 .gb .tb-type-row { grid-template-columns:1fr; gap:9px; }
 .gb .gb-mode-card { min-height:78px; gap:12px; padding:8px 12px; }
 .gb .gb-mode-copy strong { font-size:15px; }
 .gb .gb-mode-copy small { margin-top:4px; font-size:11px; }
 .gb .gb-mode-art { width:55px; height:55px; }
 .gb .gb-mode-arrow { display:block; }
 .gb .tb-type-row .tb-chip { min-height:50px; font-size:14px; padding:12px 15px; }
 .gb .gb-lineup,.gb .gb-review { padding-top:18px; gap:28px; }
 .gb .gb-plate { grid-template-columns:108px minmax(0,1fr); }
 .gb .gb-plate-copy > strong { font-size:15px; padding:9px; }
 .gb .gb-rarity { margin-left:9px; }
 .gb .gb-rarity img { height:14px; }
 .gb .gb-traits { margin-left:9px; font-size:10px; gap:7px 9px; }
 .gb .gb-plate-foot { font-size:9px; }
 .gb .gb-cookie-tabs { gap:6px; margin-bottom:26px; }
 .gb .gb-cookie-tabs button { padding:8px 3px; }
 .gb .gb-cookie-tabs img { width:27px; height:27px; }
 .gb .gb-team-tabs { gap:5px; }
 .gb .gb-team-tabs button { font-size:11px; padding:0 10px; gap:6px; }
 .gb .gb-loadout { padding:12px; }
 .gb .gb-leader .th-label,.gb .gb-treasures .th-label { font-size:9px; }
 .gb .gb-leader img { height:25px; width:25px; }
 .gb .gb-treasures button { height:35px; width:35px; }
 .gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .gb-slot-hero { grid-template-columns:112px minmax(0,1fr); }
 .gb .gb-hero-copy { padding:14px 11px; gap:10px; }
 .gb .gb-hero-copy h3 { font-size:18px; }
 .gb .gb-hero-copy .th-label { font-size:8px; }
 .gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-topping-grid { margin:13px; gap:6px; padding:8px; grid-template-columns:repeat(3,minmax(0,1fr)); }
 .gb .tb-editor-host .tb-team--edit .tb-topping-cell { max-height:68px; }
 .gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-beascuit-card { margin:13px; padding:12px; grid-template-columns:65px minmax(0,1fr); gap:10px; }
 .gb .tb-editor-host .tb-team--edit .tb-beascuit-card > .tb-beascuit-art-wrap { height:65px; width:65px; }
 .gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-beascuit-card > .tb-beascuit-effects { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .tb-detail-row { margin:13px; display:block; }
 .gb .tb-detail-frame + .tb-detail-frame { margin-top:12px; }
 .gb .tb-meta-grid { grid-template-columns:1fr; }
 .gb .gb-step-actions .th-btn { font-size:12px; padding:0 14px; }
 .gb .gb-action-hint { display:none; }
 .gb .gb-cookie-nav > span { font-size:10px; }
 .gb .gb-cookie-nav .th-btn { font-size:11px; padding:0 11px; }
 .gb .gb-treasures button { height:44px; width:44px; }
 .gb .gb-plate--empty { min-height:100px; flex-direction:row; justify-content:start; padding:18px; }
 .gb .gb-plate--empty small { margin-left:auto; }
 .gb .gb-plate--empty strong { font-size:14px; }
}
@container th (max-width:350px) {
 .gb .gb-plate { grid-template-columns:90px minmax(0,1fr); }
 .gb .gb-plate-copy > strong { font-size:14px; }
 .gb .gb-traits { font-size:9px; gap:6px 8px; }
 .gb .gb-traits img { width:14px; height:14px; }
 .gb .tb-editor-host .tb-team--edit .tb-cookie-tile > .gb-slot-hero { grid-template-columns:91px minmax(0,1fr); }
 .gb .gb-hero-copy h3 { font-size:16px; }
 .gb .gb-treasures { gap:8px; }
 .gb .gb-hero-art { width:90px; right:-3px; }
 .gb .gb-hero h1 { font-size:26px; }
 .gb .gb-hero .th-kicker { max-width:175px; font-size:7px; }
 .gb .gb-top-actions { gap:6px; }
 .gb .gb-top-actions .th-seg button { padding:0 10px; }
 .gb .gb-top-actions > .th-btn { font-size:10px; padding:0 9px; }
}
@media (max-width:700px) {
 body.team-builder-page .tb-picker.gb-picker { padding:10px; }
 body.team-builder-page .gb-picker .tb-picker-panel { padding:16px; max-height:calc(100dvh - 20px); border-radius:16px; }
 body.team-builder-page .gb-picker h3 { font-size:22px; }
 body.team-builder-page .gb-picker .tb-picker-grid { grid-template-columns:1fr; }
 body.team-builder-page .gb-popover .tb-popover-body { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body.team-builder-page .gb-picker-filter-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 body.team-builder-page .gb-picker-sort { flex:1 0 100%; margin-left:0; }
 body.team-builder-page .gb-picker-sort select { flex:1; }
 body.team-builder-page #tbPickerResult { flex:1; }
 body.team-builder-page #tbPickerFilterCount { font-size:10px; margin-left:4px; }
 body.team-builder-page .gb-picker .gb-cookie-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 5px; padding:12px 2px; }
 body.team-builder-page .gb-picker .gb-picker-cookie { padding:3px; }
 body.team-builder-page .gb-picker-cookie .gb-picker-name { font:600 11px/1.25 "Outfit",sans-serif; min-height:2.5em; }
 body.team-builder-page .gb-picker .gb-picker-elements img { width:15px; height:15px; }
 body.team-builder-page .gb-picker .tb-picker-close,body.team-builder-page .gb-popover-close { width:44px; height:44px; }
}
:root[data-theme="light"] .gb .tb-field input,
:root[data-theme="light"] .gb .tb-field textarea,
:root[data-theme="light"] .gb .tb-collection-sort select { background:var(--th-field-bg); color:var(--th-ink); border-color:var(--th-line-2); }
:root[data-theme="light"] .gb .tb-chip[class*="tb-cat-tone--"] { background:var(--th-btn-bg); color:var(--th-ink-2); border-color:var(--th-line-2); }
:root[data-theme="light"] .gb .tb-chip[class*="tb-cat-tone--"].is-active { background:var(--th-surface-2); color:var(--th-ink); border-color:var(--th-focus-color); }
:root[data-theme="light"] .gb .tb-team-block { background:none; }
:root[data-theme="light"] .gb .gb-mode-card.is-active { border-color:var(--th-focus-color); background:var(--th-sel-bg); color:var(--th-sel-ink); }
:root[data-theme="light"] .gb .gb-mode-card.is-active small,
:root[data-theme="light"] .gb .gb-mode-card.is-active .gb-mode-arrow { color:var(--th-sel-ink); }
/* The slot's Stat targets, Notes and Alternates frames still carry the dark
   PNG poster's ink from team-build-card.css: a dark outline and drop shadow on
   the titles and ranks, a drop shadow on every line of text, pale lavender
   hints and controls, a black glow round the Alternates panel. On the light
   field they read as blurred text and invisible controls. Light only and
   .gb only, so the dark builder and the poster keep theirs. */
:root[data-theme="light"] .gb .tb-editor-host :is(.tb-detail-title,.tb-detail-priority-rank,.tb-detail-priority-stat,.tb-detail-priority-text,.tb-detail-text,.tb-frame-title,.tb-alt-anchor-name) { -webkit-text-stroke:0; text-shadow:none; }
:root[data-theme="light"] .gb .tb-editor-host :is(.tb-detail-title,.tb-frame-title) { border-bottom-color:var(--th-line-2); }
:root[data-theme="light"] .gb .tb-editor-host .tb-frame-title { color:var(--th-gold); }
:root[data-theme="light"] .gb .tb-editor-host :is(.tb-detail-remove,.tb-row-remove) { color:var(--th-ink-3); }
:root[data-theme="light"] .gb .tb-editor-host :is(.tb-detail-remove,.tb-row-remove):hover { color:var(--th-down); background:var(--th-surface-2); }
:root[data-theme="light"] .gb .tb-editor-host :is(.tb-detail-priority-summary,.tb-alt-hint) { color:var(--th-ink-3); }
:root[data-theme="light"] .gb .tb-editor-host .tb-alt-section { box-shadow:none; }
:root[data-theme="light"] .gb .tb-editor-host .tb-alt-add { color:var(--th-ink-2); border-color:var(--th-line-3); }
:root[data-theme="light"] .gb .tb-editor-host .tb-alt-list[data-tb-action]:is(:hover,:focus-visible) .tb-alt-add { color:var(--th-ink); border-color:var(--th-focus-color); }
/* A landscape phone (or on-screen keyboard) must not squeeze the roster away.
   Let the dialog scroll as a whole, keeping Close within reach. */
@media (max-height:550px) {
 body.team-builder-page #tbPicker .tb-picker-panel { overflow:auto; overscroll-behavior:contain; }
 body.team-builder-page #tbPicker .tb-picker-head { position:sticky; top:0; z-index:2; background:var(--th-surface-1); }
 body.team-builder-page #tbPicker .tb-picker-grid { flex:none; overflow:visible; }
}
@media (prefers-reduced-motion:reduce) {
 .gb button.gb-plate,.gb .gb-mode-card,body.team-builder-page .gb-picker .gb-picker-cookie { transition:none; }
 .gb button.gb-plate:hover,.gb .gb-mode-card:hover { transform:none; }
}
