/* Clear Table presentation: a minimal tabletop-first game view. */
body.clear-table-ui.tabletest-scale-shell {
  --card-w: clamp(104px, 7.2vw, 132px);
  --card-h: clamp(146px, 10.05vw, 185px);
  --board-unit-card-w: calc(var(--card-w) * 0.69);
  --board-unit-card-h: calc(var(--card-h) * 0.69);
  --site-card-w: clamp(90px, 7.04vw, 118px);
  --site-card-h: calc(var(--site-card-w) * 0.7142857);
  --site-card-tilt-x: -5deg;
  --site-card-rotate-z: -0.08deg;
  --clear-pile-strip-width: 492px;
  --clear-planet-gap: 32px;
  --clear-hand-gap: 16px;
  --clear-hand-lane-width: clamp(500px, 36vw, 690px);
  --clear-context-menu-height: 178px;
  --clear-log-width: clamp(220px, 16vw, 300px);
  --clear-log-height: calc(100vh - 118px - var(--clear-context-menu-height) - 12px);
  --clear-player-width: 220px;
  /* Keep the playmat square until an explicit, user-controlled 3D mode is ready. */
  --clear-table-tilt-x: 0deg;
  --clear-table-rotate-z: 0deg;
  --clear-card-tilt-x: 8deg;
  --clear-card-rotate-z: -0.16deg;
  background:
    radial-gradient(circle at 18% 16%, rgba(var(--you-rgb), 0.08), transparent 28%),
    radial-gradient(circle at 83% 8%, rgba(var(--opponent-rgb), 0.08), transparent 24%),
    linear-gradient(135deg, #10151a, #151d21 48%, #0e1215) !important;
}

html.client-html.tabletest-scale-html,
body.clear-table-ui.tabletest-scale-shell,
body.clear-table-ui.tabletest-scale-shell #app {
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-log-collapsed {
  --clear-log-width: 46px;
  --clear-log-height: 46px;
}

body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="play"] .hand-card {
  outline: 2px solid rgba(67, 183, 255, 0.72) !important;
  outline-offset: 3px !important;
}

body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="attach"] .board-stage .table-card.you-theme:not(.board-site-card),
body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="ability"] .board-stage .table-card:has(.ability-action),
body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="ability"] .board-stage .table-card:has(.pressure-action),
body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="ability"] .board-stage .table-card:has(.field-weld-action),
body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="ability"] .board-stage .table-card:has(.grundo-repair-action),
body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="ability"] .board-stage .table-card:has(.root-armor-action) {
  outline: 2px solid rgba(240, 195, 106, 0.82) !important;
  outline-offset: 4px !important;
}

body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="manifest"] .board-stage .table-card.clear-table-manifest-target {
  outline: 2px solid rgba(75, 222, 182, 0.88) !important;
  outline-offset: 4px !important;
  box-shadow:
    0 0 0 1px rgba(75, 222, 182, 0.28),
    0 12px 26px rgba(0, 0, 0, 0.42) !important;
}

body.clear-table-ui.tabletest-scale-shell[data-clear-context-mode="attack"] .board-stage .table-card.clear-table-attack-target {
  outline: 2px solid rgba(255, 104, 112, 0.9) !important;
  outline-offset: 4px !important;
  box-shadow:
    0 0 0 1px rgba(255, 104, 112, 0.3),
    0 12px 26px rgba(0, 0, 0, 0.42) !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-players-collapsed {
  --clear-player-width: 46px;
}

body.clear-table-ui.tabletest-scale-shell #app::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.012) 1px, transparent 1px),
    #0d1215 !important;
  background-size: 42px 42px, 42px 42px, auto !important;
}

body.clear-table-ui.tabletest-scale-shell .game {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 34px 28px 44px 86px minmax(280px, 1fr) 176px !important;
  grid-template-areas:
    "top"
    "status"
    "turn"
    "opponent"
    "board"
    "hand" !important;
  gap: 4px !important;
  padding: 0 !important;
  background: transparent !important;
  width: 100vw !important;
  min-width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
  transform: none !important;
  transform-origin: top left !important;
}

body.clear-table-ui.tabletest-scale-shell .panel,
body.clear-table-ui.tabletest-scale-shell .table-card,
body.clear-table-ui.tabletest-scale-shell .phase-tracker,
body.clear-table-ui.tabletest-scale-shell .status-message-pill,
body.clear-table-ui.tabletest-scale-shell .planet-player-info {
  backdrop-filter: none !important;
}

