#app.sahba-active .sahba-topbar {
  justify-content: center !important;
}

#app.sahba-active .sahba-pause-controls {
  position: absolute !important;
  top: 16px !important;
  right: 28px !important;
  left: auto !important;
  z-index: 4300 !important;
}

#app.sahba-active .sahba-exit-icon {
  position: absolute !important;
  top: 16px !important;
  left: 28px !important;
  right: auto !important;
  z-index: 4300 !important;
}

#app.sahba-active .sahba-pause-state {
  display: none !important;
}

#app.sahba-active:not([data-sahba-layout='portrait']) .sahba-player-avatar-top {
  left: calc(50% - 38px) !important;
  top: 42px !important;
  width: 76px !important;
  height: 76px !important;
  border-width: 5px !important;
  z-index: 3650 !important;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.42),
    0 0 0 3px rgba(255, 246, 209, 0.1) !important;
}

#app.sahba-active:not([data-sahba-layout='portrait']) .sahba-seat-name-top {
  left: calc(50% - 78px) !important;
  top: 138px !important;
  width: 156px !important;
  z-index: 3660 !important;
  text-align: center !important;
}

#app.sahba-active:not([data-sahba-layout='portrait']) .sahba-player-avatar-left {
  left: 96px !important;
  top: 497px !important;
  z-index: 3650 !important;
}

#app.sahba-active:not([data-sahba-layout='portrait']) .sahba-player-avatar-right {
  left: 1738px !important;
  top: 497px !important;
  z-index: 3650 !important;
}

#app.sahba-active:not([data-sahba-layout='portrait']) .sahba-seat-name-left,
#app.sahba-active:not([data-sahba-layout='portrait']) .sahba-seat-name-right {
  top: 650px !important;
  width: 132px !important;
  z-index: 3660 !important;
  text-align: center !important;
}

#app.sahba-active:not([data-sahba-layout='portrait']) .sahba-seat-name-left {
  left: 86px !important;
  top: 650px !important;
}

#app.sahba-active:not([data-sahba-layout='portrait']) .sahba-seat-name-right {
  left: 1702px !important;
}


#app.sahba-active .sahba-player-avatar.auction-countdown-active .turn-countdown:not(:empty) {
  display: grid !important;
  transform: scale(var(--auction-countdown-scale, 1.63)) !important;
  transform-origin: center center !important;
  opacity: var(--auction-countdown-opacity, 1) !important;
  font-size: 68px !important;
  color: #fff4bd !important;
  text-shadow: 0 4px 8px rgba(0,0,0,.95), 0 0 16px rgba(255,222,105,.55) !important;
  will-change: transform, opacity;
}

@keyframes sahbaAuctionCountdownFlow {
  0% { transform: translate(-50%, -50%) scale(1.28); opacity: 1; }
  58% { transform: translate(-50%, -50%) scale(.9); opacity: .8; }
  100% { transform: translate(-50%, -50%) scale(.38); opacity: .14; }
}

#app.sahba-active .sahba-auction-timer.sahba-auction-card-countdown {
  width: 112px !important;
  height: 112px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  animation: sahbaAuctionCountdownFlow 1s cubic-bezier(.22,.68,.3,1) infinite !important;
  animation-delay: var(--auction-countdown-delay, 0ms) !important;
  transform-origin: center center !important;
  color: #fff4bd !important;
  font-size: 72px !important;
  font-weight: 900 !important;
  text-shadow: 0 4px 9px rgba(0,0,0,.96), 0 0 15px rgba(255,222,105,.6) !important;
  will-change: transform, opacity;
}

#app.sahba-active .sahba-hand-card.sahba-tap-selected {
  outline: 4px solid rgba(255, 255, 255, .9) !important;
  outline-offset: -2px !important;
  box-shadow: 0 0 0 3px rgba(0, 200, 215, .45), 0 10px 18px rgba(0, 0, 0, .32) !important;
}

#app.sahba-active .sahba-hand-card.sahba-auction-bid-eligible {
  cursor: pointer !important;
  filter: none !important;
  opacity: 1 !important;
  outline: 4px solid rgba(0, 200, 215, .9) !important;
  outline-offset: 0 !important;
  box-shadow: 0 5px 0 rgba(0, 124, 138, .58), 0 9px 12px rgba(0, 0, 0, .24) !important;
  transition: none !important;
}

#app.sahba-active .sahba-hand-card.sahba-auction-bid-ineligible {
  filter: none !important;
  opacity: 1 !important;
  transition: none !important;
}

