/* Saltanat 0.3.208 — shared Vazir loading for every page and reliable Safari weights. */
@font-face{font-family:Vazir;src:local("Vazir"),local("Vazir Regular"),url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Vazir;src:local("Vazir Medium"),url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Medium.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:Vazir;src:local("Vazir Bold"),url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Bold.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:Vazir;src:local("Vazir Bold"),url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:Vazir;src:local("Vazir Black"),url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Black.woff2") format("woff2");font-weight:800;font-style:normal;font-display:swap}
@font-face{font-family:Vazir;src:local("Vazir Black"),url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Black.woff2") format("woff2");font-weight:900;font-style:normal;font-display:swap}

/* سلطنت 0.3.69 — سیستم رابط مشترک «بازی کارتی سلطنتی لوکس» */
:root {
  --royal-green: #073B2A;
  --royal-green-deep: #03261b;
  --royal-green-black: #01150f;
  --royal-gold: #D4AF37;
  --royal-gold-light: #ead17a;
  --royal-gold-dark: #96731e;
  --royal-charcoal: #0B0B0B;
  --royal-cream: #F8EFD8;
  --royal-red: #9B1C31;
  --royal-muted: #afc1b9;
  --royal-line: rgba(212, 175, 55, .3);
  --royal-line-soft: rgba(212, 175, 55, .16);
  --royal-glass: rgba(3, 31, 23, .86);
  --royal-glass-strong: rgba(2, 22, 16, .94);
  --royal-shadow: 0 18px 48px rgba(0, 0, 0, .38);
  --royal-shadow-soft: 0 10px 26px rgba(0, 0, 0, .25);
  --royal-inset: inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 0 1px rgba(212,175,55,.035);
  --royal-radius: 18px;
  --bg: var(--royal-green-black);
  --felt: var(--royal-green);
  --felt2: var(--royal-green-deep);
  --felt-deep: var(--royal-green-deep);
  --gold: var(--royal-gold);
  --gold2: var(--royal-gold-dark);
  --gold-bright: var(--royal-gold-light);
  --cream: var(--royal-cream);
  --muted: var(--royal-muted);
  --red: var(--royal-red);
  --panel: var(--royal-glass);
  --line: var(--royal-line);
  --border: var(--royal-line);
  --shadow: var(--royal-shadow);
}

html { color-scheme: dark; }
body {
  color: var(--royal-cream);
  background:
    radial-gradient(circle at 50% -12%, rgba(28, 106, 77, .24), transparent 40%),
    radial-gradient(circle at 0 100%, rgba(212, 175, 55, .055), transparent 33%),
    linear-gradient(155deg, #010806, #06271d 58%, #010907);
}

.ui-icon, .icon {
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.16em;
}
[data-ui-icon], [data-static-icon] { color: var(--royal-gold-light); }

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:not(.playing-card), a[class] {
  transition: transform 180ms ease, filter 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, opacity 180ms ease;
}
@media (hover:hover) and (pointer:fine) {
  button:not(.playing-card):not(:disabled):hover, a[class]:hover {
    filter: brightness(1.07);
  }
  :where(.primary,.primary-button,.entry-auth-submit,.home-online,.action-button,.new-game-button,a.primary):not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 27px rgba(0,0,0,.34), 0 0 0 1px rgba(234,209,122,.15), inset 0 1px 0 rgba(255,255,255,.18);
  }
  :where(.ghost,.secondary-button,.icon-btn,.icon-button,.menu-action,.home-start,.home-rules,.home-install,.profile-pill,.home-profile-entry,.home-settings,.match-mode,.lobby-tool-btn,.friend-action-card button):not(:disabled):hover {
    transform: translateY(-1px);
    border-color: rgba(234, 209, 122, .48) !important;
    background-color: rgba(212,175,55,.09) !important;
  }
}
button:not(.playing-card):not(:disabled):active, a[class]:active {
  transform: translateY(1px) scale(.985) !important;
  transition-duration: 90ms;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--royal-gold-light) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(212,175,55,.16) !important;
}
button:disabled, button[aria-disabled="true"], .disabled {
  opacity: .42 !important;
  filter: grayscale(.35) saturate(.55) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
[aria-busy="true"], .loading {
  cursor: progress !important;
  opacity: .78;
}

:where(.primary,.primary-button,.entry-auth-submit,.home-online,.action-button,.new-game-button,a.primary,.ranking-tabs button.active,.private-score-btn.active,.segmented-control button.active) {
  color: #171207 !important;
  border-color: var(--royal-gold-light) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), transparent 42%),
    linear-gradient(135deg, #e0c15a 0%, var(--royal-gold) 48%, #b78f29 100%) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.29), inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(74,49,4,.18) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.18);
}
:where(.primary,.primary-button,.entry-auth-submit,.home-online,.action-button,.new-game-button,a.primary) .icon,
:where(.primary,.primary-button,.entry-auth-submit,.home-online,.action-button,.new-game-button,a.primary) .ui-icon { color: #201706; }

:where(.ghost,.secondary-button,.icon-btn,.icon-button,.menu-action,.home-start,.home-rules,.home-install,.profile-pill,.home-profile-entry,.home-settings,.profile-back-button,.offline-stop-btn,.offline-history-btn,.network-retry,.tab,.entry-auth-tab,.private-score-btn,.ranking-tabs button,.quick-chat-grid button,.chat-settings-row button) {
  color: var(--royal-cream) !important;
  border-color: rgba(212,175,55,.25) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(0,0,0,.12)) !important;
  box-shadow: var(--royal-inset), 0 7px 18px rgba(0,0,0,.16);
}
:where(.danger,.danger-action,.profile-page-action.danger) {
  color: #ffe9e9 !important;
  border-color: rgba(155,28,49,.65) !important;
  background: linear-gradient(145deg, rgba(155,28,49,.36), rgba(58,5,14,.65)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 8px 20px rgba(0,0,0,.2) !important;
}

:where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card,.box,.page) {
  border-color: var(--royal-line) !important;
  background-color: var(--royal-glass-strong) !important;
  background-image:
    radial-gradient(circle at 50% 0, rgba(24,96,69,.18), transparent 38%),
    linear-gradient(155deg, rgba(7,59,42,.9), rgba(2,26,19,.94)) !important;
  box-shadow: var(--royal-shadow), var(--royal-inset) !important;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card,.topbar,.top,.round-panel,.trick-score,.choice-panel,.player-badge,.player-info) {
    background-color: rgba(3,31,23,.78) !important;
    -webkit-backdrop-filter: blur(13px) saturate(112%);
    backdrop-filter: blur(13px) saturate(112%);
  }
  :where(.ghost,.secondary-button,.icon-btn,.icon-button,.menu-action,.home-start,.home-rules,.home-install,.profile-pill,.home-profile-entry,.home-settings,.profile-back-button,.offline-stop-btn,.offline-history-btn,.network-retry,.tab,.entry-auth-tab,.private-score-btn,.ranking-tabs button,.quick-chat-grid button,.chat-settings-row button) {
    background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(0,0,0,.18)) !important;
    -webkit-backdrop-filter: blur(10px) saturate(110%);
    backdrop-filter: blur(10px) saturate(110%);
  }
}

