/* Shared, static decoration: no overlays, animation or input interception. */
:root{
 --orb-sheen:linear-gradient(155deg,#c9b6ef12,transparent 32%);
 --orb-stars:radial-gradient(circle at 96% 18px,#e5dcffa0 0 .7px,transparent 1.5px),radial-gradient(circle at 91% 32px,#e5dcff70 0 .6px,transparent 1.4px),radial-gradient(circle at 98% 51px,#e5dcff55 0 .6px,transparent 1.3px);
 --orb-depth:linear-gradient(115deg,#101A36 52%,#29203F);
}
#commander-table #ct-lobby,.orbunity-gate,html[data-orbunity-public] body{
 background-color:#050509;
 background-image:radial-gradient(circle at 96% 108px,#d5c5f47a 0 .8px,transparent 1.7px),radial-gradient(circle at 3% 265px,#d5c5f450 0 .6px,transparent 1.4px),radial-gradient(circle at 97% 420px,#d5c5f43d 0 .7px,transparent 1.5px),radial-gradient(ellipse at 100% 0,#7861b510,transparent 48%);
 background-repeat:no-repeat;
}
#commander-table #ct-lobby :is(.op-format-favorites,.op-format-category,.op-friend-group,.op-news-empty,.ct-offline-card,.ct-tool-grid>button),
#commander-table .ct-dialog,
:is(.op-dialog,.orbunity-cloud-dialog,.orbunity-security,.orbunity-links-panel,.orbunity-login),
html[data-orbunity-public] :is(.panel,.features section),
html[data-orbunity-utility] main>section{
 background-color:#101A36;
 background-image:var(--orb-stars),var(--orb-sheen),var(--orb-depth);
 background-repeat:no-repeat;
 border-color:#514568;
 box-shadow:inset 0 1px 0 #d5c6f527,0 4px 20px #7861b50a;
}
#commander-table #ct-lobby :is(.ct-decks-page,.ct-collection-page,.ct-profile-breakdown,.ct-history-page){
 background-image:var(--orb-stars);background-repeat:no-repeat;
}
#commander-table .ct-app-nav,#commander-table .ct-bar{
 background-image:var(--orb-sheen),linear-gradient(155deg,#0C1328,#101A36 80%,#29203F);
 box-shadow:inset 0 1px 0 #d5c6f527;
}
.orbunity-login{box-sizing:border-box;padding:26px 22px;border:1px solid #514568;border-radius:20px}
html[data-orbunity-public] .hero{background-image:var(--orb-stars);background-repeat:no-repeat}
/* Keep semantic selection and warning fills ahead of decorative surfaces. */
#commander-table #ct-lobby button:is([aria-pressed=true],[aria-selected=true]),.op-dialog button:is([aria-pressed=true],[aria-selected=true]){background-image:none!important;background-color:#E5C84A!important;color:#11142B!important}
@media(forced-colors:active){#commander-table #ct-lobby,.orbunity-gate,.orbunity-login,.op-dialog,.orbunity-cloud-dialog,.orbunity-security,html[data-orbunity-public] body{background-image:none;box-shadow:none}}
#commander-table .ct-app-nav #ct-nav-play[aria-current=page]>svg{color:#11142B}

/* V0.13 refinements: translucent selections, compact actions and a common page width. */
:root{--orb-active:#e5c84a2e;--orb-page-width:1120px}
#commander-table #ct-lobby :is(button[aria-pressed=true],button[aria-selected=true]),.op-dialog :is(button[aria-pressed=true],button[aria-selected=true]),#commander-table #ct-lobby button:is([aria-pressed=true],[aria-selected=true]){background:var(--orb-active)!important;color:#E5C84A!important;border-color:#e5c84a80!important}
#commander-table #ct-lobby [data-format-star][aria-pressed=true]{color:#E5C84A!important}
#commander-table .ct-app-nav{--ct-nav-highlight:var(--orb-active)}
#commander-table .ct-app-nav button:not(#ct-nav-play)[aria-current=page]>svg{color:#E5C84A;background:var(--orb-active)}
#commander-table .ct-app-nav #ct-nav-play[aria-current=page]{--ct-play-surface:#383744;--ct-play-card-fill:#383744;color:#E5C84A}
#commander-table .ct-app-nav #ct-nav-play[aria-current=page]>svg{color:#E5C84A}
#commander-table .op-format-favorites{padding:12px 16px;margin-top:0}#commander-table .op-format-favorites h2{margin:4px 0 10px;text-align:left}
#commander-table .op-format-row{grid-template-columns:minmax(0,1fr) 40px;gap:10px}
#commander-table .op-format-row [data-format-star]{width:36px;min-width:36px;height:36px;min-height:36px;padding:0;margin:0;justify-self:center;display:grid;place-items:center;line-height:1;font-size:22px}
#commander-table .op-format-row [data-format]{min-height:44px;padding:9px 14px;margin:4px 0}
#commander-table .op-format-category>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;scroll-margin-top:24px;list-style:none}
#commander-table .op-format-category>summary::-webkit-details-marker{display:none}
#commander-table .op-format-category>summary>span{flex:1;min-width:0}#commander-table .op-format-category>summary>span:before{content:'›';display:inline-block;margin-right:9px}#commander-table .op-format-category[open]>summary>span:before{transform:rotate(90deg)}
#commander-table .op-format-category .op-quick-start{width:auto;min-width:0;min-height:36px;margin:0;padding:7px 10px;font-size:12px;white-space:nowrap;flex:none}
#commander-table #ct-primary-summary h1{flex:1}#commander-table #ct-profile-settings{width:40px;min-width:40px;min-height:40px;height:40px;padding:8px;margin:0 0 0 auto;flex-shrink:0}
#commander-table #ct-profile-settings svg{width:22px;height:22px}
#commander-table .ct-profile-return{display:flex;background:none;border:0;padding:0}
#commander-table #ct-lobby :is(.ct-profiles-page,.ct-setup,.ct-decks-page,.ct-rules-page,.ct-offline-page,.ct-welcome){width:100%!important;max-width:var(--orb-page-width)!important;margin-inline:auto!important;box-sizing:border-box}
#commander-table #ct-lobby .ct-profiles-page>.orbunity-profile-links,#commander-table #ct-friends-directory>.orbunity-profile-links{max-width:none;width:100%}
@media(max-width:500px){#commander-table #ct-primary-summary{gap:10px;padding:14px}#commander-table #ct-primary-summary .ct-avatar{width:58px;height:58px}#commander-table #ct-primary-summary h1{font-size:21px}#commander-table .op-format-category{padding:12px}#commander-table .op-format-category>summary{font-size:16px}}
#commander-table #ct-lobby .op-format-row [data-format-star]{width:36px;min-width:36px;max-width:36px;height:36px;min-height:36px;max-height:36px;padding:0;margin:0;line-height:1;display:grid;place-items:center}
#commander-table #ct-lobby .op-format-category .op-quick-start{width:auto;min-width:0;min-height:36px;margin:0;padding:7px 10px;font-size:12px}
/* Commander preparation: restrained indigo and translucent gold. */
#commander-table .op-quick-actions{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
#commander-table .ct-setup-options{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
#commander-table .ct-bracket-control{flex:1;min-width:240px;max-width:520px}
#commander-table .ct-bracket-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
#commander-table .ct-bracket-heading label{display:flex;align-items:center;gap:10px}
#commander-table #ct-bracket-value{color:#e5c84a;font-weight:700;min-width:3ch}
#commander-table #ct-bracket-info{padding:0;min-height:30px;width:30px;height:30px;border-radius:50%;border:1px solid #7861b5;background:#111a4a;color:#f1f2fa;font-weight:700}
#commander-table #ct-commander-bracket{display:block;appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;height:28px;padding:0;margin:0;border:0;border-radius:0;background:transparent;cursor:pointer;touch-action:pan-y}
#commander-table #ct-commander-bracket::-webkit-slider-runnable-track{height:7px;border-radius:8px;background:linear-gradient(to right,#e5c84a88 var(--bracket-fill),#241064 var(--bracket-fill));border:1px solid #7861b5}
#commander-table #ct-commander-bracket::-moz-range-track{height:7px;border-radius:8px;background:#241064;border:1px solid #7861b5}
#commander-table #ct-commander-bracket::-moz-range-progress{height:7px;background:#e5c84a88}
#commander-table #ct-commander-bracket::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:20px;height:20px;margin-top:-7px;border-radius:50%;border:2px solid #e5c84a;background:#423d27;box-shadow:0 0 9px #e5c84a30}
#commander-table #ct-commander-bracket::-moz-range-thumb{width:18px;height:18px;border-radius:50%;border:2px solid #e5c84a;background:#423d27}
#commander-table #ct-commander-bracket:focus-visible{outline:2px solid #e5c84a;outline-offset:4px;border-radius:8px}
#commander-table .ct-bracket-ticks{display:flex;justify-content:space-between;font-size:12px;color:#bdc4df;margin-top:4px}
#commander-table .ct-bracket-guide{display:block;width:100%;height:auto;margin:16px 0;border-radius:10px}
#commander-table .ct-dialog:has(.ct-bracket-guide){max-width:1100px;width:calc(100vw - 32px)}
@media(max-width:520px){#commander-table .ct-setup-options{gap:16px}#commander-table .ct-bracket-control{min-width:190px}#commander-table .op-quick-actions{gap:4px}#commander-table .op-quick-actions .op-quick-start{font-size:11px;padding:6px 8px}}
#commander-table #ct-lobby .ct-setup-options{display:grid;grid-template-columns:130px minmax(0,520px);align-items:center;gap:20px}
#commander-table #ct-lobby .ct-bracket-control{min-width:0;width:100%}
#commander-table #ct-lobby #ct-bracket-info{min-width:30px;min-height:30px;width:30px;height:30px;padding:0;flex:none}
@media(max-width:520px){#commander-table #ct-lobby .ct-setup-options{grid-template-columns:100px minmax(0,1fr);gap:14px}#commander-table .ct-bracket-ticks{font-size:10px}}
#commander-table #ct-lobby .ct-setup-options>label{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
#commander-table #ct-lobby .ct-setup-options>label select{width:100%;min-width:0}
#commander-table .ct-bracket-guide+a{color:#e5c84a;text-decoration:underline;text-underline-offset:3px}
#commander-table #ct-lobby #ct-setup-rules-open{margin-bottom:16px}
/* Keep the game-selection group centred as disclosure heights interpolate. */
#commander-table #ct-lobby:has(>.op-game-selection){display:flex;flex-direction:column;box-sizing:border-box;min-height:100dvh;padding-block:24px;overflow-anchor:none}
#commander-table #ct-lobby>.op-game-selection{flex:none;margin-block:auto!important;display:flex;flex-direction:column;gap:16px;padding-block:0}
#commander-table #ct-lobby>.op-game-selection>:is(.op-format-favorites,.op-format-category,#ct-resume){margin-block:0;width:100%;box-sizing:border-box}
#commander-table #ct-lobby #ct-resume{min-height:88px;padding:24px;border-radius:16px;border:1px solid #514568;background-color:#101a36;background-image:var(--orb-stars),var(--orb-sheen),var(--orb-depth);background-repeat:no-repeat;box-shadow:inset 0 1px 0 #d5c6f527,0 4px 20px #7861b50a;color:#e5c84a;font-size:20px;font-weight:650;text-align:center}
#commander-table #ct-lobby #ct-resume:hover{border-color:#e5c84a80}
#commander-table[data-device-view=smartphone] #ct-lobby:has(>.op-game-selection){padding-top:calc(24px + var(--ct-menu-safe-top,0px));padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
#commander-table #ct-lobby:has(>.op-game-selection){padding-block:24px!important}
#commander-table #ct-lobby>.op-game-selection{padding-block:0!important}
#commander-table[data-device-view=smartphone] #ct-lobby:has(>.op-game-selection){padding-top:calc(24px + var(--ct-menu-safe-top,0px))!important;padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))!important}
#commander-table #ct-lobby #ct-resume{min-height:88px!important;height:auto!important;padding:24px!important}
#commander-table .op-format-category>summary>.op-quick-actions:before{content:none}
#commander-table .op-format-category>summary>.op-quick-actions{flex:0 1 auto}
#commander-table #ct-lobby #ct-resume{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
#commander-table #ct-lobby #ct-resume small{display:block;font-size:14px;font-weight:400;line-height:1.4;color:#bdc4df;white-space:normal}
/* Compact preparation row and title-aligned back navigation. */
#commander-table #ct-lobby .ct-setup-title-row{position:relative;width:fit-content;max-width:calc(100% - 124px);margin:8px auto 28px}
#commander-table #ct-lobby .ct-setup-title-row>.ct-setup-title{margin:0;text-align:center}
#commander-table #ct-lobby .ct-setup-title-row>#ct-setup-back{position:absolute;right:calc(100% + 18px);top:50%;transform:translateY(-50%);margin:0;padding:0;width:44px;height:44px;display:grid;place-items:center}
#commander-table #ct-lobby .ct-setup-options{grid-template-columns:minmax(170px,1fr) minmax(200px,300px) minmax(170px,1fr);gap:24px;align-items:center;margin-bottom:24px}
#commander-table #ct-lobby .ct-setup-options>label{flex-direction:row;align-items:center;gap:10px;white-space:nowrap}
#commander-table #ct-lobby .ct-setup-options>label select{width:64px;min-width:64px;padding:8px;min-height:42px}
#commander-table #ct-lobby .ct-setup-options>.ct-bracket-control{max-width:300px;justify-self:center}
#commander-table #ct-lobby .ct-setup-options>#ct-setup-start{grid-column:3;justify-self:end;white-space:nowrap;margin:0}
#commander-table #ct-lobby .ct-setup-variants{margin-top:20px}
@media(max-width:700px){
 #commander-table #ct-lobby .ct-setup-options{grid-template-columns:1fr 1fr;gap:18px 10px}
 #commander-table #ct-lobby .ct-setup-options>.ct-bracket-control{grid-column:1/-1;grid-row:2;width:min(300px,100%)}
 #commander-table #ct-lobby .ct-setup-options>#ct-setup-start{grid-column:2;grid-row:1;font-size:13px;padding:10px}
 #commander-table #ct-lobby .ct-setup-options>label{font-size:13px;gap:6px}
 #commander-table #ct-lobby .ct-setup-options>label select{width:52px;min-width:52px}
 #commander-table #ct-lobby .ct-setup-title-row>.ct-setup-title{font-size:21px}
}

.ct-lobby-summary{display:grid;gap:8px;padding:12px 16px;border:1px solid var(--ct-border);border-radius:12px;background:rgba(17,26,74,.36)}
.ct-lobby-summary p{margin:0;min-height:0;font-size:14px;line-height:1.45}.ct-lobby-summary .ct-lobby-status{color:#E5C84A;font-size:12px}