#app.sahba-active .sahba-stack-mat {
  position: absolute;
  left: 0;
  top: 0;
  width: 138px;
  height: 195px;
  box-sizing: border-box;
  border: 4px solid rgba(139, 236, 207, .68);
  border-radius: 20px;
  background: radial-gradient(circle at 50% 32%, rgba(17, 126, 96, .82), rgba(2, 39, 32, .96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .48), 0 0 0 2px rgba(3, 40, 32, .82), inset 0 0 0 3px rgba(255, 255, 255, .09), inset 0 -18px 28px rgba(0, 0, 0, .28);
  pointer-events: none;
}


#app.sahba-active .sahba-scoreboard {
  direction: rtl;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eafff7;
  background: linear-gradient(180deg, rgba(3, 71, 54, .94), rgba(1, 34, 27, .94));
  border: 1px solid rgba(174, 255, 225, .38);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.08);
}
#app.sahba-active .sahba-scoreboard span + span {
  border-right: 1px solid rgba(214,255,244,.24);
  padding-right: 10px;
}
#app.sahba-active .sahba-scoreboard strong {
  color: #fff1a8;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
#app.sahba-active .sahba-take-all-toggle {
  appearance: none;
  pointer-events: auto;
  color: #dffbf2;
  background: rgba(1, 38, 29, .86);
  border: 1px solid rgba(196, 255, 234, .34);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 8px 18px rgba(0,0,0,.24);
}
#app.sahba-active .sahba-take-all-toggle.is-active {
  color: #173a30;
  background: linear-gradient(180deg, #fff2a7, #dfb64f);
  border-color: #fff4ba;
  box-shadow: 0 0 0 4px rgba(255, 226, 125, .17), 0 8px 20px rgba(0,0,0,.28);
}
#app.sahba-active .sahba-summary-result {
  color: #ffc3ca;
  font-family: "Basra Kufi", Tahoma, sans-serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 4px 15px rgba(0,0,0,.55);
}
@media (max-height: 520px) and (orientation: landscape) {
  #app.sahba-active .sahba-scoreboard {
    padding: 6px 11px;
    font-size: 17px;
  }
  #app.sahba-active .sahba-scoreboard strong {
    font-size: 21px;
  }
  #app.sahba-active .sahba-take-all-toggle {
    min-height: 38px;
    padding: 0 12px;
    font-size: 15px;
  }
}


#app.sahba-active .sahba-hand-card.sahba-local-ai-card {
  filter: brightness(.48) saturate(.72) !important;
  opacity: 1 !important;
  pointer-events: none !important;
  transition: none !important;
}
#app.sahba-active .sahba-local-ai-overlay {
  z-index: 7800;
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 268px;
  width: auto;
  height: auto;
  transform: translateX(calc(-50% - 26px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0;
  box-sizing: border-box;
  color: #eafff7;
  font-size: 20px;
  font-weight: 800;
  background: transparent !important;
  border-radius: 0;
}
#app.sahba-active .sahba-local-ai-overlay button {
  pointer-events: auto;
  appearance: none;
  min-width: 270px;
  min-height: 78px;
  padding: 0 42px;
  color: #f2fff9;
  background: linear-gradient(180deg, rgba(20, 126, 96, .98), rgba(5, 79, 60, .98));
  border: 1px solid rgba(211, 255, 239, .58);
  border-radius: 999px;
  font-family: "Basra Kufi", Tahoma, Arial, sans-serif;
  font-size: 36px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.16);
}
#app.sahba-active .sahba-local-ai-overlay button:active {
  transform: translateY(1px) scale(.985);
}