:where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card) h1,
:where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card) h2,
:where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card) h3 { color: var(--royal-cream); }
:where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card) p,
:where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card) small { color: var(--royal-muted); }

input, textarea, select {
  color: var(--royal-cream) !important;
  caret-color: var(--royal-gold-light);
  border-color: rgba(212,175,55,.25) !important;
  background: rgba(0,11,8,.5) !important;
  box-shadow: inset 0 1px 8px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.02);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
input::placeholder, textarea::placeholder { color: rgba(248,239,216,.46); }
input:focus, textarea:focus, select:focus {
  border-color: var(--royal-gold-light) !important;
  background: rgba(0,16,11,.72) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,.12), inset 0 1px 8px rgba(0,0,0,.22) !important;
}

:where(.tabs,.entry-auth-tabs,.segmented-control,.ranking-tabs,.private-score-picker) {
  padding: 4px;
  border: 1px solid var(--royal-line-soft);
  border-radius: 15px;
  background: rgba(0,0,0,.18);
  box-shadow: inset 0 1px 8px rgba(0,0,0,.18);
}
:where(.tab.active,.entry-auth-tab.active,.segmented-control button.active,.private-score-btn.active,.ranking-tabs button.active) { font-weight: 900; }

:where(dialog.modal,dialog.dialog,dialog.pause-dialog,dialog.resume-dialog,dialog.offline-settings-dialog,dialog.last-trick-dialog,.card-settings-dialog)::backdrop {
  background: rgba(0, 8, 6, .78) !important;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :where(dialog.modal,dialog.dialog,dialog.pause-dialog,dialog.resume-dialog,dialog.offline-settings-dialog,dialog.last-trick-dialog,.card-settings-dialog)::backdrop {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
:where(.modal-heading,.menu-heading,.history-heading,.friend-action-head,.match-heading,.profile-section-title,.card-settings-brand) > :first-child:not(div) {
  color: var(--royal-gold-light) !important;
}
:where(.modal-icon,.found-check,.result-crown,.status-icon,.ui-section-emblem,.profile-heading-icon,.profile-stat-icon,.profile-item-icon,.mode-icon,.icon-wrap) {
  color: #201706 !important;
  border-color: var(--royal-gold-light) !important;
  background: linear-gradient(145deg, #dfc25e, #ad8428) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 9px 21px rgba(0,0,0,.25) !important;
}

/* صفحه اصلی و ورود */
.entry-auth-screen, .home-screen, .profile-screen { background-color: transparent !important; }
.entry-auth-card { border-radius: 28px !important; }
.entry-auth-title, .home-action-copy strong { letter-spacing: -.15px; }
.home-online { border-width: 1px !important; }
.home-start { border-color: rgba(212,175,55,.34) !important; }
.home-secondary-actions button { min-height: 48px; }
.home-top-actions button { border-color: rgba(212,175,55,.26) !important; }
.home-suit { border-color: rgba(212,175,55,.18) !important; background: rgba(0,0,0,.16) !important; box-shadow: var(--royal-inset); }
.home-suit small { color: var(--royal-gold-light) !important; }

/* پروفایل */
.profile-overview { border-color: var(--royal-line-soft) !important; background: linear-gradient(145deg, rgba(212,175,55,.075), rgba(0,0,0,.12)) !important; }
.profile-page-stat, .profile-mode-card, .profile-mission, .profile-achievement, .profile-detail-row {
  border-color: rgba(212,175,55,.18) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(0,0,0,.11)) !important;
  box-shadow: var(--royal-inset);
}
.profile-page-stat.featured { border-color: rgba(212,175,55,.44) !important; }
.profile-xp-track, .profile-mini-track { background: rgba(0,0,0,.3) !important; }
.profile-xp-track i, .profile-mini-track i { background: linear-gradient(90deg, var(--royal-gold-dark), var(--royal-gold-light)) !important; }
.profile-frame-btn.active { border-color: var(--royal-gold-light) !important; box-shadow: 0 0 0 2px rgba(212,175,55,.12), var(--royal-inset) !important; }

/* لابی و منوهای آنلاین */
.shell:not(.game-active) > .top, .topbar {
  border-color: var(--royal-line) !important;
  background: linear-gradient(155deg, rgba(7,59,42,.88), rgba(2,25,18,.94)) !important;
  box-shadow: var(--royal-shadow-soft), var(--royal-inset) !important;
}
.lobby-hero, .network-banner, .private-room-panel, .chat-settings-row {
  border-color: var(--royal-line-soft) !important;
  background: linear-gradient(145deg, rgba(212,175,55,.065), rgba(0,0,0,.13)) !important;
  box-shadow: var(--royal-inset);
}
.lobby-badge, .match-target-badge, .trump-pill, .history-multiplier, .round-ribbon {
  color: #211705 !important;
  border-color: var(--royal-gold-light) !important;
  background: linear-gradient(135deg, var(--royal-gold-light), var(--royal-gold-dark)) !important;
}
.match-mode, .lobby-tool-btn, .friend-action-card {
  border-color: rgba(212,175,55,.22) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(0,0,0,.13)) !important;
  box-shadow: var(--royal-inset), 0 8px 18px rgba(0,0,0,.14);
}
.match-mode.featured { border-color: rgba(212,175,55,.52) !important; }
.match-mode .mode-arrow { color: var(--royal-gold-light) !important; }
.connection { color: var(--royal-muted) !important; }

/* امتیازات و منوی داخل بازی */
.round-panel, .trick-score, .choice-panel, .trump-picker, .table-status, .game-reconnect-banner {
  border-color: var(--royal-line) !important;
  box-shadow: var(--royal-shadow-soft), var(--royal-inset) !important;
}
.royal-scoreboard {
  border-color: var(--royal-line) !important;
  box-shadow: none !important;
}
.score-wing, .score-core, .trump-medallion {
  background-color: rgba(2,24,17,.88) !important;
  border-color: rgba(212,175,55,.23) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#gameScreen .royal-scoreboard,
#gameScreen .score-wing,
#gameScreen .score-core,
#gameScreen .trump-medallion,
#gameScreen .round-ribbon,
#gameScreen .table-status {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}
.score-wing strong, .trick-score strong { color: var(--royal-gold-light) !important; }
.menu-action { border-radius: 15px !important; }
.menu-action > [data-static-icon], .menu-action > .icon { color: var(--royal-gold-light) !important; }
.quick-chat-bubble { color: #171207 !important; background: linear-gradient(135deg, var(--royal-gold-light), var(--royal-gold)) !important; }

/* بازی آفلاین */
.offline-stop-btn, .offline-history-btn { color: var(--royal-gold-light) !important; }
.setting-group { border-color: var(--royal-line-soft) !important; background: rgba(0,0,0,.13) !important; }
.last-trick-item, .history-row, .found-player, .ranking-row, .stat {
  border-color: rgba(212,175,55,.16) !important;
  background: rgba(255,255,255,.035) !important;
  box-shadow: var(--royal-inset);
}

/* تنظیمات کارت */
.card-settings-dialog { border-color: var(--royal-line) !important; background: transparent !important; box-shadow: var(--royal-shadow) !important; }
.card-settings-shell { background: linear-gradient(155deg, rgba(65,7,18,.98), rgba(17,2,6,.99)) !important; }
.ui-section-emblem { width: 52px; height: 52px; display: grid; place-items: center; flex: none; border: 1px solid var(--royal-gold-light); border-radius: 16px; }
.ui-section-emblem :is(svg,.ui-raster-icon) { width: 25px; height: 25px; }
.card-theme-option { border-color: rgba(212,175,55,.18) !important; background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(0,0,0,.12)) !important; box-shadow: var(--royal-inset); }
.card-theme-option.selected { border-color: var(--royal-gold-light) !important; box-shadow: 0 0 0 2px rgba(212,175,55,.12), var(--royal-inset) !important; }
.card-theme-option.selected::after { color:#171207 !important; background:linear-gradient(135deg,var(--royal-gold-light),var(--royal-gold-dark)) !important; }

@media (max-width: 600px) {
  :root { --royal-shadow: 0 14px 34px rgba(0,0,0,.34); --royal-shadow-soft: 0 8px 18px rgba(0,0,0,.22); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card,.topbar,.top,.round-panel,.trick-score,.choice-panel,.player-badge,.player-info) {
      -webkit-backdrop-filter: blur(7px) saturate(106%);
      backdrop-filter: blur(7px) saturate(106%);
    }
  }
  button:not(.playing-card), a[class] { transition-duration: 160ms; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* تراز لوگو و متن صفحه ورود در ارتفاع‌های رایج موبایل */
.entry-auth-visual { height: 214px !important; margin: -4px 0 12px !important; }
.entry-auth-logo { width: min(232px, 74%) !important; }
.entry-auth-copy { position: relative; z-index: 2; }
@media (max-height: 720px) {
  .entry-auth-visual { height: 154px !important; margin: -10px 0 5px !important; }
  .entry-auth-logo { width: 188px !important; }
}
.match-mode .mode-arrow {
  color: #171207 !important;
  border: 1px solid var(--royal-gold-light) !important;
  background: linear-gradient(135deg, var(--royal-gold-light), var(--royal-gold-dark)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 5px 12px rgba(0,0,0,.18);
}

/* سلطنت 0.3.70 — بازبینی کنتراست و خوانایی */
:root {
  --royal-text-primary: #F8EFD8;
  --royal-text-secondary: #D4E0DB;
  --royal-text-tertiary: #BDCEC7;
  --royal-text-on-gold: #120E04;
  --royal-text-danger: #FFE2E6;
  --royal-text-success: #A7F0CC;
  --royal-muted: var(--royal-text-secondary);
  --muted: var(--royal-text-secondary);
}

/* متن پایه روی سطوح تیره */
body,
:where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card,.topbar,.top,.round-panel,.trick-score,.choice-panel,.player-badge,.player-info) {
  color: var(--royal-text-primary);
}

/* متن‌های توضیحی؛ همه این موارد روی پنل تیره قرار دارند. */
:where(
  .entry-auth-copy p,.entry-auth-field label,.entry-auth-message,
  .home-action-copy small,.home-action-copy p,.home-profile-hint,.home-status,.pwa-status,
  .profile-page-account,.profile-page-type,.profile-page-username,.profile-xp-text,
  .profile-section-subtitle,.profile-mode-card span,.profile-mode-record span,
  .profile-mission small,.profile-achievement small,.profile-detail-row span,
  .mode-copy small,.lobby-copy p,.lobby-subtitle,.friend-action-head p,.friend-action-card p,
  .connection,.network-banner p,.network-banner small,.found-subtitle,.found-loading,
  .private-room-meta small,.private-room-note,.ranking-row small,.ranking-empty,
  .history-heading p,.history-row span,.history-empty,.dialog-card p,
  .pause-card p,.resume-card p,.offline-settings-card p,.last-trick-card p,.score-history-card p,
  .card-settings-brand p,.card-theme-copy p,.card-theme-copy small,.card-settings-note,
  .player-info small,.player-badge small,.profile-copy small,.round-row,.round-panel span,
  .trick-score span,.score-wing span,.score-core small,.choice-panel-head small,
  .choice-btn.secondary-choice small,.table-status,.game-reconnect-banner p,.status-pill,
  .bot-wait-note,.searching p,.match-card p,.profile-row p,.stat span
) {
  color: var(--royal-text-secondary) !important;
  opacity: 1 !important;
  text-shadow: none;
}

/* متن کم‌اهمیت همچنان خوانا، ولی از متن اصلی متمایز است. */
:where(.profile-item-side b,.profile-achievement > b,.profile-mission-meta,.mission-date,.achievement-note,.version,.footer-note) {
  color: var(--royal-text-tertiary) !important;
  opacity: 1 !important;
}

/* تمام سطوح طلایی باید فقط متن زغالی داشته باشند؛ رنگ فرزندها نباید از CSS قدیمی نشت کند. */
:where(
  .primary,.primary-button,.entry-auth-submit,.home-online,.action-button,.new-game-button,a.primary,
  .ranking-tabs button.active,.private-score-btn.active,.segmented-control button.active,
  .tab.active,.entry-auth-tab.active,.choice-btn.primary-choice,
  .match-mode .mode-arrow,.lobby-badge,.match-target-badge,.trump-pill,.history-multiplier,.round-ribbon,
  .quick-chat-bubble,.toast.strong,.modal-icon,.found-check,.result-crown,.status-icon,
  .ui-section-emblem,.profile-heading-icon,.profile-stat-icon,.profile-item-icon.gold,
  .mode-icon,.icon-wrap,.avatar,.profile-page-avatar,.pause-icon,
  .card-theme-option.selected::after
),
:where(
  .primary,.primary-button,.entry-auth-submit,.home-online,.action-button,.new-game-button,a.primary,
  .ranking-tabs button.active,.private-score-btn.active,.segmented-control button.active,
  .tab.active,.entry-auth-tab.active,.choice-btn.primary-choice,
  .match-mode .mode-arrow,.lobby-badge,.match-target-badge,.trump-pill,.history-multiplier,.round-ribbon,
  .quick-chat-bubble,.toast.strong
) :where(span,strong,small,p,b,.icon,.ui-icon,svg) {
  color: var(--royal-text-on-gold) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* دکمه‌های اصلی دارای متن چندخطی */
:where(.home-online,.primary,.primary-button,.entry-auth-submit,.action-button,.new-game-button) :where(.home-action-copy, .home-action-copy strong, .home-action-copy small) {
  color: var(--royal-text-on-gold) !important;
}

/* آیکون طلایی روی دکمه‌های تیره، بدون کم‌رنگ شدن متن کنار آن. */
:where(.ghost,.secondary-button,.icon-btn,.icon-button,.menu-action,.home-start,.home-rules,.home-install,.profile-pill,.home-profile-entry,.home-settings,.profile-back-button,.offline-stop-btn,.offline-history-btn,.network-retry) {
  color: var(--royal-text-primary) !important;
}
:where(.ghost,.secondary-button,.menu-action,.home-start,.home-rules,.home-install,.home-profile-entry,.home-settings) :where(strong,small,p) {
  color: inherit !important;
  opacity: 1 !important;
}
:where(.ghost,.secondary-button,.menu-action,.home-start,.home-rules,.home-install,.home-profile-entry,.home-settings) :where([data-ui-icon],[data-static-icon],.icon,.ui-icon) {
  color: var(--royal-gold-light) !important;
}

/* تب‌های غیرفعال و کنترل‌های انتخابی */
:where(.tab,.entry-auth-tab,.private-score-btn,.ranking-tabs button,.segmented-control button) {
  color: var(--royal-text-secondary) !important;
  opacity: 1 !important;
}
:where(.tab.active,.entry-auth-tab.active,.private-score-btn.active,.ranking-tabs button.active,.segmented-control button.active) {
  color: var(--royal-text-on-gold) !important;
}

/* فیلدها و placeholder در نور کم نیز خوانا بمانند. */
input::placeholder, textarea::placeholder {
  color: #AFC2BA !important;
  opacity: 1 !important;
}
input:disabled, textarea:disabled, select:disabled {
  color: #B7C7C0 !important;
  -webkit-text-fill-color: #B7C7C0 !important;
}

/* وضعیت‌های غیرفعال و درحال‌بارگذاری قابل تشخیص، اما ناخوانا نشوند. */
button:disabled, button[aria-disabled="true"], .disabled {
  opacity: .62 !important;
  filter: grayscale(.12) saturate(.72) !important;
}
[aria-busy="true"], .loading {
  opacity: .88 !important;
}

/* پیام‌های وضعیت و خطا */
:where(.message,.entry-auth-message,.form-message,.error-message,.network-error) {
  color: #FFB9C3 !important;
  opacity: 1 !important;
}
:where(.success-message,.connection.ok,.network-banner.ok) {
  color: var(--royal-text-success) !important;
}
.connection::before { filter: brightness(1.22); }

/* پنل‌های اطلاعاتی نباید متن را زیر گرادیان یا شیشه محو کنند. */
:where(.network-banner,.lobby-hero,.private-room-panel,.chat-settings-row,.profile-overview) {
  background-color: rgba(2, 28, 20, .94) !important;
}

/* کارت‌های آماری و پروفایل */
.profile-page-stat strong,.profile-mode-card strong,.profile-mission strong,.profile-achievement strong,
.profile-detail-row strong,.history-totals strong,.stat strong,.score-wing strong,.trick-score strong {
  color: var(--royal-text-primary) !important;
  text-shadow: none !important;
}
.profile-page-stat.featured strong,.profile-mode-card .rating,.profile-level strong,
.profile-mission.done b,.profile-achievement.done > b {
  color: var(--royal-gold-light) !important;
}

/* برچسب‌های طلایی کوچک */
:where(.profile-role-badge,.profile-rank-badge,.profile-mode-range,.card-theme-badge,.svg-badge) {
  color: var(--royal-gold-light) !important;
  background-color: rgba(0, 18, 13, .82) !important;
  border-color: rgba(234, 209, 122, .42) !important;
}

/* منوی داخل بازی، امتیازها و انتخاب دوبل */
.choice-btn.primary-choice,
.choice-btn.primary-choice :where(strong,small,span) {
  color: var(--royal-text-on-gold) !important;
  opacity: 1 !important;
}
.choice-btn.secondary-choice,
.choice-btn.secondary-choice :where(strong,small,span) {
  color: var(--royal-text-primary) !important;
  opacity: 1 !important;
}

/* سطح سفید کارت انتخاب خال باید متن تیره داشته باشد. */
.suit-button,.suit-button :where(strong,small,span) {
  color: #171717 !important;
  opacity: 1 !important;
}
.suit-button.red,.suit-button.red :where(strong,span) { color: #8E1428 !important; }

/* بهبود خوانایی متن‌های خیلی کوچک بدون تغییر اندازه چیدمان */
:where(.home-action-copy small,.mode-copy small,.profile-copy small,.player-info small,.player-badge small,.connection,.card-theme-copy p,.card-settings-note) {
  font-weight: 500;
}

@media (max-width: 600px) {
  /* روی موبایل blur کمتر و پس‌زمینه تیره‌تر است تا متن از تصویر پشت جدا بماند. */
  :where(.panel,.entry-auth-card,.home-card,.profile-page-card,.profile-panel,.profile-card,.match-card,.friend-action-card,.dialog-card,.modal-card,.pause-card,.resume-card,.offline-settings-card,.last-trick-card,.score-history-card,.result-card,.topbar,.top,.round-panel,.trick-score,.choice-panel,.player-badge,.player-info) {
    background-color: rgba(2, 27, 20, .91) !important;
  }
}



/* سلطنت 0.3.74 — اتصال امتیازها به حکم، قاب میز، تاج حاکم و کنتراست طلایی */
#gameScreen .score-core{
  position:relative!important;
  z-index:5!important;
}
#gameScreen .score-wing{
  position:relative!important;
  z-index:2!important;
  min-width:74px!important;
  overflow:visible!important;
}
#gameScreen .score-wing-left{
  margin-right:-21px!important;
}
#gameScreen .score-wing-right{
  margin-left:-21px!important;
}
#gameScreen .trump-medallion{
  z-index:7!important;
}
#gameScreen .round-ribbon{
  z-index:8!important;
}

