/* Sugar Rivals is the reference for public desktop game navigation. */
.game-toolbar .toolbar-identity, .line-toolbar #line-tools {display:contents}
.line-toolbar :is(#line-toolbar-title,#invite-friend,#settings,#open-shop svg),
.line-toolbar #guest-wallet,
.toolbar-progress :is([data-star-level],[data-star-total],[data-star-meter]) {display:none}
body:has(#lobby:not([hidden])) .line-toolbar #home {display:none}

[data-public-clusters] #box-pick-heading {
  margin:0 0 3px;
  color:#ffe3a0;
  font:700 clamp(17px,2cqw,34px)/1.05 Rajdhani,Arial,sans-serif;
  letter-spacing:0;
}
[data-public-clusters] #box-pick-heading:not([hidden]) + #round-status {
  color:#f5d5b6;
  font-size:clamp(12px,1.28cqw,20px);
}
[data-public-clusters] .machine-title h1 {translate:0 4px}
[data-public-clusters] .machine-title > span {
  margin-top:max(10px,.4cqw);
  font-size:max(7px,.74cqw);
  translate:0 -4px;
}
[data-public-clusters] .game-console .actions {
  display:grid;
  grid-template-columns:auto auto;
  align-items:center;
  justify-content:center;
  gap:2px 6px;
}
[data-public-clusters] .game-console :is(#start,#spin,#auto) {grid-area:1 / 1}
[data-public-clusters] #box-auto-options {grid-area:1 / 2}
[data-public-clusters] .game-console .actions button[hidden] {display:none}
[data-public-clusters] .game-console .actions button {
  min-width:0;
  min-height:44px;
  padding:5px 10px;
  font:clamp(11px,1.25cqw,20px)/1 Russo,Arial,sans-serif;
  white-space:nowrap;
}
[data-public-clusters] .game-console :is(.primary,#auto) {
  border:0;
  background:transparent url('/assets/casino/clean_spin_btn.png') center/100% 100% no-repeat;
  color:#392000;
  text-shadow:0 1px #fff8;
  box-shadow:none;
}
[data-public-clusters] .game-console .actions .primary {
  width:clamp(112px,13cqw,212px);
  height:clamp(44px,4.3cqw,70px);
}
[data-public-clusters] .game-console .primary span {
  font-size:clamp(15px,1.7cqw,29px);
  letter-spacing:.03em;
}
[data-public-clusters] .duel-action button small {display:none}
[data-public-clusters] #duel-action-note {
  grid-area:2 / 1;
  justify-self:center;
  color:#ffe7b9;
  font:600 clamp(10px,.85cqw,13px)/1.15 system-ui,sans-serif;
  white-space:nowrap;
}
[data-public-clusters] .game-console .actions :is(#start,#spin) {
  display:grid;
  place-items:center;
  height:clamp(44px,3.8cqw,60px);
}
[data-public-clusters] .duel-action button span {font-size:clamp(14px,1.6cqw,26px)}
[data-public-clusters] .game-console #auto {min-width:clamp(90px,8cqw,132px)}
[data-public-clusters] .game-console #spin:disabled {
  opacity:.8;
  filter:saturate(.7);
}
[data-public-clusters] #box-auto-options,
[data-public-clusters] #box-auto-modes button {
  color:#ffe7b9;
  border:1px solid #d39863;
  background:linear-gradient(#744366,#41213c 48%,#291326);
  box-shadow:inset 0 1px #ffd2aa80,inset 0 -2px #190a20,0 2px 4px #180b1c88;
}
[data-public-clusters] #box-auto-options {min-width:54px}
[data-public-clusters] :is(#box-auto-options.auto-enabled,#box-auto-modes [aria-pressed="true"]) {
  border-color:#6bdfff;
  box-shadow:inset 0 1px #abedff66,0 0 9px #65dfff55;
}
[data-public-clusters] .game-console .actions button:enabled:hover {filter:brightness(1.12)}
[data-public-clusters] .game-console .actions button:enabled:active {filter:brightness(.92)}
[data-public-clusters] #box-auto-dialog {
  width:min(420px,calc(100% - 24px));
  padding:16px 20px;
}
[data-public-clusters] #box-auto-dialog h2 {margin:0 44px 12px 0}
[data-public-clusters] #box-auto-dialog button {min-height:44px}
[data-public-clusters] #box-auto-modes:not([hidden]) {display:grid;gap:12px}
[data-public-clusters] #box-auto-modes button {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  font:13px/1 Russo,Arial,sans-serif;
}
[data-public-clusters] #box-auto-modes [aria-pressed="true"] span {color:#8ce8ff}
[data-public-clusters] #box-auto-modes p {margin:5px 0 0;font-size:13px}
[data-public-clusters] .box-auto-actions {display:flex;justify-content:flex-end;gap:8px}
@media (orientation:landscape) and (min-width:901px) and (601px <= height <= 800px) {
  [data-public-clusters] .arena-stage {
    width:min(100%,calc((100dvh - 64px - 76px - 8px) * 16 / 9));
  }
  [data-public-clusters] .game-console {height:76px}
  [data-public-clusters] .game-console .actions :is(#start,#spin) {height:44px}
}
@media (max-width:700px) and (orientation:portrait), (max-height:450px) and (orientation:landscape) {
  [data-public-clusters] .game-console {gap:6px}
  [data-public-clusters] .coach div>span {
    overflow:hidden;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
  }
  [data-public-clusters] .game-console .actions button {padding-inline:7px}
  [data-public-clusters] .game-console .actions .primary {width:104px}
  [data-public-clusters] .game-console #auto {min-width:76px}
  [data-public-clusters] .game-console #box-auto-options {min-width:46px}
}
@media (max-width:700px) and (orientation:portrait) {
  [data-public-clusters] .game-console {height:78px}
}
@media (orientation:landscape) and (max-height:600px) and (max-width:1400px) {
  [data-public-clusters] .game-console {padding-block:2px;height:64px}
  [data-public-clusters] .game-console .actions :is(#start,#spin) {height:44px}
}
@media (orientation:landscape) and (max-height:340px) {
  [data-public-clusters] .game-console .coach div>span {display:none}
}

@media (max-width:900px), (max-height:600px) {
  body:has(#duel:not([hidden])) .line-toolbar #home.lobby-return {display:none}
  #line-game-note {display:none}
}

@media (min-width:901px) and (min-height:601px) {
  body .game-toolbar, body:has(#lobby:not([hidden])) .game-toolbar,
  body.fullscreen-active #game-content .game-toolbar {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(135px,220px) minmax(0,1fr);
    align-items:center;
    gap:16px;
    height:64px;
    padding:0 16px;
    border-bottom:1px solid #6387ac44;
    background:linear-gradient(#102039,#09172d);
  }
  body .game-toolbar .toolbar-identity {
    display:flex;
    align-items:center;
    gap:16px;
    min-width:0;
    grid-area:1 / 1;
  }
  body .game-toolbar .toolbar-identity .brand,
  body:has(#duel:not([hidden])) .line-toolbar .toolbar-identity .brand {
    margin:0;flex:0 0 140px;width:140px;
  }
  .game-toolbar .brand img {display:block;width:100%;height:auto;object-fit:contain}
  .game-toolbar .toolbar-title {
    min-width:0;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    color:#e5c396;
    text-transform:uppercase;
    font:11px/1.25 Arial,sans-serif;
    letter-spacing:1.5px;
  }
  body .game-toolbar .toolbar-identity :is(#profile-open,#guest-wallet):not([hidden]) {
    display:flex;
    align-items:center;
    flex:0 1 auto;
    gap:7px;
    width:auto;
    min-width:0;
    max-width:190px;
    height:44px;
    margin:0;
    padding:4px 8px 4px 4px;
    border:1px solid #6387ac66;
    border-radius:10px;
    background:#162847;
    color:#e5f0ff;
    text-align:left;
  }
  .game-toolbar .toolbar-identity :is(#profile-open,#guest-wallet) img {
    flex:none;width:32px;height:32px;object-fit:cover;border:2px solid #ffd57a;border-radius:50%;
  }
  .game-toolbar :is(#account,.guest-balance) {
    display:flex;
    flex-direction:column;
    font:19px/1 Russo,Arial,sans-serif;
    letter-spacing:0;
    font-variant-numeric:tabular-nums;
    gap:1px;
  }
  body .game-toolbar .toolbar-identity #profile-open #account {
    display:grid;
    grid-template-columns:minmax(0,auto) auto;
    align-items:baseline;
    min-width:0;
    gap:3px 5px;
    font:15px/1 Russo,Arial,sans-serif;
  }
  body .game-toolbar #account .account-name {
    display:block;
    grid-column:1/-1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#c9def3;
    font:11px/1.15 Russo,Arial,sans-serif;
  }
  .game-toolbar .account-unit {
    display:block;
    color:#b8d7ed;
    font:8px/1.2 Russo,Arial,sans-serif;
    letter-spacing:.7px;
    text-transform:uppercase;
  }
  body .game-toolbar .toolbar-identity #google-login:not([hidden]) {
    min-width:0;
    width:auto;
    margin:0;
    padding:8px;
    text-align:center;
    font-size:11px;
  }
  .line-toolbar .toolbar-identity:has(#guest-wallet:not([hidden])) #google-login {
    flex:0 0 72px;
    white-space:normal;
  }
  body .game-toolbar .tools, body .line-toolbar #line-tools {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    margin:0;
    grid-area:1 / 3;
  }
  body .game-toolbar .tools > :is(.header-icon,#rotate-screen,#open-shop) {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 44px;
    width:44px;
    min-width:44px;
    height:44px;
    min-height:44px;
    padding:8px;
    margin:0;
    border:1px solid #6387ac66;
    border-radius:10px;
    background:#162847;
    color:#e5f0ff;
    text-decoration:none;
    line-height:1;
  }
  body .game-toolbar .tools > [hidden] {display:none}
  body:has(#lobby:not([hidden])) .line-toolbar :is(#invite-friend,#settings) {display:none}
  body:has(#duel:not([hidden])) .line-toolbar #line-toolbar-title:not([hidden]) {display:block}
  .game-toolbar .tools svg {display:block;width:24px;height:24px;flex:none}
  body .game-toolbar .tools #open-shop,
  body:has(#lobby:not([hidden])) .line-toolbar .tools #open-shop {
    flex-basis:98px;
    width:98px;
    min-width:98px;
    gap:6px;
    padding:4px 8px;
    color:#ffd57a;
    background:#102039;
    border-color:#f8cb6188;
    box-shadow:0 0 10px #f8cb6122;
  }
  body .game-toolbar .tools #open-shop svg {display:none}
  body .game-toolbar .tools #open-shop img {
    display:block;
    flex:none;
    width:28px;
    height:28px;
    object-fit:contain;
  }
  body .game-toolbar .tools #open-shop span,
  body:has(#lobby:not([hidden])) .line-toolbar .tools #open-shop span {
    display:block;
    color:#ffe286;
    font:12px/1 Russo,Arial,sans-serif;
  }
  body .game-toolbar .tools #invite-friend {color:#ffd57a;border-color:#f8cb6188}
  body .game-toolbar .tools #sound[aria-pressed="true"] {color:#44cbff;border-color:#44cbff}
  body .game-toolbar .tools :is(#help,#open-help) {font:25px/1 Russo,Arial,sans-serif}
  body .game-toolbar .tools #home {
    border:2px solid #53d8ff;
    background:linear-gradient(#174c72,#09213d);
    color:#fff;
    box-shadow:0 0 14px #35caff44;
  }
  body:has(#duel:not([hidden])) .line-toolbar .tools #home.lobby-return {
    display:inline-flex;
    position:static;
  }
  .line-toolbar .tools #home.lobby-return::before {display:none}
  .game-toolbar .tools #home svg {width:26px;height:26px}
  .game-toolbar .tools :is(button,a):focus-visible {outline:2px solid white;outline-offset:2px}
  .game-toolbar .tools :is(button,a):not(:disabled):hover {border-color:#89dfff}

  body .game-toolbar #cluster-progress, body .game-toolbar #lobby-progress,
  body:has(#lobby:not([hidden])) .game-toolbar #lobby-progress {
    display:block;
    width:100%;
    max-width:220px;
    height:auto;
    margin:0;
    padding:8px 10px;
    border:1px solid #ffd57a66;
    border-radius:10px;
    background:linear-gradient(120deg,#183953ee,#0a172bee);
    grid-area:1 / 2;
  }
  .game-toolbar #lobby-progress > div, .game-toolbar #cluster-progress {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    column-gap:8px;
    row-gap:6px;
    color:#ffe286;
    font:11px/1.15 Russo,Arial,sans-serif;
    text-align:left;
  }
  body .game-toolbar #cluster-progress {display:grid}
  .game-toolbar .toolbar-progress :is([data-star-level],[data-star-total]) {display:block}
  .game-toolbar .toolbar-progress-summary {display:none}
  .game-toolbar #cluster-progress [data-star-total] {justify-self:end}
  .game-toolbar :is(#cluster-progress,#lobby-progress) progress {
    display:block;
    grid-column:1/-1;
    appearance:none;
    width:100%;
    height:5px;
    margin:0;
    border:1px solid #f4d79088;
    border-radius:8px;
    background:#060f1d;
    accent-color:#ffd57a;
  }
  .game-toolbar progress::-webkit-progress-bar {border-radius:8px;background:#060f1d}
  .game-toolbar progress::-webkit-progress-value {border-radius:8px;background:linear-gradient(#fff1c7,#e2b353)}
  .game-toolbar progress::-moz-progress-bar {border-radius:8px;background:#f2cc76}

  .game-footer, footer.game-footer.practice-note {
    text-align:center;
    font:600 11px/1.3 Arial,sans-serif;
    letter-spacing:.45px;
    color:#c7aebf;
    margin:0;
    padding:8px 10px;
  }
  body:has(#lobby:not([hidden])) #game-content {
    max-width:none;
    padding:0;
  }
  body:has(#lobby:not([hidden])) #lobby {padding-inline:14px}
  body:has(#duel:not([hidden])) #game-content {
    position:static;
    width:100%;
    max-width:none;
    min-height:0;
    margin:0;
    padding:0;
    transform:none;
  }
  body:has(#duel:not([hidden])) #duel {
    width:min(100%,1920px,calc((100dvh - 128px) * 16 / 9));
    margin-inline:auto;
  }
  body:has(#duel:not([hidden])) #battle-stage {border-radius:0}
  .line-toolbar ~ #duel .room-bar {display:none}
  body:has(#duel:not([hidden])) #game-content .game-footer {display:block}
  body:has(#duel:not([hidden])) #game-content #notice:empty {display:none}
  body:has(#duel:not([hidden])) #game-content > .game-footer {margin-top:0}
  body:has(#duel:not([hidden])) .game-footer :is(.lobby-footer-label,.legal-links) {display:none}

  #battle-stage dialog#lines-dialog #auto-pick {
    padding-inline:12px;
    border:0;
    background:transparent url('/assets/casino/clean_spin_btn.png') center/100% 100% no-repeat;
    box-shadow:none;
  }
  #line-settings-dialog > button:not(#close-line-settings) {width:100%;margin-top:8px}
  #close-line-settings {position:absolute;top:12px;right:12px;min-width:44px;min-height:44px}
}

@media (min-width:901px) and (max-width:1320px) and (min-height:601px) {
  body .game-toolbar, body:has(#lobby:not([hidden])) .game-toolbar,
  body.fullscreen-active #game-content .game-toolbar {
    grid-template-columns:minmax(220px,1fr) minmax(135px,220px) auto;
    gap:12px;
  }
  body .game-toolbar .toolbar-identity {gap:8px}
  body .game-toolbar .tools, body .line-toolbar #line-tools {gap:6px}
}

@media (min-width:901px) and (max-width:1080px) and (min-height:601px) {
  body .game-toolbar, body:has(#lobby:not([hidden])) .game-toolbar,
  body.fullscreen-active #game-content .game-toolbar {
    grid-template-columns:minmax(220px,1fr) minmax(135px,175px) auto;
  }
  body .game-toolbar .toolbar-identity .brand,
  body:has(#duel:not([hidden])) .line-toolbar .toolbar-identity .brand {flex-basis:96px;width:96px}
  .game-toolbar .toolbar-title {display:none}
  body:has(#duel:not([hidden])) .line-toolbar #line-toolbar-title:not([hidden]) {display:none}
}

@media (min-width:901px) and (min-height:601px) and (hover:hover) and (pointer:fine) {
  body:has(#lobby:not([hidden])) #game-content {
    display:flex;
    flex-direction:column;
    min-height:100dvh;
  }
  body:has(#lobby:not([hidden])) #game-content > .game-footer {margin-top:auto}
  body:has(#lobby:not([hidden])) #notice:empty,
  body:has(#lobby:not([hidden])) .line-toolbar .tools #open-help {display:none}
  body:has(#lobby:not([hidden])) #lobby {
    max-width:none;
    padding:clamp(14px,3.4dvh,42px) clamp(20px,4vw,72px) 10px;
  }
  #lobby h1 {font-size:clamp(32px,min(3.5vw,5.6dvh),62px)}
  #lobby .game-types {
    width:min(100%,clamp(525px,min(49vw,90dvh),880px));
    margin:clamp(8px,2.2dvh,26px) auto clamp(12px,2.6dvh,32px);
    gap:clamp(10px,1vw,20px);
  }
  #lobby .game-type-caption strong {font-size:clamp(13px,1.2vw,19px)}
  #lobby .arena-carousel {max-width:1600px}
  #lobby .arena-cards {margin:0}
  #lobby .arena-card, #lobby .sugar-card {min-height:clamp(190px,36dvh,440px)}
  #lobby .sugar-card {
    width:min(100%,clamp(700px,68vw,1400px));
    margin:0 auto 14px;
  }
  #lobby .sugar-card > strong {font-size:clamp(34px,min(4.3vw,7dvh),72px)}
}