/* Sahba top status and controls 20260903 */
#app.sahba-active .sahba-topbar {
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  height: 104px !important;
  min-height: 104px !important;
  padding: 18px 28px !important;
  box-sizing: border-box !important;
  pointer-events: none !important;
  z-index: 7600 !important;
}
#app.sahba-active .sahba-scoreboard {
  position: absolute !important;
  top: 18px !important;
  left: 50% !important;
  right: auto !important;
  translate: 0 0 !important;
  transform: translateX(-50%) !important;
  min-height: 58px !important;
  padding: 10px 20px !important;
  font-size: 21px !important;
  gap: 16px !important;
}
#app.sahba-active .sahba-scoreboard strong { font-size: 29px !important; }
#app.sahba-active .sahba-top-actions {
  position: absolute !important;
  top: 18px !important;
  right: 28px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  pointer-events: auto !important;
  z-index: 7700 !important;
}
#app.sahba-active .sahba-top-icon {
  position: relative !important;
  inset: auto !important;
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  padding: 0 !important;
  border-radius: 16px !important;
}
#app.sahba-active .sahba-top-icon .settings-button-icon {
  width: 44px !important;
  height: 44px !important;
  flex-basis: 44px !important;
  font-size: 31px !important;
}
#app.sahba-active .sahba-settings-button.is-open {
  border-color: rgba(255, 232, 143, .92) !important;
  box-shadow: 0 0 0 4px rgba(255, 225, 119, .13), 0 10px 22px rgba(0, 0, 0, .3) !important;
}
#app.sahba-active .sahba-exit-icon {
  top: 18px !important;
  left: 28px !important;
}
#app.sahba-active .sahba-pause-controls {
  top: 96px !important;
  left: 28px !important;
  right: auto !important;
  translate: 0 0 !important;
}
#app.sahba-active .sahba-take-all-toggle {
  position: absolute !important;
  top: 154px !important;
  left: 28px !important;
  right: auto !important;
  translate: 0 0 !important;
  z-index: 7400 !important;
}
#app.sahba-active .sahba-settings-popover {
  position: absolute;
  top: 94px;
  right: 28px;
  width: 238px;
  box-sizing: border-box;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 225, 119, .42);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(5, 48, 37, .97), rgba(1, 20, 15, .98));
  box-shadow: 0 18px 38px rgba(0, 0, 0, .46), inset 0 1px rgba(255, 255, 255, .08);
  color: #fff2b8;
  text-align: center;
  pointer-events: auto;
  z-index: 7800;
}
#app.sahba-active .sahba-settings-popover strong {
  font-size: 20px;
}
#app.sahba-active .sahba-settings-popover button {
  min-height: 48px;
  border: 1px solid rgba(255, 225, 119, .44);
  border-radius: 11px;
  background: rgba(255, 255, 255, .08);
  color: #fff6d1;
  font: 800 18px/1 Tahoma, Arial, sans-serif;
}

#app.sahba-active .sahba-settings-popover { display: none !important; }
#app.sahba-active .sahba-settings-popover.is-open { display: grid !important; }

/* Unified top strip inside the portrait play boundary. */
#app.sahba-active[data-sahba-layout='portrait'] .sahba-topbar {
  top: 26px !important;
  left: 96px !important;
  right: 96px !important;
  width: auto !important;
  height: 76px !important;
  min-height: 76px !important;
  padding: 8px 12px !important;
  border: 1px solid rgba(154, 240, 210, .34) !important;
  border-top-color: rgba(255, 235, 164, .28) !important;
  border-radius: 0 0 22px 22px !important;
  background: linear-gradient(180deg, rgba(2, 58, 45, .94), rgba(1, 35, 28, .96)) !important;
  box-shadow: 0 9px 22px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .08) !important;
}

#app.sahba-active[data-sahba-layout='portrait'] .sahba-scoreboard {
  top: 8px !important;
  left: 50% !important;
  min-height: 56px !important;
  padding: 8px 18px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#app.sahba-active[data-sahba-layout='portrait'] .sahba-top-actions {
  top: 10px !important;
  right: 12px !important;
  gap: 8px !important;
}

#app.sahba-active[data-sahba-layout='portrait'] .sahba-top-icon {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  border-radius: 14px !important;
}

#app.sahba-active[data-sahba-layout='portrait'] .sahba-top-icon .settings-button-icon {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  font-size: 27px !important;
}

#app.sahba-active.sahba-target-choice-active .sahba-card:not(.sahba-tap-selected):not(.sahba-pile-targetable) {
  filter: brightness(.46) saturate(.72) contrast(.92) !important;
  opacity: 1 !important;
}

#app.sahba-active.sahba-target-choice-active .sahba-tap-selected,
#app.sahba-active.sahba-target-choice-active .sahba-pile-targetable {
  filter: none !important;
  opacity: 1 !important;
}

#app.sahba-active.sahba-target-choice-active .sahba-pile-targetable {
  outline: 5px solid rgba(0, 200, 215, .95) !important;
  outline-offset: 0 !important;
  box-shadow: 0 5px 0 rgba(0, 124, 138, .62), 0 10px 16px rgba(0, 0, 0, .34) !important;
}

#app.sahba-active.sahba-target-choice-active .sahba-ground-area-frame {
  filter: brightness(.58) saturate(.78) !important;
  opacity: .7 !important;
}

#app.sahba-active.sahba-target-choice-active .sahba-ground-area-frame.sahba-ground-targetable {
  filter: none !important;
  opacity: 1 !important;
  border-color: rgba(0, 200, 215, .95) !important;
  box-shadow: inset 0 7px rgba(255, 244, 188, .18), inset 0 0 0 3px rgba(0, 200, 215, .35), 0 5px 0 rgba(0, 124, 138, .58), 0 18px 34px rgba(0, 0, 0, .46) !important;
}