#gameScreen .player-avatar-wrap{
  position:relative;
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  flex:none;
  overflow:visible;
}
#gameScreen .player-avatar-wrap > .avatar{
  width:29px!important;
  height:29px!important;
  box-sizing:border-box!important;
}
#gameScreen .player-info .avatar.frame-bronze{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.24),0 0 0 2px #b87333,0 0 0 3px rgba(64,30,7,.8)!important;
}
#gameScreen .player-info .avatar.frame-silver{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28),0 0 0 2px #d5dce2,0 0 0 3px rgba(72,83,92,.8)!important;
}
#gameScreen .player-info .avatar.frame-gold{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.3),0 0 0 2px #e3b746,0 0 0 3px rgba(92,59,5,.86)!important;
}
#gameScreen .player-info .avatar.frame-royal{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.32),0 0 0 2px #f0c85d,0 0 0 4px #7c1830,0 0 13px rgba(240,200,93,.62)!important;
}
#gameScreen .hakem-crown-badge{
  position:absolute;
  z-index:6;
  top:-10px;
  right:-7px;
  width:21px;
  height:21px;
  display:grid;
  place-items:center;
  border:1px solid #ffe9a7;
  border-radius:8px 8px 9px 9px;
  color:#171207!important;
  background:linear-gradient(145deg,#f4d77a,#b88322)!important;
  box-shadow:0 4px 9px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.3);
  pointer-events:none;
}
#gameScreen .hakem-crown-badge .icon{
  color:#171207!important;
  width:13px!important;
  height:13px!important;
  stroke-width:2.4;
}
#gameScreen .player-info.is-hakem{
  border-color:rgba(244,215,122,.6)!important;
}

