/* Commander Tracker — Alpha V0.0.1
   Rules remain in original cascade order to preserve the current UI. */
#commander-table {
  --ct-bg:light-dark(#e9e9e4,#090D24);
  --ct-panel:light-dark(#F1F2FA,#101A36);
  --ct-ink:light-dark(#101A36,#F1F2FA);
  --ct-muted:light-dark(#3D4767,#BDC4DF);
  --ct-line:light-dark(#BDC4DF,#1C2949);
  --ct-button:light-dark(#F1F2FA,#1C2949);
  --ct-gold:light-dark(#725516,#E5C84A);
  font-family:ui-sans-serif,system-ui,sans-serif;
  color:var(--ct-ink);
  background:var(--ct-bg);
  border-radius:0;
  overflow:hidden;
  position:relative;
  font-size:14px;
  line-height:1.4
}

    #commander-table * {
  box-sizing:border-box
}

    #commander-table button,#commander-table select {
  font:inherit;
  color:inherit;
  cursor:pointer
}

    #commander-table button {
  border:1px solid var(--ct-line);
  background:var(--ct-button);
  border-radius:10px;
  min-height:44px;
  padding:8px 12px;
  touch-action:manipulation
}

    #commander-table button:hover {
  filter:brightness(1.06)
}

    #commander-table button:disabled {
  opacity:.4;
  cursor:default
}

    #commander-table .ct-bar {
  display:flex;
  position:relative;
  isolation:isolate;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:4px 8px;
  min-height:52px;
  border-radius:8px;
  background:var(--ct-bg);
  color:var(--ct-ink)
}

    #commander-table .ct-bar button {
  min-width:44px;
  padding:8px;
  background:transparent;
  border-color:transparent;
  color:inherit;
  position:relative;
  z-index:1
}

    #commander-table .ct-bar button svg {
  width:19px;
  height:19px
}

    #commander-table .ct-day-picker {
  display:flex;
  align-items:center;
  gap:4px;
  z-index:1;
  font-size:12px
}

    #commander-table .ct-day-picker select {
  width:114px;
  min-height:44px;
  border:1px solid currentColor;
  border-radius:8px;
  background:transparent;
  color:inherit;
  padding:4px;
  font:inherit
}

    #commander-table .ct-day-picker option {
  background:var(--ct-panel);
  color:var(--ct-ink)
}

    #commander-table .ct-bar[data-phase=day] {
  background:linear-gradient(100deg,#f2dc94,#c5e4ed 60%,#f7e6b7);
  color:#273b43
}

    #commander-table .ct-bar[data-phase=night] {
  background:linear-gradient(100deg,#162337,#273153 65%,#172736);
  color:#edf1ff
}

    #commander-table .ct-sky {
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  pointer-events:none;
  opacity:.65
}

    #commander-table .ct-sky svg {
  width:32px;
  height:32px
}

    #commander-table .ct-bar[data-phase=night] .ct-sky:after {
  content:'✦ · ✧';
  position:absolute;
  left:40px;
  top:0;
  white-space:nowrap
}

    #commander-table .ct-bar.ct-phase-change .ct-sky {
  animation:ct-sky-rise .35s ease-out
}

    @keyframes ct-sky-rise {
  from {
  opacity:0;
  transform:translateY(0)
}
to {
  opacity:.65;
  transform:translateY(-50%)
}

}

    @media(prefers-reduced-motion:reduce) {
  #commander-table .ct-bar.ct-phase-change .ct-sky {
  animation:none
}

}

    #commander-table .ct-menu-heading {
  font-size:11px;
  letter-spacing:.08em;
  color:var(--ct-muted);
  margin:20px 0 6px
}

    #commander-table .ct-toggle {
  position:relative;
  appearance:none;
  width:48px;
  height:28px;
  border:1px solid var(--ct-line);
  border-radius:18px;
  background:var(--ct-bg);
  cursor:pointer;
  flex-shrink:0;
  margin:8px 0
}

    #commander-table .ct-toggle:before {
  content:'';
  position:absolute;
  width:20px;
  height:20px;
  left:3px;
  top:3px;
  border-radius:50%;
  background:var(--ct-muted)
}

    #commander-table .ct-toggle:checked {
  border-color:var(--ct-gold);
  background:var(--ct-button)
}

    #commander-table .ct-toggle:checked:before {
  left:23px;
  background:var(--ct-gold)
}

    #commander-table .ct-tools {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px
}

    #commander-table .ct-panel.ct-blessed {
  box-shadow:inset 0 0 0 2px var(--ct-gold),inset 0 0 14px light-dark(#b9993b18,#E5C84A12)
}

    #commander-table .ct-brand {
  font-size:13px;
  font-weight:650;
  letter-spacing:.14em;
  flex:1
}

    #commander-table .ct-meta {
  color:var(--ct-muted);
  font-size:12px;
  letter-spacing:0;
  font-weight:400;
  margin-top:3px
}

    #commander-table .ct-clock {
  font-variant-numeric:tabular-nums;
  padding:0 6px
}

    #commander-table .ct-grid {
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:8px
}

    #commander-table .ct-bank {
  display:grid;
  grid-template-columns:repeat(var(--bank-cols,2),minmax(0,1fr));
  gap:4px
}

    #commander-table .ct-seat {
  position:relative;
  min-width:0
}

    #commander-table .ct-seat .ct-panel {
  height:100%
}

    #commander-table .ct-seat[data-side=true] {
  height:420px
}

    #commander-table .ct-seat[data-side=true] .ct-panel {
  position:absolute;
  left:50%;
  top:50%;
  width:420px;
  height:var(--side-height,360px);
  transform:translate(-50%,-50%) rotate(var(--orientation));
  padding:12px
}

    #commander-table .ct-seat[data-side=true] .ct-life {
  height:88px
}

    #commander-table .ct-seat[data-side=true] .ct-number {
  font-size:64px!important
}

    #commander-table .ct-compact .ct-panel {
  padding:10px
}

    #commander-table .ct-compact .ct-life {
  height:92px
}

    #commander-table .ct-compact .ct-number {
  font-size:64px!important
}

    #commander-table .ct-compact .ct-name {
  font-size:15px
}

    #commander-table .ct-compact .ct-damages {
  grid-template-columns:repeat(2,minmax(0,1fr))
}

    #commander-table .ct-panel {
  background:var(--ct-panel);
  padding:16px 20px;
  border-radius:15px;
  min-width:0;
  border-top:3px solid var(--seat-color)
}

    #commander-table .ct-head {
  display:flex;
  align-items:center;
  gap:9px
}

    #commander-table .ct-person {
  flex:1;
  min-width:0
}

    #commander-table .ct-name {
  font-size:18px;
  font-weight:600
}

    #commander-table .ct-commander {
  font-size:12px;
  color:var(--ct-muted);
  overflow-wrap:anywhere
}

    #commander-table .ct-handle {
  border:0;
  background:transparent;
  padding:4px;
  color:var(--ct-muted);
  min-width:32px;
  font-size:22px
}

    #commander-table .ct-tax {
  font-size:12px;
  white-space:nowrap
}

    #commander-table .ct-tax strong {
  display:block;
  font-size:17px;
  font-weight:500
}

    #commander-table .ct-life {
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  height:137px;
  margin:4px 0
}

    #commander-table .ct-life button {
  background:transparent;
  border:0;
  font-size:23px;
  color:var(--ct-muted);
  border-radius:14px;
  text-align:left;
  user-select:none;
  -webkit-user-select:none
}

    #commander-table .ct-life button:last-of-type {
  text-align:right
}

    #commander-table .ct-number {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;
  font-size:88px;
  letter-spacing:-.055em;
  font-weight:500;
  font-variant-numeric:tabular-nums
}

    #commander-table .ct-skull {
  display:block;
  width:1.15em;
  height:1.15em;
  object-fit:contain
}

    @media(prefers-color-scheme:dark) {
  #commander-table .ct-skull {
  filter:invert(1)
}

}

    #commander-table [data-life],#commander-table #ct-dminus,#commander-table #ct-dplus,#commander-table [data-counter-step] {
  touch-action:none
}

    #commander-table .ct-counter-row {
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px 48px 44px 44px;
  align-items:center;
  gap:5px;
  padding:7px 0;
  border-bottom:1px solid var(--ct-line)
}

    #commander-table .ct-counter-name {
  min-width:0;
  overflow-wrap:anywhere
}

    #commander-table .ct-info {
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  padding:8px;
  background:transparent;
  border-color:transparent;
  color:var(--ct-muted)
}

    #commander-table .ct-info svg {
  width:19px;
  height:19px
}

    #commander-table .ct-status-name {
  flex:1;
  min-width:0;
  overflow-wrap:anywhere
}

    #commander-table [data-pinned-counter],#commander-table [data-help] {
  touch-action:none
}

    #commander-table .ct-help-image {
  display:block;
  width:100%;
  max-width:310px;
  height:auto;
  margin:12px auto;
  border-radius:12px
}

    #commander-table .ct-help-text {
  font-size:14px;
  line-height:1.6
}

    #commander-table .ct-rule-source {
  font-size:12px;
  color:var(--ct-muted)
}

    #commander-table .ct-day-controls {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0
}

    #commander-table .ct-day-controls select {
  padding:10px;
  background:var(--ct-button);
  border:1px solid var(--ct-line);
  border-radius:8px;
  max-width:100%
}

    #commander-table .ct-counter-name small {
  display:block;
  color:var(--ct-muted);
  font-size:11px
}

    #commander-table .ct-counter-row output {
  text-align:center;
  font-size:21px;
  font-variant-numeric:tabular-nums
}

    #commander-table .ct-counter-row button {
  padding:6px;
  display:grid;
  place-items:center
}

    #commander-table .ct-pin {
  background:transparent;
  color:var(--ct-muted)
}

    #commander-table .ct-pin[aria-pressed=true] {
  color:var(--ct-gold);
  border-color:var(--ct-gold)
}

    #commander-table .ct-pinned {
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
  flex:1;
  min-width:0;
  margin:0
}

    #commander-table .ct-pinned:empty {
  display:none
}

    #commander-table .ct-pinned button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:17px;
  min-width:44px;
  min-height:44px;
  padding:6px 8px;
  background:transparent;
  max-width:100%;
  font-variant-numeric:tabular-nums
}

    #commander-table .ct-pinned svg {
  width:21px;
  height:21px;
  flex-shrink:0
}

    #commander-table .ct-pinned .ct-counter-value {
  overflow-wrap:anywhere;
  min-width:0
}

    #commander-table .ct-custom-form {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:18px
}

    #commander-table .ct-custom-form label {
  width:100%;
  font-size:12px;
  color:var(--ct-muted)
}

    #commander-table input[type=text] {
  font:inherit;
  font-size:16px;
  min-width:0;
  flex:1;
  width:130px;
  border:1px solid var(--ct-line);
  border-radius:9px;
  padding:10px;
  background:var(--ct-bg);
  color:var(--ct-ink)
}

    #commander-table .ct-counter-error {
  color:light-dark(#a32f27,#ffada4);
  font-size:12px;
  min-height:0
}

    #commander-table .ct-counter-toolbar {
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:space-between;
  margin:16px 0 6px
}

    #commander-table .ct-counter-toolbar span {
  font-size:12px;
  color:var(--ct-muted)
}

    #commander-table .ct-dialog.ct-counter-dialog {
  width:470px;
  padding:18px
}

    @media(max-width:440px) {
  #commander-table .ct-overlay {
  padding:8px
}
#commander-table .ct-dialog.ct-counter-dialog {
  padding:12px
}
#commander-table .ct-counter-row {
  grid-template-columns:44px minmax(0,1fr) 44px 44px 44px;
  gap:3px
}
#commander-table .ct-counter-row .ct-counter-name {
  grid-column:2/-1
}
#commander-table .ct-counter-row [data-counter-step="-1"] {
  grid-column:2
}
#commander-table .ct-counter-row output {
  grid-column:3
}
#commander-table .ct-counter-row [data-counter-step="1"] {
  grid-column:4
}
#commander-table .ct-counter-row .ct-pin {
  grid-column:5
}

}

    #commander-table .ct-more {
  display:flex;
  align-items:center;
  gap:8px
}

    #commander-table .ct-more span {
  font-size:12px
}

    #commander-table .ct-more b {
  font-size:32px;
  line-height:24px;
  letter-spacing:3px;
  font-weight:600
}

    #commander-table .ct-damages {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px
}

    #commander-table .ct-damage {
  min-width:0;
  text-align:left;
  padding:8px 10px;
  background:transparent
}

    #commander-table .ct-damage span {
  display:block;
  font-size:11px;
  color:var(--ct-muted);
  overflow-wrap:anywhere
}

    #commander-table .ct-damage b {
  font-weight:500;
  font-size:23px;
  display:block;
  font-variant-numeric:tabular-nums
}

    #commander-table .ct-foot {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:8px;
  margin-top:12px
}

    #commander-table .ct-more {
  flex-shrink:0
}

    #commander-table .ct-monarch {
  background:transparent;
  border-color:transparent;
  color:var(--ct-muted)
}

    #commander-table .ct-pinned .ct-monarch svg {
  width:32px;
  height:32px
}

    #commander-table .ct-monarch[aria-pressed=true] {
  color:var(--ct-gold);
  border-color:var(--ct-gold)
}

    #commander-table .ct-status {
  color:var(--ct-muted);
  font-size:12px;
  padding:12px 20px;
  min-height:42px
}

    #commander-table .ct-panel {
  transform:rotate(var(--orientation,0deg))
}

    #commander-table .ct-overlay {
  position:absolute;
  left:0;
  right:0;
  top:0;
  z-index:4;
  background:light-dark(#e9e9e4ee,#090D24ee);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px
}

    #commander-table .ct-overlay[hidden] {
  display:none
}

    #commander-table .ct-dialog-shell {
  position:relative;
  flex:none
}

    #commander-table .ct-dialog {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%) rotate(var(--dialog-angle,0deg));
  background:var(--ct-panel);
  border:1px solid var(--ct-line);
  border-radius:18px;
  padding:20px;
  width:420px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin
}

    #commander-table .ct-dialog h3 {
  margin:0 0 16px;
  font-size:20px
}

    #commander-table .ct-dialog p {
  color:var(--ct-muted)
}

    #commander-table .ct-row {
  display:flex;
  align-items:center;
  gap:10px;
  margin:12px 0;
  flex-wrap:wrap
}

    #commander-table .ct-row label {
  flex:1
}

    #commander-table .ct-row output {
  min-width:28px;
  text-align:center;
  font-size:22px
}

    #commander-table .ct-close {
  float:right
}

    #commander-table .ct-menu-actions {
  float:right;
  display:flex;
  gap:6px;
  margin-left:8px
}

    #commander-table .ct-menu-actions .ct-close {
  float:none
}

    #commander-table .ct-menu-title {
  min-height:58px
}

    #commander-table .ct-menu-title>span {
  font-size:12px;
  color:var(--ct-muted)
}

    #commander-table .ct-menu-title h3 {
  margin:4px 0 14px
}

    #commander-table .ct-menu-title+.ct-menu-heading {
  clear:both
}

    #commander-table .ct-quick-resource {
  display:inline-flex;
  align-items:center;
  border:1px solid var(--ct-line);
  border-radius:10px;
  max-width:100%
}

    #commander-table .ct-quick-resource button {
  border:0;
  border-radius:8px;
  padding:4px;
  min-width:44px
}

    #commander-table [data-resource-step] {
  touch-action:none
}


    #commander-table .ct-panel.ct-picked {
  outline:3px solid var(--ct-gold);
  outline-offset:-4px
}

    @media(max-width:620px) {
  #commander-table .ct-panel {
  padding:12px
}
#commander-table .ct-bar {
  padding:12px
}
#commander-table .ct-brand {
  flex-basis:100%
}
#commander-table .ct-head {
  flex-wrap:wrap
}
#commander-table .ct-tax {
  margin-left:auto
}
#commander-table .ct-name {
  font-size:16px
}
#commander-table .ct-number {
  font-size:70px
}
#commander-table .ct-life {
  height:118px
}
#commander-table .ct-damages {
  gap:4px
}
#commander-table .ct-damage {
  padding:6px
}
#commander-table .ct-foot {
  flex-wrap:wrap
}

}

    @media(max-width:640px) {
  #commander-table .ct-bank {
  grid-template-columns:repeat(2,minmax(0,1fr))
}
#commander-table .ct-bank[data-count="1"] {
  grid-template-columns:1fr
}
#commander-table .ct-bar {
  padding:4px;
  gap:2px
}
#commander-table .ct-day-label {
  display:none
}
#commander-table .ct-sky {
  display:none
}

}

    @media(max-width:440px) {
  #commander-table .ct-bank {
  grid-template-columns:1fr
}
#commander-table .ct-bar {
  flex-wrap:nowrap
}
#commander-table .ct-day-picker select {
  width:98px
}
#commander-table .ct-clock {
  padding:0;
  font-size:12px
}
#commander-table .ct-bar .ct-info {
  min-width:32px;
  width:32px;
  flex-basis:32px
}

}


    #commander-table .ct-counter-name,#commander-table .ct-status-name {
  display:flex;
  align-items:center;
  gap:8px
}

    #commander-table .ct-menu-symbol {
  display:inline-flex;
  flex-shrink:0
}

    #commander-table .ct-menu-symbol svg,#commander-table .ct-tools svg {
  width:20px;
  height:20px;
  flex-shrink:0
}

    #commander-table .ct-tools {
  display:grid;
  grid-template-columns:1fr;
  gap:4px
}

    #commander-table .ct-tools button {
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  min-height:44px;
  background:transparent
}

    #commander-table .ct-phase-switch {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100px;
  min-width:100px;
  height:40px;
  padding:7px 9px;
  border-radius:24px;
  color:inherit;
  background:transparent
}

    #commander-table .ct-phase-switch svg {
  width:20px;
  height:20px;
  z-index:1
}

    #commander-table .ct-phase-thumb {
  position:absolute;
  left:34px;
  top:4px;
  width:30px;
  height:30px;
  border-radius:50%;
  background:currentColor;
  opacity:.22;
  transition:left .2s ease
}

    #commander-table .ct-phase-switch[data-state=day] .ct-phase-thumb {
  left:4px
}

    #commander-table .ct-phase-switch[data-state=night] .ct-phase-thumb {
  left:64px
}

    #commander-table .ct-seat {
  container-type:inline-size
}

    #commander-table .ct-foot {
  position:relative;
  display:block;
  height:188px;
  padding-bottom:48px
}

    #commander-table .ct-pinned {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-rows:44px;
  gap:4px;
  align-items:center
}

    #commander-table .ct-counter-slot {
  min-width:0;
  height:44px;
  display:flex;
  align-items:center
}

    #commander-table .ct-pinned>.ct-monarch {
  justify-self:start
}

    #commander-table .ct-foot>.ct-more {
  position:absolute;
  right:0;
  bottom:0
}

    #commander-table .ct-quick-resource {
  width:100px;
  max-width:100%;
  justify-content:space-between
}

    #commander-table .ct-quick-resource button {
  min-width:26px;
  padding:2px;
  gap:2px;
  font-size:15px
}

    #commander-table .ct-quick-resource [data-pinned-counter] {
  flex:1
}

    #commander-table .ct-quick-resource svg {
  width:17px;
  height:17px
}

    @container(max-width:350px) {
  #commander-table .ct-pinned {
  grid-template-columns:repeat(2,minmax(0,1fr))
}
#commander-table .ct-foot {
  height:284px
}

}

    @media(prefers-reduced-motion:reduce) {
  #commander-table .ct-phase-thumb {
  transition:none
}

}


    #commander-table .ct-seat .ct-panel {
  height:345px;
  display:grid;
  grid-template-rows:52px minmax(0,1fr) 66px 88px;
  gap:4px;
  padding:12px 16px
}

    #commander-table .ct-head {
  flex-wrap:nowrap;
  gap:6px;
  min-width:0
}

    #commander-table .ct-handle {
  min-width:20px;
  width:20px;
  padding:0
}

    #commander-table .ct-person {
  margin-right:6px;
  overflow:hidden
}

    #commander-table .ct-name {
  font-size:16px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

    #commander-table .ct-commander {
  font-size:11px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden
}

    #commander-table .ct-progress-tax {
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0
}

    #commander-table .ct-progress-tax button {
  height:44px;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:4px
}

    #commander-table .ct-progress-tax [data-pinned-counter] {
  width:42px;
  min-width:42px;
  font-size:15px
}

    #commander-table .ct-progress-tax svg {
  width:17px;
  height:17px
}

    #commander-table .ct-progress-tax .ct-tax {
  margin:0;
  width:auto;
  min-width:64px;
  padding:4px 8px
}

    #commander-table .ct-life {
  height:auto!important;
  margin:0
}

    #commander-table .ct-damages {
  min-width:0;
  gap:5px
}

    #commander-table .ct-damage {
  padding:5px;
  overflow:hidden
}

    #commander-table .ct-damage span {
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden
}

    #commander-table .ct-foot {
  height:88px;
  margin:0;
  padding:0;
  min-width:0
}

    #commander-table .ct-pinned {
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:3px;
  height:40px;
  min-width:0;
  width:100%
}

    #commander-table .ct-pinned>button {
  height:40px;
  min-height:40px;
  width:32px;
  min-width:0;
  flex:0 1 32px;
  padding:2px;
  gap:2px;
  font-size:13px
}

    #commander-table .ct-pinned svg {
  width:17px;
  height:17px
}

    #commander-table .ct-pinned .ct-monarch svg {
  width:26px;
  height:26px
}

    #commander-table .ct-pinned [data-pinned-counter=poison] {
  margin-left:6px
}

    #commander-table .ct-quick-resource {
  height:40px;
  flex:0 1 68px;
  width:68px;
  min-width:0;
  border-radius:8px
}

    #commander-table .ct-quick-resource:first-of-type {
  margin-left:6px
}

    #commander-table .ct-quick-resource button {
  min-height:38px;
  height:38px;
  min-width:0;
  padding:1px;
  font-size:12px;
  gap:1px
}

    #commander-table .ct-quick-resource [data-resource-step] {
  flex:0 0 16px;
  width:16px
}

    #commander-table .ct-quick-resource [data-pinned-counter] {
  flex:1;
  min-width:0
}

    #commander-table .ct-quick-resource svg {
  width:14px;
  height:14px
}

    #commander-table .ct-counter-value {
  white-space:nowrap
}

    #commander-table .ct-foot>.ct-more {
  height:40px;
  min-height:40px;
  padding:3px 10px
}

    #commander-table .ct-phase-switch {
  gap:3px;
  padding:0;
  border:0;
  border-radius:0;
  width:108px;
  min-width:108px
}

    #commander-table .ct-phase-position {
  height:34px;
  width:34px;
  border:1px solid currentColor;
  border-radius:7px;
  display:grid;
  place-items:center;
  opacity:.5
}

    #commander-table .ct-phase-switch[data-state=day] [data-phase-position=day],#commander-table .ct-phase-switch[data-state=night] [data-phase-position=night],#commander-table .ct-phase-switch[data-state=unset] [data-phase-position=unset] {
  opacity:1;
  box-shadow:inset 0 0 0 1px currentColor;
  background:light-dark(#ffffff33,#ffffff18)
}

    @container(max-width:380px) {
  #commander-table .ct-pinned {
  flex-wrap:wrap;
  height:80px;
  align-content:flex-start;
  padding-right:46px
}
#commander-table .ct-head {
  gap:4px
}
#commander-table .ct-person {
  margin-right:4px
}
#commander-table .ct-progress-tax {
  gap:4px
}
#commander-table .ct-progress-tax [data-pinned-counter] {
  width:34px;
  min-width:34px
}
#commander-table .ct-progress-tax .ct-tax {
  min-width:54px;
  padding:3px
}
#commander-table .ct-name {
  font-size:14px
}

}

    @container(max-width:270px) {
  #commander-table .ct-head {
  display:grid;
  grid-template-columns:20px minmax(0,1fr);
  grid-template-rows:28px 44px
}
#commander-table .ct-progress-tax {
  grid-column:2;
  justify-content:flex-end
}
#commander-table .ct-seat .ct-panel {
  grid-template-rows:76px minmax(0,1fr) 66px 88px
}
#commander-table .ct-pinned {
  padding-right:0;
  gap:2px
}
#commander-table .ct-quick-resource {
  flex-basis:58px
}
#commander-table .ct-foot>.ct-more {
  bottom:0;
  transform:translateY(2px)
}

}

    @container(max-width:270px) {
  #commander-table .ct-seat .ct-panel {
  grid-template-rows:76px minmax(0,1fr) 66px 124px
}
#commander-table .ct-foot {
  height:124px
}
#commander-table .ct-pinned {
  height:80px
}
#commander-table .ct-number {
  font-size:48px!important
}

}


    #commander-table .ct-seat .ct-panel {
  position:relative;
  padding-top:28px;
  grid-template-rows:52px minmax(0,1fr) 66px 44px
}

    #commander-table .ct-panel>.ct-handle {
  position:absolute;
  top:2px;
  left:50%;
  transform:translateX(-50%);
  width:80px;
  min-width:80px;
  height:24px;
  min-height:24px;
  display:grid;
  place-items:center;
  padding:0;
  cursor:grab
}

    #commander-table .ct-handle span {
  width:54px;
  height:5px;
  background:var(--ct-muted);
  border-radius:4px
}

    #commander-table .ct-head {
  display:flex;
  flex-wrap:nowrap;
  min-width:0
}

    #commander-table .ct-name-status {
  display:flex;
  align-items:center;
  gap:3px;
  flex:1;
  min-width:0
}

    #commander-table .ct-name-status>button,#commander-table .ct-initiative-slot {
  width:30px;
  min-width:30px;
  height:40px;
  flex:0 0 30px;
  padding:0
}

    #commander-table .ct-name-status .ct-monarch svg {
  width:26px;
  height:26px
}

    #commander-table .ct-initiative-slot {
  display:grid;
  place-items:center
}

    #commander-table .ct-initiative-slot button {
  width:30px;
  min-width:30px;
  height:40px;
  padding:0;
  background:transparent;
  border-color:transparent
}

    #commander-table .ct-initiative-slot svg {
  width:20px;
  height:20px
}

    #commander-table .ct-foot {
  display:flex;
  align-items:center;
  gap:4px;
  height:44px;
  padding:0;
  margin:0;
  width:100%
}

    #commander-table .ct-pinned {
  display:flex;
  flex-wrap:nowrap;
  flex:1;
  gap:4px;
  width:auto;
  min-width:0;
  height:44px;
  padding:0
}

    #commander-table .ct-pinned:empty {
  display:block
}

    #commander-table .ct-pinned [data-pinned-counter=poison] {
  margin:0;
  width:34px;
  flex:0 1 34px;
  height:44px;
  min-height:44px
}

    #commander-table .ct-quick-resource,#commander-table .ct-quick-resource:first-of-type {
  margin:0;
  flex:1 1 0;
  width:auto;
  min-width:0;
  height:44px
}

    #commander-table .ct-quick-resource button {
  height:42px;
  min-height:42px
}

    #commander-table .ct-foot>.ct-more {
  position:static;
  transform:none;
  flex:0 0 40px;
  width:40px;
  min-width:40px;
  height:44px;
  min-height:44px;
  padding:2px;
  justify-content:center
}

    #commander-table .ct-phase-switch {
  border:1px solid currentColor;
  border-radius:9px;
  padding:2px;
  gap:0
}

    #commander-table .ct-phase-position {
  border:0;
  box-shadow:none!important;
  border-radius:6px
}

    @container(max-width:380px) {
  #commander-table .ct-seat .ct-panel {
  grid-template-rows:88px minmax(0,1fr) 66px 44px
}
#commander-table .ct-head {
  display:flex;
  flex-wrap:wrap;
  gap:2px
}
#commander-table .ct-name-status {
  flex-basis:100%
}
#commander-table .ct-progress-tax {
  margin-left:auto
}
#commander-table .ct-quick-resource [data-pinned-counter] {
  flex-direction:column;
  gap:0;
  font-size:12px;
  line-height:13px
}
#commander-table .ct-quick-resource [data-resource-step] {
  flex-basis:12px;
  width:12px
}
#commander-table .ct-foot,#commander-table .ct-pinned {
  height:44px
}

}

    #commander-table .ct-bar .ct-phase-switch {
  border:1px solid currentColor;
  border-radius:9px
}

    #commander-table .ct-name-status>.ct-monarch,#commander-table .ct-initiative-slot {
  height:44px;
  min-height:44px;
  width:30px;
  min-width:30px;
  align-self:center
}

    #commander-table .ct-name-status>.ct-monarch,#commander-table .ct-initiative-slot button {
  display:grid;
  place-items:center;
  box-sizing:border-box;
  width:30px;
  min-width:30px;
  height:44px;
  min-height:44px;
  padding:0;
  line-height:1;
  border-width:1px;
  border-style:solid;
  border-radius:10px;
  background:transparent
}

    #commander-table .ct-name-status .ct-monarch svg,#commander-table .ct-initiative-slot svg {
  display:block;
  width:18px;
  height:18px;
  margin:0
}

    #commander-table .ct-initiative-slot button {
  color:light-dark(#2464ad,#79b7ff);
  border-color:currentColor
}

    #commander-table .ct-name-status .ct-person {
  display:grid;
  place-items:center;
  height:44px;
  margin:0;
  border:1px solid var(--ct-line);
  border-radius:9px;
  padding:0 4px
}

    #commander-table .ct-name-status .ct-name {
  width:100%;
  text-align:center
}

    #commander-table .ct-initiative-slot button[aria-pressed=false] {
  color:var(--ct-muted);
  border-color:var(--ct-line)
}

    #commander-table .ct-damage {
  position:relative;
  text-align:center
}

    #commander-table .ct-damage span {
  position:absolute;
  top:4px;
  left:4px;
  right:4px;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  display:block
}

    #commander-table .ct-damage b {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  margin:0;
  line-height:1
}

    #commander-table .ct-name-status .ct-person {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px
}

    #commander-table .ct-name-status .ct-commander {
  width:100%;
  text-align:center;
  font-size:11px;
  line-height:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  display:block
}

    #commander-table .ct-head {
  display:grid;
  grid-template-columns:minmax(0,1fr) 170px 63px;
  grid-template-rows:44px;
  gap:6px;
  align-items:center
}

    #commander-table .ct-head>.ct-person {
  width:100%;
  min-width:0;
  height:44px;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:2px;
  overflow:hidden
}

    #commander-table .ct-head>.ct-person .ct-name,#commander-table .ct-head>.ct-person .ct-commander {
  width:100%;
  text-align:left;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  display:block
}

    #commander-table .ct-head>.ct-person .ct-commander {
  font-size:11px;
  line-height:13px
}

    #commander-table .ct-head>.ct-progress-tax {
  width:170px;
  justify-content:flex-end;
  margin:0;
  grid-column:auto
}

    #commander-table .ct-head>.ct-name-status {
  width:63px;
  flex:none;
  gap:3px
}

    @container(max-width:380px) {
  #commander-table .ct-head {
  grid-template-columns:minmax(0,1fr) 63px;
  grid-template-rows:40px 44px;
  gap:2px 6px
}
#commander-table .ct-head>.ct-person {
  grid-column:1/-1;
  height:40px
}
#commander-table .ct-head>.ct-progress-tax {
  grid-column:1;
  width:100%
}
#commander-table .ct-head>.ct-name-status {
  grid-column:2
}

}

    #commander-table .ct-progress-tax [data-pinned-counter],#commander-table .ct-progress-tax .ct-tax {
  width:30px;
  min-width:30px;
  height:44px;
  min-height:44px;
  padding:2px;
  flex-direction:column;
  gap:1px;
  border-radius:10px;
  background:var(--ct-button);
  font-size:13px;
  line-height:15px
}

    #commander-table .ct-progress-tax svg {
  width:18px;
  height:18px
}

    #commander-table .ct-progress-tax .ct-tax strong {
  display:flex;
  flex-direction:column;
  align-items:center;
  font-size:13px;
  line-height:16px
}

    #commander-table .ct-progress-tax .ct-tax strong span:first-child {
  font-size:11px
}

    #commander-table .ct-name-status>.ct-monarch,#commander-table .ct-initiative-slot button {
  background:var(--ct-button)
}

    #commander-table .ct-quick-resource [data-resource-step="-1"] {
  position:relative
}

    #commander-table .ct-quick-resource [data-resource-step="-1"]::after {
  content:"";
  position:absolute;
  right:0;
  top:7px;
  bottom:7px;
  width:1px;
  background:var(--ct-line);
  pointer-events:none
}


    #commander-table:not([data-screen=tracker])>.ct-grid,#commander-table:not([data-screen=tracker])>.ct-status {
  display:none
}

    #commander-table[data-screen=tracker]>#ct-lobby {
  display:none
}

    #commander-table #ct-lobby {
  background:var(--ct-panel);
  border-radius:0;
  min-height:460px
}

    #commander-table .ct-welcome {
  padding:64px 24px;
  max-width:640px;
  margin:auto;
  text-align:center
}

    #commander-table .ct-welcome-icon {
  color:var(--ct-gold);
  margin:0 auto 24px;
  display:grid;
  place-items:center
}

    #commander-table .ct-welcome-icon svg {
  width:48px;
  height:48px
}

    #commander-table .ct-eyebrow {
  font-size:12px;
  letter-spacing:.15em;
  color:var(--ct-muted)
}

    #commander-table #ct-lobby h1 {
  font-size:30px;
  line-height:1.2;
  font-weight:600;
  margin:12px 0
}

    #commander-table #ct-lobby p {
  color:var(--ct-muted);
  font-size:14px;
  line-height:1.5
}

    #commander-table .ct-start-actions {
  display:flex;
  flex-direction:column;
  gap:12px;
  max-width:280px;
  margin:32px auto
}

    #commander-table #ct-lobby button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:44px
}

    #commander-table #ct-lobby .ct-primary {
  background:var(--ct-ink);
  color:var(--ct-panel);
  border-color:var(--ct-ink)
}

    #commander-table .ct-start-details {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:16px;
  color:var(--ct-muted);
  font-size:12px
}

    #commander-table .ct-session-note {
  font-size:12px;
  color:var(--ct-muted)
}

    #commander-table .ct-setup {
  max-width:850px;
  margin:auto;
  padding:24px
}

    #commander-table .ct-back {
  background:transparent;
  border:0;
  padding-left:0
}

    #commander-table .ct-setup-heading {
  margin:24px 0
}

    #commander-table .ct-setup-options {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:24px;
  flex-wrap:wrap;
  margin:24px 0
}

    #commander-table .ct-setup-options>.ct-primary {
  margin-left:auto
}

    #commander-table .ct-setup-options label {
  display:flex;
  align-items:center;
  gap:12px
}

    #commander-table .ct-setup-options select {
  font:inherit;
  padding:8px 16px;
  background:var(--ct-button);
  color:var(--ct-ink);
  border:1px solid var(--ct-line);
  border-radius:8px
}

    #commander-table .ct-setup-options>span,#commander-table .ct-setup-bottom>span {
  font-size:12px;
  color:var(--ct-muted)
}

    #commander-table .ct-setup-seats {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px
}

    #commander-table .ct-setup-player {
  position:relative;
  min-width:0;
  margin:0;
  padding:40px 16px 16px;
  border:1px solid var(--ct-line);
  border-radius:12px
}

    #commander-table .ct-setup-handle {
  position:absolute;
  top:0;
  left:50%;
  transform:translateX(-50%);
  width:80px;
  height:36px;
  min-height:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:0;
  cursor:grab;
  touch-action:none
}

    #commander-table .ct-setup-handle span {
  width:54px;
  height:5px;
  border-radius:4px;
  background:var(--ct-muted);
  pointer-events:none
}

    #commander-table .ct-setup-player.ct-drag-picked {
  border-color:var(--ct-ink)
}

    #commander-table .ct-setup-player.ct-drag-target {
  background:var(--ct-button)
}

    #commander-table .ct-setup-handle:active {
  cursor:grabbing
}

    #commander-table .ct-setup-fields {
  display:flex;
  flex-direction:column;
  gap:12px
}

    #commander-table .ct-setup-fields label {
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12px
}

    #commander-table .ct-setup-fields input {
  width:100%;
  flex:none
}


    #commander-table .ct-setup-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-top:24px
}

    #commander-table .ct-compact .ct-damages {
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:31px
}

    #commander-table .ct-compact .ct-damage span {
  font-size:10px;
  top:1px
}

    #commander-table .ct-compact .ct-damage b {
  font-size:15px;
  top:66%
}

    @media(max-width:560px) {
  #commander-table .ct-setup-seats {
  grid-template-columns:1fr
}
#commander-table .ct-setup {
  padding:16px
}
#commander-table .ct-welcome {
  padding:48px 16px
}

}

    #commander-table .ct-many-sources {
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:31px
}

    #commander-table .ct-many-sources .ct-damage span {
  font-size:10px;
  top:1px
}

    #commander-table .ct-many-sources .ct-damage b {
  font-size:15px;
  top:66%
}


    #commander-table .ct-planned {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  text-align:left;
  margin-top:32px
}

    #commander-table #ct-lobby .ct-planned button {
  justify-content:flex-start;
  text-align:left;
  opacity:.65;
  padding:14px;
  cursor:default
}

    #commander-table .ct-planned small {
  display:block;
  font-size:11px;
  color:var(--ct-muted);
  margin-top:4px
}

    #commander-table .ct-planned svg {
  width:22px;
  height:22px;
  flex-shrink:0
}

    #commander-table .ct-table-layout {
  display:grid;
  grid-template-columns:0 minmax(0,1fr) 210px;
  grid-template-rows:345px 52px 345px;
  gap:4px;
  transform-origin:top left
}

    #commander-table .ct-table-layout>.ct-bank {
  grid-column:2;
  grid-template-columns:repeat(var(--bank-cols),minmax(0,1fr))
}

    #commander-table .ct-table-layout>.ct-bank:first-child {
  grid-row:1
}

    #commander-table .ct-table-layout>.ct-bank:nth-of-type(2) {
  grid-row:3
}

    #commander-table .ct-table-layout>.ct-bar {
  grid-column:2;
  grid-row:2;
  min-width:0;
  gap:2px;
  padding:2px
}

    #commander-table .ct-table-layout .ct-day-label {
  display:none
}

    #commander-table .ct-table-layout>.ct-seat[data-place=left] {
  grid-column:1;
  grid-row:1/4
}

    #commander-table .ct-table-layout>.ct-seat[data-place=right] {
  grid-column:3;
  grid-row:1/4
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] {
  height:750px;
  container-type:normal
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-panel {
  width:750px;
  height:210px;
  grid-template-rows:44px minmax(0,1fr) 40px 44px;
  padding:20px 12px 8px;
  gap:3px
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-head {
  grid-template-columns:minmax(0,1fr) 170px 63px;
  grid-template-rows:44px
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-person {
  grid-column:auto
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-head>.ct-progress-tax {
  grid-column:2
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-head>.ct-name-status {
  grid-column:3
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-number {
  font-size:42px!important
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-damages {
  grid-template-columns:repeat(5,minmax(0,1fr));
  grid-auto-rows:40px
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-damage b {
  top:60%
}

    #commander-table .ct-table-layout .ct-number {
  line-height:1
}

    #commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-number {
  font-size:34px!important;
  line-height:1
}

    #commander-table #ct-lobby .ct-planned button:not(:disabled) {
  opacity:1;
  cursor:pointer
}

    #commander-table .ct-profiles-page {
  max-width:850px;
  margin:auto;
  padding:24px
}

    #commander-table .ct-profile-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:28px 0;
  flex-wrap:wrap
}

    #commander-table .ct-profile-heading h1 {
  margin:6px 0;
  font-size:28px;
  overflow-wrap:anywhere
}

    #commander-table .ct-profile-heading small,#commander-table .ct-profiles-page p {
  color:var(--ct-muted)
}

    #commander-table .ct-profile-tabs {
  display:flex;
  gap:8px;
  margin-bottom:20px;
  flex-wrap:wrap
}

    #commander-table .ct-profile-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px
}

    #commander-table #ct-lobby .ct-profile-entry {
  padding:18px 54px;
  position:relative;
  overflow:hidden;
  isolation:isolate;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:center;
  min-height:86px;
  text-align:center;
  min-width:0
}
    #commander-table .ct-profile-entry::before {
  content:"";
  position:absolute;
  inset:0;
  background-image:var(--ct-profile-pattern);
  background-size:cover;
  background-repeat:no-repeat;
  background-position:center;
  opacity:.16;
  pointer-events:none
}
    #commander-table .ct-profile-entry>* {position:relative;z-index:1;}
    #commander-table .ct-profile-entry>svg {position:absolute;right:18px;top:50%;transform:translateY(-50%);}

    #commander-table .ct-avatar {
  display:flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border-radius:50%;
  background:var(--ct-button);
  flex-shrink:0
}

    #commander-table .ct-avatar svg {
  width:24px;
  height:24px
}

    #commander-table .ct-profile-entry-name {
  flex:1;
  min-width:0;
  overflow-wrap:anywhere;
  line-height:1.4
}

    #commander-table .ct-profile-entry small,#commander-table .ct-profile-commanders small {
  display:block;
  margin-top:5px;
  color:var(--ct-muted);
  font-size:12px
}

    #commander-table .ct-profile-identity {
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
  flex:1
}

    #commander-table .ct-profile-identity>div {
  min-width:0
}

    #commander-table .ct-profile-metrics {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
  padding:22px 0;
  border-top:1px solid var(--ct-line);
  border-bottom:1px solid var(--ct-line)
}

    #commander-table .ct-profile-metrics strong {
  font-size:26px;
  display:block
}

    #commander-table .ct-profile-metrics>div {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  box-sizing:border-box;
  min-width:0;
  min-height:96px;
  padding:12px 8px;
  border:1px solid var(--ct-line);
  border-radius:16px;
  text-align:center
}

    #commander-table .ct-profile-metrics>div :is(strong,span) {
  max-width:100%;
  overflow-wrap:anywhere
}

    #commander-table .ct-profile-metrics span {
  display:block;
  font-size:12px;
  color:var(--ct-muted);
  margin-top:0
}

    #commander-table .ct-profile-empty {
  padding:16px 0;
  font-size:14px
}

    #commander-table .ct-profile-breakdown {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-bottom:28px
}

    #commander-table .ct-profiles-page h2 {
  font-size:16px;
  margin:12px 0
}

    #commander-table .ct-profile-commanders>div {
  display:flex;
  gap:14px;
  align-items:center;
  padding:16px 0;
  border-bottom:1px solid var(--ct-line);
  overflow-wrap:anywhere
}

    #commander-table #ct-lobby .ct-profile-commanders-heading {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:12px;
  margin-bottom:12px
}
    #commander-table #ct-lobby .ct-profile-commanders-heading>h2 {
  grid-column:2;
  margin:0;
  text-align:center
}
    #commander-table #ct-lobby :is(#ct-profile-add-commander,#ct-profile-add-deck) {
  grid-column:3;
  justify-self:end;
  margin:0
}
    @media(max-width:700px){
  #commander-table #ct-lobby .ct-profile-commanders-heading {grid-template-columns:minmax(0,1fr);}
  #commander-table #ct-lobby .ct-profile-commanders-heading>h2 {grid-column:1;}
  #commander-table #ct-lobby :is(#ct-profile-add-commander,#ct-profile-add-deck) {grid-column:1;}
}

    #commander-table .ct-profile-management {
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:24px;
  border-top:1px solid var(--ct-line);
  padding-top:20px
}

    #commander-table #ct-profile-form {
  max-width:520px
}

    #commander-table #ct-profile-form>label {
  display:flex;
  flex-direction:column;
  gap:10px
}

    #commander-table #ct-profile-name {
  width:100%
}

    #commander-table .ct-profile-avatars {
  border:0;
  padding:0;
  margin:24px 0;
  min-width:0;
  display:block
}

    #commander-table .ct-profile-avatars legend {
  margin-bottom:12px;
  color:var(--ct-muted)
}

    #commander-table .ct-profile-avatars button {
  width:100%;
  min-width:0;
  padding:10px;
  line-height:1.3
}

    #commander-table .ct-avatar-categories {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-bottom:14px
}
    #commander-table .ct-avatar-categories button {
  min-height:44px;
  font-size:13px;
  background:transparent
}
    #commander-table .ct-avatar-options {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px
}
    #commander-table .ct-avatar-options button {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:98px;
  background:#1C294966;
  border:1px solid var(--ct-line);
  border-radius:12px;
  font-size:12px;
  color:var(--ct-ink)
}
    #commander-table .ct-avatar-options .ct-avatar-symbol {
  display:block;
  width:54px;
  height:54px;
  flex:none
}
    #commander-table .ct-avatar-check {
  display:none;
  position:absolute;
  top:5px;
  right:7px;
  font-size:13px;
  font-weight:700
}
    #commander-table .ct-avatar-options [aria-pressed=true] .ct-avatar-check {display:block;}
    #commander-table .ct-profile-avatars button[aria-pressed=true] {
  color:var(--ct-gold);
  background:#E5C84A16;
  border-color:var(--ct-gold)
}
    #commander-table .ct-profile-avatars button:hover {border-color:var(--ct-gold);}
    #commander-table .ct-profile-avatars button:focus-visible {
  outline:2px solid var(--ct-gold);
  outline-offset:3px
}
    #commander-table .ct-profile-avatars .ct-avatar-selection {
  margin:12px 0 0;
  font-size:13px;
  text-align:left;
  color:var(--ct-gold)
}
    #commander-table .ct-profile-avatars .ct-avatar-photo-hint {
  margin:6px 0 0;
  font-size:12px;
  text-align:left;
  color:var(--ct-muted)
}

    #commander-table .ct-profile-avatars [aria-pressed=true],#commander-table .ct-profile-tabs [aria-pressed=true] {
  border-color:var(--ct-ink);
  background:var(--ct-button)
}

    #commander-table .ct-profile-form-actions {
  display:flex;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap
}

    #commander-table .ct-setup-fields select {
  font:inherit;
  width:100%;
  padding:10px;
  background:var(--ct-button);
  color:var(--ct-ink);
  border:1px solid var(--ct-line);
  border-radius:8px
}

    @media(max-width:560px) {
  #commander-table .ct-profiles-page {
  padding:16px
}
#commander-table .ct-profile-list {
  grid-template-columns:1fr
}
#commander-table .ct-profile-metrics {
  grid-template-columns:repeat(3,minmax(0,1fr))
}
#commander-table .ct-profile-breakdown {
  grid-template-columns:1fr
}

}


    #commander-table[data-screen=setup] .ct-overlay {
  background:light-dark(#e9e9e499,#090D2499);
  backdrop-filter:blur(4px)
}

    #commander-table .ct-setup-new-profile {
  justify-content:center;
  width:100%
}

    #commander-table .ct-dialog .ct-profile-heading {
  margin:12px 0 20px
}

    #commander-table .ct-dialog .ct-profile-heading h1 {
  font-size:22px
}

    #commander-table #ct-commander-form>label {
  display:flex;
  flex-direction:column;
  gap:10px
}

    #commander-table #ct-commander-name {
  width:100%
}

    #commander-table .ct-setup-profile-button {
  width:100%;
  display:flex;
  gap:10px;
  text-align:left;
  min-height:44px
}

    #commander-table .ct-setup-profile-button>span {
  flex:1;
  overflow-wrap:anywhere
}
    #commander-table .ct-setup-profile-button>.ct-avatar {
  flex:0 0 30px;
  width:30px;
  height:30px
}

    #commander-table .ct-profile-picker {
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:16px 0
}

    #commander-table .ct-profile-picker>button {
  display:flex;
  gap:12px;
  width:100%;
  text-align:left;
  padding:10px
}

    #commander-table .ct-profile-picker>button>span:nth-child(2) {
  flex:1;
  min-width:0;
  overflow-wrap:anywhere
}

    #commander-table .ct-profile-picker small {
  display:block;
  color:var(--ct-muted);
  font-size:12px;
  margin-top:4px
}

    #commander-table .ct-profile-picker [aria-pressed=true] {
  border-color:var(--ct-ink)
}

    #commander-table .ct-setup-fields .ct-setup-profile-button {
  flex-direction:row;
  align-items:center;
  height:48px;
  min-height:48px;
  padding:6px 10px
}

    #commander-table .ct-pair-choice {
  display:block;
  font-size:11px;
  line-height:15px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

    #commander-table .ct-profile-picker:has([data-pick-commander])>button {
  padding:5px 10px;
  min-height:38px
}

    #commander-table [data-pick-commander] .ct-avatar {
  height:28px;
  width:28px
}

    #commander-table .ct-partner-name {
  display:block;
  font-size:10px;
  line-height:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

    #commander-table .ct-tax-pair {
  width:30px;
  height:44px;
  display:flex;
  flex-direction:column;
  flex:none
}

    #commander-table .ct-progress-tax .ct-tax-pair .ct-tax {
  width:30px;
  height:22px;
  min-height:22px;
  font-size:9px;
  line-height:10px;
  border-radius:4px;
  padding:0
}

    #commander-table .ct-damage-pair {
  display:grid;
  grid-template-columns:1fr 1fr;
  min-width:0;
  gap:0
}

    #commander-table .ct-damage-pair .ct-damage {
  width:100%;
  height:100%;
  border-radius:5px
}

    #commander-table .ct-damage em {
  position:absolute;
  inset:8px 0 0;
  font-size:48px;
  font-style:normal;
  opacity:.28;
  line-height:1
}

    #commander-table .ct-second-toggle {
  flex-direction:row!important;
  align-items:center;
  margin:16px 0
}

    #commander-table #ct-second-field[hidden] {
  display:none
}

    #commander-table #ct-second-name {
  width:100%
}

    #commander-table .ct-damages>.ct-damage-pair {
  padding:20px 0 0;
  border:1px solid var(--ct-line);
  border-radius:10px;
  overflow:hidden;
  position:relative;
  background:transparent
}

    #commander-table .ct-damage-pair .ct-damage {
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  min-height:0;
  position:relative
}

    #commander-table .ct-damage-pair .ct-damage+.ct-damage {
  border-left:1px solid var(--ct-line)
}

    #commander-table .ct-damage-pair .ct-pair-player {
  top:4px;
  left:4px;
  right:4px;
  font-size:11px
}

    #commander-table .ct-damage-pair .ct-damage em {
  inset:0;
  font-size:28px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.23
}

    #commander-table .ct-damage-pair .ct-damage b {
  top:50%
}

    #commander-table .ct-tax-pair {
  border:1px solid var(--ct-line);
  border-radius:10px;
  overflow:hidden;
  background:var(--ct-button)
}

    #commander-table .ct-progress-tax .ct-tax-pair .ct-tax {
  position:relative;
  width:28px;
  min-width:28px;
  height:21px;
  min-height:21px;
  border:0;
  border-radius:0;
  background:transparent
}

    #commander-table .ct-tax-pair .ct-tax+.ct-tax {
  border-top:1px solid var(--ct-line)!important
}

    #commander-table .ct-tax-pair em {
  position:absolute;
  inset:0;
  font-size:20px;
  line-height:20px;
  font-style:normal;
  opacity:.23;
  text-align:left;
  padding-left:2px
}

    #commander-table .ct-tax-pair strong>span {
  position:relative;
  font-size:10px
}

    #commander-table .ct-tax-pair em {
  padding-left:9px
}

    #commander-table .ct-damage-pair .ct-damage {
  container-type:size
}

    #commander-table .ct-damage-pair .ct-damage em {
  font-size:max(12px,calc(100cqh - 8px));
  line-height:1
}

    #commander-table .ct-damage-pair .ct-damage em {
  font-size:max(12px,calc(100cqh - 2px));
  line-height:1
}

    #commander-table .ct-commander[hidden] {
  display:none
}


/* Alpha V0.0.1: stable resource widths, packed left in menu order.
   Full row reserves 34px for Poison and four 4px gaps. */
#commander-table .ct-pinned {
  justify-content: flex-start;
}
#commander-table .ct-quick-resource,
#commander-table .ct-quick-resource:first-of-type {
  flex: 0 0 calc((100% - 50px) / 4);
  width: calc((100% - 50px) / 4);
}
/* Commander search and subdued artwork; controls retain their geometry. */
#commander-table .ct-card-suggestions { display:flex;flex-direction:column;gap:4px;max-height:200px;overflow:auto; }
#commander-table .ct-card-suggestions:empty { display:none; }
#commander-table .ct-card-suggestions button { text-align:left;justify-content:flex-start;padding:8px;min-height:36px; }
#commander-table .ct-artwork-choice { display:flex;flex-direction:column;gap:8px;margin:12px 0; }
#commander-table .ct-artwork-choice label { display:flex;align-items:center;gap:8px; }
#commander-table .ct-panel { isolation:isolate; }
#commander-table .ct-tableau-art { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.22;z-index:-1;pointer-events:none;border-radius:inherit; }
#commander-table .ct-art-credit { position:absolute;right:16px;top:90px;max-width:80%;font-size:9px;line-height:12px;opacity:.75;pointer-events:none; }
#commander-table #ct-art-edit { display:flex;flex-direction:column;gap:10px;border:0;margin:16px 0;padding:0; }
#commander-table #ct-art-edit label { display:flex;align-items:center;gap:8px; }
#commander-table .ct-profile-commanders>div>span { flex:1;min-width:0; }
#commander-table .ct-artwork-preview { width:100%;height:120px;object-fit:cover;border-radius:8px; }
#commander-table .ct-artwork-browser { display:flex;flex-direction:column;gap:8px;margin:8px 0; }
#commander-table .ct-artwork-options { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:230px;overflow:auto; }
#commander-table .ct-artwork-options:empty { display:none; }
#commander-table .ct-artwork-options button { padding:3px;min-width:0; }
#commander-table .ct-artwork-options img { width:100%;height:64px;object-fit:cover; }
#commander-table .ct-artwork-options [aria-pressed=true] { border-color:var(--ct-ink); }
#commander-table .ct-art-credit { top:auto;bottom:2px;left:8px;right:8px;max-width:none;text-align:center; }
#commander-table .ct-panel>.ct-damages,#commander-table .ct-panel>.ct-foot { transform:translateY(-4px); }
#commander-table .ct-artwork-preview { height:auto;aspect-ratio:450 / 345;object-fit:cover;object-position:50% 0%;touch-action:pan-y;user-select:none; }
#commander-table .ct-crop-controls { display:flex;flex-wrap:wrap;gap:10px; }
#commander-table .ct-crop-controls label { flex:1;min-width:100px;display:flex;flex-direction:column;gap:4px;font-size:12px; }
#commander-table .ct-crop-controls input { width:100%; }
#commander-table .ct-commander-actions { justify-content:space-between;align-items:center; }
#commander-table .ct-commander-left { display:flex;gap:8px;flex-wrap:wrap; }
#commander-table #ct-commander-art-save { margin-left:auto; }
#commander-table .ct-crop-frame { display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px;align-items:stretch; }
#commander-table .ct-crop-controls { display:block;min-width:0; }
#commander-table .ct-crop-controls label { min-width:0;height:100%; }
#commander-table .ct-crop-controls input { writing-mode:vertical-lr;direction:rtl;width:24px;height:100%;min-height:100px; }
#commander-table .ct-profile-commander-row { position:relative;isolation:isolate; }
#commander-table .ct-profile-commander-art { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;opacity:.22;z-index:-1;pointer-events:none; }
#commander-table .ct-profile-commanders .ct-profile-art-credit { position:absolute;bottom:1px;left:4px;right:4px;text-align:center;font-size:9px;line-height:11px;margin:0;pointer-events:none; }

/* Profile Commander artwork rows: inset content and subtle framing. */
#commander-table .ct-profile-commanders>.ct-profile-commander-row {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45);
}
#commander-table .ct-profile-commander-row>span {
  padding-left: 14px;
}
#commander-table .ct-profile-commander-row>[data-manage-commander] {
  margin-right: 14px;
  background: color-mix(in srgb, var(--ct-button) 72%, transparent);
}
#commander-table .ct-profile-commander-art {
  border-radius: inherit;
}

/* Readable Commander captions over varying artwork. */
#commander-table .ct-profile-commanders>.ct-profile-commander-row>span {
  margin-left: 14px;
  padding: 5px 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ct-panel) 82%, transparent);
  color: var(--ct-ink);
}

/* Caption background follows its content instead of filling the row. */
#commander-table .ct-profile-commanders>.ct-profile-commander-row>span {
  flex: 0 1 auto;
  min-width: 0;
}
#commander-table .ct-profile-commander-row>[data-manage-commander] {
  margin-left: auto;
  flex-shrink: 0;
}
#commander-table .ct-result-row { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0; }
#commander-table .ct-result-row>span { grid-column:1/-1; }
#commander-table .ct-result-row select { min-width:0;width:100%;padding:8px;background:var(--ct-button);color:var(--ct-ink);border:1px solid var(--ct-line);border-radius:6px; }
#commander-table .ct-history-list { display:flex;flex-direction:column;gap:12px; }
#commander-table .ct-history-list button { display:flex;flex-direction:column;align-items:flex-start;padding:16px;text-align:left; }
#commander-table .ct-history-results>div { display:flex;flex-direction:column;gap:5px;padding:12px 0;border-bottom:1px solid var(--ct-line); }
#commander-table .ct-event-list { padding-left:20px;overflow-wrap:anywhere; }
#commander-table .ct-event-list li { margin:10px 0; }
#commander-table .ct-event-reverted { opacity:.6;text-decoration:line-through; }
#commander-table .ct-stats-list section { border-bottom:1px solid var(--ct-line);padding:12px 0; }

/* Tableau interaction revision. */
#commander-table .ct-crop-frame { grid-template-columns:minmax(0,1fr) 28px; }
#commander-table .ct-crop-frame>.ct-artwork-preview { grid-column:1;grid-row:1; }
#commander-table .ct-crop-controls { grid-column:2;grid-row:1; }
#commander-table .ct-head,#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-head { display:grid;grid-template-columns:30px minmax(0,1fr) 64px 63px;gap:6px; }
#commander-table .ct-head>.ct-shared-tax { grid-column:1;grid-row:1; }
#commander-table .ct-head>.ct-person { grid-column:2;grid-row:1;width:100%;margin:0;min-width:0; }
#commander-table .ct-head>.ct-progress-tax { grid-column:3;grid-row:1;gap:4px; }
#commander-table .ct-head>.ct-name-status { grid-column:4;grid-row:1; }
#commander-table .ct-shared-tax { display:flex;flex-direction:column;width:30px;height:44px;padding:1px;gap:0;position:relative;overflow:hidden; }
#commander-table .ct-tax-display { flex:1;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10px;width:100%;line-height:12px; }
#commander-table .ct-tax-display+strong { border-top:1px solid var(--ct-line); }
#commander-table .ct-tax-display em { position:absolute;left:3px;font-size:18px;opacity:.25;font-style:normal; }
#commander-table .ct-quick-resource [data-resource-step="-1"] { flex:0 0 32px;width:32px; }
#commander-table .ct-handle { touch-action:none; }
#commander-table .ct-tax-chooser { padding:24px 4px 4px; }
#commander-table .ct-tax-choices { display:flex;flex-direction:column;height:100%;gap:3px; }
#commander-table .ct-tax-choices button { flex:1;font-size:28px; }
#commander-table .ct-visually-hidden { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
#commander-table .ct-life { position:relative; }
#commander-table .ct-live-delta { position:absolute;font-size:13px;line-height:16px;white-space:nowrap;pointer-events:none; }
#commander-table .ct-damage>.ct-live-delta { top:50%;transform:translateY(-50%);font-size:10px; }
#commander-table .ct-damage>.ct-delta-left { left:3px; }
#commander-table .ct-damage>.ct-delta-right { right:3px; }
#commander-table #ct-global-tools { display:flex;gap:2px;padding:5px; }
#commander-table #ct-global-tools svg { width:16px;height:16px; }
#commander-table .ct-shared-tax strong.ct-tax-display { display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;line-height:13px; }
#commander-table .ct-shared-tax .ct-tax-display small { font-size:10px; }
/* Restore the earlier shallow artwork preview, retain right-hand vertical control. */
#commander-table .ct-artwork-preview { height:120px;aspect-ratio:auto!important; }
#commander-table .ct-crop-controls input { min-height:0; }
#commander-table .ct-bar>#ct-global-tools { align-self:center;align-items:center;justify-content:center;min-height:36px;height:36px;margin:0; }
#commander-table .ct-counter-dialog { padding:8px;overflow:hidden; }
#commander-table .ct-counter-dialog .ct-menu-title { margin:0;min-height:32px;padding-right:110px; }
#commander-table .ct-counter-dialog .ct-menu-title>span { font-size:10px; }
#commander-table .ct-counter-dialog .ct-menu-title h3 { font-size:16px;margin:0;line-height:18px; }
#commander-table .ct-counter-dialog .ct-menu-actions { position:absolute;top:6px;right:6px;gap:3px; }
#commander-table .ct-counter-dialog .ct-menu-actions button { min-height:28px;height:28px;padding:3px 6px; }
#commander-table .ct-menu-tabs { display:flex;gap:3px;margin:5px 0; }
#commander-table .ct-menu-tabs button { flex:1;min-width:0;padding:4px 2px;font-size:9px;min-height:26px; }
#commander-table .ct-menu-tabs [aria-selected=true] { border-color:var(--ct-ink);background:var(--ct-button); }
#commander-table .ct-menu-category[hidden] { display:none; }
#commander-table .ct-counter-dialog .ct-counter-row { display:grid;grid-template-columns:24px minmax(0,1fr) 28px 28px 28px 28px;gap:3px;margin:0;min-height:30px;padding:0; }
#commander-table .ct-counter-dialog .ct-counter-row>* { grid-column:auto; }
#commander-table .ct-counter-dialog .ct-counter-row button { height:28px;min-height:28px;padding:2px; }
#commander-table .ct-counter-dialog .ct-counter-name { font-size:12px; }
#commander-table .ct-counter-dialog .ct-counter-row output { font-size:14px; }
#commander-table .ct-counter-dialog .ct-menu-category>.ct-row { margin:0;min-height:32px; }
#commander-table .ct-counter-dialog .ct-menu-category .ct-row button { min-height:28px;height:28px;padding:3px; }
/* Keep the crop slider exactly aligned with the fixed artwork preview. */
#commander-table .ct-crop-frame { --ct-preview-height:120px; height:var(--ct-preview-height); }
#commander-table .ct-crop-frame>.ct-artwork-preview { height:var(--ct-preview-height); }
#commander-table .ct-crop-controls,
#commander-table .ct-crop-controls label { height:var(--ct-preview-height);min-height:0; }
#commander-table .ct-crop-controls input { height:var(--ct-preview-height);min-height:0;max-height:var(--ct-preview-height);margin:0;box-sizing:border-box; }
/* Match the slider position to the visible vertical crop: top is 0, bottom is 100. */
#commander-table .ct-crop-controls input { direction:ltr; }
/* All player actions remain visible together, grouped under static headings. */
#commander-table .ct-menu-categories { display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"progress poison" "resources states" "exit exit";gap:8px 12px;margin-top:6px;transform-origin:top left; }
#commander-table .ct-menu-category { min-width:0; }
#commander-table .ct-menu-category[data-category="0"] { grid-area:progress; }
#commander-table .ct-menu-category[data-category="1"] { grid-area:resources; }
#commander-table .ct-menu-category[data-category="2"] { grid-area:poison; }
#commander-table .ct-menu-category[data-category="3"] { grid-area:states; }
#commander-table .ct-menu-category[data-category="4"] { grid-area:exit; }
#commander-table .ct-counter-dialog .ct-menu-heading { font-size:10px;line-height:14px;margin:0 0 3px;padding:0; }
#commander-table .ct-counter-dialog .ct-counter-row { grid-template-columns:20px minmax(0,1fr) 24px 24px 24px 24px;gap:2px;min-height:28px; }
#commander-table .ct-counter-dialog .ct-counter-row button { height:24px;min-height:24px; }
#commander-table .ct-counter-dialog .ct-counter-name { font-size:11px;gap:3px;line-height:13px; }
#commander-table .ct-counter-dialog .ct-menu-symbol svg { width:14px;height:14px; }
#commander-table .ct-counter-dialog .ct-menu-category>.ct-row { display:grid;grid-template-columns:20px minmax(0,1fr) 32px;gap:4px;min-height:28px;padding:0; }
#commander-table .ct-counter-dialog .ct-status-name { font-size:11px;line-height:13px;gap:3px; }
#commander-table .ct-counter-dialog .ct-tools { grid-template-columns:1fr 1fr;gap:8px; }
#commander-table .ct-counter-dialog .ct-tools button { min-height:28px;height:28px;padding:3px 8px;font-size:11px;gap:6px; }
#commander-table .ct-dialog.ct-counter-dialog { padding:8px; }
#commander-table .ct-counter-dialog .ct-menu-title { padding:0 110px 0 0;height:36px;min-height:36px; }
#commander-table .ct-counter-dialog .ct-menu-category .ct-info { width:20px;min-width:20px;height:24px;min-height:24px;padding:0; }
#commander-table .ct-counter-dialog .ct-menu-category .ct-info svg { width:16px;height:16px; }
#commander-table .ct-counter-dialog .ct-menu-category>.ct-row { height:28px; }
#commander-table .ct-counter-dialog .ct-menu-category>.ct-row label { margin:0;padding:0;min-height:0; }
#commander-table .ct-counter-dialog .ct-counter-row button { min-width:0;width:24px; }
#commander-table .ct-counter-dialog .ct-menu-category>.ct-row label,
#commander-table .ct-counter-dialog .ct-menu-category .ct-toggle { width:30px;min-width:0;max-width:30px; }
/* Identify the source opponent, retaining the shared frame for partner commanders. */
#commander-table .ct-damages>.ct-damage { border-color:color-mix(in srgb,var(--damage-source-color) 60%,var(--ct-border,#3D4767)); }
/* Offline rule reference, independent of the tracker layout. */
#commander-table .ct-rules-page { max-width:1150px;margin:auto;text-align:left; }
#commander-table .ct-rules-top { padding:12px 0;border-bottom:1px solid var(--ct-border); }
#commander-table .ct-rules-top h1 { margin:8px 0; }
#commander-table .ct-rule-search-row { display:flex;gap:8px;margin-top:5px; }
#commander-table #ct-rule-search { width:100%;min-width:0;padding:12px;border-radius:10px; }
#commander-table #ct-rule-version,#commander-table .ct-rule-footer { font-size:12px;line-height:1.5; }
#commander-table .ct-rule-shortcuts { display:flex;flex-wrap:wrap;gap:6px; }
#commander-table .ct-rule-shortcuts button { padding:6px 10px;font-size:12px;min-height:32px; }
#commander-table .ct-rules-layout { display:grid;grid-template-columns:235px minmax(0,1fr);gap:24px;margin-top:18px; }
#commander-table .ct-rule-navigation details { border-bottom:1px solid var(--ct-border);padding:10px 0; }
#commander-table .ct-rule-navigation summary { cursor:pointer;font-weight:600;line-height:1.5; }
#commander-table .ct-rule-navigation button { display:block;width:100%;text-align:left;background:transparent;padding:7px;margin:4px 0;font-size:12px;line-height:1.4; }
#commander-table #ct-rule-content { min-width:0;outline:none; }
#commander-table #ct-rule-content h2 { font-size:21px;margin:0 0 12px; }
#commander-table .ct-rule-entry { margin:8px 0;padding:12px;border:1px solid var(--ct-border);border-radius:10px; }
#commander-table .ct-rule-entry summary { cursor:pointer;line-height:1.5; }
#commander-table .ct-rule-text { white-space:pre-wrap;line-height:1.65;overflow-wrap:anywhere;font-size:14px; }
#commander-table .ct-rule-reference { display:inline;padding:0 2px;border:0;background:transparent;text-decoration:underline;min-height:0;color:inherit;font:inherit; }
#commander-table .ct-rule-results { display:grid;gap:8px; }
#commander-table .ct-rule-results>button { display:flex;flex-direction:column;gap:5px;text-align:left;padding:12px;line-height:1.4; }
#commander-table .ct-rule-results span { font-size:12px;opacity:.8; }
#commander-table .ct-rule-result-active { outline:2px solid currentColor; }
#commander-table .ct-rule-footer { margin-top:24px;padding-top:12px;border-top:1px solid var(--ct-border); }
#commander-table .ct-rule-footer a { display:inline-block;margin:4px 12px 4px 0;color:inherit; }
@media(max-width:650px){#commander-table .ct-rules-layout { grid-template-columns:1fr;gap:16px; }#commander-table .ct-rule-navigation { max-height:210px;overflow:auto; } }
#commander-table .ct-rules-page .ct-rule-results>button { align-items:stretch;text-align:left; }
#commander-table .ct-rules-page .ct-rule-navigation button { justify-content:flex-start;text-align:left; }
@media(max-width:650px){#commander-table .ct-rules-searching #ct-rule-content { grid-row:1; } }
/* Fill the available tablet height; preserve a usable minimum on phones. */
#commander-table .ct-bank .ct-panel { height:var(--tableau-height,345px);min-height:var(--tableau-height,345px);max-height:none; }
#commander-table .ct-table-layout { grid-template-rows:var(--tableau-height,345px) 52px var(--tableau-height,345px); }
#commander-table .ct-table-layout>.ct-seat[data-side=true] { height:var(--table-total-height,750px); }
#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-panel { width:var(--table-total-height,750px); }
#commander-table .ct-head>.ct-progress-tax { width:64px;min-width:0;max-width:64px;justify-self:end;display:flex;justify-content:flex-end; }
#commander-table .ct-head>.ct-name-status { grid-column:4;grid-row:1; }
/* Opposite seats remain grouped at every viewport width. */
#commander-table .ct-grid>.ct-bank { grid-template-columns:repeat(var(--bank-cols,2),minmax(0,1fr)); }
#commander-table .ct-menu-categories { display:grid;grid-template-columns:1fr 1fr;grid-template-areas:none;gap:12px; }
#commander-table .ct-menu-column { display:flex;flex-direction:column;gap:8px;min-width:0; }
#commander-table .ct-counter-dialog .ct-menu-heading { height:16px;line-height:16px;margin:0 0 2px;font-size:11px; }
#commander-table .ct-counter-dialog .ct-counter-row { height:var(--menu-row-height);min-height:0;grid-template-columns:26px minmax(0,1fr) repeat(4,var(--menu-control-width));gap:2px;align-items:center; }
#commander-table .ct-counter-dialog .ct-counter-row button { height:calc(var(--menu-row-height) - 4px);min-height:0;width:100%;padding:2px; }
#commander-table .ct-counter-dialog .ct-menu-category .ct-info { width:26px;min-width:0;height:calc(var(--menu-row-height) - 4px);min-height:0; }
#commander-table .ct-counter-dialog .ct-counter-name,#commander-table .ct-counter-dialog .ct-status-name { font-size:12px; }
#commander-table .ct-counter-dialog .ct-menu-category>.ct-row { height:var(--menu-row-height);min-height:0;grid-template-columns:26px minmax(0,1fr) 44px;align-items:center;gap:4px; }
#commander-table .ct-counter-dialog .ct-menu-category>.ct-row label { width:44px;max-width:44px;height:var(--menu-row-height);display:flex;align-items:center;justify-content:center;margin:0; }
#commander-table .ct-counter-dialog .ct-menu-category .ct-toggle { -webkit-appearance:none;appearance:none;display:block;width:40px;min-width:40px;max-width:40px;height:24px;margin:0;padding:0;position:relative;border-radius:14px; }
#commander-table .ct-counter-dialog .ct-toggle:before { width:18px;height:18px;top:2px;left:2px; }
#commander-table .ct-counter-dialog .ct-toggle:checked:before { left:18px; }
#commander-table .ct-counter-dialog .ct-tools { grid-template-columns:1fr;gap:0; }
#commander-table .ct-counter-dialog .ct-tools button { height:calc(var(--menu-row-height) - 4px);min-height:0;margin:2px 0; }
/* Full-height pages and stable first-frame tracker sizing on iPad. */
html,body { min-height:100%;background:light-dark(#F1F2FA,#101A36); }
#commander-table { min-height:100vh;min-height:100dvh;touch-action:pan-x pan-y; }
#commander-table:not([data-screen=tracker]) #ct-lobby { min-height:100vh;min-height:100dvh; }
#commander-table #ct-lobby input,#commander-table #ct-lobby select { font-size:16px; }
#commander-table .ct-counter-dialog .ct-menu-category[data-category="3"]>.ct-row,
#commander-table .ct-counter-dialog .ct-menu-category[data-category="3"]>.ct-row label { height:calc(var(--menu-row-height) - 11.333333px); }
#commander-table .ct-counter-dialog .ct-menu-category[data-category="3"] .ct-info { height:calc(var(--menu-row-height) - 15.333333px); }
/* Local control revision: fixed centre, mirrored controls and gesture-only menu handle. */
#commander-table[data-screen=tracker] .ct-panel,#commander-table .ct-counter-dialog,#commander-table .ct-bar { -webkit-user-select:none;user-select:none;-webkit-touch-callout:none; }
#commander-table .ct-panel *,#commander-table .ct-counter-dialog button { -webkit-touch-callout:none; }
#commander-table>.ct-status { position:absolute!important;width:1px;height:1px;min-height:0;padding:0;overflow:hidden;clip-path:inset(50%); }
#commander-table .ct-grid .ct-bar { display:grid;grid-template-columns:minmax(0,1fr) 36px 44px 36px minmax(0,1fr);gap:4px;position:relative;height:52px;min-height:52px;padding:4px 6px;overflow:visible; }
#commander-table .ct-bar-left { grid-column:1;display:flex;align-items:center;gap:6px;min-width:0; }
#commander-table .ct-bar-right { grid-column:5;display:flex;align-items:center;gap:6px;min-width:0; }
#commander-table .ct-bar #ct-undo { grid-column:2; }
#commander-table .ct-bar #ct-home { grid-column:3;position:relative;border:1px solid var(--ct-line);border-radius:50%;width:44px;height:44px;min-height:44px;padding:2px;z-index:3; }
#commander-table .ct-bar #ct-pause { grid-column:4; }
#commander-table .ct-bar button { min-width:0;min-height:34px;height:34px;padding:4px;border-color:transparent;background:transparent; }
#commander-table .ct-bar .ct-day-picker { gap:0;padding:1px;border:1px solid currentColor;border-radius:10px;background:var(--ct-button);flex-shrink:0; }
#commander-table .ct-bar .ct-phase-switch { border:0;background:transparent; }
#commander-table .ct-bar #ct-day-info { padding:3px; }
#commander-table .ct-bar #ct-live-history { margin-left:auto;flex-shrink:0; }
#commander-table .ct-bar .ct-sky { position:relative;inset:auto;flex:0 0 26px;width:26px;height:28px;overflow:hidden;pointer-events:none; }
#commander-table .ct-bar .ct-sky svg { position:static;width:24px;height:24px; }
#commander-table .ct-bar #ct-global-tools { margin-left:auto;min-height:34px;height:34px;display:flex;align-items:center;gap:1px; }
#commander-table .ct-clock { border:0;background:none;padding:0;font-variant-numeric:tabular-nums; }
#commander-table .ct-dual-icon { width:24px;height:24px;position:relative;display:block; }
#commander-table #ct-finish .ct-dual-icon svg { position:absolute;width:16px;height:16px;left:0;top:0; }
#commander-table #ct-finish .ct-dual-icon svg+svg { left:8px;top:8px;transform:rotate(180deg); }
#commander-table #ct-finish { height:40px; }
#commander-table[data-bar-collapsed=true] .ct-grid .ct-bar { height:0;min-height:0;padding:0; }
#commander-table[data-bar-collapsed=true] .ct-bar>:not(#ct-home) { display:none; }
#commander-table[data-bar-collapsed=true] .ct-bar #ct-home { position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:24px;height:24px;min-height:24px;background:var(--ct-panel); }
#commander-table[data-bar-collapsed=true] #ct-home .ct-dual-icon { display:none; }
#commander-table[data-bar-collapsed=true] .ct-table-layout { grid-template-rows:var(--tableau-height) 0px var(--tableau-height); }
#commander-table .ct-menu-dismiss { position:absolute;bottom:2px;left:50%;transform:translateX(-50%);width:100px;height:28px;min-height:28px;padding:8px;background:transparent;border:0;touch-action:none; }
#commander-table .ct-menu-dismiss span { display:block;height:5px;width:64px;margin:auto;background:var(--ct-muted);border-radius:5px; }
#commander-table .ct-damage>.ct-delta-left { left:25%;transform:translate(-50%,-50%); }
#commander-table .ct-damage>.ct-delta-right { left:75%;right:auto;transform:translate(-50%,-50%); }
#commander-table[data-reduce-motion=true] *,#commander-table[data-reduce-motion=true] *:before { animation:none!important;transition:none!important; }
#commander-table .ct-settings-list { display:grid;gap:18px; }
#commander-table .ct-settings-list label { display:flex;align-items:center;justify-content:space-between;gap:16px; }
#commander-table .ct-settings-list small { display:block;font-size:12px;color:var(--ct-muted); }
#commander-table .ct-primary-profile { width:100%;border:1px solid var(--ct-gold);border-radius:14px;padding:18px;margin:14px 0 24px;background:var(--ct-button); }
#commander-table .ct-primary-option { display:block;width:100%;margin:8px 0; }
@media(max-width:620px){#commander-table .ct-grid .ct-bar { grid-template-columns:minmax(0,1fr) 28px 36px 28px minmax(0,1fr);height:86px;min-height:86px;gap:1px;padding:2px; }#commander-table .ct-bar #ct-home { width:36px;height:36px;min-height:36px; }#commander-table .ct-bar-left,#commander-table .ct-bar-right { flex-wrap:wrap;gap:2px; }#commander-table .ct-bar .ct-sky { display:none; }#commander-table .ct-clock { width:100%;font-size:11px; }#commander-table .ct-bar button { padding:2px; }}
#commander-table .ct-counter-dialog .ct-counter-name { white-space:nowrap; }
/* Equal square symbols, fitted to the selected player's tableau without scrolling. */
#commander-table .ct-dialog.ct-counter-dialog{
  --menu-square:64px;--menu-space:clamp(2px,calc(var(--menu-square)*.08),8px);--menu-gap:var(--menu-space);--menu-pad:var(--menu-space);
  --menu-font:clamp(8px,calc(var(--menu-square)*.18),14px);--menu-caption:calc(var(--menu-font)*2.3);--menu-heading:calc(var(--menu-font)*1.3);
  --menu-header:clamp(22px,calc(var(--menu-square)*.55),40px);--menu-footer:clamp(12px,calc(var(--menu-square)*.35),28px);--menu-action:clamp(20px,calc(var(--menu-square)*.55),44px);
  display:flex;flex-direction:column;padding:var(--menu-pad);overflow:hidden;background:var(--ct-panel);
}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-title{flex:none;display:flex;align-items:center;gap:var(--menu-space);height:var(--menu-header);min-height:0;min-width:0;margin:0;padding:0 78px 0 0;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-title h3{min-width:0;margin:0;font-size:clamp(16px,calc(var(--menu-square)*.34),28px);line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-title button{flex:none;display:flex;align-items:center;justify-content:center;width:var(--menu-header);height:var(--menu-header);min-width:0;min-height:0;padding:2px;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-title button svg{width:65%;height:65%;}
#commander-table .ct-dialog.ct-counter-dialog .ct-player-name-form{flex:1;display:flex;align-items:center;gap:var(--menu-space);min-width:0;height:100%;margin:0;}
#commander-table .ct-dialog.ct-counter-dialog .ct-player-name-form input{flex:1;min-width:0;width:0;height:100%;min-height:0;margin:0;padding:0 var(--menu-space);font-size:clamp(16px,calc(var(--menu-square)*.34),28px);}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-title [hidden]{display:none;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-actions{top:var(--menu-pad);right:var(--menu-pad);margin:0;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-actions button{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:0;height:var(--menu-header);padding:2px 6px;font-size:var(--menu-font);}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-actions svg{width:clamp(12px,calc(var(--menu-square)*.3),24px);height:clamp(12px,calc(var(--menu-square)*.3),24px);}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-categories{flex:1;min-height:0;display:grid;grid-template-columns:1fr 2fr 1.5fr;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-areas:"progress resources poison" "progress resources states";gap:var(--menu-gap);margin-top:var(--menu-gap);overflow:hidden;align-items:stretch;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-category{display:grid;grid-template-rows:var(--menu-heading) minmax(0,1fr);min-width:0;min-height:0;gap:var(--menu-gap);padding:var(--menu-pad);border:1px solid var(--ct-line);border-radius:10px;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-heading{height:auto;font-size:clamp(8px,calc(var(--menu-font)*.85),12px);line-height:var(--menu-heading);letter-spacing:.04em;margin:0;padding:0;white-space:nowrap;text-align:center;}
#commander-table .ct-dialog.ct-counter-dialog #ct-progress-list,#commander-table .ct-dialog.ct-counter-dialog #ct-counter-list{display:grid;grid-template-rows:repeat(2,minmax(0,1fr));gap:var(--menu-gap);min-height:0;}
#commander-table .ct-dialog.ct-counter-dialog #ct-counter-list{position:relative;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:calc(var(--menu-space)*2 + 1px);}
#commander-table .ct-dialog.ct-counter-dialog #ct-counter-list::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - .5px);width:1px;background:var(--ct-line);pointer-events:none;}
#commander-table .ct-dialog.ct-counter-dialog #ct-poison-list{display:grid;grid-row:2;min-height:0;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-row{display:grid;grid-template-columns:calc(var(--menu-square)/2) var(--menu-square) calc(var(--menu-square)/2);grid-template-rows:var(--menu-caption) var(--menu-square);width:max-content;height:max-content;min-height:0;gap:2px;margin:0;padding:0;border:0;align-self:center;justify-self:center;align-items:center;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-row>*{grid-column:auto;min-width:0;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-caption{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:4px;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-name{white-space:nowrap;font-size:var(--menu-font);line-height:var(--menu-caption);}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-row button{min-width:0;min-height:0;width:100%;height:var(--menu-square);padding:0;border-radius:clamp(4px,calc(var(--menu-square)*.12),10px);}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-row [data-counter-step]{font-size:clamp(16px,calc(var(--menu-square)*.4),32px);font-weight:600;line-height:1;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-symbol,#commander-table .ct-dialog.ct-counter-dialog .ct-menu-state{display:flex;justify-content:center;align-items:center;touch-action:none;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-symbol svg,#commander-table .ct-dialog.ct-counter-dialog .ct-menu-state svg{flex:none;width:calc(var(--menu-square)*.72);height:calc(var(--menu-square)*.72);}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-row output{font-size:clamp(10px,calc(var(--menu-square)*.26),20px);line-height:var(--menu-caption);font-weight:700;font-variant-numeric:tabular-nums;text-align:center;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-states{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--menu-gap);min-height:0;align-items:center;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-status{display:grid;grid-template-rows:var(--menu-caption) var(--menu-square);justify-items:center;gap:2px;min-height:0;min-width:0;}
#commander-table .ct-dialog.ct-counter-dialog .ct-status-name{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:var(--menu-font);line-height:1.1;text-align:center;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-state{width:var(--menu-square);height:var(--menu-square);min-height:0;min-width:0;padding:0;border-radius:clamp(4px,calc(var(--menu-square)*.12),10px);}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-symbol[aria-pressed=true],#commander-table .ct-dialog.ct-counter-dialog .ct-menu-state[aria-pressed=true]{border-color:var(--ct-gold);color:var(--ct-gold);background:color-mix(in srgb,var(--ct-gold) 18%,var(--ct-button));}
#commander-table .ct-dialog.ct-counter-dialog .ct-tools{flex:none;display:flex;justify-content:space-between;width:100%;gap:var(--menu-space);margin:var(--menu-space) 0 0;min-height:0;padding:0;border:0;}
#commander-table .ct-dialog.ct-counter-dialog .ct-tools button{display:flex;justify-content:center;align-items:center;width:min(38%,256px);height:var(--menu-action);min-height:0;min-width:0;margin:0;padding:2px;font-size:var(--menu-font);gap:3px;white-space:nowrap;}
#commander-table .ct-dialog.ct-counter-dialog .ct-tools svg{width:clamp(10px,calc(var(--menu-square)*.3),24px);height:clamp(10px,calc(var(--menu-square)*.3),24px);}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-dismiss{bottom:var(--menu-space);width:clamp(36px,var(--menu-square),84px);height:var(--menu-action);min-height:0;padding:0;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-dismiss span{height:4px;width:clamp(36px,var(--menu-square),84px);}
/* Two-row groups reserve the same heading/border space as the stacked groups beside them. */
#commander-table .ct-dialog.ct-counter-dialog:is([data-menu-layout=wide],[data-menu-layout=short]) :is(#ct-progress-list,#ct-counter-list){row-gap:calc(var(--menu-heading) + var(--menu-gap)*2 + var(--menu-pad)*2 + 2px);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=narrow] .ct-menu-categories{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,2fr) minmax(0,2fr) minmax(0,1fr);grid-template-areas:"progress poison" "resources resources" "states states";}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=narrow] #ct-poison-list{grid-template-rows:repeat(2,minmax(0,1fr));gap:var(--menu-gap);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=compact] .ct-menu-categories{grid-template-columns:1.06fr .94fr;grid-template-rows:minmax(0,1fr) minmax(0,2fr);grid-template-areas:"progress poison" "resources states";}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=compact] #ct-progress-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=strip]{--menu-font:clamp(6px,calc(var(--menu-square)*.18),14px);--menu-header:clamp(18px,calc(var(--menu-square)*.5),40px);--menu-footer:clamp(10px,calc(var(--menu-square)*.3),28px);--menu-action:clamp(14px,calc(var(--menu-square)*.55),44px);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=strip] .ct-menu-categories{grid-template-columns:2.2fr 4fr 2.2fr 3fr;grid-template-rows:minmax(0,1fr);grid-template-areas:"progress resources poison states";}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=strip] #ct-poison-list{grid-template-rows:repeat(2,minmax(0,1fr));gap:var(--menu-gap);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=short]{--menu-font:clamp(6px,calc(var(--menu-square)*.18),14px);--menu-header:clamp(18px,calc(var(--menu-square)*.5),40px);--menu-action:clamp(14px,calc(var(--menu-square)*.55),44px);--menu-footer:12px;}
#commander-table .ct-dialog.ct-counter-dialog:is([data-menu-layout=strip],[data-menu-layout=short]) .ct-menu-heading{font-size:clamp(6px,calc(var(--menu-font)*.85),12px);letter-spacing:0;}
#commander-table .ct-dialog.ct-counter-dialog:is([data-menu-layout=strip],[data-menu-layout=short]) .ct-counter-row [data-counter-step]{font-size:clamp(10px,calc(var(--menu-square)*.4),32px);}
#commander-table .ct-dialog.ct-counter-dialog:is([data-menu-layout=strip],[data-menu-layout=short]) .ct-counter-row output{font-size:clamp(7px,calc(var(--menu-square)*.26),20px);}
#commander-table .ct-bar[data-phase=day] .ct-phase-switch { background:#fff8dd;color:#101A36;border-color:#7883A8; }
/* Rotationally symmetric home mark; the collapsed control remains above the tableaus. */
#commander-table #ct-home .ct-home-mark { display:block;width:32px;height:32px;margin:auto; }
#commander-table[data-bar-collapsed=true] .ct-grid .ct-bar { z-index:3; }
#commander-table[data-bar-collapsed=true] .ct-bar #ct-home { grid-column:auto;grid-row:auto;width:36px;height:36px;min-height:36px;border:2px solid var(--ct-muted);background:var(--ct-panel);box-shadow:0 0 0 3px var(--ct-bg); }
#commander-table[data-bar-collapsed=true] #ct-home .ct-home-mark { display:none; }

/* Quiet scenery stays behind the controls and reacts only to phase changes. */
#commander-table .ct-bar::before { content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:.38;background-repeat:no-repeat; }
#commander-table .ct-bar-left,#commander-table .ct-bar-right { position:relative;z-index:1; }
#commander-table .ct-bar[data-phase=night]::before { background-image:radial-gradient(circle at 8% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 19% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 24% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 32% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 42% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 54% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 63% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 73% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 85% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 94% 43%,#e2ecff 0 .65px,transparent 1.3px),radial-gradient(circle at 5% 20%,#fff 0 1px,transparent 1.6px),radial-gradient(circle at 16% 80%,#fff 0 .8px,transparent 1.4px),radial-gradient(circle at 27% 15%,#fff 0 1px,transparent 1.6px),radial-gradient(circle at 37% 77%,#fff 0 .8px,transparent 1.4px),radial-gradient(circle at 47% 9%,#fff 0 1px,transparent 1.6px),radial-gradient(circle at 58% 85%,#fff 0 .8px,transparent 1.4px),radial-gradient(circle at 68% 18%,#fff 0 1px,transparent 1.6px),radial-gradient(circle at 79% 78%,#fff 0 1px,transparent 1.6px),radial-gradient(circle at 91% 12%,#fff 0 .8px,transparent 1.4px),radial-gradient(circle at 98% 74%,#fff 0 1px,transparent 1.6px); }
#commander-table .ct-bar[data-phase=day]::before { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 52'%3E%3Cg fill='none' stroke='%233e6270' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M180 38q4-3 7 2q3-5 7-2M245 18q4-3 7 2q3-5 7-2M275 10q5-3 9 3q4-6 9-3M365 38q4-3 7 2q3-5 7-2M445 9q4-3 7 2q3-5 7-2M665 12q4-3 7 2q3-5 7-2M705 39q4-3 7 2q3-5 7-2M805 10q5-3 9 3q4-6 9-3M945 39q4-3 7 2q3-5 7-2M1010 12q5-3 9 3q4-6 9-3M1090 40q4-3 7 2q3-5 7-2'/%3E%3C/g%3E%3C/svg%3E");background-size:100% 100%; }
#commander-table .ct-bar[data-phase=day].ct-phase-change::before { animation:ct-birds-drift 6s ease-out; }
#commander-table .ct-bar[data-phase=night].ct-phase-change::before { animation:ct-stars-appear 1.2s ease-out; }
@keyframes ct-birds-drift { from { background-position:-38px 3px;opacity:0; } 20% { opacity:.38; } to { background-position:0 0;opacity:.38; } }
@keyframes ct-stars-appear { from { opacity:0; } to { opacity:.38; } }
#commander-table .ct-bar[data-phase=night]::before { opacity:.82; }
#commander-table .ct-bar[data-phase=night].ct-phase-change::before { animation:ct-stars-release 1.2s ease-out; }
@keyframes ct-stars-release { from { opacity:0; } to { opacity:.82; } }
#commander-table[data-bar-collapsed=true] .ct-bar::before { display:none; }
#commander-table[data-reduce-motion=true] .ct-bar::before { animation:none!important; }
@media(prefers-reduced-motion:reduce) { #commander-table .ct-bar::before { animation:none!important; } }

/* Keep the info control legible and give the selected phase a solid thumb. */
#commander-table .ct-bar #ct-day-info { color:inherit;opacity:1; }
#commander-table .ct-bar[data-phase=day] .ct-day-picker { background:#fff8dd;color:#101A36;border-color:#7883A8; }
#commander-table .ct-bar[data-phase=night] .ct-day-picker { background:#172337;color:#edf1ff;border-color:#8495b3; }
#commander-table .ct-bar .ct-phase-position { opacity:.65; }
#commander-table .ct-bar .ct-phase-switch[data-state=day] [data-phase-position=day] { background:#f4c54e;color:#30260e;opacity:1;border:1px solid #795b13; }
#commander-table .ct-bar .ct-phase-switch[data-state=night] [data-phase-position=night] { background:#d3e2ff;color:#192a4a;opacity:1;border:1px solid #eef4ff; }
#commander-table .ct-bar .ct-phase-switch[data-state=unset] [data-phase-position=unset] { background:var(--ct-ink);color:var(--ct-bg);opacity:1;border:1px solid var(--ct-muted); }
#commander-table .ct-bar .ct-phase-switch[data-state=day] [data-phase-position=day] svg,#commander-table .ct-bar .ct-phase-switch[data-state=night] [data-phase-position=night] svg,#commander-table .ct-bar .ct-phase-switch[data-state=unset] [data-phase-position=unset] svg { stroke-width:2.5; }
/* V0.0.2a: fixed seat layouts, device orientation and readable controls. */
#commander-table .ct-grid { gap:4px;padding:0;margin:8px; }
#commander-table .ct-table-layout { grid-template-rows:var(--tableau-height) var(--central-height,52px) var(--tableau-height); }
#commander-table .ct-grid>.ct-bank { grid-template-columns:repeat(var(--bank-cols,2),minmax(0,1fr)); }
#commander-table .ct-grid .ct-bar { gap:8px; }
#commander-table .ct-bar-left,#commander-table .ct-bar-right { gap:12px; }
#commander-table .ct-bar button,#commander-table .ct-bar .ct-clock { background:var(--ct-button);color:var(--ct-ink);border:1px solid var(--ct-line);border-radius:9px; }
#commander-table .ct-bar .ct-clock { padding:6px;white-space:nowrap; }
#commander-table .ct-bar[data-phase=day] button,#commander-table .ct-bar[data-phase=day] .ct-clock { background:#fff8e7;color:#101A36;border-color:#7883A8; }
#commander-table .ct-bar[data-phase=night] button,#commander-table .ct-bar[data-phase=night] .ct-clock { background:#26364e;color:#f0f4ff;border-color:#7889a6; }
#commander-table .ct-bar .ct-day-picker { gap:0; }
#commander-table .ct-bar #ct-day-info,#commander-table .ct-bar #ct-daynight { border:0;background:transparent;color:inherit; }
#commander-table .ct-panel button:not(.ct-handle) { background:var(--ct-control-surface,var(--ct-button));color:var(--ct-ink); }
#commander-table .ct-panel .ct-damage { background:color-mix(in srgb,var(--ct-panel) 88%,transparent); }
#commander-table .ct-primary-profile { display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:8px; }
#commander-table .ct-primary-profile strong { font-size:24px; }
#commander-table .ct-onboarding { max-width:520px;margin:auto;padding:32px 16px; }
#commander-table .ct-onboarding form,#commander-table .ct-onboarding label { display:grid;gap:12px; }
#commander-table .ct-onboarding form { gap:24px; }
#commander-table .ct-onboarding input,#commander-table .ct-onboarding select { padding:12px;max-width:100%; }
#commander-table #ct-rotate-hint { position:fixed;inset:0;z-index:100;background:var(--ct-bg);color:var(--ct-ink);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px; }
#commander-table #ct-rotate-hint>span { font-size:72px; }
#commander-table #ct-rotate-hint[hidden],#commander-table:not([data-screen=tracker]) #ct-rotate-hint { display:none; }
@media(max-width:620px){#commander-table .ct-bar-left,#commander-table .ct-bar-right { gap:4px; }#commander-table .ct-grid .ct-bar { gap:4px; } }
@media(max-width:620px){
 #commander-table .ct-grid .ct-bar { height:132px;min-height:132px;grid-template-rows:36px 44px 36px; }
 #commander-table .ct-bar-left { grid-column:1/-1;grid-row:1;flex-wrap:nowrap;gap:8px; }
 #commander-table .ct-bar-right { grid-column:1/-1;grid-row:3;flex-wrap:nowrap;gap:8px; }
 #commander-table .ct-bar #ct-undo,#commander-table .ct-bar #ct-home,#commander-table .ct-bar #ct-pause { grid-row:2; }
 #commander-table .ct-bar .ct-clock { width:auto; }
 #commander-table[data-bar-collapsed=true] .ct-grid .ct-bar { height:0;min-height:0;grid-template-rows:0; }
 #commander-table[data-bar-collapsed=true] .ct-bar #ct-home { grid-row:auto; }
}
#commander-table #ct-profile-archive[hidden] { display:none; }
/* Unified fantasy scenery and translucent tableau controls. */
#commander-table .ct-grid .ct-bar { container-type:inline-size; }
#commander-table .ct-bar::after { content:"";position:absolute;inset:0;z-index:0;pointer-events:none;border-radius:inherit;background-image:linear-gradient(#101A3644,#101A3644),url('../assets/images/phase-landscapes.png');background-size:100% 100%,100% auto;background-position:center,center calc(50% + 22.2222cqw);background-repeat:no-repeat; }
#commander-table .ct-bar[data-phase=day]::after { background-image:linear-gradient(#101A3622,#101A3622),url('../assets/images/phase-landscapes.png');background-position:center,center; }
#commander-table .ct-bar[data-phase=night]::after { background-image:linear-gradient(#09152622,#09152622),url('../assets/images/phase-landscapes.png');background-position:center,center calc(50% - 22.2222cqw); }
#commander-table .ct-bar::before { z-index:1; }
#commander-table .ct-bar-left,#commander-table .ct-bar-right,#commander-table .ct-bar>button { z-index:2; }
#commander-table[data-bar-collapsed=true] .ct-bar::after { display:none; }
#commander-table .ct-panel { --ct-control-surface:color-mix(in srgb,var(--ct-panel) 60%,transparent);--ct-marker-size:44px; }
#commander-table .ct-tableau-art { opacity:1;filter:none; }
#commander-table .ct-panel button:not(.ct-handle),#commander-table .ct-panel .ct-life,#commander-table .ct-panel .ct-damage-pair { background:var(--ct-control-surface); }
#commander-table .ct-panel .ct-life button,#commander-table .ct-panel .ct-damage-pair .ct-damage { background:transparent; }
#commander-table .ct-panel .ct-quick-resource { background:transparent; }
#commander-table .ct-panel .ct-life { border-radius:10px;background:transparent; }
#commander-table .ct-head,#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-head { grid-template-columns:30px minmax(0,1fr) calc(var(--ct-marker-size)*2 + 4px) calc(var(--ct-marker-size)*2 + 4px);gap:6px; }
#commander-table .ct-head>.ct-progress-tax,#commander-table .ct-head>.ct-name-status { width:calc(var(--ct-marker-size)*2 + 4px);max-width:none;min-width:0;display:flex;gap:4px; }
#commander-table .ct-head .ct-progress-tax [data-pinned-counter],#commander-table .ct-head .ct-monarch,#commander-table .ct-head .ct-initiative-slot,#commander-table .ct-head .ct-initiative-slot button { width:var(--ct-marker-size);min-width:var(--ct-marker-size);max-width:var(--ct-marker-size);height:var(--ct-marker-size);min-height:var(--ct-marker-size);flex:0 0 var(--ct-marker-size);border-radius:5px;padding:2px; }
@container(max-width:440px){#commander-table .ct-panel { --ct-marker-size:36px; }}
/* Legible identity, separated Poison and active status colours. */
#commander-table .ct-panel>.ct-handle { background:var(--ct-control-surface);border:1px solid var(--ct-line);border-radius:7px; }
#commander-table .ct-head>.ct-person { background:var(--ct-control-surface);padding:4px 7px;border-radius:6px; }
#commander-table .ct-head .ct-monarch[aria-pressed=true],#commander-table .ct-head .ct-monarch[aria-pressed=true] svg { color:#E5C84A;stroke:#E5C84A; }
#commander-table .ct-head [data-pinned-status=initiative][aria-pressed=true],#commander-table .ct-head [data-pinned-status=initiative][aria-pressed=true] svg { color:#70baff;stroke:#70baff; }
#commander-table .ct-quick-resource,#commander-table .ct-quick-resource:first-of-type { flex:0 0 calc((100% - 12px)/4);width:calc((100% - 12px)/4); }
#commander-table .ct-life:has(.ct-poison-slot) { padding-bottom:46px; }
#commander-table .ct-poison-slot { position:absolute;bottom:0;left:50%;transform:translateX(-50%);height:40px; }
#commander-table .ct-panel .ct-poison-slot [data-pinned-counter=poison] { width:68px;min-width:68px;height:40px;min-height:40px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:17px;background:var(--ct-control-surface);border:1px solid var(--ct-line); }
#commander-table .ct-poison-slot svg { width:24px;height:24px; }
#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-life:has(.ct-poison-slot) { height:auto;min-height:0;padding-bottom:28px; }
#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-life:has(.ct-poison-slot) .ct-number { font-size:28px!important;line-height:1; }
#commander-table .ct-life:has(.ct-poison-slot) .ct-number { bottom:46px; }
#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-life:has(.ct-poison-slot) .ct-number { bottom:28px; }
/* Review revision: centred pickers, restrained surfaces, larger readable values. */
#commander-table #ct-picker-new,#commander-table #ct-picker-commander-new { display:flex;align-items:center;justify-content:center;gap:8px;width:100%; }
#commander-table [data-pick-commander] { position:relative;isolation:isolate;display:flex;justify-content:center;text-align:center;min-height:64px;overflow:hidden;padding:12px 32px; }
#commander-table [data-pick-commander]>span { flex:0 1 auto;text-align:center;background:var(--ct-control-surface,var(--ct-button));border-radius:6px;padding:4px 8px; }
#commander-table [data-pick-commander]>svg { position:absolute;right:10px;top:50%;transform:translateY(-50%); }
#commander-table .ct-grid .ct-bar { --bar-frame:color-mix(in srgb,var(--ct-ink) 60%,transparent);--bar-surface:color-mix(in srgb,var(--ct-button) 80%,transparent); }
#commander-table .ct-bar[data-phase=day] { --bar-frame:#7883A8;--bar-surface:#fff8e7cc; }
#commander-table .ct-bar[data-phase=night] { --bar-frame:#8495b3;--bar-surface:#26364ecc; }
#commander-table .ct-bar button:not(:is(#ct-home,#ct-daynight,#ct-day-info)),#commander-table .ct-bar .ct-clock { background:var(--bar-surface);border:1px solid var(--bar-frame);border-radius:10px;height:34px;min-height:34px; }
#commander-table .ct-bar button:not(:is(#ct-home,#ct-daynight)) { width:34px;min-width:34px;display:flex;justify-content:center;align-items:center;padding:4px; }
#commander-table .ct-bar .ct-day-picker { height:36px;background:var(--bar-surface);border-color:var(--bar-frame); }
#commander-table .ct-bar #ct-global-tools { position:relative;gap:0; }


#commander-table .ct-player-title { position:absolute;top:2px;left:12px;max-width:calc(50% - 56px);font-size:14px;line-height:20px;font-weight:650;background:var(--ct-control-surface);border-radius:5px;padding:1px 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
#commander-table .ct-head>.ct-person { background:transparent;padding:0;align-self:center; }
#commander-table .ct-head .ct-commander { display:table;width:fit-content;max-width:100%;padding:4px 7px;background:var(--ct-control-surface);border-radius:6px;font-size:13px;line-height:16px; }
#commander-table .ct-head .ct-partner-name { font-size:inherit;line-height:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
#commander-table .ct-head .ct-commander[hidden] { display:none; }
#commander-table .ct-panel { --ct-marker-size:44px; }
#commander-table .ct-head>.ct-progress-tax,#commander-table .ct-head>.ct-name-status { align-items:center;align-self:center;height:44px; }
#commander-table .ct-head .ct-initiative-slot { order:0; }
#commander-table .ct-head .ct-monarch { order:1; }
#commander-table .ct-life,#commander-table .ct-life:has(.ct-poison-slot) { padding-bottom:46px; }
#commander-table .ct-life .ct-number,#commander-table .ct-life:has(.ct-poison-slot) .ct-number { bottom:46px;line-height:1; }
#commander-table .ct-panel .ct-damage b { font-size:36px; }
#commander-table .ct-panel .ct-damage>span,#commander-table .ct-panel .ct-pair-player { font-size:14.3px;line-height:17px; }
#commander-table .ct-panel .ct-damage-pair { padding-top:23px; }
#commander-table .ct-panel .ct-quick-resource { background:var(--ct-control-surface);overflow:hidden; }
#commander-table .ct-panel .ct-quick-resource button { background:transparent;border-radius:0; }
#commander-table .ct-quick-resource [data-resource-step="-1"] { width:48px;flex-basis:48px;font-size:24px; }
#commander-table .ct-quick-resource [data-resource-step="-1"]::after { top:6px;bottom:6px;border-right:2px solid var(--ct-muted);height:auto; }
#commander-table .ct-panel.ct-eliminated::after { content:"";position:absolute;inset:0;background:#0009;z-index:3;border-radius:inherit;pointer-events:none; }
#commander-table .ct-eliminated .ct-life { z-index:4; }
#commander-table .ct-eliminated .ct-skull { width:min(180px,90%);height:min(180px,90%);object-fit:contain; }
#commander-table .ct-overlay:has(.ct-counter-dialog) { background:transparent;overflow:hidden;border-radius:14px; }
#commander-table .ct-counter-dialog { background:color-mix(in srgb,var(--ct-panel) 95%,transparent); }
#commander-table .ct-finish-top { display:flex;justify-content:space-between;gap:12px;margin:16px 0; }
#commander-table .ct-finish-save { display:flex;flex-direction:column;align-items:center;gap:10px;margin-top:20px; }
#commander-table #ct-draw-game[aria-pressed=true] { border-color:var(--ct-gold);background:color-mix(in srgb,var(--ct-gold) 20%,var(--ct-button)); }
#commander-table .ct-counter-dialog { transform:translate(-50%,-50%) rotate(var(--dialog-angle,0deg)) translateY(var(--menu-slide,0px)); }
#commander-table .ct-quick-resource [data-resource-step="-1"] { width:min(48px,40%);flex-basis:min(48px,40%); }
#commander-table .ct-rules-top { position:relative; }
#commander-table #ct-rule-language { float:right;margin:0 0 8px 12px; }
#commander-table .ct-eliminated .ct-life { z-index:auto; }
#commander-table .ct-eliminated .ct-number { z-index:4; }
#commander-table .ct-damages>button.ct-damage b { top:calc(50% + 10px); }
#commander-table .ct-bar #ct-home { background:var(--bar-surface);border-color:var(--bar-frame); }
#commander-table .ct-head .ct-initiative-slot { padding:0; }
@media(max-width:620px){#commander-table .ct-grid .ct-bar { grid-template-columns:minmax(0,1fr) 34px 44px 34px minmax(0,1fr); }}
/* Corrections from the desktop acceptance checklist. */
#commander-table .ct-dialog>.ct-close { position:absolute;right:12px;top:12px;float:none;width:32px;min-width:32px;height:32px;min-height:32px;padding:0;display:grid;place-items:center;font-size:23px;line-height:1; }
#commander-table .ct-dialog>#ct-dialog-title { min-height:32px;padding-right:36px; }
#commander-table .ct-profile-picker>button[data-pick-commander] { display:flex;justify-content:center;align-items:center;padding:14px 32px 22px; }
#commander-table .ct-profile-picker>button[data-pick-commander]>span { width:fit-content;max-width:100%;flex:0 1 auto;text-align:center;background:color-mix(in srgb,var(--ct-panel) 50%,transparent); }
#commander-table [data-pick-commander] .ct-profile-art-credit { position:absolute;left:8px;right:8px;bottom:3px;max-width:calc(100% - 16px);font-size:9px;line-height:11px;text-align:center;pointer-events:none; }
#commander-table .ct-head>.ct-person .ct-commander { display:table;width:fit-content;max-width:100%;align-self:flex-start;font-size:13px;line-height:16px; }


#commander-table .ct-panel.ct-eliminated button:disabled { opacity:1;filter:none; }
#commander-table .ct-panel.ct-eliminated::after { z-index:10; }
#commander-table .ct-eliminated .ct-number { z-index:11; }
#commander-table .ct-result-row,#commander-table .ct-result-labels { display:grid;grid-template-columns:minmax(65px,1fr) 54px minmax(120px,1.65fr);gap:8px;align-items:center;margin:8px 0; }
#commander-table .ct-result-row>span { grid-column:auto;overflow-wrap:anywhere; }
#commander-table .ct-result-row [data-rank] { text-align:center;padding:8px 2px; }
#commander-table .ct-result-labels { font-size:12px;color:var(--ct-muted); }
#commander-table .ct-finish-section { margin:16px 0;padding-top:12px;border-top:1px solid var(--ct-line); }
#commander-table .ct-finish-section h4 { margin:0 0 10px;text-align:center; }
#commander-table .ct-finish-section:has(#ct-abort-game)>h4 { color:#ff8585; }
#commander-table .ct-finish-section:has(#ct-save-end)>h4 { color:#E5C84A; }
#commander-table .ct-finish-actions { display:grid;grid-template-columns:1fr 1fr;gap:10px; }
#commander-table .ct-finish-actions button { width:100%;min-width:0; }
#commander-table .ct-draw-row { display:flex;justify-content:center;margin:18px 0 12px; }
#commander-table #ct-finish-confirmation[hidden],#commander-table #ct-finish-form[hidden] { display:none; }
#commander-table .ct-head>.ct-person .ct-commander[hidden] { display:none; }

/* Quick-start artwork mirroring follows the seat, independently of player identity. */
#commander-table .ct-tableau-art.ct-art-flipped { transform:rotate(180deg) scaleY(-1); }
/* Collapsed controls must stay hidden regardless of individual button styles. */
#commander-table[data-bar-collapsed=true] .ct-bar button:not(#ct-home) { display:none!important; }

/* Follow-up acceptance: centred close marks and result visibility. */
#commander-table .ct-dialog>.ct-close,#commander-table #ct-rule-clear { font-size:0; }
#commander-table #ct-rule-clear { position:relative; }
#commander-table .ct-close::before,#commander-table .ct-close::after,#commander-table #ct-rule-clear::before,#commander-table #ct-rule-clear::after { content:"";position:absolute;left:50%;top:50%;width:15px;height:2px;background:currentColor;border-radius:1px;transform:translate(-50%,-50%) rotate(45deg);pointer-events:none; }
#commander-table .ct-close::after,#commander-table #ct-rule-clear::after { transform:translate(-50%,-50%) rotate(-45deg); }
#commander-table .ct-profile-picker>button[data-pick-commander]>span { font-size:1.5em; }
#commander-table #ct-finish-form>.ct-finish-section:first-child { border-top:0;padding-top:0;padding-bottom:16px;border-bottom:1px solid var(--ct-line); }
#commander-table .ct-result-row [data-reason][hidden] { display:block;visibility:hidden; }
#commander-table .ct-exit-reason { display:block;margin-bottom:8px; }
#commander-table #ct-exit-reason { width:100%;min-height:44px;padding:8px;background:var(--ct-button);color:var(--ct-ink);border:1px solid var(--ct-line);border-radius:6px; }
#commander-table .ct-result-labels>span:last-child { overflow-wrap:anywhere; }
#commander-table .ct-stat-table-wrap { overflow-x:auto; }
#commander-table .ct-commander-stats { width:100%;border-collapse:collapse; }
#commander-table .ct-commander-stats th,#commander-table .ct-commander-stats td { text-align:right;padding:12px 10px;border-bottom:1px solid var(--ct-line); }
#commander-table .ct-commander-stats th:first-child { text-align:left; }
#commander-table .ct-general-metrics { display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:12px;margin:16px 0 24px; }
#commander-table .ct-general-metrics>div { display:flex;flex-direction:column;gap:8px;padding:16px;border:1px solid var(--ct-line);border-radius:10px;background:var(--ct-panel); }
#commander-table .ct-general-metrics strong { font-size:22px; }
#commander-table .ct-general-metrics span { font-size:13px;color:var(--ct-muted); }
#commander-table .ct-general-breakdowns { display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px; }
#commander-table .ct-stat-breakdown dl>div { display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--ct-line); }
#commander-table .ct-stat-breakdown dd { margin:0;font-weight:600; }

/* Statistics: centred text within cards, table cells and breakdown columns. */
#commander-table .ct-statistics-page { text-align:center; }
#commander-table .ct-statistics-page .ct-general-metrics>div { align-items:center;justify-content:center;text-align:center; }
#commander-table .ct-statistics-page .ct-commander-stats th,#commander-table .ct-statistics-page .ct-commander-stats td { text-align:center;vertical-align:middle; }
#commander-table .ct-statistics-page .ct-stat-breakdown dl>div { display:grid;grid-template-columns:minmax(0,1fr) 64px;align-items:center;text-align:center; }
/* Format entry points and a dedicated non-Commander tableau layout. */
#commander-table .ct-start-actions { max-width:none; }
#commander-table .ct-format-start { position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%; }
#commander-table .ct-format-start::after { content:"";position:absolute;left:50%;top:0;bottom:0;width:1px;background:var(--ct-muted);transform:translateX(-50%);pointer-events:none; }
#commander-table .ct-format-start>section { display:flex;flex-direction:column;gap:12px;min-width:0; }
#commander-table .ct-format-start>section+section { border-left:0;padding-left:0; }
#commander-table .ct-format-start h2 { margin:4px 0;font-size:18px;text-align:center; }
#commander-table .ct-format-start button { width:100%;display:flex;align-items:center;justify-content:center;gap:8px; }
#commander-table #ct-other-formats { width:100%;max-width:280px;align-self:center;text-align:center;justify-content:center; }
#commander-table .ct-format-categories { display:grid;grid-template-columns:minmax(0,1fr);gap:16px; }
#commander-table .ct-format-categories section { display:flex;flex-direction:column;min-width:0;border:1px solid var(--ct-line);border-radius:14px;overflow:hidden; }
#commander-table .ct-format-categories button { text-align:center;display:flex;flex-direction:column;gap:6px;align-items:center; }
#commander-table .ct-format-categories small { font-size:12px;color:var(--ct-muted); }
#commander-table .ct-team-label { text-align:center;font-size:13px; }
#commander-table[data-commander-damage=false] .ct-seat .ct-panel { grid-template-rows:44px minmax(0,1fr) 44px; }
#commander-table[data-tableau=duel] .ct-head { grid-template-columns:minmax(0,1fr) 92px; }
#commander-table[data-tableau=duel] .ct-head>.ct-person { display:none; }
#commander-table[data-tableau=duel] .ct-head>.ct-progress-tax { grid-column:1;justify-self:start; }
#commander-table[data-tableau=duel] .ct-head>.ct-name-status { grid-column:2; }
#commander-table[data-commander-damage=false] .ct-life,#commander-table[data-commander-damage=false] .ct-life:has(.ct-poison-slot) { padding-bottom:0; }
#commander-table[data-commander-damage=false] .ct-life .ct-number,#commander-table[data-commander-damage=false] .ct-life:has(.ct-poison-slot) .ct-number { top:0;bottom:0; }
@media(max-width:500px){#commander-table .ct-format-start { gap:10px; }#commander-table .ct-format-start>section+section { padding-left:0; }#commander-table .ct-format-start button { padding:10px 4px;font-size:13px; } }

/* Format categories and scoped statistics share the existing page components. */
#commander-table .ct-format-categories h2,#commander-table .ct-format-categories h3,#commander-table .ct-format-recording {text-align:center;}
#commander-table .ct-format-recording {display:block;color:var(--ct-muted);margin:4px 0 12px;}
#commander-table .ct-format-categories h3 {margin:24px 0 6px;}
#commander-table .ct-stat-categories,#commander-table .ct-stat-formats {display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin:20px 0;}
#commander-table .ct-stat-categories button {flex:1;min-width:90px;}
#commander-table #ct-lobby .ct-profile-stat-categories {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));}
#commander-table #ct-lobby .ct-profile-stat-categories button {min-width:0;overflow-wrap:anywhere;}
@media(max-width:700px){#commander-table #ct-lobby .ct-profile-stat-categories {grid-template-columns:repeat(2,minmax(0,1fr));}}
#commander-table .ct-stat-categories [aria-pressed=true],#commander-table .ct-stat-formats [aria-pressed=true] {border-color:var(--ct-gold);background:color-mix(in srgb,var(--ct-gold) 18%,transparent);}
#commander-table .ct-selected-format {text-align:center;}
#commander-table .ct-stats-list[hidden] {display:none;}

#commander-table #ct-lobby .ct-format-categories h2 {margin:0;}
#commander-table #ct-lobby [data-format-toggle] {position:relative;width:100%;min-height:60px;margin:0;padding:14px 48px;border:0;border-radius:0;background:var(--ct-button);font-size:22px;font-weight:700;line-height:1.3;}
#commander-table [data-format-toggle] svg {position:absolute;right:18px;width:22px;height:22px;transform:rotate(-90deg);}
#commander-table [data-format-toggle][aria-expanded=true] {color:var(--ct-gold);}
#commander-table [data-format-toggle][aria-expanded=true] svg {transform:none;}
#commander-table [data-format-toggle] {scroll-margin-top:calc(12px + env(safe-area-inset-top,0px));}
#commander-table .ct-format-panel {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding:20px;border-top:1px solid var(--ct-line);}
#commander-table .ct-format-panel[hidden] {display:none;}
#commander-table .ct-format-panel .ct-format-group {min-width:0;}
#commander-table .ct-format-panel .ct-format-group>button,#commander-table .ct-format-panel .ct-format-subgroup>button {width:100%;margin:0;min-width:0;}
@media(max-width:600px){
  #commander-table .ct-format-panel {grid-template-columns:minmax(0,1fr);gap:16px;padding:16px;}
}
#commander-table .ct-format-recording {margin:0 0 5px;}
#commander-table .ct-format-categories h3 {margin-bottom:5px;}
#commander-table .ct-setup-rules,#commander-table .ct-setup-variants {border:1px solid var(--ct-muted);border-radius:12px;padding:12px 16px;margin:12px 0;text-align:center;}
#commander-table .ct-setup-rules h2,#commander-table .ct-setup-variants h2 {font-size:18px;margin:0 0 8px;}
#commander-table .ct-setup-variants select {margin-left:10px;min-height:44px;max-width:100%;}
#commander-table .ct-profile-commanders[hidden] {display:none;}

#commander-table .ct-format-group {display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--ct-muted);border-radius:12px;min-width:0;}
#commander-table .ct-format-group h3 {margin:0;}
#commander-table .ct-format-group .ct-format-recording {margin:0 0 2px;}
#commander-table .ct-format-group button {width:100%;min-width:0;}

#commander-table .ct-format-subgroup {display:flex;flex-direction:column;gap:10px;min-width:0;}
#commander-table .ct-format-subgroup+.ct-format-subgroup {margin-top:10px;}

#commander-table .ct-setup-variants {padding:8px 12px;}
#commander-table .ct-setup-variants p:empty {display:none;}
#commander-table #ct-setup-rule-link {margin-top:18px;}
/* Collection and imported decks */
#commander-table .ct-decks-page {max-width:1200px;margin:auto;text-align:center;}
#commander-table .ct-deck-folders {display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;}
#commander-table .ct-deck-folders button {display:flex;flex-direction:column;padding:20px;gap:8px;}
#commander-table .ct-decks-page>label {display:flex;flex-direction:column;gap:8px;margin:14px 0;text-align:left;}
#commander-table .ct-decks-page input,#commander-table .ct-decks-page textarea,#commander-table .ct-decks-page select {width:100%;box-sizing:border-box;min-height:44px;padding:10px;border:1px solid var(--ct-muted);border-radius:8px;background:var(--ct-panel);color:var(--ct-ink);font:inherit;}
#commander-table .ct-decks-page textarea {resize:vertical;min-height:240px;line-height:1.5;}
#commander-table .ct-deck-controls {display:flex;flex-wrap:wrap;gap:12px;align-items:end;justify-content:center;margin:18px 0;}
#commander-table .ct-deck-controls label {display:flex;flex:1 1 160px;flex-direction:column;gap:6px;}
#commander-table .ct-deck-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px;}
#commander-table .ct-deck-group {margin:26px 0;}
#commander-table .ct-deck-group h2 {text-align:left;font-size:18px;}
#commander-table #ct-lobby .ct-deck-card {display:flex;flex-direction:column;justify-content:flex-start;gap:6px;padding:6px;min-width:0;overflow:hidden;}
#commander-table .ct-deck-card img {width:100%;aspect-ratio:63/88;object-fit:contain;border-radius:8px;}
#commander-table .ct-deck-card strong {font-size:13px;overflow-wrap:anywhere;}
#commander-table .ct-deck-card small {font-size:12px;}
#commander-table .ct-missing-card {display:grid;place-items:center;aspect-ratio:63/88;width:100%;font-size:13px;border:1px dashed var(--ct-muted);border-radius:8px;}
#commander-table .ct-curve-bars {display:flex;align-items:end;justify-content:center;gap:12px;min-height:150px;}
#commander-table .ct-curve-bars>div {display:flex;flex-direction:column;align-items:center;gap:5px;flex:1;max-width:70px;}
#commander-table .ct-curve-bars span {width:100%;border-radius:5px 5px 0 0;background:var(--ct-gold);}
.ct-card-dialog {position:fixed;max-width:min(460px,90vw);max-height:88dvh;padding:20px;border:1px solid #7883A8;border-radius:16px;background:#101A36;color:#F1F2FA;text-align:center;overflow:auto;}
.ct-card-dialog::backdrop {background:#000a;}
.ct-card-dialog img {max-width:100%;max-height:62dvh;object-fit:contain;border-radius:12px;}
.ct-card-dialog h2 {font-size:18px;padding:0 25px;}
.ct-card-dialog button {background:#1C2949;color:#fff;border:1px solid #7883A8;border-radius:8px;min-height:40px;min-width:40px;cursor:pointer;}
.ct-card-dialog .ct-card-close {position:absolute;right:8px;top:8px;font-size:24px;}
.ct-card-dialog small {display:block;margin:10px 0;}
@media(max-width:500px){#commander-table .ct-deck-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}#commander-table .ct-deck-controls {gap:8px;}#commander-table .ct-curve-bars {gap:6px;} }

/* Rule navigation at the bottom of preparation. */
#commander-table #ct-lobby #ct-setup-rule-link { display:block; width:fit-content; max-width:100%; margin:0; padding:9px 16px; font-size:.85rem; min-height:40px; }
#commander-table #ct-lobby #ct-setup-bans { display:block; width:fit-content; max-width:100%; margin:0; }
#commander-table #ct-pentagon-start-note { padding:12px; border:1px solid #d4b65c; border-radius:10px; background:#332e20; color:#fff4ce; }

#commander-table .ct-pentagon-notice {position:fixed;z-index:10000;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(440px,calc(100vw - 32px));box-sizing:border-box;padding:14px;border:1px solid #d4b65c;border-radius:12px;background:#101A36;color:#fff4ce;box-shadow:0 8px 28px #0008;text-align:center;}

#commander-table .ct-setup-rule-actions {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:12px;margin-top:20px;}
#commander-table .ct-setup-rule-actions #ct-setup-bans {grid-column:1;grid-row:1;justify-self:start;}
#commander-table .ct-setup-rule-actions #ct-setup-rule-link {grid-column:2;grid-row:1;justify-self:end;white-space:normal;}

/* Shared card/list switch and collection folders. */
.ct-card-view-switch {display:inline-flex;gap:4px;border:1px solid #7883A8;border-radius:10px;padding:3px;margin:8px 0;}
.ct-card-view-switch button[aria-pressed=true] {background:#7883A8!important;color:#fff!important;box-shadow:inset 0 0 0 1px #BDC4DF;}
/* Use the shared collection switch in deck controls as well. */
#commander-table .ct-deck-controls>.ct-view-toggle {flex:none;}
#commander-table #ct-lobby .ct-deck-legality{margin:16px 0 20px;padding:14px 18px;border:1px solid #7883A8;border-radius:12px;text-align:left;background:#101A36;}
#commander-table #ct-lobby .ct-deck-legality[data-state="invalid"]{border-color:#e47a79;background:#382725;}
#commander-table #ct-lobby .ct-deck-legality[data-state="incomplete"]{border-color:#c5ab60;background:#343329;}
#commander-table #ct-lobby .ct-deck-legality h2{font-size:18px;text-align:left;margin:0 0 8px;}
#commander-table #ct-lobby .ct-deck-legality p{font-size:13px;margin:6px 0;}
#commander-table #ct-lobby .ct-deck-legality ul{margin:0;padding-left:22px;font-size:14px;line-height:1.5;overflow-wrap:anywhere;}
#commander-table #ct-lobby .ct-deck-legality li+li{margin-top:4px;}
#commander-table #ct-lobby .ct-deck-color-choices label{display:flex;flex-direction:column;gap:6px;max-width:340px;margin:12px 0;}
#commander-table #ct-lobby .ct-deck-legality button{margin-top:10px;}
#commander-table #ct-lobby .ct-deck-card-invalid{border:2px solid #ff8383;background:#492e2e;box-shadow:0 0 0 1px #ff838355;}
#commander-table #ct-lobby .ct-deck-card-invalid:hover{background:#553332;}
#commander-table .ct-card-tile {min-width:0;}
#commander-table .ct-card-tile>.ct-deck-card {width:100%;}
#commander-table .ct-deck-grid.ct-card-list,.ct-collection-dialog .ct-deck-grid.ct-card-list {display:block;}
.ct-card-list-head,.ct-card-list-row {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(65px,.6fr) minmax(0,1fr);gap:10px;align-items:center;padding:10px 8px;border-bottom:1px solid #7883A866;text-align:left;overflow-wrap:anywhere;}
.ct-card-list-head {font-weight:700;}
#commander-table #ct-lobby .ct-card-list-row>button,.ct-collection-dialog .ct-card-list-row>button {background:transparent;border:0;justify-content:flex-start;text-align:left;min-width:0;padding:4px;white-space:normal;overflow-wrap:anywhere;}
.ct-card-list-row>.ct-card-row-actions {grid-column:1/-1;}
#commander-table .ct-collection-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;}
#commander-table .ct-collection-heading h1 {text-align:left;margin-right:auto;}
#commander-table .ct-collection-folders {border-block:1px solid var(--ct-border);padding:18px 0;margin:18px 0;text-align:left;}
#commander-table .ct-folder-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:22px 16px;margin-top:24px;}
#commander-table .ct-folder-entry {display:flex;flex-direction:column;align-items:center;min-width:0;}
#commander-table #ct-lobby .ct-folder-open {background:none;border:0;display:flex;flex-direction:column;gap:12px;width:100%;padding:8px;white-space:normal;}
#commander-table .ct-folder-icon {display:block;position:relative;width:125px;height:85px;background:var(--folder-color);border:1px solid #ffffff44;border-radius:3px 9px 9px 9px;box-shadow:0 7px 10px #0004,inset 0 -8px 12px #0002;isolation:isolate;}
#commander-table .ct-folder-icon::before {content:'';position:absolute;left:-1px;top:-12px;width:48px;height:16px;background:var(--folder-color);border:1px solid #ffffff44;border-bottom:0;border-radius:8px 12px 0 0;z-index:-1;}
#commander-table .ct-folder-icon img {width:100%;height:100%;object-fit:cover;border-radius:inherit;opacity:.9;}
#commander-table #ct-lobby .ct-folder-edit {font-size:12px;min-height:32px;padding:4px 8px;background:transparent;}
#commander-table .ct-collection-tools,.ct-stage-tools {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0;}
.ct-stage-tools :is(#ct-stage-select,[data-stage-save]) {flex:1 1 calc(50% - 6px);min-width:0;padding-inline:8px;white-space:normal;align-self:stretch;}
.ct-card-row-actions {display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 0;font-size:12px;}
.ct-card-row-actions label {display:flex;align-items:center;gap:6px;}
#commander-table .ct-card-row-actions input,.ct-collection-dialog input[type=checkbox] {width:20px;height:20px;}
.ct-collection-dialog {width:min(560px,calc(100vw - 32px));max-width:calc(100vw - 32px);box-sizing:border-box;}
.ct-collection-dialog.ct-stage-dialog {width:min(1100px,calc(100vw - 32px));}
.ct-collection-dialog form,.ct-collection-dialog .ct-intake-options {display:flex;flex-direction:column;gap:14px;}
.ct-collection-dialog label {display:flex;flex-direction:column;text-align:left;gap:6px;margin:10px 0;min-width:0;}
.ct-collection-dialog input,.ct-collection-dialog select,.ct-collection-dialog textarea {box-sizing:border-box;max-width:100%;min-height:40px;padding:8px;border:1px solid #7883A8;border-radius:7px;background:#1C2949;color:#fff;font:inherit;}
.ct-collection-dialog input[type=checkbox] {min-height:20px;padding:0;}
.ct-collection-dialog .ct-card-row-actions label,.ct-stage-tools>label {flex-direction:row;align-items:center;}
.ct-collection-dialog input[type=color] {padding:3px;width:100%;}
.ct-collection-dialog button:disabled {opacity:.45;cursor:default;}
.ct-collection-dialog .ct-attribute-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;}
.ct-collection-dialog .ct-attribute-fields label:last-child {grid-column:1/-1;}
.ct-collection-dialog #ct-folder-art-preview {width:100%;max-height:160px;object-fit:cover;}
.ct-collection-dialog .ct-deck-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px;margin:12px 0;}
.ct-collection-dialog .ct-deck-card {display:flex;flex-direction:column;gap:8px;padding:6px;width:100%;}
.ct-collection-dialog .ct-deck-card strong {font-size:13px;overflow-wrap:anywhere;}
.ct-collection-dialog .ct-deck-card img {width:100%;aspect-ratio:63/88;max-height:none;object-fit:contain;}
.ct-collection-dialog .ct-missing-card {display:grid;place-items:center;aspect-ratio:63/88;font-size:13px;}
.ct-collection-dialog .ct-card-suggestions {display:flex;flex-direction:column;max-height:230px;overflow:auto;gap:6px;margin:10px 0;}
.ct-collection-dialog .ct-card-suggestions button {padding:10px;text-align:left;}
.ct-collection-dialog #ct-intake-preview,.ct-collection-dialog #ct-edit-card-preview {max-width:240px;margin-inline:auto;}
/* A single physical card uses the available window, not a grid thumbnail.
   The four common attributes remain together below the uncropped card. */
.ct-collection-dialog.ct-card-dialog.ct-single-card-editor{box-sizing:border-box;inset:calc(var(--ct-edit-top,0px) + env(safe-area-inset-top,0px) + 12px) calc(env(safe-area-inset-right,0px) + 12px) auto calc(env(safe-area-inset-left,0px) + 12px);margin:0 auto;width:min(620px,calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px));max-width:none;height:calc(var(--ct-edit-height,100dvh) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);max-height:calc(var(--ct-edit-height,100dvh) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);padding:12px;overflow:hidden;text-align:center;}
.ct-collection-dialog.ct-card-dialog.ct-single-card-editor[open]{display:grid;grid-template-areas:"title" "art" "params" "tools";grid-template-columns:minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) 54px auto;gap:8px;}
.ct-single-card-editor>h2{grid-area:title;box-sizing:border-box;align-self:center;min-width:0;min-height:0;margin:0;padding:0 44px;font-size:18px;line-height:24px;}
.ct-collection-dialog.ct-card-dialog.ct-single-card-editor>.ct-card-close{position:absolute;float:none;z-index:3;right:12px;top:12px;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;}
.ct-card-attribute-editor .ct-attribute-fields[hidden],.ct-card-attribute-editor .ct-card-param-menu[hidden]{display:none!important;}
.ct-collection-dialog.ct-card-dialog.ct-single-card-editor #ct-edit-card-preview{grid-area:art;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:0;place-items:center;min-width:0;min-height:0;width:100%;height:100%;max-width:none;margin:0;container-type:size;}
/* Size the actual card, not a letterboxed image element. Neither its natural
   size nor a slow image response may consume space reserved for the controls. */
.ct-single-card-editor .ct-edit-card-image{--ct-card-ratio:calc(63 / 88);width:min(100cqw,calc(100cqh * var(--ct-card-ratio)));height:min(100cqh,calc(100cqw / var(--ct-card-ratio)));max-width:100%;max-height:100%;border-radius:0;}
.ct-single-card-editor #ct-edit-card-preview img{display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain;object-position:center;border-radius:0;}
.ct-card-attribute-editor .ct-card-parameters{grid-area:params;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-width:0;}
.ct-card-attribute-editor .ct-card-parameters>button{box-sizing:border-box;display:grid;place-content:center;justify-items:center;gap:1px;min-width:0;min-height:46px;margin:0;padding:3px;font:inherit;}
.ct-card-attribute-editor .ct-card-parameters small{margin:0;font-size:11px;line-height:14px;}
.ct-card-attribute-editor .ct-card-parameters span{font-size:18px;line-height:24px;font-weight:600;}
.ct-card-attribute-editor [data-editor-param=finish] svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;}
.ct-card-attribute-editor [data-editor-param=finish][aria-pressed=true]{color:#E5C84A;}
.ct-card-attribute-editor [data-editor-param=finish][aria-pressed=true] svg{fill:currentColor;}
/* Keep the glass edges/shadows inside the scrollport. Its padding cancels its
   margin, so the actual buttons still share the card/parameter content edges. */
.ct-single-card-editor .ct-card-edit-tools{grid-area:tools;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;gap:8px;min-width:0;min-height:0;margin:-10px;padding:10px;overflow-y:auto;overscroll-behavior:contain;}
.ct-single-card-editor .ct-edit-card-actions{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:8px;min-width:0;margin:0;}
.ct-single-card-editor .ct-edit-card-actions button,.ct-single-card-editor #ct-edit-card-save{box-sizing:border-box;width:100%;min-width:0;min-height:48px;margin:0;padding:6px 8px;font:inherit;}
.ct-single-card-editor .ct-edit-card-actions button{font-size:13px;}
.ct-card-attribute-editor .ct-edit-notes{text-align:left;font-size:13px;}
.ct-card-attribute-editor .ct-edit-notes summary{min-height:30px;cursor:pointer;}
.ct-card-attribute-editor .ct-edit-notes label{display:grid;gap:3px;margin:0;font-size:12px;}
.ct-card-attribute-editor .ct-edit-notes input{box-sizing:border-box;width:100%;min-width:0;min-height:40px;margin:0;font:16px "Exo 2",sans-serif;}
.ct-single-card-editor .ct-collection-feedback{margin:0;font-size:12px;line-height:1.4;}
.ct-single-card-editor .ct-collection-feedback:empty{display:none;}
.ct-card-attribute-editor .ct-card-param-menu{position:absolute;z-index:5;box-sizing:border-box;display:grid;gap:4px;padding:6px;border:1px solid #d7def080;border-radius:12px;background:#242634ed;box-shadow:0 5px 20px #0008;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);overflow-y:auto;overscroll-behavior:contain;}
.ct-card-attribute-editor .ct-card-param-menu>button{min-height:40px;text-align:left;padding:7px 12px;font:inherit;}
.ct-card-attribute-editor .ct-card-param-menu>button[aria-selected=true]{border-color:#E5C84A;color:#E5C84A;}
.ct-card-attribute-editor .ct-card-count-stepper{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:8px;}
.ct-card-attribute-editor .ct-card-count-stepper>button{min-height:48px;font-size:26px;}
.ct-card-attribute-editor .ct-card-count-stepper>output{font-size:24px;font-weight:600;}
.ct-single-card-editor[data-edit-keyboard=true][open]{grid-template-areas:"title" "tools";grid-template-rows:44px minmax(0,1fr);}
.ct-single-card-editor[data-edit-keyboard=true] :is(#ct-edit-card-preview,.ct-card-parameters,.ct-edit-card-actions){display:none!important;}
@media(min-aspect-ratio:3/2) and (max-height:600px){.ct-collection-dialog.ct-card-dialog.ct-single-card-editor{width:calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px);}.ct-collection-dialog.ct-card-dialog.ct-single-card-editor[open]{grid-template-areas:"title title" "art tools" "params tools";grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) 54px;}.ct-single-card-editor .ct-card-edit-tools{align-content:start;align-content:safe center;}.ct-collection-dialog.ct-card-dialog.ct-single-card-editor[data-edit-keyboard=true][open]{grid-template-areas:"title" "tools";grid-template-columns:minmax(0,1fr);grid-template-rows:44px minmax(0,1fr);}}
.ct-manual-card-entry .ct-card-parameters{grid-auto-rows:54px;margin-block:12px;}
.ct-collection-dialog.ct-manual-card-entry #ct-intake-preview:empty{display:none;}
.ct-manual-card-tools{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0;}
.ct-manual-card-tools>button{width:100%;min-width:0;min-height:48px;padding:6px 8px;}
.ct-manual-card-tools .ct-collection-feedback{margin:0;font-size:12px;}
.ct-manual-card-tools .ct-collection-feedback:empty{display:none;}
.ct-manual-search{display:grid;gap:6px;min-width:0;grid-area:search;}
.ct-manual-search>label{margin:0;}
.ct-manual-search-field{position:relative;min-width:0;}
.ct-manual-search #ct-intake-search{display:block;width:100%;min-height:44px;margin:0;padding-right:52px;font-size:16px;}
.ct-manual-search-field>.ct-manual-search-clear{position:absolute;right:0;top:0;display:grid;place-items:center;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;border:0;background:transparent;box-shadow:none;}
.ct-manual-search-clear[hidden]{display:none!important;}
.ct-manual-search-clear>svg{width:18px;height:18px;}
.ct-manual-card-entry .ct-card-suggestions:empty{display:none;}
/* Selected manual cards use the scanner editor's guarded, proportional space.
   Search and the controls retain separate rows around the complete image. */
.ct-collection-dialog.ct-card-dialog.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true]){inset:calc(env(safe-area-inset-top,0px) + 12px) calc(env(safe-area-inset-right,0px) + 12px) auto calc(env(safe-area-inset-left,0px) + 12px);margin:0 auto;width:min(620px,calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px));max-width:none;height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);padding:12px;overflow:hidden;}
.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true])[open]{display:grid;grid-template-areas:"title" "search" "art" "params" "tools";grid-template-columns:minmax(0,1fr);grid-template-rows:44px auto minmax(0,1fr) 54px auto;gap:8px;}
.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true])>h2{grid-area:title;min-width:0;min-height:0;margin:0;padding:0 44px;font-size:18px;line-height:22px;}
.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true])>.ct-card-close{position:absolute;float:none;right:12px;top:12px;width:44px;height:44px;margin:0;padding:0;}
.ct-collection-dialog.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true]) #ct-intake-preview{grid-area:art;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 16px;gap:4px;min-width:0;min-height:0;width:100%;height:100%;max-width:none;margin:0;}
.ct-manual-card-art{display:grid;place-items:center;container-type:size;min-width:0;min-height:0;width:100%;height:100%;}
.ct-manual-card-image{--ct-card-ratio:calc(63 / 88);width:min(100cqw,calc(100cqh * var(--ct-card-ratio)));height:min(100cqh,calc(100cqw / var(--ct-card-ratio)));max-width:100%;max-height:100%;border-radius:0;}
.ct-manual-card-entry #ct-intake-preview img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;min-width:0;min-height:0;object-fit:contain;object-position:center;border-radius:0;}
.ct-manual-card-caption{display:flex;align-items:center;justify-content:center;gap:12px;min-width:0;font-size:12px;line-height:16px;color:#BDC4DF;}
.ct-manual-card-entry .ct-manual-card-caption small{margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true]) .ct-card-parameters{margin:0;}
.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true]) .ct-manual-card-tools{grid-area:tools;min-height:0;overflow:auto;overscroll-behavior:contain;margin:-10px;padding:10px;}
@media(min-aspect-ratio:3/2) and (max-height:600px){.ct-collection-dialog.ct-card-dialog.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true]){width:calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px);}.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true])[open]{grid-template-areas:"title title" "art search" "art tools" "params tools";grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:44px auto minmax(0,1fr) 54px;}.ct-manual-card-entry[data-manual-selected=true]:not([data-manual-keyboard=true]) .ct-manual-card-tools{align-content:start;}}
/* Only the manual entry follows the keyboard's visible viewport. Normal
   dialogs and the main navigation keep their existing size and anchor. */
.ct-collection-dialog.ct-card-dialog.ct-manual-card-entry[data-manual-keyboard=true]{inset:calc(var(--ct-manual-top,0px) + env(safe-area-inset-top,0px) + 12px) calc(env(safe-area-inset-right,0px) + 12px) auto calc(env(safe-area-inset-left,0px) + 12px);margin:0 auto;max-width:calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px);max-height:calc(var(--ct-manual-height) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);overflow:auto;}
.ct-manual-card-entry[data-manual-keyboard=true] #ct-intake-preview{display:none!important;}
.ct-manual-card-entry[data-manual-keyboard=true] .ct-card-suggestions{max-height:min(230px,var(--ct-manual-results-height,230px));}
@media(forced-colors:active){.ct-card-attribute-editor .ct-card-param-menu{background:Canvas;color:CanvasText;box-shadow:none;backdrop-filter:none;}.ct-card-attribute-editor [data-editor-param=finish][aria-pressed=true]{color:Highlight;}}
@media(max-width:500px){#commander-table .ct-collection-heading {align-items:flex-start;gap:8px;}#commander-table #ct-lobby .ct-collection-heading h1 {font-size:23px;}#commander-table #ct-lobby #ct-add-cards {font-size:13px;padding:8px;}.ct-collection-dialog {padding:16px;}.ct-card-list-head,.ct-card-list-row {font-size:12px;gap:6px;grid-template-columns:minmax(0,1.4fr) 82px minmax(0,1fr);} .ct-collection-dialog .ct-deck-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}

#commander-table #ct-lobby .ct-collection-tools label {display:flex;flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap;}
#commander-table #ct-lobby .ct-collection-tools input[type=checkbox] {width:20px;min-width:20px;max-width:20px;height:20px;min-height:20px;margin:0;padding:0;}
.ct-card-list-head>span:nth-child(2) {white-space:nowrap;}
#commander-table .ct-intake-heading-actions {display:flex;flex-direction:column;align-items:stretch;gap:8px;}
#commander-table .ct-intake-heading-actions #ct-resume-intake {font-size:12px;}
#commander-table .ct-collection-total {font-size:13px;}
#commander-table .ct-folder-icon {width:145px;height:102px;background:none;border:0;border-radius:0;box-shadow:none;filter:drop-shadow(0 6px 4px #0005);}
#commander-table .ct-folder-icon::before {display:none;}
#commander-table .ct-folder-icon svg {display:block;width:100%;height:100%;}
.ct-stage-add-actions,.ct-selection-tools {display:flex;align-items:center;flex-wrap:wrap;gap:10px;}
.ct-stage-add-actions>button {flex:1;min-height:46px;padding:10px;}
.ct-collection-dialog hr {border:0;border-top:1px solid #7883A8;margin:18px 0;}
.ct-card-selected {outline:3px solid #d6b65f;outline-offset:2px;border-radius:8px;background:#d6b65f22;}
#commander-table .ct-selection-tools [hidden],.ct-collection-dialog [hidden],.ct-card-view-switch[hidden] {display:none!important;}
.ct-collection-dialog .ct-stage-tools .ct-select-all {display:flex;flex-direction:row;align-items:center;gap:8px;margin:0;}
.ct-collection-dialog .ct-card-tile {min-width:0;}
.ct-collection-dialog #ct-stage-save {display:block;margin:18px auto 0;min-width:160px;}
#commander-table .ct-folder-open:hover .ct-folder-icon {filter:drop-shadow(0 8px 5px #0006);}
@media(max-width:500px){#commander-table .ct-intake-heading-actions {max-width:48%;}.ct-stage-add-actions {gap:6px;}.ct-stage-add-actions>button {font-size:12px;padding:8px;min-width:0;}.ct-selection-tools {gap:8px;}}

/* Collection view toggle and a separate selection row. */
#commander-table .ct-collection-tools .ct-selection-tools {flex-basis:100%;display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.ct-card-edition {display:block;font-size:12px;line-height:1.4;text-align:center;overflow-wrap:anywhere;margin-top:5px;}

#commander-table .ct-collection-tools {display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;}
#commander-table .ct-collection-tools>label {min-width:0;}
#commander-table .ct-collection-tools select {min-width:0;width:100%;}
#commander-table .ct-collection-tools>label:has(#ct-deck-card-filter),#commander-table .ct-collection-tools>.ct-selection-tools {grid-column:1/-1;}
#commander-table .ct-collection-tools>.ct-selection-tools {grid-row:2;}
#commander-table .ct-collection-tools>label:has(#ct-deck-card-filter) {grid-row:3;}

/* Anchor the thumb to the track, independent of shared button alignment. */
#commander-table #ct-lobby .ct-view-toggle {display:flex;align-items:center;gap:8px;white-space:nowrap;align-self:end;margin:0;min-height:44px;box-sizing:border-box;}
#commander-table #ct-lobby .ct-view-toggle button {position:relative;display:block;box-sizing:border-box;flex:none;width:52px;min-width:52px;max-width:52px;height:30px;min-height:30px;max-height:30px;padding:0;border:1px solid #7883A8;border-radius:18px;background:#7883A855;}
#commander-table #ct-lobby .ct-view-toggle button span {position:absolute;display:block;box-sizing:border-box;left:3px;right:auto;top:3px;bottom:auto;width:22px;height:22px;min-width:0;margin:0;border-radius:50%;background:currentColor;transform:none;}
#commander-table #ct-lobby .ct-view-toggle button[aria-checked=true] span {left:auto;right:3px;transform:none;}

/* Keep the two collection filters side by side. */
#commander-table .ct-collection-tools:has(#ct-deck-card-filter) {grid-template-columns:max-content minmax(110px,160px) minmax(180px,260px);justify-content:start;}
#commander-table .ct-collection-tools>label:has(#ct-deck-card-filter) {grid-column:3;grid-row:1;}
#commander-table #ct-lobby .ct-collection-tools>label {display:flex;flex-direction:column;align-items:stretch;gap:6px;}
@media(max-width:600px){
#commander-table .ct-collection-tools:has(#ct-deck-card-filter) {grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);}
#commander-table .ct-collection-tools:has(#ct-deck-card-filter)>.ct-view-toggle {grid-row:1;grid-column:1;justify-self:start;}
#commander-table .ct-collection-tools:has(#ct-deck-card-filter)>label:has(#ct-collection-sort) {grid-row:2;grid-column:1;}
#commander-table .ct-collection-tools>label:has(#ct-deck-card-filter) {grid-column:2;grid-row:2;}
#commander-table .ct-collection-tools:has(#ct-deck-card-filter)>.ct-selection-tools {grid-row:3;}
}

/* Shared content-page rhythm and bounded collection folder area. */
#commander-table #ct-lobby .ct-decks-page {width:100%;max-width:1120px;margin:0 auto;padding:8px 0 32px;box-sizing:border-box;}
#commander-table #ct-lobby .ct-decks-page>.ct-back {display:block;justify-self:start;margin:0 0 24px;padding:10px 14px;min-height:44px;}
#commander-table #ct-lobby .ct-decks-page h1 {font-size:28px;line-height:1.25;font-weight:700;margin:0 0 12px;}
#commander-table #ct-lobby .ct-decks-page h2 {font-size:21px;line-height:1.3;font-weight:650;margin:24px 0 12px;}
#commander-table #ct-lobby .ct-decks-page {font-size:15px;line-height:1.5;}
#commander-table .ct-collection-folders {border:1px solid #7883A866;border-radius:14px;padding:20px;margin:24px 0;}
#commander-table .ct-folder-grid {grid-template-columns:repeat(5,minmax(0,1fr));gap:24px 16px;margin-top:20px;}
#commander-table .ct-folder-entry {min-width:0;}
#commander-table .ct-folder-count {display:block;margin-top:6px;font-size:13px;opacity:.8;}
#commander-table .ct-folder-icon {max-width:100%;}
.ct-collection-dialog #ct-folder-art-preview {aspect-ratio:160/112;height:auto;max-height:none;object-fit:cover;border-radius:10px;}
#commander-table .ct-deck-folders {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
@media(max-width:800px){#commander-table .ct-folder-grid {grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:500px){#commander-table .ct-folder-grid {grid-template-columns:repeat(2,minmax(0,1fr));}#commander-table .ct-collection-folders {padding:12px;}#commander-table .ct-deck-folders {grid-template-columns:repeat(2,minmax(0,1fr));}}

/* Adopted layout, 2026-09-15: common page geometry replaces draft translations. */
#commander-table #ct-lobby {--ct-page-width:1120px;--ct-title-size:28px;--ct-section-size:21px;--ct-copy-size:15px;}
#commander-table #ct-lobby :is(.ct-profiles-page,.ct-setup,.ct-decks-page,.ct-rules-page) {box-sizing:border-box;width:100%;max-width:var(--ct-page-width);padding:16px 0 32px;margin:0 auto;font-size:var(--ct-copy-size);line-height:1.5;}
#commander-table #ct-lobby :is(.ct-profiles-page,.ct-setup,.ct-decks-page,.ct-rules-page) h1 {font-size:var(--ct-title-size);line-height:1.25;font-weight:700;margin:0 0 16px;font-family:inherit;}
#commander-table #ct-lobby :is(.ct-profiles-page,.ct-setup,.ct-decks-page,.ct-rules-page) h2 {font-size:var(--ct-section-size);line-height:1.3;font-weight:650;font-family:inherit;}
#commander-table #ct-lobby :is(.ct-profiles-page,.ct-setup,.ct-decks-page,.ct-rules-page) .ct-back {display:flex;align-items:center;justify-content:center;gap:8px;width:max-content;max-width:100%;min-height:44px;margin:0 auto 24px 0;padding:10px 14px;font:inherit;float:none;}
#commander-table #ct-lobby :is(.ct-profile-heading,.ct-setup-heading,.ct-collection-heading) {margin:0 0 20px;align-items:center;}
#commander-table #ct-lobby .ct-profile-heading h1,#commander-table #ct-lobby .ct-collection-heading h1 {margin:0;}
#commander-table #ct-lobby .ct-profiles-page:has(#ct-open-primary) {display:flex;flex-direction:column;gap:0;}
#commander-table #ct-lobby .ct-profiles-page:has(#ct-open-primary)>.ct-profile-heading {display:contents;}
#commander-table #ct-lobby .ct-profiles-page:has(#ct-open-primary)>.ct-profile-heading>div {order:1;margin-bottom:20px;}
#commander-table #ct-lobby #ct-profile-home {order:0;}
#commander-table #ct-lobby #ct-open-primary {order:2;margin:0 0 24px;width:100%;}
#commander-table #ct-lobby .ct-profiles-page:has(#ct-open-primary)>.ct-profile-tabs {order:3;margin:0 0 16px;}
#commander-table #ct-lobby .ct-profiles-page:has(#ct-open-primary)>.ct-profile-list {order:4;}
#commander-table #ct-lobby #ct-profile-add {order:5;align-self:flex-end;margin-top:20px;}
#commander-table #ct-lobby .ct-collection-folders {margin:16px 0 24px;padding:16px;display:flex;flex-direction:column;gap:16px;}
#commander-table #ct-lobby #ct-create-folder {align-self:flex-end;margin:0;min-height:44px;}
#commander-table #ct-lobby .ct-folder-grid {margin:0;}
#commander-table #ct-lobby .ct-collection-section-heading {display:flex;align-items:center;justify-content:flex-start;gap:16px;flex-wrap:wrap;margin:0 0 16px;}
#commander-table #ct-lobby .ct-collection-section-heading h2,#commander-table #ct-lobby #ct-visible-card-count {margin:0;}
#commander-table #ct-lobby #ct-visible-card-count {font-size:var(--ct-copy-size);color:var(--ct-muted);}
#commander-table #ct-lobby .ct-collection-tools {margin:0 0 20px;}
#commander-table #ct-lobby .ct-setup-options {margin:16px 0 24px;gap:16px;}
#commander-table #ct-lobby .ct-setup-heading {display:flex;flex-direction:column;align-items:flex-start;gap:8px;}
#commander-table #ct-lobby .ct-setup-heading h1 {order:0;margin:0;}
#commander-table #ct-lobby .ct-setup-heading .ct-eyebrow {order:1;}
#commander-table #ct-lobby .ct-setup-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-setup-toolbar>.ct-back{margin:0;flex:none;}
#commander-table #ct-lobby #ct-setup-start{margin:0 0 0 auto;min-height:44px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-setup-title{margin:24px 0;text-align:center;font-size:clamp(22px,3vw,30px);line-height:1.3;}
#commander-table #ct-lobby .ct-setup-options:empty{display:none;}
#commander-table #ct-lobby #ct-setup-rules-open{display:flex;width:100%;min-height:60px;margin:16px 0 0;justify-content:center;gap:12px;font-size:20px;font-weight:700;}
#commander-table #ct-special-variant{background:var(--ct-button);color:var(--ct-ink);border:1px solid var(--ct-line);border-radius:10px;padding:8px 12px;}
#commander-table .ct-overlay:has(.ct-dialog>.ct-setup-rules){z-index:40;background:#000a;}
#commander-table .ct-dialog:has(>.ct-setup-rules)>.ct-close{position:sticky;top:0;float:right;right:auto;width:44px;height:44px;z-index:1;background:var(--ct-panel);}
#commander-table .ct-dialog>.ct-setup-rules{border:0;margin:0;padding:0;text-align:left;}
#commander-table .ct-dialog>.ct-setup-rules>h2{min-height:44px;margin:0 52px 16px 0;font-size:22px;display:flex;align-items:center;}
#commander-table .ct-dialog>.ct-setup-rules p{line-height:1.5;}
#commander-table .ct-dialog>.ct-setup-rules a{color:var(--ct-gold);overflow-wrap:anywhere;}
@media(max-width:600px){#commander-table #ct-lobby {--ct-title-size:24px;--ct-section-size:20px;}#commander-table #ct-lobby .ct-collection-heading {flex-wrap:wrap;gap:12px;}#commander-table #ct-lobby .ct-intake-heading-actions {max-width:100%;margin-left:auto;}}

#commander-table #ct-lobby :is(.ct-profiles-page,.ct-setup,.ct-decks-page,.ct-rules-page) h1 {text-align:left;}

/* Illustrated binders: artwork belongs to the cover, not the spine or pages. */
#commander-table .ct-folder-icon.ct-binder-icon,.ct-collection-dialog .ct-binder-icon {display:block;width:160px;height:auto;aspect-ratio:180/220;max-width:100%;background:none;border:0;border-radius:0;box-shadow:none;filter:none;margin:auto;}
#commander-table .ct-folder-icon.ct-binder-icon:before,.ct-collection-dialog .ct-binder-icon:before {display:none;}
#commander-table .ct-binder-icon svg,.ct-collection-dialog .ct-binder-icon svg {display:block;width:100%;height:100%;max-width:none;}
#commander-table .ct-folder-open:hover .ct-binder-icon {filter:drop-shadow(0 4px 3px #0002);}
.ct-collection-dialog #ct-folder-art-preview {width:100%;height:auto;max-height:none;aspect-ratio:auto;margin:16px auto;}
.ct-collection-dialog #ct-folder-art-preview .ct-binder-icon {width:220px;}

/* Collection landing, deckboxes and shared binder sorting controls. */
#commander-table #ct-lobby #ct-library-add-cards {justify-self:end;margin:0 0 12px;}
#commander-table #ct-lobby #ct-deck-folder-settings {justify-self:end;margin:16px 0 0;}
#commander-table #ct-lobby .ct-decks-page>.op-deck-actions{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) 44px;gap:8px;align-items:stretch;width:min(100%,440px);}
#commander-table #ct-lobby .ct-decks-page>.op-deck-actions>button{min-width:0;min-height:44px;margin:0;padding:8px 6px;font-size:clamp(12px,3.3vw,15px);}
#commander-table #ct-lobby .ct-decks-page>.op-deck-actions>#ct-deck-folder-settings{width:44px;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-actions>#ct-deck-folder-settings svg{display:block;width:22px;height:22px;margin:auto;}
#commander-table .ct-empty-deck-folder {opacity:.58;filter:saturate(.45);}
#commander-table .ct-empty-deck-folder:hover {opacity:.85;}
#commander-table .ct-deckbox {display:block;width:180px;max-width:100%;margin:0 auto 8px;filter:drop-shadow(0 6px 3px #0003);}
#commander-table .ct-deckbox svg {display:block;width:100%;height:auto;max-width:none;}
#commander-table .ct-deck-box-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;}
#commander-table .ct-deck-entry{position:relative;min-width:0;}
#commander-table #ct-lobby .ct-deck-entry>[data-open-deck]{width:100%;height:100%;align-items:center;justify-content:center;padding:16px 10px;user-select:none;-webkit-touch-callout:none;touch-action:pan-y;}
#commander-table .ct-deck-entry strong{font-size:16px;overflow-wrap:anywhere;}
#commander-table .ct-deck-card-count-badge{position:absolute;top:10px;right:12px;font-size:12px;font-weight:400;color:var(--ct-muted);white-space:nowrap;pointer-events:none;}
#commander-table .ct-deck-entry:has(.ct-deck-trash:not([hidden])) .ct-deck-card-count-badge{right:60px;}
#commander-table #ct-lobby .ct-deck-delete-button,.ct-deck-delete-dialog .ct-deck-delete-button{background:#682c2c;border:1px solid #e47a79;color:#fff;}
#commander-table #ct-lobby .ct-deck-trash{position:absolute;top:8px;right:8px;width:44px;height:44px;min-height:44px;padding:10px;display:grid;place-items:center;}
#commander-table #ct-lobby .ct-deck-trash[hidden]{display:none;}
#commander-table .ct-deck-trash svg{width:22px;height:22px;}
#commander-table .ct-deck-detail-footer{display:flex;justify-content:flex-end;margin-top:28px;}
.ct-deck-delete-dialog{max-width:420px;}
.ct-deck-delete-dialog h2{padding:0;text-align:center;}
.ct-delete-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;}
.ct-delete-dialog-actions button{min-height:44px;padding:10px 14px;border-radius:10px;cursor:pointer;}
@media(min-width:761px){#commander-table .ct-deck-box-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(min-width:1100px){#commander-table .ct-deck-box-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
#commander-table [data-open-deck] {display:flex;flex-direction:column;align-items:center;gap:6px;}
.ct-deck-visibility {display:flex;align-items:center;gap:10px;margin:12px 0;}.ct-deck-visibility input {width:20px;height:20px;}
#commander-table .ct-folder-actions {display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.ct-folder-picker {display:grid;gap:10px;}
#commander-table #ct-lobby .ct-collection-tools {grid-template-columns:max-content 208px;justify-content:start;}
#commander-table #ct-lobby .ct-collection-tools:has(#ct-deck-card-filter) {grid-template-columns:max-content 208px minmax(180px,260px);}
#commander-table #ct-lobby .ct-sort-pair {display:flex;align-items:flex-end;gap:8px;width:208px;max-width:100%;}
#commander-table #ct-lobby .ct-sort-pair label {display:flex;flex-direction:column;gap:6px;min-width:0;width:160px;}
#commander-table #ct-lobby #ct-sort-reverse {width:40px;min-width:40px;height:44px;min-height:44px;padding:0;font-size:22px;}
#commander-table #ct-sort-reverse[aria-pressed=true] {background:#3D4767;color:white;}
@media(max-width:600px){
#commander-table #ct-lobby .ct-collection-tools,#commander-table #ct-lobby .ct-collection-tools:has(#ct-deck-card-filter) {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
#commander-table #ct-lobby .ct-sort-pair {grid-column:1;grid-row:2;width:208px;max-width:100%;}
#commander-table #ct-lobby .ct-collection-tools>.ct-view-toggle {grid-row:1;grid-column:1/-1;}
#commander-table #ct-lobby .ct-collection-tools>.ct-selection-tools {grid-row:3;}
#commander-table #ct-lobby .ct-sort-pair label {flex:1;}
}
#commander-table #ct-lobby #ct-deck-folder-settings {margin:0 0 12px;justify-self:end;}
.ct-deck-visibility-dialog {width:340px;max-width:calc(100vw - 32px);}
.ct-deck-visibility-row {display:flex;align-items:center;gap:8px;border-bottom:1px solid #7883A844;min-height:40px;}
.ct-deck-visibility-row .ct-deck-visibility {display:flex;align-items:center;flex:1;gap:10px;margin:0;padding:6px 0;}
.ct-deck-visibility-row .ct-deck-visibility input {width:18px;height:18px;min-width:18px;margin:0;}
.ct-deck-visibility-row>button {width:32px;height:32px;min-height:32px;padding:0;font-size:20px;background:transparent;border:0;}

/* Collection overview: binder heading above, pool controls together below. */
#commander-table #ct-lobby .ct-collection-overview .ct-folder-actions {display:flex;align-items:center;justify-content:flex-end;gap:12px;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-actions h1 {margin:0 auto 0 0;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-actions #ct-create-folder {align-self:auto;}
#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools {display:grid;grid-template-columns:208px minmax(180px,1fr) max-content max-content;align-items:end;gap:12px;}
#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity {grid-column:1/-1;grid-row:1;display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:4px;}
#commander-table #ct-lobby .ct-pool-identity .ct-collection-section-heading {margin:0;}
#commander-table #ct-lobby .ct-pool-identity .ct-view-toggle {align-self:center;}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair {grid-column:1;grid-row:2;}
#commander-table #ct-lobby .ct-collection-overview label:has(>#ct-deck-card-filter) {grid-column:2;grid-row:2;}
#commander-table #ct-lobby .ct-collection-overview #ct-add-cards {grid-column:3;grid-row:2;min-height:44px;margin:0;}
#commander-table #ct-lobby .ct-collection-overview .ct-selection-tools {display:contents;}
#commander-table #ct-lobby .ct-collection-overview #ct-owned-select {grid-column:4;grid-row:2;min-height:44px;}
#commander-table #ct-lobby .ct-collection-overview .ct-select-all {grid-column:3;grid-row:3;}
#commander-table #ct-lobby .ct-collection-overview #ct-owned-edit {grid-column:4;grid-row:3;}
#commander-table #ct-lobby .ct-collection-overview #ct-resume-intake {grid-column:1/3;grid-row:3;justify-self:start;}
@media(max-width:800px){
#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
#commander-table #ct-lobby .ct-collection-overview #ct-add-cards {grid-column:1;grid-row:3;}
#commander-table #ct-lobby .ct-collection-overview #ct-owned-select {grid-column:2;grid-row:3;}
#commander-table #ct-lobby .ct-collection-overview .ct-select-all {grid-column:1;grid-row:4;}
#commander-table #ct-lobby .ct-collection-overview #ct-owned-edit {grid-column:2;grid-row:4;}
#commander-table #ct-lobby .ct-collection-overview #ct-resume-intake {grid-column:1/-1;grid-row:5;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-actions h1 {flex-basis:100%;}
}

#commander-table #ct-lobby .ct-collection-overview .ct-folder-actions {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-actions h1 {grid-column:2;margin:0;text-align:center;}
#commander-table #ct-lobby .ct-folder-action-buttons {grid-column:3;justify-self:end;display:flex;gap:8px;}
#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity {justify-content:center;}
#commander-table #ct-lobby .ct-pool-identity .ct-collection-section-heading {justify-content:center;text-align:center;}
#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools {grid-template-columns:360px minmax(170px,1fr) max-content max-content;}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair {width:360px;gap:10px;align-items:flex-end;}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair .ct-view-toggle {align-self:flex-end;flex-shrink:0;}
#commander-table #ct-lobby .ct-collection-overview .ct-collection-folders {padding:12px 16px;gap:10px;margin:8px 0 18px;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-grid {gap:10px 16px;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-open {gap:3px;padding:4px;align-items:center;}
#commander-table #ct-lobby .ct-collection-overview .ct-binder-icon {width:130px;margin:0 auto;flex:none;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-open strong {font-size:14px;line-height:1.25;margin:0;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-count {font-size:12px;line-height:1.2;margin:0;}
@media(max-width:1000px){
#commander-table #ct-lobby .ct-collection-overview .ct-folder-actions {grid-template-columns:1fr;}
#commander-table #ct-lobby .ct-collection-overview .ct-folder-actions h1 {grid-column:1;}
#commander-table #ct-lobby .ct-folder-action-buttons {grid-column:1;}
#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair {grid-column:1/-1;grid-row:2;max-width:100%;}
#commander-table #ct-lobby .ct-collection-overview label:has(>#ct-deck-card-filter) {grid-column:1;grid-row:3;}
#commander-table #ct-lobby .ct-collection-overview #ct-add-cards {grid-column:2;grid-row:3;}
#commander-table #ct-lobby .ct-collection-overview #ct-owned-select {grid-column:2;grid-row:4;}
#commander-table #ct-lobby .ct-collection-overview .ct-select-all {grid-column:1;grid-row:5;}
#commander-table #ct-lobby .ct-collection-overview #ct-owned-edit {grid-column:2;grid-row:5;}
#commander-table #ct-lobby .ct-collection-overview #ct-resume-intake {grid-column:1/-1;grid-row:6;}
}

#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity {width:100%;}
#commander-table #ct-lobby .ct-pool-identity .ct-collection-section-heading {display:grid;width:100%;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;}
#commander-table #ct-lobby .ct-pool-identity h2 {grid-column:2;grid-row:1;text-align:center;}
#commander-table #ct-lobby .ct-pool-identity #ct-visible-card-count {grid-column:3;grid-row:1;justify-self:start;}
#commander-table #ct-lobby .ct-collection-overview #ct-add-cards,#commander-table #ct-lobby .ct-collection-overview #ct-owned-select {justify-self:end;width:max-content;max-width:100%;}
.ct-collection-dialog #ct-folder-delete,.ct-collection-dialog #ct-folder-delete-confirm {color:#b44343;border-color:#b44343;margin-top:12px;}
@media(max-width:500px){#commander-table #ct-lobby .ct-pool-identity .ct-collection-section-heading {grid-template-columns:1fr;gap:4px;}#commander-table #ct-lobby .ct-pool-identity h2 {grid-column:1;}#commander-table #ct-lobby .ct-pool-identity #ct-visible-card-count {grid-column:1;grid-row:2;justify-self:center;}}

/* Override the older :has(filter) column rule as well: use all available width. */
#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools:has(#ct-deck-card-filter) {width:100%;max-width:none;box-sizing:border-box;grid-template-columns:360px minmax(180px,1fr) max-content max-content;justify-content:stretch;}
#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity .ct-collection-section-heading {grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);width:100%;}
#commander-table #ct-lobby #ct-pool-title {grid-column:2;grid-row:1;justify-self:center;text-align:center;}
@media(max-width:1000px){#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools:has(#ct-deck-card-filter) {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}}
@media(max-width:500px){#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity .ct-collection-section-heading {grid-template-columns:1fr;}#commander-table #ct-lobby #ct-pool-title {grid-column:1;}}

#commander-table #ct-lobby .ct-collection-overview label:has(>#ct-deck-card-filter) {width:max-content;max-width:100%;justify-self:start;}
#commander-table #ct-lobby #ct-deck-card-filter {width:24ch;max-width:100%;min-width:0;}
#commander-table #ct-lobby #ct-collection-pages {display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;margin:24px 0 8px;}
#commander-table #ct-lobby #ct-collection-pages[hidden] {display:none;}
#commander-table #ct-lobby #ct-collection-pages button {min-width:40px;min-height:40px;padding:8px;}
#commander-table #ct-lobby #ct-collection-pages [aria-current=page] {background:#7883A8;color:white;border-color:#BDC4DF;}


/* Quantity belongs to each card; the overall count stays beside the heading. */
.ct-card-quantity {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:calc(2ch + 12px);width:max-content;height:26px;padding:3px 5px;border:1px solid #BDC4DF;border-radius:5px;background:#101A36ed;color:#F1F2FA;font-size:13px;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;}
.ct-deck-card>strong:has(.ct-card-quantity) {position:relative;box-sizing:border-box;display:block;width:100%;min-height:28px;padding:4px 2px 4px 40px;}
.ct-deck-card>strong>.ct-card-quantity {position:absolute;left:0;top:0;}
.ct-card-list-row>button:has(.ct-card-quantity) {display:flex;align-items:center;gap:8px;}

/* Card quantity and name share one normal-weight, left-aligned text row. */
#commander-table #ct-lobby .ct-deck-card>strong,.ct-collection-dialog .ct-deck-card>strong {font-weight:400;text-align:left;}
#commander-table #ct-lobby .ct-deck-card>strong:has(.ct-card-quantity),.ct-collection-dialog .ct-deck-card>strong:has(.ct-card-quantity) {display:flex;align-items:flex-start;gap:6px;min-height:0;padding:0;line-height:1.4;font-size:13px;}
.ct-deck-card>strong>.ct-card-quantity {position:static;}
.ct-card-quantity {font-weight:400;font-size:inherit;line-height:1.4;height:1.4em;min-width:calc(3ch + 6px);padding:0 3px;border-radius:4px;}

#commander-table #ct-lobby .ct-deck-card>strong,.ct-collection-dialog .ct-deck-card>strong {display:flex;align-items:center;width:100%;min-width:0;max-width:100%;box-sizing:border-box;gap:6px;font-weight:400;overflow:hidden;}
#commander-table #ct-lobby .ct-deck-card>strong:has(.ct-card-quantity),.ct-collection-dialog .ct-deck-card>strong:has(.ct-card-quantity) {align-items:center;}
.ct-deck-card .ct-card-name {display:block;flex:1;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;}
.ct-deck-card .ct-card-quantity {flex:0 0 auto;}

#commander-table #ct-lobby .ct-deck-card,.ct-collection-dialog .ct-deck-card {padding:6px;gap:6px;}
#commander-table #ct-lobby .ct-deck-card>strong,.ct-collection-dialog .ct-deck-card>strong {padding:0;margin:0;min-height:20px;line-height:20px;}
.ct-deck-card .ct-card-footer {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;width:100%;min-width:0;min-height:20px;line-height:20px;}
.ct-deck-card .ct-card-footer .ct-card-edition {grid-column:2;margin:0;padding:0;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px;}
.ct-deck-card .ct-card-footer .ct-card-quantity {margin:0;height:20px;line-height:18px;}

.ct-deck-card .ct-card-footer>.ct-card-quantity {grid-column:3;grid-row:1;justify-self:end;}
.ct-deck-card .ct-card-footer>.ct-card-edition {grid-row:1;}
/* Cardmarket reference values and consistent collection folder controls. */
.ct-deck-card .ct-card-price {justify-self:end;white-space:nowrap;font-size:12px;font-weight:400;}
.ct-deck-card .ct-card-footer {grid-template-columns:minmax(0,1fr) auto;}
.ct-deck-card .ct-card-footer>.ct-card-edition {grid-column:1;text-align:left;}
.ct-deck-card .ct-card-footer>.ct-card-price {grid-column:2;grid-row:1;}
.ct-deck-card>strong>.ct-card-quantity {position:static;margin-left:auto;}
.ct-card-list .ct-card-list-head,.ct-card-list .ct-card-list-row {display:grid;grid-template-columns:minmax(120px,2fr) 65px minmax(100px,2fr) minmax(90px,1fr);gap:10px;align-items:center;}
.ct-card-list-row>.ct-card-price {text-align:right;}
#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;}
#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity .ct-collection-section-heading {grid-column:2;display:flex;width:auto;align-items:center;justify-content:center;gap:10px;}
#commander-table #ct-lobby .ct-pool-identity h1,#commander-table #ct-lobby .ct-pool-identity h2,#commander-table #ct-lobby .ct-pool-identity p {margin:0;}
#commander-table #ct-lobby .ct-folder-value {grid-column:3;justify-self:end;text-align:right;font-size:13px;}
#commander-table #ct-lobby .ct-folder-detail .ct-collection-tools {grid-template-columns:360px minmax(0,1fr) max-content max-content;width:100%;}
@media(max-width:1000px){#commander-table #ct-lobby .ct-folder-detail .ct-collection-tools {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}}
@media(max-width:650px){#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity {grid-template-columns:minmax(0,1fr);}
#commander-table #ct-lobby .ct-collection-overview .ct-pool-identity .ct-collection-section-heading {grid-column:1;flex-wrap:wrap;}
#commander-table #ct-lobby .ct-folder-value {grid-column:1;}
.ct-card-list .ct-card-list-head,.ct-card-list .ct-card-list-row {grid-template-columns:minmax(90px,2fr) 40px minmax(75px,1fr) 80px;gap:5px;font-size:12px;}}
/* Collection quantities sit on the artwork; the name keeps the full centred row. */
.ct-collection-cards .ct-collection-card-image{position:relative;display:block;width:100%;line-height:0;}
.ct-collection-cards .ct-collection-card-image>img{display:block;}
.ct-collection-cards .ct-collection-card-image>.ct-card-quantity{position:absolute;right:6px;bottom:6px;min-width:32px;height:24px;margin:0;padding:2px 5px;line-height:18px;font-size:13px;background:#101A36f2;box-shadow:0 1px 4px #0008;}
#commander-table #ct-lobby .ct-collection-cards .ct-deck-card>strong{justify-content:center;text-align:center;}
.ct-collection-cards.ct-card-list>.ct-card-list-head,.ct-collection-cards.ct-card-list>.ct-card-list-row{grid-template-columns:44px minmax(0,1fr) 60px 60px 80px;gap:8px;}
.ct-collection-cards.ct-card-list .ct-list-quantity{white-space:nowrap;font-variant-numeric:tabular-nums;}
.ct-collection-cards.ct-card-list>.ct-card-list-head>span:last-child{text-align:right;}
@media(max-width:650px){
  .ct-collection-cards.ct-card-list>.ct-card-list-head,.ct-collection-cards.ct-card-list>.ct-card-list-row{grid-template-columns:44px minmax(0,1fr) 42px 34px 60px;gap:4px;padding:8px 4px;font-size:12px;}
}
/* Scanner: two modes, a touch crop surface and explicit candidate selection. */
.ct-scanner-dialog {width:min(94vw,820px);max-height:92dvh;overflow:auto;box-sizing:border-box;}
.ct-scan-modes {display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border:1px solid #BDC4DF;border-radius:12px;}
.ct-scan-modes button {min-height:44px;border:0;background:transparent;}
.ct-scan-modes button[aria-pressed=true] {background:#3D4767;color:#fff;box-shadow:inset 0 0 0 1px #BDC4DF;}
.ct-scan-inputs,.ct-scan-photo-actions {display:flex;flex-wrap:wrap;gap:10px;margin:12px 0;align-items:center;}
.ct-scanner-dialog button,.ct-scan-file {min-height:44px;padding:9px 13px;}
.ct-scan-file {position:relative;display:inline-flex;align-items:center;box-sizing:border-box;border:1px solid #7883A8;border-radius:9px;cursor:pointer;}
.ct-scan-file input {position:absolute;opacity:0;width:100%;height:100%;inset:0;cursor:pointer;}
.ct-scan-file:focus-within {outline:2px solid #e4c36a;outline-offset:2px;}
.ct-scan-camera {position:relative;width:min(100%,280px);aspect-ratio:5/7;margin:0 auto;overflow:hidden;border:2px solid #e7c773;border-radius:10px;}
.ct-scan-camera video {width:100%;height:100%;object-fit:cover;}
#ct-scan-preview {display:block;max-width:100%;max-height:360px;width:auto;height:auto;margin:12px auto;touch-action:none;border-radius:6px;cursor:crosshair;}
.ct-scanner-dialog [hidden] {display:none!important;}
.ct-scan-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0;}
.ct-scan-fields label {display:grid;gap:6px;min-width:0;}
.ct-scan-fields input,.ct-scan-fields select {width:100%;min-width:0;box-sizing:border-box;font-size:16px;padding:10px;}
.ct-scan-fields button {grid-column:1/-1;}
.ct-scan-match {display:flex;align-items:center;gap:16px;width:100%;text-align:left;}
.ct-scan-match img {width:110px;max-width:32%;border-radius:7px;}
.ct-scan-candidates {grid-template-columns:repeat(auto-fill,minmax(130px,1fr));}
.ct-scan-status {min-height:1.5em;font-size:14px;}
@media(max-width:500px){.ct-scanner-dialog {padding:16px;}#ct-scan-preview {max-height:290px;}.ct-scan-candidates {grid-template-columns:repeat(2,minmax(0,1fr));}}
/* Fit the camera to the remaining screen space; only the intake strip scrolls. */
.ct-collection-dialog.ct-scanner-dialog.ct-live-scanner {
  --ct-scanner-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);
  --ct-scanner-width:calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px);
  inset:calc(env(safe-area-inset-top,0px) + 12px) calc(env(safe-area-inset-right,0px) + 12px) calc(env(safe-area-inset-bottom,0px) + 12px) calc(env(safe-area-inset-left,0px) + 12px);
  width:min(820px,var(--ct-scanner-width));max-width:var(--ct-scanner-width);height:var(--ct-scanner-height);max-height:var(--ct-scanner-height);margin:auto;padding:14px;overflow:hidden;
  background-color:rgb(128 128 128 / .3);background-image:linear-gradient(145deg,rgb(255 255 255 / .16),transparent 30% 70%,rgb(255 255 255 / .09));
  backdrop-filter:blur(18px) saturate(1.15) brightness(.8);-webkit-backdrop-filter:blur(18px) saturate(1.15) brightness(.8);
  border:1px solid #d7def052;box-shadow:inset 0 1px 0 #f5f8ff4d,inset 1px 0 0 #eff3ff29,0 12px 36px #05050959;
  color:#f1f2fa;text-shadow:0 1px 3px #050509b3;
}
.ct-scanner-dialog.ct-live-scanner[open] {display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:10px;}
.ct-scanner-dialog.ct-live-scanner>.ct-card-close {position:absolute;float:none;top:14px;right:14px;width:44px;height:44px;min-width:44px;margin:0;padding:0;display:grid;place-items:center;background:rgb(128 128 128 / .15);}
.ct-scanner-dialog.ct-live-scanner>h2 {margin:0;padding:0 48px;min-height:44px;font-size:22px;line-height:1.2;}
.ct-scan-toolbar {display:grid;gap:8px;min-width:0;}
.ct-live-scanner .ct-scan-modes {clear:both;}
.ct-live-scanner .ct-scan-inputs {position:absolute;inset:0;display:grid;place-items:center;margin:0;z-index:2;pointer-events:none;}
.ct-live-scanner .ct-scan-inputs button {pointer-events:auto;min-height:48px;max-width:100%;padding:10px 20px;}
.ct-scan-presets {display:grid;grid-template-columns:1.45fr .8fr 1fr;gap:8px;min-width:0;text-align:left;}
.ct-live-scanner .ct-scan-presets label {display:flex;flex-direction:column;gap:2px;margin:0;min-width:0;font-size:11px;line-height:1.2;}
.ct-live-scanner .ct-scan-presets select {box-sizing:border-box;min-width:0;width:100%;min-height:40px;padding:5px 24px 5px 8px;font:inherit;font-size:13px;text-overflow:ellipsis;margin:0;}
.ct-live-scanner button {background:rgb(128 128 128 / .15);border-color:#d7def052;}
.ct-live-scanner .ct-scan-modes button[aria-pressed=true] {background:rgb(128 128 128 / .3);color:#e5c84a;box-shadow:inset 0 0 0 1px #e5c84a;}
.ct-live-layout {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;gap:8px;min-height:0;min-width:0;}
.ct-scan-viewfinder {position:relative;display:grid;place-items:center;min-height:0;min-width:0;overflow:hidden;}
.ct-live-scanner .ct-scan-camera {box-sizing:border-box;margin:0;max-width:100%;max-height:100%;}
.ct-live-scanner .ct-scan-camera video {display:block;}
.ct-live-scanner .ct-scan-status {margin:0;min-height:2.8em;font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
.ct-live-guide {position:absolute;left:1%;top:82%;width:98%;height:17.5%;border:2px solid #ffe496;box-sizing:border-box;pointer-events:none;}
.ct-live-scanner[data-mode=art] .ct-live-guide {left:8%;top:13%;width:84%;height:40%;}
.ct-live-preview {--ct-scan-thumb-height:clamp(48px,10dvh,90px);display:grid;grid-template-columns:108px minmax(0,1fr);align-items:stretch;gap:8px;padding-top:8px;border-top:1px solid #d7def052;min-width:0;color:#F1F2FA;}
#ct-live-thumbs {display:flex;align-items:center;gap:8px;min-width:0;min-height:calc(var(--ct-scan-thumb-height) + 4px);overflow-x:auto;overflow-y:hidden;padding:2px;scroll-padding-inline:2px;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;}
.ct-live-scanner #ct-live-thumbs img {flex:0 0 auto;width:calc(var(--ct-scan-thumb-height)*63/88);height:var(--ct-scan-thumb-height);max-width:none;max-height:none;object-fit:cover;border-radius:5px;margin:0;}
.ct-live-scanner #ct-live-thumbs img[role=button]{cursor:pointer;}
.ct-live-scanner #ct-live-thumbs img[role=button]:focus-visible{outline:2px solid #E5C84A;outline-offset:2px;}
.ct-scan-thumb {flex:0 0 auto;width:calc(var(--ct-scan-thumb-height)*63/88);height:var(--ct-scan-thumb-height);border-radius:5px;}
.ct-scan-thumb:focus-within {outline:2px solid #E5C84A;outline-offset:2px;}
.ct-foil-art {position:relative;display:block;isolation:isolate;min-width:0;border-radius:5px;}
.ct-foil-art.ct-is-foil {overflow:hidden;}
/* A persistent colour reflection remains visible on pale/saturated art, where
   a screen-only highlight disappears. The moving light sits above it. */
.ct-foil-art.ct-is-foil::before {content:"";position:absolute;z-index:1;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(130deg,#63ddff40,#bd7bff42 24%,#ff91be45 42%,#fff39942 58%,#71f5c842 76%,#7dacff40);box-shadow:inset 0 0 0 1px #ffffff80,inset 0 0 7px #c5ddff40;}
.ct-foil-art.ct-is-foil::after {content:"";position:absolute;z-index:2;inset:0;pointer-events:none;border-radius:inherit;opacity:.6;background:linear-gradient(115deg,transparent 26%,#c9f3ff14 32%,#ecb2ff73 40%,#ffffe499 49%,#a1ffed96 55%,#bdc8ff59 64%,transparent 72%);background-size:220% 100%;mix-blend-mode:screen;animation:ct-foil-shimmer 5s ease-in-out infinite alternate;}
.ct-scan-thumb.ct-is-foil:not([data-scan-visible="true"])::after {animation-play-state:paused;}
@keyframes ct-foil-shimmer {from{background-position:0% 50%;}to{background-position:100% 50%;}}
@media(prefers-reduced-motion:reduce){.ct-foil-art.ct-is-foil::after{animation:none;background-position:45% 50%;}}
@media(forced-colors:active){.ct-foil-art.ct-is-foil::before{content:none;}.ct-foil-art.ct-is-foil::after{content:"★";inset:4px 4px auto auto;opacity:1;color:Highlight;background:Canvas;mix-blend-mode:normal;animation:none;}}
.ct-live-preview #ct-scan-review {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:64px;margin:0;padding:6px;font-size:13px;line-height:1.25;white-space:normal;}
.ct-live-confirm {position:absolute;inset:0;display:grid;place-items:center;color:#F1F2FA;background:#1C294938;font-size:70px;opacity:0;pointer-events:none;}
.ct-scan-success .ct-live-confirm {opacity:1;}
.ct-scanner-dialog .ct-scan-flying-card {max-width:none;max-height:none;object-fit:fill;transform-origin:top left;z-index:10;pointer-events:none;border-radius:8px;margin:0;box-shadow:0 10px 30px #0007;}
/* A native modal sheet keeps the upper camera area visible and handles system Back. */
.ct-live-scanner .ct-scan-sheet {
  position:fixed;inset:auto calc(env(safe-area-inset-right,0px) + 12px) calc(env(safe-area-inset-bottom,0px) + 12px) calc(env(safe-area-inset-left,0px) + 12px);
  width:min(820px,var(--ct-scanner-width));max-width:var(--ct-scanner-width);height:calc(var(--ct-scanner-height)*.7);max-height:calc(var(--ct-scanner-height)*.7);margin:0 auto;padding:0 14px 14px;box-sizing:border-box;overflow:hidden;border-radius:24px 24px 16px 16px;
  background-color:rgb(128 128 128 / .3);background-image:linear-gradient(145deg,rgb(255 255 255 / .16),transparent 30% 70%,rgb(255 255 255 / .09));
  backdrop-filter:blur(18px) saturate(1.15) brightness(.8);-webkit-backdrop-filter:blur(18px) saturate(1.15) brightness(.8);
  border:1px solid #d7def052;box-shadow:inset 0 1px 0 #f5f8ff4d,0 -8px 36px #05050959;color:#f1f2fa;text-shadow:0 1px 3px #050509b3;
}
.ct-live-scanner .ct-scan-sheet[open] {display:flex;flex-direction:column;}
.ct-scan-sheet::backdrop {background:#05050933;}
.ct-scan-sheet[data-closing=true] {pointer-events:none;}
.ct-scan-sheet-heading {position:relative;display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:8px;flex:none;padding-top:16px;touch-action:none;cursor:grab;}
.ct-scan-sheet-heading:active {cursor:grabbing;}
.ct-scan-sheet-handle {position:absolute;top:6px;left:50%;transform:translateX(-50%);width:40px;height:4px;border-radius:4px;background:#d7def099;}
.ct-live-scanner .ct-scan-sheet-heading h2 {min-height:44px;margin:0;padding:0;font-size:20px;line-height:1.2;justify-content:flex-start;}
.ct-live-scanner .ct-scan-sheet-close {width:44px;height:44px;margin:0;padding:0;font-size:26px;}
.ct-scan-sheet-status {flex:none;font-size:13px;line-height:1.4;margin:6px 0 10px;overflow-wrap:anywhere;}
.ct-live-scanner #ct-scan-results {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:8px;}
.ct-scan-sheet #ct-scan-results>p {font-size:13px;line-height:1.4;}
.ct-scan-sheet #ct-scan-results>button {margin:0 0 8px;}
.ct-scan-sheet-tools {display:flex;align-items:center;justify-content:space-between;gap:8px;}
.ct-scan-sheet #ct-scan-results>.ct-scan-candidates:first-child {margin-top:0;}
@media(min-width:620px) and (max-height:520px){.ct-scan-toolbar {grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);align-items:end;}}
@media(max-height:520px){
 .ct-collection-dialog.ct-scanner-dialog.ct-live-scanner {padding:8px;}
 .ct-scanner-dialog.ct-live-scanner[open],.ct-live-layout {gap:6px;}
 .ct-scanner-dialog.ct-live-scanner>.ct-card-close {top:8px;right:8px;}
 .ct-scanner-dialog.ct-live-scanner>h2 {font-size:18px;}
 .ct-live-scanner .ct-scan-status {min-height:1.4em;font-size:12px;}
 .ct-live-preview {--ct-scan-thumb-height:48px;padding-top:6px;}
 .ct-live-preview #ct-scan-review {min-height:54px;}
 .ct-live-scanner .ct-scan-sheet {padding:0 10px 10px;}
 .ct-scan-sheet-heading {padding-top:12px;}
 .ct-scan-sheet-status {margin:4px 0 6px;}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.ct-collection-dialog.ct-scanner-dialog.ct-live-scanner,.ct-live-scanner .ct-scan-sheet {background:#303238eb;background-image:none;}}
@media(prefers-reduced-transparency:reduce){.ct-collection-dialog.ct-scanner-dialog.ct-live-scanner,.ct-live-scanner .ct-scan-sheet {background:#303238;backdrop-filter:none;-webkit-backdrop-filter:none;}}
@media(forced-colors:active){.ct-collection-dialog.ct-scanner-dialog.ct-live-scanner,.ct-live-scanner .ct-scan-sheet,.ct-live-scanner button,.ct-live-scanner .ct-scan-modes button[aria-pressed=true] {background:Canvas;color:CanvasText;background-image:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;border-color:CanvasText;}}
@media(prefers-reduced-motion:reduce){.ct-scan-flying-card {display:none;}}

/* AP05: collection dialogs retain their existing structure and actions. */
.ct-collection-dialog {overscroll-behavior:contain;scroll-padding-block:56px 16px;}
.ct-collection-dialog button {min-width:44px;min-height:44px;touch-action:manipulation;}
.ct-collection-dialog :is(input:not([type=checkbox]),select,textarea) {min-height:44px;font-size:16px;}
.ct-collection-dialog :is(button,input,select,textarea,a):focus-visible {outline:3px solid #efce80;outline-offset:2px;}
.ct-collection-dialog .ct-card-close {position:sticky;float:right;top:0;right:auto;margin:-12px -12px 0 8px;z-index:3;background:#1C2949;}
.ct-collection-dialog h2 {min-height:44px;display:flex;align-items:center;justify-content:center;overflow-wrap:anywhere;}
@media(max-width:420px){
 .ct-collection-dialog .ct-attribute-fields {grid-template-columns:minmax(0,1fr);}
 .ct-collection-dialog {padding:16px;}
 .ct-collection-dialog .ct-card-close {margin:-8px -8px 0 8px;}
}

/* Two device views: smartphone in both orientations; shared tablet/PC view. */
#commander-table[data-device-view="smartphone"] #ct-lobby {--ct-title-size:24px;--ct-section-size:20px;}
#commander-table[data-device-view="smartphone"] #ct-lobby .ct-back {min-height:44px;margin-bottom:16px;}
html[data-device-view="smartphone"] .ct-collection-dialog {width:min(560px,calc(100vw - 16px));max-width:calc(100vw - 16px);padding:16px;}
html[data-device-view="smartphone"] .ct-collection-dialog .ct-attribute-fields {grid-template-columns:minmax(0,1fr);}
html[data-device-view="tablet-pc"] .ct-collection-dialog .ct-attribute-fields {grid-template-columns:repeat(2,minmax(0,1fr));}
/* AP05 application shell: shared data, distinct desktop/tablet and phone navigation. */
#commander-table:has(.ct-app-nav) {--ct-nav-width:112px;border-radius:0;min-height:100dvh;}
#commander-table:has(.ct-app-nav):not([data-screen="tracker"]) {padding-left:var(--ct-nav-width);}
#commander-table .ct-app-nav {position:fixed;inset:0 auto 0 0;width:var(--ct-nav-width);height:100dvh;z-index:30;display:flex;flex-direction:column;justify-content:center;background:var(--ct-panel);border-right:1px solid var(--ct-line);padding:16px 10px;}
#commander-table .ct-nav-brand {position:absolute;top:28px;left:0;width:100%;text-align:center;font-weight:800;font-size:30px;letter-spacing:-2px;color:var(--ct-gold);}
#commander-table .ct-nav-brand>span {display:block;font-size:9px;letter-spacing:2px;color:var(--ct-muted);}
#commander-table .ct-nav-items {display:grid;gap:12px;}
#commander-table .ct-app-nav button {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:72px;padding:10px 4px;background:transparent;border:1px solid transparent;border-radius:14px;font-size:11px;font-weight:600;line-height:1.25;}
#commander-table .ct-app-nav svg {width:24px;height:24px;flex:none;}
#commander-table .ct-app-nav button[aria-current="page"] {background:var(--ct-button);border-color:var(--ct-line);color:var(--ct-gold);}
#commander-table .ct-app-nav #ct-nav-play {background:var(--ct-ink);color:var(--ct-panel);}
#commander-table .ct-app-nav #ct-nav-play[aria-current="page"] {box-shadow:0 0 0 2px var(--ct-gold);}
#commander-table[data-screen="tracker"] .ct-app-nav {display:none;}
#commander-table:has(.ct-app-nav) #ct-lobby {padding:clamp(20px,3vw,48px);}
#commander-table:has(.ct-app-nav) #ct-lobby :is(.ct-profiles-page,.ct-decks-page,.ct-rules-page) {width:100%;max-width:1280px;margin:0 auto;}
#commander-table:has(.ct-app-nav) #ct-lobby h1 {font-size:clamp(26px,3vw,36px);font-weight:700;letter-spacing:-.8px;line-height:1.2;margin:8px 0 24px;}
#commander-table:has(.ct-app-nav) #ct-lobby h2 {font-size:22px;line-height:1.3;letter-spacing:-.3px;}
#commander-table:has(.ct-app-nav) #ct-lobby :is(input:not([type=checkbox]):not([type=range]):not([type=color]),select,textarea) {font-family:inherit;font-size:16px;min-height:44px;border-radius:10px;}
#commander-table:has(.ct-app-nav) :is(button,a,input,select,textarea):focus-visible {outline:3px solid var(--ct-gold);outline-offset:3px;}
#commander-table:has(.ct-app-nav) .ct-welcome {width:min(100%,980px);margin:0 auto;padding:clamp(12px,3vh,36px) 0;text-align:left;}
#commander-table:has(.ct-app-nav) .ct-welcome-icon {display:none;}
#commander-table:has(.ct-app-nav) .ct-welcome>h1 {text-align:left;}
#commander-table:has(.ct-app-nav) .ct-welcome>p {text-align:left;color:var(--ct-muted);font-size:17px;margin-bottom:32px;}
#commander-table:has(.ct-app-nav) .ct-start-actions {width:100%;max-width:none;gap:20px;}
#commander-table:has(.ct-app-nav) .ct-format-start {gap:24px;}
#commander-table:has(.ct-app-nav) .ct-format-start::after {display:none;}
#commander-table:has(.ct-app-nav) .ct-format-start>section {background:var(--ct-panel);border:1px solid var(--ct-line);padding:28px;border-radius:20px;gap:14px;}
#commander-table:has(.ct-app-nav) .ct-format-start h2 {text-align:left;margin:0 0 20px;}
#commander-table:has(.ct-app-nav) .ct-format-start button {min-height:54px;justify-content:flex-start;padding:14px 16px;font-size:15px;}
#commander-table:has(.ct-app-nav) #ct-other-formats {min-height:58px;border-style:dashed;background:transparent;}
#commander-table .ct-page-heading p {color:var(--ct-muted);font-size:16px;margin-bottom:28px;}
#commander-table .ct-tool-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
#commander-table .ct-tool-grid>button {display:grid;justify-items:start;gap:12px;padding:24px;text-align:left;min-height:156px;background:var(--ct-panel);border-radius:18px;}
#commander-table .ct-tool-grid svg {width:28px;height:28px;color:var(--ct-gold);}
#commander-table .ct-tool-grid strong {font-size:19px;}
#commander-table .ct-tool-grid small {color:var(--ct-muted);font-size:14px;}
#commander-table #ct-lobby .ct-profile-content-tabs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0 24px;}
#commander-table #ct-lobby .ct-profile-content-tabs>button {min-width:0;min-height:64px;padding:14px 20px;border:1px solid var(--ct-line);border-radius:12px;background:var(--ct-button);color:var(--ct-ink);font-size:22px;font-weight:700;line-height:1.25;}
#commander-table #ct-lobby .ct-profile-content-tabs>button[aria-pressed=true] {background:var(--ct-gold);border-color:var(--ct-gold);color:var(--ct-panel);}
#commander-table #ct-lobby .ct-profile-content-tabs>button:focus-visible {outline:2px solid var(--ct-gold);outline-offset:3px;}
@media(max-width:500px){#commander-table #ct-lobby .ct-profile-content-tabs{gap:10px;}#commander-table #ct-lobby .ct-profile-content-tabs>button{font-size:16px;padding:12px 8px;}}
#commander-table[data-device-view="smartphone"]:has(.ct-app-nav):not([data-screen="tracker"]) {padding-left:0;padding-bottom:calc(82px + env(safe-area-inset-bottom));}
#commander-table[data-device-view="smartphone"] .ct-app-nav {inset:auto 0 0;width:100%;height:calc(76px + env(safe-area-inset-bottom));padding:6px 6px calc(6px + env(safe-area-inset-bottom));border-right:0;border-top:1px solid var(--ct-line);}
#commander-table[data-device-view="smartphone"] .ct-nav-brand {display:none;}
#commander-table[data-device-view="smartphone"] .ct-nav-items {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;}
#commander-table[data-device-view="smartphone"] .ct-app-nav button {min-height:62px;min-width:0;font-size:9px;gap:4px;padding:5px 2px;border-radius:12px;}
#commander-table[data-device-view="smartphone"]:has(.ct-app-nav) #ct-lobby {padding:24px 16px;}
#commander-table[data-device-view="smartphone"]:has(.ct-app-nav) .ct-format-start {grid-template-columns:minmax(0,1fr);gap:16px;}
#commander-table[data-device-view="smartphone"]:has(.ct-app-nav) .ct-format-start>section {padding:20px;}
#commander-table[data-device-view="smartphone"] .ct-tool-grid {grid-template-columns:minmax(0,1fr);gap:12px;}
#commander-table[data-device-view="smartphone"] .ct-tool-grid>button {min-height:120px;padding:20px;}
@media(max-height:540px){#commander-table[data-device-view="tablet-pc"] .ct-nav-brand{display:none;}#commander-table .ct-nav-items{gap:4px;}}

/* Native dialogs live outside the app root and use the same UI typography. */
.ct-card-dialog{font:15px/1.5 ui-sans-serif,system-ui,sans-serif;}
/* Shared dark grey-green shell; game artwork and game-state colours remain independent. */
#commander-table:has(.ct-app-nav):not([data-screen="tracker"]){--ct-bg:#090D24;--ct-panel:#101A36;--ct-button:#1C2949;--ct-ink:#fff;--ct-muted:#BDC4DF;--ct-line:#1C2949;--ct-gold:#E5C84A;background:var(--ct-bg);color:var(--ct-ink);}
#commander-table .ct-app-nav{overflow:visible;background:var(--ct-panel);box-shadow:6px 0 18px rgb(0 0 0 / 18%);}
#commander-table .ct-app-nav #ct-nav-play{position:relative;isolation:isolate;width:92px;height:92px;min-height:92px;justify-self:center;transform:translateX(14px);border-radius:50%;background:#E5C84A;color:#101A36;box-shadow:none;border:6px solid #101A36;gap:3px;padding:8px 2px;}
#commander-table .ct-app-nav #ct-nav-play::before{content:"";position:absolute;inset:-13px;border-radius:50%;background:var(--ct-panel);border:0;z-index:-2;}
#commander-table .ct-app-nav #ct-nav-play::after{content:"";position:absolute;inset:0;border-radius:50%;background:#E5C84A;z-index:-1;}
#commander-table .ct-app-nav #ct-nav-play[aria-current="page"]{box-shadow:none;}
#commander-table .ct-app-nav #ct-nav-play svg{width:48px;height:40px;color:#fff;}
#commander-table .ct-fanned-cards rect{fill:#E5C84A;}
#commander-table .ct-app-nav #ct-nav-play:hover::after{background:#ffe58a;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-back{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:0;font-size:25px;line-height:1;border:1px solid var(--ct-line);border-radius:12px;margin-bottom:20px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-back[hidden]{display:none!important;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) #ct-lobby{padding:32px 40px 48px;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) #ct-lobby>:is(.ct-welcome,.ct-profiles-page,.ct-setup){width:100%;max-width:1120px;margin-inline:auto;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) #ct-lobby :is(.ct-decks-page,.ct-rules-page){max-width:1120px;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) #ct-lobby :is(h1,h2,.ct-page-heading,.ct-welcome,.ct-welcome>p){text-align:center;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) .ct-format-start button{justify-content:center;}
#commander-table[data-device-view="tablet-pc"] .ct-tool-grid>button{justify-items:center;text-align:center;}
#commander-table[data-device-view="smartphone"] .ct-app-nav #ct-nav-play{width:68px;height:68px;min-height:68px;transform:translateY(-18px);border-width:4px;font-size:9px;gap:1px;}
#commander-table[data-device-view="smartphone"] .ct-app-nav #ct-nav-play::before{inset:-9px;}
#commander-table[data-device-view="smartphone"] .ct-app-nav #ct-nav-play svg{width:38px;height:32px;}
#commander-table[data-device-view="smartphone"]:has(.ct-app-nav):not([data-screen="tracker"]){padding-bottom:calc(106px + env(safe-area-inset-bottom));}
@media(max-height:600px){#commander-table[data-device-view="tablet-pc"] .ct-nav-brand{display:none;}#commander-table[data-device-view="tablet-pc"] .ct-nav-items{gap:6px;}#commander-table[data-device-view="tablet-pc"] .ct-app-nav button{min-height:60px;}}
#commander-table:has(.ct-app-nav):not([data-screen="tracker"]){font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
#commander-table:has(.ct-app-nav) :is(button,input,select,textarea){font-family:inherit;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) .ct-profile-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:16px;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) .ct-profile-heading>div:first-child{grid-column:2;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) .ct-profile-heading>button{grid-column:3;justify-self:end;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) .ct-profile-heading h1{margin-bottom:8px;}
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) .ct-page-heading{text-align:center;}

#commander-table[data-device-view="smartphone"] .ct-app-nav{box-shadow:0 -6px 18px rgb(0 0 0 / 18%);}
#commander-table .ct-app-nav #ct-nav-play:hover .ct-fanned-cards rect{fill:#ffe58a;}
/* Continuous navigation surface and a separator that follows the central bulge. */
#commander-table .ct-app-nav{border-right:0;box-shadow:none;}
#commander-table .ct-nav-items{position:relative;isolation:isolate;background:var(--ct-button);border-radius:40px;padding-block:12px;}
#commander-table .ct-app-nav button{color:#fff;}
#commander-table .ct-app-nav button[aria-current="page"]{border-color:transparent;background:transparent;color:var(--ct-gold);}
#commander-table .ct-app-nav #ct-nav-play{background:var(--ct-button);color:#fff;border:0;}
#commander-table .ct-app-nav #ct-nav-play::before{background:var(--ct-button);inset:-6px;}
#commander-table .ct-app-nav #ct-nav-play::after{display:none;}
#commander-table .ct-app-nav #ct-nav-play svg{color:var(--ct-gold);}
#commander-table .ct-fanned-cards rect,#commander-table .ct-app-nav #ct-nav-play:hover .ct-fanned-cards rect{fill:var(--ct-button);}
#commander-table[data-device-view="smartphone"] .ct-nav-items{padding-block:0;border-radius:24px;}
#commander-table[data-device-view="smartphone"] .ct-app-nav #ct-nav-play{border:0;}
#commander-table[data-device-view="smartphone"] .ct-app-nav #ct-nav-play::before{inset:-5px;}
/* Narrow desktop rail: one shared icon axis and a contour-aligned separator. */
#commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav){--ct-nav-width:88px;}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav{padding-inline:0;}
#commander-table[data-device-view="tablet-pc"] .ct-nav-items{width:100%;border-radius:36px;}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav button{width:100%;font-size:10px;}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav #ct-nav-play{width:100%;transform:none;background:transparent;}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav #ct-nav-play::before{display:none;}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav #ct-nav-play svg{width:40px;height:34px;}

/* A single SVG stroke joins the straight edge and rounded bulge without seams. */
#commander-table .ct-app-nav .ct-nav-contour{display:none;pointer-events:none;}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav .ct-nav-contour{display:block;position:absolute;left:0;top:0;width:calc(100% + 20px);height:100%;z-index:0;overflow:visible;filter:none;}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav #ct-nav-play{width:106px;justify-self:start;}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav #ct-nav-play svg{width:50px;height:41px;}
#commander-table[data-device-view="tablet-pc"] .ct-nav-items{grid-template-columns:minmax(0,1fr);}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav .ct-nav-contour{z-index:2;}
#commander-table[data-device-view="smartphone"] .ct-app-nav{border-top:0;}
#commander-table[data-device-view="smartphone"] .ct-app-nav .ct-nav-contour{display:block;position:absolute;inset:0;width:100%;height:100%;z-index:2;overflow:visible;}
/* Current destination is indicated by its icon, while labels stay white. */
#commander-table .ct-app-nav button,#commander-table .ct-app-nav button[aria-current="page"],#commander-table .ct-app-nav #ct-nav-play{color:#fff;}
#commander-table .ct-app-nav button>svg,#commander-table .ct-app-nav #ct-nav-play>svg{color:#fff;}
#commander-table .ct-app-nav button[aria-current="page"]>svg,#commander-table .ct-app-nav #ct-nav-play[aria-current="page"]>svg{color:var(--ct-gold);}
#commander-table .ct-app-nav{box-shadow:8px 0 22px rgb(0 0 0 / 24%);}
#commander-table .ct-app-nav #ct-nav-play{--ct-play-surface:#1C2949;}
#commander-table .ct-app-nav #ct-nav-play::after{display:block;inset:auto;left:50%;top:50%;width:92px;height:92px;transform:translate(-50%,-50%);border-radius:50%;background:var(--ct-play-surface);box-shadow:inset 0 1px 0 rgb(255 255 255 / 7%),0 3px 8px rgb(0 0 0 / 16%);}
#commander-table .ct-app-nav #ct-nav-play:hover::after{background:var(--ct-play-surface);}
#commander-table .ct-fanned-cards rect,#commander-table .ct-app-nav #ct-nav-play:hover .ct-fanned-cards rect{fill:var(--ct-play-surface);}
#commander-table[data-device-view="tablet-pc"] .ct-app-nav #ct-nav-play svg{width:56px;height:46px;}
#commander-table[data-device-view="smartphone"] .ct-app-nav{box-shadow:0 -8px 22px rgb(0 0 0 / 24%);}
#commander-table[data-device-view="smartphone"] .ct-app-nav #ct-nav-play::after{width:64px;height:64px;}
#commander-table[data-device-view="smartphone"] .ct-app-nav #ct-nav-play svg{width:42px;height:35px;}
#commander-table[data-device-view="smartphone"]{--ct-menu-bottom-gap:min(6px,env(safe-area-inset-bottom,0px));}
#commander-table[data-device-view="smartphone"] .ct-app-nav{height:calc(76px + var(--ct-menu-bottom-gap));padding:6px 6px 0;justify-content:flex-end;}
#commander-table[data-device-view="smartphone"] .ct-nav-items{height:100%;width:100%;grid-template-rows:68px;align-items:start;padding:0 0 var(--ct-menu-bottom-gap);border-radius:24px 24px 0 0;}
#commander-table[data-device-view="smartphone"] .ct-app-nav button:not(#ct-nav-play){height:68px;display:grid;grid-template-rows:26px 24px;justify-items:center;align-items:center;align-content:center;gap:4px;padding:6px 2px;}
#commander-table[data-device-view="smartphone"] .ct-app-nav button:not(#ct-nav-play)>span:not(.op-nav-badge){width:100%;text-align:center;align-self:start;line-height:12px;}
#commander-table[data-device-view="tablet-pc"] .ct-nav-items{width:calc(100% - 1px);z-index:3;}
/* Centre the new-game landing page within the space beside the desktop rail. */
#commander-table[data-device-view="tablet-pc"][data-screen="home"]:has(.ct-app-nav) #ct-lobby:has(>.ct-welcome){display:flex;flex-direction:column;min-height:100dvh;padding-block:32px;}
#commander-table[data-device-view="tablet-pc"][data-screen="home"]:has(.ct-app-nav) #ct-lobby>.ct-welcome{flex:none;margin:auto;padding-block:0;}
/* Black page canvas, including the safe area; framed contents keep their panel colour. */
html:has(#commander-table),body:has(#commander-table){background:#050509;}
#commander-table:not([data-screen="tracker"]){background:#050509;}
#commander-table #ct-lobby,#commander-table .ct-app-nav{background:#050509;}
#commander-table[data-device-view="smartphone"] .ct-app-nav{background:transparent;box-shadow:none;}
/* Retain the device inset for scroll targets. The status area itself is
   painted by mobile-shell.css; an opaque body cover would hide its glass. */
body:has(#commander-table[data-device-view="smartphone"] .ct-app-nav){--ct-menu-safe-top:env(safe-area-inset-top,0px);}
#commander-table #ct-lobby :is(.ct-collection-folders,.ct-format-categories>section,.ct-format-group,.ct-setup-player,.ct-setup-rules,.ct-setup-variants,.ct-rule-entry,.ct-missing-card){background:var(--ct-panel);}
#commander-table:has(.ct-app-nav):not([data-screen="tracker"]){background:#050509;padding-top:env(safe-area-inset-top,0px);}
#commander-table:has(.ct-app-nav) #ct-lobby :is(h1,h2){text-align:center;}
#commander-table[data-device-view="smartphone"]:has(.ct-app-nav):not([data-screen="tracker"]){padding-bottom:calc(100px + var(--ct-menu-bottom-gap));}
#commander-table[data-device-view="smartphone"]:has(.ct-app-nav) #ct-lobby{padding-top:8px;}
#commander-table[data-device-view="smartphone"]:has(.ct-app-nav) #ct-lobby :is(.ct-profiles-page,.ct-setup,.ct-decks-page,.ct-rules-page){padding-top:0;}
#commander-table[data-device-view="smartphone"] #ct-lobby #ct-open-primary{margin-top:0;}
/* Centre the visible start actions without stretching their fixed-height rows. */
html:has(#commander-table[data-screen="home"] .ct-welcome),body:has(#commander-table[data-screen="home"] .ct-welcome){overflow:hidden;overscroll-behavior:none;}
#commander-table[data-screen="home"]:has(.ct-welcome){box-sizing:border-box;height:100dvh;min-height:0;--ct-start-gap:26px;--ct-start-row:48px;--ct-start-heading:22px;--ct-start-inset:14px;--ct-start-inner-gap:14px;}
#commander-table[data-screen="home"]:has(.ct-app-nav) #ct-lobby:has(>.ct-welcome){display:flex;height:100%;min-height:0;padding-block:clamp(8px,2dvh,20px);}
#commander-table[data-screen="home"]:has(.ct-app-nav) #ct-lobby>.ct-welcome{display:flex;flex:none;width:100%;max-width:840px;min-height:0;height:auto;max-height:none;padding:0;margin:auto;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-start-actions{display:grid;grid-template-rows:auto var(--ct-start-row);grid-auto-rows:66px;flex:none;min-height:0;margin:0;gap:var(--ct-start-gap);}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-resume-session{display:grid;grid-template-rows:44px 18px;gap:4px;text-align:center;}
#commander-table:has(.ct-app-nav) #ct-lobby #ct-resume{width:100%;height:44px;min-height:44px;margin:0;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-session-note{font-size:12px;line-height:18px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-format-start{flex:none;min-height:0;gap:var(--ct-start-gap);}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-format-start>section{display:grid;grid-template-rows:calc(var(--ct-start-heading) * 1.3) repeat(2,var(--ct-start-row));min-height:0;padding:var(--ct-start-inset);gap:var(--ct-start-inner-gap);border-radius:16px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-format-start h2{margin:0;font-size:var(--ct-start-heading);line-height:1.3;font-weight:650;text-align:center;color:var(--ct-gold);}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-format-start button{height:var(--ct-start-row);min-height:44px;min-width:0;padding:8px;font-size:16px;justify-content:center;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-format-start button svg{flex:none;width:20px;height:20px;}
#commander-table:has(.ct-app-nav) #ct-lobby #ct-other-formats{flex:none;align-self:stretch;width:100%;max-width:none;height:var(--ct-start-row);min-height:44px;margin:0;padding:6px 12px;font-size:var(--ct-start-heading);line-height:1.3;letter-spacing:-.3px;font-weight:650;border-radius:14px;background:var(--ct-panel);}
@media(max-height:700px){
  #commander-table[data-screen="home"]:has(.ct-welcome){--ct-start-gap:14px;--ct-start-row:44px;--ct-start-heading:20px;--ct-start-inset:4px;--ct-start-inner-gap:6px;}
  #commander-table:has(.ct-app-nav) #ct-lobby .ct-format-start button{gap:5px;font-size:14px;padding:6px;}
}
@media(max-height:600px){
  #commander-table[data-screen="home"]:has(.ct-welcome){--ct-start-gap:10px;}
}
@media(max-height:450px){
  #commander-table[data-screen="home"]:has(.ct-welcome){--ct-start-gap:6px;}
  #commander-table[data-screen="home"]:has(.ct-app-nav) #ct-lobby:has(>.ct-welcome){padding-block:0;}
  #commander-table[data-device-view="smartphone"]:has(.ct-app-nav) #ct-lobby .ct-format-start{grid-template-columns:repeat(2,minmax(0,1fr));}
}
/* Back controls share the title's centre line; SVG avoids font baseline offsets. */
#commander-table:has(.ct-app-nav) #ct-lobby .ct-page-title-row{position:relative;width:fit-content;max-width:calc(100% - 120px);margin:8px auto 28px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-page-title-row>h1{margin:0;text-align:center;overflow-wrap:anywhere;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-page-title-row>.ct-back{position:absolute;right:calc(100% + 18px);top:50%;transform:translateY(-50%);display:grid;place-items:center;margin:0;padding:0;line-height:0;width:44px;height:44px;min-height:44px;}
/* Format folders offer import on the left and creation on the right. */
#commander-table #ct-lobby .ct-deck-folder-heading{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:32px;margin:8px 0 16px;min-height:44px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-deck-folder-heading>.ct-page-title-row{grid-column:1;grid-row:1;justify-self:center;width:auto;max-width:calc(100% - 124px);margin:0;}
#commander-table #ct-lobby .ct-deck-folder-actions{display:flex;justify-content:space-between;gap:8px;grid-column:1;grid-row:2;min-width:0;}
#commander-table #ct-lobby .ct-deck-folder-actions>button{min-width:0;min-height:44px;margin:0;white-space:nowrap;}
#commander-table[data-device-view="smartphone"] #ct-lobby .ct-deck-folder-heading{gap:24px;margin-bottom:12px;}
#commander-table[data-device-view="smartphone"] #ct-lobby .ct-deck-folder-actions>button{flex:1;padding:10px 8px;font-size:clamp(12px,3.5vw,14px);}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-back>svg{display:block;width:22px;height:22px;margin:0;flex:none;}
/* Keep the deck edit action at the right edge of the title row. */
#commander-table #ct-lobby .ct-deck-detail-heading{display:grid;grid-template-columns:minmax(140px,1fr) minmax(0,auto) minmax(140px,1fr);align-items:center;gap:16px;margin:8px 0 28px;min-height:44px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-deck-detail-heading>.ct-page-title-row{grid-column:2;grid-row:1;width:auto;max-width:none;margin:0;}
#commander-table #ct-lobby .ct-deck-detail-heading>#ct-deck-edit{grid-column:3;grid-row:1;justify-self:end;margin:0;min-height:44px;white-space:nowrap;}
@media(max-width:760px){#commander-table #ct-lobby .ct-deck-detail-heading{grid-template-columns:minmax(0,1fr);gap:12px;margin-bottom:16px;}#commander-table:has(.ct-app-nav) #ct-lobby .ct-deck-detail-heading>.ct-page-title-row{grid-column:1;justify-self:center;max-width:calc(100% - 124px);}#commander-table #ct-lobby .ct-deck-detail-heading>#ct-deck-edit{grid-column:1;grid-row:2;}}
/* Detail-page back controls do not use the standard page-title wrapper. */
#commander-table:has(.ct-app-nav) #ct-lobby .ct-back-top-left{position:static;transform:none;display:grid;place-items:center;margin:0 auto 20px 0;padding:0;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-identity h1{word-break:normal;overflow-wrap:break-word;}
/* Compact folder visibility list, with one full-row checkbox target per format. */
dialog.ct-deck-visibility-dialog{width:300px;max-width:calc(100vw - 24px);height:auto;min-height:0;padding:16px;}
dialog.ct-deck-visibility-dialog h2{font-size:18px;margin:0 0 12px;}
dialog.ct-deck-visibility-dialog form{display:grid;gap:0;clear:both;}
dialog.ct-deck-visibility-dialog .ct-deck-visibility-row{min-height:44px;}
dialog.ct-deck-visibility-dialog .ct-deck-visibility{display:flex;flex-direction:row;justify-content:space-between;align-items:center;width:100%;min-height:44px;padding:6px 2px;margin:0;cursor:pointer;}
dialog.ct-deck-visibility-dialog .ct-deck-visibility span{text-align:left;}
dialog.ct-deck-visibility-dialog .ct-deck-visibility input{width:18px;height:18px;min-height:18px;min-width:18px;margin:0;flex:none;accent-color:#E5C84A;}
dialog.ct-deck-visibility-dialog [role=status]:empty{display:none;}
dialog.ct-deck-visibility-dialog button[type=submit]{margin-top:16px;min-height:44px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-collection-folders .ct-folder-actions{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:16px;min-height:44px;}
dialog.ct-deck-visibility-dialog{width:340px;height:fit-content;block-size:fit-content;min-height:0;max-height:calc(100dvh - 24px);margin:auto;}
dialog.ct-deck-visibility-dialog h2{padding:0;margin:0 48px 12px 0;min-height:44px;white-space:nowrap;overflow-wrap:normal;font-size:18px;}
dialog.ct-deck-visibility-dialog .ct-card-close{position:absolute;float:none;top:12px;right:12px;margin:0;}
dialog.ct-deck-visibility-dialog .ct-deck-visibility{box-sizing:border-box;height:44px;}
#commander-table #ct-lobby .ct-folder-actions>.ct-folder-action-buttons{grid-column:3;grid-row:1;max-width:100%;}
@media(max-width:1000px){#commander-table:has(.ct-app-nav) #ct-lobby .ct-collection-folders .ct-folder-actions{grid-template-columns:minmax(0,1fr);gap:16px;}#commander-table #ct-lobby .ct-folder-actions>.ct-folder-action-buttons{grid-column:1;grid-row:2;flex-wrap:wrap;justify-content:flex-end;}}
/* Folder titles use the same back-arrow spacing as the collection heading. */
#commander-table #ct-lobby .ct-collection-folder-title{position:relative;min-width:0;}
#commander-table #ct-lobby .ct-collection-folder-title>h1{margin:0;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-collection-folder-title>#ct-collection-back{position:absolute;right:calc(100% + 18px);left:auto;top:50%;transform:translateY(-50%);margin:0;}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair{display:grid;grid-template-columns:minmax(120px,240px) max-content minmax(100px,160px) 40px;gap:10px;min-width:0;width:620px;max-width:100%;}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair>.ct-collection-search{grid-column:1;grid-row:1;position:relative;display:block;width:100%;min-width:0;margin:0;}
/* Paint the search icon above the input's backdrop filter, not into its glass. */
#commander-table #ct-lobby .ct-collection-search>svg{position:absolute;z-index:1;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--ct-muted);pointer-events:none;}
#commander-table #ct-lobby #ct-collection-search{height:44px;padding-left:38px;}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair>.ct-view-toggle{grid-column:2;grid-row:1;}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair>label:has(#ct-collection-sort){grid-column:3;grid-row:1;min-width:0;width:100%;}
#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair>#ct-sort-reverse{grid-column:4;grid-row:1;}
#commander-table #ct-lobby .ct-folder-detail .ct-folder-value{min-width:0;max-width:100%;overflow-wrap:anywhere;}
/* Leave room for search beside the view switch in the unsorted-card toolbar. */
#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools:has(#ct-deck-card-filter){grid-template-columns:minmax(0,1fr) minmax(150px,190px) max-content max-content;}
@media(max-width:1200px){
#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools:has(#ct-deck-card-filter){grid-template-columns:repeat(2,minmax(0,1fr));}
#commander-table #ct-lobby .ct-collection-overview:not(.ct-folder-detail) .ct-sort-pair{grid-column:1/-1;}
#commander-table #ct-lobby .ct-collection-overview label:has(>#ct-deck-card-filter){grid-column:1;grid-row:3;}
#commander-table #ct-lobby .ct-collection-overview:not(.ct-folder-detail) #ct-add-cards{grid-column:2;grid-row:3;}
#commander-table #ct-lobby .ct-collection-overview:not(.ct-folder-detail) #ct-owned-select{grid-column:2;grid-row:4;}
#commander-table #ct-lobby .ct-collection-overview:not(.ct-folder-detail) .ct-select-all{grid-column:1;grid-row:5;}
#commander-table #ct-lobby .ct-collection-overview:not(.ct-folder-detail) #ct-owned-edit{grid-column:2;grid-row:5;}
#commander-table #ct-lobby .ct-collection-overview:not(.ct-folder-detail) #ct-resume-intake{grid-column:1/-1;grid-row:6;}
}
@media(min-width:1001px){#commander-table #ct-lobby .ct-folder-detail .ct-collection-tools{grid-template-columns:minmax(0,1fr) max-content max-content;}#commander-table #ct-lobby .ct-folder-detail #ct-add-cards,#commander-table #ct-lobby .ct-folder-detail .ct-select-all{grid-column:2;}#commander-table #ct-lobby .ct-folder-detail #ct-owned-select,#commander-table #ct-lobby .ct-folder-detail #ct-owned-edit{grid-column:3;}#commander-table #ct-lobby .ct-folder-detail #ct-resume-intake{grid-column:1;}}
@media(min-width:1001px){#commander-table #ct-lobby .ct-folder-detail .ct-collection-tools:not(:has(#ct-owned-select)){grid-template-columns:minmax(0,1fr) max-content;}}
@media(max-width:700px){#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair{grid-template-columns:minmax(0,1fr) max-content;}#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair>label:has(#ct-collection-sort){grid-column:1;grid-row:2;}#commander-table #ct-lobby .ct-collection-overview .ct-sort-pair>#ct-sort-reverse{grid-column:2;grid-row:2;justify-self:start;}}
@media(max-width:650px){#commander-table #ct-lobby .ct-folder-detail .ct-pool-identity .ct-collection-section-heading{justify-self:center;max-width:calc(100% - 124px);}#commander-table #ct-lobby .ct-folder-detail .ct-collection-tools{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}}
/* A round, translucent yellow accent marks the selected navigation destination. */
/* Collection controls follow the same centred order on phones and larger screens. */
#commander-table:has(.ct-app-nav) #ct-lobby .ct-collection-overview .ct-folder-actions{grid-template-columns:minmax(0,1fr);gap:12px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-folder-actions>.ct-folder-action-buttons{grid-column:1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(100%,440px);justify-self:center;}
#commander-table #ct-lobby .ct-folder-action-buttons>button{width:100%;min-width:0;min-height:44px;padding:8px;font-size:14px;line-height:1.25;}
#commander-table #ct-lobby .ct-collection-overview .ct-collection-tools.ct-collection-controls{display:flex;flex-direction:column;align-items:stretch;gap:14px;width:100%;}
#commander-table #ct-lobby .ct-collection-controls>.ct-pool-identity{display:flex;flex-direction:column;align-items:center;gap:6px;margin:0;}
#commander-table #ct-lobby .ct-collection-controls .ct-collection-totals{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:4px 8px;width:100%;text-align:center;font-size:13px;}
#commander-table #ct-lobby .ct-collection-totals :is(#ct-visible-card-count,.ct-folder-value){margin:0;font-size:inherit;text-align:center;}
#commander-table #ct-lobby .ct-collection-totals .ct-folder-value:not(:empty)::before{content:'·';margin-right:8px;}
#commander-table #ct-lobby .ct-collection-overview .ct-collection-controls>.ct-sort-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,140px) 44px;align-items:end;gap:8px;width:100%;max-width:620px;margin-inline:auto;}
#commander-table #ct-lobby .ct-collection-controls>.ct-sort-pair>.ct-collection-search{grid-column:1;grid-row:1;}
#commander-table #ct-lobby .ct-collection-controls>.ct-sort-pair>label:has(#ct-collection-sort){grid-column:2;grid-row:1;font-size:12px;text-align:center;}
#commander-table #ct-lobby .ct-collection-controls>.ct-sort-pair>#ct-sort-reverse{grid-column:3;grid-row:1;width:44px;height:44px;min-height:44px;padding:0;justify-self:stretch;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-collection-controls :is(#ct-collection-sort,#ct-collection-search){height:44px;min-height:44px;width:100%;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-collection-controls #ct-collection-sort{padding:8px;font-size:14px;}
#commander-table #ct-lobby .ct-collection-controls>.ct-collection-display-controls{display:grid;grid-template-columns:minmax(0,1fr) 140px;align-items:end;gap:8px;width:min(100%,440px);align-self:center;}
#commander-table #ct-lobby .ct-collection-controls .ct-collection-display-controls>label:has(#ct-deck-card-filter){display:flex;flex-direction:column;gap:6px;width:100%;min-width:0;margin:0;text-align:center;font-size:14px;grid-column:1;grid-row:1;}
#commander-table #ct-lobby .ct-collection-controls #ct-deck-card-filter{width:100%;min-width:0;max-width:100%;height:44px;min-height:44px;padding:8px;font-size:14px;}
#commander-table #ct-lobby .ct-collection-controls .ct-view-toggle{grid-column:2;grid-row:1;height:44px;min-height:44px;min-width:0;align-self:end;justify-content:center;gap:5px;margin:0;font-size:13px;}
#commander-table #ct-lobby .ct-collection-controls .ct-view-toggle button{width:44px;min-width:44px;max-width:44px;}
#commander-table #ct-lobby .ct-collection-display-controls:has(>.ct-view-toggle:only-child){grid-template-columns:140px;justify-content:center;}
#commander-table #ct-lobby .ct-collection-display-controls>.ct-view-toggle:only-child{grid-column:1;}
#commander-table #ct-lobby .ct-collection-controls>.ct-collection-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(100%,440px);align-self:center;}
#commander-table #ct-lobby .ct-collection-controls .ct-collection-card-actions>:is(#ct-add-cards,#ct-owned-select){grid-column:auto;grid-row:auto;justify-self:stretch;align-self:stretch;width:100%;max-width:none;min-width:0;min-height:44px;margin:0;padding:8px;font-size:14px;line-height:1.25;}
#commander-table #ct-lobby .ct-collection-card-actions>button:only-child{grid-column:1/-1;}
#commander-table #ct-lobby .ct-collection-overview .ct-collection-controls>.ct-selection-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;order:1;}
#commander-table #ct-lobby .ct-collection-controls>.ct-selection-tools:not(:has(>:not([hidden]))){display:none;}
#commander-table #ct-lobby .ct-collection-controls>#ct-resume-intake{align-self:center;order:2;}
#commander-table #ct-lobby .ct-collection-feedback:empty{display:none;}
/* Larger devices keep the collection toolbar in one left-to-right row. */
#commander-table #ct-lobby .ct-collection-filter-separator{display:none;}
#commander-table[data-device-view="smartphone"] #ct-lobby .ct-collection-controls>.ct-collection-filter-separator{display:block;flex:none;width:100%;height:0;margin:0;padding:0;border:0;border-top:1px solid var(--ct-muted);opacity:.55;}
#commander-table[data-device-view="smartphone"] #ct-lobby .ct-collection-controls>.ct-collection-filter-separator+.ct-collection-card-actions{margin-top:14px;}
#commander-table[data-device-view="smartphone"] #ct-lobby .ct-collection-controls .ct-collection-control-caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-overview .ct-collection-tools.ct-collection-controls,
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-overview .ct-collection-tools.ct-collection-controls:has(#ct-deck-card-filter){display:grid;grid-template-columns:minmax(0,1fr) max-content max-content;align-items:end;gap:14px 10px;}
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls>.ct-pool-identity{grid-column:1/-1;grid-row:1;}
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-overview .ct-collection-controls>.ct-sort-pair{grid-column:1;grid-row:2;grid-template-columns:minmax(0,1fr) clamp(86px,9vw,140px) 44px;width:100%;max-width:none;margin:0;}
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls>.ct-collection-display-controls{grid-column:2;grid-row:2;grid-template-columns:190px 140px;width:max-content;align-self:end;}
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls>.ct-collection-card-actions{grid-column:3;grid-row:2;grid-template-columns:repeat(2,minmax(max-content,1fr));width:max-content;align-self:end;}
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls .ct-collection-card-actions>:is(#ct-add-cards,#ct-owned-select){white-space:nowrap;}
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls>.ct-selection-tools{grid-column:1/-1;grid-row:3;}
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls>#ct-resume-intake{grid-column:1/-1;grid-row:4;justify-self:center;}
@media(max-width:1000px){
  #commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) #ct-lobby:has(.ct-collection-overview){padding-inline:12px;}
  #commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-overview .ct-collection-tools.ct-collection-controls,
#commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-overview .ct-collection-tools.ct-collection-controls:has(#ct-deck-card-filter){grid-template-columns:minmax(0,1fr) max-content max-content;column-gap:6px;}
  #commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-overview .ct-collection-controls>.ct-sort-pair{grid-template-columns:minmax(0,1fr) 74px 44px;gap:4px;}
  #commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls>.ct-collection-display-controls{grid-template-columns:100px 112px;gap:4px;}
  #commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls .ct-view-toggle{font-size:11px;gap:3px;}
  #commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls .ct-collection-search>svg{display:none;}
  #commander-table[data-device-view="tablet-pc"]:has(.ct-app-nav) #ct-lobby .ct-collection-controls #ct-collection-search{padding-inline:8px;font-size:13px;}
  #commander-table[data-device-view="tablet-pc"] #ct-lobby .ct-collection-controls .ct-collection-card-actions>:is(#ct-add-cards,#ct-owned-select){font-size:12px;padding:6px;}
}
@media(max-width:359px){
  #commander-table #ct-lobby .ct-collection-overview .ct-collection-controls>.ct-sort-pair{grid-template-columns:minmax(0,1fr) 104px 44px;gap:6px;}
  #commander-table #ct-lobby .ct-collection-search>svg{display:none;}
  #commander-table:has(.ct-app-nav) #ct-lobby .ct-collection-controls #ct-collection-search{padding-left:8px;}
}
#commander-table .ct-app-nav{--ct-nav-highlight:rgb(241 213 107 / 22%);}
#commander-table .ct-app-nav button:not(#ct-nav-play)[aria-current="page"]>svg{border-radius:50%;background:var(--ct-nav-highlight);box-shadow:0 0 0 5px var(--ct-nav-highlight);}
#commander-table .ct-app-nav #ct-nav-play[aria-current="page"]{--ct-play-surface:var(--ct-nav-highlight);--ct-play-card-fill:color-mix(in srgb,#E5C84A 22%,#1C2949);}
#commander-table .ct-app-nav #ct-nav-play .ct-fanned-cards rect,#commander-table .ct-app-nav #ct-nav-play:hover .ct-fanned-cards rect{fill:var(--ct-play-card-fill,var(--ct-play-surface));}
#commander-table #ct-lobby .ct-profile-tabs{align-items:center;}
#commander-table #ct-lobby .ct-profile-tabs>#ct-profile-add{order:0;align-self:center;margin:0 0 0 auto;}
#commander-table #ct-lobby .ct-profile-section-tabs{order:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 20px;}
#commander-table #ct-lobby .ct-profile-section-tabs button{min-height:48px;padding:12px;}
#commander-table #ct-lobby .ct-profile-section-tabs [aria-selected=true]{border-color:var(--ct-gold);background:color-mix(in srgb,var(--ct-gold) 13%,var(--ct-button));}
#commander-table #ct-lobby .ct-profile-directory-panel{order:4;min-width:0;}
#commander-table #ct-lobby .ct-profile-directory-panel[hidden]{display:none;}
#commander-table #ct-lobby .ct-profile-tabs>#ct-friend-add{align-self:center;margin:0 0 0 auto;}
#commander-table #ct-lobby #ct-friend-search{width:220px;max-width:100%;height:44px;box-sizing:border-box;background:#101A36;color:#fff;border:1px solid #7883A8;padding:10px 12px;border-radius:10px;}
/* Deck connections belong to the main profile, outside the game tableaus. */
#commander-table #ct-lobby .ct-profile-commander-open{position:relative;z-index:1;display:flex;align-items:center;justify-content:flex-start;min-width:0;flex:1;align-self:stretch;border:0;background:transparent;padding:12px 16px;text-align:left;}
#commander-table #ct-lobby .ct-profile-commander-open>span{display:flex;flex-direction:column;gap:6px;padding:5px 9px;border-radius:8px;background:color-mix(in srgb,var(--ct-panel) 82%,transparent);overflow-wrap:anywhere;}
#commander-table #ct-lobby .ct-profile-commander-open small{font-size:13px;color:var(--ct-muted);}
#commander-table #ct-lobby .ct-profile-commander-open{gap:12px;}
#commander-table .ct-profile-commander-chevron{flex:none;margin-left:auto;}
#commander-table [data-profile-commander][aria-expanded=true] .ct-profile-commander-chevron{transform:rotate(180deg);}
#commander-table .ct-profile-commander-decks{padding:12px 16px 20px;border-left:2px solid var(--ct-line);margin:0 12px 12px;}
#commander-table .ct-profile-commander-decks[hidden]{display:none;}
#commander-table .ct-profile-commander-decks>p{margin:4px 0;}
#commander-table .ct-profile-deck-list{display:grid;gap:12px;margin:0;padding:0;list-style:none;}
#commander-table .ct-profile-deck-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:76px;padding:12px 16px;box-sizing:border-box;border:1px solid var(--ct-line);border-radius:12px;background:var(--ct-button);text-align:left;}
#commander-table .ct-profile-deck-summary{display:grid;gap:8px;min-width:0;overflow-wrap:anywhere;}
#commander-table #ct-lobby .ct-profile-deck-open{display:grid;place-items:center;flex:none;width:44px;min-height:44px;margin:0;padding:0;}
#commander-table .ct-profile-deck-list small{color:var(--ct-muted);}
#commander-table .ct-profile-deck-list svg{flex:none;}
#commander-table .ct-profile-deck-actions{display:grid;gap:12px;}
#commander-table .ct-profile-deck-actions button{min-height:48px;}
/* Profile identity banner and centred profile editor. */
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading:has(.ct-profile-identity){display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:24px;padding:28px;border:1px solid var(--ct-line);border-radius:20px;background:linear-gradient(110deg,#1C2949,#101A36);margin-bottom:24px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading>#ct-profile-back{position:static;transform:none;margin:0;align-self:center;flex:none;background:var(--ct-button);}
#commander-table .ct-profile-heading>#ct-profile-edit{flex:none;}
#commander-table .ct-profile-heading .ct-profile-identity{min-width:0;flex:1;justify-content:center;}
#commander-table .ct-profile-heading .ct-profile-identity>div{min-width:0;}
#commander-table .ct-profile-identity .ct-avatar,#commander-table .ct-profile-photo-editor .ct-avatar{width:96px;height:96px;flex:none;border-radius:50%;background:#1C2949;border:2px solid #7883A8;overflow:hidden;display:grid;place-items:center;}
#commander-table .ct-avatar .ct-avatar-symbol{display:block;width:90%;height:90%;}
#commander-table .ct-profile-identity .ct-avatar:has(.ct-avatar-symbol),#commander-table .ct-profile-photo-editor .ct-avatar:has(.ct-avatar-symbol){border-color:transparent;}
#commander-table .ct-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-form-heading{display:block;width:100%;margin:0 auto;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-form-heading .ct-page-title-row{max-width:calc(100% - 120px);width:max-content;}
#commander-table #ct-profile-form{width:100%;max-width:560px;margin:0 auto;padding:24px;box-sizing:border-box;background:var(--ct-panel);border:1px solid var(--ct-line);border-radius:18px;}
#commander-table .ct-profile-photo-editor{display:flex;align-items:center;gap:20px;margin-bottom:24px;}
#commander-table .ct-profile-photo-editor>div{display:grid;gap:8px;min-width:0;}
#commander-table .ct-photo-upload{display:grid;gap:8px;}
#commander-table #ct-profile-photo{max-width:100%;width:100%;font-size:13px;}
#commander-table #ct-photo-remove[hidden]{display:none;}
#commander-table #ct-profile-form .ct-profile-avatars{margin-top:24px;}
@media(max-width:500px){#commander-table .ct-profile-photo-editor{flex-direction:column;}#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading:has(.ct-profile-identity){padding:16px;gap:12px;}#commander-table .ct-profile-identity .ct-avatar{width:64px;height:64px;}}
/* Creation date is anchored to the lower right of the profile banner. */
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading:has(.ct-profile-identity){position:relative;padding-bottom:48px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading .ct-profile-identity>div>small{position:absolute;right:24px;bottom:16px;margin:0;text-align:right;}
/* Retain the centred portrait/name group; align the name vertically to its portrait. */
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading .ct-profile-identity{align-items:center;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading .ct-profile-identity h1{margin:0;}
#commander-table[data-device-view="tablet-pc"] .ct-profile-metrics{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;text-align:center;}
#commander-table[data-device-view="tablet-pc"] .ct-profile-metrics>div{min-width:0;}
#commander-table[data-device-view="tablet-pc"] .ct-profile-metrics span{overflow-wrap:anywhere;}
/* Profile results: one calm surface, two aligned statistical lists. */
#commander-table #ct-lobby .ct-profile-breakdown{background:#101A36;border:1px solid #1C2949;border-radius:18px;padding:24px;gap:28px;margin:24px 0 32px;}
#commander-table #ct-lobby .ct-profile-breakdown>section{min-width:0;}
#commander-table #ct-lobby .ct-profile-breakdown>section+section{border-left:1px solid #1C2949;padding-left:28px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-breakdown h2{font-size:20px;line-height:1.3;color:#fff;text-align:left;margin:0 0 18px;}
#commander-table #ct-lobby .ct-profile-breakdown dl{margin:0;}
#commander-table #ct-lobby .ct-breakdown-row,#commander-table #ct-lobby .ct-breakdown-total{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #1C2949;font-size:15px;line-height:1.4;}
#commander-table #ct-lobby .ct-breakdown-row dt{color:#F1F2FA;}
#commander-table #ct-lobby .ct-breakdown-row dd,#commander-table #ct-lobby .ct-breakdown-total strong{margin:0;color:#E5C84A;font-size:19px;font-weight:600;font-variant-numeric:tabular-nums;}
#commander-table #ct-lobby .ct-breakdown-row:last-child{border-bottom:0;}
#commander-table #ct-lobby .ct-breakdown-total{border-top:1px solid #1C2949;border-bottom:0;margin-top:12px;color:#BDC4DF;}
#commander-table #ct-lobby .ct-breakdown-empty{font-size:14px;margin:0;color:#BDC4DF;}
@media(max-width:600px){#commander-table #ct-lobby .ct-profile-breakdown{grid-template-columns:1fr;padding:20px;gap:24px;}#commander-table #ct-lobby .ct-profile-breakdown>section+section{border-left:0;border-top:1px solid #1C2949;padding:24px 0 0;}}
/* Profile breakdown: highlight headings only; keep the result rows unfilled. */
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-breakdown h2{color:#E5C84A;background:#1C2949;border:1px solid #1C2949;border-radius:10px;padding:12px 16px;}
#commander-table #ct-lobby .ct-breakdown-row dd,#commander-table #ct-lobby .ct-breakdown-total strong{color:#fff;}
#commander-table #ct-lobby .ct-profile-breakdown{background:transparent;border:0;padding:0;}
/* Centre portrait and name together, preserving banner height and date placement. */
#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading:has(.ct-profile-identity){padding-top:38px;padding-bottom:38px;}
@media(max-width:500px){#commander-table:has(.ct-app-nav) #ct-lobby .ct-profile-heading:has(.ct-profile-identity){padding-top:32px;padding-bottom:32px;}}
/* Direct profile search in the overview and game setup picker. */
#commander-table #ct-lobby #ct-profile-search{width:220px;max-width:100%;height:44px;box-sizing:border-box;background:#101A36;color:#fff;border:1px solid #7883A8;padding:10px 12px;border-radius:10px;}
#commander-table #ct-lobby .ct-profile-directory-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px;width:100%;}
#commander-table #ct-lobby .ct-profile-directory-tools>:is(#ct-profile-search,#ct-friend-search){width:100%;min-width:0;height:100%;min-height:48px;margin:0;}
#commander-table #ct-lobby .ct-profile-directory-tools>:is(#ct-profile-add,#ct-friend-add){align-self:stretch;min-width:0;max-width:min(180px,44vw);min-height:48px;margin:0;padding:8px 10px;gap:6px;font-size:14px;line-height:1.25;}
#commander-table .ct-profile-directory-tools button svg{flex:none;width:18px;height:18px;}
#commander-table .ct-profile-directory-footer{margin-top:24px;padding-top:16px;border-top:1px solid var(--ct-line);}
#commander-table #ct-lobby #ct-archived-profiles{display:flex;width:100%;min-height:48px;justify-content:center;gap:10px;}
#commander-table #ct-lobby #ct-profile-archive-search{width:100%;min-width:0;min-height:48px;background:var(--ct-panel);color:var(--ct-ink);border:1px solid #7883A8;border-radius:10px;padding:10px 12px;}
#commander-table #ct-picker-profile-search{display:block;width:100%;box-sizing:border-box;min-height:44px;margin:0 0 12px;padding:10px 12px;border-radius:10px;border:1px solid #7883A8;background:#101A36;color:#fff;font:inherit;}
#commander-table :is([data-profile-open],[data-pick-profile],.ct-profile-search-empty)[hidden]{display:none!important;}
#commander-table .ct-profile-search-empty{grid-column:1/-1;color:#BDC4DF;text-align:center;padding:12px;}
#commander-table #ct-open-primary{position:relative;isolation:isolate;overflow:hidden;}

/* Upright crowns scattered across the full main-user banner. */
#commander-table #ct-lobby #ct-open-primary{background-color:var(--ct-button);background-image:url('../assets/collection/crowns-illustration.svg');background-position:center;background-size:cover;}
#commander-table #ct-lobby #ct-open-primary{min-height:136px;align-items:center;justify-content:center;text-align:center;gap:10px;padding:24px 64px;}
#commander-table #ct-open-primary>.ct-eyebrow{font-size:15px;line-height:1.3;letter-spacing:1.8px;}
#commander-table #ct-open-primary .ct-primary-name{position:relative;display:block;max-width:100%;}
#commander-table #ct-open-primary .ct-primary-name>strong,#commander-table #ct-lobby .ct-profile-entry-name>strong{font-size:30px;line-height:1.25;overflow-wrap:anywhere;}
#commander-table #ct-open-primary .ct-primary-chevron{position:absolute;left:calc(100% + 18px);top:50%;transform:translateY(-50%);width:30px;height:30px;color:#fff;}
#commander-table #ct-lobby #ct-collection .ct-collection-chevron{display:block;width:30px;height:30px;flex:none;color:inherit;}
#commander-table .ct-storage-box{position:relative;display:block;width:100%;max-width:360px;}
#commander-table .ct-storage-box-art{display:block;width:100%;height:auto;}
#commander-table .ct-storage-box-count{font-size:14px;line-height:1.4;color:#F1F2FA;font-variant-numeric:tabular-nums;}
@media(max-width:500px){
  #commander-table #ct-lobby #ct-collection .ct-collection-chevron{width:20px;height:20px;flex:none;}
}

/* Card search reuses the application palette, controls and card renderer. */
#commander-table .ct-type-picker {position:relative;min-width:0;}
#commander-table .ct-type-picker>label {margin-bottom:6px!important;}
#commander-table .ct-type-input {position:relative;}
#commander-table #ct-lobby .ct-card-search .ct-type-input>input {padding-right:44px;}
#commander-table #ct-lobby #ct-types-toggle {position:absolute;right:1px;top:1px;width:42px;min-height:42px;height:42px;padding:8px;border:0;background:transparent;display:grid;place-items:center;}
#commander-table #ct-types-toggle svg {width:22px;height:22px;}
#commander-table #ct-types-toggle[aria-expanded=true] svg {transform:rotate(180deg);}
#commander-table .ct-type-popup {position:absolute;z-index:30;top:100%;right:0;box-sizing:border-box;width:max(100%,320px);max-width:calc(100vw - 32px);margin-top:6px;padding:8px;border:1px solid var(--ct-muted);border-radius:12px;background:var(--ct-panel);box-shadow:0 8px 22px #0006;}
#commander-table #ct-search-types {max-height:320px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;}
#commander-table .ct-type-popup>small {display:block;padding:4px 8px;color:var(--ct-muted);font-size:12px;line-height:1.4;}
#commander-table .ct-type-group-label {display:flex;justify-content:space-between;gap:8px;padding:10px 8px 6px;color:var(--ct-gold);font-size:13px;font-weight:650;}
#commander-table #ct-lobby #ct-search-types [role=option] {display:block;width:100%;min-height:44px;margin:0;padding:10px 12px;border:0;border-radius:7px;background:transparent;text-align:left;font-size:14px;}
#commander-table #ct-lobby #ct-search-types [role=option]:is(:hover,[aria-selected=true]) {background:var(--ct-button);outline:1px solid var(--ct-gold);outline-offset:-1px;}
#commander-table #ct-lobby .ct-card-search {text-align:left;min-width:0;}
#commander-table #ct-lobby .ct-card-search label {display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;font-size:14px;text-align:left;}
#commander-table #ct-lobby .ct-card-search :is(input,select) {box-sizing:border-box;min-width:0;width:100%;min-height:44px;margin:0;padding:10px 12px;border:1px solid var(--ct-muted);border-radius:10px;background:var(--ct-panel);color:var(--ct-ink);font:inherit;}
#commander-table #ct-lobby .ct-card-search button:where(:not([role=switch])) {min-height:44px;}
#commander-table #ct-lobby .ct-card-search :is(fieldset,legend) {min-width:0;margin:0;padding:0;border:0;font-size:14px;text-align:left;}
#commander-table #ct-lobby .ct-card-search legend {margin-bottom:6px;font-weight:600;}
#commander-table .ct-search-context {text-align:center;color:var(--ct-muted);margin:0 0 20px;}
#commander-table .ct-search-name {display:flex;align-items:end;gap:12px;}
#commander-table .ct-search-name>label {flex:1;}
#commander-table .ct-search-name>button {display:flex;align-items:center;gap:8px;flex-shrink:0;white-space:nowrap;}
#commander-table .ct-search-name svg {width:18px;height:18px;}
#commander-table .ct-search-chips {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;}
#commander-table #ct-lobby .ct-search-chips>button,#commander-table #ct-lobby .ct-search-type-chips>button {padding:6px 12px;border-color:var(--ct-gold);background:color-mix(in srgb,var(--ct-gold) 12%,var(--ct-panel));font-size:13px;max-width:100%;overflow-wrap:anywhere;}
#commander-table .ct-search-type-chips {display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%;font-size:14px;}
#commander-table #ct-lobby .ct-search-chips>[data-reset] {background:transparent;border-color:var(--ct-line);}
#commander-table .ct-search-quick {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0 20px;padding-top:24px;border-top:1px solid var(--ct-line);align-items:start;}
#commander-table .ct-search-color-settings {display:grid;grid-template-columns:minmax(0,1fr) 132px minmax(0,1fr);gap:8px;align-items:center;}
#commander-table .ct-search-color-settings>select {height:46px;}
#commander-table .ct-search-color-buttons {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:4px;height:46px;}
#commander-table #ct-lobby .ct-search-color-buttons>button {display:grid;place-items:center;min-height:0;height:100%;padding:0 6px;border-radius:6px;font-size:12px;line-height:1;}
#commander-table .ct-search-mana-symbol {display:inline-block;flex:none;width:18px;height:18px;vertical-align:middle;}
#commander-table .ct-search-commander-colors {width:264px;max-width:100%;}
#commander-table #ct-lobby .ct-card-search .ct-search-commander-colors>legend {width:132px;margin-left:calc(100% - 132px);}
#commander-table .ct-search-commander-row {display:grid;grid-template-columns:minmax(0,1fr) 132px;align-items:center;gap:12px;}
#commander-table .ct-search-commander-row>.ct-search-color-buttons {grid-column:2;grid-row:1;justify-self:start;width:132px;}
#commander-table #ct-lobby .ct-search-commander-row>.ct-search-help {margin:0;font-size:12px;line-height:18px;}
#commander-table .ct-search-chips [data-chip]:has(.ct-search-mana-symbol) {display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;}
#commander-table #ct-lobby .ct-search-color-buttons>[aria-pressed=true] {border-color:var(--ct-gold);background:var(--ct-gold);color:var(--ct-panel);}
#commander-table .ct-search-number {display:grid;grid-template-columns:minmax(74px,1fr) minmax(58px,1fr);gap:8px;align-items:end;min-width:0;}
#commander-table .ct-search-number:has(input:not([hidden])[data-field$=".max"]) {grid-template-columns:minmax(76px,1fr) minmax(48px,1fr) minmax(48px,1fr);}
#commander-table .ct-search-advanced {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:start;gap:8px;margin-bottom:24px;}
#commander-table #ct-lobby .ct-search-filter-tab {display:flex;align-items:center;justify-content:flex-start;gap:7px;box-sizing:border-box;min-width:0;min-height:46px;padding:10px;background:var(--ct-button);border:1px solid var(--ct-line);border-radius:10px;font-size:13px;text-align:left;}
#commander-table #ct-lobby .ct-search-filter-tab[aria-expanded=true] {border-color:var(--ct-gold);background:color-mix(in srgb,var(--ct-gold) 12%,var(--ct-panel));}
#commander-table .ct-search-filter-tab>svg {display:block;flex:none;width:14px;height:14px;transform:rotate(0deg);transition:transform .18s ease;}
#commander-table .ct-search-filter-tab[aria-expanded=true]>svg {transform:rotate(90deg);}
#commander-table .ct-search-filter-tab:focus-visible {outline:2px solid var(--ct-gold);outline-offset:2px;}
#commander-table .ct-search-filter-panel {grid-column:1 / -1;order:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:24px;box-sizing:border-box;min-width:0;padding:20px;border:1px solid var(--ct-line);border-radius:12px;background:var(--ct-panel);overflow-wrap:anywhere;}
#commander-table .ct-search-filter-panel.ct-search-values {grid-template-columns:minmax(0,1fr) 1px minmax(0,1fr) 1px minmax(0,1fr) 1px minmax(0,1fr);column-gap:16px;}
#commander-table #ct-lobby .ct-card-search .ct-search-values label {text-align:center;}
#commander-table #ct-lobby .ct-card-search .ct-search-values :is(input,select) {text-align:left;}
#commander-table .ct-search-filter-panel.ct-search-extra {grid-template-columns:minmax(0,1fr) 1px minmax(0,1fr) 1px minmax(0,1fr);column-gap:16px;}
#commander-table .ct-search-filter-stack {display:grid;gap:20px;min-width:0;}
#commander-table #ct-search-artist-status:empty {display:none;}
#commander-table .ct-search-filter-panel:is([data-filter-panel=colors],[data-filter-panel=text],[data-filter-panel=sets],[data-filter-panel=print]) {grid-template-columns:minmax(0,1fr) 1px minmax(0,1fr);column-gap:16px;}
#commander-table .ct-condition-divider {align-self:stretch;min-height:1px;background:var(--ct-line);}
#commander-table .ct-search-filter-panel fieldset>select {margin-bottom:12px;}
#commander-table .ct-search-filter-panel .ct-search-number,#commander-table .ct-search-filter-panel .ct-search-number:has(input:not([hidden])[data-field$=".max"]) {grid-template-columns:repeat(2,minmax(0,1fr));}
#commander-table .ct-search-filter-panel .ct-search-number>label:last-child {grid-column:1 / -1;}
#commander-table .ct-search-condition-group {--ct-condition-remove-size:28px;--ct-condition-gap:6px;--ct-condition-symbol-size:clamp(112px,30vw,148px);}
#commander-table .ct-condition-settings {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end;}
#commander-table [data-condition-field=oracleText]>.ct-condition-settings {grid-template-columns:minmax(0,1fr);}
#commander-table .ct-condition-comparison>label {grid-column:2;}
#commander-table #ct-lobby .ct-card-search .ct-search-condition-group :is(label,input,select) {font-size:13px;}
#commander-table #ct-lobby .ct-card-search .ct-search-advanced .ct-search-filter-panel .ct-search-condition-group :is(input,select) {height:44px;padding:10px 8px;font-size:13px;}
#commander-table .ct-search-condition {display:grid;grid-template-columns:minmax(0,1fr) var(--ct-condition-symbol-size) var(--ct-condition-remove-size);align-items:end;gap:var(--ct-condition-gap);margin:12px 0;}
#commander-table .ct-search-condition>label {grid-column:1;grid-row:1;}
#commander-table .ct-search-condition>[data-remove-condition] {grid-column:3;grid-row:1;}
#commander-table #ct-lobby .ct-search-condition>button {box-sizing:border-box;width:var(--ct-condition-remove-size);height:28px;min-height:28px;margin-bottom:8px;padding:0;border-radius:7px;font-size:16px;line-height:1;}
#commander-table #ct-lobby .ct-search-condition-group>[data-add-condition] {box-sizing:border-box;width:calc(100% - var(--ct-condition-symbol-size) - var(--ct-condition-remove-size) - 2 * var(--ct-condition-gap));height:44px;min-height:44px;padding:8px 6px;font-size:13px;}
#commander-table .ct-symbol-picker,#commander-table .ct-search-symbol-preview {grid-column:1 / -1;min-width:0;}
#commander-table .ct-search-symbol-preview {display:flex;flex-wrap:wrap;gap:5px;align-items:center;}
#commander-table .ct-search-symbol-glyph {position:relative;display:inline-grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;background:#d5d2c5;color:#101A36;font-size:9px;line-height:1;vertical-align:middle;}
#commander-table .ct-search-symbol-glyph img {position:absolute;inset:0;width:24px;height:24px;object-fit:contain;}
#commander-table #ct-lobby .ct-symbol-picker>[data-symbol-toggle] {display:flex;align-items:center;justify-content:space-between;gap:4px;box-sizing:border-box;width:calc(100% - var(--ct-condition-remove-size) - var(--ct-condition-gap));min-height:34px;padding:6px 8px;background:transparent;font-size:12px;text-align:left;}
#commander-table .ct-search-condition>.ct-symbol-picker {display:contents;}
#commander-table #ct-lobby .ct-search-condition>.ct-symbol-picker>[data-symbol-toggle] {grid-column:2;grid-row:1;width:100%;height:44px;min-height:44px;line-height:1.2;white-space:normal;}
#commander-table .ct-search-condition>.ct-symbol-picker>.ct-symbol-panel {grid-column:1 / -1;}
#commander-table .ct-symbol-picker>[aria-expanded=true] {border-color:var(--ct-gold);}
#commander-table .ct-symbol-panel {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;box-sizing:border-box;margin-top:8px;padding:12px;border:1px solid var(--ct-muted);border-radius:10px;background:var(--ct-panel);}
#commander-table .ct-symbol-panel>:not(label) {grid-column:1 / -1;}
#commander-table .ct-symbol-panel .ct-symbol-count {margin:0;font-size:12px;color:var(--ct-muted);}
#commander-table .ct-symbol-options {max-height:280px;min-width:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;}
#commander-table .ct-symbol-options>div {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:4px;}
#commander-table .ct-symbol-options .ct-symbol-heading {grid-column:1 / -1;}
#commander-table .ct-symbol-heading {padding:8px 2px 5px;font-size:12px;font-weight:650;color:var(--ct-gold);}
#commander-table #ct-lobby .ct-symbol-options [data-insert-symbol] {display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:8px;box-sizing:border-box;width:100%;min-height:44px;margin:0;padding:8px 4px;background:transparent;border:0;border-radius:6px;text-align:left;font-size:12px;line-height:1.35;}
#commander-table #ct-lobby .ct-symbol-options [data-insert-symbol]:is(:hover,:focus-visible) {background:var(--ct-button);outline:1px solid var(--ct-gold);outline-offset:-1px;}
#commander-table .ct-symbol-options small {display:block;margin-top:3px;color:var(--ct-muted);font-size:11px;}
#commander-table .ct-symbol-panel .ct-search-help {margin:0;line-height:1.5;}
#commander-table #ct-lobby .ct-symbol-panel>[data-symbol-done] {width:100%;padding:8px;font-size:13px;}
#commander-table .ct-search-choices {display:flex;gap:8px;flex-wrap:wrap;}
#commander-table #ct-lobby .ct-search-choices>label {position:relative;display:flex;flex-direction:row;align-items:center;gap:8px;padding:8px 12px;min-height:44px;box-sizing:border-box;border:1px solid var(--ct-line);border-radius:10px;background:var(--ct-button);cursor:pointer;}
#commander-table #ct-lobby .ct-search-choices input {width:16px;min-height:16px;height:16px;accent-color:var(--ct-gold);}
#commander-table .ct-search-choices>label:has(:checked) {border-color:var(--ct-gold);}
#commander-table .ct-search-filter-panel .ct-search-choices {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));}
#commander-table .ct-search-filter-panel[data-filter-panel=sets] .ct-search-choices {grid-template-columns:minmax(0,1fr);}
#commander-table .ct-search-set-entry {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;}
#commander-table #ct-search-selected-sets {display:flex;flex-wrap:wrap;gap:8px;}
#commander-table #ct-search-selected-sets>button {max-width:100%;overflow-wrap:anywhere;}
#commander-table .ct-search-help {font-size:12px;color:var(--ct-muted);}
#commander-table .ct-search-price {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:8px;}
#commander-table #ct-lobby [data-filter-panel=print] .ct-search-choices>label {min-height:46px;}
@media(min-width:761px){#commander-table [data-filter-panel=print] .ct-search-choices{padding-top:calc(1lh + 6px);}}
#commander-table .ct-search-result-tools {display:flex;align-items:center;flex-wrap:wrap;gap:12px;border-top:1px solid var(--ct-line);padding-top:20px;}
#commander-table #ct-lobby .ct-search-result-tools h2 {flex:1 1 auto;text-align:left;margin:0;scroll-margin-top:24px;}
#commander-table #ct-lobby .ct-search-result-tools>label {flex-direction:row;align-items:center;}
#commander-table #ct-search-status {margin:12px 0;color:var(--ct-muted);}
#commander-table #ct-search-added:empty {display:none;}
#commander-table #ct-lobby .ct-search-add {width:100%;padding:8px;font-size:12px;}
#commander-table .ct-search-pagination {display:flex;gap:16px;justify-content:center;align-items:center;margin:24px 0;}
#commander-table .ct-card-search [hidden] {display:none!important;}
#commander-table .ct-search-credit {display:block;color:var(--ct-muted);margin-top:24px;}
#commander-table .ct-search-credit a {color:inherit;}
#commander-table .ct-card-search .ct-card-list-row {grid-template-columns:minmax(150px,2fr) 40px minmax(90px,1fr) 70px;}
#commander-table .ct-card-search .ct-card-list-row>.ct-search-add {grid-column:-2;}
@media(max-width:1250px){#commander-table .ct-search-advanced{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:1150px){#commander-table .ct-search-filter-panel[data-filter-panel=colors]{grid-template-columns:minmax(0,1fr);}#commander-table .ct-search-filter-panel.ct-search-values{grid-template-columns:minmax(0,1fr) 1px minmax(0,1fr);}#commander-table .ct-search-values>.ct-condition-divider:nth-child(4){grid-column:1 / -1;height:1px;}#commander-table .ct-symbol-panel{grid-template-columns:minmax(0,1fr);}}
@media(max-width:760px){#commander-table .ct-search-advanced{grid-template-columns:repeat(2,minmax(0,1fr));}#commander-table .ct-search-filter-panel,#commander-table .ct-search-filter-panel.ct-search-extra,#commander-table .ct-search-filter-panel.ct-search-values,#commander-table .ct-search-filter-panel:is([data-filter-panel=colors],[data-filter-panel=text],[data-filter-panel=sets],[data-filter-panel=print]){grid-template-columns:minmax(0,1fr);gap:20px;padding:16px;}}
@media(max-width:600px){#commander-table .ct-search-quick{grid-template-columns:minmax(0,1fr);}#commander-table .ct-search-color-settings{grid-template-columns:repeat(2,minmax(0,1fr));}#commander-table .ct-search-color-buttons{grid-column:1 / -1;grid-row:2;justify-self:center;width:132px;}#commander-table .ct-search-result-tools{align-items:end;}#commander-table #ct-lobby .ct-search-result-tools h2{flex-basis:100%;}#commander-table #ct-lobby .ct-search-result-tools>label{flex:1;flex-direction:column;align-items:stretch;}#commander-table .ct-card-search .ct-card-list-row{grid-template-columns:minmax(0,1fr) 36px;}#commander-table .ct-card-search .ct-card-list-row>.ct-search-add{grid-column:1 / -1;}#commander-table .ct-search-name>button{padding:10px;}#commander-table .ct-search-name svg{display:none;}}
@media(max-width:480px){#commander-table .ct-search-advanced,#commander-table .ct-search-filter-panel.ct-search-values{grid-template-columns:minmax(0,1fr);}}
/* Deck search keeps its results in the page and its options in a sheet.
   The transparent fixed layer never intercepts the uncovered page. */
#commander-table .ct-search-filter-layer{position:fixed;inset:0;z-index:32;box-sizing:border-box;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);pointer-events:none;}
#commander-table #ct-lobby .ct-search-filter-fab{position:absolute;right:calc(var(--ct-filter-right,0px) + 12px);bottom:var(--ct-filter-button-bottom,12px);display:grid;place-items:center;box-sizing:border-box;width:56px;height:56px;min-width:56px;min-height:56px;margin:0;padding:14px;border:1px solid var(--ct-line);border-radius:18px;background:var(--ct-button);color:var(--ct-ink);box-shadow:0 5px 18px #0006;pointer-events:auto;touch-action:manipulation;}
#commander-table .ct-search-filter-fab svg{display:block;width:26px;height:26px;}
#commander-table .ct-search-filter-badge{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;min-width:20px;height:20px;box-sizing:border-box;padding:0 4px;border-radius:12px;background:var(--ct-gold);color:#111628;font-size:11px;font-weight:700;}
#commander-table .ct-search-filter-layer [hidden]{display:none!important;}
#commander-table #ct-lobby .ct-search-filter-sheet{position:absolute;inset:auto var(--ct-filter-right,0px) var(--ct-filter-bottom,0px) var(--ct-filter-left,0px);box-sizing:border-box;width:auto;height:calc(100dvh - 12px);max-width:none;max-height:none;margin:0;padding:0;overflow:hidden;border:1px solid var(--ct-line);border-radius:24px 24px 0 0;background:var(--ct-panel);color:var(--ct-ink);font:inherit;pointer-events:auto;transition:height .22s cubic-bezier(.2,.8,.2,1);}
#commander-table .ct-search-filter-sheet:not([open]){display:none!important;}
#commander-table .ct-search-filter-sheet[open]{display:grid;grid-template-rows:44px 32px minmax(0,1fr);gap:0;}
#commander-table .ct-search-filter-sheet:is([data-dragging=true],[data-keyboard=true]){transition:none;}
#commander-table .ct-search-filter-sheet[data-dragging=true]{user-select:none;}
#commander-table #ct-lobby .ct-search-filter-grip{display:grid;place-items:center;width:100%;height:44px;min-height:44px;min-width:0;margin:0;padding:0;border:0;background:transparent;color:inherit;box-shadow:none;cursor:grab;touch-action:none;}
#commander-table .ct-search-filter-grip>span{display:block;width:44px;height:5px;border-radius:5px;background:currentColor;opacity:.7;}
#commander-table .ct-search-filter-grip:active{cursor:grabbing;}
#commander-table:has(.ct-app-nav) button.ct-search-filter-grip:focus-visible{outline:0;}
#commander-table .ct-search-filter-grip:focus-visible>span{outline:2px solid currentColor;outline-offset:4px;}
#commander-table .ct-search-filter-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:0 16px 8px;}
#commander-table #ct-lobby .ct-search-filter-heading h2{margin:0;font-size:18px;line-height:24px;}
#commander-table .ct-search-filter-count{flex:none;color:var(--ct-muted);font-size:12px;}
#commander-table .ct-search-filter-body{box-sizing:border-box;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:8px 16px var(--ct-filter-content-bottom,20px);scroll-padding:12px;overflow-anchor:none;}
#commander-table .ct-search-filter-body:focus-visible{outline:2px solid var(--ct-gold);outline-offset:-3px;}
#commander-table #ct-lobby .ct-search-filter-sheet .ct-search-name{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;}
#commander-table #ct-lobby .ct-search-filter-sheet .ct-search-name>button{justify-content:center;}
#commander-table #ct-lobby .ct-search-filter-sheet .ct-search-quick{grid-template-columns:minmax(0,1fr);}
#commander-table #ct-lobby .ct-search-filter-sheet .ct-search-advanced{grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:16px;}
#commander-table #ct-lobby .ct-search-filter-sheet .ct-search-filter-panel{order:0;grid-column:auto;grid-template-columns:minmax(0,1fr);gap:16px;padding:12px;}
#commander-table .ct-search-filter-sheet .ct-type-popup{max-width:100%;}
#commander-table .ct-search-filter-sheet .ct-builder-search-options{margin:0 0 16px;}
#commander-table .ct-search-with-sheet .ct-search-results{padding-bottom:80px;}
@media(prefers-reduced-motion:reduce){#commander-table #ct-lobby .ct-search-filter-sheet{transition:none;}}
@media(forced-colors:active){#commander-table .ct-search-filter-badge{background:Highlight;color:HighlightText;}#commander-table .ct-search-filter-grip{forced-color-adjust:auto;}}
@media(prefers-reduced-motion:reduce){#commander-table .ct-search-filter-tab>svg{transition:none;}}

/* Deck tabs, quantity-weighted statistics and linked game pieces. */
#commander-table #ct-lobby .ct-deck-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0;}
#commander-table #ct-lobby .ct-deck-tabs button{min-width:0;min-height:44px;padding:10px 12px;}
#commander-table #ct-lobby .ct-deck-tabs [aria-selected=true]{background:#E5C84A22;border-color:#E5C84A;}
#commander-table #ct-lobby [id^=ct-deck-panel-][hidden]{display:none!important;}
#commander-table .ct-deck-insights{margin:20px 0 28px;text-align:left;min-width:0;}
#commander-table #ct-lobby .ct-deck-insights .ct-insight-title{font-size:23px;margin:0 0 8px;text-align:center;}
#commander-table .ct-insight-scope{text-align:center;}
#commander-table .ct-deck-insights p{font-size:13px;line-height:1.6;margin:8px 0 16px;}
#commander-table .ct-insight-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0;}
#commander-table .ct-insight-metrics>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:18px 8px;border:1px solid var(--ct-line);border-radius:12px;background:#1C294955;}
#commander-table .ct-insight-metrics strong{font-size:27px;line-height:1.2;color:var(--ct-gold);}
#commander-table .ct-insight-metrics span{font-size:13px;text-align:center;}
#commander-table .ct-insight-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch;}
#commander-table .ct-insight-chart{padding:20px;border:1px solid var(--ct-line);border-radius:12px;min-width:0;}
#commander-table #ct-lobby .ct-insight-chart h3{margin:0 0 16px;font-size:18px;text-align:left;}
#commander-table .ct-insight-chart p:last-child{margin-bottom:0;color:var(--ct-muted);}
#commander-table .ct-insight-columns{display:flex;align-items:end;gap:10px;height:210px;border-bottom:1px solid var(--ct-line);padding:0 6px 8px;}
#commander-table .ct-insight-columns>div{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;gap:6px;}
#commander-table .ct-insight-columns strong,#commander-table .ct-insight-columns small{font-size:13px;}
#commander-table .ct-insight-stack{display:flex;flex-direction:column-reverse;width:100%;max-width:48px;overflow:hidden;border-radius:5px 5px 0 0;}
#commander-table .ct-insight-stack>span{min-height:0;}
#commander-table .ct-insight-inline-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin:12px 0;font-size:12px;}
#commander-table .ct-insight-inline-legend>span{display:flex;align-items:center;gap:6px;}
#commander-table .ct-insight-dot{display:inline-block;flex:none;width:10px;height:10px;border-radius:50%;}
#commander-table .ct-insight-distribution{display:flex;align-items:center;gap:24px;min-height:200px;margin:14px 0;}
#commander-table .ct-insight-donut{width:160px;height:160px;border-radius:50%;flex:none;display:grid;place-items:center;}
#commander-table .ct-insight-donut>span{width:112px;height:112px;border-radius:50%;background:var(--ct-panel);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;}
#commander-table .ct-insight-donut strong{font-size:24px;}
#commander-table .ct-insight-donut small{font-size:12px;}
#commander-table .ct-insight-legend{list-style:none;padding:0;margin:0;display:grid;gap:10px;min-width:0;flex:1;font-size:13px;}
#commander-table .ct-insight-legend li{display:grid;grid-template-columns:10px minmax(0,1fr) auto auto;gap:8px;align-items:center;}
#commander-table .ct-insight-legend li>span:nth-child(2){overflow-wrap:anywhere;}
#commander-table .ct-insight-legend small{font-size:11px;min-width:40px;text-align:right;white-space:nowrap;}
#commander-table #ct-lobby .ct-insight-check{display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px;}
#commander-table #ct-lobby .ct-insight-check input{width:18px;height:18px;min-height:18px;margin:0;accent-color:var(--ct-gold);}
#commander-table .ct-insight-bars{list-style:none;padding:0;margin:20px 0;display:grid;gap:16px;font-size:13px;}
#commander-table .ct-insight-bars li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 12px;}
#commander-table .ct-insight-bars li>span{display:flex;align-items:center;gap:8px;overflow-wrap:anywhere;}
#commander-table .ct-insight-mana{width:20px;height:20px;flex:none;}
#commander-table .ct-insight-bars li>div{grid-column:1/-1;background:#1C2949;border-radius:4px;overflow:hidden;height:7px;}
#commander-table .ct-insight-bars li>div>span{display:block;height:100%;border-radius:4px;}
#commander-table .ct-insight-bars strong small{font-weight:400;color:var(--ct-muted);}
#commander-table .ct-insight-subtype{display:flex;align-items:center;gap:12px;font-size:13px;}
#commander-table .ct-insight-subtype select{flex:1;min-width:0;}
#commander-table .ct-insight-value>strong{display:block;font-size:34px;color:var(--ct-gold);margin:32px 0 20px;overflow-wrap:anywhere;}
#commander-table .ct-deck-insights .ct-insight-notice{background:#E5C84A10;border:1px solid #E5C84A66;border-radius:8px;padding:12px;overflow-wrap:anywhere;color:var(--ct-ink);font-size:13px;}
#commander-table .ct-insight-empty{padding:24px 0;color:var(--ct-muted);}
#commander-table .ct-token-sources{font-size:12px;text-align:left;padding:10px 4px;overflow-wrap:anywhere;line-height:1.5;}
#commander-table .ct-token-sources>strong{color:var(--ct-muted);font-weight:400;}
#commander-table .ct-token-sources ul{margin:4px 0 0;padding-left:16px;}
#commander-table .ct-token-sources li+li{margin-top:5px;}
#commander-table .ct-token-grid .ct-card-price{display:none;}
#commander-table .ct-token-pages{display:flex;justify-content:center;align-items:center;gap:12px;margin:20px 0;font-size:13px;}
#commander-table .ct-token-copies{margin:20px 0;}
#commander-table .ct-insight-source{color:var(--ct-muted);}
@media(max-width:1100px){#commander-table .ct-insight-distribution{flex-direction:column;align-items:stretch;gap:20px;}#commander-table .ct-insight-donut{align-self:center;}}
@media(max-width:700px){#commander-table .ct-insight-charts{grid-template-columns:minmax(0,1fr);}#commander-table .ct-insight-chart{padding:16px;}#commander-table .ct-insight-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}#commander-table .ct-insight-columns{gap:6px;}#commander-table #ct-lobby .ct-deck-tabs{gap:6px;}#commander-table #ct-lobby .ct-deck-tabs button{padding:10px 6px;font-size:14px;}#commander-table .ct-token-pages{gap:8px;}}
/* Manual deck builder */
#commander-table .ct-builder{max-width:1440px;text-align:left;}
#commander-table #ct-lobby .ct-builder-heading{display:flex;align-items:center;gap:16px;margin-bottom:20px;}
#commander-table #ct-lobby .ct-builder-heading h1{flex:1;text-align:center;margin:0;}
#commander-table #ct-lobby .ct-builder-heading .ct-page-title-row{margin:0 auto;}
#commander-table .ct-builder-sticky{position:static;background:var(--ct-panel);padding:14px;border:1px solid var(--ct-line);border-radius:18px;box-shadow:0 10px 20px -12px #000b;}
#commander-table .ct-builder-title{display:flex;align-items:center;gap:12px;min-width:0;margin-bottom:14px;font-size:13px;}
#commander-table .ct-builder-name{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;margin:0;}
#commander-table .ct-builder-name strong{font-size:18px;overflow-wrap:anywhere;min-width:0;}
#commander-table .ct-builder-name.is-editing{width:460px;}
#commander-table #ct-lobby .ct-builder-name button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:34px;min-width:34px;height:34px;min-height:34px;padding:6px;}
#commander-table .ct-builder-name svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#commander-table #ct-lobby #ct-builder-name-input{flex:1;width:0;min-width:0;height:36px;min-height:36px;padding:4px 8px;font-size:18px;}
#commander-table .ct-builder-title>span{color:var(--ct-muted);}
#commander-table .ct-builder-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;}
#commander-table #ct-lobby .ct-builder-nav button{min-width:0;padding:10px 6px;white-space:normal;}
#commander-table #ct-lobby .ct-builder-nav [aria-selected=true]{background:#E5C84A22;border-color:var(--ct-gold);}
#commander-table .ct-builder-status{font-size:12px;margin:8px 0 0;}
#commander-table .ct-builder-status:empty{display:none;}
#commander-table .ct-builder-recovery{display:flex;gap:8px;margin-top:8px;}
#commander-table .ct-builder [hidden]{display:none!important;}
#commander-table [id^=ct-build-page-]{margin-top:22px;min-width:0;}
#commander-table .ct-builder-workspace{display:block;}
#commander-table .ct-builder-main{min-width:0;}
#commander-table #ct-lobby .ct-builder h2{font-size:22px;text-align:left;margin:12px 0 16px;}
#commander-table #ct-lobby .ct-builder h3{font-size:16px;text-align:left;margin:16px 0 10px;}
#commander-table .ct-builder label,#commander-table #ct-create-deck-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;min-width:0;}
#commander-table .ct-builder input,#commander-table .ct-builder select{min-width:0;}
#commander-table .ct-builder-commanders:not(:empty){margin-bottom:20px;}
#commander-table .ct-builder-commanders .ct-card-list-head{display:none;}
#commander-table .ct-builder-commanders p{font-size:13px;}
#commander-table .ct-builder-actions{display:flex;flex-wrap:wrap;gap:8px;}
#commander-table .ct-builder-commander-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;margin-bottom:14px;}
#commander-table #ct-lobby .ct-builder-commander-heading>h2{grid-column:2;margin:0;text-align:center;font-size:22px;line-height:1.3;}
#commander-table .ct-builder-commander-heading>.ct-builder-actions{grid-column:3;justify-self:end;flex-wrap:nowrap;}
#commander-table #ct-lobby .ct-builder-commander-heading .ct-builder-actions button{font-size:12px;line-height:1.3;min-height:40px;padding:8px 10px;white-space:nowrap;}
#commander-table .ct-builder-color-choices{display:grid;gap:8px;margin-top:10px;}
#commander-table .ct-builder-color-choices:empty{display:none;}
#commander-table .ct-builder-commander-overview.has-help.has-commanders{display:grid;grid-template-columns:minmax(0,var(--ct-commander-width)) minmax(0,1fr);gap:24px;align-items:start;}
#commander-table .ct-builder-commander-deck{min-width:0;}
#commander-table .has-help .ct-builder-commander-cards{grid-template-columns:repeat(var(--ct-commander-columns),minmax(0,1fr));max-width:min(100%,var(--ct-commander-width));}
#commander-table #ct-lobby [data-open-build-help]{font-size:12px;min-height:36px;padding:6px 10px;}
@media(max-width:800px){
  #commander-table .ct-builder-commander-overview.has-help.has-commanders{grid-template-columns:minmax(0,1fr);gap:20px;}
}
@media(max-width:1050px){
  #commander-table .ct-builder-commander-overview.has-help.has-partners{grid-template-columns:minmax(0,1fr);gap:20px;}
  #commander-table .ct-builder-commander-heading{grid-template-columns:minmax(0,1fr);gap:10px;}
  #commander-table #ct-lobby .ct-builder-commander-heading>h2{grid-column:1;}
  #commander-table .ct-builder-commander-heading>.ct-builder-actions{grid-column:1;}
}
@media(max-width:600px){
  #commander-table .ct-builder-commander-heading>.ct-builder-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-self:stretch;}
  #commander-table #ct-lobby .ct-builder-commander-heading .ct-builder-actions button{min-width:0;min-height:44px;white-space:normal;}
  #commander-table .ct-builder-commander-heading>.ct-builder-actions>button:only-child{grid-column:1/-1;justify-self:end;}
}
#commander-table .ct-builder-deck-tools{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin-bottom:16px;}
#commander-table .ct-builder-card-tools{display:flex;align-items:center;gap:8px;margin-left:auto;}
#commander-table #ct-lobby [data-builder-lock]{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:9px;}
#commander-table [data-builder-lock] svg{width:22px;height:22px;}
#commander-table #ct-lobby [data-builder-lock][aria-pressed=true]{border-color:var(--ct-gold);color:var(--ct-gold);background:#eed66a1a;}
#commander-table .ct-builder-sort-tools{display:grid;grid-template-columns:minmax(140px,240px) minmax(130px,180px) minmax(150px,210px) max-content;align-items:end;gap:10px;min-width:0;width:100%;}
#commander-table #ct-lobby .ct-builder-sort-tools label{display:flex;flex-direction:column;min-width:0;margin:0;}
#commander-table #ct-lobby .ct-builder-sort-tools>.ct-collection-search{position:relative;display:block;}
#commander-table #ct-lobby #ct-builder-filter{height:44px;padding-left:38px;}
#commander-table .ct-builder-sort-options{display:flex;gap:6px;min-width:0;}
#commander-table .ct-builder-sort-options>label{flex:1;}
#commander-table .ct-builder-view-toggle{display:flex;align-items:end;justify-content:start;min-width:0;}
#commander-table #ct-lobby #ct-builder-sort-reverse{width:36px;min-width:36px;height:44px;min-height:44px;padding:0;font-size:22px;}
#commander-table #ct-builder-sort-reverse[aria-pressed=true]{background:#3D4767;color:white;}
@media(max-width:700px){
  #commander-table .ct-builder-sort-tools{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  #commander-table .ct-builder-view-toggle>.ct-view-toggle{width:100%;justify-content:center;}
}
#commander-table[data-device-view="smartphone"] .ct-builder-sort-tools{border-block:1px solid color-mix(in srgb,var(--ct-muted) 55%,transparent);padding-block:14px;}
#commander-table .ct-builder-deck-content>p{font-size:13px;}
#commander-table .ct-builder-card-group+.ct-builder-card-group{margin-top:26px;}
#commander-table #ct-lobby .ct-builder-card-group>h3{font-size:18px;text-align:left;margin:18px 0 12px;padding-bottom:8px;border-bottom:1px solid var(--ct-line);}
#commander-table .ct-builder-card-group>h3>span,#commander-table [data-unassigned-toggle]>span{font-size:14px;font-weight:400;color:var(--ct-muted);}
#commander-table .ct-builder-card-group.has-card-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px;}
#commander-table #ct-lobby .ct-builder-card-group.has-card-tools>h3{grid-column:1;grid-row:1;margin:12px 0;padding:0;border:0;}
#commander-table .ct-builder-card-group.has-card-tools>.ct-builder-card-tools{grid-column:2;grid-row:1;margin:0 0 10px;}
#commander-table .ct-builder-card-group.has-card-tools>.ct-builder-group-cards{grid-column:1/-1;min-width:0;border-top:1px solid var(--ct-line);padding-top:12px;}
#commander-table .ct-builder-card-tools.is-empty-toolbar{justify-content:flex-end;width:100%;padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--ct-line);}
#commander-table #ct-lobby .ct-commander-placeholder{display:flex;align-items:center;justify-content:center;width:176px;max-width:100%;aspect-ratio:63/88;min-height:0;margin:0 auto 24px;padding:16px;border:1px dashed var(--ct-gold);border-radius:12px;background:var(--ct-panel);color:var(--ct-ink);text-align:center;font-size:16px;line-height:1.5;box-shadow:inset 0 0 0 7px #ffffff05;}
#commander-table .ct-builder-commander-heading>.ct-builder-actions:empty{display:none;}
#commander-table #ct-lobby [data-unassigned-toggle]{display:flex;align-items:center;gap:6px;width:100%;min-height:36px;padding:0;border:0;border-radius:4px;background:transparent;font:inherit;text-align:left;}
#commander-table [data-unassigned-toggle] svg{width:18px;height:18px;flex:none;}
#commander-table [data-unassigned-toggle][aria-expanded=false] svg{transform:rotate(-90deg);}
#commander-table .ct-builder-group-note{color:var(--ct-muted);line-height:1.5;}
#commander-table .ct-build-row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin:6px 0 12px;}
#commander-table #ct-lobby .ct-build-row-actions button{font-size:11px;min-height:36px;min-width:32px;padding:6px;}
#commander-table .ct-builder-grid .ct-card-list-row .ct-build-row-actions{grid-column:1/-1;}
#commander-table .ct-builder-grid .ct-deck-card-invalid{border-radius:10px;padding:3px;}
#commander-table #ct-build-page-help{padding:16px;border:1px solid var(--ct-line);border-radius:12px;font-size:13px;line-height:1.5;}
#commander-table .ct-build-rule-status{margin:16px 0;padding:12px;border:1px solid #7883A8;border-radius:10px;background:#101A36;}
#commander-table .ct-build-rule-status.is-error{background:#382725;border-color:#e47a79;}
#commander-table .ct-build-rule-status.is-notice{background:#343329;border-color:#c5ab60;}
#commander-table .ct-build-rule-status li.is-error{color:#ffb1ae;}
#commander-table .ct-build-rule-status li.is-notice{color:#E5C84A;}
#commander-table .ct-build-rule-status ul{padding-left:18px;overflow-wrap:anywhere;}
#commander-table .ct-build-rule-status button{width:100%;}
#commander-table .ct-build-guidelines{display:grid;gap:14px;margin:16px 0;}
#commander-table .ct-build-guideline details summary{cursor:pointer;}
#commander-table .ct-build-guideline details summary strong{float:right;}
#commander-table .ct-build-guideline p{font-size:12px;color:var(--ct-muted);}
#commander-table .ct-build-guideline small{font-size:11px;}
#commander-table .ct-build-guideline.is-notice small{color:var(--ct-gold);}
#commander-table .ct-build-meter{height:6px;border-radius:6px;background:#1C2949;overflow:hidden;margin:7px 0;}
#commander-table .ct-build-meter span{display:block;height:100%;background:#BDC4DF;}
#commander-table .ct-build-guideline.is-notice .ct-build-meter span{background:#cfb96c;}
#commander-table .ct-build-mini-curve{border-top:1px solid var(--ct-line);margin-top:20px;padding-top:6px;}
#commander-table .ct-build-curve{display:flex;align-items:end;gap:6px;height:140px;margin:10px 0;border-bottom:1px solid var(--ct-line);padding-bottom:6px;}
#commander-table .ct-build-curve>div{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:12px;}
#commander-table .ct-build-curve>div>div{display:flex;flex-direction:column-reverse;width:100%;overflow:hidden;border-radius:4px 4px 0 0;}
#commander-table .ct-build-curve-legend{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:11px;}
#commander-table .ct-build-curve-legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px;}
#commander-table .ct-builder-search-options{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px;padding:16px;border:1px solid var(--ct-line);border-radius:12px;}
#commander-table .ct-builder-search-options>label{flex:1 1 230px;}
#commander-table .ct-build-search-note{flex-basis:100%;font-size:13px;margin:0;}
#commander-table #ct-lobby .ct-build-check{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:44px;}
#commander-table #ct-lobby .ct-build-check input,#commander-table #ct-lobby .ct-build-checks input{width:18px;height:18px;min-height:18px;flex:none;accent-color:var(--ct-gold);margin:0;}
#commander-table .ct-build-field-pair,.ct-builder-dialog .ct-build-field-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
#commander-table #ct-builder-plan-form,#commander-table #ct-create-deck-form{display:grid;gap:18px;max-width:900px;margin:20px auto;}
#commander-table .ct-builder-plan-tools{display:flex;justify-content:center;max-width:900px;margin:0 auto 20px;}
#commander-table #ct-builder-plan-form textarea{min-height:110px;}
#commander-table .ct-builder fieldset,.ct-builder-dialog fieldset{min-width:0;border:1px solid #7883A866;border-radius:8px;margin:0;padding:12px;}
#commander-table .ct-build-checks,.ct-builder-dialog .ct-build-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px;}
#commander-table .ct-build-checks label{display:flex;flex-direction:row;align-items:center;gap:8px;padding:8px;background:#1C294955;border-radius:6px;}
#commander-table .ct-build-mana-table>div{display:grid;grid-template-columns:40px repeat(2,minmax(0,1fr));gap:10px;padding:8px 0;border-bottom:1px solid var(--ct-line);font-size:12px;}
#commander-table .ct-build-mana-table i{display:block;height:5px;border-radius:3px;margin-top:5px;}
#commander-table #ct-build-page-help>section{margin-bottom:20px;}
.ct-builder-dialog{width:min(800px,calc(100vw - 32px));max-width:calc(100vw - 32px);box-sizing:border-box;text-align:left;}
.ct-builder-dialog>h2{margin:0 32px 18px 0;padding:0;text-align:left;}
.ct-builder-dialog form{display:grid;gap:14px;}
.ct-builder-dialog label{display:flex;flex-direction:column;gap:6px;font-size:13px;min-width:0;}
.ct-builder-dialog input,.ct-builder-dialog select{box-sizing:border-box;width:100%;min-width:0;background:#101A36;border:1px solid #BDC4DF;border-radius:8px;color:#fff;padding:10px;min-height:44px;font:inherit;}
.ct-builder-dialog .ct-build-check,.ct-builder-dialog .ct-build-checks label{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:36px;}
.ct-builder-dialog input[type=checkbox]{width:18px;height:18px;min-height:18px;flex:none;margin:0;accent-color:#E5C84A;}
.ct-builder-dialog details{font-size:13px;margin:8px 0;}
.ct-builder-dialog summary{cursor:pointer;padding:8px 0;}
.ct-builder-dialog .ct-build-targets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.ct-builder-dialog .ct-build-oracle{white-space:pre-line;}
.ct-builder-dialog .ct-build-dialog-message{color:#E5C84A;overflow-wrap:anywhere;}
.ct-builder-quick-add{width:min(560px,calc(100vw - 32px));}
.ct-builder-quick-add .ct-build-quick-hint{font-size:13px;color:#BDC4DF;margin:0 0 18px;}
.ct-builder-quick-add .ct-build-quick-state{font-size:13px;color:#BDC4DF;margin:12px 0;overflow-wrap:anywhere;}
.ct-builder-quick-add .ct-build-quick-state:empty,.ct-builder-quick-add .ct-build-dialog-message:empty{display:none;}
.ct-build-quick-results{display:grid;gap:8px;list-style:none;padding:0;margin:14px 0 0;max-height:min(360px,46dvh);overflow:auto;overscroll-behavior:contain;}
.ct-build-quick-results>li{min-width:0;}
.ct-builder-quick-add .ct-build-quick-result{display:flex;align-items:center;gap:12px;width:100%;min-height:54px;padding:10px 12px;text-align:left;font:inherit;border-color:#7883A866;}
.ct-builder-quick-add .ct-build-quick-result:hover{background:#3D4767;border-color:#E5C84A;}
.ct-builder-quick-add :is(input,button):focus-visible{outline:2px solid #E5C84A;outline-offset:2px;}
.ct-builder-quick-add button:disabled{opacity:.6;cursor:wait;}
.ct-build-quick-art{display:block;flex:0 0 40px;width:40px;height:40px;overflow:hidden;border-radius:6px;background:#111A4A;}
.ct-build-quick-art img{display:block;width:100%;height:100%;object-fit:cover;}
.ct-build-quick-art img[hidden]{display:none;}
.ct-build-quick-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px;}
.ct-build-quick-name small{font-size:12px;color:#BDC4DF;margin:4px 0 0;}
.ct-build-quick-mana{display:flex;flex-wrap:wrap;gap:2px;justify-content:flex-end;max-width:96px;}
.ct-build-quick-mana img{width:18px;height:18px;}
.ct-build-quick-plus{flex:none;font-size:20px;color:#E5C84A;}
.ct-build-commander-kind{display:block;font-size:11px;line-height:1.3;color:#BDC4DF;}
#commander-table .ct-build-list-info:has(.ct-build-commander-kind){max-height:none;}
#commander-table .ct-build-list-info>.ct-build-commander-kind{display:block;font-size:10px;}
@media(max-width:400px){.ct-builder-quick-add .ct-build-quick-result{gap:8px;padding:10px 8px;}.ct-build-quick-art{flex-basis:34px;width:34px;height:34px;}.ct-build-quick-mana{max-width:60px;}}
@media(max-width:700px){#commander-table .ct-builder-nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}#commander-table #ct-lobby .ct-builder-nav button{font-size:12px;min-height:40px;padding:6px;}#commander-table .ct-builder-title{flex-wrap:wrap;gap:4px 10px;}#commander-table .ct-builder-sticky{padding:10px;border-radius:16px;}#commander-table .ct-builder-deck-tools{grid-template-columns:repeat(2,minmax(0,1fr));}#commander-table .ct-build-field-pair{grid-template-columns:minmax(0,1fr);}#commander-table #ct-lobby .ct-builder-heading{flex-wrap:wrap;}#commander-table #ct-lobby .ct-builder-heading>#ct-builder-view{margin-left:auto;}#commander-table .ct-builder-commanders .ct-card-list-row{grid-template-columns:minmax(0,1fr) 38px;}#commander-table .ct-builder-commanders .ct-card-list-row>:nth-child(n+3){display:none;}}
@media(max-width:500px){.ct-builder-dialog{padding:16px;}.ct-builder-dialog .ct-build-targets{grid-template-columns:repeat(2,minmax(0,1fr));}.ct-builder-dialog .ct-build-checks{grid-template-columns:repeat(2,minmax(0,1fr));}.ct-builder-dialog .ct-build-checks label{font-size:12px;overflow-wrap:anywhere;}}
#commander-table #ct-lobby .ct-builder-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;}
#commander-table #ct-lobby .ct-builder-heading>.ct-page-title-row{justify-self:center;max-width:calc(100% - 110px);margin:0;}
#commander-table #ct-lobby .ct-builder-commanders .ct-build-remove-commander{display:block;grid-column:1/-1;font-size:12px;min-height:36px;justify-self:end;}
@media(max-width:700px){#commander-table #ct-lobby .ct-builder-heading{grid-template-columns:minmax(0,1fr);}#commander-table #ct-lobby .ct-builder-heading>#ct-builder-view{grid-row:2;justify-self:end;}#commander-table #ct-lobby .ct-build-row-actions button{min-height:44px;font-size:12px;}}
/* Clip the builder shell without creating a separate scrolling container. */
#commander-table:has(.ct-builder){overflow:clip;}
#commander-table .ct-builder .ct-deck-insights{scroll-margin-top:calc(var(--ct-menu-safe-top,0px) + 16px);}
/* Deck-specific board navigation and compact artwork list. */
#commander-table .ct-builder-boards{display:block;width:220px;max-width:100%;margin:0 0 18px;}
#commander-table #ct-lobby .ct-builder-boards select{width:100%;min-width:0;min-height:44px;font-size:14px;}
#commander-table .ct-builder-sort-tools>.ct-builder-boards{width:100%;min-width:0;margin:0;}
#commander-table .ct-deck-controls>.ct-builder-boards{flex:0 1 180px;width:180px;margin:0;}
#commander-table #ct-deck-load-status:empty{display:none;}
#commander-table[data-device-view="smartphone"] .ct-deck-controls{
  border-block:1px solid color-mix(in srgb,var(--ct-muted) 55%,transparent);
  padding-block:14px;
}
@media(max-width:600px){
  #commander-table .ct-deck-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  #commander-table .ct-deck-controls>.ct-builder-boards{width:100%;}
  #commander-table .ct-deck-controls>label{min-width:0;}
}
#commander-table .ct-build-cards:not(.ct-build-list)>.ct-card-tile{background:#1C2949;border:1px solid var(--ct-line);border-radius:10px;overflow:hidden;align-self:start;}
#commander-table #ct-lobby .ct-build-cards:not(.ct-build-list) .ct-deck-card{border:0;background:transparent;border-radius:0;box-shadow:none;width:100%;}
#commander-table .ct-build-cards .ct-build-row-actions{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0;padding:6px;}
#commander-table .ct-build-quantity{display:flex;align-items:center;justify-content:center;gap:4px;flex:none;}
#commander-table .ct-build-quantity>span{min-width:20px;text-align:center;font-variant-numeric:tabular-nums;font-size:14px;}
#commander-table .ct-build-edit-actions{display:flex;gap:4px;flex-wrap:wrap;}
#commander-table .ct-build-card-visual{position:relative;}
#commander-table .ct-build-card-visual>.ct-build-quantity{position:absolute;left:12px;right:12px;bottom:38px;justify-content:space-between;gap:4px;padding:4px;background:#101A36ee;border:1px solid #7883A8;border-radius:8px;}
#commander-table #ct-lobby .ct-build-card-visual .ct-build-quantity button{width:32px;min-width:32px;min-height:32px;height:32px;padding:0;font-size:20px;}
#commander-table .ct-build-cards:not(.ct-build-list) .ct-build-edit-actions{width:100%;}
#commander-table .ct-build-cards:not(.ct-build-list) .ct-build-edit-actions button{flex:1;}
#commander-table .ct-deck-grid.ct-build-list,#commander-table .ct-builder-search-host .ct-deck-grid.ct-card-list{display:flex;flex-direction:column;gap:6px;}
#commander-table .ct-build-list-row{display:flex;align-items:center;gap:16px;border:1px solid var(--ct-line);border-radius:8px;background:#1C294966;padding:6px;min-width:0;}
#commander-table #ct-lobby .ct-build-list-card{display:grid;grid-template-columns:84px minmax(100px,min(22%,200px)) minmax(0,1fr);flex:1;align-items:center;gap:16px;min-width:0;min-height:58px;height:58px;padding:0;border:0;border-radius:4px;background:transparent;text-align:left;white-space:normal;justify-content:start;overflow:hidden;}
#commander-table .ct-build-art{display:flex;align-items:center;justify-content:center;width:84px;height:58px;flex:none;border-radius:4px;overflow:hidden;background:#101A36;color:var(--ct-muted);font-size:10px;}
#commander-table .ct-build-art img{display:block;width:100%;height:100%;max-height:none;object-fit:contain;}
#commander-table .ct-build-list-info{display:grid;gap:4px;min-width:0;max-height:58px;overflow:hidden;}
#commander-table .ct-build-list-info>strong{font-size:14px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#commander-table .ct-build-list-info>small{font-size:10px;line-height:1.3;color:var(--ct-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#commander-table .ct-build-list-info>.ct-build-mana{flex-wrap:nowrap;overflow:hidden;}
#commander-table .ct-build-list-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;min-width:0;max-height:51px;overflow:hidden;white-space:pre-line;overflow-wrap:anywhere;font-size:12px;line-height:17px;color:var(--ct-muted);}
#commander-table .ct-builder-search-host .ct-card-tile{position:relative;}
#commander-table #ct-lobby .ct-builder-search-host .ct-search-add-icon{position:absolute;right:12px;bottom:38px;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border-color:#BDC4DF;background:#101A36ee;font-size:32px;line-height:1;border-radius:10px;box-shadow:0 2px 8px #0006;}
#commander-table .ct-builder-search-host .ct-build-list-row{flex-wrap:nowrap;}
#commander-table #ct-lobby .ct-builder-search-host .ct-build-list-row>.ct-search-add-icon{position:static;flex:none;margin:0;align-self:end;}
:is(#commander-table,.ct-builder-quick-add) .ct-build-mana{display:flex;flex-wrap:wrap;align-items:center;gap:2px;font-size:12px;min-height:18px;}
:is(#commander-table,.ct-builder-quick-add) .ct-build-mana img{width:18px;height:18px;max-height:18px;object-fit:contain;}
:is(#commander-table,.ct-builder-quick-add) .ct-build-mana-symbol{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;border-radius:50%;background:#cac5c0;color:#181818;font-size:12px;line-height:1;}
:is(#commander-table,.ct-builder-quick-add) .ct-build-mana-symbol img{position:absolute;inset:0;visibility:hidden;}
:is(#commander-table,.ct-builder-quick-add) .ct-build-mana-symbol.is-loaded img{visibility:visible;}
:is(#commander-table,.ct-builder-quick-add) .ct-build-mana-symbol.is-loaded>span{visibility:hidden;}
#commander-table .ct-build-list .ct-build-row-actions{flex:none;padding:0;justify-content:end;flex-wrap:nowrap;}
#commander-table #ct-lobby .ct-build-list .ct-build-row-actions button{min-width:32px;width:32px;min-height:36px;font-size:16px;padding:0;}
#commander-table .ct-builder-search-options{border:0;border-radius:0;padding:0;gap:8px 20px;margin-bottom:12px;}
#commander-table .ct-builder-search-options>label{flex:none;}
.ct-builder-dialog [hidden]{display:none!important;}
.ct-builder-dialog .ct-build-commander-target{align-self:center;font-size:13px;}
@media(max-width:700px){
  #commander-table .ct-build-list-row{flex-wrap:wrap;gap:6px;}
  #commander-table #ct-lobby .ct-build-list-card{grid-template-columns:72px minmax(90px,.7fr) minmax(0,1.3fr);gap:8px;}
  #commander-table .ct-build-art{width:72px;height:50px;}
  #commander-table .ct-build-list-info>strong{font-size:13px;}
  #commander-table .ct-build-list .ct-build-row-actions{width:100%;justify-content:space-between;}
  #commander-table #ct-lobby .ct-build-list .ct-build-row-actions button{min-width:44px;width:44px;min-height:44px;}
}
@media(max-width:500px){
  #commander-table #ct-lobby .ct-build-list-card{grid-template-columns:72px minmax(0,1fr);grid-template-rows:40px 16px;gap:2px 8px;}
  #commander-table .ct-build-list-card>.ct-build-art{grid-row:1/3;}
  #commander-table .ct-build-list-info{grid-column:2;grid-row:1;gap:2px;max-height:40px;}
  #commander-table .ct-build-list-info>small{display:none;}
  #commander-table #ct-lobby .ct-build-list-card:has(.ct-build-commander-kind){grid-template-rows:56px 16px;min-height:74px;height:74px;}
  #commander-table .ct-build-list-description{grid-column:2;grid-row:2;-webkit-line-clamp:1;max-height:16px;line-height:16px;font-size:11px;}
}


/* Seat-based damage quadrants and permanently assigned resource positions. */
#commander-table .ct-seat .ct-panel{--ct-damage-height:66px;--ct-tableau-marker-size:88px;--ct-control-radius:8px;grid-template-rows:minmax(0,1fr) auto;padding-top:28px;}
#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-panel{--ct-damage-height:40px;grid-template-rows:minmax(0,1fr) auto;}
#commander-table .ct-panel>.ct-head{position:absolute;top:28px;left:16px;right:16px;height:88px;display:grid;grid-template-columns:60px minmax(0,1fr) 88px;grid-template-rows:88px;align-items:start;gap:4px;pointer-events:none;z-index:2;}
#commander-table .ct-panel>.ct-head button{pointer-events:auto;}
#commander-table .ct-panel>.ct-head>.ct-shared-tax{width:60px;min-width:60px;height:88px;min-height:88px;padding:2px;}
#commander-table .ct-panel .ct-shared-tax strong.ct-tax-display{font-size:22px;line-height:26px;}
#commander-table .ct-panel .ct-shared-tax .ct-tax-display small{font-size:20px;}
#commander-table .ct-tableau-statuses>.ct-name-status{width:calc(var(--ct-tableau-marker-size)*2 + 4px);height:var(--ct-tableau-marker-size);align-self:start;}
#commander-table .ct-tableau-statuses .ct-monarch,#commander-table .ct-tableau-statuses .ct-initiative-slot,#commander-table .ct-tableau-statuses .ct-initiative-slot button{width:var(--ct-tableau-marker-size);min-width:var(--ct-tableau-marker-size);max-width:var(--ct-tableau-marker-size);height:var(--ct-tableau-marker-size);min-height:var(--ct-tableau-marker-size);flex-basis:var(--ct-tableau-marker-size);}
#commander-table .ct-tableau-statuses .ct-monarch svg,#commander-table .ct-tableau-statuses .ct-initiative-slot svg{width:36px;height:36px;}
#commander-table .ct-tableau-statuses>.ct-progress-tax{width:var(--ct-tableau-marker-size);max-width:var(--ct-tableau-marker-size);height:var(--ct-tableau-marker-size);align-self:start;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;}
#commander-table .ct-tableau-statuses>.ct-progress-tax [data-pinned-counter]{width:calc((var(--ct-tableau-marker-size) - 4px)/2);min-width:0;max-width:calc((var(--ct-tableau-marker-size) - 4px)/2);height:var(--ct-tableau-marker-size);min-height:var(--ct-tableau-marker-size);grid-row:1;gap:6px;font-size:18px;}
#commander-table .ct-tableau-statuses>.ct-progress-tax [data-pinned-counter=ring]{grid-column:1;}
#commander-table .ct-tableau-statuses>.ct-progress-tax [data-pinned-counter=speed]{grid-column:2;}
#commander-table .ct-tableau-statuses>.ct-progress-tax svg{width:26px;height:26px;}
#commander-table .ct-panel>.ct-head>.ct-person{align-self:start;}
#commander-table .ct-panel>.ct-life{grid-row:1;min-height:0;padding-bottom:0;}
#commander-table .ct-panel>.ct-life .ct-number{left:15%;right:15%;bottom:0;letter-spacing:.02em;}
#commander-table .ct-panel>.ct-life>[data-life]{padding-top:88px;}
#commander-table .ct-panel:has(.ct-commander:not([hidden]))>.ct-life .ct-number{top:34px;}
#commander-table .ct-panel>.ct-tableau-bottom{position:relative;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr);gap:8px;min-height:max(92px,calc(var(--ct-damage-height)*2 - 8px));height:calc(var(--ct-damage-height)*var(--damage-rows) + 4px*(var(--damage-rows) - 1));min-width:0;}
#commander-table .ct-tableau-bottom>.ct-seat-damages{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(var(--damage-columns,2),minmax(0,1fr));grid-template-rows:repeat(var(--damage-rows),var(--ct-damage-height));grid-auto-rows:var(--ct-damage-height);width:100%;gap:4px;min-height:0;margin:0;transform:none;}
#commander-table .ct-damage-seat{min-width:0;min-height:0;}
#commander-table .ct-damage-seat>.ct-damage,#commander-table .ct-damage-seat>.ct-damage-self,#commander-table .ct-damage-seat>.ct-damage-ally{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-width:0;min-height:0;padding:0;margin:0;border:1px solid color-mix(in srgb,var(--damage-source-color,var(--ct-muted)) 60%,var(--ct-line));border-radius:8px;overflow:hidden;}
#commander-table .ct-damage-seat>.ct-damage-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0;}
#commander-table .ct-damage-seat>.ct-damage-pair>.ct-damage{height:100%;min-height:0;padding:0;}
#commander-table .ct-damage-seat .ct-damage b{top:50%;}
#commander-table .ct-damage-seat .ct-damage em{top:2px;left:4px;right:auto;bottom:auto;font-size:12px;opacity:.75;}
#commander-table .ct-damage-self svg,#commander-table .ct-damage-ally svg{width:30px;height:30px;}
#commander-table .ct-tableau-bottom>.ct-foot{position:static;width:86%;justify-self:start;grid-column:1;grid-row:1;inset:auto;height:100%;min-width:0;margin:0;padding:0;transform:none;pointer-events:none;}
#commander-table .ct-tableau-bottom .ct-pinned{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;width:100%;height:100%;min-height:0;padding:0;margin:0;}
#commander-table .ct-tableau-bottom .ct-quick-resource{display:flex;align-self:center;width:100%;max-width:100%;height:min(100%,calc(var(--ct-damage-height) - 2px));min-width:0;flex:none;margin:0;pointer-events:auto;}
#commander-table .ct-tableau-bottom .ct-quick-resource button{height:100%;min-height:0;}
#commander-table .ct-tableau-bottom [data-resource-slot="0"]{grid-column:1;grid-row:1;}
#commander-table .ct-tableau-bottom [data-resource-slot="1"]{grid-column:2;grid-row:1;}
#commander-table .ct-tableau-bottom [data-resource-slot="2"]{grid-column:3;grid-row:1;}
#commander-table .ct-tableau-bottom [data-resource-slot="3"]{grid-column:4;grid-row:1;}
#commander-table[data-tableau=duel] .ct-panel>.ct-head{grid-template-columns:minmax(0,1fr) 88px;}

#commander-table[data-commander-damage=false] .ct-panel>.ct-tableau-bottom{height:calc(var(--ct-damage-height)*2 + 4px);}
#commander-table[data-commander-damage=false] .ct-seat .ct-panel{grid-template-rows:minmax(0,1fr) auto;}
#commander-table[data-commander-damage=false] .ct-panel>.ct-life .ct-number{bottom:0;}
#commander-table .ct-damage-editor{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:12px;margin:16px 0;}
#commander-table .ct-damage-editor section{min-width:0;padding:10px;border:1px solid var(--ct-line);border-radius:10px;}
#commander-table .ct-damage-editor h4{margin:0 0 8px;text-align:center;}
#commander-table .ct-damage-correction+ .ct-damage-correction{margin-top:10px;}
#commander-table .ct-damage-correction>span{display:block;font-size:12px;overflow-wrap:anywhere;text-align:center;}
#commander-table .ct-damage-correction>div{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:4px;margin-top:4px;}
#commander-table .ct-damage-correction output{text-align:center;font-size:24px;font-variant-numeric:tabular-nums;}
#commander-table .ct-damage-correction button{height:44px;min-height:44px;padding:0;font-size:22px;}
#commander-table .ct-damage-coupling{display:flex;align-items:center;gap:8px;}

#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-panel>.ct-head{top:20px;grid-template-columns:60px minmax(0,1fr) 88px;grid-template-rows:88px;}

/* One radius for all tableau control surfaces, including composite counters. */
#commander-table .ct-panel>.ct-head :is(button,.ct-initiative-slot),
#commander-table .ct-panel .ct-tableau-statuses :is(button,.ct-initiative-slot),
#commander-table .ct-panel>.ct-handle,
#commander-table .ct-panel .ct-damage-seat>*,
#commander-table .ct-panel .ct-quick-resource,
#commander-table .ct-panel .ct-poison-slot [data-pinned-counter=poison]{border-radius:var(--ct-control-radius);}
#commander-table .ct-panel .ct-poison-slot [data-pinned-counter=poison]{width:100%;min-width:0;height:100%;min-height:0;font-size:26px;}
#commander-table .ct-panel .ct-poison-slot svg{width:36px;height:36px;}

/* The damage column stays unchanged; side controls use only the surrounding columns. */
#commander-table .ct-panel>.ct-head>.ct-poison-slot{position:static;grid-column:3;grid-row:1;width:88px;height:88px;min-height:0;transform:none;}
#commander-table[data-tableau=duel] .ct-panel>.ct-head>.ct-person{grid-column:1;}
#commander-table[data-tableau=duel] .ct-panel>.ct-head>.ct-poison-slot{grid-column:2;}
#commander-table .ct-tableau-statuses{--ct-status-row-height:calc((var(--ct-status-stack-height) - 4px)/2);--ct-status-stack-height:calc(var(--ct-damage-height)*var(--damage-rows) + 4px*(var(--damage-rows) - 1));grid-column:3;grid-row:1;align-self:start;justify-self:center;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:4px;width:min(180px,100%);height:var(--ct-status-stack-height);min-width:0;}
#commander-table .ct-tableau-statuses>.ct-progress-tax,#commander-table .ct-tableau-statuses>.ct-name-status{grid-column:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;align-items:stretch;width:100%;max-width:none;height:100%;min-width:0;}
#commander-table .ct-tableau-statuses>.ct-progress-tax{grid-row:1;}
#commander-table .ct-tableau-statuses>.ct-name-status{grid-row:2;}
#commander-table .ct-tableau-statuses .ct-monarch,#commander-table .ct-tableau-statuses .ct-initiative-slot,#commander-table .ct-tableau-statuses .ct-initiative-slot button,#commander-table .ct-tableau-statuses>.ct-progress-tax [data-pinned-counter]{width:100%;min-width:0;max-width:none;height:100%;min-height:0;flex-basis:auto;}
#commander-table[data-resources-centered=true] .ct-tableau-bottom>.ct-foot{grid-column:2;justify-self:center;}
#commander-table .ct-tableau-statuses .ct-initiative-slot{display:flex;order:0;}
#commander-table .ct-tableau-statuses .ct-monarch{order:1;}
#commander-table .ct-tableau-statuses .ct-initiative-slot button{padding:2px;}
#commander-table .ct-tableau-statuses .ct-monarch[aria-pressed=true],#commander-table .ct-tableau-statuses .ct-monarch[aria-pressed=true] svg{color:#E5C84A;stroke:#E5C84A;}
#commander-table .ct-tableau-statuses [data-pinned-status=initiative][aria-pressed=true],#commander-table .ct-tableau-statuses [data-pinned-status=initiative][aria-pressed=true] svg{color:#70baff;stroke:#70baff;}
#commander-table .ct-tableau-statuses>.ct-progress-tax [data-pinned-counter]{font-size:clamp(10px,calc(var(--ct-status-row-height)*.3),18px);gap:2px;padding:2px;}
#commander-table .ct-tableau-statuses>.ct-progress-tax svg{width:min(26px,calc(var(--ct-status-row-height)*.42));height:min(26px,calc(var(--ct-status-row-height)*.42));}
#commander-table .ct-tableau-statuses .ct-monarch svg,#commander-table .ct-tableau-statuses .ct-initiative-slot svg{width:min(36px,calc(var(--ct-status-row-height)*.6));height:min(36px,calc(var(--ct-status-row-height)*.6));}

/* Damage positions follow the table; all values face the tableau's owner. */
#commander-table .ct-tableau-bottom>.ct-seat-damages[data-seat-map=true]{grid-template-columns:var(--damage-map-columns);grid-template-rows:var(--damage-map-rows);height:calc(var(--ct-damage-height)*2 + 4px);}
#commander-table .ct-seat-damages[data-seat-map=true]>.ct-damage-seat{position:relative;}

/* Shared symbol sizes and readable, separated counter feedback. */
#commander-table .ct-panel .ct-tableau-bottom [data-pinned-counter] svg,
#commander-table .ct-panel .ct-tableau-statuses :is(.ct-monarch,.ct-initiative-slot) svg,
#commander-table .ct-panel .ct-poison-slot svg,
#commander-table .ct-panel :is(.ct-damage-self,.ct-damage-ally) svg{width:var(--ct-tableau-icon-size,32px);height:var(--ct-tableau-icon-size,32px);flex-shrink:0;}
#commander-table .ct-panel .ct-tableau-bottom .ct-quick-resource [data-pinned-counter]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:2px;font-size:var(--ct-resource-label-height,16px);line-height:var(--ct-resource-label-height,16px);}
#commander-table .ct-panel[data-compact-status=true] .ct-tableau-statuses>.ct-progress-tax [data-pinned-counter]{flex-direction:row;gap:3px;}
#commander-table .ct-panel .ct-damage-seat .ct-damage b{left:50%;right:auto;top:calc(50% - var(--damage-ink-offset,0px));bottom:auto;transform:translate(-50%,-50%);text-align:center;line-height:1;}
#commander-table .ct-panel .ct-damage>.ct-live-delta{font-weight:500;}
#commander-table .ct-panel>.ct-head>.ct-person>.ct-commander{font-size:17px;line-height:21px;}
#commander-table .ct-panel>.ct-head>.ct-person:has(.ct-commander-pair:not([hidden])){height:88px;}
#commander-table .ct-panel>.ct-head>.ct-person>.ct-commander-pair:not([hidden]){display:grid;grid-template-rows:repeat(2,minmax(0,1fr));height:88px;width:100%;padding:3px 0;flex-shrink:0;background:transparent;}
#commander-table .ct-commander-pair .ct-partner-name{display:flex;align-items:center;min-width:0;height:100%;overflow:hidden;}
#commander-table .ct-commander-pair .ct-partner-name>span{display:block;max-width:100%;padding:4px 7px;border-radius:8px;background:var(--ct-control-surface);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#commander-table .ct-panel .ct-shared-tax-paired strong.ct-tax-display{font-size:22px;line-height:24px;}
#commander-table .ct-panel .ct-shared-tax-paired .ct-tax-display small{font-size:13px;line-height:15px;}

/* Keep bright artwork readable and let the permanently visible blessed frame swell gently. */
#commander-table .ct-panel .ct-number{-webkit-text-stroke:1px #000;paint-order:stroke fill;}
#commander-table .ct-panel.ct-blessed:not(.ct-eliminated){border-color:var(--ct-gold);}
#commander-table .ct-panel.ct-blessed:not(.ct-eliminated)::before{
  content:"";position:absolute;inset:0;z-index:12;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 0 0 3px #f3cf64,inset 0 0 15px 4px #efc34c80;
  animation:ct-blessing-glow 4s ease-in-out infinite;
}
@keyframes ct-blessing-glow{
  0%,100%{box-shadow:inset 0 0 0 3px #f3cf64,inset 0 0 15px 4px #efc34c80;}
  50%{box-shadow:inset 0 0 0 5px #ffe8a2,inset 0 0 28px 8px #f5cf66b3;}
}
#commander-table[data-reduce-motion=true] .ct-panel.ct-blessed:not(.ct-eliminated)::before{animation:none;}
@media(prefers-reduced-motion:reduce){#commander-table .ct-panel.ct-blessed:not(.ct-eliminated)::before{animation:none;}}
#commander-table .ct-tableau-statuses>.ct-progress-tax:not(:has([data-pinned-counter=speed])) [data-pinned-counter=ring]{grid-column:2;}

/* Seat-sized player menu: tall wheels above large state and exit surfaces. */
#commander-table .ct-dialog.ct-counter-dialog{
  --menu-space:clamp(calc(2px*var(--menu-unit)),min(calc(var(--menu-height)*.015),calc(var(--menu-width)*.008)),8px);--menu-gap:var(--menu-space);--menu-pad:var(--menu-space);
  --menu-header:clamp(calc(28px*var(--menu-unit)),calc(var(--menu-height)*.1),44px);--menu-footer:clamp(calc(52px*var(--menu-unit)),calc(var(--menu-height)*.25),124px);
  --menu-font:clamp(calc(11px*var(--menu-unit)),calc(var(--menu-width)*.016),17px);--menu-caption:clamp(calc(22px*var(--menu-unit)),calc(var(--menu-height)*.09),38px);--menu-heading:clamp(6px,min(calc(var(--menu-height)*.035),calc(var(--menu-width)*.02)),14px);
  display:grid;grid-template-rows:var(--menu-header) minmax(0,1fr) var(--menu-footer);gap:var(--menu-gap);padding:var(--menu-pad);overflow:hidden;
}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-title{padding-right:calc(var(--menu-header) + var(--menu-gap));}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-title h3{font-size:clamp(calc(16px*var(--menu-unit)),calc(var(--menu-height)*.06),28px);}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-actions .ct-menu-dismiss{position:static;transform:none;width:var(--menu-header);height:var(--menu-header);min-height:0;padding:3px;background:var(--ct-button);border:1px solid var(--ct-line);border-radius:8px;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-actions .ct-menu-dismiss svg{width:75%;height:75%;}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=wide] .ct-menu-categories{grid-template-columns:2fr 4fr 1fr;grid-template-rows:minmax(0,1fr);grid-template-areas:"progress resources poison";}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-categories{margin:0;overflow:visible;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-category{position:relative;grid-template-rows:minmax(0,1fr);gap:0;padding:var(--menu-pad);padding-top:calc(var(--menu-heading)*.5 + var(--menu-pad));}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-heading{position:absolute;top:calc(var(--menu-heading)*-.5);left:50%;transform:translateX(-50%);padding:0 4px;background:var(--ct-panel);font-size:var(--menu-heading);line-height:1;}
#commander-table .ct-dialog.ct-counter-dialog #ct-progress-list,
#commander-table .ct-dialog.ct-counter-dialog #ct-counter-list,
#commander-table .ct-dialog.ct-counter-dialog #ct-poison-list{grid-template-rows:minmax(0,1fr);grid-row:1;gap:var(--menu-gap);min-width:0;}
#commander-table .ct-dialog.ct-counter-dialog #ct-progress-list{grid-template-columns:repeat(2,minmax(0,1fr));}
#commander-table .ct-dialog.ct-counter-dialog #ct-counter-list{grid-template-columns:repeat(4,minmax(0,1fr));column-gap:calc(var(--menu-space)*2 + 1px);}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-row{grid-template-columns:minmax(0,1fr);grid-template-rows:var(--menu-caption) minmax(0,1fr);gap:2px;width:100%;height:100%;min-width:0;align-self:stretch;justify-self:stretch;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-caption{height:100%;gap:2px;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-caption .ct-counter-symbol{width:var(--menu-caption);height:var(--menu-caption);min-height:0;border:1px solid transparent;background:transparent;border-radius:6px;flex:none;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-caption .ct-counter-symbol[aria-pressed=true]{border-color:var(--ct-gold);color:var(--ct-gold);background:color-mix(in srgb,var(--ct-gold) 18%,var(--ct-button));}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-symbol svg{width:80%;height:80%;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-name{font-size:var(--menu-font);line-height:1.1;white-space:normal;overflow-wrap:anywhere;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-wheel{position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr);align-items:center;justify-items:center;width:100%;height:100%;min-height:0;border:1px solid var(--ct-line);border-radius:10px;background:linear-gradient(var(--ct-panel),var(--ct-button) 38%,var(--ct-button) 62%,var(--ct-panel));touch-action:none;user-select:none;-webkit-user-select:none;cursor:ns-resize;overflow:hidden;padding:2px 0;outline-offset:0;container-type:size;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-wheel output{display:block;grid-column:1;grid-row:2;width:100%;font-size:clamp(12px,min(65cqw,38cqh),76px);line-height:1.1;pointer-events:none;border-block:1px solid var(--ct-line);}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-wheel>[data-wheel-before]{grid-column:1;grid-row:1;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-wheel>[data-wheel-after]{grid-column:1;grid-row:3;}
#commander-table .ct-dialog.ct-counter-dialog .ct-wheel-neighbor{font-size:clamp(6px,min(26cqw,18cqh),36px);line-height:1;opacity:.85;pointer-events:none;font-variant-numeric:tabular-nums;}
#commander-table .ct-dialog.ct-counter-dialog .ct-wheel-neighbor[data-disabled]{opacity:.25;}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-wheel[data-pinned=true]{border-color:var(--ct-gold);}
#commander-table .ct-dialog.ct-counter-dialog .ct-counter-wheel[data-dragging=true],#commander-table .ct-dialog.ct-counter-dialog .ct-counter-wheel:focus-visible{outline:2px solid var(--ct-gold);}
#commander-table .ct-dialog.ct-counter-dialog .ct-tools{display:grid;grid-template-columns:1fr 2.2fr 1fr;grid-template-rows:minmax(0,1fr);gap:var(--menu-gap);margin:0;align-items:stretch;}
#commander-table .ct-dialog.ct-counter-dialog .ct-tools>.ct-menu-category{grid-area:auto;}
#commander-table .ct-dialog.ct-counter-dialog .ct-tools>button{width:100%;height:100%;min-height:0;flex-direction:column;font-size:clamp(calc(11px*var(--menu-unit)),calc(var(--menu-width)*.018),20px);gap:4px;}
#commander-table .ct-dialog.ct-counter-dialog .ct-tools>button svg{width:clamp(calc(20px*var(--menu-unit)),calc(var(--menu-height)*.07),38px);height:clamp(calc(20px*var(--menu-unit)),calc(var(--menu-height)*.07),38px);}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-states{align-items:stretch;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-status{display:block;min-height:0;height:100%;}
#commander-table .ct-dialog.ct-counter-dialog .ct-tools .ct-menu-state{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;gap:3px;padding:2px;white-space:normal;}
#commander-table .ct-dialog.ct-counter-dialog .ct-menu-state svg{width:clamp(calc(20px*var(--menu-unit)),calc(var(--menu-height)*.12),68px);height:clamp(calc(20px*var(--menu-unit)),calc(var(--menu-height)*.12),68px);max-width:80%;max-height:60%;flex-shrink:1;}
#commander-table .ct-dialog.ct-counter-dialog .ct-status-name{width:100%;height:auto;font-size:var(--menu-font);line-height:1.1;}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=narrow]{--menu-footer:clamp(112px,calc(var(--menu-height)*.32),208px);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=narrow] .ct-menu-categories{grid-template-columns:2fr 1fr;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-areas:"progress poison" "resources resources";gap:calc(var(--menu-gap) + var(--menu-heading)*.5);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=narrow] #ct-poison-list{grid-template-rows:minmax(0,1fr);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=narrow] .ct-tools{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1.5fr) minmax(0,1fr);gap:calc(var(--menu-gap) + 4px);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=narrow] .ct-tools>.ct-menu-category{grid-column:1/-1;grid-row:1;}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-layout=narrow] .ct-tools>button{grid-row:2;flex-direction:row;}

#commander-table .ct-dialog.ct-counter-dialog[data-menu-dense=true] .ct-counter-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-dense=true] .ct-counter-caption .ct-counter-symbol{width:100%;height:100%;}
#commander-table .ct-dialog.ct-counter-dialog[data-menu-dense=true] .ct-counter-symbol svg{width:var(--menu-caption);height:var(--menu-caption);max-width:100%;}

/* The free halves change life; explicit actions and damage fields stay above them. */
#commander-table .ct-panel>.ct-life-hitareas{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr;z-index:1;}
#commander-table .ct-panel>.ct-life-hitareas>[data-life]{width:100%;height:100%;min-width:0;min-height:0;padding:0 24px;background:transparent;border:0;border-radius:0;text-align:left;font-size:24px;touch-action:none;}
#commander-table .ct-panel>.ct-life-hitareas>[data-d="1"]{text-align:right;}
#commander-table .ct-panel>.ct-life{pointer-events:none;z-index:2;}
#commander-table .ct-panel>.ct-handle{z-index:4;}
#commander-table .ct-panel>.ct-tableau-bottom{pointer-events:none;z-index:2;}
#commander-table .ct-panel .ct-seat-damages{pointer-events:auto;}
#commander-table .ct-panel>.ct-head,#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-panel>.ct-head{grid-template-columns:60px minmax(0,1fr) 180px;}
#commander-table .ct-panel>.ct-head>.ct-name-status{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-column:3;grid-row:1;width:180px;height:88px;min-width:0;gap:4px;align-self:start;margin:0;}
#commander-table .ct-panel>.ct-head .ct-monarch,#commander-table .ct-panel>.ct-head .ct-initiative-slot,#commander-table .ct-panel>.ct-head .ct-initiative-slot button{width:88px;min-width:0;max-width:none;height:88px;min-height:0;padding:2px;flex-basis:auto;}
#commander-table .ct-panel>.ct-head .ct-monarch{grid-column:2;grid-row:1;}
#commander-table .ct-panel>.ct-head .ct-initiative-slot{grid-column:1;grid-row:1;}
#commander-table .ct-panel>.ct-head .ct-name-status svg{width:44px;height:44px;}
#commander-table[data-tableau=duel] .ct-panel>.ct-head{grid-template-columns:minmax(0,1fr) 180px;}
#commander-table[data-tableau=duel] .ct-panel>.ct-head>.ct-name-status{grid-column:2;}
#commander-table .ct-panel .ct-tableau-bottom>.ct-foot{height:36px;width:min(224px,100%);align-self:end;pointer-events:none;}
#commander-table .ct-panel .ct-tableau-bottom .ct-pinned{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:36px;gap:4px;}
#commander-table .ct-panel .ct-tableau-bottom .ct-quick-resource{height:36px;pointer-events:none;align-self:end;border:0;border-radius:8px;container-type:inline-size;}
#commander-table .ct-panel .ct-counter-indicator{display:flex;justify-content:center;align-items:center;gap:5px;min-width:0;height:36px;padding:4px;font-size:16px;line-height:1;pointer-events:none;background:var(--ct-control-surface);border-radius:8px;}
#commander-table .ct-panel .ct-counter-indicator svg{width:22px;height:22px;flex:none;}
#commander-table .ct-panel .ct-quick-resource .ct-counter-indicator{width:100%;}
@container (max-width:48px){
  #commander-table .ct-panel .ct-quick-resource .ct-counter-indicator{flex-direction:column;gap:0;padding:1px;font-size:12px;}
  #commander-table .ct-panel .ct-quick-resource .ct-counter-indicator svg{width:min(22px,calc(100cqw - 2px));height:min(22px,calc(100cqw - 2px));}
}
#commander-table .ct-panel .ct-tableau-statuses{height:36px;width:min(120px,100%);align-self:end;justify-self:end;display:block;pointer-events:none;}
#commander-table .ct-panel .ct-tableau-statuses>.ct-progress-tax{display:flex;justify-content:flex-end;gap:4px;height:36px;}

/* The board retains its portrait frame at the physical phone edges. */
#commander-table .ct-safe-area{position:absolute;visibility:hidden;pointer-events:none;width:0;height:0;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);}
#commander-table[data-phone-table][data-screen=tracker]{min-height:0;border-radius:0;}
#commander-table .ct-phone-frame{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(var(--phone-frame-angle));transform-origin:center;background:#000;}
#commander-table .ct-phone-table{position:absolute;transform:translate(-50%,-50%) rotate(var(--phone-angle));transform-origin:center;}
#commander-table:not([data-screen=tracker]) .ct-phone-frame{display:none;}
#commander-table[data-phone-table] .ct-phone-table>.ct-grid{position:absolute;margin:0;padding:0;gap:4px;transform:none;}
#commander-table[data-phone-table] .ct-table-layout{grid-template-rows:var(--tableau-height) var(--tableau-height);}
#commander-table[data-phone-table] .ct-table-layout>.ct-bank:nth-of-type(2){grid-row:2;}
#commander-table[data-phone-table] .ct-table-layout>.ct-seat[data-side=true]{grid-row:1/3;}
/* Keep the game and its navigation black, including the iPhone system margins. */
html:has(#commander-table[data-screen=tracker]),body:has(#commander-table[data-screen=tracker]){background:#050509;}
#commander-table[data-screen=tracker]{background:#050509;--ct-bg:#000;color-scheme:dark!important;}
#commander-table .ct-bar{background:#050509;color:#F1F2FA;--bar-surface:#000;--bar-frame:#3D4767;}
#commander-table .ct-grid .ct-bar{--bar-surface:#000;--bar-frame:#3D4767;}
#commander-table .ct-bar::before,#commander-table .ct-bar::after{display:none;background:none;animation:none;}

/* Tableau markers use two thirds of their former dimensions. */
#commander-table .ct-panel{--ct-tableau-marker-size:58.667px;}
#commander-table .ct-panel>.ct-head,#commander-table .ct-table-layout>.ct-seat[data-side=true] .ct-panel>.ct-head{top:16px;height:70.667px;grid-template-columns:58.667px minmax(0,1fr) 121.334px;grid-template-rows:58.667px;}
#commander-table .ct-panel>.ct-head>.ct-shared-tax{width:58.667px;min-width:58.667px;height:58.667px;min-height:58.667px;margin-top:0;}
#commander-table .ct-panel>.ct-head>.ct-person{margin-top:12px;}
#commander-table .ct-panel[data-status-edge=left]>.ct-head{grid-template-columns:121.334px minmax(0,1fr) 58.667px;}
#commander-table .ct-panel[data-status-edge=left]>.ct-head>.ct-shared-tax{grid-column:3;}
#commander-table .ct-panel[data-status-edge=left]>.ct-head>.ct-name-status{grid-column:1;}
#commander-table .ct-panel[data-status-edge=left]>.ct-head .ct-monarch{grid-column:1;}
#commander-table .ct-panel[data-status-edge=left]>.ct-head .ct-initiative-slot{grid-column:2;}
#commander-table .ct-panel[data-status-edge=left]>.ct-head .ct-commander{text-align:right;}
#commander-table .ct-panel .ct-shared-tax strong.ct-tax-display{font-size:14.667px;line-height:17.333px;}
#commander-table .ct-panel .ct-shared-tax .ct-tax-display small{font-size:13.333px;}
#commander-table .ct-panel .ct-shared-tax-paired strong.ct-tax-display{font-size:14.667px;line-height:15px;min-height:0;}
#commander-table .ct-panel .ct-shared-tax-paired .ct-tax-display small{font-size:9px;line-height:10px;}
#commander-table .ct-panel>.ct-head>.ct-name-status{width:121.334px;height:58.667px;}
#commander-table .ct-panel>.ct-head .ct-monarch,#commander-table .ct-panel>.ct-head .ct-initiative-slot,#commander-table .ct-panel>.ct-head .ct-initiative-slot button{width:58.667px;height:58.667px;min-height:0;}
#commander-table .ct-panel>.ct-head .ct-name-status svg{width:29.333px;height:29.333px;}
#commander-table .ct-panel>.ct-head .ct-initiative-slot{padding:0;}
#commander-table[data-tableau=duel] .ct-panel>.ct-head{grid-template-columns:minmax(0,1fr) 121.334px;}
#commander-table[data-tableau=duel] .ct-panel[data-status-edge=left]>.ct-head{grid-template-columns:121.334px minmax(0,1fr);}
#commander-table .ct-panel>.ct-head>.ct-person:has(.ct-commander-pair:not([hidden])),#commander-table .ct-panel>.ct-head>.ct-person>.ct-commander-pair:not([hidden]){height:58.667px;}
#commander-table .ct-panel>.ct-head>.ct-person>.ct-commander-pair:not([hidden]){padding:3px 0;}
#commander-table .ct-commander-pair .ct-partner-name>span{padding:2px 7px;}

/* Poison owns the lower right corner; progress stays beside commander damage. */
#commander-table .ct-panel .ct-tableau-statuses{position:relative;container-type:inline-size;display:grid;grid-template-columns:minmax(0,1fr) 58.667px;grid-template-rows:minmax(0,1fr);align-items:end;gap:8px;width:100%;height:58.667px;}
#commander-table .ct-panel .ct-tableau-statuses:not(:has(.ct-tableau-poison)){grid-template-columns:minmax(0,1fr);}
#commander-table .ct-panel .ct-tableau-statuses>.ct-progress-tax{grid-column:1;grid-row:1;align-self:end;width:100%;max-width:100%;height:36px;display:flex;align-items:end;justify-content:flex-start;gap:4px;}
#commander-table .ct-panel .ct-tableau-statuses .ct-counter-indicator{flex:1;min-width:0;max-width:50px;padding:2px;font-size:14px;gap:2px;}
#commander-table .ct-panel .ct-tableau-statuses .ct-counter-indicator svg{width:18px;height:18px;flex-shrink:1;}
#commander-table .ct-panel .ct-tableau-poison{grid-column:2;grid-row:1;align-self:end;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:58.667px;height:58.667px;min-height:58.667px;padding:4px;pointer-events:auto;border:1px solid var(--ct-line);border-radius:8px;background:var(--ct-control-surface);color:var(--ct-ink);font-size:18px;line-height:1;touch-action:none;}
#commander-table .ct-panel .ct-tableau-poison svg{width:27px;height:27px;}
@container (max-width:125px){
  #commander-table .ct-panel .ct-tableau-statuses:has(.ct-tableau-poison)>.ct-progress-tax{position:absolute;left:0;bottom:calc(58.667px + 4px);width:min(64px,100%);height:32px;}
  #commander-table .ct-panel .ct-tableau-statuses .ct-counter-indicator{flex-direction:column;height:32px;gap:0;padding:0;font-size:11px;}
  #commander-table .ct-panel .ct-tableau-statuses .ct-counter-indicator svg{width:18px;height:18px;flex:none;}
}

#commander-table .ct-bar #ct-global-tools .ct-random-icon{position:relative;display:block;width:36px;height:36px;max-width:100%;max-height:100%;flex:none;}
#commander-table .ct-bar #ct-global-tools .ct-random-icon>svg{display:block;position:absolute;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);margin:0;}
#commander-table .ct-bar #ct-global-tools .ct-random-icon>svg.ct-random-icon-back{width:36px;height:36px;opacity:.32;stroke-width:1.5;}
#commander-table .ct-bar #ct-global-tools .ct-random-icon>svg.ct-random-icon-front{width:26px;height:26px;opacity:1;filter:drop-shadow(0 0 2px #000);}
#commander-table[data-phone-table] .ct-bar #ct-global-tools .ct-random-icon{width:40px;height:40px;}
#commander-table[data-phone-table] .ct-bar #ct-global-tools .ct-random-icon>svg.ct-random-icon-back{width:40px;height:40px;}
#commander-table[data-phone-table] .ct-bar #ct-global-tools .ct-random-icon>svg.ct-random-icon-front{width:30px;height:30px;}
#commander-table .ct-settings-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 20px;}
#commander-table .ct-settings-actions button{min-height:48px;padding:10px;}

/* Commander with two seats: one damage row at the tableau's lower edge. */
#commander-table .ct-panel:has(.ct-tableau-art){overflow:hidden;}
#commander-table[data-duel-commander=true] .ct-panel>.ct-tableau-bottom{height:var(--ct-damage-height);min-height:var(--ct-damage-height);}
#commander-table[data-duel-commander=true] .ct-tableau-bottom>.ct-seat-damages{align-self:end;}
#commander-table[data-duel-commander=true] .ct-panel>.ct-life .ct-number{display:flex;align-items:center;justify-content:center;}

/* Three seats, with extra space at the end and equally sized self controls. */
#commander-table .ct-table-layout.ct-three-player{grid-template-columns:0 minmax(0,1fr) var(--three-seat-width,33%);}
#commander-table .ct-table-layout.ct-three-player>.ct-seat[data-side=true] .ct-panel{height:var(--three-seat-width,33%);--ct-damage-height:66px;}
#commander-table .ct-three-player .ct-panel>.ct-life .ct-number{display:flex;align-items:center;justify-content:center;}
#commander-table .ct-three-player .ct-tableau-bottom>.ct-seat-damages[data-seat-map=true]{grid-template-columns:var(--damage-map-columns);grid-template-rows:var(--damage-map-rows);}
#commander-table .ct-three-player>.ct-seat[data-side=true] .ct-panel>.ct-tableau-bottom{grid-template-columns:minmax(0,1fr) var(--three-damage-self-width,1.2fr) minmax(0,1fr);}

/* Five seats give the end tableau a third more height (210 -> 280). */
#commander-table .ct-table-layout.ct-five-player{grid-template-columns:0 minmax(0,1fr) 280px;}
#commander-table .ct-table-layout.ct-five-player>.ct-seat[data-side=true] .ct-panel{height:280px;}

/* From five seats onward, the half-size map opens one shared damage editor. */
#commander-table[data-damage-overview=true] .ct-panel>.ct-tableau-bottom{height:max(58.667px,calc((var(--ct-damage-height)*var(--damage-rows) + 4px*(var(--damage-rows) - 1))/2));min-height:0;}
#commander-table[data-damage-overview=true] .ct-panel>.ct-life .ct-number{display:flex;align-items:center;justify-content:center;}
#commander-table .ct-panel>.ct-tableau-bottom>.ct-seat-damages[data-damage-overview=true]{position:relative;width:50%;height:calc((var(--ct-damage-height)*var(--damage-rows) + 4px*(var(--damage-rows) - 1))/2);justify-self:center;align-self:end;gap:2px;grid-template-columns:repeat(var(--damage-columns),minmax(0,1fr));grid-template-rows:repeat(var(--damage-rows),minmax(0,1fr));}
#commander-table .ct-panel>.ct-tableau-bottom>.ct-seat-damages[data-damage-overview=true][data-seat-map=true]{height:calc(var(--ct-damage-height) + 2px);grid-template-columns:var(--damage-map-columns);grid-template-rows:var(--damage-map-rows);}
#commander-table [data-damage-overview=true]>.ct-damage-seat{pointer-events:none;}
#commander-table [data-damage-overview=true] .ct-damage,#commander-table [data-damage-overview=true] .ct-damage-self{background:var(--ct-control-surface);color:var(--ct-ink);pointer-events:none;}
#commander-table [data-damage-overview=true] .ct-damage b{pointer-events:none;}
#commander-table [data-damage-overview=true] .ct-damage em{font-size:7px;top:1px;left:2px;}
#commander-table [data-damage-overview=true] .ct-damage-self svg,#commander-table [data-damage-overview=true] .ct-damage-ally svg{width:15px;height:15px;}
#commander-table .ct-panel .ct-damage-open{position:absolute;inset:0;z-index:3;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;pointer-events:auto;}
#commander-table .ct-panel .ct-damage-open:focus-visible{outline:2px solid var(--ct-accent);outline-offset:3px;}
/* Anchor progress to the actual miniature, including when Poison is pinned. */
#commander-table[data-damage-overview=true] .ct-panel .ct-tableau-statuses{position:absolute;grid-column:auto;grid-row:auto;left:var(--ct-overview-right);right:0;bottom:0;width:auto;height:var(--ct-overview-height);gap:4px;align-items:center;justify-self:stretch;}
#commander-table[data-damage-overview=true] .ct-panel .ct-tableau-statuses>.ct-progress-tax{position:static;left:auto;right:auto;bottom:auto;width:100%;height:32px;align-self:center;align-items:center;justify-content:flex-start;}
#commander-table[data-damage-overview=true] .ct-panel .ct-tableau-statuses .ct-counter-indicator{flex:1;width:0;max-width:28px;height:32px;flex-direction:column;gap:0;padding:0;font-size:11px;}
#commander-table[data-damage-overview=true] .ct-panel .ct-tableau-statuses .ct-counter-indicator svg{width:min(18px,100%);height:18px;flex:none;}
@container (max-width:145px){
  #commander-table[data-duel-commander=true] .ct-panel .ct-tableau-statuses:has(.ct-tableau-poison)>.ct-progress-tax{position:absolute;left:auto;right:0;bottom:calc(58.667px + 4px);width:58.667px;height:32px;}
  #commander-table[data-duel-commander=true] .ct-panel .ct-tableau-statuses:has(.ct-tableau-poison) .ct-counter-indicator{flex-direction:column;height:32px;gap:0;padding:0;font-size:11px;}
  #commander-table[data-duel-commander=true] .ct-panel .ct-tableau-statuses:has(.ct-tableau-poison) .ct-counter-indicator svg{width:18px;height:18px;flex:none;}
}

/* Non-Commander boards: upper statuses, centred life and one lower indicator row. */
#commander-table[data-tableau=duel] .ct-panel>.ct-life{position:absolute;grid-area:auto;inset:0;display:flex;height:auto;margin:0;padding:0;}
#commander-table[data-tableau=duel] .ct-panel>.ct-life .ct-number{display:flex;align-items:center;justify-content:center;top:0;bottom:0;}
#commander-table[data-tableau=duel] .ct-panel>.ct-noncommander-bottom{position:absolute;grid-area:auto;left:16px;right:16px;bottom:16px;display:block;height:58.667px;min-height:0;margin:0;padding:0;}
#commander-table .ct-noncommander-icons{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-wrap:nowrap;align-items:center;gap:4px;height:44px;width:max-content;}
#commander-table .ct-noncommander-icons :is(.ct-quick-resource,.ct-progress-tax){display:contents;}
#commander-table .ct-panel .ct-noncommander-bottom .ct-counter-indicator{position:relative;inset:auto;display:grid;grid-template-rows:26px 12px;justify-items:center;align-items:center;gap:2px;flex:none;width:var(--ct-duel-icon-width,44px);min-width:0;max-width:none;height:44px;min-height:44px;padding:2px 0;margin:0;border-radius:8px;font-size:12px;line-height:12px;box-sizing:border-box;}
#commander-table .ct-panel .ct-noncommander-bottom .ct-counter-indicator>svg{grid-row:1;width:min(26px,calc(var(--ct-duel-icon-width,44px) - 4px));height:26px;max-width:100%;margin:0;}
#commander-table .ct-noncommander-bottom .ct-counter-value{grid-row:2;}
#commander-table .ct-panel .ct-noncommander-bottom button{pointer-events:auto;}
#commander-table .ct-panel .ct-noncommander-bottom>button.ct-tableau-poison{position:absolute;left:auto;right:0;top:0;bottom:auto;padding:2px;}
#commander-table .ct-panel .ct-noncommander-bottom>.ct-tableau-poison svg{width:29.333px;height:29.333px;flex:none;}
#commander-table #ct-lobby .ct-legality-shortcut{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 14px;font-size:14px;line-height:1.15;text-align:center;min-width:110px;}
#commander-table #ct-lobby .ct-legality-shortcut[hidden]{display:none;}
#commander-table #ct-lobby .ct-legality-shortcut>small{font-size:11px;line-height:1.1;}
#commander-table #ct-lobby :is(.ct-deck-detail-heading,.ct-builder-heading){position:relative;display:grid;grid-template-columns:minmax(252px,1fr) minmax(0,1.5fr) minmax(252px,1fr);align-items:center;gap:16px;min-height:44px;}
#commander-table:has(.ct-app-nav) #ct-lobby :is(.ct-deck-detail-heading,.ct-builder-heading)>.ct-page-title-row{position:static;grid-column:2;grid-row:1;justify-self:center;width:100%;max-width:none;margin:0;}
#commander-table:has(.ct-app-nav) #ct-lobby :is(.ct-deck-detail-heading,.ct-builder-heading)>.ct-page-title-row>.ct-back{left:0;right:auto;}
@media(min-width:761px) and (max-width:1100px){
  #commander-table #ct-lobby :is(.ct-deck-detail-heading,.ct-builder-heading){grid-template-columns:minmax(200px,1fr) minmax(0,1.5fr) minmax(200px,1fr);gap:12px;}
}
@media(max-width:760px){
  #commander-table #ct-lobby :is(.ct-deck-detail-heading,.ct-builder-heading){grid-template-columns:minmax(0,1fr);gap:12px;}
  #commander-table:has(.ct-app-nav) #ct-lobby :is(.ct-deck-detail-heading,.ct-builder-heading)>.ct-page-title-row{position:relative;grid-column:1;width:calc(100% - 124px);min-height:44px;display:grid;align-items:center;}
  #commander-table:has(.ct-app-nav) #ct-lobby :is(.ct-deck-detail-heading,.ct-builder-heading)>.ct-page-title-row>.ct-back{left:-62px;}
}
/* Rules: direct search, compact topics and a distraction-free reading column. */
#commander-table #ct-lobby .ct-rules-top{padding:0 0 16px;border-bottom:1px solid var(--ct-line);}
#commander-table .ct-rules-heading{position:relative;min-height:44px;margin:8px 0 20px;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-rules-heading>.ct-page-title-row{width:calc(100% - 124px);max-width:none;min-height:44px;margin:0 auto;display:grid;place-items:center;}
#commander-table:has(.ct-app-nav) #ct-lobby .ct-rules-heading .ct-back{left:-62px;right:auto;}
#commander-table #ct-lobby #ct-rule-language{position:absolute;right:0;top:0;float:none;width:44px;height:44px;min-height:44px;margin:0;padding:0;font-size:13px;}
#commander-table .ct-rule-search-row{position:relative;display:block;margin:0;}
#commander-table #ct-lobby #ct-rule-search{height:48px;padding:10px 48px 10px 12px;font-size:16px;background:var(--ct-panel);border:1px solid var(--ct-muted);}
#commander-table #ct-lobby #ct-rule-clear{position:absolute;right:2px;top:2px;width:44px;height:44px;min-height:44px;margin:0;padding:0;background:transparent;border:0;}
#commander-table .ct-rule-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px;}
#commander-table #ct-lobby .ct-rule-shortcuts button{min-width:0;min-height:44px;padding:8px 4px;font-size:13px;}
#commander-table .ct-rules-layout{margin-top:14px;gap:20px;align-items:start;}
#commander-table .ct-rules-layout:has(#ct-rule-content[hidden]){grid-template-columns:minmax(0,1fr);}
#commander-table .ct-rule-topics{min-width:0;}
#commander-table .ct-rule-topics>summary,#commander-table .ct-rule-source-details>summary{min-height:44px;padding:10px 0;cursor:pointer;font-weight:600;box-sizing:border-box;}
#commander-table .ct-rule-navigation{max-height:none;overflow:visible;}
#commander-table .ct-rule-navigation details{border-bottom:1px solid var(--ct-line);padding:0;}
#commander-table .ct-rule-navigation summary{padding:12px 0;font-size:15px;}
#commander-table #ct-lobby .ct-rule-navigation button{min-height:44px;margin:0;padding:10px 8px;font-size:14px;border:0;border-radius:8px;}
#commander-table .ct-rule-navigation button:hover{background:var(--ct-button);}
#commander-table .ct-rule-letters{display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:4px;padding-bottom:8px;}
#commander-table #ct-lobby .ct-rule-letters button{padding:8px;text-align:center;background:var(--ct-panel);}
#commander-table #ct-lobby #ct-rule-content h2{font-size:22px;text-align:left;margin-bottom:14px;}
#commander-table #ct-rule-content{scroll-margin-top:calc(var(--ct-menu-safe-top,0px) + 12px);}
#commander-table #ct-rule-content[hidden]{display:none;}
#commander-table .ct-rule-text{font-size:16px;line-height:1.6;}
#commander-table .ct-rule-entry{padding:12px;margin:8px 0;border-color:var(--ct-line);}
#commander-table .ct-rule-entry summary{font-size:15px;line-height:1.5;}
#commander-table .ct-rule-results{gap:6px;}
#commander-table .ct-rule-results>button{padding:12px;gap:4px;}
#commander-table .ct-rule-results strong{font-size:15px;line-height:1.4;}
#commander-table .ct-rule-results span{font-size:14px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
#commander-table .ct-rule-result-count{font-size:13px;margin:0 0 10px;color:var(--ct-muted);}
#commander-table .ct-rule-source-details{margin-top:20px;border-top:1px solid var(--ct-line);color:var(--ct-muted);font-size:12px;}
#commander-table .ct-rule-footer{margin-top:0;padding-top:0;border:0;}
@media(max-width:760px){
 #commander-table .ct-rules-layout{grid-template-columns:minmax(0,1fr);gap:10px;}
 #commander-table .ct-rules-searching #ct-rule-content{grid-row:auto;}
 #commander-table #ct-lobby .ct-rule-shortcuts button{font-size:12px;}
 #commander-table #ct-lobby #ct-rule-content h2{font-size:20px;}
 #commander-table .ct-rule-topics>summary{padding-block:8px;}
}

/* Compact deck lifecycle controls and immutable historical lists. */
#commander-table .ct-deck-detail-footer{flex-wrap:wrap;gap:12px;}
#commander-table .ct-deck-management{display:flex;flex-wrap:wrap;gap:8px;margin-right:auto;}
#commander-table .ct-deck-management-status:empty{display:none;}
#commander-table .ct-decks-page>#ct-deck-archive{margin-top:20px;}
.ct-deck-version-dialog{width:min(720px,calc(100vw - 32px));text-align:left;box-sizing:border-box;}
.ct-deck-version-dialog h2{padding-right:32px;text-align:center;}
.ct-version-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:16px 0;}
.ct-version-list{display:grid;gap:8px;}
.ct-version-list button{display:grid;gap:4px;text-align:left;min-height:64px;}
.ct-version-rows{padding:0;list-style:none;}
.ct-version-rows li{display:grid;grid-template-columns:3ch minmax(0,1fr) auto;gap:10px;padding:8px 0;border-bottom:1px solid #7883A855;overflow-wrap:anywhere;}
.ct-version-rows small{font-size:12px;max-width:14ch;}
@media(max-width:600px){#commander-table .ct-deck-management{display:grid;grid-template-columns:1fr 1fr;width:100%;}#commander-table .ct-deck-management button{min-height:44px;}.ct-deck-version-dialog{padding:16px;}}

/* AP08: compact, shared statistics; board layouts are unaffected. */
#commander-table .ct-evaluation{margin:24px 0;border:1px solid var(--ct-line);border-radius:16px;padding:16px;background:var(--ct-panel);}
#commander-table .ct-evaluation summary{cursor:pointer;min-height:36px;font-weight:650;}
#commander-table .ct-evaluation-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:12px 0;}
#commander-table .ct-evaluation-controls label{display:grid;gap:6px;min-width:0;}
#commander-table .ct-evaluation select,#commander-table .ct-evaluation input{width:100%;min-width:0;box-sizing:border-box;background:var(--ct-panel);color:var(--ct-ink);border:1px solid var(--ct-line);border-radius:10px;padding:10px;min-height:44px;font:inherit;}
#commander-table .ct-evaluation h3{text-align:center;}
#commander-table .ct-stat-basis{font-size:14px;line-height:1.5;color:var(--ct-muted);}
#commander-table .ct-evaluation-group ul{list-style:none;margin:0;padding:0;}
#commander-table .ct-evaluation-group li{display:flex;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid var(--ct-line);}
#commander-table .ct-evaluation-group li>div{flex:1;min-width:0;overflow-wrap:anywhere;}
#commander-table .ct-evaluation-group small{display:block;font-size:14px;line-height:1.5;margin-top:4px;}
#commander-table .ct-evaluation-group button{min-width:44px;min-height:44px;}
#commander-table .ct-match-links,.ct-match-games{display:grid;gap:10px;margin:16px 0;}
.ct-match-dialog{width:min(680px,calc(100vw - 32px));box-sizing:border-box;}
.ct-match-dialog h2{text-align:center;padding-right:24px;}
.ct-match-dialog form>label{display:grid;gap:8px;}
.ct-match-dialog select{max-width:100%;background:#101A36;color:#F1F2FA;border:1px solid #7883A8;border-radius:10px;padding:10px;min-height:44px;font:inherit;}
.ct-match-games label{display:flex;gap:12px;align-items:center;min-height:44px;}
.ct-match-games input{width:22px;height:22px;flex-shrink:0;}
@media(max-width:600px){#commander-table .ct-evaluation{padding:12px;}#commander-table .ct-evaluation-controls{grid-template-columns:1fr 1fr;gap:8px;}#commander-table .ct-evaluation select{font-size:14px;}.ct-match-dialog{padding:18px;}#commander-table .ct-evaluation-summary p{overflow-wrap:anywhere;}}
/* AP09/AP10: compact provenance and session editing controls; board layouts unchanged. */
#commander-table .ct-format-basis,#commander-table .ct-format-matrix{margin-block:1rem;border:1px solid var(--ct-line);border-radius:16px;padding:12px 16px;background:var(--ct-panel);overflow-wrap:anywhere}
#commander-table .ct-format-basis summary,#commander-table .ct-format-matrix summary{cursor:pointer;min-height:28px;line-height:1.5;font-weight:600}
#commander-table .ct-format-basis p,#commander-table .ct-format-matrix p{font-size:.9rem;line-height:1.5}
#commander-table .ct-format-basis a,#commander-table .ct-format-matrix a{color:var(--ct-ink);text-decoration:underline}
#commander-table .ct-format-matrix article{padding-block:12px;border-top:1px solid var(--ct-line)}
#commander-table .ct-format-matrix h3{text-align:left;margin:0;font-size:1rem}
@media(max-width:600px){#commander-table .ct-format-basis,#commander-table .ct-format-matrix{padding:12px}}
/* Deck search on phones: expand each filter beneath its own heading. */
#commander-table[data-device-view=smartphone] .ct-builder .ct-search-advanced{grid-template-columns:minmax(0,1fr);}
#commander-table[data-device-view=smartphone] .ct-builder .ct-search-filter-panel{order:0;}
#commander-table[data-device-view=smartphone] .ct-builder .ct-search-filter-tab{scroll-margin-top:calc(var(--ct-menu-safe-top,0px) + 16px);}

/* Keep browser scroll anchoring from fighting coordinated disclosure motion. */
html:has(.ct-disclosure-moving),.ct-disclosure-moving,.ct-disclosure-moving *{overflow-anchor:none;}
#commander-table [data-format-toggle] svg{transition:transform .4s ease;}
@media(prefers-reduced-motion:reduce){#commander-table [data-format-toggle] svg,#commander-table .ct-search-filter-tab>svg{transition:none;}}
/* Physical collection and explicit deck assignments. */
.ct-inventory-dialog{width:min(680px,calc(100vw - 24px));max-height:85dvh;overflow:auto;}
.ct-inventory summary,.ct-stock-tools>summary{cursor:pointer;padding:14px 0;min-height:44px;box-sizing:border-box;}
.ct-inventory summary strong,.ct-inventory summary span{display:block;}
.ct-inventory summary span,.ct-inventory small,.ct-inventory-note{font-size:13px;color:var(--ct-muted,#BDC4DF);}
.ct-inventory-group{border-bottom:1px solid var(--ct-line,#1C2949);}
.ct-inventory form{display:flex;align-items:end;gap:10px;margin:12px 0;}
.ct-inventory form label{flex:1;min-width:0;}.ct-inventory small{display:block;margin:4px 0;}
.ct-inventory input{box-sizing:border-box;width:100%;min-height:44px;}
.ct-inventory button,.ct-stock-tools button{min-height:44px;}
.ct-stock-tools{margin-top:24px;}.ct-stock-actions{display:flex;flex-wrap:wrap;gap:10px;}
.ct-stock-import{display:flex;flex-direction:column;gap:6px;max-width:100%;}.ct-stock-import input{max-width:100%;}
.ct-stock-reservation{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:12px 0;}
@media(min-width:701px){#commander-table .ct-builder-nav{grid-template-columns:repeat(6,minmax(0,1fr));}}
.ct-offline-page{max-width:760px;margin:auto;}.ct-offline-page>header{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:10px;}.ct-offline-page>header h1{text-align:center;}
.ct-offline-page.op-offline-modern{min-width:0;color:#f1f2fa;font-size:16px;line-height:1.45;}
.op-offline-modern .ct-offline-content{min-width:0;}
.op-offline-modern .ct-offline-summary{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:start;gap:14px;margin:0 0 16px;min-width:0;}
.op-offline-modern .ct-offline-summary:not(:has(>.ct-offline-summary-icon)){grid-template-columns:minmax(0,1fr);}
.op-offline-modern .ct-offline-summary-icon{display:grid;place-items:center;width:48px;height:48px;color:#e5c84a;}
.op-offline-modern .ct-offline-summary-icon>svg{display:block;width:40px;height:48px;fill:none;stroke-width:1.7;}
.op-offline-modern .ct-offline-summary-text{min-width:0;}
.op-offline-modern .ct-offline-state{margin:0;color:#e5c84a;font-size:22px;font-weight:650;line-height:1.25;text-align:left;}
.op-offline-modern .ct-offline-summary-text>p{margin:8px 0 0;font-size:15px;line-height:1.45;}
.op-offline-modern .ct-offline-summary-text>.ct-offline-size{display:block;margin-top:8px;color:#bdc4df;font-size:13px;line-height:1.4;}
.op-offline-modern :is(p,li){overflow-wrap:anywhere;}
.op-offline-modern button{box-sizing:border-box;min-height:44px;max-width:100%;margin:0;padding:10px 12px;border:1px solid #7883a866;border-radius:12px;font:600 15px/1.35 "Exo 2",system-ui,sans-serif;cursor:pointer;white-space:normal;overflow-wrap:anywhere;}
.op-offline-modern button:disabled{opacity:.5;cursor:default;}
.op-offline-modern .ct-offline-primary{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:48px;margin:0;padding:11px 14px;border-color:#e5c84a;background:#29291f;color:#e5c84a;font-size:16px;}
.op-offline-modern .ct-offline-primary>svg{display:block;flex:none;width:23px;height:23px;fill:none;stroke-width:1.8;}
.op-offline-modern .ct-offline-primary{position:relative;isolation:isolate;overflow:hidden;}
.op-offline-modern .ct-offline-progress-fill{position:absolute;inset:0 auto 0 0;width:0;z-index:-1;background:rgba(229,200,74,.24);pointer-events:none;transition:width .18s ease;}
.op-offline-modern .ct-offline-primary[aria-busy=true],.op-offline-modern .ct-offline-primary[data-progress-state=ready]{opacity:1;}
.op-offline-modern .ct-offline-primary[data-progress-state=checking] .ct-offline-progress-fill,.op-offline-modern .ct-offline-primary[data-progress-state=verifying] .ct-offline-progress-fill{width:35%;animation:ct-offline-progress-sweep 1.6s ease-in-out infinite;}
.op-offline-modern .ct-offline-primary[data-progress-state=ready] .ct-offline-progress-fill{background:#e5c84a;}
.op-offline-modern .ct-offline-primary[data-progress-state=ready]>svg,.op-offline-modern .ct-offline-primary[data-progress-state=ready]>.ct-offline-progress-label{color:#11142b;-webkit-text-fill-color:currentColor;}
@keyframes ct-offline-progress-sweep{from{transform:translateX(-100%);}to{transform:translateX(290%);}}
@media(prefers-reduced-motion:reduce){.op-offline-modern .ct-offline-progress-fill{transition:none;}.op-offline-modern .ct-offline-primary[data-progress-state=checking] .ct-offline-progress-fill,.op-offline-modern .ct-offline-primary[data-progress-state=verifying] .ct-offline-progress-fill{animation:none;transform:translateX(90%);}}
@media(forced-colors:active){.op-offline-modern .ct-offline-progress-fill{background:Highlight;forced-color-adjust:none;}.op-offline-modern .ct-offline-primary[data-progress-state=ready] .ct-offline-progress-fill{background:Highlight;}.op-offline-modern .ct-offline-primary[data-progress-state=ready]>svg,.op-offline-modern .ct-offline-primary[data-progress-state=ready]>.ct-offline-progress-label{color:HighlightText;}}
.op-offline-modern .ct-offline-update-note{margin:8px 0 14px;color:#bdc4df;text-align:center;font-size:13px;line-height:1.4;}
.op-offline-modern .ct-offline-downloads-title{margin:18px 0 2px;font-size:18px;font-weight:650;line-height:1.35;text-align:left;}
.op-offline-modern .ct-offline-downloads{display:grid;min-width:0;}
.op-offline-modern .ct-offline-download{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:10px 12px;box-sizing:border-box;min-width:0;min-height:88px;margin:0;padding:10px 0;border:0;border-radius:0;background:none;}
.op-offline-modern .ct-offline-download+.ct-offline-download{border-top:1px solid #7883a84d;}
.op-offline-modern .ct-offline-download-icon{display:grid;place-items:center;width:28px;height:32px;}
.op-offline-modern .ct-offline-download-icon>svg{display:block;width:28px;height:28px;fill:none;stroke-width:1.7;}
.op-offline-modern .ct-offline-download-copy{min-width:0;}
.op-offline-modern .ct-offline-download-copy>h4{margin:0;color:#f1f2fa;font-size:16px;font-weight:600;line-height:1.35;overflow-wrap:anywhere;}
.op-offline-modern .ct-offline-download-copy>p{margin:3px 0 0;color:#bdc4df;font-size:13px;line-height:1.4;}
.op-offline-modern .ct-offline-download-copy>.ct-offline-download-meta{display:block;margin-top:4px;color:#bdc4df;font-size:12px;line-height:1.4;}
.op-offline-modern .ct-offline-download-action{min-width:88px;max-width:none;min-height:44px;padding:9px 10px;border-color:#e5c84a;background:transparent;color:#e5c84a;font-size:14px;white-space:nowrap;overflow-wrap:normal;word-break:normal;}
.op-offline-modern .ct-offline-remove{grid-column:2/-1;justify-self:start;min-height:44px;margin:0;padding:8px 10px;font-size:13px;}
.op-offline-modern .ct-offline-prerequisite{margin:12px 0 0;padding:10px 12px;border:1px solid #e5c84a66;border-radius:10px;color:#e5c84a;background:#29291f;font-size:13px;line-height:1.45;}
.op-offline-modern .ct-offline-explanation{margin-top:12px;border:1px solid #7883a866;border-radius:12px;background:#232837;}
.op-offline-modern .ct-offline-explanation>summary{display:grid;grid-template-columns:20px minmax(0,1fr) 10px;align-items:center;gap:10px;box-sizing:border-box;min-height:48px;padding:12px;list-style:none;cursor:pointer;font-size:14px;line-height:1.4;}
.op-offline-modern .ct-offline-explanation>summary::-webkit-details-marker{display:none;}
.op-offline-modern .ct-offline-explanation>summary>svg{display:block;width:20px;height:20px;fill:none;stroke-width:1.8;}
.op-offline-modern .ct-offline-explanation>summary::after{content:"";width:7px;height:7px;justify-self:center;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:rotate(45deg);}
.op-offline-modern .ct-offline-explanation[open]>summary::after{transform:rotate(225deg);}
.op-offline-modern .ct-offline-explanation>p{margin:0;padding:0 12px 12px;color:#bdc4df;font-size:13px;line-height:1.5;}
.op-offline-modern .ct-offline-explanation>div{padding:0 12px 12px;}
.op-offline-modern .ct-offline-explanation>div>p{margin:8px 0 0;color:#bdc4df;font-size:13px;line-height:1.5;}
.op-offline-modern .ct-offline-feedback{margin:14px 0 0;color:#bdc4df;font-size:14px;line-height:1.45;}
.op-offline-modern .ct-offline-feedback[role=alert]{padding:10px 12px;border:1px solid #b57a4c;border-radius:10px;background:#60351e;color:#ffe0b2;}
.op-offline-modern .ct-offline-feedback:empty,.op-offline-modern [hidden]{display:none!important;}
.op-offline-modern :is(button,summary):focus-visible{outline:2px solid #e5c84a;outline-offset:-2px;}
@media(max-width:360px),(max-height:440px){.op-offline-modern .ct-offline-summary{grid-template-columns:42px minmax(0,1fr);gap:10px;}.op-offline-modern .ct-offline-summary-icon{width:42px;height:44px;}.op-offline-modern .ct-offline-summary-icon>svg{width:36px;height:44px;}.op-offline-modern .ct-offline-state{font-size:20px;}.op-offline-modern .ct-offline-download{grid-template-columns:24px minmax(0,1fr) auto;gap:8px;}.op-offline-modern .ct-offline-download-icon,.op-offline-modern .ct-offline-download-icon>svg{width:24px;}.op-offline-modern .ct-offline-download-action{min-width:82px;padding-inline:8px;font-size:13px;}}
@media(forced-colors:active){.op-offline-modern :is(.ct-offline-state,.ct-offline-summary-icon,.ct-offline-summary-text>.ct-offline-size,.ct-offline-download-copy>p,.ct-offline-download-meta,.ct-offline-update-note,.ct-offline-feedback){color:CanvasText;}.op-offline-modern .ct-offline-prerequisite,.op-offline-modern .ct-offline-explanation,.op-offline-modern .ct-offline-feedback[role=alert]{background:Canvas;color:CanvasText;border-color:ButtonText;}.op-offline-modern .ct-offline-explanation>p,.op-offline-modern .ct-offline-explanation>div>p{color:CanvasText;}}
.ct-inventory h2{text-align:center;}.ct-inventory-group>summary{display:grid;grid-template-columns:14px minmax(0,1fr);gap:4px 8px;list-style:none;}.ct-inventory-group>summary::-webkit-details-marker{display:none;}.ct-inventory-group>summary::before{content:'›';grid-column:1;grid-row:1/3;align-self:center;font-size:22px;transition:transform .4s ease;}.ct-inventory-group[open]>summary::before{transform:rotate(90deg);}.ct-inventory-group>summary>strong,.ct-inventory-group>summary>span{grid-column:2;}
@media(max-width:700px){#commander-table .ct-builder-nav{grid-template-columns:repeat(3,minmax(0,1fr));}#commander-table #ct-lobby .ct-builder-nav button{padding:6px 3px;min-height:44px;}}
@media(max-width:350px){#commander-table #ct-lobby .ct-builder-nav button{font-size:11px;}}
@media(prefers-reduced-motion:reduce){.ct-inventory-group>summary::before{transition:none;}}

.ct-inventory-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0;} .ct-inventory-actions button{flex:1 1 180px;} .ct-inventory-dialog h2{text-align:center;} .ct-deck-delete-dialog select{box-sizing:border-box;width:100%;min-height:44px;margin:8px 0 18px;}

#commander-table .ct-profile-game-heading{display:flex;align-items:center;gap:14px;margin:24px 0 12px;}
#commander-table .ct-profile-game-heading h2{margin:0;}
#commander-table .ct-profile-game-heading .ct-back{position:static;flex:none;margin:0;}
#commander-table .ct-notifications-preview{max-width:720px;padding:24px;border:1px solid var(--ct-line);border-radius:18px;background:var(--ct-panel);}
#commander-table .ct-notifications-preview h2{margin-top:0;}
#commander-table .ct-notifications-preview ul{list-style:none;padding:0;display:grid;gap:22px;margin:24px 0;}
#commander-table .ct-notifications-preview li{display:grid;gap:6px;}
#commander-table .ct-notifications-preview li span,#commander-table .ct-notifications-preview>p{color:var(--ct-muted);line-height:1.5;}
#commander-table[data-device-view="smartphone"] #ct-notifications>span{hyphens:manual;overflow-wrap:normal;}
/* Commander damage strip and radial player-menu trigger. */
#commander-table .ct-panel>.ct-head{height:var(--ct-top-control-size,58.667px);grid-template-rows:var(--ct-top-control-size,58.667px)}
#commander-table[data-tableau=commander] .ct-panel>.ct-head{display:flex;justify-content:space-between;align-items:flex-start;gap:4px}
#commander-table .ct-panel>.ct-head>.ct-shared-tax{width:var(--ct-top-control-size);min-width:var(--ct-top-control-size);height:var(--ct-top-control-size);min-height:0;flex:none}
#commander-table .ct-panel>.ct-head>.ct-name-status{width:calc(var(--ct-top-control-size)*2 + 4px);height:var(--ct-top-control-size);margin-left:auto}
#commander-table .ct-panel>.ct-head .ct-monarch,#commander-table .ct-panel>.ct-head .ct-initiative-slot,#commander-table .ct-panel>.ct-head .ct-initiative-slot button{width:var(--ct-top-control-size);min-width:0;height:var(--ct-top-control-size);min-height:0;flex-basis:var(--ct-top-control-size)}
#commander-table .ct-panel>.ct-head .ct-name-status svg{width:min(29px,var(--ct-top-control-size));height:min(29px,var(--ct-top-control-size))}
#commander-table .ct-panel .ct-head>.ct-damage-strip{position:absolute;left:50%;top:0;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:4px;width:max-content;height:var(--ct-top-control-size);min-height:0;margin:0;padding:0;pointer-events:auto}
#commander-table .ct-damage-strip>.ct-damage-seat{width:var(--ct-top-control-size);height:var(--ct-top-control-size);flex:none}
#commander-table .ct-damage-strip .ct-damage-seat>.ct-damage,#commander-table .ct-damage-strip .ct-damage-self{background:color-mix(in srgb,var(--damage-source-color) 23%,#101a36);border:1px solid color-mix(in srgb,var(--damage-source-color) 65%,transparent);color:#fff;touch-action:none}
#commander-table .ct-damage-strip .ct-damage-pair>.ct-damage{background:transparent;border-color:color-mix(in srgb,var(--damage-source-color) 45%,transparent)}
#commander-table .ct-damage-strip .ct-damage-self{flex-direction:column;gap:1px;user-select:none;-webkit-user-select:none}
#commander-table .ct-damage-strip .ct-damage-self svg{width:40%;height:40%;flex-shrink:1}
#commander-table .ct-panel>.ct-tableau-bottom,#commander-table[data-damage-overview=true] .ct-panel>.ct-tableau-bottom,#commander-table[data-duel-commander=true] .ct-panel>.ct-tableau-bottom{display:grid;grid-template-columns:minmax(0,1fr) var(--ct-damage-height,66px) minmax(0,1fr);grid-template-rows:minmax(0,1fr);align-items:end;gap:12px;height:max(66px,var(--ct-damage-height));min-height:0}
#commander-table .ct-tableau-bottom>.ct-player-menu-trigger{position:relative;inset:auto;grid-column:2;grid-row:1;justify-self:center;align-self:end;transform:none;width:var(--ct-top-control-size,58.667px);height:var(--ct-top-control-size,58.667px);min-height:0;min-width:0;border-radius:50%;padding:0;display:grid;place-items:center;background:#1c2949cc;border:1px solid #7861b580;z-index:4;touch-action:none;overflow:visible}
#commander-table .ct-player-menu-trigger::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,var(--ct-menu-hit-size,44px));height:max(100%,var(--ct-menu-hit-size,44px));border-radius:8px}
#commander-table .ct-player-menu-trigger .ct-menu-six{display:grid;grid-template-columns:repeat(3,5px);grid-template-rows:repeat(2,5px);gap:3px;position:static;transform:none;width:auto;height:auto;background:none;border:0;border-radius:0}
#commander-table .ct-menu-six>span{display:block;width:5px;height:5px;background:#f1f2fa;border-radius:1px}
#commander-table .ct-tableau-bottom>.ct-foot{grid-column:1;width:100%}
#commander-table .ct-tableau-bottom>.ct-tableau-statuses{grid-column:3;width:100%;min-width:0}
#commander-table .ct-tableau-bottom .ct-pinned{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
#commander-table .ct-tableau-bottom [data-resource-slot="2"]{grid-column:1;grid-row:2}
#commander-table .ct-tableau-bottom [data-resource-slot="3"]{grid-column:2;grid-row:2}
#commander-table .ct-noncommander-bottom>.ct-noncommander-icons{grid-column:1;grid-row:1;min-width:0;width:100%;flex-wrap:wrap}
#commander-table .ct-noncommander-bottom>.ct-tableau-poison{position:static;grid-column:3;grid-row:1;justify-self:end}
.ct-damage-drag-line{position:fixed;inset:0;width:100vw;height:100dvh;overflow:visible;z-index:10000;pointer-events:none;filter:drop-shadow(0 0 4px #0009)}
.ct-damage-drag-line line{animation:ct-damage-dashes .65s linear infinite}
#commander-table .ct-damage-drop-target>.ct-panel{outline:3px solid #e5c84aaa;outline-offset:-4px}
#commander-table #ct-assign-damage{display:grid;gap:16px}
#commander-table #ct-assign-damage label{display:grid;gap:8px}
@keyframes ct-damage-dashes{to{stroke-dashoffset:-30}}
@media(prefers-reduced-motion:reduce){.ct-damage-drag-line line{animation:none}}
#commander-table .ct-tableau-bottom>.ct-player-menu-trigger{pointer-events:auto}
#commander-table .ct-panel .ct-tableau-bottom>.ct-foot{height:100%;width:100%}
#commander-table .ct-panel .ct-tableau-bottom .ct-pinned{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:4px}
#commander-table .ct-panel .ct-tableau-bottom .ct-quick-resource{height:100%;max-height:36px}
#commander-table .ct-panel>.ct-head>.ct-shared-tax{margin:0}
#commander-table .ct-panel .ct-damage-strip .ct-damage-seat>.ct-damage,#commander-table .ct-panel .ct-damage-strip .ct-damage-self{background:color-mix(in srgb,var(--damage-source-color) 28%,transparent)}
.ct-damage-drag-line line{animation:var(--drag-animation,ct-damage-dashes .65s linear infinite)}
@media(prefers-reduced-motion:reduce){.ct-damage-drag-line line{animation:none}}
/* Inset damage backing, layered symbols and seat-local dialogs. */
#commander-table .ct-panel .ct-head>.ct-damage-strip{isolation:isolate}
#commander-table .ct-damage-strip::before{content:"";position:absolute;inset:-5px;border-radius:10px;background:var(--ct-control-surface);border:1px solid var(--ct-line);z-index:-1;pointer-events:none}
#commander-table .ct-damage-strip .ct-damage-self{position:relative;overflow:visible}
#commander-table .ct-damage-strip .ct-damage-self svg:first-child{position:absolute;width:43%;height:43%;left:9%;top:13%;transform:rotate(-35deg);opacity:.8}
#commander-table .ct-damage-strip .ct-damage-self svg:last-child{position:absolute;width:80%;height:80%;right:2%;bottom:1%;z-index:1;filter:drop-shadow(0 1px 2px #101a36)}
#commander-table .ct-player-menu-trigger .ct-menu-six{grid-template-columns:repeat(3,7px);grid-template-rows:repeat(2,7px);gap:3px}
#commander-table .ct-menu-six>span{width:7px;height:7px}
#commander-table .ct-seat-swap-target>.ct-panel{outline:3px solid #e5c84a;outline-offset:-5px}
#commander-table .ct-dialog.ct-player-dialog{box-sizing:border-box;overflow:auto;padding:16px;transform:translate(-50%,-50%) rotate(var(--dialog-angle,0deg));border-radius:12px}
#commander-table .ct-player-dialog #ct-assign-damage{gap:12px}
#commander-table #ct-damage-amount{box-sizing:border-box;width:100%;min-height:86px;text-align:center;font-size:48px;padding:12px;border:1px solid #e5c84a80;border-radius:12px;background:#111a4a;color:#e5c84a}
/* Equal bottom controls: resources left, progress and poison right. */
#commander-table .ct-panel>.ct-tableau-bottom{--ct-bottom-control-size:min(58.667px,calc((100cqw - 110px)/8))}
#commander-table .ct-panel{container-type:inline-size}
#commander-table .ct-panel .ct-tableau-bottom>.ct-foot{height:var(--ct-bottom-control-size);width:100%;align-self:end}
#commander-table .ct-panel .ct-tableau-bottom .ct-pinned{display:flex;justify-content:flex-start;align-items:end;gap:6px;height:var(--ct-bottom-control-size)}
#commander-table .ct-panel .ct-tableau-bottom .ct-quick-resource{flex:0 0 var(--ct-bottom-control-size);width:var(--ct-bottom-control-size);height:var(--ct-bottom-control-size);max-height:none;pointer-events:auto;overflow:visible}
#commander-table .ct-panel .ct-tableau-bottom .ct-counter-indicator{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:3px;width:var(--ct-bottom-control-size);min-width:0;max-width:none;height:var(--ct-bottom-control-size);min-height:0;margin:0;pointer-events:auto;touch-action:none;border:1px solid var(--ct-line);border-radius:8px;background:var(--ct-control-surface);color:var(--ct-ink);font-size:16px;flex:none}
#commander-table .ct-panel .ct-tableau-bottom .ct-counter-indicator svg{width:45%;height:45%;flex:none}
#commander-table .ct-panel .ct-tableau-bottom>.ct-tableau-statuses{display:flex;align-items:end;justify-content:flex-end;gap:12px;height:var(--ct-bottom-control-size);width:100%;container-type:normal}
#commander-table .ct-panel .ct-tableau-statuses>.ct-progress-tax{display:flex;justify-content:flex-end;align-items:end;gap:6px;width:auto;max-width:none;height:var(--ct-bottom-control-size);flex:none}
#commander-table .ct-panel .ct-tableau-bottom .ct-tableau-poison{box-sizing:border-box;width:var(--ct-bottom-control-size);height:var(--ct-bottom-control-size);min-height:0;min-width:0;flex:none;padding:3px}
#commander-table .ct-panel .ct-tableau-bottom .ct-tableau-poison svg{width:45%;height:45%}
#commander-table .ct-panel>.ct-head>.ct-shared-tax{touch-action:none}
#commander-table .ct-panel>.ct-tableau-bottom{--ct-bottom-control-size:min(58.667px,calc((100cqw - 180px)/8))}
#commander-table .ct-panel .ct-tableau-bottom>.ct-foot,#commander-table .ct-panel .ct-tableau-bottom>.ct-tableau-statuses{min-width:0;max-width:100%}
#commander-table[data-damage-overview] .ct-panel .ct-tableau-bottom>.ct-tableau-statuses{position:relative;inset:auto;grid-column:3;grid-row:1;width:100%;transform:none}
#commander-table .ct-panel>.ct-tableau-bottom{--ct-bottom-control-size:inherit}

/* Deck stock shortcut and standard collection folders. */
#commander-table #ct-lobby button.ct-deck-stock-icon{flex:none;box-sizing:border-box;width:68px;min-width:68px;height:46px;min-height:46px;padding:5px;margin:0;color:#a4a8b6;border:1px solid #7883a860;background:#101a3680;border-radius:12px;}
#commander-table #ct-lobby button.ct-deck-stock-icon.is-complete{color:#e5c84a;border-color:#e5c84a90;}
#commander-table #ct-lobby button.ct-deck-stock-icon svg{display:block;width:100%;height:100%;color:inherit;}
#commander-table #ct-lobby .ct-builder-title{display:grid;grid-template-columns:minmax(0,1fr);gap:4px 10px;}
#commander-table #ct-lobby .ct-builder-title>.ct-builder-name{grid-column:1;grid-row:1;min-width:0;width:100%;}
#commander-table #ct-lobby .ct-builder-name strong{flex:1;}
#commander-table #ct-lobby .ct-builder-title>span{grid-column:1;grid-row:2;}
#commander-table #ct-lobby .ct-wantslist-open{display:block;width:100%;box-sizing:border-box;margin:16px 0 0;min-height:48px;}
.ct-inventory-dialog .ct-inventory-actions{display:grid;grid-template-columns:minmax(0,1fr);}
.ct-inventory-dialog [data-release-deck]{width:100%;margin-top:24px;}
.ct-inventory-available[hidden]{display:none;}
.ct-trade-offer{padding:14px;margin:12px 0;border:1px solid #7883a860;border-radius:12px;overflow-wrap:anywhere;}
.ct-trade-offer label{display:flex;align-items:center;gap:12px;}
.ct-trade-offer input{width:72px;min-width:0;box-sizing:border-box;}
.ct-trade-offer button{margin-top:12px;}
/* Card artwork uses app gestures instead of the operating system's image menu. */
body{-webkit-touch-callout:none;}
input,textarea,[contenteditable=true]{-webkit-touch-callout:default;}
img,svg image,[role=img]{-webkit-user-drag:none;user-select:none;-webkit-user-select:none;}
.ct-deck-card,.ct-card-tile,.ct-card-list-row,.ct-history-entry{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:pan-y;}
.ct-delete-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:48px!important;min-width:48px!important;height:48px!important;padding:10px!important;border:1px solid #ef6677!important;border-radius:12px!important;background:#812237!important;color:#fff!important;}
.ct-delete-icon svg{display:block;width:28px;height:28px;flex:none;}
.ct-edit-card-actions{display:flex;align-items:stretch;gap:10px;min-width:0;}
.ct-edit-card-actions :is(#ct-edit-card-art,#ct-want-art){flex:1;min-width:0;}
.ct-delete-ready{position:relative;}
.ct-hold-delete{position:absolute;top:6px;right:6px;z-index:3;box-shadow:0 3px 12px #0008;}
#commander-table #ct-lobby .ct-collection-card-actions>#ct-owned-delete{min-width:0;width:100%;padding:8px 4px;min-height:44px;font-size:clamp(10px,3.05vw,14px);white-space:nowrap;line-height:1.2;background:#a8273b;color:#fff;border:1px solid #ef6677;}
#commander-table #ct-lobby .ct-collection-card-actions>[hidden]{display:none!important;}
#commander-table .ct-history-entry{position:relative;border-radius:14px;}
#commander-table .ct-history-entry>[data-history-id]{width:100%;min-height:90px;}
#commander-table .ct-history-delete-ready{background:#942438;box-shadow:inset 0 0 0 2px #ed6478;}
#commander-table .ct-history-delete-ready>[data-history-id]{opacity:.24;}
#commander-table .ct-history-delete-ready>.ct-hold-delete{top:50%;left:50%;right:auto;transform:translate(-50%,-50%);width:56px!important;height:56px!important;}
.ct-history-delete-status{font-size:14px;line-height:1.4;}

/* Intake destinations share one safe dialog: fixed heading/actions, scrolling targets. */
.ct-save-safe-probe{position:fixed;inset:0;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);box-sizing:border-box;}
.ct-collection-dialog.ct-card-dialog.ct-save-destination-dialog,.ct-collection-dialog.ct-card-dialog.ct-intake-new-deck{--ct-save-area-top:var(--ct-save-safe-top,env(safe-area-inset-top,0px));--ct-save-area-height:var(--ct-save-safe-height,calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));box-sizing:border-box;inset:calc(var(--ct-save-area-top) + 12px) calc(env(safe-area-inset-right,0px) + 12px) calc(100dvh - var(--ct-save-area-top) - var(--ct-save-area-height) + 12px) calc(env(safe-area-inset-left,0px) + 12px);width:min(560px,calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px));max-width:none;max-height:max(0px,calc(var(--ct-save-area-height) - 24px));margin:auto;padding:16px;border-radius:24px;overflow:hidden;text-align:left;font-family:"Exo 2",ui-sans-serif,system-ui,sans-serif;line-height:1.4;scroll-padding:0;}
.ct-collection-dialog.ct-card-dialog.ct-save-destination-dialog[open]{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;grid-auto-rows:auto;gap:14px;height:min(680px,max(0px,calc(var(--ct-save-area-height) - 24px)));}
.ct-save-destination-dialog>.ct-card-close,.ct-intake-new-deck>.ct-card-close{position:absolute;float:none;inset:16px 16px auto auto;display:grid;place-items:center;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;z-index:2;border-radius:12px;font-size:26px;line-height:1;}
.ct-save-destination-dialog .ct-save-heading,.ct-intake-new-deck>h2{min-width:0;margin:0;padding:0 56px 0 0;}
.ct-save-destination-dialog .ct-save-heading h2,.ct-collection-dialog.ct-card-dialog.ct-intake-new-deck>h2{display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;min-height:44px;margin:0;padding:0;font-size:24px;line-height:1.2;font-weight:650;text-align:left;overflow-wrap:anywhere;}
.ct-collection-dialog.ct-card-dialog.ct-intake-new-deck>h2{padding-right:56px;}
.ct-save-destination-dialog .ct-save-count{margin:3px 0 0;color:#c3c7d6;font-size:15px;line-height:1.4;overflow-wrap:anywhere;}
.ct-save-destination-dialog .ct-save-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;min-width:0;padding:4px;border:1px solid #7883a880;border-radius:14px;}
.ct-save-destination-dialog .ct-save-tabs>button{display:flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;min-width:0;min-height:44px;padding:8px;border:1px solid transparent;border-radius:10px;font-size:17px;line-height:1.3;}
.ct-save-destination-dialog .ct-save-tabs>button[aria-selected=true]{color:#e5c84a!important;border-color:#e5c84a!important;}
.ct-save-destination-dialog .ct-save-tabs :is(svg,i){flex:none;width:24px;height:24px;}
.ct-save-destination-dialog .ct-save-body{display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:2px 3px 3px 0;scroll-padding-block:4px;}
.ct-save-destination-dialog .ct-save-description,.ct-save-destination-dialog .ct-save-list-status{margin:0;color:#c3c7d6;font-size:15px;line-height:1.4;overflow-wrap:anywhere;}
.ct-save-destination-dialog .ct-save-create{display:flex;align-items:center;justify-content:flex-start;gap:10px;flex:none;box-sizing:border-box;width:100%;min-height:48px;padding:10px 12px;text-align:left;font-size:16px;line-height:1.4;border-radius:12px;}
.ct-save-destination-dialog .ct-save-create :is(svg,i){flex:none;width:26px;height:26px;color:#e5c84a;}
.ct-save-destination-dialog .ct-save-search{flex:none;width:100%;min-width:0;min-height:44px;margin:0;padding:10px 12px;border-radius:12px;}
.ct-save-destination-dialog .ct-save-targets{display:flex;flex-direction:column;gap:8px;min-width:0;}
.ct-save-destination-dialog .ct-save-target{display:grid;grid-template-columns:40px minmax(0,1fr) 24px;align-items:center;gap:10px;box-sizing:border-box;flex:none;width:100%;min-width:0;min-height:60px;margin:0;padding:10px 12px;border:1px solid #7883a880;border-radius:12px;text-align:left;color:#f1f2fa;}
.ct-save-destination-dialog .ct-save-target[aria-checked=true]{border-color:#e5c84a!important;box-shadow:inset 0 0 0 1px #e5c84a33;}
.ct-save-destination-dialog .ct-save-target-icon{display:grid;place-items:center;width:40px;min-width:0;}
.ct-save-destination-dialog .ct-save-target-icon :is(svg,i){width:26px;height:26px;}
.ct-save-destination-dialog img.ct-save-target-art{display:block;box-sizing:border-box;width:40px;height:48px;max-height:none;object-fit:cover;border-radius:7px;}
.ct-save-destination-dialog .ct-save-target-copy{display:flex;flex-direction:column;gap:3px;min-width:0;}
.ct-save-destination-dialog .ct-save-target-copy strong{display:block;min-width:0;font-size:16px;line-height:1.35;font-weight:500;white-space:normal;overflow-wrap:anywhere;}
.ct-save-destination-dialog .ct-save-target-copy small{display:block;min-width:0;margin:0;color:#b9bfd2;font-size:13px;line-height:1.35;white-space:normal;overflow-wrap:anywhere;}
.ct-save-destination-dialog .ct-save-target-check{display:block;flex:none;width:24px;height:24px;color:#e5c84a;opacity:0;}
.ct-save-destination-dialog .ct-save-target[aria-checked=true] .ct-save-target-check{opacity:1;}
.ct-save-destination-dialog .ct-save-footer,.ct-intake-new-deck .ct-save-footer{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0;padding-top:12px;border-top:1px solid #7883a860;}
.ct-save-destination-dialog .ct-save-summary{min-width:0;margin:0 0 2px;color:#c3c7d6;font-size:14px;line-height:1.4;overflow-wrap:anywhere;}
.ct-save-destination-dialog .ct-save-confirm,.ct-intake-new-deck :is(.ct-save-confirm,#ct-intake-deck-create){box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:10px 12px;border:1px solid #e5c84a;border-radius:12px;background:#e5c84a;color:#11142b;font:inherit;font-size:16px;font-weight:650;line-height:1.35;white-space:normal;overflow-wrap:anywhere;}
.ct-save-destination-dialog .ct-save-cancel,.ct-intake-new-deck .ct-save-cancel{box-sizing:border-box;min-height:44px;padding:6px 12px;border:0;border-radius:10px;background:none;box-shadow:none;color:#c3c7d6;font:inherit;line-height:1.35;}
.ct-save-destination-dialog>.ct-collection-feedback,.ct-intake-new-deck>.ct-collection-feedback{min-width:0;max-height:80px;margin:0;font-size:14px;line-height:1.4;overflow:auto;overflow-wrap:anywhere;}
.ct-save-destination-dialog>.ct-collection-feedback:empty,.ct-save-destination-dialog .ct-save-list-status:empty,.ct-intake-new-deck>.ct-collection-feedback:empty{display:none;}
.ct-save-destination-dialog .ct-save-footer>.ct-collection-feedback,.ct-intake-new-deck .ct-save-footer>.ct-collection-feedback{grid-column:1/-1;min-width:0;max-height:60px;margin:0;font-size:14px;line-height:1.4;overflow:auto;overflow-wrap:anywhere;}
.ct-save-destination-dialog .ct-save-footer>.ct-collection-feedback:empty,.ct-intake-new-deck .ct-save-footer>.ct-collection-feedback:empty{display:none;}
.ct-collection-dialog.ct-card-dialog.ct-intake-new-deck[open]{display:flex;flex-direction:column;gap:14px;height:auto;}
.ct-intake-new-deck>form{display:flex;flex-direction:column;gap:14px;min-width:0;min-height:0;margin:0;overflow:auto;overscroll-behavior:contain;scroll-padding:8px;}
.ct-intake-new-deck form label{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;font-size:15px;}
.ct-intake-new-deck :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px 12px;border-radius:12px;font:inherit;font-size:16px;}
.ct-intake-new-deck form>p{margin:0;color:#c3c7d6;font-size:14px;line-height:1.4;overflow-wrap:anywhere;}
@media(max-height:600px){.ct-collection-dialog.ct-card-dialog.ct-save-destination-dialog,.ct-collection-dialog.ct-card-dialog.ct-intake-new-deck{padding:12px;border-radius:18px;}.ct-collection-dialog.ct-card-dialog.ct-save-destination-dialog[open]{gap:6px;}.ct-save-destination-dialog>.ct-card-close,.ct-intake-new-deck>.ct-card-close{top:12px;right:12px;}.ct-save-destination-dialog .ct-save-heading h2,.ct-collection-dialog.ct-card-dialog.ct-intake-new-deck>h2{font-size:21px;}.ct-save-destination-dialog .ct-save-count{display:none;}.ct-save-destination-dialog .ct-save-tabs{padding:0;}.ct-save-destination-dialog .ct-save-footer,.ct-intake-new-deck .ct-save-footer{grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:6px;padding-top:8px;}.ct-save-destination-dialog .ct-save-summary{grid-column:1/-1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.ct-save-destination-dialog .ct-save-confirm,.ct-intake-new-deck :is(.ct-save-confirm,#ct-intake-deck-create){min-height:44px;padding:8px;font-size:14px;}.ct-save-destination-dialog .ct-save-cancel,.ct-intake-new-deck .ct-save-cancel{padding-inline:10px;}.ct-save-destination-dialog .ct-save-footer>.ct-collection-feedback,.ct-intake-new-deck .ct-save-footer>.ct-collection-feedback{max-height:40px;}}
.ct-collection-dialog.ct-card-dialog:is(.ct-save-destination-dialog,.ct-intake-new-deck)[data-save-compact=true]{padding:12px;border-radius:18px;}
.ct-collection-dialog.ct-card-dialog.ct-save-destination-dialog[data-save-compact=true][open]{gap:6px;}
:is(.ct-save-destination-dialog,.ct-intake-new-deck)[data-save-compact=true]>.ct-card-close{top:12px;right:12px;}
.ct-save-destination-dialog[data-save-compact=true] .ct-save-heading h2,.ct-collection-dialog.ct-card-dialog.ct-intake-new-deck[data-save-compact=true]>h2{font-size:21px;}
.ct-save-destination-dialog[data-save-compact=true] .ct-save-count{display:none;}
.ct-save-destination-dialog[data-save-compact=true] .ct-save-tabs{padding:0;}
:is(.ct-save-destination-dialog,.ct-intake-new-deck)[data-save-compact=true] .ct-save-footer{grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:6px;padding-top:8px;}
.ct-save-destination-dialog[data-save-compact=true] .ct-save-summary{grid-column:1/-1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ct-save-destination-dialog[data-save-compact=true] .ct-save-confirm,.ct-intake-new-deck[data-save-compact=true] :is(.ct-save-confirm,#ct-intake-deck-create){min-height:44px;padding:8px;font-size:14px;}
:is(.ct-save-destination-dialog,.ct-intake-new-deck)[data-save-compact=true] .ct-save-cancel{padding-inline:10px;}
:is(.ct-save-destination-dialog,.ct-intake-new-deck)[data-save-compact=true] .ct-save-footer>.ct-collection-feedback{max-height:40px;}
@media(forced-colors:active){.ct-save-destination-dialog .ct-save-target[aria-checked=true],.ct-save-destination-dialog .ct-save-tabs>button[aria-selected=true]{border-color:Highlight!important;color:Highlight!important;}.ct-save-destination-dialog .ct-save-target-check,.ct-save-destination-dialog .ct-save-create :is(svg,i){color:Highlight;}.ct-save-destination-dialog .ct-save-confirm,.ct-intake-new-deck :is(.ct-save-confirm,#ct-intake-deck-create){background:Highlight;color:HighlightText;border-color:ButtonText;}}

/* Collection is a page of destinations and cards. Only the bounded surfaces
   carry glass; the space between them remains part of the black page. */
#commander-table #ct-lobby .ct-collection-page.op-collection-modern{max-width:1200px;min-width:0;text-align:left;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern>.ct-page-title-row.op-collection-header{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;justify-content:start;gap:12px;box-sizing:border-box;min-height:44px;width:100%;max-width:none;margin:0 0 18px;padding:0;text-align:left;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern>.ct-page-title-row.op-collection-header>#ct-collection-back{position:static;grid-column:1;grid-row:1;justify-self:start;transform:none;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern>.ct-page-title-row.op-collection-header>h1{grid-column:2;grid-row:1;justify-self:start;min-width:0;margin:0;padding:0;text-align:left;font-size:clamp(23px,6.1vw,30px);line-height:1.2;letter-spacing:-.4px;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern #ct-add-cards{display:block;box-sizing:border-box;min-width:0;min-height:48px;width:100%;max-width:none;margin:0 0 12px;padding:10px 12px;border:1px solid #e5c84a;border-radius:12px;background:#e5c84a;color:#11142b;font-weight:600;font-size:16px;line-height:1.35;white-space:normal;}
#commander-table #ct-lobby .op-collection-modern #ct-resume-intake{box-sizing:border-box;min-height:44px;min-width:0;max-width:100%;margin:0 0 16px;padding:8px 12px;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-folders{display:block;box-sizing:border-box;min-width:0;width:100%;margin:20px 0 26px;padding:0;border:0;border-radius:0;background:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
#commander-table #ct-lobby .op-collection-modern .op-collection-folders-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;margin:0 0 12px;}
#commander-table #ct-lobby .op-collection-modern .op-collection-folders-heading>h2{flex:1;min-width:0;margin:0;text-align:left;font-size:23px;line-height:1.25;}
#commander-table #ct-lobby .op-collection-modern .op-collection-folders-heading .ct-folder-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;min-width:0;min-height:44px;width:auto;max-width:70%;margin:0;padding:0;}
#commander-table #ct-lobby .op-collection-modern .op-collection-folders-heading .ct-folder-actions>button{box-sizing:border-box;min-width:44px;min-height:44px;margin:0;padding:8px 10px;font-size:14px;line-height:1.25;white-space:normal;}
#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder-grid,.ct-folder-grid){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;width:100%;margin:0;padding:0;}
#commander-table #ct-lobby .op-collection-modern .ct-folder{position:relative;min-width:0;}
#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open){display:grid;grid-template-columns:48px minmax(0,1fr);grid-auto-rows:auto;align-content:center;align-items:center;gap:3px 10px;box-sizing:border-box;width:100%;min-width:0;min-height:110px;margin:0;padding:12px;border:1px solid #7883a880;border-radius:16px;text-align:left;white-space:normal;}
#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open)>.ct-folder-icon{grid-column:1;grid-row:1/4;display:block;width:48px;max-width:48px;height:auto;aspect-ratio:180/220;margin:0;filter:none;}
#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open)>.ct-folder-icon svg{display:block;width:100%;height:auto;aspect-ratio:180/220;}
#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open)>:is(strong,small,.op-collection-folder-copy){grid-column:2;min-width:0;margin:0;text-align:left;}
#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open) strong{font-size:15px;font-weight:550;line-height:1.35;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open) small{color:var(--ct-muted,#b9bfd2);font-size:13px;line-height:1.35;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .op-collection-folder-copy{display:flex;flex-direction:column;gap:3px;min-width:0;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-section{min-width:0;margin:20px 0 0;padding:0;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-section>h3{margin:0;text-align:left;font-size:22px;line-height:1.3;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-section>p{margin:3px 0 12px;color:var(--ct-muted,#b9bfd2);font-size:13px;line-height:1.4;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-folder{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:8px;box-sizing:border-box;min-width:0;min-height:120px;width:100%;margin:0;padding:12px;border:1px solid #7883a880;border-radius:16px;text-align:left;white-space:normal;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-folder>:is(svg,i,.op-collection-trade-icon){display:block;width:40px;height:44px;min-width:0;color:#e5c84a;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-folder .op-collection-trade-icon svg{display:block;width:100%;height:100%;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-folder .op-collection-folder-copy strong{font-size:16px;line-height:1.35;font-weight:550;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .op-collection-trade-folder :is(small,.op-collection-folder-count){display:block;margin:0;color:var(--ct-muted,#b9bfd2);font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .op-collection-match-count{display:block;margin-top:3px;color:#e5c84a;font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-controls{min-width:0;margin:0 0 18px;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern [hidden]{display:none!important;}
/* The toolbar now has its own row. Keep the legacy desktop grid from
   allocating implicit columns when this page is resized to a phone. */
#commander-table #ct-lobby .ct-collection-page.op-collection-modern .ct-collection-tools.ct-collection-controls{display:flex!important;flex-direction:column;align-items:stretch;gap:12px;width:100%;max-width:100%;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;width:100%;max-width:100%;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar>.ct-sort-pair{display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-column:auto;grid-row:auto;align-items:end;gap:8px;min-width:0;width:100%;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar>.ct-sort-pair:has(>.ct-view-toggle:not([hidden])){grid-template-columns:minmax(0,1fr) 44px 140px;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar>.ct-sort-pair>.ct-collection-search{grid-column:1/-1;grid-row:1;min-width:0;width:100%;margin:0;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar>.ct-sort-pair>label:has(#ct-collection-sort){grid-column:1;grid-row:2;min-width:0;width:100%;max-width:100%;margin:0;text-align:left;font-size:14px;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar>.ct-sort-pair>#ct-sort-reverse{grid-column:2;grid-row:2;justify-self:stretch;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar>.ct-sort-pair>.ct-view-toggle{grid-column:3;grid-row:2;justify-self:end;justify-content:center;box-sizing:border-box;min-width:0;width:140px;max-width:100%;height:44px;min-height:44px;gap:5px;margin:0;font-size:13px;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar>.ct-collection-display-controls{display:grid;grid-template-columns:minmax(0,1fr);grid-column:auto;grid-row:auto;align-items:end;align-self:stretch;gap:8px;min-width:0;width:100%;max-width:100%;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar>.ct-collection-display-controls:not(:has(>:not([hidden]))){display:none;}
#commander-table #ct-lobby .op-collection-modern .op-collection-toolbar :is(#ct-collection-sort,#ct-deck-card-filter){box-sizing:border-box;min-width:0;width:100%;max-width:100%;}
#commander-table #ct-lobby .op-collection-modern .op-collection-primary-actions{display:flex;flex-direction:column;gap:8px;min-width:0;width:100%;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-controls>.ct-pool-identity{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;width:100%;margin:0 0 4px;text-align:left;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-section-heading{margin:0;text-align:left;font-size:23px;line-height:1.3;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-totals{width:auto;justify-content:flex-start;gap:4px 8px;text-align:left;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-totals :is(#ct-visible-card-count,.ct-folder-value){text-align:left;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-controls>.ct-collection-card-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;align-self:stretch;width:100%;max-width:none;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-controls>.ct-collection-card-actions:not(:has(>:not([hidden]))){display:none;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-controls .ct-collection-card-actions>:is(#ct-add-cards,#ct-owned-select){flex:1 1 120px;min-height:44px;margin:0;}
#commander-table #ct-lobby .op-collection-modern .ct-collection-controls .ct-collection-card-actions>#ct-add-cards{margin:0;}
#commander-table #ct-lobby .op-collection-modern #ct-owned-cards:not(.ct-card-list):not(.op-wants-list){grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start;}
#commander-table #ct-lobby .op-collection-modern #ct-owned-cards:not(.ct-card-list) :is(.ct-deck-card,.ct-card-tile){min-width:0;align-self:start;}
#commander-table #ct-lobby .op-collection-modern #ct-owned-cards:not(.ct-card-list) .ct-collection-card-image{display:block;min-width:0;width:100%;height:auto;aspect-ratio:63/88;}
#commander-table #ct-lobby .op-collection-modern #ct-owned-cards:not(.ct-card-list) .ct-collection-card-image>img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:63/88;object-fit:contain;flex-shrink:0;}
/* The full printed card gets its own non-shrinking column. Offer controls
   are below the card header, so additional information never narrows its art. */
#commander-table #ct-lobby .op-collection-modern .op-wants-list{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start;min-width:0;max-width:840px;margin:0 auto;}
#commander-table #ct-lobby .op-collection-modern .op-want-card{position:relative;box-sizing:border-box;min-width:0;width:100%;padding:0;border:1px solid #7883a880;border-radius:18px;overflow:visible;}
#commander-table #ct-lobby .op-collection-modern .op-want-toggle{display:grid;grid-template-columns:124px minmax(0,1fr) 20px;align-items:start;gap:12px;box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0;padding:14px;border:0;border-radius:17px;background:none;box-shadow:none;text-align:left;color:inherit;white-space:normal;}
#commander-table #ct-lobby .op-collection-modern .op-want-card-image{display:block;box-sizing:border-box;width:124px;min-width:124px;height:auto;aspect-ratio:63/88;flex-shrink:0;align-self:start;}
#commander-table #ct-lobby .op-collection-modern .op-want-card-image img{display:block;box-sizing:border-box;width:100%;min-width:100%;height:auto;max-width:none;max-height:none;aspect-ratio:63/88;object-fit:contain;border-radius:8px;flex-shrink:0;}
#commander-table #ct-lobby .op-collection-modern .op-want-card-image .ct-missing-card{display:grid;place-items:center;min-width:0;width:100%;height:auto;aspect-ratio:63/88;padding:6px;box-sizing:border-box;}
#commander-table #ct-lobby .op-collection-modern .op-want-card-copy{display:flex;flex-direction:column;gap:8px;min-width:0;padding-top:3px;}
#commander-table #ct-lobby .op-collection-modern .op-want-card-copy :is(h3,strong){margin:0;padding:0;font-size:20px;line-height:1.3;font-weight:600;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .op-want-card-copy :is(p,small,.op-want-quantity){margin:0;padding:0;color:var(--ct-muted,#b9bfd2);font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .op-want-card-copy .op-want-match{color:#e5c84a;}
#commander-table #ct-lobby .op-collection-modern .op-want-toggle>:is(svg,i){width:20px;height:24px;max-width:100%;align-self:start;margin-top:4px;}
#commander-table #ct-lobby .op-collection-modern .op-want-chevron{display:grid;place-items:center;width:20px;height:24px;align-self:start;margin-top:4px;font-family:system-ui,sans-serif;font-size:24px;line-height:1;transform:rotate(0deg);transition:transform .18s ease;}
#commander-table #ct-lobby .op-collection-modern .op-want-toggle[aria-expanded=true]>.op-want-chevron{transform:rotate(180deg);}
#commander-table #ct-lobby .op-collection-modern .op-want-edit{display:block;box-sizing:border-box;min-width:44px;min-height:44px;max-width:calc(100% - 28px);margin:0 14px 10px auto;padding:8px 12px;border-radius:10px;font-size:14px;line-height:1.35;white-space:normal;}
#commander-table #ct-lobby .op-collection-modern .op-want-offers{box-sizing:border-box;min-width:0;width:100%;margin:0;padding:14px;border-top:1px solid #7883a860;}
#commander-table #ct-lobby .op-collection-modern .op-want-offers:empty{display:none;}
#commander-table #ct-lobby .op-collection-modern .op-want-offers :is(p,h3,h4){min-width:0;max-width:100%;margin:0 0 10px;line-height:1.45;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-choice-list{display:flex;flex-direction:column;gap:8px;min-width:0;margin:10px 0 12px;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-choice-list .ct-trade-choice{display:grid;grid-template-columns:36px minmax(0,1fr) 24px;grid-template-rows:auto auto;align-items:center;gap:3px 10px;box-sizing:border-box;width:100%;min-width:0;min-height:78px;margin:0;padding:10px;border:1px solid #7883a880;border-radius:12px;text-align:left;white-space:normal;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-avatar{grid-column:1;grid-row:1/3;display:grid;place-items:center;width:36px;height:40px;min-width:0;color:#e5c84a;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-avatar svg{display:block;width:32px;height:36px;max-width:100%;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-person{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:2px;min-width:0;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-person strong{display:block;margin:0;font-size:16px;line-height:1.35;font-weight:550;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-person small{display:block;margin:0;color:var(--ct-muted,#b9bfd2);font-size:14px;line-height:1.35;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-attributes{grid-column:2;grid-row:2;min-width:0;color:var(--ct-muted,#b9bfd2);font-size:13px;line-height:1.5;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-choice-check{grid-column:3;grid-row:1/3;display:grid;place-items:center;width:24px;height:24px;color:#e5c84a;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-choice-check svg{display:block;width:24px;height:24px;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-choice[aria-checked=true]{border-color:#e5c84a!important;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-quantity{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;min-width:0;margin:12px 0;font-size:16px;line-height:1.4;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-stepper{display:grid;grid-template-columns:repeat(3,44px);align-items:stretch;flex:none;min-width:132px;border:1px solid #7883a880;border-radius:10px;overflow:hidden;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-stepper button{display:grid;place-items:center;box-sizing:border-box;width:44px;min-width:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:0;font-size:22px;line-height:1;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-amount{display:grid;place-items:center;box-sizing:border-box;min-width:44px;min-height:44px;font-size:16px;line-height:1.4;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-request-summary{margin:0 0 10px;padding-top:10px;border-top:1px solid #7883a860;font-size:14px;line-height:1.5;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-send{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:48px;margin:0;padding:10px 12px;border:1px solid #e5c84a;border-radius:12px;background:#e5c84a;color:#11142b;font:inherit;font-size:16px;font-weight:600;line-height:1.4;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-status{margin:10px 0 0;font-size:14px;line-height:1.5;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-status:empty{display:none;}
#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open,.op-collection-trade-folder,.ct-trade-choice,.op-want-edit){background:#151c2d;color:var(--ct-ink,#f1f2fa);font-family:inherit;}
#commander-table #ct-lobby .op-collection-modern .ct-trade-stepper button{background:#151c2d;color:var(--ct-ink,#f1f2fa);}
#commander-table #ct-lobby .op-collection-modern :is(.op-wants-filters,.op-wants-toolbar,.op-wants-status){min-width:0;}
#commander-table #ct-lobby .op-collection-modern .op-wants-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px;}
#commander-table #ct-lobby .op-collection-modern .op-wants-filters>button{box-sizing:border-box;flex:1 1 120px;min-width:44px;min-height:44px;padding:8px 12px;border:1px solid #7883a880;border-radius:12px;font-size:15px;line-height:1.35;white-space:normal;}
#commander-table #ct-lobby .op-collection-modern .op-wants-status{margin:0 0 12px;color:var(--ct-muted,#b9bfd2);font-size:14px;line-height:1.5;overflow-wrap:anywhere;}
/* Selection stays beside the pool heading, or beside a folder's count.
   Matching status remains a small toolbar above the wanted cards. */
#commander-table #ct-lobby .ct-collection-page.op-collection-modern .ct-collection-controls>.ct-pool-identity>.ct-collection-section-heading{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;justify-content:stretch;gap:8px;box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin:0;text-align:left;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern .ct-collection-controls>.ct-pool-identity>.ct-collection-section-heading>#ct-pool-title{grid-column:1;grid-row:1;min-width:0;width:100%;max-width:100%;margin:0;justify-self:start;text-align:left;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern .ct-collection-controls>.ct-pool-identity #ct-owned-select{grid-column:2;grid-row:1;justify-self:end;box-sizing:border-box;min-width:44px;min-height:44px;width:auto;max-width:100%;margin:0;padding:8px 12px;font-size:14px;line-height:1.3;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern.ct-folder-detail .ct-collection-controls>.ct-pool-identity{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:8px;min-width:0;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern.ct-folder-detail .ct-collection-controls>.ct-pool-identity>.ct-collection-section-heading:empty{display:none;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern.ct-folder-detail .ct-pool-identity>.ct-collection-totals{grid-column:1;grid-row:1;min-width:0;}
#commander-table #ct-lobby .op-collection-modern .op-wants-controls{min-width:0;}
#commander-table #ct-lobby .op-collection-modern .op-wants-sync{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;min-width:0;}
#commander-table #ct-lobby .op-collection-modern .op-wants-sync>.op-wants-status{flex:1 1 170px;min-width:0;margin:0;font-size:13px;line-height:1.4;}
#commander-table #ct-lobby .op-collection-modern .op-wants-sync>#ct-wants-refresh{flex:0 0 auto;box-sizing:border-box;min-width:44px;min-height:44px;margin:0;padding:8px 12px;font-size:14px;line-height:1.3;}
#commander-table #ct-lobby .op-collection-modern.op-collection-wants .op-wants-controls~.ct-collection-filter-separator{display:none;}
#commander-table #ct-lobby .ct-collection-page.op-collection-modern.op-collection-wants .ct-collection-controls>.ct-collection-card-actions{margin-top:0;}
@media(min-width:900px){#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder-grid,.ct-folder-grid){grid-template-columns:repeat(auto-fill,minmax(220px,1fr));}#commander-table #ct-lobby .op-collection-modern .op-collection-trade-grid{grid-template-columns:repeat(2,minmax(0,360px));}#commander-table #ct-lobby .op-collection-modern #ct-owned-cards:not(.ct-card-list):not(.op-wants-list){grid-template-columns:repeat(auto-fill,minmax(190px,1fr));}#commander-table #ct-lobby .op-collection-modern .op-want-toggle{grid-template-columns:160px minmax(0,1fr) 24px;gap:18px;padding:18px;}#commander-table #ct-lobby .op-collection-modern .op-want-card-image{width:160px;min-width:160px;}}
@media(max-width:360px){#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open){grid-template-columns:38px minmax(0,1fr);gap:3px 8px;padding:10px;}#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder,.ct-folder-open)>.ct-folder-icon{width:38px;max-width:38px;}#commander-table #ct-lobby .op-collection-modern .op-collection-trade-folder{grid-template-columns:32px minmax(0,1fr);gap:8px;padding:10px;}#commander-table #ct-lobby .op-collection-modern .op-collection-trade-folder>:is(svg,i,.op-collection-trade-icon){width:32px;height:40px;}#commander-table #ct-lobby .op-collection-modern .op-want-toggle{grid-template-columns:96px minmax(0,1fr) 18px;gap:10px;padding:12px;}#commander-table #ct-lobby .op-collection-modern .op-want-card-image{width:96px;min-width:96px;}#commander-table #ct-lobby .op-collection-modern .op-want-card-copy :is(h3,strong){font-size:18px;}#commander-table #ct-lobby .op-collection-modern .op-collection-folders-heading .ct-folder-actions{gap:4px;}#commander-table #ct-lobby .op-collection-modern .op-collection-folders-heading .ct-folder-actions>button{padding-inline:7px;font-size:13px;}}
@media(max-width:290px){#commander-table #ct-lobby .op-collection-modern :is(.ct-collection-folder-grid,.ct-folder-grid,.op-collection-trade-grid){grid-template-columns:minmax(0,1fr);}#commander-table #ct-lobby .op-collection-modern .op-want-toggle{grid-template-columns:minmax(0,1fr) 20px;}#commander-table #ct-lobby .op-collection-modern .op-want-card-image{grid-column:1;grid-row:1;width:min(100%,160px);min-width:0;}#commander-table #ct-lobby .op-collection-modern .op-want-card-copy{grid-column:1/-1;grid-row:2;}#commander-table #ct-lobby .op-collection-modern .op-want-toggle>:is(svg,i,.op-want-chevron){grid-column:2;grid-row:1;}}
@media(prefers-reduced-motion:reduce){#commander-table #ct-lobby .op-collection-modern .op-want-chevron{transition:none;}}
@media(forced-colors:active){#commander-table #ct-lobby .op-collection-modern :is(#ct-add-cards,.ct-trade-send){background:Highlight;color:HighlightText;border-color:ButtonText;}#commander-table #ct-lobby .op-collection-modern :is(.ct-trade-choice[aria-checked=true],.op-wants-filters>button[aria-pressed=true]){border-color:Highlight!important;color:Highlight!important;}#commander-table #ct-lobby .op-collection-modern :is(.op-want-match,.op-collection-match-count,.ct-trade-avatar,.ct-trade-choice-check,.op-collection-trade-icon){color:CanvasText;}}

/* Deck destinations and owned decks form an open page. Only the individual
   actions, format tiles and covers carry the existing glass material. */
#commander-table #ct-lobby .ct-decks-page.op-decks-modern{min-width:0;max-width:1200px;text-align:left;}
#commander-table #ct-lobby .ct-decks-page.op-decks-modern [hidden]{display:none!important;}
#commander-table #ct-lobby .ct-decks-page.op-decks-modern>.op-decks-header.ct-page-title-row{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;justify-content:start;gap:12px;box-sizing:border-box;min-height:44px;width:100%;max-width:none;margin:0 0 20px;padding:0;text-align:left;}
#commander-table #ct-lobby .ct-decks-page.op-decks-modern>.op-decks-header.ct-page-title-row>:is(#ct-decks-back,#ct-folder-back){position:static;grid-column:1;grid-row:1;justify-self:start;transform:none;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;}
#commander-table #ct-lobby .ct-decks-page.op-decks-modern>.op-decks-header.ct-page-title-row>h1{grid-column:2;grid-row:1;justify-self:start;min-width:0;margin:0;padding:0;text-align:left;font-size:clamp(23px,6.1vw,30px);line-height:1.2;letter-spacing:-.4px;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .ct-decks-page.op-decks-modern>.op-deck-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;min-width:0;width:100%;max-width:none;margin:0 0 16px;}
#commander-table #ct-lobby .op-decks-modern>.op-deck-actions>button{display:flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;min-width:0;min-height:48px;width:100%;max-width:100%;margin:0;padding:10px 12px;border:1px solid #7883a880;border-radius:12px;background:#80808026;color:var(--ct-ink,#f1f2fa);font-family:inherit;font-size:clamp(14px,3.7vw,16px);line-height:1.35;text-align:center;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern>.op-deck-actions>button>svg{display:block;flex:0 0 20px;width:20px;height:20px;margin:0;}
#commander-table #ct-lobby .op-decks-modern>.op-deck-actions>button>span{min-width:0;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern>.op-deck-actions>#ct-create-deck{border-color:#e5c84a;background:#e5c84a;color:#11142b;font-weight:600;}
#commander-table #ct-lobby .op-decks-modern .op-decks-formats{min-width:0;margin:0 0 20px;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format-heading{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:0;min-height:44px;margin:0 0 12px;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format-heading>h2{flex:0 1 auto;min-width:0;margin:0;font-size:23px;line-height:1.3;text-align:left;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format-heading>#ct-deck-folder-settings{display:grid;place-items:center;flex:0 0 44px;grid-column:auto;grid-row:auto;justify-self:start;box-sizing:border-box;min-width:44px;max-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:0;border-radius:12px;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format-heading>#ct-deck-folder-settings svg{display:block;width:22px;height:22px;margin:0;}
#commander-table #ct-lobby .op-decks-modern .ct-deck-folders.op-decks-format-strip{display:grid;grid-auto-flow:column;grid-auto-columns:clamp(150px,calc((100% - 24px)/2.25),176px);grid-template-columns:none;align-items:stretch;gap:12px;min-width:0;width:100%;max-width:100%;margin:0;padding:0 0 8px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#7883a8 transparent;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format-strip>.op-decks-format{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;justify-content:start;gap:8px;box-sizing:border-box;min-width:0;min-height:96px;width:100%;max-width:100%;margin:0;padding:10px;border:1px solid #7883a880;border-radius:16px;background:#151c2d;color:var(--ct-ink,#f1f2fa);font-family:inherit;text-align:left;white-space:normal;scroll-snap-align:start;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format>.ct-storage-box{display:grid;place-items:center;min-width:0;width:44px;max-width:100%;height:44px;margin:0;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format>.ct-storage-box svg{display:block;min-width:0;width:100%;max-width:100%;height:100%;object-fit:contain;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format-copy{display:flex;flex-direction:column;gap:3px;min-width:0;width:100%;text-align:left;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format-copy>strong{display:block;min-width:0;margin:0;font-size:14px;font-weight:550;line-height:1.3;white-space:normal;overflow-wrap:normal;word-break:normal;}
#commander-table #ct-lobby .op-decks-modern .op-decks-format-copy>.ct-storage-box-count{display:block;min-width:0;margin:0;color:var(--ct-muted,#b9bfd2);font-size:13px;line-height:1.35;text-align:left;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-decks-owned{min-width:0;}
#commander-table #ct-lobby .op-decks-modern .op-decks-list-heading{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 12px;min-width:0;margin:0 0 14px;}
#commander-table #ct-lobby .op-decks-modern .op-decks-list-heading>h2{min-width:0;margin:0;font-size:23px;line-height:1.3;text-align:left;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-decks-list-heading>#ct-library-count{min-width:0;margin:0;color:var(--ct-muted,#b9bfd2);font-size:14px;line-height:1.4;text-align:right;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-decks-list-heading>.op-deck-archive-link{display:inline-flex;flex:0 1 auto;align-items:center;justify-content:flex-end;gap:7px;box-sizing:border-box;min-width:44px;min-height:44px;max-width:100%;margin:0 0 0 auto;padding:6px 0 6px 8px;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;color:var(--ct-ink,#f1f2fa);font-family:inherit;font-size:15px;line-height:1.35;text-align:right;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-deck-archive-link>svg{display:block;flex:0 0 20px;width:20px;height:20px;margin:0;}
#commander-table #ct-lobby .op-deck-format-page #ct-format-deck-count{min-width:0;margin:0 0 10px;color:var(--ct-muted,#b9bfd2);font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-decks-search{position:relative;display:block;box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin:0 0 16px;}
#commander-table #ct-lobby .op-decks-modern .op-decks-search>svg{position:absolute;z-index:1;display:block;left:14px;top:50%;transform:translateY(-50%);width:20px;height:20px;max-width:20px;margin:0;pointer-events:none;color:var(--ct-muted,#b9bfd2);}
#commander-table #ct-lobby .op-decks-modern :is(#ct-library-search,#ct-format-deck-search){display:block;box-sizing:border-box;min-width:0;min-height:46px;width:100%;max-width:100%;margin:0;padding:10px 44px;border:1px solid #7883a880;border-radius:12px;background:#80808026;color:var(--ct-ink,#f1f2fa);font:inherit;font-size:16px;line-height:1.4;}
#commander-table #ct-lobby .op-decks-modern .op-decks-list{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:16px;min-width:0;width:100%;}
#commander-table #ct-lobby .op-decks-modern .op-deck-preview{position:relative;box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin:0;padding:0;border:1px solid #7883a880;border-radius:18px;overflow:hidden;background:#151c2d;color:var(--ct-ink,#f1f2fa);}
#commander-table #ct-lobby .op-decks-modern .op-deck-preview-open{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:12px;box-sizing:border-box;min-width:0;min-height:44px;width:100%;max-width:100%;margin:0;padding:0;border:0;border-radius:17px;background:none;box-shadow:none;color:inherit;font-family:inherit;text-align:left;white-space:normal;}
#commander-table #ct-lobby .op-decks-modern .op-deck-cover{position:relative;display:block;grid-column:1/-1;min-width:0;width:100%;height:auto;aspect-ratio:16/9;overflow:hidden;background:#10172a;}
#commander-table #ct-lobby .op-decks-modern .op-deck-cover>img{display:block;box-sizing:border-box;min-width:0;width:100%;height:100%;max-width:100%;max-height:none;margin:0;object-fit:cover;}
#commander-table #ct-lobby .op-decks-modern .op-deck-cover>img.is-full-card{object-fit:contain;}
#commander-table #ct-lobby .op-decks-modern .op-deck-price{position:absolute;top:10px;right:10px;box-sizing:border-box;max-width:calc(100% - 20px);padding:6px 10px;border:1px solid #7883a866;border-radius:8px;background:#10131d;color:#f1f2fa;font-size:14px;font-weight:600;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;pointer-events:none;}
#commander-table #ct-lobby .op-decks-modern .op-deck-cover>.op-deck-cover-fallback{display:none;box-sizing:border-box;width:100%;height:100%;padding:20px;color:var(--ct-muted,#b9bfd2);}
#commander-table #ct-lobby .op-decks-modern .op-deck-cover.missing-image>.op-deck-cover-fallback{display:grid;place-items:center;}
#commander-table #ct-lobby .op-decks-modern .op-deck-cover-fallback svg{display:block;width:min(160px,70%);max-width:100%;height:100%;max-height:150px;}
#commander-table #ct-lobby .op-decks-modern .op-deck-copy{display:flex;flex-direction:column;grid-column:1;grid-row:2;gap:7px;min-width:0;padding:0 0 14px 14px;}
#commander-table #ct-lobby .op-decks-modern .op-deck-title{display:block;min-width:0;margin:0;font-size:21px;font-weight:600;line-height:1.3;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-deck-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 8px;min-width:0;color:var(--ct-muted,#b9bfd2);font-size:14px;line-height:1.4;}
#commander-table #ct-lobby .op-decks-modern .op-deck-format{display:inline-block;box-sizing:border-box;max-width:100%;padding:2px 7px;border:1px solid #7883a866;border-radius:6px;color:var(--ct-ink,#f1f2fa);font-size:12px;line-height:1.4;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-deck-meta>:is(.ct-deck-card-count-badge,.op-deck-card-count){position:static;display:inline-block;box-sizing:border-box;max-width:100%;margin:0;padding:2px 7px;border:1px solid #6e967e99;border-radius:6px;background:#56816633;color:var(--ct-ink,#f1f2fa);font-size:12px;font-weight:500;line-height:1.4;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-deck-commanders{min-width:0;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern .op-deck-chevron{grid-column:2;grid-row:2;align-self:center;justify-self:center;width:20px;height:24px;margin:0 12px 14px 0;flex:none;color:var(--ct-muted,#b9bfd2);}
#commander-table #ct-lobby .op-decks-modern .op-deck-credit{display:block;box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin:0;padding:0 14px 10px;color:var(--ct-muted,#b9bfd2);font-size:11px;line-height:1.4;text-align:left;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern :is(#ct-library-empty,#ct-format-decks-empty){margin:16px 0;padding:0;color:var(--ct-muted,#b9bfd2);font-size:15px;line-height:1.5;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-decks-modern :is(.op-decks-format,.op-deck-preview-open,.op-deck-archive-link):focus-visible{outline:2px solid #e5c84a;outline-offset:-3px;}
@media(min-width:760px){#commander-table #ct-lobby .op-decks-modern .op-decks-list{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:360px){#commander-table #ct-lobby .op-decks-modern>.op-deck-actions{gap:10px;}#commander-table #ct-lobby .op-decks-modern>.op-deck-actions>button{padding-inline:8px;}#commander-table #ct-lobby .op-decks-modern .op-deck-title{font-size:19px;}}
@media(forced-colors:active){#commander-table #ct-lobby .op-decks-modern>.op-deck-actions>#ct-create-deck{background:Highlight;color:HighlightText;border-color:ButtonText;}#commander-table #ct-lobby .op-decks-modern :is(.op-decks-format,.op-deck-preview,.ct-deck-card-count-badge,.op-deck-card-count){background:Canvas;color:CanvasText;border-color:ButtonText;}#commander-table #ct-lobby .op-decks-modern :is(.op-decks-format,.op-deck-preview-open,.op-deck-archive-link):focus-visible{outline-color:Highlight;}}
@media(forced-colors:active){#commander-table #ct-lobby .op-decks-modern .op-deck-price{background:Canvas;color:CanvasText;border-color:ButtonText;}}

/* The detail view keeps navigation and card controls compact, while the
   actual printed cards retain their full proportions and room to scroll. */
#commander-table #ct-lobby .ct-decks-page.op-deck-detail-modern{min-width:0;text-align:left;}
#commander-table #ct-lobby .op-deck-detail-modern [hidden]{display:none!important;}
#commander-table #ct-lobby .ct-decks-page.op-deck-detail-modern>.ct-deck-detail-heading.op-deck-detail-heading{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr) 88px;align-items:center;justify-content:start;gap:8px;box-sizing:border-box;min-height:44px;width:100%;max-width:none;margin:0 0 8px;padding:0;text-align:left;}
#commander-table #ct-lobby .ct-decks-page.op-deck-detail-modern>.ct-deck-detail-heading.op-deck-detail-heading>#ct-deck-back{position:static;grid-column:1;grid-row:1;justify-self:start;transform:none;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;}
#commander-table #ct-lobby .ct-decks-page.op-deck-detail-modern>.ct-deck-detail-heading.op-deck-detail-heading>h1{grid-column:2;grid-row:1;justify-self:start;min-width:0;width:100%;margin:0;padding:0;text-align:left;font-size:clamp(20px,5.6vw,26px);line-height:1.2;letter-spacing:-.3px;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-detail-actions{display:flex;grid-column:3;grid-row:1;align-items:center;justify-content:flex-end;gap:0;min-width:0;width:88px;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-detail-actions>button{position:relative;display:grid;place-items:center;flex:0 0 44px;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;margin:0;padding:8px;border:0;border-radius:10px;background:none;box-shadow:none;color:var(--ct-ink,#f1f2fa);}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-detail-actions>button>svg{display:block;width:26px;height:26px;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-detail-actions>.ct-deck-stock-icon.is-complete{color:#e5c84a;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-detail-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;width:100%;margin:0 0 8px;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-detail-navigation>.ct-deck-tabs{display:flex;flex:1 1 auto;align-items:stretch;gap:2px;min-width:0;width:auto;margin:0;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-tabs>button{position:relative;flex:1 1 auto;box-sizing:border-box;min-width:44px;min-height:44px;margin:0;padding:8px 4px;border:0;border-radius:0;background:none!important;box-shadow:none;color:var(--ct-ink,#f1f2fa);font-family:inherit;font-size:14px;line-height:1.2;text-align:center;white-space:nowrap;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-tabs>button[aria-selected=true]{background:none!important;color:#e5c84a!important;border-color:transparent!important;box-shadow:inset 0 -3px 0 #e5c84a;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-detail-navigation>.op-deck-help{display:inline-flex;flex:0 0 auto;flex-direction:row;align-items:center;justify-content:flex-end;gap:5px;box-sizing:border-box;min-width:44px;min-height:44px;height:44px;max-width:45%;margin:0;padding:6px 0 6px 8px;border:0;border-left:1px solid #7883a880;border-radius:0;background:none;box-shadow:none;color:var(--ct-ink,#f1f2fa);font-family:inherit;font-size:13px;line-height:1.3;text-align:center;white-space:nowrap;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-help>svg{display:block;flex:0 0 16px;width:16px;height:16px;margin:0;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-help>small{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:18px;height:18px;margin:0;padding:0 4px;border-radius:9px;background:#e5c84a;color:#11142b;font-size:11px;font-weight:600;line-height:1;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-controls.op-deck-detail-controls{display:flex;flex-direction:column;align-items:stretch;justify-content:start;gap:8px;box-sizing:border-box;min-width:0;width:100%;max-width:none;margin:0 0 8px;padding:0 0 8px;border:0;border-bottom:1px solid #7883a880;}
#commander-table #ct-lobby .op-deck-detail-modern :is(.op-deck-search-row,.op-deck-sort-row){display:grid;align-items:center;gap:8px;min-width:0;width:100%;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-search-row{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row{grid-template-columns:minmax(0,1fr) 44px 140px;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row:not(:has(>.ct-view-toggle:not([hidden]))){grid-template-columns:minmax(0,1fr) 44px;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-search-row>.ct-builder-boards{position:relative;display:block;min-width:0;width:100%;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row>label{position:relative;display:block;min-width:0;width:100%;max-width:100%;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-detail-modern :is(#ct-deck-board,#ct-deck-sort){appearance:none;-webkit-appearance:none;color-scheme:dark;box-sizing:border-box;min-width:0;width:100%;max-width:100%;height:44px;min-height:44px;margin:0;padding:8px 30px 8px 8px;background-color:#151c2d;color:var(--ct-ink,#f1f2fa);-webkit-text-fill-color:var(--ct-ink,#f1f2fa);font-size:14px;line-height:1.3;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-search-row>.ct-deck-boards::after,#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row>label:has(>#ct-deck-sort)::after{content:"";position:absolute;z-index:1;right:12px;top:50%;box-sizing:border-box;width:8px;height:8px;border:0;border-right:1.5px solid var(--ct-muted,#b9bfd2);border-bottom:1.5px solid var(--ct-muted,#b9bfd2);transform:translateY(-70%) rotate(45deg);pointer-events:none;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-search{position:relative;display:block;min-width:0;width:100%;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-search #ct-deck-search{display:block;box-sizing:border-box;min-width:0;width:100%;max-width:100%;height:44px;min-height:44px;margin:0;padding:10px 44px 10px 12px;font:inherit;font-size:16px;line-height:1.25;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-search:has(>svg) #ct-deck-search{padding-left:38px;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-search>svg{position:absolute;z-index:1;display:block;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;margin:0;color:var(--ct-muted,#b9bfd2);pointer-events:none;}
#commander-table #ct-lobby .op-deck-detail-modern #ct-deck-sort-reverse{display:grid;place-items:center;box-sizing:border-box;min-width:44px;min-height:44px;width:44px;height:44px;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-detail-modern #ct-deck-sort-reverse>svg{display:block;width:22px;height:22px;margin:0;}
#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row>.ct-view-toggle{display:flex;align-items:center;justify-content:center;gap:5px;box-sizing:border-box;min-width:0;width:140px;height:44px;min-height:44px;margin:0;padding:0 3px;border:1px solid #7883a8;border-radius:12px;font-size:13px;line-height:1.3;white-space:nowrap;}
/* Preserve the familiar thirty-pixel track inside a full touch-height control. */
#commander-table #ct-lobby .op-deck-detail-modern .ct-view-toggle>button{position:relative;display:block;flex:0 0 44px;box-sizing:border-box;min-width:44px;max-width:44px;width:44px;height:44px;min-height:44px;max-height:44px;margin:0;padding:0;border:0;background:none;box-shadow:none;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-view-toggle>button::before{content:"";position:absolute;inset:7px 0;border:1px solid #7883a8;border-radius:18px;background:#7883a855;pointer-events:none;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-view-toggle>button>span{position:absolute;display:block;left:3px;right:auto;top:11px;bottom:auto;box-sizing:border-box;width:22px;height:22px;margin:0;border-radius:50%;background:currentColor;transform:none;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-view-toggle>button[aria-checked=true]>span{left:auto;right:3px;}
#commander-table #ct-lobby .op-deck-detail-modern #ct-deck-load-status{max-width:100%;margin:0 0 8px;font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-detail-modern #ct-deck-content{min-width:0;width:100%;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-group{min-width:0;margin:16px 0 0;padding:0;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-group:first-child{margin-top:0;}
#commander-table #ct-lobby .ct-decks-page.op-deck-detail-modern .ct-deck-group>h2{min-width:0;margin:0 0 8px;font-size:22px;line-height:1.3;text-align:left;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-grid:not(.ct-card-list){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;min-width:0;margin:0;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-grid>.ct-card-tile{min-width:0;}
#commander-table #ct-lobby .op-deck-detail-modern :is([data-commander-section],.op-detail-commanders)>.ct-deck-grid:not(.ct-card-list){display:flex;flex-wrap:wrap;align-items:start;justify-content:center;gap:12px;}
#commander-table #ct-lobby .op-deck-detail-modern :is([data-commander-section],.op-detail-commanders)>.ct-deck-grid:not(.ct-card-list)>.ct-card-tile{flex:0 1 270px;min-width:0;width:100%;max-width:270px;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-grid:not(.ct-card-list) .ct-deck-card{box-sizing:border-box;min-width:0;width:100%;max-width:100%;}
#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-grid:not(.ct-card-list) .ct-deck-card>img{display:block;min-width:0;width:100%;height:auto;max-height:none;aspect-ratio:63/88;object-fit:contain;}
#commander-table #ct-lobby .op-deck-detail-modern :is(.ct-deck-tabs>button,.op-deck-help,.op-deck-detail-actions>button):focus-visible{outline:2px solid #e5c84a;outline-offset:-2px;}
@media(max-width:360px){#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row{grid-template-columns:minmax(0,1fr) 44px 124px;}#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row:not(:has(>.ct-view-toggle:not([hidden]))){grid-template-columns:minmax(0,1fr) 44px;}#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row>.ct-view-toggle{width:124px;gap:4px;font-size:12px;}#commander-table #ct-lobby .op-deck-detail-modern :is(#ct-deck-board,#ct-deck-sort){padding-inline:6px 26px;font-size:13px;}#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-tabs>button{padding-inline:3px;font-size:12px;}#commander-table #ct-lobby .op-deck-detail-modern .op-deck-detail-navigation>.op-deck-help{gap:4px;padding-left:6px;font-size:12px;}}
@media(min-width:900px){#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-group:not([data-commander-section]):not(.op-detail-commanders)>.ct-deck-grid:not(.ct-card-list){grid-template-columns:repeat(auto-fill,minmax(180px,1fr));}}
@media(forced-colors:active){#commander-table #ct-lobby .op-deck-detail-modern .ct-deck-tabs>button[aria-selected=true]{color:Highlight!important;box-shadow:none;border-bottom:3px solid Highlight!important;}#commander-table #ct-lobby .op-deck-detail-modern .op-deck-help>small{background:Highlight;color:HighlightText;}#commander-table #ct-lobby .op-deck-detail-modern :is(#ct-deck-board,#ct-deck-sort){color:CanvasText;-webkit-text-fill-color:CanvasText;}#commander-table #ct-lobby .op-deck-detail-modern .op-deck-search-row>.ct-deck-boards::after,#commander-table #ct-lobby .op-deck-detail-modern .op-deck-sort-row>label:has(>#ct-deck-sort)::after{border-color:ButtonText;}#commander-table #ct-lobby .op-deck-detail-modern .ct-view-toggle>button::before{background:Canvas;border-color:ButtonText;}#commander-table #ct-lobby .op-deck-detail-modern .ct-view-toggle>button>span{background:ButtonText;}}

/* All six builder panels share one open, compact header and rhythm. The
   bounded editing groups keep glass; the header and text tabs stay clear. */
#commander-table #ct-lobby .ct-decks-page.ct-builder.op-deck-builder-modern{min-width:0;text-align:left;}
#commander-table #ct-lobby .op-deck-builder-modern [hidden]{display:none!important;}
#commander-table #ct-lobby .op-deck-builder-modern>.ct-builder-sticky.op-builder-header-stack{position:static;box-sizing:border-box;min-width:0;width:100%;margin:0 0 12px;padding:0;border:0;border-radius:0;background:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;scroll-margin-top:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-heading.op-builder-heading{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr) 92px;align-items:center;justify-content:start;gap:8px;box-sizing:border-box;min-height:44px;width:100%;max-width:none;margin:0 0 8px;padding:0;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-heading>#ct-builder-back{position:static;grid-column:1;grid-row:1;justify-self:start;transform:none;box-sizing:border-box;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-heading>.ct-builder-title{display:grid;grid-column:2;grid-row:1;grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;width:100%;max-width:100%;margin:0;padding:0;text-align:left;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-name{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:4px;box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-name.is-editing{grid-template-columns:minmax(0,1fr) 44px 44px;width:100%;}
#commander-table #ct-lobby .ct-decks-page.ct-builder.op-deck-builder-modern .ct-builder-name h1,#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-name h1>strong{display:block;min-width:0;width:100%;margin:0;padding:0;font-size:18px;font-weight:700;line-height:1.2;text-align:left;white-space:normal;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-name>button{display:grid;place-items:center;box-sizing:border-box;min-width:44px;max-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:0;border:0;border-radius:10px;background:none;box-shadow:none;color:var(--ct-ink,#f1f2fa);}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-name>button>svg{display:block;width:20px;height:20px;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-builder-name-input{box-sizing:border-box;min-width:0;width:100%;max-width:100%;min-height:44px;height:44px;margin:0;padding:6px 8px;font-size:16px;line-height:1.3;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-title>span{min-width:0;max-width:100%;margin:0;color:var(--ct-muted,#b9bfd2);font-size:12px;line-height:1.35;text-align:left;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-heading>#ct-builder-view.op-builder-save{display:flex;grid-column:3;grid-row:1;align-items:center;justify-content:center;gap:5px;box-sizing:border-box;min-width:44px;min-height:44px;width:92px;max-width:100%;margin:0;padding:6px;border:1px solid #e5c84a;border-radius:10px;background:#e5c84a14;color:#e5c84a;font-family:inherit;font-size:13px;line-height:1.2;white-space:nowrap;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-heading.op-builder-heading:has(.ct-builder-name.is-editing){grid-template-columns:44px minmax(0,1fr);}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-heading:has(.ct-builder-name.is-editing)>#ct-builder-view.op-builder-save{grid-column:2;grid-row:2;justify-self:end;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-save>svg{display:block;flex:0 0 16px;width:16px;height:16px;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:0;min-width:0;width:100%;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-nav>button{position:relative;display:flex;align-items:center;justify-content:center;gap:5px;box-sizing:border-box;min-width:44px;min-height:44px;margin:0;padding:6px 4px;border:0;border-radius:0;background:none!important;box-shadow:none;color:var(--ct-ink,#f1f2fa);font-family:inherit;font-size:14px;line-height:1.25;white-space:normal;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-nav>button:not(:nth-child(3n)){border-right:1px solid #7883a866;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-nav>button[aria-selected=true]{border-color:#7883a866!important;background:none!important;color:#e5c84a!important;box-shadow:inset 0 -3px 0 #e5c84a;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-help-count{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;min-width:18px;height:18px;margin:0;padding:0 4px;border-radius:9px;background:#e5c84a;color:#11142b;font-size:11px;font-weight:600;line-height:1;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-status{max-width:100%;margin:8px 0 0;font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-recovery{display:flex;flex-wrap:wrap;gap:8px;min-width:0;margin:8px 0 0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-recovery>button{min-width:44px;min-height:44px;max-width:100%;white-space:normal;}
#commander-table #ct-lobby .op-deck-builder-modern>[id^=ct-build-page-]{min-width:0;max-width:100%;margin-top:0;}
#commander-table #ct-lobby .ct-decks-page.ct-builder.op-deck-builder-modern :is(h2,.op-builder-analysis-title){min-width:0;margin:0 0 12px;font-size:22px;line-height:1.3;text-align:left;overflow-wrap:anywhere;}
#commander-table #ct-lobby .ct-decks-page.ct-builder.op-deck-builder-modern h3{min-width:0;margin:14px 0 8px;font-size:16px;line-height:1.3;text-align:left;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-sort-tools.op-builder-controls{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;width:100%;max-width:100%;margin:0 0 10px;padding:0 0 8px;border:0;border-bottom:1px solid #7883a880;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-deck-tools{display:block;min-width:0;width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern :is(.op-builder-search-row,.op-builder-sort-row){display:grid;align-items:center;gap:8px;min-width:0;width:100%;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-search-row{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-sort-row{grid-template-columns:minmax(0,1fr) 44px 140px;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-search-row>.ct-builder-boards{position:relative;display:block;min-width:0;width:100%;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-sort-row>label{position:relative;display:block;min-width:0;width:100%;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern select{appearance:none;-webkit-appearance:none;color-scheme:dark;box-sizing:border-box;min-width:0;width:100%;max-width:100%;height:44px;min-height:44px;margin:0;padding:8px 30px 8px 8px;background-color:#151c2d;color:var(--ct-ink,#f1f2fa);-webkit-text-fill-color:var(--ct-ink,#f1f2fa);font-size:14px;line-height:1.3;}
#commander-table #ct-lobby .op-deck-builder-modern label:has(>select){position:relative;}
#commander-table #ct-lobby .op-deck-builder-modern label:has(>select)::after,#commander-table #ct-lobby .op-deck-builder-modern .op-builder-search-row>.ct-builder-boards::after{content:"";position:absolute;z-index:1;right:12px;bottom:18px;box-sizing:border-box;width:8px;height:8px;border:0;border-right:1.5px solid var(--ct-muted,#b9bfd2);border-bottom:1.5px solid var(--ct-muted,#b9bfd2);transform:rotate(45deg);pointer-events:none;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-search-row>.ct-collection-search{position:relative;display:block;min-width:0;width:100%;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-search-row #ct-builder-filter{display:block;box-sizing:border-box;min-width:0;width:100%;max-width:100%;height:44px;min-height:44px;margin:0;padding:10px 48px 10px 38px;font:inherit;font-size:16px;line-height:1.25;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-search-row>.ct-collection-search>svg{position:absolute;z-index:1;display:block;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;margin:0;color:var(--ct-muted,#b9bfd2);pointer-events:none;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-builder-sort-reverse{display:grid;place-items:center;box-sizing:border-box;min-width:44px;min-height:44px;width:44px;height:44px;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-builder-sort-reverse>svg{display:block;width:22px;height:22px;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-view-toggle{min-width:0;width:140px;max-width:100%;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-view-toggle>.ct-view-toggle{display:flex;align-items:center;justify-content:center;gap:5px;box-sizing:border-box;min-width:0;width:140px;height:44px;min-height:44px;margin:0;padding:0 3px;border:1px solid #7883a8;border-radius:12px;font-size:13px;line-height:1.3;white-space:nowrap;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-view-toggle>button{position:relative;display:block;flex:0 0 44px;box-sizing:border-box;min-width:44px;max-width:44px;width:44px;height:44px;min-height:44px;max-height:44px;margin:0;padding:0;border:0;background:none;box-shadow:none;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-view-toggle>button::before{content:"";position:absolute;inset:7px 0;border:1px solid #7883a8;border-radius:18px;background:#7883a855;pointer-events:none;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-view-toggle>button>span{position:absolute;display:block;left:3px;right:auto;top:11px;bottom:auto;box-sizing:border-box;width:22px;height:22px;margin:0;border-radius:50%;background:currentColor;transform:none;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-view-toggle>button[aria-checked=true]>span{left:auto;right:3px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-commanders:not(:empty){min-width:0;margin:0 0 10px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-commander-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:44px;margin:0 0 8px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-commander-heading>h2{flex:1 1 auto;min-width:0;margin:0;font-size:20px;line-height:1.3;text-align:left;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-commander-heading>.ct-builder-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:0;min-width:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-commander-heading .ct-builder-actions>button{box-sizing:border-box;min-width:44px;min-height:44px;max-width:100%;margin:0;padding:6px 8px;border:0;border-radius:0;background:none;box-shadow:none;color:var(--ct-ink,#f1f2fa);font-size:13px;line-height:1.3;white-space:normal;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-actions>[data-pick-partner]{border-left:1px solid #7883a880;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-commander-overview{display:block;min-width:0;width:100%;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-commander-cards{min-width:0;width:100%;max-width:none;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-list-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;min-width:0;margin:10px 0;padding:8px 0 0;border-top:1px solid #7883a880;}
#commander-table #ct-lobby .ct-decks-page.ct-builder.op-deck-builder-modern .op-builder-list-heading>h2{flex:1 1 140px;min-width:0;margin:0;font-size:19px;line-height:1.3;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-card-tools{display:flex;flex:0 1 auto;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;min-width:0;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-card-tools>button{box-sizing:border-box;min-width:44px;min-height:44px;max-width:100%;margin:0;padding:6px 8px;font-size:13px;line-height:1.3;white-space:normal;}
#commander-table #ct-lobby .op-deck-builder-modern [data-builder-lock]{display:grid;place-items:center;width:44px;padding:0;}
#commander-table #ct-lobby .op-deck-builder-modern [data-builder-lock]>svg{width:20px;height:20px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-card-tools>[data-builder-add]{padding-inline:4px;border:0;background:none;box-shadow:none;color:#e5c84a;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-deck-grid.ct-build-list{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list>.ct-card-tile{min-width:0;border:1px solid #7883a880;border-radius:14px;overflow:hidden;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list-row{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:8px;box-sizing:border-box;min-width:0;min-height:88px;width:100%;margin:0;padding:8px;border:0;border-radius:14px;background:none;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list-card{display:grid;grid-template-columns:56px minmax(0,1fr);grid-template-rows:auto;align-items:center;justify-content:start;gap:8px;box-sizing:border-box;min-width:0;min-height:72px;max-width:100%;width:100%;height:auto;margin:0;padding:0;border:0;border-radius:8px;background:none;box-shadow:none;text-align:left;white-space:normal;overflow:visible;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-art{display:flex;grid-column:1;grid-row:1;align-items:center;justify-content:center;flex:none;width:56px;height:72px;max-width:100%;margin:0;border-radius:8px;overflow:hidden;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-art>img{display:block;width:100%;height:100%;max-height:none;object-fit:contain;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list-info{display:flex;grid-column:2;grid-row:1;flex-direction:column;gap:3px;min-width:0;max-height:none;overflow:visible;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list-info>strong{display:block;min-width:0;margin:0;font-size:14px;line-height:1.25;white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list-info>small{display:block;min-width:0;margin:0;color:var(--ct-muted,#b9bfd2);font-size:12px;line-height:1.3;white-space:normal;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list-info>.ct-build-mana{flex-wrap:wrap;max-width:100%;overflow:visible;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list-description{display:none;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list .ct-build-row-actions{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:4px;min-width:0;width:auto;margin:0;padding:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list .ct-build-quantity{display:flex;align-items:center;justify-content:center;gap:2px;min-width:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list .ct-build-quantity>span{min-width:16px;text-align:center;font-size:14px;line-height:1.3;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list .ct-build-edit-actions{display:flex;flex-wrap:nowrap;gap:4px;min-width:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list .ct-build-row-actions button{display:grid;place-items:center;box-sizing:border-box;min-width:44px;width:44px;min-height:44px;height:44px;max-width:44px;margin:0;padding:0;border-radius:10px;font-size:20px;line-height:1;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-cards:not(.ct-build-list){grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;min-width:0;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-cards:not(.ct-build-list)>.ct-card-tile{min-width:0;border-radius:14px;overflow:hidden;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-cards:not(.ct-build-list) .ct-deck-card>img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:63/88;object-fit:contain;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-card-visual .ct-build-quantity button{min-width:44px;width:44px;min-height:44px;height:44px;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-pane-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;min-width:0;margin:0 0 12px;}
#commander-table #ct-lobby .ct-decks-page.ct-builder.op-deck-builder-modern .op-builder-pane-heading>h2{min-width:0;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern .op-builder-pane-heading>button{min-width:44px;min-height:44px;max-width:100%;margin:0;padding:6px 0 6px 8px;border:0;background:none;box-shadow:none;font-size:13px;line-height:1.3;white-space:normal;text-align:right;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-builder-plan-form{display:grid;gap:12px;min-width:0;max-width:900px;margin:0;}
#commander-table #ct-lobby .op-deck-builder-modern :is(#ct-builder-plan-form>label,#ct-builder-plan-form>.ct-build-field-pair>label,#ct-builder-plan-form>fieldset){box-sizing:border-box;min-width:0;max-width:100%;margin:0;padding:12px;border:1px solid #7883a880;border-radius:16px;background:#151c2d;font-size:14px;line-height:1.4;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-builder-plan-form label:has(>select)::after{right:24px;bottom:30px;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-builder-plan-form>.ct-build-field-pair{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-builder-plan-form :is(input:not([type=checkbox]),textarea){box-sizing:border-box;min-width:0;width:100%;max-width:100%;min-height:44px;margin:0;padding:8px;font:inherit;font-size:16px;line-height:1.4;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-builder-plan-form textarea{min-height:96px;resize:vertical;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-checks{grid-template-columns:minmax(0,1fr);gap:6px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-checks label{flex-direction:row;align-items:center;min-height:44px;max-width:100%;margin:0;padding:6px 0;border-radius:8px;background:none;font-size:14px;line-height:1.4;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-build-page-help{min-width:0;max-width:100%;margin-top:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-build-page-help>section{box-sizing:border-box;min-width:0;max-width:100%;margin:0 0 12px;padding:12px;border:1px solid #7883a880;border-radius:16px;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-builder-modern #ct-build-page-help>section>h3{margin-top:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-guidelines{gap:8px;min-width:0;margin:12px 0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-guideline{box-sizing:border-box;min-width:0;max-width:100%;padding:10px 12px;border:1px solid #7883a880;border-radius:14px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-build-guideline summary{min-height:44px;font-size:14px;line-height:1.4;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;margin:12px 0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-metrics>div{box-sizing:border-box;min-width:0;min-height:96px;gap:6px;padding:12px 8px;border-radius:16px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-metrics strong{max-width:100%;font-size:24px;line-height:1.2;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-metrics span{max-width:100%;font-size:12px;line-height:1.35;overflow-wrap:anywhere;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-charts{grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-chart{box-sizing:border-box;min-width:0;max-width:100%;padding:12px;border-radius:16px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-chart h3{margin-top:0;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-token-grid,#commander-table #ct-lobby .op-deck-builder-modern #ct-search-cards:not(.ct-card-list){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;}
#commander-table #ct-lobby .op-deck-builder-modern :is(.ct-token-grid,#ct-search-cards):not(.ct-card-list) .ct-deck-card>img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:63/88;object-fit:contain;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-token-sources{padding:8px;font-size:12px;line-height:1.4;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-search-direct{margin:0 0 12px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-search-result-tools{margin-top:0;padding-top:12px;}
#commander-table #ct-lobby .op-deck-builder-modern .ct-search-results #ct-search-status{margin:8px 0;font-size:13px;line-height:1.4;}
#commander-table #ct-lobby .op-deck-builder-modern :is(.ct-builder-nav>button,.ct-builder-name>button,.op-builder-save,.ct-builder-commander-heading button,.op-builder-pane-heading>button):focus-visible{outline:2px solid #e5c84a;outline-offset:-2px;}
@media(max-width:360px){#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-nav>button{padding-inline:3px;font-size:12px;}#commander-table #ct-lobby .op-deck-builder-modern .op-builder-sort-row{grid-template-columns:minmax(0,1fr) 44px 124px;}#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-view-toggle,#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-view-toggle>.ct-view-toggle{width:124px;}#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-view-toggle>.ct-view-toggle{gap:4px;font-size:12px;}#commander-table #ct-lobby .op-deck-builder-modern :is(#ct-builder-board,#ct-builder-sort){padding-inline:6px 26px;font-size:13px;}#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list-row{grid-template-columns:minmax(0,1fr);gap:6px;}#commander-table #ct-lobby .op-deck-builder-modern .ct-build-list .ct-build-row-actions{grid-column:1;grid-row:2;width:100%;justify-content:flex-end;}}
@media(min-width:900px){#commander-table #ct-lobby .op-deck-builder-modern .ct-build-cards:not(.ct-build-list),#commander-table #ct-lobby .op-deck-builder-modern #ct-search-cards:not(.ct-card-list),#commander-table #ct-lobby .op-deck-builder-modern .ct-token-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));}#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-metrics{grid-template-columns:repeat(4,minmax(0,1fr));}#commander-table #ct-lobby .op-deck-builder-modern .ct-insight-charts{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(forced-colors:active){#commander-table #ct-lobby .op-deck-builder-modern .ct-builder-nav>button[aria-selected=true]{background:Canvas!important;color:Highlight!important;box-shadow:none;border-bottom:3px solid Highlight!important;}#commander-table #ct-lobby .op-deck-builder-modern .op-builder-help-count{background:Highlight;color:HighlightText;}#commander-table #ct-lobby .op-deck-builder-modern .op-builder-save{background:Canvas;color:Highlight;border-color:Highlight;}#commander-table #ct-lobby .op-deck-builder-modern select{color:CanvasText;-webkit-text-fill-color:CanvasText;}#commander-table #ct-lobby .op-deck-builder-modern label:has(>select)::after,#commander-table #ct-lobby .op-deck-builder-modern .op-builder-search-row>.ct-builder-boards::after{border-color:ButtonText;}#commander-table #ct-lobby .op-deck-builder-modern .ct-view-toggle>button::before{background:Canvas;border-color:ButtonText;}#commander-table #ct-lobby .op-deck-builder-modern .ct-view-toggle>button>span{background:ButtonText;}}
/* A missing Commander is resolved before a text import can be saved. */
dialog.ct-card-dialog.ct-import-commander-dialog{position:fixed;box-sizing:border-box;inset:calc(var(--ct-import-safe-top,0px) + 24px) calc(100vw - var(--ct-import-safe-left,0px) - var(--ct-import-safe-width,100vw) + 16px) calc(100dvh - var(--ct-import-safe-top,0px) - var(--ct-import-safe-height,100dvh) + 24px) calc(var(--ct-import-safe-left,0px) + 16px);width:min(560px,calc(var(--ct-import-safe-width,100vw) - 32px));max-width:calc(var(--ct-import-safe-width,100vw) - 32px);height:fit-content;max-height:min(640px,calc(var(--ct-import-safe-height,100dvh) - 48px));min-width:0;min-height:0;margin:auto;padding:20px;border:1px solid #7883a866;border-radius:24px;background:#151925;color:#f1f2fa;overflow:hidden;text-align:left;}
dialog.ct-import-commander-dialog[open]{display:flex;flex-direction:column;gap:16px;}
.ct-import-commander-dialog::backdrop{background:#000b;}
.ct-import-commander-dialog .ct-import-commander-heading,.ct-import-commander-dialog .ct-import-commander-footer{flex:none;min-width:0;}
.ct-import-commander-dialog .ct-import-commander-heading>h2{margin:0;padding:0;font-size:24px;line-height:1.25;text-align:left;overflow-wrap:anywhere;}
.ct-import-commander-dialog .ct-import-commander-heading>label{display:block;margin:12px 0 0;font-size:14px;line-height:1.4;}
.ct-import-commander-dialog .ct-import-commander-heading #ct-import-commander-search{margin:6px 0 0;}
.ct-import-commander-dialog [hidden]{display:none!important;}
.ct-import-commander-dialog .ct-import-commander-body{flex:1 1 auto;box-sizing:border-box;min-width:0;min-height:0;padding:0 12px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;scrollbar-width:thin;scroll-padding-block:8px;}
.ct-import-commander-dialog .ct-import-commander-body :is(h3,p){margin:0 0 12px;overflow-wrap:anywhere;}
.ct-import-commander-dialog .ct-import-commander-body h3{font-size:17px;text-align:left;}
.ct-import-commander-dialog #ct-import-commander-candidates,.ct-import-commander-dialog #ct-import-commander-results{display:grid;gap:8px;min-width:0;margin:0 0 18px;}
.ct-import-commander-dialog .ct-import-commander-option{display:grid;grid-template-columns:48px minmax(0,1fr) 20px;align-items:center;gap:12px;box-sizing:border-box;min-width:0;width:100%;min-height:80px;margin:0;padding:10px;border:1px solid #7883a866;border-radius:12px;text-align:left;white-space:normal;}
.ct-import-commander-dialog .ct-import-commander-option:not(:has(>.ct-import-commander-art)){grid-template-columns:minmax(0,1fr) 20px;}
.ct-import-commander-dialog .ct-import-commander-art{display:block;width:48px;height:67px;max-width:100%;margin:0;object-fit:contain;border:0;border-radius:4px;}
.ct-import-commander-dialog .ct-import-commander-copy{display:grid;gap:4px;min-width:0;}
.ct-import-commander-dialog .ct-import-commander-copy strong{font-size:16px;line-height:1.3;overflow-wrap:anywhere;}
.ct-import-commander-dialog .ct-import-commander-copy small{font-size:13px;line-height:1.4;color:#bdc4df;overflow-wrap:anywhere;}
.ct-import-commander-dialog .ct-import-commander-check{font-size:20px;text-align:center;opacity:0;}
.ct-import-commander-dialog .ct-import-commander-option[aria-checked=true]>.ct-import-commander-check{opacity:1;}
.ct-import-commander-dialog #ct-import-commander-search{box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:8px 0 14px;padding:10px 12px;border:1px solid #7883a866;border-radius:12px;background:#101620;color:#f1f2fa;font-size:16px;}
.ct-import-commander-dialog .ct-import-commander-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.ct-import-commander-dialog .ct-import-commander-footer>button{box-sizing:border-box;min-width:0;min-height:44px;width:100%;margin:0;padding:10px 8px;font-size:15px;white-space:normal;overflow-wrap:anywhere;}
.ct-import-commander-dialog #ct-import-commander-status{font-size:14px;line-height:1.45;}
.ct-import-commander-dialog #ct-import-commander-status:empty{display:none;}
.ct-import-commander-dialog :is(button,input):focus-visible{outline:2px solid #e5c84a;outline-offset:-2px;}
.ct-import-commander-dialog #ct-import-commander-title:focus{outline:0;}
@media(max-height:440px),(max-width:360px){dialog.ct-card-dialog.ct-import-commander-dialog{padding:16px;}dialog.ct-import-commander-dialog[open]{gap:12px;}.ct-import-commander-dialog .ct-import-commander-heading>h2{font-size:22px;}}
/* Physical collection cards and newly captured deck cards are separate paths. */
.ct-card-dialog.ct-inventory-dialog{box-sizing:border-box;width:min(680px,calc(100vw - max(16px,env(safe-area-inset-left,0px)) - max(16px,env(safe-area-inset-right,0px))));max-width:calc(100vw - max(16px,env(safe-area-inset-left,0px)) - max(16px,env(safe-area-inset-right,0px)));}
.ct-card-dialog.ct-inventory-main-dialog{--ct-inventory-muted:#abb2c6;--ct-inventory-area-top:var(--ct-inventory-safe-top,env(safe-area-inset-top,0px));--ct-inventory-area-left:var(--ct-inventory-safe-left,env(safe-area-inset-left,0px));--ct-inventory-area-width:var(--ct-inventory-safe-width,calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));--ct-inventory-area-height:var(--ct-inventory-safe-height,calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));box-sizing:border-box;inset:calc(var(--ct-inventory-area-top) + 24px) calc(100vw - var(--ct-inventory-area-left) - var(--ct-inventory-area-width) + 16px) calc(100dvh - var(--ct-inventory-area-top) - var(--ct-inventory-area-height) + 24px) calc(var(--ct-inventory-area-left) + 16px);width:min(460px,calc(var(--ct-inventory-area-width) - 32px));max-width:calc(var(--ct-inventory-area-width) - 32px);height:fit-content;max-height:min(720px,calc(var(--ct-inventory-area-height) - 48px));margin:auto;padding:26px 24px 16px;border:1px solid #363c4e;border-radius:24px;text-align:left;overflow:hidden;font-family:"Exo 2",ui-sans-serif,system-ui,sans-serif;line-height:1.45;}
.ct-card-dialog.ct-inventory-main-dialog[open]{display:flex;flex-direction:column;}
.ct-card-dialog.ct-inventory-main-dialog:focus{outline:0;}
.ct-inventory-main-dialog>h2{flex:none;min-width:0;margin:0;padding:0;font-size:25px;font-weight:650;line-height:1.25;letter-spacing:-.035em;text-align:left;overflow-wrap:anywhere;}
.ct-inventory-main-dialog>h2:focus{outline:0;}
.ct-inventory-main-dialog>.ct-inventory-body{flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:12px;margin-right:-12px;scrollbar-gutter:stable;scrollbar-width:thin;scroll-padding-block:8px;}
.ct-inventory{--ct-inventory-muted:#abb2c6;min-width:0;}
.ct-inventory .ct-inventory-deck-name{margin:5px 0 0;font-size:14px;line-height:1.4;text-align:left;color:var(--ct-inventory-muted);overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-summary{display:flex;align-items:center;gap:12px;margin:22px 0 8px;min-width:0;text-align:left;}
.ct-inventory .ct-inventory-status-icon{display:grid;place-items:center;width:34px;height:34px;flex:none;color:#e5c84a;}
.ct-inventory .ct-inventory-summary>div{min-width:0;}
.ct-inventory .ct-inventory-summary strong{display:block;font-size:23px;font-weight:600;line-height:1.3;letter-spacing:-.025em;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-summary strong>span:not(.ct-inventory-status-number):not(.ct-inventory-status-count){font-size:14px;font-weight:400;letter-spacing:0;color:var(--ct-inventory-muted);}
.ct-inventory .ct-inventory-summary small{display:block;margin:2px 0 0;color:var(--ct-inventory-muted);font-size:13px;line-height:1.4;}
.ct-inventory .ct-inventory-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;margin:20px 0 0;min-width:0;border-bottom:1px solid #363c4e;}
.ct-inventory .ct-inventory-tabs>button{position:relative;box-sizing:border-box;min-width:0;min-height:48px;margin:0;padding:12px 0 14px;border:0;border-radius:0;background:transparent;color:var(--ct-inventory-muted);font-size:14px;line-height:1.35;white-space:normal;overflow-wrap:normal;}
.ct-inventory .ct-inventory-tabs>button[aria-selected=true]{color:#e5c84a;}
.ct-inventory .ct-inventory-tabs>button[aria-selected=true]::after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#e5c84a;}
.ct-inventory :is(button,input,summary):focus-visible{outline:2px solid #e5c84a;outline-offset:2px;}
.ct-inventory [hidden]{display:none!important;}
.ct-inventory .ct-inventory-panel{min-width:0;padding-top:24px;min-height:254px;text-align:left;}
.ct-inventory .ct-inventory-pane-heading h3{margin:0;padding:0;font-size:18px;font-weight:600;line-height:1.35;letter-spacing:-.015em;text-align:left;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-pane-heading p{margin:5px 0 18px;font-size:14px;line-height:1.45;color:var(--ct-inventory-muted);text-align:left;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-direction{margin:0 0 12px;text-align:left;overflow-wrap:anywhere;color:var(--ct-inventory-muted);font-size:14px;}
.ct-inventory .ct-inventory-panel .ct-inventory-note{text-align:left;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-actions{display:grid;grid-template-columns:minmax(0,1fr);margin:18px 0;gap:10px;}
.ct-inventory .ct-inventory-actions>button,.ct-inventory .ct-inventory-primary{box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0;padding:11px 12px;border-radius:12px;white-space:normal;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-primary{display:flex;align-items:center;justify-content:center;gap:10px;font-size:15px;line-height:1.45;font-weight:600;}
.ct-inventory button:disabled{opacity:.45;cursor:default;}
.ct-inventory .ct-inventory-wants{display:flex;align-items:center;gap:10px;margin-top:24px;padding-top:20px;border-top:1px solid #363c4e;min-width:0;}
.ct-inventory .ct-inventory-wants-icon{flex:none;color:#e5c84a;}
.ct-inventory .ct-inventory-wants>div{flex:1;min-width:0;}
.ct-inventory .ct-inventory-wants strong{display:block;font-size:14px;line-height:1.4;font-weight:500;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-wants small{display:block;margin:3px 0 0;font-size:13px;line-height:1.4;color:var(--ct-inventory-muted);overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-wants>button{display:flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;width:auto;min-width:0;min-height:44px;margin:0;padding:8px 0 8px 8px;border:0;border-radius:0;background:transparent;color:#e5c84a;font-size:13px;line-height:1.4;white-space:normal;}
.ct-inventory .ct-inventory-wants>button>svg{width:16px;height:16px;}
.ct-inventory .ct-inventory-preserve{display:flex;align-items:flex-start;gap:10px;margin-top:20px;color:var(--ct-inventory-muted);font-size:13px;line-height:1.45;}
.ct-inventory .ct-inventory-preserve>svg{flex:none;margin-top:2px;color:#e5c84a;}
.ct-inventory .ct-inventory-preserve p{min-width:0;margin:0;}
.ct-inventory .ct-inventory-preserve p>span{display:block;margin-top:5px;}
.ct-inventory .ct-inventory-help{margin-top:2px;border-top:1px solid #363c4e;}
.ct-inventory .ct-inventory-help>summary{display:flex;align-items:center;gap:9px;box-sizing:border-box;min-height:48px;padding:12px 0;list-style:none;color:var(--ct-inventory-muted);font-size:13px;line-height:1.4;}
.ct-inventory .ct-inventory-help>summary::-webkit-details-marker{display:none;}
.ct-inventory .ct-inventory-help>summary>svg:last-child{margin-left:auto;width:16px;height:16px;transition:transform .2s ease;}
.ct-inventory .ct-inventory-help[open]>summary>svg:last-child{transform:rotate(180deg);}
.ct-inventory .ct-inventory-help>div{display:grid;gap:10px;padding:0 0 16px;color:var(--ct-inventory-muted);font-size:13px;line-height:1.45;}
.ct-inventory .ct-inventory-help p{margin:0;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-footer{border-top:1px solid #363c4e;}
.ct-inventory .ct-inventory-footer>[data-release-deck]{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;min-width:0;min-height:52px;margin:0;padding:15px 0 4px;border:0;border-radius:0;background:transparent;text-align:left;}
.ct-inventory .ct-inventory-footer>[data-release-deck]>span:first-child{display:grid;place-items:center;width:28px;flex:none;color:var(--ct-inventory-muted);}
.ct-inventory .ct-inventory-footer>[data-release-deck]>span:nth-child(2){flex:1;min-width:0;}
.ct-inventory .ct-inventory-footer strong{display:block;color:var(--op-flat-ink,#f1f2fa);font-size:14px;font-weight:500;line-height:1.4;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-footer small{display:block;margin:3px 0 0;color:var(--ct-inventory-muted);font-size:12px;line-height:1.4;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-footer>[data-release-deck]>svg{width:18px;height:18px;color:var(--ct-inventory-muted);}
.ct-inventory .ct-inventory-feedback:empty{display:none;}
.ct-inventory .ct-inventory-feedback{margin:16px 0 0;padding-top:12px;border-top:1px solid #363c4e;color:var(--ct-inventory-muted);font-size:13px;line-height:1.45;overflow-wrap:anywhere;}
.ct-inventory .ct-inventory-available{margin-top:20px;}
.ct-inventory svg{flex:none;width:20px;height:20px;}
@media(max-width:360px){.ct-card-dialog.ct-inventory-main-dialog{padding:22px 16px 14px;}.ct-inventory-main-dialog>h2{font-size:23px;}.ct-inventory .ct-inventory-tabs{gap:8px;}.ct-inventory .ct-inventory-tabs>button{font-size:13px;}.ct-inventory .ct-inventory-primary{padding-inline:9px;font-size:14px;}.ct-inventory .ct-inventory-wants{gap:8px;}.ct-inventory .ct-inventory-wants>button>span{max-width:64px;white-space:normal;}.ct-inventory form{flex-wrap:wrap;}.ct-inventory form>label{flex-basis:100%;}.ct-inventory form>button{width:100%;}}
@media(prefers-reduced-motion:reduce){.ct-inventory .ct-inventory-help>summary>svg:last-child{transition:none;}}
/* Match the approved plain controls inside the existing important material layer. */
@layer orbunity-app-glass{
html:not([data-app-glass=tracker]) dialog.ct-inventory-main-dialog{background-color:#151722!important;border-color:#363c4e!important;box-shadow:none!important;}
html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-tabs>button,html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-wants>button,html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-footer>[data-release-deck]{background-color:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important;color:var(--ct-inventory-muted,#abb2c6)!important;}
html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-tabs>button[aria-selected=true],html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-wants>button{color:#e5c84a!important;}
html:not([data-app-glass=tracker]) .ct-inventory button.ct-inventory-primary{background-color:#e5c84a!important;background-image:none!important;border-color:#e5c84a!important;color:#24200d!important;-webkit-text-fill-color:#24200d!important;box-shadow:none!important;}
@media(forced-colors:active){html:not([data-app-glass=tracker]) dialog.ct-inventory-main-dialog{background-color:Canvas!important;border-color:ButtonText!important;}html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-tabs>button,html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-wants>button,html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-footer>[data-release-deck]{color:CanvasText!important;-webkit-text-fill-color:CanvasText!important;}html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-tabs>button[aria-selected=true],html:not([data-app-glass=tracker]) .ct-inventory .ct-inventory-wants>button{color:Highlight!important;-webkit-text-fill-color:Highlight!important;}html:not([data-app-glass=tracker]) .ct-inventory button.ct-inventory-primary{background-color:Highlight!important;border-color:Highlight!important;color:HighlightText!important;-webkit-text-fill-color:HighlightText!important;}}
}
@media(forced-colors:active){.ct-inventory .ct-inventory-tabs>button[aria-selected=true]::after{background:Highlight;}.ct-inventory :is(button,input,summary):focus-visible{outline-color:Highlight;}.ct-inventory .ct-inventory-tabs,.ct-inventory .ct-inventory-wants,.ct-inventory .ct-inventory-help,.ct-inventory .ct-inventory-footer,.ct-inventory .ct-inventory-feedback{border-color:ButtonText;}}
/* Card edits keep the full card, quantity and board together; artwork is a draft
   until the existing explicit save action succeeds. */
dialog.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog){--ct-card-muted:#abb2c6;--ct-card-line:#363c4e;--ct-card-area-top:var(--ct-card-safe-top,env(safe-area-inset-top,0px));--ct-card-area-left:var(--ct-card-safe-left,env(safe-area-inset-left,0px));--ct-card-area-width:var(--ct-card-safe-width,calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));--ct-card-area-height:var(--ct-card-safe-height,calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));position:fixed;box-sizing:border-box;inset:calc(var(--ct-card-area-top) + 24px) calc(100vw - var(--ct-card-area-left) - var(--ct-card-area-width) + 16px) calc(100dvh - var(--ct-card-area-top) - var(--ct-card-area-height) + 24px) calc(var(--ct-card-area-left) + 16px);width:min(460px,calc(var(--ct-card-area-width) - 32px));max-width:calc(var(--ct-card-area-width) - 32px);height:fit-content;max-height:min(900px,calc(var(--ct-card-area-height) - 48px));min-width:0;min-height:0;margin:auto;padding:24px 22px 20px;border:1px solid var(--ct-card-line);border-radius:24px;background:#151722;color:#f2f2f8;overflow:hidden;text-align:left;font-family:"Exo 2",ui-sans-serif,system-ui,sans-serif;line-height:1.45;}
dialog.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog)[open]{display:flex;flex-direction:column;}
dialog.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog):focus{outline:0;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog)>h2{flex:none;min-width:0;margin:0;padding:0;font-size:24px;line-height:1.25;font-weight:650;letter-spacing:-.035em;text-align:left;overflow-wrap:anywhere;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog)>h2:focus{outline:0;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) [hidden]{display:none!important;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) :is(button,input,select,summary):focus-visible{outline:2px solid #e5c84a;outline-offset:2px;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) :is(button,input,select){box-sizing:border-box;min-width:0;min-height:44px;margin:0;font:inherit;line-height:1.4;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) button{padding:10px 12px;border:1px solid var(--ct-card-line);border-radius:12px;white-space:normal;overflow-wrap:anywhere;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) button:disabled{opacity:.45;cursor:default;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) :is(input:not([type=checkbox]):not([type=hidden]),select){font-size:16px;border-radius:12px;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) select{padding:10px 28px 10px 10px;color-scheme:dark;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) svg{flex:none;width:18px;height:18px;}
.ct-build-card-editor .ct-build-card-edition{display:flex;align-items:center;gap:12px;flex:none;min-width:0;margin:0 0 8px;color:var(--ct-card-muted);font-size:13px;line-height:1.4;}
.ct-build-card-editor .ct-build-card-edition>span{flex:1;min-width:0;overflow-wrap:anywhere;}
.ct-build-card-editor .ct-build-card-edition>[data-printings]{display:flex;align-items:center;justify-content:flex-end;gap:4px;flex:none;min-width:44px;padding:6px 0;border:0;background:transparent;color:#e5c84a;font-size:13px;}
.ct-build-card-editor form.ct-build-card-form{display:flex;flex-direction:column;flex:1 1 auto;gap:0;min-width:0;min-height:0;margin:0;}
.ct-build-card-editor .ct-build-card-scroll{flex:1 1 auto;min-width:0;min-height:0;padding:0 12px;margin:0 -12px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;scrollbar-width:thin;scroll-padding-block:8px;}
.ct-build-card-editor .ct-build-card-visual-preview{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;margin:8px 0 16px;}
.ct-build-card-editor .ct-build-card-info{display:block;width:100%;min-width:0;margin:0;}
.ct-build-card-editor .ct-build-card-info>.ct-build-card-image{display:block;box-sizing:border-box;width:min(100%,250px);height:auto;max-width:100%;max-height:none;aspect-ratio:63/88;object-fit:contain;object-position:center;margin:0 auto;border:0;border-radius:10px;background:#090b10;}
.ct-build-card-editor .ct-build-card-visual-preview>button{padding:7px 8px;font-size:13px;}
.ct-build-card-editor .ct-build-card-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);align-items:end;gap:12px;min-width:0;margin:0 0 12px;}
.ct-build-card-editor .ct-build-card-controls>label{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;font-size:13px;line-height:1.4;}
.ct-build-card-editor .ct-build-card-controls select{width:100%;margin:0;}
.ct-build-card-editor .ct-build-quantity-stepper{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;box-sizing:border-box;min-width:0;min-height:46px;border:1px solid var(--ct-card-line);border-radius:12px;background:#222634;}
.ct-build-card-editor .ct-build-quantity-stepper>button{width:44px;padding:7px 0;border:0;border-radius:10px;background:transparent;font-size:20px;}
.ct-build-card-editor .ct-build-quantity-stepper>input{width:100%;min-width:0;padding:8px 0;border:0;border-radius:0;text-align:center;font-size:17px;appearance:textfield;-moz-appearance:textfield;background:transparent;}
.ct-build-card-editor .ct-build-quantity-stepper>input::-webkit-inner-spin-button,.ct-build-card-editor .ct-build-quantity-stepper>input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}
.ct-build-card-editor .ct-build-commander-target{align-self:center;min-width:0;margin:0;color:var(--ct-card-muted);font-size:13px;line-height:1.4;overflow-wrap:anywhere;}
.ct-build-card-editor .ct-build-artwork-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;margin:4px 0;}
.ct-build-card-editor .ct-build-artwork-heading>h3{min-width:0;margin:0;padding:0;font-size:16px;line-height:1.35;font-weight:600;text-align:left;}
.ct-build-card-editor .ct-build-artwork-heading>[data-all-artworks]{display:flex;align-items:center;justify-content:flex-end;gap:4px;flex:none;min-width:44px;padding:6px 0;border:0;background:transparent;color:#e5c84a;font-size:13px;}
.ct-build-card-editor .ct-build-artwork-strip{display:flex;align-items:stretch;gap:10px;min-width:0;margin:0;padding:3px 3px 8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scroll-padding-inline:3px;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog) .ct-build-artwork-pick{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;margin:0;padding:7px 5px;border:1px solid transparent;border-radius:12px;background:transparent;text-align:center;}
.ct-build-card-editor .ct-build-artwork-strip>.ct-build-artwork-pick{flex:0 0 88px;width:88px;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog) .ct-build-artwork-pick>img{display:block;width:68px;max-width:100%;height:auto;max-height:none;aspect-ratio:63/88;object-fit:contain;margin:0;border:0;border-radius:5px;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog) .ct-build-artwork-pick :is(span,small){display:block;min-width:0;width:100%;font-size:11px;line-height:1.35;color:var(--ct-card-muted);overflow-wrap:anywhere;}
.ct-build-card-editor .ct-build-edition-prices{display:flex;align-items:center;gap:6px;width:100%;min-height:44px;margin:2px 0 8px;padding:8px 0;border:0;border-radius:0;background:transparent;color:var(--ct-card-muted);font-size:13px;text-align:left;}
.ct-build-card-editor :is(.ct-build-card-details,.ct-build-card-roles){min-width:0;margin:0;border-top:1px solid var(--ct-card-line);font-size:13px;}
.ct-build-card-editor :is(.ct-build-card-details,.ct-build-card-roles)>summary{box-sizing:border-box;min-height:48px;padding:13px 0;color:var(--ct-card-muted);font-size:13px;line-height:1.5;cursor:pointer;}
.ct-build-card-editor :is(.ct-build-card-details,.ct-build-card-roles)>div{min-width:0;padding:0 0 14px;color:var(--ct-card-muted);font-size:13px;line-height:1.5;}
.ct-build-card-editor .ct-build-card-details p{margin:0 0 12px;overflow-wrap:anywhere;}
.ct-build-card-editor .ct-build-card-details .ct-insight-mana{display:inline-block;width:20px;height:20px;vertical-align:middle;margin:0;}
.ct-build-card-editor .ct-build-card-details details>summary{min-height:44px;box-sizing:border-box;padding:11px 0;}
.ct-build-card-editor .ct-build-card-roles :is(fieldset,details){min-width:0;max-width:100%;box-sizing:border-box;}
.ct-build-card-editor .ct-build-card-roles fieldset{margin:0 0 12px;padding:10px;border:1px solid var(--ct-card-line);border-radius:12px;}
.ct-build-card-editor .ct-build-card-roles .ct-build-checks{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.ct-build-card-editor .ct-build-card-roles :is(.ct-build-check,.ct-build-checks label){min-height:44px;margin:0;overflow-wrap:anywhere;}
.ct-build-card-editor .ct-build-card-footer{flex:none;min-width:0;margin:12px 0 0;padding:0;}
.ct-build-card-editor .ct-build-card-footer>[type=submit]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:46px;padding:11px 12px;border-color:#e5c84a;border-radius:12px;background:#e5c84a;color:#24200d;font-size:15px;line-height:1.45;font-weight:600;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) :is(.ct-build-card-note,.ct-build-card-loading,.ct-build-dialog-message){min-width:0;margin:8px 0;color:var(--ct-card-muted);font-size:13px;line-height:1.45;overflow-wrap:anywhere;}
.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) .ct-build-dialog-message:empty{display:none;}
.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog)>h2{display:flex;align-items:center;box-sizing:border-box;min-height:44px;padding-left:74px;}
.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) [data-picker-back]{position:absolute;top:24px;left:22px;display:flex;align-items:center;gap:6px;align-self:flex-start;flex:none;min-width:44px;min-height:44px;max-width:68px;margin:0;padding:7px 0;border:0;background:transparent;color:var(--ct-card-muted);font-size:13px;}
.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) .ct-build-artwork-search{display:flex;flex-direction:column;gap:6px;flex:none;min-width:0;margin:14px 0 12px;color:var(--ct-card-muted);font-size:13px;}
.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) .ct-build-artwork-search input{width:100%;min-width:0;min-height:44px;margin:0;padding:10px 12px;font-size:16px;}
.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) :is(.ct-build-artwork-results,.ct-build-edition-results){flex:1 1 auto;min-width:0;min-height:0;margin:0 -12px;padding:3px 12px 8px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;scrollbar-width:thin;scroll-padding-block:8px;}
.ct-build-artwork-dialog .ct-build-artwork-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;align-content:start;align-items:start;gap:12px;}
.ct-build-artwork-dialog .ct-build-artwork-results>.ct-build-artwork-pick{align-self:start;width:100%;height:auto;padding:8px;}
.ct-build-artwork-dialog .ct-build-artwork-results>.ct-build-artwork-pick>img{flex:none;width:100%;}
.ct-build-artwork-dialog .ct-build-artwork-results>.ct-build-artwork-pick>span{flex:none;}
.ct-build-artwork-dialog .ct-build-artwork-results>.ct-build-artwork-pick :is(span,small){font-size:12px;}
.ct-build-edition-dialog .ct-build-edition-results{display:flex;flex-direction:column;gap:8px;}
.ct-build-edition-dialog .ct-build-edition-pick{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;width:100%;min-width:0;min-height:60px;margin:0;padding:12px;border-radius:12px;text-align:left;}
.ct-build-edition-dialog .ct-build-edition-pick>span{display:block;flex:1;min-width:0;overflow-wrap:anywhere;}
.ct-build-edition-dialog .ct-build-edition-pick :is(strong,small){display:block;min-width:0;line-height:1.4;overflow-wrap:anywhere;}
.ct-build-edition-dialog .ct-build-edition-pick strong{font-size:14px;font-weight:500;}
.ct-build-edition-dialog .ct-build-edition-pick small{margin:4px 0 0;font-size:12px;color:var(--ct-card-muted);}
@media(min-width:700px){.ct-build-card-editor .ct-build-card-info>.ct-build-card-image{width:min(100%,280px);}}
@media(max-width:360px),(max-height:440px){dialog.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog){padding:18px 16px 16px;border-radius:20px;}.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog)>h2{font-size:22px;}.ct-build-card-editor .ct-build-card-controls{gap:8px;}.ct-build-card-editor .ct-build-card-controls select{font-size:16px;padding-left:8px;}.ct-build-card-editor .ct-build-card-roles .ct-build-checks{grid-template-columns:minmax(0,1fr);}.ct-build-card-editor .ct-build-card-edition{gap:8px;}}
@media(max-width:360px){.ct-build-card-editor .ct-build-card-controls{grid-template-columns:minmax(0,1fr);}.ct-build-card-editor .ct-build-commander-target{min-height:44px;display:flex;align-items:center;}}
@media(max-width:360px),(max-height:440px){.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) [data-picker-back]{top:18px;left:16px;}}
@media(max-height:440px){.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog)>h2{font-size:20px;line-height:1.2;}.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) .ct-build-card-note{display:none;}.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) .ct-build-artwork-search{gap:0;margin:8px 0;font-size:0;line-height:0;}.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) :is(.ct-build-artwork-results,.ct-build-edition-results){min-height:44px;}.ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) :is(.ct-build-card-loading,.ct-build-dialog-message){flex:none;margin:6px 0;font-size:12px;line-height:1.4;}.ct-build-artwork-dialog .ct-build-artwork-results{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(prefers-reduced-motion:reduce){.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) *{scroll-behavior:auto;}}
@layer orbunity-app-glass{
html:not([data-app-glass=tracker]) dialog.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog){background-color:#151722!important;border-color:#363c4e!important;box-shadow:none!important;}
html:not([data-app-glass=tracker]) .ct-build-card-editor :is(.ct-build-card-edition>[data-printings],.ct-build-artwork-heading>[data-all-artworks],.ct-build-edition-prices),html:not([data-app-glass=tracker]) .ct-builder-dialog:is(.ct-build-artwork-dialog,.ct-build-edition-dialog) [data-picker-back],html:not([data-app-glass=tracker]) .ct-build-card-editor .ct-build-quantity-stepper>button{background-color:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important;}
html:not([data-app-glass=tracker]) .ct-build-card-editor :is(.ct-build-card-edition>[data-printings],.ct-build-artwork-heading>[data-all-artworks]){color:#e5c84a!important;}
html:not([data-app-glass=tracker]) .ct-build-card-editor .ct-build-quantity-stepper>input{background-color:transparent!important;border-color:transparent!important;box-shadow:none!important;}
html:not([data-app-glass=tracker]) .ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog) .ct-build-artwork-pick{background-color:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important;}
html:not([data-app-glass=tracker]) .ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog) .ct-build-artwork-pick[aria-pressed=true],html:not([data-app-glass=tracker]) .ct-build-edition-dialog .ct-build-edition-pick[aria-pressed=true]{background-color:#e5c84a0c!important;border-color:#e5c84a!important;box-shadow:none!important;}
html:not([data-app-glass=tracker]) .ct-build-card-editor .ct-build-card-footer>[type=submit]{background-color:#e5c84a!important;background-image:none!important;border-color:#e5c84a!important;box-shadow:none!important;color:#24200d!important;-webkit-text-fill-color:#24200d!important;}
@media(forced-colors:active){html:not([data-app-glass=tracker]) dialog.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog){background-color:Canvas!important;border-color:ButtonText!important;}html:not([data-app-glass=tracker]) .ct-build-card-editor :is(.ct-build-card-edition>[data-printings],.ct-build-artwork-heading>[data-all-artworks]){color:LinkText!important;-webkit-text-fill-color:LinkText!important;}html:not([data-app-glass=tracker]) .ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog) .ct-build-artwork-pick[aria-pressed=true],html:not([data-app-glass=tracker]) .ct-build-edition-dialog .ct-build-edition-pick[aria-pressed=true]{border-color:Highlight!important;}html:not([data-app-glass=tracker]) .ct-build-card-editor .ct-build-card-footer>[type=submit]{background-color:Highlight!important;border-color:Highlight!important;color:HighlightText!important;-webkit-text-fill-color:HighlightText!important;}}
}
@media(forced-colors:active){.ct-builder-dialog:is(.ct-build-card-editor,.ct-build-artwork-dialog,.ct-build-edition-dialog) :is(button,input,select,summary):focus-visible{outline-color:Highlight;}.ct-build-card-editor :is(.ct-build-quantity-stepper,.ct-build-card-details,.ct-build-card-roles){border-color:ButtonText;}.ct-build-card-editor .ct-build-card-image{background:Canvas;}}
/* Statistics and history share compact, opaque page controls. */
#commander-table #ct-lobby .ct-profile-statistics{max-width:760px;min-width:0;margin-inline:auto;color:#f1f2fa}
#commander-table #ct-lobby .ct-stat-heading{display:flex;align-items:center;gap:14px;margin-bottom:20px;min-height:44px}
#commander-table #ct-lobby .ct-stat-heading .ct-profile-return{flex:none;margin:0}
#commander-table #ct-lobby .ct-stat-heading h1{margin:0;text-align:left;font-size:26px;line-height:1.2}
#commander-table #ct-lobby .ct-stat-heading p{margin:4px 0 0;color:#aeb7cc;font-size:13px;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-profile-statistics .ct-profile-content-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;border:1px solid #2a3041;border-radius:15px;background:#10131c;padding:4px;margin:0}
#commander-table #ct-lobby .ct-profile-statistics .ct-profile-content-tabs>button{min-width:0;min-height:44px;margin:0;padding:10px 8px;border:0;border-radius:10px;background:transparent;color:#aeb7cc;font:inherit;font-size:14px;font-weight:500;line-height:1.3}
#commander-table #ct-lobby .ct-profile-statistics .ct-profile-content-tabs>[aria-pressed=true]{background:#303644;color:#f1f2fa}
#commander-table #ct-lobby .ct-stat-format-tabs{display:flex;gap:8px;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;margin:16px 0 22px;padding:2px;white-space:nowrap;scroll-padding-inline:2px;touch-action:pan-x}
#commander-table #ct-lobby .ct-stat-format-tabs::-webkit-scrollbar{display:none}
#commander-table #ct-lobby .ct-stat-format-tabs>button{flex:none;min-width:44px;min-height:44px;margin:0;padding:10px 17px;border:1px solid #303749;border-radius:24px;background:#171c28;color:#c4cbda;font:inherit;font-size:14px;font-weight:500;line-height:1.3}
#commander-table #ct-lobby .ct-stat-format-tabs>[aria-pressed=true]{background:#e5c84a;border-color:#e5c84a;color:#211d0b}
#commander-table #ct-lobby .ct-profile-statistics :is(button,summary):focus-visible{outline:2px solid #e5c84a;outline-offset:2px}
#commander-table #ct-lobby .ct-profile-statistics .ct-stat-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0;border:0;margin:12px 0}
#commander-table #ct-lobby .ct-profile-statistics .ct-stat-metrics>div{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;box-sizing:border-box;min-height:86px;padding:14px;border:1px solid #2e3547;border-radius:16px;background:#151925;gap:7px;text-align:left}
#commander-table #ct-lobby .ct-profile-statistics .ct-stat-metrics strong{font-size:25px;line-height:1.2;color:#f1f2fa;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-profile-statistics :is([data-stat-metric=rate],[data-stat-metric=match-rate],[data-stat-metric=round-rate])>strong{color:#e5c84a;-webkit-text-fill-color:currentColor}
#commander-table #ct-lobby .ct-profile-statistics .ct-stat-metrics span{font-size:12px;line-height:1.3;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-note{font-size:12px;line-height:1.5;color:#aeb7cc;margin:10px 0 16px}
#commander-table #ct-lobby .ct-stat-rounds-unavailable{padding:12px;border-left:3px solid #e5c84a;background:#222119;color:#e5d992;border-radius:4px}
#commander-table #ct-lobby .ct-stat-section{min-width:0;margin:22px 0}
#commander-table #ct-lobby :is(.ct-stat-section h2,.ct-stat-format-title){margin:0 0 12px;padding:0;color:#f1f2fa;font-size:19px;line-height:1.3;text-align:left}
#commander-table #ct-lobby .ct-stat-section-heading{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:4px 12px;margin-bottom:10px}
#commander-table #ct-lobby .ct-stat-section-heading h2{margin-bottom:3px}
#commander-table #ct-lobby .ct-stat-section-heading>div>p{margin:0;color:#aeb7cc;font-size:12px}
#commander-table #ct-lobby .ct-stat-help{min-width:0;margin:0;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-help>summary{display:flex;align-items:center;justify-content:center;width:44px;min-height:44px;margin-left:auto;padding:0;border:0;border-radius:50%;list-style:none;cursor:pointer;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-help>summary::marker,#commander-table #ct-lobby :is(.ct-stat-library,.ct-stat-disclosure)>summary::marker{content:''}
#commander-table #ct-lobby .ct-stat-help>summary::-webkit-details-marker,#commander-table #ct-lobby :is(.ct-stat-library,.ct-stat-disclosure)>summary::-webkit-details-marker{display:none}
#commander-table #ct-lobby .ct-stat-help>summary>svg{width:19px;height:19px}
#commander-table #ct-lobby .ct-stat-help>p{margin:0;padding:12px 0;font-size:12px;line-height:1.6;color:#aeb7cc}
#commander-table #ct-lobby :is(.ct-stat-section-heading,.ct-stat-result-note)>.ct-stat-help[open]{display:contents}
#commander-table #ct-lobby :is(.ct-stat-section-heading,.ct-stat-result-note)>.ct-stat-help[open]>p{grid-column:1/-1}
#commander-table #ct-lobby .ct-stat-result-note{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:0 8px}
#commander-table #ct-lobby .ct-stat-result-note>p{margin:0;color:#aeb7cc;font-size:12px;line-height:1.5}
#commander-table #ct-lobby :is(.ct-stat-format-list,.ct-stat-result-list){list-style:none;margin:0;padding:0}
#commander-table #ct-lobby .ct-stat-format-list{display:grid;gap:10px}
#commander-table #ct-lobby .ct-stat-format-list li{margin:0;padding:0;border:0}
#commander-table #ct-lobby .ct-stat-format-list button{display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:10px 12px;box-sizing:border-box;width:100%;min-height:94px;margin:0;padding:14px;border:1px solid #2e3547;border-radius:16px;background:#151925;text-align:left;color:#f1f2fa}
#commander-table #ct-lobby .ct-stat-format-copy{display:grid;gap:6px;min-width:0}
#commander-table #ct-lobby .ct-stat-format-list strong,#commander-table #ct-lobby .ct-stat-result-list strong{font-size:16px;line-height:1.3;font-weight:600;overflow-wrap:anywhere}
#commander-table #ct-lobby :is(.ct-stat-format-list small,.ct-stat-result-list small,.ct-stat-most small){display:block;font-size:12px;line-height:1.5;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-format-wins{color:#cbd1dd;font-size:13px}
#commander-table #ct-lobby .ct-stat-format-list button>svg{width:18px;height:18px;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-format-bar{display:block;grid-column:1/-1;height:4px;background:#30364a;border-radius:4px;overflow:hidden}
#commander-table #ct-lobby .ct-stat-format-bar::before{content:'';display:block;width:calc(100% * var(--stat-share));height:100%;background:#e5c84a;border-radius:inherit}
#commander-table #ct-lobby .ct-stat-result-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #343b4e}
#commander-table #ct-lobby .ct-stat-result-list li>div{min-width:0}
#commander-table #ct-lobby .ct-stat-result-list button{flex:none;min-width:44px;min-height:44px;margin:0;padding:10px;border-radius:12px}
#commander-table #ct-lobby .ct-stat-disclosure{margin:10px 0;border:1px solid #2e3547;border-radius:15px;background:#151925;padding:0 14px}
#commander-table #ct-lobby .ct-stat-disclosure>summary{display:flex;align-items:center;gap:12px;min-height:56px;padding:0;list-style:none;cursor:pointer;font-size:14px;font-weight:500;color:#f1f2fa}
#commander-table #ct-lobby .ct-stat-disclosure>summary>svg{flex:none;width:20px;height:20px;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-disclosure>summary>span{flex:1}
#commander-table #ct-lobby .ct-stat-disclosure>summary>svg:last-child{margin-left:auto;width:17px;height:17px}
#commander-table #ct-lobby .ct-stat-disclosure[open]>summary>svg:last-child{transform:rotate(90deg)}
#commander-table #ct-lobby .ct-stat-disclosure .ct-stat-section{margin:12px 0 18px}
#commander-table #ct-lobby .ct-stat-disclosure h2{font-size:15px}
#commander-table #ct-lobby .ct-stat-placements{margin:2px 0 14px}
#commander-table #ct-lobby .ct-stat-placements>div{display:grid;grid-template-columns:70px minmax(0,1fr);align-items:center;gap:12px;min-height:36px}
#commander-table #ct-lobby .ct-stat-placements dt{font-size:13px;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-placements dd{display:flex;align-items:center;gap:12px;min-width:0;margin:0}
#commander-table #ct-lobby .ct-stat-placements dd>span{height:7px;width:calc((100% - 30px) * var(--stat-share));border-radius:7px;background:#e5c84a}
#commander-table #ct-lobby .ct-stat-placements dd>strong{font-size:14px;font-variant-numeric:tabular-nums}
#commander-table #ct-lobby .ct-stat-most{display:flex;align-items:center;gap:14px;box-sizing:border-box;width:100%;min-height:90px;margin:20px 0 12px;padding:14px;background:#151925;border:1px solid #2e3547;border-radius:16px;text-align:left}
#commander-table #ct-lobby .ct-stat-most>svg{flex:none;width:28px;height:28px;color:#e5c84a}
#commander-table #ct-lobby .ct-stat-most>svg:last-child{width:18px;height:18px;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-most>span{display:grid;flex:1;min-width:0;gap:3px}
#commander-table #ct-lobby .ct-stat-most strong{font-size:16px;line-height:1.4;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-stat-duel-card{padding:14px;border:1px solid #2e3547;border-radius:16px;background:#151925}
#commander-table #ct-lobby .ct-stat-duel-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#commander-table #ct-lobby .ct-stat-duel-values>div{display:grid;gap:7px;text-align:left}
#commander-table #ct-lobby .ct-stat-duel-values>div+div{border-left:1px solid #343b4e;padding-left:16px}
#commander-table #ct-lobby .ct-stat-duel-values strong{font-size:26px;line-height:1.2;font-variant-numeric:tabular-nums}
#commander-table #ct-lobby .ct-stat-duel-values span{font-size:12px;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-duel-outcomes{margin:14px 0 0;padding-top:12px;border-top:1px solid #343b4e;font-size:12px;line-height:1.6;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-duel-outcomes strong{font-size:inherit;color:#f1f2fa;font-weight:500}
#commander-table #ct-lobby .ct-stat-times{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:12px;padding:14px;border:1px solid #2e3547;border-radius:16px;background:#151925}
#commander-table #ct-lobby .ct-stat-times>div{display:grid;align-items:center;gap:5px;min-width:0}
#commander-table #ct-lobby .ct-stat-times>div:first-child{grid-template-columns:22px minmax(0,1fr)}
#commander-table #ct-lobby .ct-stat-times>div+div{text-align:right}
#commander-table #ct-lobby .ct-stat-times svg{width:21px;height:21px;color:#e5c84a}
#commander-table #ct-lobby .ct-stat-times span{font-size:11px;color:#aeb7cc}
#commander-table #ct-lobby .ct-stat-times strong{font-size:17px;line-height:1.4;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-stat-empty{color:#aeb7cc;font-size:14px;line-height:1.5}
#commander-table #ct-lobby .ct-stat-library{margin:24px 0;border-top:1px solid #2e3547;padding-top:6px}
#commander-table #ct-lobby .ct-stat-library>summary{min-height:48px;display:flex;align-items:center;gap:10px;font-size:13px;color:#aeb7cc;cursor:pointer;list-style:none}
#commander-table #ct-lobby .ct-stat-library>summary::after{content:'›';margin-left:auto;font-size:22px}
#commander-table #ct-lobby .ct-stat-library>.ct-profile-commanders-heading{margin-top:12px}
/* Saved game details use the same matte page material, with no extra tabs. */
#commander-table #ct-lobby .ct-match-details .ct-profile-game-heading{margin:0 0 20px;align-items:center}
#commander-table #ct-lobby .ct-match-details .ct-profile-game-heading>div{min-width:0;flex:1}
#commander-table #ct-lobby .ct-match-details .ct-profile-game-heading h1{font-size:26px;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-details .ct-profile-game-heading .ct-back{display:grid;place-items:center;min-width:44px;min-height:44px;margin:0;padding:0}
#commander-table #ct-lobby .ct-match-details .ct-profile-game-heading .ct-back>svg{width:24px;height:24px}
#commander-table #ct-lobby .ct-match-summary{padding:14px;border:1px solid #343b4e;border-radius:18px;background:#151925}
#commander-table #ct-lobby .ct-match-summary>header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 14px;padding-bottom:12px;border-bottom:1px solid #343b4e;color:#b7bfd2;font-size:13px;line-height:1.5}
#commander-table #ct-lobby .ct-match-summary>header>span{display:flex;align-items:center;gap:7px;min-width:0;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-summary>header svg{flex:none;width:19px;height:19px}
#commander-table #ct-lobby .ct-match-scoreboard{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start;gap:10px 8px;padding-top:18px}
#commander-table #ct-lobby .ct-match-player{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;text-align:center;color:#f1f2fa}
#commander-table #ct-lobby .ct-match-avatar{display:grid;place-items:center;flex:none;box-sizing:border-box;width:48px;height:48px;border:2px solid #646b7b;border-radius:50%;overflow:hidden;background:#222632;color:#f1f2fa;font-size:24px;font-weight:600}
#commander-table #ct-lobby .ct-match-avatar>img{width:100%;height:100%;object-fit:cover}
#commander-table #ct-lobby .ct-match-player:is([data-outcome=win],[data-outcome=shared])>.ct-match-avatar{border-color:#e5c84a}
#commander-table #ct-lobby .ct-match-player>strong{max-width:100%;font-size:15px;line-height:1.4;font-weight:600;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-player :is(.ct-match-commander,.ct-match-deck-status,.ct-match-player-result){max-width:100%;color:#aeb7cc;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-player>button{box-sizing:border-box;width:100%;min-width:44px;min-height:44px;margin:0;padding:5px 0;border:0;border-radius:4px;background:transparent;color:#e5c84a;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-score{display:flex;justify-content:center;align-items:center;gap:4px;align-self:start;min-width:0;margin-top:8px;color:#f1f2fa;font-size:44px;line-height:1.25;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
#commander-table #ct-lobby .ct-match-score>[data-outcome=win],#commander-table #ct-lobby .ct-match-score>[data-outcome=shared]{color:#e5c84a}
#commander-table #ct-lobby .ct-match-versus{font-size:22px;color:#aeb7cc;margin-top:16px}
#commander-table #ct-lobby .ct-match-scoreboard>.ct-match-outcome{grid-column:1/-1;margin:5px 0 0;text-align:center;font-size:14px;line-height:1.5;color:#b7bfd2;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-scoreboard>.ct-match-outcome[data-outcome=win]{color:#e5c84a}
#commander-table #ct-lobby .ct-match-multiplayer{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
#commander-table #ct-lobby .ct-match-details .ct-series-rounds{margin:24px 0}
#commander-table #ct-lobby .ct-series-rounds>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
#commander-table #ct-lobby .ct-series-rounds h2{margin:0;font-size:20px;line-height:1.3;text-align:left}
#commander-table #ct-lobby .ct-series-rounds>header>span{font-size:13px;color:#aeb7cc}
#commander-table #ct-lobby .ct-match-round{margin:10px 0;border:1px solid #343b4e;border-radius:15px;background:#151925}
#commander-table #ct-lobby .ct-match-round-summary{display:grid;grid-template-columns:30px minmax(0,1fr) auto 16px;align-items:center;gap:10px;box-sizing:border-box;min-height:72px;padding:12px;cursor:pointer;list-style:none}
#commander-table #ct-lobby .ct-match-round-summary::marker{content:''}
#commander-table #ct-lobby .ct-match-round-summary::-webkit-details-marker{display:none}
#commander-table #ct-lobby .ct-match-round-number{display:grid;place-items:center;width:28px;height:28px;border:2px solid #6a7282;border-radius:50%;color:#f1f2fa;font-size:16px}
#commander-table #ct-lobby .ct-match-round[data-outcome=win] .ct-match-round-number,#commander-table #ct-lobby .ct-match-round[data-outcome=shared] .ct-match-round-number{border-color:#e5c84a}
#commander-table #ct-lobby .ct-match-round-summary>span:nth-child(2){display:grid;gap:4px;min-width:0}
#commander-table #ct-lobby .ct-match-round-summary :is(strong,small){font-size:12px;line-height:1.45;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-round-summary strong{font-size:13px;font-weight:500;color:#f1f2fa}
#commander-table #ct-lobby .ct-match-round-summary small{color:#aeb7cc}
#commander-table #ct-lobby .ct-match-round-time{max-width:68px;text-align:right;font-variant-numeric:tabular-nums}
#commander-table #ct-lobby .ct-match-round-summary>svg{width:16px;height:16px;color:#b7bfd2}
#commander-table #ct-lobby .ct-match-round[open]>.ct-match-round-summary>svg{transform:rotate(90deg)}
#commander-table #ct-lobby .ct-match-details .ct-event-list{margin:0 12px 14px;padding-left:22px;color:#b7bfd2;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-details .ct-event-list>li{margin:8px 0;padding-left:2px}
#commander-table #ct-lobby .ct-match-details .ct-event-list small{margin-right:4px;color:#aeb7cc}
#commander-table #ct-lobby :is(.ct-match-empty,.ct-match-rounding,.ct-match-context-note){margin:10px 0;color:#aeb7cc;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-match-round>.ct-match-empty{margin:0 12px 14px}
#commander-table #ct-lobby .ct-match-details .ct-match-events{margin:24px 0}
@media(max-width:360px){#commander-table #ct-lobby .ct-match-summary{padding:12px}#commander-table #ct-lobby .ct-match-scoreboard{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px 6px}#commander-table #ct-lobby .ct-match-score{font-size:36px;gap:2px}#commander-table #ct-lobby .ct-match-versus{font-size:20px}#commander-table #ct-lobby .ct-match-player>strong{font-size:14px}#commander-table #ct-lobby .ct-match-round-summary{gap:8px;padding:10px}#commander-table #ct-lobby .ct-match-details .ct-profile-game-heading h1{font-size:24px}}
@media(min-width:700px){#commander-table #ct-lobby .ct-match-avatar{width:56px;height:56px;font-size:28px}#commander-table #ct-lobby .ct-match-summary{padding:20px}#commander-table #ct-lobby .ct-match-player>strong{font-size:18px}#commander-table #ct-lobby .ct-match-player :is(.ct-match-commander,.ct-match-deck-status,.ct-match-player-result),#commander-table #ct-lobby .ct-match-player>button{font-size:13px}#commander-table #ct-lobby .ct-match-score{font-size:56px}}
@layer orbunity-app-glass{
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-match-details .ct-match-player>button{background-color:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important;color:#e5c84a!important;-webkit-text-fill-color:currentColor!important}
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-match-details :is(span,strong,small,p){-webkit-text-fill-color:currentColor!important}
@media(forced-colors:active){html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-match-details .ct-match-player>button{color:LinkText!important}}
}
@media(forced-colors:active){#commander-table #ct-lobby .ct-match-details :is(.ct-match-summary,.ct-match-round){background:Canvas;border-color:ButtonText}#commander-table #ct-lobby .ct-match-details :is(.ct-match-avatar,.ct-match-round-number){border-color:ButtonText}#commander-table #ct-lobby .ct-match-details :is([data-outcome=win],[data-outcome=shared]) :is(.ct-match-avatar,.ct-match-round-number){border-color:Highlight}#commander-table #ct-lobby .ct-match-details .ct-match-outcome,#commander-table #ct-lobby .ct-match-details .ct-match-score>span{color:CanvasText}}
#commander-table #ct-lobby .ct-profile-history .ct-history-delete-status{margin:0 0 10px;font-size:11px;line-height:1.4;color:#aeb7cc}
#commander-table #ct-lobby .ct-profile-history .ct-history-delete-status:empty{display:none}
#commander-table #ct-lobby .ct-profile-history .ct-history-help{margin:20px 0}
#commander-table #ct-lobby .ct-profile-history .ct-history-help>summary{justify-content:flex-start;gap:8px;width:auto;margin-left:0;font-size:12px}
#commander-table #ct-lobby .ct-history-day{margin:22px 0}
#commander-table #ct-lobby .ct-history-day>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
#commander-table #ct-lobby .ct-history-day h2{margin:0;text-align:left;font-size:16px;line-height:1.4;color:#f1f2fa}
#commander-table #ct-lobby .ct-history-day>header>span{font-size:12px;color:#aeb7cc}
#commander-table #ct-lobby .ct-profile-history .ct-history-list{gap:10px}
#commander-table #ct-lobby .ct-profile-history .ct-history-entry{background:transparent;border-radius:16px}
#commander-table #ct-lobby .ct-profile-history .ct-history-card{display:grid;grid-template-columns:30px minmax(0,1fr) auto 13px;align-items:center;gap:10px;box-sizing:border-box;width:100%;min-width:0;min-height:104px;margin:0;padding:14px 12px;border:1px solid #2e3547;border-radius:16px;background:#151925;text-align:left;color:#f1f2fa}
#commander-table #ct-lobby .ct-history-card>svg{width:27px;height:27px;color:#e5c84a}
#commander-table #ct-lobby .ct-history-card .ct-history-card-chevron{width:15px;height:15px;color:#aeb7cc}
#commander-table #ct-lobby .ct-history-card-main{display:grid;gap:5px;min-width:0}
#commander-table #ct-lobby .ct-history-card-main>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:15px;line-height:1.35;font-weight:600;overflow:hidden;white-space:normal;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-history-card-main>small{font-size:11px;line-height:1.4;color:#aeb7cc;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-history-card-time{display:flex;align-items:center;gap:5px}
#commander-table #ct-lobby .ct-history-card-time>svg{flex:none;width:12px;height:12px}
#commander-table #ct-lobby .ct-history-card-result{display:grid;gap:6px;max-width:100px;text-align:right;overflow-wrap:anywhere}
#commander-table #ct-lobby .ct-history-card-result>strong{font-size:12px;line-height:1.35;font-weight:500;color:#cbd1de}
#commander-table #ct-lobby .ct-history-card-result>small{font-size:12px;color:#aeb7cc}
#commander-table #ct-lobby .ct-history-card-result[data-outcome=win]>strong,#commander-table #ct-lobby .ct-history-card-result[data-outcome=shared]>strong{color:#e5c84a}
@media(max-width:360px){#commander-table #ct-lobby .ct-profile-history .ct-history-card{grid-template-columns:24px minmax(0,1fr) auto 10px;gap:7px;padding:12px 10px}#commander-table #ct-lobby .ct-history-card>svg{width:23px;height:23px}#commander-table #ct-lobby .ct-history-card-result{max-width:92px}#commander-table #ct-lobby .ct-history-card-main>strong{font-size:14px}#commander-table #ct-lobby .ct-history-card-result>strong{font-size:11px}#commander-table #ct-lobby .ct-stat-format-tabs{gap:6px}#commander-table #ct-lobby .ct-stat-format-tabs>button{padding-inline:14px}}
@media(min-width:900px){#commander-table #ct-lobby .ct-profile-statistics .ct-stat-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}#commander-table #ct-lobby .ct-profile-statistics>.ct-stat-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){#commander-table #ct-lobby .ct-profile-statistics *{scroll-behavior:auto}}
@layer orbunity-app-glass{
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-profile-statistics :is(.ct-profile-content-tabs,.ct-stat-format-tabs)>button{background-color:transparent!important;background-image:none!important;box-shadow:none!important;border-color:transparent!important;color:#aeb7cc!important;-webkit-text-fill-color:#aeb7cc!important}
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-profile-statistics .ct-profile-content-tabs>button[aria-pressed=true]{background-color:#303644!important;color:#f1f2fa!important;-webkit-text-fill-color:#f1f2fa!important}
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-profile-statistics .ct-stat-format-tabs>button{background-color:#171c28!important;border-color:#303749!important;color:#c4cbda!important;-webkit-text-fill-color:#c4cbda!important}
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-profile-statistics .ct-stat-format-tabs>button[aria-pressed=true]{background-color:#e5c84a!important;border-color:#e5c84a!important;color:#211d0b!important;-webkit-text-fill-color:#211d0b!important}
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-profile-statistics :is(.ct-stat-format-list button,.ct-stat-most,.ct-history-card){background-color:#151925!important;background-image:none!important;box-shadow:none!important;border-color:#2e3547!important;color:#f1f2fa!important;-webkit-text-fill-color:#f1f2fa!important}
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-profile-statistics :is(.ct-stat-format-list button,.ct-stat-most,.ct-history-card) :is(span,strong,small){-webkit-text-fill-color:currentColor!important}
html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-profile-statistics .ct-history-entry{background-color:transparent!important;border-color:transparent!important}
@media(forced-colors:active){html:not([data-app-glass=tracker]) #commander-table #ct-lobby .ct-profile-statistics :is(.ct-profile-content-tabs,.ct-stat-format-tabs)>button[aria-pressed=true]{background-color:Highlight!important;border-color:Highlight!important;color:HighlightText!important;-webkit-text-fill-color:HighlightText!important}}
}
@media(forced-colors:active){#commander-table #ct-lobby .ct-profile-statistics :is(.ct-stat-duel-card,.ct-stat-times,.ct-stat-disclosure,.ct-stat-metrics>div){background:Canvas;border-color:ButtonText;color:CanvasText}#commander-table #ct-lobby .ct-stat-format-bar::before,#commander-table #ct-lobby .ct-stat-placements dd>span{background:Highlight}}
/* Compact scanner: transparent presets reserve real camera space above the
   measured 5:7 capture area; only one thumbnail row is visible at a time. */
.ct-collection-dialog.ct-scanner-dialog.ct-live-scanner.ct-scan-page{--ct-scanner-height:calc(var(--ct-scan-page-height,100dvh) - var(--ct-scan-page-safe-top,env(safe-area-inset-top,0px)) - var(--ct-scan-page-safe-bottom,env(safe-area-inset-bottom,0px)));--ct-scanner-width:calc(var(--ct-scan-page-width,100vw) - var(--ct-scan-page-safe-left,env(safe-area-inset-left,0px)) - var(--ct-scan-page-safe-right,env(safe-area-inset-right,0px)));position:fixed;inset:var(--ct-scan-page-top,0px) auto auto var(--ct-scan-page-left,0px);width:var(--ct-scan-page-width,100vw);max-width:none;height:var(--ct-scan-page-height,100dvh);max-height:none;margin:0;padding:calc(var(--ct-scan-page-safe-top,env(safe-area-inset-top,0px)) + 16px) var(--ct-scan-page-safe-right,env(safe-area-inset-right,0px)) var(--ct-scan-page-safe-bottom,env(safe-area-inset-bottom,0px)) var(--ct-scan-page-safe-left,env(safe-area-inset-left,0px));border:0;border-radius:0;background:#07070d;color:#f1f2fa;box-shadow:none;text-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;font-family:'Exo 2',sans-serif;overflow:hidden;box-sizing:border-box;text-align:left}
.ct-collection-dialog.ct-scanner-dialog.ct-live-scanner.ct-scan-page[open]{display:grid;grid-template-rows:44px 44px minmax(0,1fr);gap:0}
.ct-scan-page .ct-scan-page-safe-probe{position:absolute;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
.ct-scan-page .ct-scan-page-heading{position:relative;display:flex;align-items:center;justify-content:flex-start;min-width:0;margin:0 16px;height:44px}
.ct-scan-page .ct-scan-page-heading h2{display:block;margin:0;padding:0 0 0 50px;min-height:0;font-size:20px;line-height:1.2;text-align:left}
.ct-scan-page .ct-scan-back{position:absolute;inset:0 auto 0 0;display:grid;place-items:center;width:44px;height:44px;min-width:44px;padding:0;margin:0;border:0;border-radius:0;background:transparent;color:#f1f2fa}
.ct-scan-page .ct-scan-back svg{width:24px;height:24px}
.ct-scan-page .ct-scan-toolbar{display:block;min-width:0;margin:0 16px}
.ct-scan-page .ct-scan-modes{display:grid;grid-template-columns:1fr 1fr;height:44px;padding:0;gap:0;border:0;border-bottom:1px solid #303542;border-radius:0}
.ct-scan-page .ct-scan-modes button{position:relative;display:block;min-width:0;height:44px;min-height:44px;margin:0;padding:0 6px;border:0;border-radius:0;background:transparent;color:#b8bdc8;font:inherit;font-size:15px;box-shadow:none}
.ct-scan-page .ct-scan-modes button[aria-pressed=true]{background:transparent;color:#e5c84a;box-shadow:none}
.ct-scan-page .ct-scan-modes button[aria-pressed=true]::after{content:'';position:absolute;inset:auto 12px -1px;height:2px;background:#e5c84a}
.ct-scan-page .ct-live-layout{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;gap:0;min-width:0;min-height:0}
.ct-scan-page .ct-scan-viewfinder{position:relative;display:block;min-width:0;min-height:0;margin:0;background:#10121a;overflow:hidden}
.ct-scan-page .ct-scan-camera{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;aspect-ratio:auto;border:0;border-radius:0;margin:0;overflow:hidden}
.ct-scan-page .ct-scan-camera video{display:block;width:100%;height:100%;object-fit:cover}
.ct-scan-page .ct-scan-capture-area{position:absolute;inset:var(--ct-scan-controls-height,76px) 0 8px;min-width:0;min-height:0;pointer-events:none}
.ct-scan-page .ct-scan-page-frame{position:absolute;left:50%;top:50%;width:var(--ct-scan-capture-width,71.428%);height:var(--ct-scan-capture-height,100%);transform:translate(-50%,-50%);pointer-events:none}
.ct-scan-page .ct-live-guide{border:0;box-shadow:none;background:linear-gradient(#e5c84a,#e5c84a) left top/12px 2px no-repeat,linear-gradient(#e5c84a,#e5c84a) right top/12px 2px no-repeat,linear-gradient(#e5c84a,#e5c84a) left bottom/12px 2px no-repeat,linear-gradient(#e5c84a,#e5c84a) right bottom/12px 2px no-repeat,linear-gradient(#e5c84a,#e5c84a) left top/2px 14px no-repeat,linear-gradient(#e5c84a,#e5c84a) right top/2px 14px no-repeat,linear-gradient(#e5c84a,#e5c84a) left bottom/2px 14px no-repeat,linear-gradient(#e5c84a,#e5c84a) right bottom/2px 14px no-repeat;opacity:.9}
.ct-scan-page[data-mode=art] .ct-live-guide{background:linear-gradient(#e5c84a,#e5c84a) left top/14px 2px no-repeat,linear-gradient(#e5c84a,#e5c84a) right top/14px 2px no-repeat,linear-gradient(#e5c84a,#e5c84a) left bottom/14px 2px no-repeat,linear-gradient(#e5c84a,#e5c84a) right bottom/14px 2px no-repeat,linear-gradient(#e5c84a,#e5c84a) left top/2px 14px no-repeat,linear-gradient(#e5c84a,#e5c84a) right top/2px 14px no-repeat,linear-gradient(#e5c84a,#e5c84a) left bottom/2px 14px no-repeat,linear-gradient(#e5c84a,#e5c84a) right bottom/2px 14px no-repeat}
.ct-scan-page .ct-scan-presets{position:absolute;inset:10px 16px auto;z-index:3;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.8fr) minmax(0,.9fr);gap:8px;max-width:440px;margin:0 auto;pointer-events:none}
.ct-scan-page .ct-scan-presets label{position:relative;display:block;min-width:0;min-height:52px;padding:0;pointer-events:auto;background:rgb(12 16 24 / .58);border:1px solid #d7def03d;border-radius:10px;color:#f1f2fa;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.ct-scan-page .ct-scan-page-field-label{position:absolute;top:4px;left:8px;width:auto;height:auto;padding:0;overflow:hidden;clip-path:none;font-size:11px;line-height:15px;white-space:nowrap;pointer-events:none}
.ct-scan-page .ct-scan-presets select{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:52px;height:52px;margin:0;padding:17px 16px 3px 8px;border:0;border-radius:9px;background:transparent;color:#f1f2fa;font:inherit;font-size:16px;line-height:1.25;text-overflow:ellipsis;box-shadow:none;color-scheme:dark}
.ct-scan-page .ct-scan-presets option{background:#151925;color:#f1f2fa}
.ct-scan-page .ct-scan-inputs{z-index:4}
.ct-scan-page .ct-scan-inputs button{background:#e5c84a;color:#171506;border:0;font-size:16px;font-weight:600}
.ct-scan-page .ct-scan-page-status{display:flex;align-items:center;min-height:26px;padding:4px 12px;background:#151925;border-bottom:1px solid #2e3441;box-sizing:border-box}
.ct-scan-page .ct-scan-status{flex:1;min-width:0;min-height:0;max-height:2.8em;overflow:auto;margin:0;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.ct-scan-page .ct-live-preview{--ct-scan-thumb-height:clamp(52px,8dvh,64px);--ct-scan-thumb-row:calc(var(--ct-scan-thumb-height) + 18px);display:grid;grid-template-columns:minmax(0,1fr) 84px;align-items:center;gap:10px;position:relative;min-width:0;min-height:0;margin:0;padding:6px 16px;border-top:1px solid #303542;background:#07070d}
.ct-scan-page .ct-scan-page-cards{position:relative;min-width:0;height:var(--ct-scan-thumb-row)}
.ct-scan-page #ct-live-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));grid-auto-rows:var(--ct-scan-thumb-row);align-content:start;align-items:start;gap:8px 6px;box-sizing:border-box;width:100%;height:var(--ct-scan-thumb-row);min-height:0;max-height:var(--ct-scan-thumb-row);margin:0;padding:0 6px 0 0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scroll-padding:0;scrollbar-gutter:stable;scrollbar-width:thin}
.ct-scan-page #ct-live-thumbs::-webkit-scrollbar{width:4px;height:0}
.ct-scan-page #ct-live-thumbs::-webkit-scrollbar-thumb{background:#7c8190;border-radius:3px}
.ct-scan-page .ct-scan-thumb{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;box-sizing:border-box;width:100%;min-width:0;height:var(--ct-scan-thumb-row);min-height:0;overflow:visible!important;margin:0;padding:0;border:0;border-radius:5px;background:transparent}
.ct-scan-page #ct-live-thumbs img{display:block;flex:none;width:calc(var(--ct-scan-thumb-height)*63/88);max-width:100%;height:var(--ct-scan-thumb-height);object-fit:contain;border-radius:4px;outline:0}
.ct-scan-page #ct-live-thumbs img[role=button]{min-width:44px}
.ct-scan-page .ct-scan-thumb.ct-is-foil::before,.ct-scan-page .ct-scan-thumb.ct-is-foil::after{inset:0 auto auto 50%;width:calc(var(--ct-scan-thumb-height)*63/88);height:var(--ct-scan-thumb-height);transform:translateX(-50%)}
.ct-scan-page .ct-scan-page-thumb-price{display:block;flex:none;width:100%;margin:0;text-align:center;white-space:nowrap;font-size:11px;font-weight:600;line-height:16px;font-variant-numeric:tabular-nums}
.ct-scan-page .ct-scan-page-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;margin:0;color:#aeb5c6;font-size:12px;pointer-events:none}
.ct-scan-page .ct-scan-page-review{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:4px;min-width:0;width:100%;padding:0 0 0 9px;border-left:1px solid #434958;box-sizing:border-box}
.ct-scan-page #ct-scan-review{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:0;box-sizing:border-box;width:100%;min-height:44px;height:44px;margin:0;padding:6px 4px;border:0;border-radius:9px;background:#e5c84a;color:#171506;font-size:14px;font-weight:600;white-space:nowrap}
.ct-scan-page .ct-scan-page-value{display:block;min-width:0;margin:0;padding:0;text-align:center}
.ct-scan-page #ct-scan-total{display:block;margin:0;font-size:19px;line-height:24px;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}
.ct-scan-page .ct-scan-sheet{inset:auto max(12px,var(--ct-scan-page-safe-right,0px)) calc(var(--ct-scan-page-safe-bottom,0px) + 12px) max(12px,var(--ct-scan-page-safe-left,0px));max-height:calc(var(--ct-scanner-height)*.7);background:#151925;background-image:none;box-shadow:none;text-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.ct-scan-page[data-compact=true]{padding-top:var(--ct-scan-page-safe-top,env(safe-area-inset-top,0px))}
.ct-scan-page[data-compact=true] .ct-live-preview{--ct-scan-thumb-height:48px}
.ct-scan-page[data-compact=true] .ct-scan-page-status{min-height:24px;padding-block:3px}
.ct-scan-page[data-compact=true] .ct-scan-presets{top:6px}
@media(min-width:900px){.ct-scan-page .ct-scan-page-heading,.ct-scan-page .ct-scan-toolbar{max-width:800px;width:calc(100% - 32px);margin-inline:auto}.ct-scan-page .ct-live-layout{width:min(100%,900px);justify-self:center}}
@media(orientation:landscape) and (max-height:600px){.ct-scan-page .ct-live-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.ct-scan-page .ct-scan-viewfinder{grid-column:1;grid-row:1/-1}.ct-scan-page .ct-scan-page-status{grid-column:2;grid-row:1}.ct-scan-page .ct-live-preview{grid-column:2;grid-row:2;align-self:end}.ct-scan-page .ct-scan-presets{inset:6px 8px auto;gap:4px}}
@media(max-width:360px){.ct-scan-page .ct-scan-presets{inset-inline:10px;gap:5px}.ct-scan-page .ct-live-preview{grid-template-columns:minmax(0,1fr) 78px;gap:6px}.ct-scan-page #ct-live-thumbs{grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:8px 4px}.ct-scan-page #ct-scan-total{font-size:17px}.ct-scan-page .ct-scan-page-review{padding-left:7px}}
@layer orbunity-app-glass{
html:not([data-app-glass=tracker]) .ct-scan-page.ct-live-scanner{background-color:#07070d!important;border-color:transparent!important}
html:not([data-app-glass=tracker]) .ct-scan-page :is(.ct-scan-back,.ct-scan-modes button){background-color:transparent!important;border-color:transparent!important;color:#b8bdc8!important}
html:not([data-app-glass=tracker]) .ct-scan-page .ct-scan-back{color:#f1f2fa!important}
html:not([data-app-glass=tracker]) .ct-scan-page .ct-scan-modes button[aria-pressed=true]{color:#e5c84a!important}
html:not([data-app-glass=tracker]) .ct-scan-page :is(#ct-scan-camera,#ct-scan-review){background-color:#e5c84a!important;border-color:#e5c84a!important;color:#171506!important}
html:not([data-app-glass=tracker]) .ct-scan-page .ct-scan-presets select{background-color:transparent!important;border-color:transparent!important}
@media(forced-colors:active){html:not([data-app-glass=tracker]) .ct-scan-page.ct-live-scanner,html:not([data-app-glass=tracker]) .ct-scan-page :is(.ct-scan-back,.ct-scan-modes button,#ct-scan-camera,#ct-scan-review,.ct-scan-presets select){background-color:Canvas!important;color:CanvasText!important;border-color:ButtonText!important}html:not([data-app-glass=tracker]) .ct-scan-page .ct-scan-modes button[aria-pressed=true]{color:Highlight!important}.ct-scan-page .ct-scan-presets label{background:Canvas;border-color:ButtonText}}
}

/* Approved Aufnahmen page: opaque app surface with one destination action. */
dialog.ct-card-dialog.ct-collection-dialog.ct-intake-page{position:fixed;box-sizing:border-box;inset:var(--ct-intake-top,0px) auto auto var(--ct-intake-left,0px);width:var(--ct-intake-width,100vw);max-width:none;height:var(--ct-intake-height,100dvh);max-height:none;min-width:0;min-height:0;margin:0;padding:calc(var(--ct-intake-safe-top,0px) + 16px) max(16px,var(--ct-intake-safe-right,0px)) calc(var(--ct-intake-safe-bottom,0px) + 12px) max(16px,var(--ct-intake-safe-left,0px));border:0;border-radius:0;outline:0;background:#07070d!important;background-image:none!important;color:#f1f2fa;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:hidden;font-family:"Exo 2",ui-sans-serif,system-ui,sans-serif;text-align:left;line-height:1.4;}
dialog.ct-intake-page[open]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:0;}.ct-intake-page::backdrop{background:#07070d;backdrop-filter:none;}.ct-intake-page [hidden]{display:none!important;}
.ct-intake-page .ct-intake-safe-probe{position:fixed;visibility:hidden;pointer-events:none;width:0;height:0;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);}
.ct-intake-page :is(.ct-intake-heading,.ct-intake-content,.ct-intake-footer){box-sizing:border-box;width:100%;max-width:1100px;min-width:0;margin-inline:auto;}.ct-intake-page .ct-intake-heading{display:flex;align-items:center;gap:8px;min-height:56px;padding:0 0 10px;border-bottom:1px solid #343947;}.ct-intake-page .ct-intake-heading>h2{flex:1;min-width:0;margin:0;padding:0;font-size:24px;font-weight:650;line-height:1.2;text-align:left;overflow-wrap:anywhere;outline:0;}.ct-intake-page #ct-stage-count{flex:none;font-size:13px;white-space:nowrap;}
.ct-intake-page button{box-sizing:border-box;min-height:44px;border:1px solid #434958;border-radius:10px;background:#151925!important;background-image:none!important;box-shadow:none!important;color:#f1f2fa;font:inherit;cursor:pointer;}.ct-intake-page button:disabled{cursor:default;}.ct-intake-page :is(button,input):focus-visible{outline:2px solid #e5c84a;outline-offset:-2px;}.ct-intake-page .ct-intake-back{flex:none;display:grid;place-items:center;width:44px;min-width:44px;height:44px;margin:0;padding:10px;border:0;border-radius:8px;background:transparent!important;}.ct-intake-page .ct-intake-back>svg{width:23px;height:23px;}
.ct-intake-page .ct-intake-content{overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;padding:12px 0 16px;}.ct-intake-page :is(.ct-intake-intro,.ct-intake-empty,.ct-intake-action-long){display:none;}.ct-intake-page .ct-stage-add-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;}.ct-intake-page .ct-stage-add-actions>button{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-width:0;padding:10px 6px;font-size:13px;line-height:1.25;white-space:normal;}.ct-intake-page .ct-stage-add-actions>button>svg{flex:none;width:20px;height:20px;}.ct-intake-page .ct-stage-add-actions>button :is(small,b){display:none;}.ct-intake-page .ct-stage-add-actions strong{font-size:inherit;font-weight:600;}.ct-intake-page #ct-scan-cards,.ct-intake-page #ct-stage-save{border-color:#e5c84a;background:#e5c84a!important;color:#15130a!important;-webkit-text-fill-color:#15130a!important;}.ct-intake-page :is(#ct-scan-cards,#ct-stage-save) *{-webkit-text-fill-color:currentColor!important;}
.ct-intake-page .ct-intake-value{display:grid;grid-template-columns:minmax(110px,.8fr) minmax(0,1.4fr);align-items:center;gap:12px;padding:16px 0 10px;}.ct-intake-page .ct-intake-value>div{min-width:0;}.ct-intake-page .ct-intake-value small{display:block;font-size:12px;}.ct-intake-page #ct-intake-total{display:block;font-size:28px;line-height:1.2;font-weight:650;white-space:nowrap;}.ct-intake-page #ct-intake-priced{align-self:stretch;display:flex;align-items:center;margin:0;padding-left:12px;border-left:1px solid #434958;font-size:12px;overflow-wrap:anywhere;}
.ct-intake-page .ct-intake-toolbar{display:flex;align-items:center;gap:16px;min-height:48px;margin:0 0 10px;}.ct-intake-page .ct-stage-view{flex:1;min-width:0;}.ct-intake-page .ct-card-view-switch{display:flex;gap:0;width:100%;margin:0;border-bottom:1px solid #343947;}.ct-intake-page .ct-card-view-switch>button{flex:1;position:relative;min-width:0;margin:0;padding:8px;border:0;border-radius:0;background:transparent!important;color:#b9bdc9;font-size:15px;}.ct-intake-page .ct-card-view-switch>button[aria-pressed=true]{background:transparent!important;color:#e5c84a!important;-webkit-text-fill-color:#e5c84a!important;}.ct-intake-page .ct-card-view-switch>button[aria-pressed=true]::after{content:"";position:absolute;inset:auto 0 -1px;height:3px;border-radius:3px;background:#e5c84a;}.ct-intake-page #ct-stage-select{flex:none;max-width:45%;padding:6px 10px;font-size:12px;}
.ct-intake-page .ct-stage-tools{gap:8px;margin:0;}.ct-intake-page .ct-stage-tools:not(:has(>:not([hidden]))){display:none;}.ct-intake-page .ct-stage-tools>.ct-select-all{display:flex;align-items:center;flex-direction:row;gap:8px;min-height:44px;margin:0;font-size:13px;}.ct-intake-page .ct-stage-tools>button{flex:1;min-width:110px;padding:8px;font-size:12px;}.ct-intake-page .ct-intake-recovery:has(>.ct-collection-feedback:empty):has(>button[hidden]){display:none;}.ct-intake-page .ct-intake-recovery{margin:4px 0 12px;}.ct-intake-page .ct-collection-feedback{margin:0;font-size:13px;overflow-wrap:anywhere;}.ct-intake-page #ct-stage-retry{margin-top:8px;padding:8px 12px;}
.ct-intake-page #ct-stage-cards:not(.ct-card-list){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px 12px;margin:0;}.ct-intake-page .ct-card-tile{position:relative;min-width:0;}.ct-intake-page .ct-deck-card{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;width:100%;padding:0;border:0;border-radius:0;background:transparent!important;text-align:left;}.ct-intake-page .ct-deck-card>img,.ct-intake-page .ct-deck-card>.ct-foil-art{order:-1;display:block;width:100%;max-width:100%;height:auto;min-height:0;aspect-ratio:63/88;border-radius:9px;object-fit:contain;background:#151925;}.ct-intake-page .ct-deck-card>.ct-foil-art>img{display:block;width:100%;height:100%;aspect-ratio:63/88;object-fit:contain;border-radius:inherit;}.ct-intake-page .ct-deck-card>strong{display:flex;align-items:baseline;gap:4px;min-width:0;width:100%;font-size:13px;line-height:1.3;font-weight:600;}.ct-intake-page .ct-card-name{min-width:0;overflow-wrap:anywhere;}.ct-intake-page .ct-intake-foil{color:#e5c84a;flex:none;margin-left:3px;}.ct-intake-page .ct-card-footer{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;min-width:0;width:100%;}.ct-intake-page .ct-intake-card-meta{min-width:0;font-size:10px;line-height:1.35;color:#c3c7d2;overflow-wrap:anywhere;}.ct-intake-page .ct-intake-price{display:flex;flex-direction:column;align-items:flex-end;flex:none;margin-left:auto;text-align:right;font-size:12px;line-height:1.35;font-weight:600;white-space:nowrap;}.ct-intake-page .ct-intake-price>small{font-size:9px;font-weight:400;color:#b9bdc9;}.ct-intake-page .ct-intake-missing-price{font-size:11px;font-weight:400;}
.ct-intake-page #ct-stage-cards.ct-card-list{display:block;margin:0;}.ct-intake-page .ct-card-list-row{position:relative;display:block;margin:0;padding:0;border-bottom:1px solid #343947;}.ct-intake-page .ct-card-list-row>button{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) auto auto;align-items:center;gap:8px;width:100%;min-height:64px;padding:6px 0;border:0;border-radius:0;background:transparent!important;white-space:normal;}.ct-intake-page .ct-intake-list-image{display:grid;place-items:center;width:42px;height:54px;min-width:0;overflow:hidden;background:#151925;border:1px solid #434958;border-radius:5px;}.ct-intake-page .ct-intake-list-image :is(img,.ct-foil-art){display:block;width:100%;height:100%;max-width:100%;object-fit:contain;}.ct-intake-page .ct-intake-list-copy{display:flex;flex-direction:column;gap:3px;min-width:0;text-align:left;}.ct-intake-page .ct-intake-list-copy>strong{font-size:13px;line-height:1.3;font-weight:600;}.ct-intake-page .ct-intake-list-copy>small{font-size:10px;color:#b9bdc9;overflow-wrap:anywhere;}.ct-intake-page .ct-intake-list-quantity{font-size:12px;white-space:nowrap;}.ct-intake-page .ct-card-selected :is(.ct-deck-card,.ct-card-list-row>button){outline:2px solid #e5c84a;outline-offset:-2px;}.ct-intake-page .ct-intake-check{position:absolute;top:7px;right:7px;display:grid;place-items:center;box-sizing:border-box;width:24px;height:24px;border:1px solid #b9bdc9;border-radius:50%;background:#151925;color:#e5c84a;font-size:17px;}.ct-intake-page .ct-card-list-row .ct-intake-check{top:auto;left:9px;right:auto;}
.ct-intake-page .ct-intake-footer{padding-top:8px;border-top:1px solid #434958;background:#07070d;}.ct-intake-page .ct-intake-price-note{margin:0 0 8px;font-size:10px;color:#c3c7d2;}.ct-intake-page .ct-intake-footer>div{display:flex;align-items:center;gap:16px;}.ct-intake-page .ct-intake-save-count{flex:1;font-size:13px;}.ct-intake-page #ct-stage-save{display:block;flex:2;min-width:0;margin:0;padding:10px 12px;min-height:48px;font-size:16px;font-weight:650;}
.ct-intake-page[data-empty=true] :is(.ct-intake-intro,.ct-intake-empty,.ct-intake-action-long){display:block;}.ct-intake-page[data-empty=true] :is(.ct-intake-value,.ct-intake-toolbar,.ct-stage-tools,.ct-intake-footer,.ct-intake-action-short,#ct-stage-cards){display:none!important;}.ct-intake-page[data-empty=true] .ct-intake-content{padding-top:26px;}.ct-intake-page .ct-intake-intro h3{margin:0 0 6px;font-size:25px;line-height:1.3;}.ct-intake-page .ct-intake-intro p{margin:0 0 26px;color:#c3c7d2;font-size:16px;}.ct-intake-page[data-empty=true] .ct-stage-add-actions{grid-template-columns:minmax(0,1fr);gap:12px;}.ct-intake-page[data-empty=true] .ct-stage-add-actions>button{justify-content:flex-start;gap:14px;min-height:76px;padding:14px 16px;text-align:left;font-size:18px;}.ct-intake-page[data-empty=true] .ct-stage-add-actions>button>svg{width:30px;height:30px;}.ct-intake-page[data-empty=true] .ct-stage-add-actions>button>span{flex:1;min-width:0;}.ct-intake-page[data-empty=true] .ct-stage-add-actions>button :is(small,b){display:block;}.ct-intake-page[data-empty=true] .ct-stage-add-actions small{margin-top:4px;font-size:12px;font-weight:400;}.ct-intake-page[data-empty=true] .ct-stage-add-actions b{font-size:28px;font-weight:400;}.ct-intake-page .ct-intake-empty{padding-top:26px;margin-top:28px;border-top:1px solid #434958;text-align:center;}.ct-intake-page .ct-intake-empty>svg{width:72px;height:72px;margin:0 auto 12px;color:#b9bdc9;}.ct-intake-page .ct-intake-empty>h3{margin:0;font-size:20px;}.ct-intake-page .ct-intake-empty>p{margin:8px 0 0;font-size:14px;color:#c3c7d2;}.ct-intake-page .ct-intake-empty>p:last-child{margin-top:28px;font-size:12px;}
@media(min-width:700px){.ct-intake-page #ct-stage-cards:not(.ct-card-list){grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:20px;}.ct-intake-page .ct-stage-add-actions{max-width:580px;}.ct-intake-page .ct-intake-value{max-width:580px;}.ct-intake-page[data-empty=true] .ct-intake-content{max-width:580px;}.ct-intake-page .ct-intake-price{font-size:14px;}.ct-intake-page .ct-intake-card-meta{font-size:12px;}.ct-intake-page .ct-intake-footer>div{margin-left:auto;max-width:580px;}}
@media(max-width:360px){.ct-intake-page .ct-stage-add-actions>button{gap:4px;font-size:11px;}.ct-intake-page .ct-stage-add-actions>button>svg{width:16px;height:16px;}.ct-intake-page .ct-intake-heading>h2{font-size:21px;}.ct-intake-page #ct-stage-count{font-size:11px;}.ct-intake-page #ct-intake-total{font-size:24px;}.ct-intake-page .ct-intake-value{grid-template-columns:minmax(105px,.8fr) minmax(0,1.3fr);gap:8px;}.ct-intake-page .ct-intake-price{font-size:11px;}.ct-intake-page .ct-intake-card-meta{font-size:9px;}.ct-intake-page .ct-card-list-row>button{grid-template-columns:34px minmax(0,1fr) auto auto;gap:5px;}.ct-intake-page .ct-intake-list-image{width:34px;height:47px;}.ct-intake-page .ct-intake-list-copy>strong{font-size:12px;}}
@media(forced-colors:active){dialog.ct-card-dialog.ct-collection-dialog.ct-intake-page,.ct-intake-page .ct-intake-footer{background:Canvas!important;color:CanvasText;}.ct-intake-page button{background:ButtonFace!important;color:ButtonText;border-color:ButtonText;}.ct-intake-page #ct-scan-cards,.ct-intake-page #ct-stage-save{background:Highlight!important;color:HighlightText!important;-webkit-text-fill-color:HighlightText!important;}.ct-intake-page .ct-card-view-switch>button[aria-pressed=true]{color:Highlight!important;-webkit-text-fill-color:Highlight!important;}.ct-intake-page .ct-card-view-switch>button[aria-pressed=true]::after{background:Highlight;}.ct-intake-page :is(button,input):focus-visible{outline-color:Highlight;}}
@layer orbunity-app-glass{
html:not([data-app-glass=tracker]) dialog.ct-intake-page{background-color:#07070d!important;border-color:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
html:not([data-app-glass=tracker]) .ct-intake-page :is(.ct-intake-back,.ct-deck-card,.ct-card-list-row>button,.ct-card-view-switch>button){background-color:transparent!important;border-color:transparent!important;box-shadow:none!important;}
html:not([data-app-glass=tracker]) .ct-intake-page :is(#ct-scan-cards,#ct-stage-save){background-color:#e5c84a!important;border-color:#e5c84a!important;color:#15130a!important;-webkit-text-fill-color:#15130a!important;}
html:not([data-app-glass=tracker]) .ct-intake-page .ct-card-view-switch>button[aria-pressed=true]{background-color:transparent!important;color:#e5c84a!important;-webkit-text-fill-color:#e5c84a!important;}
html:not([data-app-glass=tracker]) .ct-intake-page .ct-intake-back{color:#f1f2fa!important;}
html:not([data-app-glass=tracker]) .ct-intake-page .ct-card-list-row.ct-card-selected>button{outline:2px solid #e5c84a;outline-offset:-2px;}
@media(forced-colors:active){html:not([data-app-glass=tracker]) dialog.ct-intake-page{background-color:Canvas!important;color:CanvasText!important;}html:not([data-app-glass=tracker]) .ct-intake-page :is(#ct-scan-cards,#ct-stage-save){background-color:Highlight!important;border-color:Highlight!important;color:HighlightText!important;-webkit-text-fill-color:HighlightText!important;}html:not([data-app-glass=tracker]) .ct-intake-page .ct-card-view-switch>button[aria-pressed=true]{color:Highlight!important;-webkit-text-fill-color:Highlight!important;}}
}
.ct-intake-page .ct-card-view-switch{border:0;border-bottom:1px solid #343947;border-radius:0;padding:0;}.ct-intake-page .ct-deck-card .ct-card-name{text-align:left;white-space:normal;text-overflow:clip;}.ct-intake-page .ct-intake-heading>h2{display:block;justify-content:flex-start;text-align:left;}
.ct-scan-page .ct-scan-sheet{inset:auto calc(var(--ct-scan-page-safe-right,env(safe-area-inset-right,0px)) + 12px) calc(var(--ct-scan-page-safe-bottom,env(safe-area-inset-bottom,0px)) + 12px) calc(var(--ct-scan-page-safe-left,env(safe-area-inset-left,0px)) + 12px);width:min(820px,calc(var(--ct-scanner-width) - 24px));max-width:calc(var(--ct-scanner-width) - 24px)}

/* V0.18.92: keep native keyboard focus and functional states, remove focus frames. */
#commander-table .ct-search-filter-grip:focus-visible>span{outline:0!important;}
#commander-table #ct-lobby .op-profile-preview:has(>.op-profile-strip:focus-visible)>header h2{text-decoration:none!important;}
#commander-table .ct-actor-choice:focus-visible:not(:hover){border-color:#edf3ec;box-shadow:inset 0 0 22px #edf3ec28;}
#commander-table #ct-lobby .ct-symbol-options [data-insert-symbol]:focus-visible:not(:hover){background:transparent;}
#commander-table[data-bar-collapsed=true]:not([data-navigation-armed=true]) .ct-tracker-navigation #ct-home:focus-visible .ct-navigation-handle::before{border-color:var(--ct-muted);}

/* Aufnahmen: whole cards remain proportional, with no selected tile frames. */
.ct-intake-page .ct-intake-value{display:block;padding:14px 0 8px;}
.ct-intake-page .ct-intake-toolbar{gap:8px;margin-bottom:4px;}
.ct-intake-page #ct-stage-select{border:0;background:transparent!important;color:#b9bdc9!important;-webkit-text-fill-color:#b9bdc9!important;}
.ct-intake-page .ct-stage-tools{display:grid;grid-template-columns:max-content minmax(0,1fr) minmax(0,1fr);align-items:center;gap:6px;margin-bottom:8px;}
.ct-intake-page .ct-stage-tools>.ct-select-all{gap:6px;font-size:12px;white-space:nowrap;}
.ct-intake-page .ct-stage-tools>button{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;padding:6px 2px;border:0;background:transparent!important;color:#f1f2fa!important;-webkit-text-fill-color:#f1f2fa!important;font-size:12px;white-space:nowrap;}
.ct-intake-page .ct-stage-tools>button>svg{flex:none;width:15px;height:15px;}
.ct-intake-page #ct-stage-all{appearance:none;-webkit-appearance:none;position:relative;flex:none;box-sizing:border-box;width:20px;height:20px;min-width:20px;min-height:20px;margin:0;padding:0;border:1px solid #b9bdc9;border-radius:50%;background:#151925;}
.ct-intake-page #ct-stage-all:checked,.ct-intake-page #ct-stage-all:indeterminate{border-color:#e5c84a;background:#e5c84a;}
.ct-intake-page #ct-stage-all:checked::after{content:"";position:absolute;left:6px;top:3px;width:5px;height:9px;border:solid #15130a;border-width:0 2px 2px 0;transform:rotate(45deg);}
.ct-intake-page #ct-stage-all:indeterminate::after{content:"";position:absolute;left:4px;right:4px;top:8px;height:2px;background:#15130a;}
.ct-intake-page #ct-stage-cards:not(.ct-card-list){gap:14px 12px;}
.ct-intake-page #ct-stage-cards:not(.ct-card-list)>.ct-card-tile{width:min(100%,136px);max-width:100%;justify-self:center;}
.ct-intake-page #ct-stage-cards .ct-deck-card{padding:0;gap:3px;min-height:0;border:0!important;border-radius:0;background:transparent!important;color:#f1f2fa!important;-webkit-text-fill-color:#f1f2fa!important;box-shadow:none!important;}
.ct-intake-page #ct-stage-cards .ct-deck-card>img,.ct-intake-page #ct-stage-cards .ct-deck-card>.ct-foil-art{width:100%;height:auto;max-height:none;aspect-ratio:63/88;object-fit:contain;}
.ct-intake-page #ct-stage-cards .ct-deck-card>strong{min-height:0;margin:0;padding:0;font-size:13px;line-height:1.3;}
.ct-intake-page #ct-stage-cards .ct-card-footer{min-height:0;line-height:1.35;align-items:baseline;gap:4px;}
.ct-intake-page #ct-stage-cards .ct-intake-card-meta{margin:0;padding:0;font-size:10px;line-height:1.35;}
.ct-intake-page #ct-stage-cards .ct-intake-price{font-size:12px;line-height:1.35;}
.ct-intake-page #ct-stage-cards .ct-intake-foil{color:#e5c84a;-webkit-text-fill-color:#e5c84a!important;}
.ct-intake-page #ct-stage-cards :is(.ct-card-selected,.ct-card-selected>button,.ct-card-selected .ct-deck-card){outline:0!important;outline-offset:0!important;border-color:transparent!important;background:transparent!important;box-shadow:none!important;color:#f1f2fa!important;-webkit-text-fill-color:#f1f2fa!important;}
.ct-intake-page #ct-stage-cards .ct-intake-check{border-color:#b9bdc9;background:#151925;color:#15130a!important;-webkit-text-fill-color:#15130a!important;}
.ct-intake-page #ct-stage-cards .ct-card-selected .ct-intake-check{border-color:#e5c84a;background:#e5c84a;}
@media(max-width:360px){.ct-intake-page .ct-stage-tools{gap:4px;}.ct-intake-page .ct-stage-tools>.ct-select-all{gap:4px;font-size:11px;}.ct-intake-page .ct-stage-tools>button{gap:3px;font-size:11px;}.ct-intake-page .ct-stage-tools>button>svg{width:14px;height:14px;}.ct-intake-page #ct-stage-cards .ct-intake-card-meta{font-size:9px;}.ct-intake-page #ct-stage-cards .ct-intake-price{font-size:11px;}}
@media(forced-colors:active){.ct-intake-page #ct-stage-all{background:Canvas;border-color:ButtonText;}.ct-intake-page #ct-stage-all:checked,.ct-intake-page #ct-stage-all:indeterminate,.ct-intake-page #ct-stage-cards .ct-card-selected .ct-intake-check{background:Highlight;border-color:Highlight;color:HighlightText!important;-webkit-text-fill-color:HighlightText!important;}.ct-intake-page #ct-stage-all:checked::after{border-color:HighlightText;}.ct-intake-page #ct-stage-all:indeterminate::after{background:HighlightText;}.ct-intake-page #ct-stage-cards .ct-deck-card,.ct-intake-page #ct-stage-cards :is(.ct-card-selected,.ct-card-selected>button,.ct-card-selected .ct-deck-card){color:CanvasText!important;-webkit-text-fill-color:CanvasText!important;}}

/* The flat-material important layer owns fills; preserve the intake's clear actions. */
@layer orbunity-app-glass{
html:not([data-app-glass=tracker]) .ct-intake-page :is(#ct-stage-select,.ct-stage-tools>button){background-color:transparent!important;border-color:transparent!important;box-shadow:none!important;color:#f1f2fa!important;-webkit-text-fill-color:#f1f2fa!important;}
html:not([data-app-glass=tracker]) .ct-intake-page #ct-stage-cards :is(.ct-card-selected,.ct-card-selected>button,.ct-card-selected .ct-deck-card){background-color:transparent!important;border-color:transparent!important;box-shadow:none!important;color:#f1f2fa!important;-webkit-text-fill-color:#f1f2fa!important;}
html:not([data-app-glass=tracker]) .ct-intake-page #ct-stage-cards .ct-deck-card{color:#f1f2fa!important;-webkit-text-fill-color:#f1f2fa!important;}
html:not([data-app-glass=tracker]) .ct-intake-page #ct-stage-cards .ct-intake-foil{color:#e5c84a!important;-webkit-text-fill-color:#e5c84a!important;}
@media(forced-colors:active){html:not([data-app-glass=tracker]) .ct-intake-page :is(#ct-stage-select,.ct-stage-tools>button),html:not([data-app-glass=tracker]) .ct-intake-page #ct-stage-cards :is(.ct-deck-card,.ct-card-selected,.ct-card-selected>button,.ct-card-selected .ct-deck-card){color:CanvasText!important;-webkit-text-fill-color:CanvasText!important;}}
}
/* Price text scales within its own column, without measuring camera frames. */
.ct-scan-page .ct-scan-thumb{container-type:inline-size;grid-column:span var(--ct-scan-price-span,1)}
.ct-scan-page .ct-scan-page-value{container-type:inline-size}
.ct-scan-page .ct-scan-page-thumb-price{font-size:var(--ct-scan-price-fallback,11px)}
.ct-scan-page #ct-scan-total{--ct-scan-price-max:19px;font-size:var(--ct-scan-price-fallback,19px)}
@media(max-width:360px){.ct-scan-page #ct-scan-total{--ct-scan-price-max:17px}}
@supports(width:1cqw){.ct-scan-page .ct-scan-page-thumb-price{font-size:min(11px,calc((100cqw - 2px)/var(--ct-scan-price-units,1)))}.ct-scan-page #ct-scan-total{font-size:min(var(--ct-scan-price-max,19px),calc((100cqw - 2px)/var(--ct-scan-price-units,1)))}}