body.clear-table-ui.tabletest-scale-shell .top-row,
body.clear-table-ui.tabletest-scale-shell .turn-control-row,
body.clear-table-ui.tabletest-scale-shell .status-row {
  width: 100% !important;
  min-width: 0 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 7px !important;
  background: rgba(5, 8, 10, 0.72) !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .top-row {
  grid-area: top !important;
  height: 34px !important;
  padding: 4px 7px !important;
}

body.clear-table-ui.tabletest-scale-shell .room-game-row {
  grid-template-columns: minmax(220px, 1fr) auto auto !important;
  gap: 8px !important;
}

body.clear-table-ui.tabletest-scale-shell .room-line,
body.clear-table-ui.tabletest-scale-shell .room-subline {
  font-size: 0.68rem !important;
  line-height: 1.1 !important;
}

body.clear-table-ui.tabletest-scale-shell .room-subline,
body.clear-table-ui.tabletest-scale-shell .version-pill {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .game-info-strip {
  justify-self: end !important;
}

body.clear-table-ui.tabletest-scale-shell .game-timer {
  min-height: 24px !important;
  padding: 3px 8px !important;
  border-radius: 5px !important;
  font-size: 0.68rem !important;
}

body.clear-table-ui.tabletest-scale-shell .toolbar {
  gap: 4px !important;
}

body.clear-table-ui.tabletest-scale-shell .top-row .toolbar a,
body.clear-table-ui.tabletest-scale-shell .top-row .toolbar button {
  min-height: 26px !important;
  padding: 3px 8px !important;
  border-radius: 5px !important;
  font-size: 0.64rem !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-toggle[aria-pressed="true"] {
  border-color: rgba(240,195,106,0.55) !important;
  color: #ffe7aa !important;
  background: rgba(240,195,106,0.13) !important;
}

body.clear-table-ui.tabletest-scale-shell .status-row {
  grid-area: status !important;
  height: 28px !important;
  min-height: 0 !important;
  padding: 3px 8px !important;
}

body.clear-table-ui.tabletest-scale-shell .status-message-pill {
  width: 100% !important;
  min-height: 24px !important;
  padding: 3px 10px !important;
  border: 0 !important;
  border-radius: 5px !important;
  color: rgba(233, 239, 244, 0.82) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.7rem !important;
}

body.clear-table-ui.tabletest-scale-shell .turn-control-row {
  grid-area: turn !important;
  height: 44px !important;
  min-height: 0 !important;
  padding: 4px 6px !important;
}

body.clear-table-ui.tabletest-scale-shell .turn-control {
  height: 36px !important;
}

body.clear-table-ui.tabletest-scale-shell .phase-tracker {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) 88px !important;
  gap: 4px !important;
  padding: 3px 5px !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,0.026) !important;
  box-shadow: none !important;
  transition: none !important;
}

body.clear-table-ui.tabletest-scale-shell .phase-tracker.setup-phase {
  grid-template-columns: 1fr !important;
  place-items: center !important;
}

body.clear-table-ui.tabletest-scale-shell .phase-tracker > strong {
  align-self: center !important;
  overflow: hidden !important;
  color: rgba(238,246,252,0.94) !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

body.clear-table-ui.tabletest-scale-shell .phase-domino-track {
  align-self: stretch !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 3px !important;
  min-width: 0 !important;
}

body.clear-table-ui.tabletest-scale-shell .phase-chip {
  min-height: 0 !important;
  height: 100% !important;
  border-radius: 5px !important;
  padding: 2px 4px !important;
  background: rgba(255,255,255,0.035) !important;
}

body.clear-table-ui.tabletest-scale-shell .phase-arrow.phase-next-button {
  align-self: stretch !important;
  width: 88px !important;
  height: 100% !important;
  border-radius: 6px !important;
  font-size: 0.82rem !important;
}

body.clear-table-ui.tabletest-scale-shell .phase-chip.active {
  border-color: rgba(240,195,106,0.66) !important;
  color: #fff2c8 !important;
  background: rgba(126,85,28,0.68) !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .damage-row,
body.clear-table-ui.tabletest-scale-shell .damage-row.damage-row-empty {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .layout {
  display: contents !important;
}

body.clear-table-ui.tabletest-scale-shell .board-wrap {
  grid-area: board !important;
  position: relative !important;
  justify-self: center !important;
  width: min(100vw, calc(100vh * 1.42)) !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .board-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 1px solid rgba(188, 205, 214, 0.18);
  border-radius: 9px;
  background:
    linear-gradient(90deg, rgba(226, 234, 238, 0.1) 1px, transparent 1px),
    #192125;
  background-size: 16.666% 100%, auto;
  box-shadow:
    0 26px 62px rgba(0,0,0,0.46),
    inset 0 18px 70px rgba(255,255,255,0.025),
    inset 0 -42px 90px rgba(0,0,0,0.34);
  transform: none;
  transform-origin: 50% 54%;
  pointer-events: none;
}

body.clear-table-ui.tabletest-scale-shell .board-stage,
body.clear-table-ui.tabletest-scale-shell .board-content {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage {
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .site-zone {
  top: 0 !important;
  height: 100% !important;
  padding-top: 8px !important;
  border: 0 !important;
  border-right: 1px solid rgba(240,195,106,0.16) !important;
  background:
    linear-gradient(to bottom,
      rgba(var(--opponent-rgb),0.035) 0 50%,
      rgba(var(--you-rgb),0.035) 50% 100%) !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .site-zone:nth-of-type(even) {
  background:
    linear-gradient(to bottom,
      rgba(var(--opponent-rgb),0.05) 0 50%,
      rgba(var(--you-rgb),0.05) 50% 100%) !important;
}

body.clear-table-ui.tabletest-scale-shell .site-zone.you-theme {
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .site-zone.opponent-theme {
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .site-zone .zone-seat,
body.clear-table-ui.tabletest-scale-shell .site-zone .zone-name {
  color: rgba(235, 242, 247, 0.5) !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .site-zone .zone-seat {
  opacity: 0.28 !important;
  font-size: 0.62rem !important;
}

body.clear-table-ui.tabletest-scale-shell .site-zone .zone-name {
  opacity: 0.38 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
}

body.clear-table-ui.tabletest-scale-shell .center-line {
  display: none !important;
  width: 1px !important;
  background: rgba(240,195,106,0.26) !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .lane-inspect-toggle,
body.clear-table-ui.tabletest-scale-shell .lane-battle-math {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .board-hint {
  bottom: 12px !important;
  z-index: 260 !important;
  max-width: min(760px, calc(100% - 28px)) !important;
  border-radius: 6px !important;
  background: rgba(4,8,11,0.86) !important;
  font-size: 0.72rem !important;
}

body.clear-table-ui.tabletest-scale-shell .table-card {
  border-color: rgba(255,255,255,0.22) !important;
  border-radius: 6px !important;
  box-shadow: 0 7px 16px rgba(0,0,0,0.46) !important;
  background: transparent !important;
  overflow: visible !important;
  transform: perspective(900px) rotateX(var(--clear-card-tilt-x)) rotateZ(var(--clear-card-rotate-z)) !important;
  transform-origin: 50% 72% !important;
  transition: none !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card:not(.board-site-card) {
  width: var(--board-unit-card-w) !important;
  height: var(--board-unit-card-h) !important;
}

body.clear-table-ui.tabletest-scale-shell .table-card .layer-badge,
body.clear-table-ui.tabletest-scale-shell .table-card .owner-badge {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.opponent-theme {
  transform: perspective(980px) rotateX(-15deg) rotateZ(180deg) scale(0.86) !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.you-theme {
  transform: perspective(980px) rotateX(6deg) rotateZ(0deg) scale(1.04) !important;
}

body.clear-table-ui.tabletest-scale-shell .table-card.tapped {
  transform: perspective(900px) rotateX(var(--clear-card-tilt-x)) rotateZ(90deg) !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.opponent-theme.tapped {
  transform: perspective(980px) rotateX(-15deg) rotateZ(270deg) scale(0.86) !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.you-theme.tapped {
  transform: perspective(980px) rotateX(6deg) rotateZ(90deg) scale(1.05) !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.horizontal-card.size-site-token,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.horizontal-card.size-token-site,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.horizontal-card.portrait-site-card {
  top: calc(50% - (var(--site-card-h) / 2)) !important;
  width: var(--site-card-w) !important;
  height: var(--site-card-h) !important;
  aspect-ratio: 3.5 / 2.5 !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card.you-theme,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card.opponent-theme {
  transform: perspective(980px) rotateX(var(--site-card-tilt-x)) rotateZ(var(--site-card-rotate-z)) scale(1) !important;
  transform-origin: 50% 50% !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card.opponent-theme {
  transform: perspective(980px) rotateX(var(--site-card-tilt-x)) rotateZ(calc(180deg + var(--site-card-rotate-z))) scale(1) !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card.tapped,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card.you-theme.tapped {
  transform: perspective(980px) rotateX(var(--site-card-tilt-x)) rotateZ(90deg) scale(1) !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card.opponent-theme.tapped {
  transform: perspective(980px) rotateX(var(--site-card-tilt-x)) rotateZ(270deg) scale(1) !important;
}

body.clear-table-ui.tabletest-scale-shell .table-card-context-actions {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card .table-card-art,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.horizontal-card.size-site-token .table-card-art,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.horizontal-card.size-token-site .table-card-art,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.horizontal-card.portrait-site-card .table-card-art {
  aspect-ratio: 3.5 / 2.5 !important;
}

body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.board-site-card:not(.horizontal-card),
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.portrait-site-card:not(.horizontal-card),
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.size-site-token:not(.horizontal-card),
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.size-token-site:not(.horizontal-card) {
  width: var(--site-card-w) !important;
  height: var(--site-card-h) !important;
}

body.clear-table-ui.tabletest-scale-shell .table-card-art,
body.clear-table-ui.tabletest-scale-shell .planet-card-art,
body.clear-table-ui.tabletest-scale-shell .hand-card-thumb,
body.clear-table-ui.tabletest-scale-shell .card-art img,
body.clear-table-ui.tabletest-scale-shell .card-art {
  border-radius: 6px !important;
}

body.clear-table-ui.tabletest-scale-shell .table-card.selected {
  outline: 2px solid #f0c36a !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(240,195,106,0.16), 0 9px 20px rgba(0,0,0,0.5) !important;
}

body.clear-table-ui.tabletest-scale-shell .card-zoom-button {
  opacity: 0 !important;
}

body.clear-table-ui.tabletest-scale-shell .table-card:hover .card-zoom-button,
body.clear-table-ui.tabletest-scale-shell .table-card:focus-within .card-zoom-button {
  opacity: 1 !important;
}

body.clear-table-ui.tabletest-scale-shell .game-log-rail,
body.clear-table-ui.tabletest-scale-shell .planet-rail,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.side-drawer.game-log-rail,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.opponent-side-drawer.game-log-rail,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.side-drawer.planet-rail,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.your-side-drawer.planet-rail {
  position: fixed !important;
  inset: auto !important;
  grid-area: auto !important;
  transform: none !important;
  min-height: 0 !important;
  padding: 8px !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 8px !important;
  background: rgba(4, 7, 9, 0.78) !important;
  box-shadow: 0 16px 36px rgba(0,0,0,0.28) !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

body.clear-table-ui.tabletest-scale-shell .game-log-rail,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.side-drawer.game-log-rail,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.opponent-side-drawer.game-log-rail {
  top: auto !important;
  left: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  z-index: 35 !important;
  width: min(var(--clear-log-width), calc(100vw - 32px)) !important;
  height: min(var(--clear-log-height), calc(100vh - 96px)) !important;
  resize: both !important;
}

body.clear-table-ui.tabletest-scale-shell #opponentSideDrawer.game-log-rail {
  top: 118px !important;
  left: 0 !important;
  right: auto !important;
  bottom: calc(var(--clear-context-menu-height) + 8px) !important;
  height: auto !important;
  transform: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-context-menu {
  position: fixed !important;
  left: 0 !important;
  bottom: 0 !important;
  z-index: 2500 !important;
  width: clamp(250px, 18vw, 340px) !important;
  min-height: var(--clear-context-menu-height) !important;
  padding: 10px !important;
  border: 1px solid rgba(84, 170, 224, 0.34) !important;
  border-left: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 8px 0 0 !important;
  background: rgba(9, 13, 16, 0.94) !important;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.34) !important;
  color: rgba(239, 247, 252, 0.94) !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-context-title {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-context-meta {
  margin-top: 2px !important;
  color: rgba(190, 204, 214, 0.78) !important;
  font-size: 0.72rem !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-context-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-top: 10px !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-context-actions button {
  min-height: 30px !important;
  padding: 5px 7px !important;
  border: 1px solid rgba(144, 169, 183, 0.34) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  color: rgba(238, 246, 252, 0.92) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-context-actions button.active {
  border-color: rgba(67, 183, 255, 0.82) !important;
  background: rgba(29, 101, 148, 0.48) !important;
  color: #ffffff !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-context-actions button:disabled {
  opacity: 0.42 !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-context-next-button {
  grid-column: span 2 !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-context-hint {
  margin-top: 8px !important;
  min-height: 16px !important;
  color: rgba(205, 219, 228, 0.76) !important;
  font-size: 0.7rem !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-manifest-tooltip {
  position: fixed !important;
  z-index: 2700 !important;
  max-width: min(260px, calc(100vw - 20px)) !important;
  padding: 7px 9px !important;
  border: 1px solid rgba(75, 222, 182, 0.48) !important;
  border-radius: 7px !important;
  background: rgba(7, 13, 15, 0.94) !important;
  color: rgba(238, 255, 250, 0.96) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.38) !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-manifest-tooltip.hidden {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.side-drawer.planet-rail,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.your-side-drawer.planet-rail {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell #yourSideDrawer.planet-rail {
  left: calc(var(--game-left, 0px) + 12px) !important;
  right: auto !important;
  transform: none !important;
}

body.clear-table-ui.tabletest-scale-shell .game-log-rail .side-drawer-content {
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 5px !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .side-drawer-content {
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden auto !important;
}

body.clear-table-ui.tabletest-scale-shell .game-log-rail h2,
body.clear-table-ui.tabletest-scale-shell .planet-rail h2 {
  margin: 0 !important;
  color: rgba(236, 242, 247, 0.76) !important;
  font-size: 0.66rem !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-log-title-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-width: 0 !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-log-minimize {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border-radius: 5px !important;
  font-size: 0 !important;
  line-height: 1 !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-log-minimize::before {
  content: "";
  display: block;
  width: 10px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: currentColor;
}

body.clear-table-ui.tabletest-scale-shell .game-log-rail .log-input-row {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 4px !important;
  margin: 0 !important;
}

body.clear-table-ui.tabletest-scale-shell .game-log-rail input,
body.clear-table-ui.tabletest-scale-shell .game-log-rail button {
  min-height: 24px !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  font-size: 0.62rem !important;
}

body.clear-table-ui.tabletest-scale-shell .game-log {
  height: auto !important;
  min-height: 0 !important;
  padding: 3px 0 !important;
  overflow: hidden auto !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.68rem !important;
  line-height: 1.3 !important;
}

body.clear-table-ui.tabletest-scale-shell .log-line,
body.clear-table-ui.tabletest-scale-shell .game-log-entry {
  padding: 4px 0 !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-log-collapsed .game-log-rail {
  resize: none !important;
  top: 118px !important;
  bottom: auto !important;
  width: 46px !important;
  height: 46px !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-log-collapsed .game-log-rail .side-drawer-content > :not(.clear-log-title-row) {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-log-collapsed .game-log-rail {
  display: grid !important;
  place-items: center !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-log-collapsed .clear-log-title-row h2 {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-log-collapsed .clear-log-minimize::before {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  background: transparent;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail-content {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 7px !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .opponent-planet-stack,
body.clear-table-ui.tabletest-scale-shell .planet-rail .your-planet-stack {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 4px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-panel {
  height: 100% !important;
  min-height: 0 !important;
  padding: 2px !important;
  gap: 2px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,0.022) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-panel-header,
body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-card-footer {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-slot {
  position: relative !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  place-items: center !important;
  background: transparent !important;
  border: 0 !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-empty {
  min-height: 120px !important;
  padding: 8px !important;
  border-radius: 6px !important;
  font-size: 0.68rem !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-card,
body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-card.landscape-planet-card {
  width: min(100%, 174px) !important;
  border-radius: 6px !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-card-context-actions {
  margin: 4px 2px 0 !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-card-context-actions button {
  min-height: 23px !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  font-size: 0.62rem !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-awaken-cta,
body.clear-table-ui.tabletest-scale-shell .planet-slot > .planet-awaken-cta {
  bottom: 6px !important;
  width: min(88%, 146px) !important;
  min-height: 28px !important;
  padding: 5px 8px !important;
  border-radius: 5px !important;
  font-size: 0.62rem !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-echo-readout,
body.clear-table-ui.tabletest-scale-shell .planet-slot > .planet-echo-readout {
  top: 6px !important;
  right: 6px !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 54px !important;
  grid-template-columns: auto auto !important;
  gap: 4px !important;
  padding: 3px 6px !important;
  border-radius: 999px !important;
  transform: none !important;
  pointer-events: none !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-echo-readout span,
body.clear-table-ui.tabletest-scale-shell .planet-slot > .planet-echo-readout span {
  font-size: 0.54rem !important;
}

body.clear-table-ui.tabletest-scale-shell .planet-rail .planet-echo-readout strong,
body.clear-table-ui.tabletest-scale-shell .planet-slot > .planet-echo-readout strong {
  font-size: 0.86rem !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-players-collapsed .planet-rail .side-drawer-content {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell.clear-players-collapsed .planet-rail::after {
  content: "Planets";
  position: absolute;
  inset: 10px 0 auto;
  color: rgba(225,235,242,0.58);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

body.clear-table-ui.tabletest-scale-shell .opponent-table-console {
  grid-area: opponent !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 610px !important;
  gap: 10px !important;
  height: 86px !important;
  min-width: 0 !important;
  pointer-events: none !important;
}

body.clear-table-ui.tabletest-scale-shell .opponent-zone-hand,
body.clear-table-ui.tabletest-scale-shell .opponent-zone-piles {
  position: relative !important;
  min-width: 0 !important;
  height: 86px !important;
}

body.clear-table-ui.tabletest-scale-shell .opponent-zone-hand {
  display: flex !important;
  align-items: start !important;
  justify-content: center !important;
  overflow: visible !important;
}

body.clear-table-ui.tabletest-scale-shell .opponent-card-back,
body.clear-table-ui.tabletest-scale-shell .opponent-pile-card {
  flex: 0 0 62px !important;
  width: 62px !important;
  height: 88px !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 6px !important;
  background:
    linear-gradient(135deg, rgba(240,195,106,0.15), rgba(119,153,168,0.1)),
    linear-gradient(180deg, #11191f, #06090c) !important;
  box-shadow: 0 7px 15px rgba(0,0,0,0.36) !important;
  transform: perspective(980px) rotateX(-15deg) rotateZ(180deg) scale(0.86) !important;
}

body.clear-table-ui.tabletest-scale-shell .opponent-card-back img,
body.clear-table-ui.tabletest-scale-shell .opponent-pile-card img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 6px !important;
}

body.clear-table-ui.tabletest-scale-shell .opponent-card-back + .opponent-card-back {
  margin-left: -18px !important;
}

body.clear-table-ui.tabletest-scale-shell .opponent-pile-card {
  position: absolute !important;
  top: 8px !important;
  overflow: hidden !important;
}

body.clear-table-ui.tabletest-scale-shell .opponent-pile-card::after {
  content: attr(data-count);
  position: absolute;
  right: 6px;
  bottom: 5px;
  color: rgba(245,248,250,0.78);
  font-size: 0.64rem;
  font-weight: 850;
}

body.clear-table-ui.tabletest-scale-shell .opponent-pile-card.resource { left: 0 !important; }
body.clear-table-ui.tabletest-scale-shell .opponent-pile-card.deck { left: 72px !important; }
body.clear-table-ui.tabletest-scale-shell .opponent-pile-card.used { left: 144px !important; }
body.clear-table-ui.tabletest-scale-shell .opponent-pile-card.discard { left: 216px !important; }

body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet {
  position: absolute !important;
  left: auto !important;
  right: 0 !important;
  bottom: 2px !important;
  width: var(--card-w) !important;
  height: var(--card-h) !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

body.clear-table-ui.tabletest-scale-shell .board-hand-console,
body.clear-table-ui.tabletest-scale-shell .board-hand-console:hover,
body.clear-table-ui.tabletest-scale-shell .board-hand-console:focus-within {
  grid-area: hand !important;
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 176px !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .board-hand-console .drawer-tab,
body.clear-table-ui.tabletest-scale-shell .hand-heading,
body.clear-table-ui.tabletest-scale-shell .pile-sidebar > h2,
body.clear-table-ui.tabletest-scale-shell .pile-note {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .board-hand-console .deck-console {
  position: relative !important;
  display: block !important;
  height: 100% !important;
  min-width: 0 !important;
}

body.clear-table-ui.tabletest-scale-shell .hand-main-area {
  position: absolute !important;
  right: calc(var(--card-w) + var(--clear-planet-gap) + var(--clear-pile-strip-width) + var(--clear-hand-gap)) !important;
  bottom: 0 !important;
  width: var(--clear-hand-lane-width) !important;
  min-width: var(--clear-hand-lane-width) !important;
  max-width: var(--clear-hand-lane-width) !important;
  height: 100% !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  z-index: 2 !important;
}

body.clear-table-ui.tabletest-scale-shell .hand-cards {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 0 !important;
  height: 100% !important;
  justify-content: flex-end !important;
  align-items: end !important;
  gap: 0 !important;
  padding: 0 6px 2px !important;
  overflow: visible !important;
}

body.clear-table-ui.tabletest-scale-shell .hand-empty {
  align-self: center !important;
  padding: 10px 14px !important;
  border-radius: 6px !important;
  background: rgba(4, 7, 9, 0.62) !important;
}

body.clear-table-ui.tabletest-scale-shell .hand-card,
body.clear-table-ui.tabletest-scale-shell .hand-card-thumb {
  flex: 0 0 136px !important;
  width: 136px !important;
  height: 190px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  box-shadow: 0 7px 18px rgba(0,0,0,0.44) !important;
  transform: perspective(900px) rotateX(var(--clear-card-tilt-x)) rotateZ(var(--clear-card-rotate-z)) !important;
  transform-origin: 50% 78% !important;
  transition: none !important;
}

body.clear-table-ui.tabletest-scale-shell .hand-card + .hand-card {
  margin-left: -10px !important;
}

body.clear-table-ui.tabletest-scale-shell .hand-card:hover,
body.clear-table-ui.tabletest-scale-shell .hand-card:focus-within {
  z-index: 40 !important;
  transform: perspective(900px) rotateX(var(--clear-card-tilt-x)) rotateZ(var(--clear-card-rotate-z)) translateY(-12px) !important;
}

body.clear-table-ui.tabletest-scale-shell .hand-card.pending-unit-play {
  outline: 2px solid #f0c36a !important;
  outline-offset: 2px !important;
}

body.clear-table-ui.tabletest-scale-shell .hand-card-name {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .pile-sidebar {
  position: absolute !important;
  right: calc(var(--card-w) + var(--clear-planet-gap)) !important;
  bottom: 0 !important;
  width: var(--clear-pile-strip-width) !important;
  height: 100% !important;
  padding-left: 0 !important;
  border-left: 0 !important;
  overflow: visible !important;
  pointer-events: auto !important;
  z-index: 3 !important;
}

body.clear-table-ui.tabletest-scale-shell .pile-controls {
  position: relative !important;
  display: block !important;
  width: 492px !important;
  height: 176px !important;
}

body.clear-table-ui.tabletest-scale-shell .pile-box {
  position: absolute !important;
  top: 12px !important;
  width: 112px !important;
  min-height: 0 !important;
  height: 176px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  border-color: rgba(255,255,255,0.12) !important;
  background: rgba(5, 8, 10, 0.68) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.24) !important;
  transform: perspective(900px) rotateX(var(--clear-card-tilt-x)) rotateZ(var(--clear-card-rotate-z)) !important;
  transform-origin: 50% 78% !important;
  overflow: hidden !important;
}

body.clear-table-ui.tabletest-scale-shell .pile-box.resource { left: 0 !important; }
body.clear-table-ui.tabletest-scale-shell .pile-box.deck { left: 124px !important; }
body.clear-table-ui.tabletest-scale-shell .pile-box.used { left: 248px !important; }
body.clear-table-ui.tabletest-scale-shell .pile-box.discard { left: 372px !important; }
body.clear-table-ui.tabletest-scale-shell .token-bank { display: none !important; }

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock {
  position: absolute !important;
  right: 0 !important;
  bottom: 8px !important;
  width: var(--card-w) !important;
  height: var(--card-h) !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-panel,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-panel {
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-panel-header,
body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-card-footer,
body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-player-info,
body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-card-context-actions,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-panel-header,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-card-footer,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-player-info,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-card-context-actions {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-slot,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-slot {
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-card,
body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-card.landscape-planet-card,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-card,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-card.landscape-planet-card {
  position: relative !important;
  width: var(--card-w) !important;
  max-width: var(--card-w) !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: 0 10px 22px rgba(0,0,0,0.42) !important;
  overflow: hidden !important;
  scrollbar-width: none !important;
  transform: perspective(900px) rotateX(var(--clear-card-tilt-x)) rotateZ(var(--clear-card-rotate-z)) !important;
  transform-origin: 50% 78% !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-card {
  transform: perspective(980px) rotateX(-15deg) rotateZ(180deg) scale(0.86) !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-panel::-webkit-scrollbar,
body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-slot::-webkit-scrollbar,
body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-card::-webkit-scrollbar,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-panel::-webkit-scrollbar,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-slot::-webkit-scrollbar,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-card::-webkit-scrollbar {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-awaken-cta,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-awaken-cta {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-echo-readout,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-echo-readout {
  position: absolute !important;
  display: grid !important;
  place-items: center !important;
  grid-template-columns: 1fr !important;
  top: 50% !important;
  right: auto !important;
  left: auto !important;
  inset-inline-start: 50% !important;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  padding: 0 !important;
  border: 3px solid color-mix(in srgb, var(--planet-echo-color, #7ddaff) 76%, white 18%) !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.34), transparent 28%),
    radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--planet-echo-color, #7ddaff) 38%, rgba(5, 8, 13, 0.92)), rgba(5, 8, 13, 0.94) 72%) !important;
  color: #fff !important;
  box-shadow:
    0 0 0 2px rgba(0,0,0,0.46),
    0 0 18px color-mix(in srgb, var(--planet-echo-color, #7ddaff) 68%, transparent),
    0 8px 18px rgba(0,0,0,0.42) !important;
  z-index: 4 !important;
  transform: translate(-50%, -50%) !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-echo-readout span,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-echo-readout span {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-planet-dock .planet-echo-readout strong,
body.clear-table-ui.tabletest-scale-shell .clear-opponent-planet .planet-echo-readout strong {
  min-width: 0 !important;
  color: inherit !important;
  font-size: 1.22rem !important;
  line-height: 1 !important;
  text-align: center !important;
}

body.clear-table-ui.tabletest-scale-shell .pile-stack-preview,
body.clear-table-ui.tabletest-scale-shell .token-bank-preview {
  width: 112px !important;
  height: 156px !important;
}

body.clear-table-ui.tabletest-scale-shell .pile-header,
body.clear-table-ui.tabletest-scale-shell .pile-box.used .pile-header {
  top: 5px !important;
  width: 102px !important;
}

body.clear-table-ui.tabletest-scale-shell .pile-header strong {
  font-size: 0.56rem !important;
}

body.clear-table-ui.tabletest-scale-shell .resource-pile-draw-controls {
  top: 28px !important;
  width: 80px !important;
}

body.clear-table-ui.tabletest-scale-shell .resource-pile-draw-controls button,
body.clear-table-ui.tabletest-scale-shell .pile-actions button {
  border-radius: 4px !important;
  font-size: 0.58rem !important;
}

body.clear-table-ui.tabletest-scale-shell .selected-card-drawer,
body.clear-table-ui.tabletest-scale-shell .viewport-pinned-drawer.selected-card-drawer,
body.clear-table-ui.tabletest-scale-shell .card-hover-preview {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview {
  position: fixed !important;
  top: 112px !important;
  left: auto !important;
  right: 16px !important;
  z-index: 2400 !important;
  display: block !important;
  width: min(260px, 18vw) !important;
  max-height: calc(100vh - 136px) !important;
  pointer-events: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview.hidden {
  display: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: calc(100vh - 136px) !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview.landscape-preview {
  width: min(340px, 24vw) !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview.landscape-preview.rotate-image-clockwise .clear-table-preview-art,
body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview.landscape-preview.rotate-image-counterclockwise .clear-table-preview-art {
  aspect-ratio: 3.5 / 2.5 !important;
  overflow: hidden !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview.rotate-image-clockwise img {
  position: absolute !important;
  inset: auto !important;
  left: 50% !important;
  top: 50% !important;
  width: calc(100% * 2.5 / 3.5) !important;
  height: calc(100% * 3.5 / 2.5) !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: fill !important;
  transform: translate(-50%, -50%) rotate(90deg) !important;
  transform-origin: center center !important;
}

body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview.rotate-image-counterclockwise img {
  position: absolute !important;
  inset: auto !important;
  left: 50% !important;
  top: 50% !important;
  width: calc(100% * 2.5 / 3.5) !important;
  height: calc(100% * 3.5 / 2.5) !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: fill !important;
  transform: translate(-50%, -50%) rotate(-90deg) !important;
  transform-origin: center center !important;
}

@media (prefers-reduced-motion: reduce) {
  body.clear-table-ui.tabletest-scale-shell *,
  body.clear-table-ui.tabletest-scale-shell *::before,
  body.clear-table-ui.tabletest-scale-shell *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Three placement columns per Site lane; keep orientation without size drift. */
body.clear-table-ui.tabletest-scale-shell .site-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: block !important;
  background:
    linear-gradient(to right,
      transparent calc(33.333% - 0.5px), rgba(188,205,214,0.09) 33.333%,
      transparent calc(33.333% + 0.5px), transparent calc(66.667% - 0.5px),
      rgba(188,205,214,0.09) 66.667%, transparent calc(66.667% + 0.5px)) top / 100% calc(50% - (var(--site-card-h) / 2) - 8px) no-repeat,
    linear-gradient(to right,
      transparent calc(33.333% - 0.5px), rgba(188,205,214,0.09) 33.333%,
      transparent calc(33.333% + 0.5px), transparent calc(66.667% - 0.5px),
      rgba(188,205,214,0.09) 66.667%, transparent calc(66.667% + 0.5px)) bottom / 100% calc(50% - (var(--site-card-h) / 2) - 8px) no-repeat;
}
body.clear-table-ui.tabletest-scale-shell .site-zone::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: calc(50% - (var(--site-card-h) / 2) - 8px);
  height: calc(var(--site-card-h) + 16px);
  display: block !important;
  pointer-events: none;
  border-top: 1px solid rgba(240,195,106,0.18);
  border-bottom: 1px solid rgba(240,195,106,0.18);
  background: rgba(240,195,106,0.025);
}
body.clear-table-ui.tabletest-scale-shell .ship-site-crew-bay {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(75,222,182,0.16);
  background: rgba(75,222,182,0.035);
}
body.clear-table-ui.tabletest-scale-shell .ship-site-crew-bay::after {
  content: "CREW";
  position: absolute;
  right: 4px;
  bottom: 3px;
  color: rgba(117,235,204,0.32);
  font-size: 0.48rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}
body.clear-table-ui.tabletest-scale-shell .ship-site-crew-bay.far::after {
  top: 3px;
  bottom: auto;
}
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.you-theme:not(.board-site-card) { transform: rotate(0deg) !important; }
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.opponent-theme:not(.board-site-card) { transform: rotate(180deg) !important; }
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.you-theme.tapped:not(.board-site-card) { transform: rotate(90deg) !important; }
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card.opponent-theme.tapped:not(.board-site-card) { transform: rotate(270deg) !important; }
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card:not(.board-site-card) { transform-origin: center center !important; }

/* Printed artwork carries the card frame; reserve board emphasis for game state. */
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card {
  border: 0;
  border-radius: 2px;
  background: transparent;
}
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card:not(.selected):not(.attach-source):not(.attack-source):not([class*="target"]):not([class*="cleanup"]):not(.spot-check-source):not(.lily-distraction-source) {
  box-shadow: none;
}
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card-art,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card .card-img {
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.clear-table-ui.tabletest-scale-shell .board-stage .attachment-badge,
body.clear-table-ui.tabletest-scale-shell .board-stage .table-card-attachment-summary,
body.clear-table-ui.tabletest-scale-shell .board-stage .story-formation-name,
body.clear-table-ui.tabletest-scale-shell .board-stage .counter-row,
body.clear-table-ui.tabletest-scale-shell .board-stage .card-zoom-button,
body.clear-table-ui.tabletest-scale-shell .board-stage .unattuned-badge,
body.clear-table-ui.tabletest-scale-shell .board-stage .unmanned-badge,
body.clear-table-ui.tabletest-scale-shell .board-stage .cant-block-badge {
  display: none !important;
}
body.clear-table-ui.tabletest-scale-shell .board-stage .stat-mod-overlay {
  border-radius: 2px;
  box-shadow: none;
  padding: 2px 3px;
  min-width: 0;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
  text-shadow: none;
}
body.clear-table-ui.tabletest-scale-shell .board-stage .stat-mod-overlay.locked::after {
  display: none;
}
body.clear-table-ui.tabletest-scale-shell .clear-table-preview-art {
  position: relative;
}
body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview img {
  max-height: min(46vh, 360px) !important;
}
body.clear-table-ui.tabletest-scale-shell .clear-table-preview-details {
  margin-top: 8px;
  padding: 10px 12px;
  color: #edf1f4;
  background: rgba(16, 23, 28, 0.96);
  font: 12px/1.45 system-ui, sans-serif;
  text-align: left;
  max-height: 30vh;
  overflow-y: auto;
  pointer-events: auto;
  overflow-wrap: anywhere;
}
body.clear-table-ui.tabletest-scale-shell .clear-table-preview-details[hidden] { display: none; }
body.clear-table-ui.tabletest-scale-shell .clear-table-preview-details > div + div { margin-top: 5px; }
body.clear-table-ui.tabletest-scale-shell .clear-table-preview-details > div:first-child { font-weight: 650; }
body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview.rotate-image-clockwise img,
body.clear-table-ui.tabletest-scale-shell .clear-table-click-preview.rotate-image-counterclockwise img { max-height: none !important; }

body.clear-table-ui.tabletest-scale-shell .board-stage .stat-mod-overlay-stack {
  left: 2px;
  top: auto;
  bottom: 3px;
  gap: 2px;
}