/* هر سطح طلایی، همراه با تمام فرزندان متنی، باید زغالی بماند. */
:where(
  .primary,.primary-button,.entry-auth-submit,.home-online,.action-button,.new-game-button,a.primary,
  .search-btn,.network-retry,.create-private-btn,.join-private-btn,
  .ranking-tabs button.active,.private-score-btn.active,.segmented-control button.active,
  .tab.active,.entry-auth-tab.active,.avatar-option.active,.profile-frame-btn.active,
  .choice-btn.primary-choice,.match-mode .mode-arrow,.lobby-badge,.match-target-badge,
  .history-multiplier,.round-ribbon,.quick-chat-bubble,.toast.strong,.modal-icon,
  .found-check,.result-crown,.status-icon,.ui-section-emblem,.profile-heading-icon,
  .profile-stat-icon,.profile-item-icon.gold,.mode-icon,.icon-wrap,.pause-icon,
  .queue-dot.filled,.match-seat.me,.card-theme-option.selected::after
),
:where(
  .primary,.primary-button,.entry-auth-submit,.home-online,.action-button,.new-game-button,a.primary,
  .search-btn,.network-retry,.create-private-btn,.join-private-btn,
  .ranking-tabs button.active,.private-score-btn.active,.segmented-control button.active,
  .tab.active,.entry-auth-tab.active,.avatar-option.active,.profile-frame-btn.active,
  .choice-btn.primary-choice,.match-mode .mode-arrow,.lobby-badge,.match-target-badge,
  .history-multiplier,.round-ribbon,.quick-chat-bubble,.toast.strong,.modal-icon,
  .found-check,.result-crown,.status-icon,.ui-section-emblem,.profile-heading-icon,
  .profile-stat-icon,.profile-item-icon.gold,.mode-icon,.icon-wrap,.pause-icon,
  .queue-dot.filled,.match-seat.me
) :where(*){
  color:#171207!important;
  text-shadow:none!important;
}
@media(max-width:360px){
  #gameScreen .score-wing-left{margin-right:-18px!important}
  #gameScreen .score-wing-right{margin-left:-18px!important}
  #gameScreen .score-wing{min-width:70px!important}
}