#app.sahba-active.sahba-target-choice-active .sahba-card:not(.sahba-tap-selected):not(.sahba-pile-targetable),
#app.sahba-active.sahba-target-choice-active .sahba-stack-mat:not(.sahba-pile-targetable),
#app.sahba-active.sahba-target-choice-active .sahba-ground-area-frame:not(.sahba-pile-targetable) {
  filter: brightness(.62) saturate(.78) contrast(.94) !important;
  opacity: .82 !important;
}

#app.sahba-active.sahba-target-choice-active .sahba-tap-selected,
#app.sahba-active.sahba-target-choice-active .sahba-pile-targetable,
#app.sahba-active.sahba-target-choice-active .sahba-take-all-target {
  filter: none !important;
  opacity: 1 !important;
}

#app.sahba-active .sahba-ground-placeholder.sahba-ground-targetable,
#app.sahba-active.sahba-target-choice-active .sahba-pile-targetable {
  outline: 5px solid rgba(0, 200, 215, .95) !important;
  outline-offset: 0 !important;
  box-shadow: 0 5px 0 rgba(0, 124, 138, .62), 0 10px 16px rgba(0, 0, 0, .34) !important;
}

#app.sahba-active .sahba-take-all-target {
  pointer-events: auto !important;
  position: absolute !important;
  transform: translate(-50%, -50%) !important;
  z-index: 7600 !important;
  min-width: 132px !important;
  min-height: 58px !important;
  padding: 0 22px !important;
  border-radius: 999px !important;
  border: 2px solid rgba(0, 200, 215, .95) !important;
  color: #ecfff7 !important;
  background: linear-gradient(#074c52, #01292d) !important;
  font-family: Basra Kufi, Tahoma, sans-serif !important;
  font-size: 25px !important;
  font-weight: 900 !important;
  line-height: 34px !important;
  box-shadow: 0 5px 0 rgba(0, 124, 138, .62), 0 12px 22px rgba(0, 0, 0, .46), inset 0 1px rgba(255,255,255,.18) !important;
}

/* sahba drag normal, auction tap 20260904 */
#app.sahba-active.sahba-target-choice-active .sahba-card,
#app.sahba-active.sahba-target-choice-active .sahba-stack-mat,
#app.sahba-active.sahba-target-choice-active .sahba-ground-area-frame {
  filter: none !important;
  opacity: 1 !important;
}

#app.sahba-active .sahba-take-all-target {
  display: none !important;
  pointer-events: none !important;
}

#app.sahba-active .sahba-card.dragging {
  transition: none !important;
  will-change: transform !important;
  cursor: grabbing !important;
}

#app.sahba-active .sahba-hand-card.sahba-turn-bid-eligible {
  cursor: grab !important;
  translate: 0 -8px !important;
  filter: none !important;
  opacity: 1 !important;
  outline: 4px solid rgba(0, 200, 215, .68) !important;
  outline-offset: -3px !important;
  box-shadow: 0 4px 0 rgba(0, 124, 138, .52), 0 9px 14px rgba(0, 0, 0, .28), inset 0 0 0 2px rgba(255, 255, 255, .16) !important;
}

#app.sahba-active .sahba-hand-card.sahba-auction-bid-eligible {
  cursor: pointer !important;
  translate: none !important;
  filter: none !important;
  opacity: 1 !important;
  outline: none !important;
  box-shadow: none !important;
}

#app.sahba-active .sahba-hand-card.sahba-auction-bid-ineligible {
  cursor: default !important;
  filter: brightness(.48) saturate(.6) contrast(.9) !important;
  opacity: 1 !important;
  outline: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

/* sahba permanent rank guides 20260904 */
#app.sahba-active .sahba-ground-rank-guide {
  pointer-events: none !important;
  opacity: 1 !important;
  filter: none !important;
  border: 0 !important;
  outline: 4px solid rgba(255, 255, 255, .40) !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

#app.sahba-active .sahba-ground-rank-guide img {
  opacity: .11 !important;
  filter: saturate(.42) brightness(1.06) contrast(.92) !important;
}

#app.sahba-active .sahba-ground-rank-guide::before,
#app.sahba-active .sahba-ground-rank-guide::after {
  display: none !important;
  content: none !important;
}

#app.sahba-active .sahba-card.sahba-pile-targetable[data-sahba-ground] {
  opacity: 1 !important;
}

/* sahba motion coordinate polish 20260904 */
#app.sahba-active .sahba-hand-card {
  touch-action: none !important;
}

#app.sahba-active .sahba-card.dragging {
  transition: none !important;
  will-change: transform !important;
}