/* سلطنت 0.3.85 — حذف سایه پنل بالای بازی */
#gameScreen .royal-scoreboard { box-shadow: none !important; }


/* Saltanat 0.3.106 — consistent black profile glyphs */
.home-profile-entry>b .ui-icon,.home-top-profile>b .ui-icon,.home-profile-avatar .ui-icon{color:#171005!important;stroke:#171005!important}

/* Saltanat 0.3.122 — Safari viewport/safe-area stabilization */
html[data-performance="safari"],
html[data-performance="safari"] body{
  min-height:100%;
  min-height:-webkit-fill-available;
  background-color:#061b16!important;
  overscroll-behavior:none;
}
html[data-performance="safari"] .shell.game-active{
  padding-bottom:0!important;
  background-color:var(--table-fallback,#061b16)!important;
}
html[data-performance="safari"] :where(.ambient,.felt-pattern){display:none!important}

/* Saltanat 0.3.116 — Safari/WebKit performance profile */
html[data-performance="safari"] body,
html[data-performance="safari"] :where(.entry-auth-screen,.home-screen,.profile-screen,.app-shell,.shell,.page,.box){
  background-attachment:scroll!important;
}
html[data-performance="safari"] body *{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html[data-performance="safari"] :where(.top,.topbar,.panel,.profile-page-head,.profile-page-hero,.profile-section,.profile-page-stat,.profile-mode-card,.profile-mission,.profile-achievement,.profile-detail-row,.profile-level-row,.player-info,.player-badge,.hud-box,.team-score,.choice-panel,.trump-picker){
  background-color:rgba(3,18,14,.94)!important;
}
html[data-performance="safari"] #gameScreen{
  isolation:isolate;
  contain:layout paint;
  transform:translateZ(0);
  -webkit-transform:translateZ(0);
}
html[data-performance="safari"] #gameScreen .hand .playing-card img.card-face,
html[data-performance="safari"] #trickLayer .played img.card-face{
  filter:none!important;
  -webkit-filter:none!important;
  box-shadow:0 4px 8px rgba(0,0,0,.28)!important;
  transition-property:transform,opacity!important;
}
html[data-performance="safari"] #gameScreen .hand .playing-card.is-dragging img.card-face,
html[data-performance="safari"] #trickLayer .played-flight{
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  transform:translateZ(0);
  -webkit-transform:translateZ(0);
}
html[data-performance="safari"] #trickLayer.drag-target.drop-ready{
  filter:none!important;
  -webkit-filter:none!important;
}

/* Saltanat 0.3.121 — stronger contrast for the selected ranking match type */
.ranking-tabs button.active,
.ranking-tabs button[aria-selected="true"] {
  color: #080600 !important;
  -webkit-text-fill-color: #080600 !important;
  background: linear-gradient(180deg, #fff0b0 0%, #e2b84e 55%, #bd8421 100%) !important;
  border-color: #fff1bd !important;
  box-shadow: 0 0 0 2px rgba(255, 232, 160, .24), 0 9px 20px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .52) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .42) !important;
  opacity: 1 !important;
}


/* Saltanat 0.3.124 — Safari renderer: full safe-area background and predecoded WebP cards */
html[data-performance="safari"] body.game-active-page{
  display:block!important;
  background-color:var(--table-fallback,#061b16)!important;
}
html[data-performance="safari"] .shell.game-active{
  width:min(100vw,430px)!important;
  height:max(var(--vh,100vh),100dvh)!important;
  min-height:max(var(--vh,100vh),100dvh)!important;
  max-height:none!important;
  margin:0 auto!important;
  padding:max(5px,env(safe-area-inset-top)) 0 0!important;
  gap:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
html[data-performance="safari"] .shell.game-active>main,
html[data-performance="safari"] .shell.game-active #gameScreen{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
}
html[data-performance="safari"] .shell.game-active #gameScreen{
  border:0!important;
  border-radius:18px 18px 0 0!important;
  background-color:var(--table-fallback,#061b16)!important;
  background-image:linear-gradient(rgba(0,8,6,.03),rgba(0,8,6,.10)),var(--table-image)!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  isolation:auto!important;
  contain:layout style!important;
  transform:none!important;
  -webkit-transform:none!important;
}
html[data-performance="safari"] #gameScreen :where(.playing-card,.playing-card img.card-face,.table-card-fan img,#trickLayer .played,#trickLayer .played .playing-card,#trickLayer .played img.card-face){
  clip-path:none!important;
  -webkit-clip-path:none!important;
  filter:none!important;
  -webkit-filter:none!important;
  box-shadow:none!important;
}
html[data-performance="safari"] #gameScreen .playing-card,
html[data-performance="safari"] #gameScreen #trickLayer .played .playing-card{
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid rgba(0,0,0,.16)!important;
}
html[data-performance="safari"] #gameScreen .playing-card img.card-face,
html[data-performance="safari"] #gameScreen #trickLayer .played img.card-face{
  display:block!important;
  border-radius:inherit!important;
  transform:none;
}
html[data-performance="safari"] #gameScreen .table-card-fan img{
  border:1px solid rgba(255,255,255,.22)!important;
}
html[data-performance="safari"] #gameScreen .table-card-fan::after{
  content:attr(data-count)!important;
  position:absolute!important;
  z-index:80!important;
  display:grid!important;
  place-items:center!important;
  width:24px!important;
  height:24px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.45)!important;
  border-radius:999px!important;
  color:#171005!important;
  background:#eec468!important;
  box-shadow:none!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:1!important;
}
html[data-performance="safari"] #gameScreen .table-card-fan.top::after{right:16px!important;bottom:4px!important}
html[data-performance="safari"] #gameScreen .table-card-fan.left::after{right:4px!important;bottom:12px!important}
html[data-performance="safari"] #gameScreen .table-card-fan.right::after{left:4px!important;bottom:12px!important}

/* Safari drag keeps the local hand card free while played cards stay cheaply clipped. */
html[data-performance="safari"] #gameScreen .hand .playing-card{
  overflow:visible!important;
  background:transparent!important;
  border:0!important;
}
html[data-performance="safari"] #gameScreen .hand .playing-card img.card-face{
  border:1px solid rgba(0,0,0,.16)!important;
}


/* Saltanat 0.3.181 — optimized royal raster UI icons */
.ui-raster-icon{display:inline-block;vertical-align:-.22em;width:1.9em!important;height:1.9em!important;max-width:none!important;max-height:none!important;object-fit:contain;flex:none}

/* Saltanat 0.3.181 — remove icon chips on home action buttons and align settings icon */
.home-online > .home-action-icon,
.home-start > .home-action-icon{
  width:66px!important;
  height:66px!important;
  min-width:66px!important;
  min-height:66px!important;
}
.home-online > .home-action-icon .ui-raster-icon,
.home-start > .home-action-icon .ui-raster-icon,
.home-online > .home-action-icon > img,
.home-start > .home-action-icon > img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  display:block!important;
}
.home-online > .home-action-icon .ui-icon,
.home-start > .home-action-icon .ui-icon{
  width:100%!important;
  height:100%!important;
}


/* Saltanat 0.3.181 — remove all single-icon chips/containers and let the icon fill that space */
.home-profile-entry > b,
.home-top-profile > b,
.home-top-settings > span:first-child,
.home-rules > span:first-child,
.home-install > span:first-child,
.profile-kicker > i:first-child,
.profile-stat-icon,
.profile-section-title > span:first-child,
.brand-crown,
.modal-icon{
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  padding:0!important;
}
.home-profile-entry > b .ui-icon,
.home-profile-entry > b .ui-raster-icon,
.home-top-profile > b .ui-icon,
.home-top-profile > b .ui-raster-icon,
.home-top-settings > span:first-child .ui-icon,
.home-top-settings > span:first-child .ui-raster-icon,
.home-rules > span:first-child .ui-icon,
.home-rules > span:first-child .ui-raster-icon,
.home-install > span:first-child .ui-icon,
.home-install > span:first-child .ui-raster-icon,
.profile-kicker > i:first-child .ui-icon,
.profile-kicker > i:first-child .ui-raster-icon,
.profile-stat-icon .ui-icon,
.profile-stat-icon .ui-raster-icon,
.profile-section-title > span:first-child .ui-icon,
.profile-section-title > span:first-child .ui-raster-icon,
.brand-crown .ui-icon,
.brand-crown .ui-raster-icon,
.modal-icon .ui-icon,
.modal-icon .ui-raster-icon{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  display:block!important;
}
.home-profile-entry > b{width:34px!important;height:34px!important}
.home-top-profile > b{width:27px!important;height:27px!important}
.home-top-settings > span:first-child{width:22px!important;height:22px!important;flex:0 0 auto!important;display:grid!important;place-items:center!important}
.home-rules > span:first-child,
.home-install > span:first-child{width:20px!important;height:20px!important;flex:0 0 auto!important;display:grid!important;place-items:center!important}
.profile-kicker > i:first-child{width:13px!important;height:13px!important;flex:0 0 auto!important}
.profile-stat-icon{width:30px!important;height:30px!important}
.profile-section-title > span:first-child{width:36px!important;height:36px!important;display:grid!important;place-items:center!important;flex:0 0 auto!important}
.brand-crown{width:35px!important;height:35px!important;display:grid!important;place-items:center!important}
.modal-icon{width:54px!important;height:54px!important;display:grid!important;place-items:center!important}


/* Saltanat 0.3.181 — unified large royal icons without internal icon chips */
.ui-raster-icon{display:block;object-fit:contain;max-width:100%;max-height:100%}
:is(.home-action-icon,[data-ui-icon],[data-static-icon],.icon,.ui-icon,.modal-icon,.result-crown,.status-icon,.found-check,.profile-stat-icon,.ui-section-emblem,.brand-crown) img.ui-raster-icon{
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
}
/* Any dedicated icon holder should not draw an extra inner chip */
:where(.home-action-icon,.home-top-settings>span:first-child,.home-profile-entry>b,.home-top-profile>b,.home-rules>span:first-child,.home-install>span:first-child,.profile-kicker>i:first-child,.profile-stat-icon,.profile-section-title>span:first-child,.brand-crown,.modal-icon,.result-crown,.status-icon,.found-check,.top .icon-btn>span:first-child,.topbar .icon-btn>span:first-child,.game-actions .icon-btn>span:first-child,.hud-box .icon-btn>span:first-child,.table-status>span:first-child,.choice-panel .icon-btn>span:first-child,.menu-action>[data-static-icon],.menu-action>[data-ui-icon],.icon-button>[data-ui-icon],.icon-button>[data-static-icon],.icon-btn>[data-ui-icon],.icon-btn>[data-static-icon]){
  background:transparent!important;background-image:none!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important;padding:0!important;
}
:where(.top .icon-btn,.topbar .icon-btn,.icon-button,.icon-btn,.menu-action,.home-rules,.home-install,.offline-stop-btn,.offline-history-btn,.network-retry,.search-btn) > :where([data-ui-icon],[data-static-icon],.icon,.ui-icon):only-child,
:where(.top .icon-btn,.topbar .icon-btn,.icon-button,.icon-btn) > :where([data-ui-icon],[data-static-icon],.icon,.ui-icon):first-child:last-child{
  width:100%!important;height:100%!important;display:grid!important;place-items:center!important;
}
/* Larger isolated icons across online/offline game chrome */
:where(.icon-btn,.icon-button){display:inline-grid;place-items:center}
:where(.icon-btn,.icon-button) > :where([data-ui-icon],[data-static-icon],.icon,.ui-icon){width:22px!important;height:22px!important;display:grid!important;place-items:center!important;flex:0 0 auto}
:where(.top .icon-btn,.topbar .icon-btn,.game-actions .icon-btn,.menu-action .icon-btn,.choice-panel .icon-btn){min-width:42px;min-height:42px}
:where(.table-status > [data-ui-icon],.table-status > [data-static-icon],.status-icon,.found-check,.result-crown,.modal-icon,.profile-stat-icon,.ui-section-emblem,.brand-crown){display:grid!important;place-items:center!important}
.status-icon{width:24px!important;height:24px!important}
.found-check{width:22px!important;height:22px!important}
.result-crown{width:40px!important;height:40px!important}
.modal-icon{width:56px!important;height:56px!important}
.profile-stat-icon{width:30px!important;height:30px!important}
.ui-section-emblem{width:28px!important;height:28px!important}
.brand-crown{width:30px!important;height:30px!important}
.table-status > [data-ui-icon], .table-status > [data-static-icon]{width:18px!important;height:18px!important}
.hero-icon > [data-ui-icon], .hero-icon > [data-static-icon], .hero-icon .ui-icon, .hero-icon .ui-raster-icon{width:100%!important;height:100%!important;display:grid!important;place-items:center!important}
.hero-icon{padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}


/* Saltanat 0.3.181 — remove inner icon chip from lobby tool buttons */
.lobby-tool-btn>span:first-child>[data-static-icon],
.lobby-tool-btn>span:first-child>[data-ui-icon]{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  min-height:30px!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 auto!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  padding:0!important;
}
.lobby-tool-btn>span:first-child>[data-static-icon] .ui-raster-icon,
.lobby-tool-btn>span:first-child>[data-static-icon] .ui-icon,
.lobby-tool-btn>span:first-child>[data-ui-icon] .ui-raster-icon,
.lobby-tool-btn>span:first-child>[data-ui-icon] .ui-icon{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  display:block!important;
}


/* Saltanat 0.3.181 — remove icon chip from lobby match-mode cards and enlarge icons */
.match-mode>.mode-icon{
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  min-height:54px!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 auto!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  padding:0!important;
  color:inherit!important;
}
.match-mode>.mode-icon .ui-raster-icon,
.match-mode>.mode-icon .ui-icon,
.match-mode>.mode-icon img,
.match-mode>.mode-icon svg{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  display:block!important;
}
@media(max-height:700px){
  .match-mode>.mode-icon{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important}
}


/* Saltanat 0.3.181 — remove yellow icon chips from history and ranking dialog headers */
.history-heading > .ui-section-emblem{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 auto!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  padding:0!important;
}
.history-heading > .ui-section-emblem .ui-raster-icon,
.history-heading > .ui-section-emblem .ui-icon,
.history-heading > .ui-section-emblem img,
.history-heading > .ui-section-emblem svg{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  display:block!important;
}
.history-heading > .icon-btn{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  min-height:30px!important;
  display:grid!important;
  place-items:center!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  padding:0!important;
}
.history-heading > .icon-btn > .ui-raster-icon,
.history-heading > .icon-btn > .ui-icon,
.history-heading > .icon-btn > img,
.history-heading > .icon-btn > svg,
.history-heading > .icon-btn > [data-static-icon],
.history-heading > .icon-btn > [data-ui-icon]{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  display:grid!important;
  place-items:center!important;
}
.history-heading > .icon-btn > [data-static-icon] .ui-raster-icon,
.history-heading > .icon-btn > [data-ui-icon] .ui-raster-icon,
.history-heading > .icon-btn > [data-static-icon] .ui-icon,
.history-heading > .icon-btn > [data-ui-icon] .ui-icon{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  display:block!important;
}


/* Saltanat 0.3.181 — tighten icon crops and add more gap between mode icon and text */
.match-mode{
  grid-template-columns:54px minmax(0,1fr) auto!important;
  gap:14px!important;
}
.match-mode>.mode-icon{
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  min-height:54px!important;
}
.mode-copy{
  padding-inline-start:2px!important;
}
@media(max-height:700px){
  .match-mode{grid-template-columns:48px minmax(0,1fr) auto!important;gap:12px!important}
  .match-mode>.mode-icon{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important}
}


/* Saltanat 0.3.181 — use royal raster suit icons on home and rules */
.home-suit > strong[data-ui-icon],
#rulesModal .rules-suit-card > b[data-ui-icon]{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  margin:0 auto!important;
  display:grid!important;
  place-items:center!important;
  font-size:0!important;
  line-height:1!important;
}
.home-suit > strong[data-ui-icon] .ui-raster-icon,
#rulesModal .rules-suit-card > b[data-ui-icon] .ui-raster-icon{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  display:block!important;
  object-fit:contain!important;
}
#rulesModal .rules-suit-card{
  min-height:92px!important;
}
@media(max-width:360px){
  .home-suit > strong[data-ui-icon],
  #rulesModal .rules-suit-card > b[data-ui-icon]{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important}
}

/* Saltanat 0.3.203 — unified Vazir UI and turn timer around the full player profile container. */
html,body,body *,button,input,textarea,select,option,dialog{font-family:Vazir,Tahoma,sans-serif!important}
#gameScreen .player-info.turn-timer-ring{
  --turn-progress:0;
  --turn-ring-color:var(--royal-gold-light,#ffe59b);
  position:relative!important;
  isolation:isolate!important;
  overflow:visible!important;
}
#gameScreen .player-info.turn-timer-ring::before{
  content:"";
  position:absolute;
  z-index:4;
  inset:-4px;
  padding:2px;
  border-radius:inherit;
  pointer-events:none;
  opacity:0;
  background:conic-gradient(from -90deg,var(--turn-ring-color) calc(var(--turn-progress) * 1turn),rgba(255,255,255,.12) 0);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
  filter:drop-shadow(0 0 5px rgba(238,196,104,.2));
  transition:opacity .12s ease,background .1s linear;
}
#gameScreen .player-info.turn-timer-ring.is-turn::before{opacity:1}
#gameScreen .player-info.turn-timer-ring.is-urgent{--turn-ring-color:#ff6b72}
#gameScreen .player-info.turn-timer-ring.is-urgent::before{filter:drop-shadow(0 0 7px rgba(255,75,87,.36))}

/* Saltanat 0.3.205 — final mobile game alignment and iPhone card cleanup. */
#confirmDialog[data-tone="danger"] #confirmConfirmBtn{
  color:#fff4f5!important;
  border-color:#e04350!important;
  background:linear-gradient(180deg,#cf3542,#8f1722)!important;
  box-shadow:0 10px 22px rgba(120,10,22,.28)!important;
}
#confirmDialog[data-tone="danger"] #confirmConfirmBtn:hover{
  background:linear-gradient(180deg,#dd4552,#9f1d29)!important;
}
.home-suits .home-suit:last-child{
  transform:translateY(4px)!important;
}
#gameScreen .hand-zone{
  bottom:-10px!important;
}
html[data-performance="safari"] #gameScreen .table-card-fan::after{
  content:none!important;
  display:none!important;
}

/* Saltanat 0.3.208 — lower the local hand, keep the local profile above it, and unify dark-card strokes. */
html,body,button,input,textarea,select,option,dialog{
  font-family:Vazir,Tahoma,sans-serif!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
#gameScreen .hand-zone{
  bottom:16px!important;
}
#gameScreen #playersLayer{
  z-index:45!important;
}
#gameScreen .seat-player.bottom{
  z-index:46!important;
}
#gameScreen .table-card-fan[data-card-theme="dark"] img,
html[data-card-theme="dark"] #gameScreen .hand .playing-card img.card-face,
html[data-card-theme="dark"] #gameScreen #trickLayer .played img.card-face{
  border:1px solid #34383e!important;
  background:#20242a!important;
}
html[data-card-theme="dark"] #gameScreen #trickLayer .played .playing-card{
  border-color:#34383e!important;
  background:#20242a!important;
}

/* Saltanat 0.3.218 — keep trump/double controls above player profiles and lower both score wings below the trump medallion. */
#gameScreen .game-actions,
#gameScreen .game-actions.trump-actions,
#gameScreen .game-actions.choice-actions{
  z-index:70!important;
  isolation:isolate;
}
#gameScreen .score-wing{
  transform:translateY(7px)!important;
}


/* Saltanat 0.3.220 — larger score labels and tighter overlap under the trump medallion. */
#gameScreen .score-wing small{
  font-size:8px!important;
  line-height:1.15!important;
  font-weight:900!important;
}
#gameScreen .score-wing-left{
  margin-right:-30px!important;
}
#gameScreen .score-wing-right{
  margin-left:-30px!important;
}
@media(max-width:380px){
  #gameScreen .score-wing small{font-size:7.5px!important}
  #gameScreen .score-wing-left{margin-right:-28px!important}
  #gameScreen .score-wing-right{margin-left:-28px!important}
}
@media(max-width:360px){
  #gameScreen .score-wing small{font-size:7px!important}
  #gameScreen .score-wing-left{margin-right:-26px!important}
  #gameScreen .score-wing-right{margin-left:-26px!important}
}
