/**/
/* THIS FILE AUTOGENERATED FROM CSS in saito/css-includes/ / */ 
/**/

/* values set from TS card, adjust for poker deck and update TS with this */
.card {
  /* change game-controls.css for cardbox minwidth if != 10vw */
  height: calc(10vw * 1.4);
  width: 10vw;
}

.cardimg , .card img {
  position: absolute;
  height: 100%; /* We probably don't want this!!!*/
  width: 100%;
  top: 0px;
  left: 0px;
}



.game-clock {
  position: fixed;
  cursor: pointer;
  top:0px;
  right:0px;
  display:inline;
  background: #000;
  color: red;
  font-size:3rem;
  font-family: monospace;
  margin: 0 auto;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 5px;
  padding-bottom: 5px;
  text-align: center;
  border-radius: 0.417rem;
  z-index: 900000;
}


#game-clock-miliseconds{
  font-size: 2.333rem;
}

.game-playerbox .game-clock {
  position: static;
}

.player_clock .game-clock{
  position: static;
  background: unset;
  height: 100%;
  display: block;
  font-size: 2.5rem;
  filter: drop-shadow(2px 2px 1px black);
}

@media only screen and (max-width: 600px) {
  .player_clock .game-clock{
    font-size: 2rem;
  }
}:root {
  --game-menu-background: #f5f5f5ed;
}

.game-menu {
  position: fixed;
  top: 0px;
  left: 0px;
  display: block;
  width: auto;
  margin: 1px 1px 3px 3px;
  z-index: 500;
  font-size: 1.583rem;
  min-width: 20vw;
  cursor: pointer;
  color: black;
}


.menu-option-container {
  border: unset;
}

#saito-header .game-menu {
  position: relative;
  margin: unset;
}

.game-menu ul,
.game-menu-mobile-toggle {
  box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);
  background-color: var(--game-menu-background);
}

.game-menu ul li {
  text-align: center;
}

/* Visible Top Row */
.game-menu > ul {
  display: flex;
  flex-direction: row;
  height: 40px;
  border: 1px solid #444;
  border-radius: 0.417rem;
}

/* All menu options */
.game-menu > ul li {
  user-select: none;
  list-style: none;
  text-align: center;
  padding: 0;
  margin: 0;
  min-width: 125px;
  width: fit-content;
  max-width: 150px;
  height: fit-content;
  line-height: 40px;
  position: relative;
}

.game-menu > ul li.game-menu-icon {
  min-width: unset;
  width: 50px;
  max-width: 50px;
  padding: 0 5px;
  line-height: 40px;
}

.game-menu-sub-options {
  width: 200px;
}

.game-menu-sub-options:after {
  content: '';
  position: absolute;
  width: calc(100% + 70px);
  height: calc(100% + 45px);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: -2;
}

.game-menu-sub-sub-options:after {
  content: '';
  position: absolute;
  width: calc(100% + 40px);
  height: calc(100% + 25px);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
}

.game-menu ul.game-menu-sub-options li {
  max-width: unset;
  width: 100%;
  border-bottom: 1px solid var(--saito-gray-200);
}

.game-menu-sub-option .game-menu-option-label {
  position: relative;
  background-color: inherit;
  height: 50px;
  line-height: 50px;
  width: 100%;
  text-align: center;
}

.game-menu-sub-options,
.game-menu-sub-sub-options {
  display: none;
  position: absolute;
  top: 100%;
}

.game-menu-sub-sub-options {
  position: absolute;
  width: 100%;
  left: 101%;
  top: 0;
}

.game-menu-icon:hover,
.game-menu-option:hover,
.game-menu-sub-option:hover,
.game-menu-sub-sub-option:hover {
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.1);
}

.game-menu-option:hover ul {
  font-weight: normal;
}

.game-menu .game-menu-mobile-toggle {
  display: none;
}

.game-menu-mobile-header,
.game-menu-icon-label,
.game-menu-accordion-icon {
  display: none;
}

.game-menu-mobile-fullscreen-icon {
  display: none;
}

.game-menu .notification::before {
  content: '!';
  color: var(--saito-white);
  background-color: var(--saito-primary);
  border-radius: 0.583rem;
  padding: 0.208rem 0.5rem;
  position: absolute;
  right: 0.833rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 20px;
}

.game-menu .saito-notification-dot {
  left: unset;
  right: 2.5rem;
  top: 0;
}

@media screen and (max-width: 600px),
  screen and (orientation: landscape) and (max-height: 600px) {
  #saito-header .game-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: min(33.333rem, 100vw);
    min-width: 0;
    height: 100svh;
    margin: 0;
    border: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  #saito-header .game-menu.mobile-visible {
    transform: translateX(0);
  }

  .game-menu > ul {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--saito-foreground);
    background: var(--saito-popover);
    border: 0;
    border-radius: 0 var(--saito-radius-lg) var(--saito-radius-lg) 0;
    box-shadow: var(--saito-elevation-3);
  }

  .game-menu > ul > li,
  .game-menu ul.game-menu-sub-options li {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    margin: 0;
    line-height: normal;
    border-bottom: 1px solid var(--saito-border);
  }

  .game-menu > ul > li.game-menu-mobile-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) 4rem;
    gap: var(--saito-space-sm);
    width: 100%;
    height: var(--game-menu-mobile-header-height);
    padding: var(--saito-space-sm);
    background: var(--saito-popover);
    border-bottom: 1px solid var(--saito-border);
  }

  .game-menu-mobile-header-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--saito-space-sm);
    min-width: 0;
    height: 4rem;
    padding: var(--saito-space-sm) var(--saito-space-md);
    color: var(--saito-foreground);
    font: inherit;
    background: var(--saito-secondary);
    border: 1px solid var(--saito-border);
    border-radius: var(--saito-radius);
  }

  .game-menu-mobile-header-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-menu-saito-logo {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    background: currentColor;
    mask: url('/saito/img/saito-cube.svg') center / contain no-repeat;
  }

  .game-menu-mobile-header-button[aria-pressed='true'] {
    color: var(--saito-primary-foreground);
    background: var(--saito-primary);
    border-color: var(--saito-primary);
    font-weight: bold;
  }

  .game-menu-mobile-header-button i {
    font-size: 1.833rem;
  }

  .game-menu > ul > li.game-menu-icon,
  .game-menu-option-label {
    display: flex;
    align-items: center;
    width: 100%;
    height: 4.167rem;
    padding: 0 var(--saito-space-lg);
    color: var(--saito-foreground);
    line-height: 4.167rem;
    text-align: left;
    background: transparent;
    box-shadow: none;
  }

  .game-menu > ul > li.game-menu-icon {
    gap: var(--saito-space-md);
    max-width: none;
  }

  .game-menu > ul > li.game-menu-icon > i {
    width: 2rem;
    font-size: 1.667rem;
    text-align: center;
  }

  .game-menu-desktop-fullscreen-icon {
    display: none;
  }

  .game-menu-mobile-fullscreen-icon {
    display: inline-block;
  }

  .game-menu-icon-label,
  .game-menu-accordion-icon {
    display: inline-block;
  }

  .game-menu-option-label {
    justify-content: space-between;
  }

  .game-menu-accordion-icon {
    transition: transform 0.2s ease;
  }

  .game-menu-option.expanded > .game-menu-option-label > .game-menu-accordion-icon,
  .game-menu-sub-option.expanded > .game-menu-option-label > .game-menu-accordion-icon {
    transform: rotate(180deg);
  }

  .game-menu .game-menu-sub-options,
  .game-menu .game-menu-sub-sub-options {
    position: static;
    width: 100%;
    margin: 0;
    background: var(--saito-popover);
    border: 0;
    box-shadow: none;
  }

  .game-menu-sub-options::after,
  .game-menu-sub-sub-options::after {
    display: none;
  }

  .game-menu-sub-option .game-menu-option-label {
    height: 4rem;
    padding-left: 2.667rem;
    line-height: 4rem;
  }

  .game-menu-sub-sub-option .game-menu-option-label {
    padding-left: 4.333rem;
  }

  .game-menu .game-menu-mobile-toggle {
    position: absolute;
    top: 0;
    left: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.667rem;
    height: 3.667rem;
    padding: 0;
    color: var(--saito-foreground);
    font-size: 2.167rem;
    background: var(--saito-secondary);
    border: 1px solid var(--saito-border);
    border-left: 0;
    border-radius: 0 var(--saito-radius) var(--saito-radius) 0;
    box-shadow: var(--saito-elevation-2);
  }

  .game-menu.mobile-visible .game-menu-mobile-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .game-menu.mobile-saito-visible {
    pointer-events: none;
  }

  .game-menu.mobile-saito-visible > ul {
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  .game-menu.mobile-saito-visible > ul > .game-menu-icon,
  .game-menu.mobile-saito-visible > ul > .game-menu-option {
    visibility: hidden;
  }

  .game-menu.mobile-saito-visible .game-menu-mobile-header {
    pointer-events: auto;
  }

  .game-menu .notification::before {
    right: var(--saito-space-lg);
  }
}

.disable-menu {
  display: none;
  visibility: hidden;
}

.game-scoreboard {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  padding: 4px 8px;
  color: var(--saito-foreground);
  background-color: var(--game-menu-background);
  border: 1px solid #444;
  border-radius: 5px;
  box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#saito-header .game-scoreboard {
  position: relative;
  transform: unset;
  left: unset;
  margin: auto;
}

.game-scoreboard span {
  width: min-content;
  white-space: nowrap;
}

.scoreitem{
  padding: 0 10px;
}

.table_ctrl{
  font-weight: bold;
  cursor: pointer;
  background-color: whitesmoke;
  border: 2px solid whitesmoke;
  padding: 0 10px;
}
:root {
  --ideal-game-log: min(500px, 65vw);
}

#log-wrapper {
  top: 0px;
  right: calc(16px - var(--ideal-game-log));
  position: absolute;
  display: block;
  width: var(--ideal-game-log);
  height: 100%;
  z-index: 90;
  color: #fff;
  background: #222d;
  transition: all 400ms;
  font-size: 16px;
  font-family: "Courier New", monospace;
  padding: 2px;
}

.log{
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  cursor: pointer;
}

/* Open Position */
.log-lock#log-wrapper {
  right: 0;
}

.log * {
  text-indent: 0;
}

.log > div{
  padding-left: 21px;
  text-indent: -20px;
}

/* For integration with game-cardbox*/
.showcard{
  font-weight: bold;
  cursor: pointer;
}

.mobile-log-tab{
  position: absolute;
  top: 0;
  right: 100%;
  width: 40px;
  height: 41px;
  font-size: 32px;
  text-align: center;
  padding: 5px;
  border-radius: 10px 0 0 10px;
  display: none;
  color: #fff;
  background: #222d;
  transition: all 400ms;
}

@media screen and (max-width: 525px) {
  #log-wrapper {
    right: -95%;
    width: 95%;
    font-size: 1em;
  }

  #log-wrapper.log-lock {
    right: 0;
  }

  .log > div{
    padding-left: 1em;
    text-indent: -1em;
  }

  .mobile-log-tab{
    display: block;
  }
}

.game-cardbox {
  position:absolute;
  left: 50%;
  top: 13vh;
  height: auto;
  width: calc(55vh * 0.730);
  transform: translateX(-50%);
  z-index: -10; /* start behind the board, toggles between -10 and 250 */
  font-size: max(1.5vh,8px);
  color: white;
  pointer-events: none;
}

.cardbox-card {
 position: relative;
 width: 100%;
 height: 100%;
}

.cardbox-card .cardimg{
  width: 100%;
}

.cardbox-exit-background {
  position: absolute;
  top: -2%;
  right: -2%;
  width: 5vh;
  height: 5vh;
  max-width: 50px;
  max-height: 50px;
  border: 3px black solid;
  border-radius: 100px;
  background: #eb2d2d;
  z-index: 260;
  display: none;
}

.cardbox-exit {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  font-size: 5vh;
  z-index: inherit;
  cursor: pointer;
  display: none;
  line-height: 4.5vh;
}

.cardbox-menu {
  position: absolute;
  width: 85%;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6%;
  font-size: 2em;
  background-color: #eb2d2d;
  border: 2px solid #111311;
  cursor: pointer;
  padding: 0.5em 1em;
  text-decoration: none;
  border-radius: 10px;
  z-index: 260;
  text-align: center;
  display: none;
}

.cardbox-menu:hover, .cardbox-exit:hover{
  font-weight: bold;
}
.game-observer-sync-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  z-index: 10000;
  height: 100vh;
  width: 100vw;
}

.game-observer-sync-overlay .game-observer-sync-title {
  color: #fff;
  font-size: 3.75rem;
  margin: 0;
}

.game-observer-sync-overlay .game-observer-sync-status {
  color: rgba(255, 255, 255, 0.9);
  font-size: 2.5rem;
  margin: 0;
}

.game-observer-sync-overlay .game-observer-inline-spinner {
  width: 78px;
  height: 78px;
  border-width: 9px;
}

.game-observer-hud {
  position: fixed;
  pointer-events: auto;
  display: flex;
  bottom: 1.667rem;
  left: 50%;
  transform: translateX(-50%);
  width: 450px;
  max-width: 100vw;
  max-height: 180px;
  background-color: #111D;
  color: ghostwhite;
  font-size: max(3vh, 16px);
  text-align: center;
  padding: 0.625rem;
  padding-top: 1.042rem;
  z-index: 99999999;
  border-radius: 15px;
  border: 2px solid #AAA;
  flex-direction: column;
  gap: 0;
}


.game-observer-hud .status,
.game-observer-status {
  height: fit-content;
  width: 100%;
  font-size: 18px;
  margin-top: 0.417rem;
  margin-bottom: 0.417rem;
}
.game-observer-status {
  font-size: 20px;
}

.play-state i.fa-pause, .play-state i.fa-forward{
  display: none;
}
.pause-state i.fa-play, .pause-state i.fa-step-forward{
  display: none;
}

#obstatus {
  font-size: 1.5rem;
  min-height: 4.167rem;
}

.game-observer-hud .game-observer-controls-row,
.game-observer-controls-row,
.game-observer-controls {
  display: flex;
  flex-direction: row !important;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 0;
  margin-bottom: 8px;
}

.game-observer-controls-row .game-observer-btn,
.game-observer-controls button {
  width: fit-content;
  padding: 0.625rem 1.042rem;
  min-width: 56px;
  min-height: 48px;
  font-size: 1.167rem;
  border: 1px solid;
  border-radius: 0.625rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.game-observer-controls-row .game-observer-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.game-observer-ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.game-observer-ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
}

.game-observer-ctrl-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.game-observer-hud #observer-status-line,
.game-observer-title {
  text-align: center;
  font-size: 22px;
  margin-top: 0.208rem;
  margin-bottom: 0.625rem;
  white-space: nowrap;
  line-height: 1.3;
}

.game-observer-inline-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  gap: 8px;
}

.game-observer-inline-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: game-observer-inline-spin 0.8s linear infinite;
}

@keyframes game-observer-inline-spin {
  to { transform: rotate(360deg); }
}

.game-observer-hud.loading .game-observer-inline-loading {
  display: flex;
}

.game-observer-hud.loading .game-observer-controls-row,
.game-observer-hud.loading .game-observer-slider-row,
.game-observer-hud.loading .game-observer-timeline-row {
  display: none;
}

.game-observer-hud .game-observer-controls-row {
  display: flex;
}

.game-observer-hud .game-observer-slider-row,
.game-observer-hud .game-observer-timeline-row,
.game-observer-slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 0;
  gap: 4px;
}

.game-observer-timeline-row {
  position: relative;
  width: 100%;
}

.game-observer-timeline-inner {
  display: flex;
  align-items: center;
  gap: 0.417rem;
  width: 100%;
  min-height: 28px;
}

.game-observer-timeline-row .timeline-start,
.game-observer-timeline-row .timeline-end {
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.9);
}

.game-observer-timeline-row .timeline-start {
  text-align: right;
}

.game-observer-timeline-row .timeline-end {
  text-align: left;
}

.game-observer-timeline-row .game-observer-state-slider {
  flex: 1;
  min-width: 80px;
  width: 100%;
  max-width: 350px;
  height: 6px;
  cursor: pointer;
  accent-color: rgba(255, 255, 255, 0.8);
  -webkit-appearance: none;
  appearance: none;
  --progress: 0%;
  --timeline-fill: rgba(255, 255, 255, 0.55);
  background: linear-gradient(
    to right,
    var(--timeline-fill) 0%,
    var(--timeline-fill) var(--progress),
    rgba(255, 255, 255, 0.2) var(--progress),
    rgba(255, 255, 255, 0.2) 100%
  ) !important;
  border-radius: 3px;
}

.game-observer-timeline-row .game-observer-state-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--timeline-fill) 0%,
    var(--timeline-fill) var(--progress),
    rgba(255, 255, 255, 0.2) var(--progress),
    rgba(255, 255, 255, 0.2) 100%
  );
}

.game-observer-timeline-row .game-observer-state-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  margin-top: -5px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.game-observer-timeline-row .game-observer-state-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--timeline-fill) 0%,
    var(--timeline-fill) var(--progress),
    rgba(255, 255, 255, 0.2) var(--progress),
    rgba(255, 255, 255, 0.2) 100%
  );
}

.game-observer-timeline-row .game-observer-state-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.game-observer-timeline-tooltip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -1.042rem;
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.game-observer-timeline-tooltip.visible {
  opacity: 1;
}

.game-observer-inline-text {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.9);
}

.game-observer-slider-row .game-observer-state-slider {
  width: 100%;
  max-width: 350px;
  height: 6px;
  cursor: pointer;
  accent-color: rgba(255, 255, 255, 0.8);
}

#observer-slider {
  width: 100%;
  height: 4px;
}

.unavailable {
  color: #444;
}

.game-observer-state-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
}
.game-observer-state-slider {
  flex: 1;
  min-width: 80px;
  height: 6px;
  cursor: pointer;
}
.game-observer-viewing-label {
  font-size: 0.85em;
  color: #aaa;
  white-space: nowrap;
}

.game-observer-hud .status-header, .game-observer-hud .status-message {
  background-color: unset;
}

/* Sync overlay sub-elements (optional panel/spinner/message variants) */
.game-observer-sync-overlay-panel {
  background: #fff;
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  text-align: center;
  min-width: 220px;
}
.game-observer-sync-overlay-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid #eee;
  border-top-color: #333;
  border-radius: 50%;
  animation: game-observer-sync-spin 0.8s linear infinite;
}
@keyframes game-observer-sync-spin {
  to { transform: rotate(360deg); }
}
.game-observer-sync-overlay-message {
  font-size: 16px;
  color: #333;
}
.game-observer-sync-overlay-steps {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
}

/* --- HARD LAYOUT ENFORCEMENT: exactly three rows (status, controls, timeline) --- */

.game-observer-hud {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
}

.game-observer-hud .game-observer-controls-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
}

.game-observer-hud .game-observer-slider-row,
.game-observer-hud .game-observer-timeline-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100%;
}

.game-observer-hud .status {
  display: block !important;
}

/* --- Override global button styles inside observer --- */

.game-observer-hud button {
  min-width: 56px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0.625rem 1.042rem !important;
  font-size: 1.167rem !important;
  border-radius: 0.417rem !important;
}

.game-observer-hud .game-observer-btn {
  width: auto !important;
  min-width: 56px !important;
  min-height: 48px !important;
  margin: 0 !important;
}

/* Component-level reset for observer */

.game-observer-hud button {
  all: unset;
  box-sizing: border-box;
}

.game-observer-hud .game-observer-btn,
.game-observer-hud .game-observer-controls-row button,
.game-observer-hud .game-observer-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.167rem;
  padding: 0.625rem 1.042rem;
  min-width: 56px;
  min-height: 48px;
  border: 1px solid var(--saito-primary);
  border-radius: 0.5rem;
  cursor: pointer;
}

.game-observer-hud .game-observer-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.game-playerbox-manager {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: absolute;
    top: 5rem;
    right: 2.5rem;
    user-select: none;
}

.game-playerbox-manager.reverse{
  flex-direction: column-reverse;
}

.game-playerbox {
    padding: 0.833rem;
    z-index: 3;
    max-width: 25vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    user-select: none;
}

.game-playerbox.active {
    border: 1px solid white;
}
.game-playerbox.flash {
}
.game-playerbox.shake {
}

.game-playerbox-head {
    width: 100%;
    display: inline-flex;
    align-items: center;
    cursor: default;
}

.game-playerbox-body {
    width: 100%;
    padding: 0rem;
    margin-top: 0.417rem;
    line-height: 1.917rem;
    font-size: 1.333rem;
    flex-grow: 1;
}

.game-playerbox-graphics {
  display: none;
  position: absolute;
}

.game-playerbox-icons {
    top: 0rem;
    right: 0rem;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    grid-row: 1 / span 2;
    grid-column: 3;
}

.game-playerbox-head .saito-user .saito-address {
  max-width: calc(100% + 0.833rem);
}

.game-playerbox-head .saito-user>.saito-userline {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

.game-playerbox-head .saito-user>.saito-userline .player-stake {
  text-transform: uppercase;
}
  

.game-playerbox-seat-6 {
  order: 1;
}
  
.game-playerbox-seat-5 {
  order: 2;
}

.game-playerbox-seat-4 {
  order: 3;
}

.game-playerbox-seat-3 {
  order: 4;
}

.game-playerbox-seat-2 {
  order: 5;
}

.game-playerbox-seat-1 {
  position: absolute;
  min-width: 30vh;
  max-height: 36vh;
  width: 16vw;
  bottom: 20px;
}


@media screen and (orientation: portrait) and (max-width: 600px) {

  .game-playerbox-manager {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: max-content;
    justify-content: space-between;
    bottom: 0.833rem;
    top: unset;
    right: 1.667rem;
    gap: 1.667rem;
    position: absolute;
    height: max-content;
  }

  .game-playerbox {
    max-width: 50vw;
    min-width: unset;
  }

}




#game_board_sizer {
  --board-sizer-bg: rgba(28, 20, 32, 0.92);
  --board-sizer-control-bg: rgba(255, 255, 255, 0.05);
  --board-sizer-border: rgba(255, 255, 255, 0.16);
  --board-sizer-muted: rgba(255, 255, 255, 0.28);
  --board-sizer-fg: var(--saito-white);
  --board-scale-progress: 50%;

  position: absolute;
  top: 5px;
  right: 20px;
  z-index: 45;
  display: flex;
  flex-direction: row;
  gap: 0.417rem;
  width: min(23.333rem, calc(100vw - 3.333rem));
  align-items: center;
  justify-content: flex-start;
  padding: 0.333rem;
  border: 1px solid var(--board-sizer-border);
  border-radius: 8px;
  background: var(--board-sizer-bg);
  box-shadow: 0 0.667rem 1.667rem rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

#saito-header #game_board_sizer {
  position: static;
}

#game_board_sizer button {
  appearance: none;
  display: grid;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--board-sizer-border);
  border-radius: 8px;
  color: var(--board-sizer-fg);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: inherit;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

#game_board_sizer button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
}

#game_board_sizer button:focus,
#game_board_sizer button:focus-visible,
#game_board_sizer input:focus,
#game_board_sizer input:focus-visible {
  outline: none;
  box-shadow: none;
}

#game_board_sizer .game-board-sizer-center {
  flex: 0 0 2.667rem;
  width: 2.667rem;
  height: 2.667rem;
  place-items: center;
}

#game_board_sizer .game-board-sizer-center i {
  margin: 0;
  font-size: 1.5rem;
  color: var(--board-sizer-fg);
  text-shadow: none;
}

#game_board_sizer .game-board-sizer-control {
  display: flex;
  flex: 1;
  min-width: 0;
  height: 2.667rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
  border: 1px solid var(--board-sizer-border);
  border-radius: 8px;
  background: var(--board-sizer-control-bg);
}

#game_board_sizer .game-board-sizer-step {
  position: relative;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 0;
  font-weight: 600;
  font-family: monospace;
}

#game_board_sizer .game-board-sizer-step::before {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--board-sizer-fg);
  font-size: 1.5rem;
  line-height: 1;
  transform: translate(-50%, -50%);
}

#game_board_sizer .game-board-sizer-step[data-board-zoom='-1']::before {
  content: '-';
}

#game_board_sizer .game-board-sizer-step[data-board-zoom='1']::before {
  content: '+';
}

#game_board_sizer input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 6.667rem;
  width: 100%;
  height: 1.667rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 99999;
  margin: 0px;
}

#game_board_sizer input[type='range']::-webkit-slider-runnable-track {
  height: 0.333rem;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--saito-primary) 0%,
    var(--saito-primary) var(--board-scale-progress),
    var(--board-sizer-muted) var(--board-scale-progress),
    var(--board-sizer-muted) 100%
  );
}

#game_board_sizer input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.333rem;
  height: 1.333rem;
  margin-top: -0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  background: var(--saito-white);
  box-shadow: 0 0.083rem 0.333rem rgba(0, 0, 0, 0.3);
}

#game_board_sizer input[type='range']::-moz-range-track {
  height: 0.333rem;
  border-radius: 999px;
  background: var(--board-sizer-muted);
}

#game_board_sizer input[type='range']::-moz-range-progress {
  height: 0.333rem;
  border-radius: 999px;
  background: var(--saito-primary);
}

#game_board_sizer input[type='range']::-moz-range-thumb {
  width: 1.333rem;
  height: 1.333rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  background: var(--saito-white);
  box-shadow: 0 0.083rem 0.333rem rgba(0, 0, 0, 0.3);
}

#game_board_size_toggle {
  position: absolute;
  height: 3.333rem;
  width: 3.333rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--saito-white);
  font-size: 2.5rem;
  text-shadow: 1px 1px 3px var(--saito-black);
  right: 3.333rem;
}

/***************/
/*** HexGrid ***/
/***************/
#game-hexgrid {
  user-select: none;
  display: flex;
  width: 2000px;
  flex-wrap: wrap;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  /*list-style-type: none;*/
  /*
%  3D Perspective
%  -webkit-transform: perspective(600px) rotateX(60deg);
%  -moz-transform: perspective(600px) rotateX(60deg);
%  -ms-transform: perspective(600px) rotateX(60deg);
%  -o-transform: perspective(600px) rotateX(60deg);
%  transform: perspective(600px) rotateX(60deg);
*/
}
.hex {
  position: relative;
  /* visibility: hidden; */
  outline: 1px solid transparent;
  /* fix for jagged edges in FF on hover transition */
  width: 12.5%;
}

.hex.dummy {
  z-index: -1;
}

.hex::after {
  content: '';
  display: block;
  padding-bottom: 86.602%;
  /* =  100 / tan(60) * 1.5 */
}
.hexIn {
  position: absolute;
  width: 96%;
  padding-bottom: 110.851%;
  /* =  width / sin(60) */
  margin: 0 2%;
  overflow: hidden;
  visibility: hidden;
  outline: 1px solid transparent;
  /* fix for jagged edges in FF on hover transition */
  -webkit-transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
  -ms-transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
  transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
}
.hexIn * {
  position: absolute;
  visibility: visible;
  outline: 1px solid transparent;
  /* fix for jagged edges in FF on hover transition */
}

.hexLink {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  color: #fff;
  overflow: hidden;
  -webkit-transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
  -ms-transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
  transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
}
.hex_bg {
  left: -100%;
  right: -100%;
  width: auto;
  height: 100%;
  margin: 0 auto;
  -webkit-transform: rotate3d(0, 0, 0, 0deg);
  -ms-transform: rotate3d(0, 0, 0, 0deg);
  transform: rotate3d(0, 0, 0, 0deg);
  transform: rotate(30deg) scale(0.88);
}
.hex_bg img {
    left: -100%;
    right: -100%;
    width: auto;
    height: 100%;
    margin: 0 auto;
    -webkit-transform: rotate3d(0, 0, 0, 0deg);
    -ms-transform: rotate3d(0, 0, 0, 0deg);
    transform: rotate3d(0, 0, 0, 0deg);
}


.cardfan {
  position: absolute;
  top: 70vh;
  left: 15vw;
  height: 100%;
  width: auto;
  padding-left: 0px;
  padding-top: 0px;
  margin-left: auto;
  margin-right: auto;
  cursor: grab;
}

.cardfan .card {
  position: absolute;
  width: min(17.5vh,20vw);
  height: auto;
}
.cardfan .cardimg {
  width: 100%;
  height: auto;
}

.cardfan>.card:nth-child(1) {
  transform: rotate(-20deg);
  left: 0px;
}

.cardfan>.card:first-child:last-child {
  transform: rotate(0deg);
  left: 0px;
}
.cardfan>.card:only-child {
  transform: rotate(0deg);
  left: 0px;
}

.cardfan>.card:nth-child(2) {
  transform: rotate(-10deg);
  left: 3vh;
}

.cardfan>.card:nth-child(3) {
  transform: rotate(0deg);
  left: 6vh;
}

.cardfan>.card:nth-child(4) {
  transform: rotate(10deg);
  left: 9vh;
}

.cardfan>.card:nth-child(5) {
  transform: rotate(20deg);
  left: 12vh;
}

.hand>.card:nth-child(1) {
  transform: rotate(-20deg);
  left: 0px;
}

.hand>.card:nth-child(2) {
  transform: rotate(-10deg);
  left: 2vh;
}

.hand>.card:nth-child(3) {
  transform: rotate(0deg);
  left: 4vh;
}

.hand>.card:nth-child(4) {
  transform: rotate(10deg);
  left: 6vh;
}

.hand>.card:nth-child(5) {
  transform: rotate(20deg);
  left: 8vh;
}

.bighand>.card:nth-child(7n+1) {
  transform: rotate(-30deg);
  left: 0px;
}

.bighand>.card:nth-child(7n+2) {
  transform: rotate(-20deg);
  left: 2vh;
}

.bighand>.card:nth-child(7n+3) {
  transform: rotate(-10deg);
  left: 4vh;
}

.bighand>.card:nth-child(7n+4) {
  transform: rotate(0deg);
  left: 6vh;
}

.bighand>.card:nth-child(7n+5) {
  transform: rotate(10deg);
  left: 8vh;
}

.bighand>.card:nth-child(7n+6) {
  transform: rotate(20deg);
  left: 10vh;
}

.bighand>.card:nth-child(7n+7) {
  transform: rotate(30deg);
  left: 12vh;
}

.bighand>.card:nth-child(n+8) {
  top: 5vh;
}
.bighand>.card:nth-child(n+15) {
  top: 9vh;
}
.bighand>.card:nth-child(n+22) {
  top: 13vh;
}

.staggered-hand>.card:nth-child(2){
  top: 4vh;
}
.staggered-hand>.card:nth-child(3){
  top: 8vh;
}
.staggered-hand>.card:nth-child(4){
  top: 12vh;
}
.staggered-hand>.card:nth-child(5){
  top: 16vh;
}
.staggered-hand>.card:nth-child(6){
  top: 20vh;
}
.staggered-hand>.card:nth-child(7){
  top: 24vh;
}


/** MOBILE STYLING FOR CARDFAN**/
@media screen and (orientation: landscape) and (max-height: 600px) {
  .cardfan{
    left: 10vw;
  }
  /* .cardfan .card {
    width: min(100px,25vw);
  }*/
}

@media screen and (orientation: portrait) and (max-width: 600px) {
  .cardfan {
    left: 5vw;
  }
  /*Have minimum size of my cards
  .cardfan .card {
    width: min(100px,25vw);
  }*/
}

.game-acknowledge-overlay {
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url(/imperium/img/backgrounds/bombardment.jpg);
  background-size: cover;
  width: 90vw;
  height: 90vh;
  padding: 1.667rem;
  margin-top: auto;
  overflow-y: scroll;
}

.game-acknowledge-menu {
  margin-top: 20vh;
  padding: 1.667rem;
}

.game-acknowledge-notice {
  color: white;
  font-size: 1.667rem;
  margin-left: auto;
  margin-right: auto;
  width: max-content;
  max-width: 66.667rem;
}

.game-acknowledge-overlay .game-acknowledge-menu ul li {
  width: 100%;
  line-height: 2.917rem;
  border-top: 1px solid var(--saito-gray-850);
  cursor: pointer;
  border-color: #555;
  text-decoration: none;
  color: #fffd;
  text-align: center;
  list-style: none;
  padding-top: 1.667rem;
  font-weight: bolder;
  font-family: 'orbitron-medium';
  font-size: 1.667rem;
  letter-spacing: 0.167rem;
}

.game-acknowledge-overlay .game-acknowledge-menu ul li:hover {
  background: #0005;
}
/*
Slide in score track
*/

.racetrack {
  position: absolute;
  bottom: 0;
  left: -158px;
  width: 200px;
  transition: all 500ms ease-in-out;
  z-index: 9;
  cursor: default;
  font-family: 'orbitron-medium', 'bank-gothic', arial, helvetica, sans-serif;
}

.racetrack:hover {
  left: 0;
}

.racetrack-lock {
  left: 0;
}


/* Title of race track */
.racetrack-label {
  font-size: 1.667rem;
  text-align: left;
  padding-left: 0.833rem;
  height: 2.5rem;
  color: #fff;
  text-shadow: 1px 1px 2px black;
}

.racetrack-slot {
  position: relative;
  min-height: 5vh;
  background: #5558;
  margin: 3px;
  display: flex;
  flex-direction: column;
}

.racetrack-slot-label {
  position: absolute;
  width: 42px;
  text-align: center;
  color: #ddd;
  font-size: 2em;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  text-shadow: 1px 1px 2px black;
}


.track-players {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
}


.player-position {
  flex: 1;
  padding: 0 5px;
  display: flex;
  align-items: center;
  color: #fff;
  text-shadow: 1px 1px 2px black;
  padding-right: 3.333rem;
}

.player-position span {
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}



/* Triangle in bottom corner of screen */

.game-help, .game-help-triangle {
    cursor: pointer;
    position: absolute;
    display: block;
    width: 25rem;
    height: 16.667rem;
    background: #ff7700;
    overflow: hidden;
    color: #fff;
    padding-left: 30px;
    line-height: 22px;
    bottom: 0px;
    left: 0px;
    transform: skew(+55deg);
    margin-left: -20rem;
    z-index: 999;
}


.game-help:hover, .game-help-triangle:hover {
    background: #ee6600;
}

.game-help-hidden {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 1s, opacity 1s linear;
}

.game-help-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity 1s linear;
}

.game-help-text {
    font-family: arial, helvetica, sans-serif;
    font-size: 2rem;
    padding-top: 10rem;
    margin-left: 19.167rem;
    transform: skew(-55deg);
    min-width: 13.333rem;
    overflow: visible;
    line-height: 2.917rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-shadow: -2px 2px 2px black;
}


/* Standard overlay with title, text, and image */

.game-help-overlay {
    width: 80vw;
    height: 80vh;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    user-select: none;
    position: relative;
}

.game-help-overlay canvas {
    /*max-width: 100%;
    max-height: 100%;*/
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    transform: scale(0.8);
}

.game-help-overlay > div {
    position: absolute;
    background: #0009;
    left: 2.5rem;
    padding: 0.833rem;
    color: white;
    max-width:50%;
    border-radius: 0.833rem;
}

.game-help-overlay-title {
    top: 2.5rem;
    font-size: clamp(2.2rem, 6vw, 3.833rem);
    letter-spacing: 0.083rem;
    font-weight: bold;
    text-transform: uppercase;
    max-width: 60%;
}

.game-help-overlay-text {
    bottom: 0px;
    line-height: 3.333rem;
    font-size: 2.25rem;
    bottom: 2.5rem;
}

.game-help-overlay-text em {
    font-weight: bold;
    text-decoration: underline;
}

.game-help-overlay > div.game-help-overlay-optout {
    left: unset;
    right: 0.833rem;
    bottom: 0.833rem;
    display: flex;
    align-items: center;
    gap: 0.833rem;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .game-help-overlay > div {
        left: 1.25rem;
        max-width: 65%;
    }

 }   .game-zoom {
  --game-zoom-size: 2.8rem;
  --game-zoom-icon: 1.45rem;

  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  bottom: auto;
  z-index: 3;
  display: none;
  flex-direction: row;
  align-items: stretch;
  gap: 0.25rem;
  width: 100%;
  height: var(--game-zoom-size);
  margin: 0.25rem 0 0 0;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
}

.game-minimap.has-zoom .game-zoom {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.15s ease;
}

.game-minimap.has-zoom.zoom-fading .game-zoom {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.game-zoom .center,
.game-zoom .minus,
.game-zoom .plus {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--game-zoom-size);
  width: var(--game-zoom-size);
  height: var(--game-zoom-size);
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--saito-white) 18%, transparent);
  border-radius: 4px;
  color: var(--saito-white);
  background: color-mix(in srgb, #1a141c 72%, transparent);
  cursor: pointer;
  font-size: var(--game-zoom-icon);
  font-weight: 600;
  line-height: 1;
}

.game-zoom .plus,
.game-zoom .minus {
  font-size: 2.4rem;
  font-weight: 700;
}

.game-zoom .center:hover,
.game-zoom .minus:hover,
.game-zoom .plus:hover {
  background: color-mix(in srgb, #1a141c 88%, transparent);
}

.game-zoom .center i {
  font-size: var(--game-zoom-icon);
  line-height: 1;
}

.game-zoom .track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: var(--game-zoom-size);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--saito-white) 18%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, #1a141c 62%, transparent);
  cursor: pointer;
  touch-action: none;
  box-sizing: border-box;
}

.game-zoom .fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--saito-primary);
  pointer-events: none;
}
.game-hud2 {
  font-family: 'visuelt-light', 'Microsoft Yahei', 'Hiragino Sans GB';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  margin-left: auto;
  margin-right: auto;
  z-index: 50;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 1.5rem);
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.833rem;
  font-size: 1.333rem;
  overflow: visible;
  background-color: transparent;
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
}

.game-hud2 * {
  user-select: none;
  -webkit-user-select: none;
}

/*
  Docked: the game put the HUD inside its own layout (hud.container), so it
  sits in normal flow and fills that box. The game's CSS sizes and places it.
*/
.game-hud2.docked {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  top: auto;
  margin: 0;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  gap: 0;
  z-index: auto;
  cursor: default;
}

.game-hud2.docked .hud-status-row {
  cursor: default;
}

.game-hud2.docked .hud-status-row,
.game-hud2.docked .hud-menu {
  width: 100%;
  max-width: 100%;
}

.game-hud2.docked .hud-menu:not(:empty) {
  margin-top: 0.833rem;
}

.game-hud2.docked .hud-cards:empty {
  display: none;
}

.hud-notice {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  z-index: -1;
  box-sizing: border-box;
  width: 500px;
  max-width: 100%;
  height: 12rem;
  overflow: hidden;
  border: 3px solid #424143;
  background-color: #b79e76;
  border-radius: 0.833rem 0.833rem 0 0;
  transform: translateX(-50%) translateY(40%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 1.5s ease-in-out,
    opacity 0.5s ease-in-out;
}

.hud-notice.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.hud-status-row {
  position: relative;
  flex: 0 0 auto;
  width: 500px;
  max-width: 100%;
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
  background-color: transparent;
}

.hud-status {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  color: #000;
  background-color: whitesmoke;
  box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);
  text-align: center;
  font-size: 1.333rem;
}

.hud-back-button {
  display: none;
  padding: 0.833rem;
  font-size: 1.542rem;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
  user-select: none;
}

.hud-back-button:hover {
  transform: translateY(-50%) scale(1.3);
}

.hud-menu {
  flex: 0 1 auto;
  width: 500px;
  max-width: 100%;
  max-height: min(40vh, 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  background-color: whitesmoke;
  color: #000;
  font-size: 1.333rem;
}

.hud-menu:empty {
  display: none;
}

.hud-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  font-size: 1.333rem;
}

.hud-menu li,
.hud-menu .option {
  box-sizing: border-box;
  background-color: inherit;
  color: inherit;
  height: 6.667rem;
  width: 100%;
  padding: 0.833rem;
  font-size: 1.5rem;
  border-top: 1px solid var(--saito-gray-200);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  list-style: none;
}

.hud-menu li:first-child,
.hud-menu .option:first-child {
  border-top: 0;
}

.hud-menu li:hover,
.hud-menu .option:hover {
  background-color: #e7e7e7;
}

.zoom-overlay .status,
.saito-overlay .status {
  box-sizing: border-box;
  background-color: whitesmoke;
  color: #000;
  text-align: center;
  font-size: 1.333rem;
  /* Slim text banner — not a control button */
  height: 3.333rem;
  line-height: 3.333rem;
  min-height: 0;
  padding: 0 1.25rem;
  border-radius: 0.833rem;
}

.zoom-overlay .controls ul,
.saito-overlay .controls ul {
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: whitesmoke;
  border-radius: 0.833rem;
}

.zoom-overlay .controls .option,
.saito-overlay .controls .option {
  box-sizing: border-box;
  min-height: 6.667rem;
  height: 6.667rem;
  width: 100%;
  padding: 0.833rem;
  font-size: 1.5rem;
  line-height: normal;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  border-top: 1px solid var(--saito-gray-200);
}

.zoom-overlay .controls .option:first-child,
.saito-overlay .controls .option:first-child {
  border-top: 0;
}

.zoom-overlay .controls .option:hover,
.saito-overlay .controls .option:hover {
  background-color: #e7e7e7;
}

.hud-visual-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: transparent;
  pointer-events: auto;
}

.hud-visual-menu {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  box-sizing: border-box;
  width: 95vw;
  max-width: none;
  height: 92.5vh;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: transparent;
  gap: 1.667rem;
  pointer-events: none;
}

.hud-visual-menu:not(:empty) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  pointer-events: auto;
}

.hud-visual-option {
  position: relative;
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--saito-border);
  pointer-events: auto;
}

.hud-visual-option:hover {
  border: 2px solid whitesmoke;
}

.hud-visual-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hud-option-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hud-visual-option-title {
  position: absolute;
  top: 0;
  left: 0;
  height: 5rem;
  width: 100%;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.65);
  padding: 1.333rem;
  color: #fff;
  font-size: 2rem;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.hud-visual-menu.m1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 90vw;
  max-width: 1400px;
  height: 85vh;
}

.hud-visual-menu.m2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  width: 90vw;
  max-width: 1400px;
  height: 85vh;
}

.hud-visual-menu.m3 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;
  width: 90vw;
  max-width: 1400px;
  height: 85vh;
}

.hud-visual-menu.m4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 95vw;
  height: 92.5vh;
}

.hud-visual-menu.m5,
.hud-visual-menu.m6 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  width: 90vw;
  max-width: 1400px;
  height: 85vh;
}

.hud-visual-menu.m7,
.hud-visual-menu.m8 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
  width: 90vw;
  max-width: 1400px;
  height: 85vh;
}

.hud-visual-menu.m9 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  grid-auto-rows: minmax(200px, 1fr);
  width: 90vw;
  max-width: 1400px;
  height: 85vh;
}

.hud-cards {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  column-gap: 0.417rem;
  max-width: calc(100vw - 1.5rem);
  overflow-x: auto;
  overflow-y: visible;
  padding: 0;
  background-color: transparent;
  box-shadow: none;
}

.hud-cards .card {
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
}

.hud-cards .card img,
.hud-cards img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media screen and (max-width: 600px) {
  .game-hud2 {
    max-width: calc(100vw - 0.75rem);
    bottom: 0.4rem;
  }

  .hud-status-row {
    width: 500px;
    max-width: 100%;
  }

  .hud-menu {
    width: 500px;
    max-width: 100%;
  }

  .hud-cards {
    max-width: calc(100vw - 0.75rem);
  }
}
.game-minimap {
  position: fixed;
  right: 1.667rem;
  bottom: 1.667rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  width: 19.2vw;
  height: auto;
  overflow: visible;
  z-index: 40;
  container-type: inline-size;
}

.game-minimap.minimized {
  display: none;
}

.game-minimap.is-floating {
  position: fixed;
  z-index: 80;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.game-minimap-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  width: calc(1.5rem + 5px);
  height: calc(1.5rem + 5px);
  padding: 0;
  border: none;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.72);
  color: var(--saito-foreground, #fff);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.game-minimap:hover .game-minimap-close,
.game-minimap:focus-within .game-minimap-close {
  display: flex;
}

.game-minimap-resize {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  cursor: nw-resize;
}

.game-minimap-resize::before,
.game-minimap-resize::after {
  content: '';
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  background: var(--saito-white, #fff);
  opacity: 0.9;
}

.game-minimap-resize::before {
  width: 0.75rem;
  height: 2px;
}

.game-minimap-resize::after {
  width: 2px;
  height: 0.75rem;
}

.game-minimap:hover .game-minimap-resize,
.game-minimap:focus-within .game-minimap-resize,
.game-minimap.resizing .game-minimap-resize {
  display: block;
}

#saito-header.game .hamburger-container {
  position: relative;
  overflow: visible;
}

#saito-header .game-minimap-restore {
  position: absolute;
  top: 0;
  right: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem 0 0;
  padding: 0;
  height: 100%;
  width: auto;
  aspect-ratio: 1;
  cursor: pointer;
  color: var(--saito-foreground);
  background: var(--saito-secondary);
  border: none;
  border-radius: var(--saito-radius);
}

#saito-header .game-minimap-restore.visible {
  display: flex;
}

#saito-header .game-minimap-restore i {
  font-size: 2.5rem;
}

.game-minimap .board {
  position: relative;
  width: 100%;
  max-height: 100cqw;
  overflow: hidden;
  border: 1px solid var(--saito-white);
  background-color: #14161c;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  cursor: pointer;
}

.game-minimap .board .game-minimap-clone {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  transform-origin: top left;
  pointer-events: none;
}

.game-minimap .markers {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.game-minimap .markers .circle {
  position: absolute;
  border-radius: 50%;
}

.game-minimap .markers .flash {
  animation: flash 1.4s ease-in-out infinite;
}

@keyframes flash {
  50% {
    opacity: 0.35;
  }
}

.game-minimap .viewport {
  position: absolute;
  z-index: 1;
  cursor: grab;
  border: 1px solid var(--saito-white);
  background: transparent;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.32);
}

.game-minimap .viewport:active {
  cursor: grabbing;
}


.cardstack {
	display: flex;
	position: relative;
}

.cardstack.left {
	flex-direction: row-reverse;
}


.cardstack.right {
	flex-direction: row;
}

.cardstack.down {
	flex-direction: column;
}

.cardstack.up {
	flex-direction: column-reverse;
}

.game_warning_overlay {
  background: #222b;
  color: #fff;
  padding: min(2vh, 2vw);
  min-width: min(400px, 85vw);
  max-width: 95vw;
  min-height: min(240px, 50vh);
  max-height: 70vh;
  border-radius: min(2vh, 2vw);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.game_warning_overlay p {
  color: var(--saito-white);
}

.game_warning_header {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.game_warning_header i {
  font-size: 2em;
  color: yellow;
}

.game_warning_overlay h2 {
  font-size: 1.6em;
  width: 100%;
  flex: 1;
}

.game_warning_overlay p {
  font-size: 1.5em;
}

.popup-confirm-menu {
    color: #222;
  padding: 10px;
  font-size: 1.25rem;
  background-color: #a9a9a9a9;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 9999999;
  width: 16.667rem;
  gap: 0.833rem;
}

.popup-confirm-menu .action, .popup-confirm-menu .popup-prompt {
  background-color: #efefef;
  box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);
  padding: 5px;
  width: 100%;
  border-radius: 5px;
}

.popup-confirm-menu .confirm_check {
  display: flex;
  flex-direction: row;
  gap: 0.417rem;
  align-items: end;
}

.popup-confirm-menu .action {
  border: 1px black solid;
  cursor: pointer;
  padding: 1.667rem;
}

.popup-confirm-menu .action:hover {
  background-color: lightgrey;
  font-weight: bold;
}

.popup-confirm-menu .saito-overlay-closebox{
  display: flex;
}

@media only screen and (max-width: 600px) and (orientation: portrait) {
  .popup-confirm-menu {
    padding: 6px;
    width: 13.333rem;
    border-radius: 6px;
  }  

  .popup-confirm-menu .action {
    padding: 0.833rem;
  }

}.shake {
  animation: shake 0.82s infinite cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.flash {
  animation: flash 1s infinite cubic-bezier(0.4, 0, 1, 1);
}

.flash2 {
  animation: flash2 1s 1 forwards;
}

.flash3 {
  animation: flash_sawtooth 1.2s infinite;
}

@keyframes flash2 {
   0%, 50%, 100% {
      opacity: 0;
   }
   30%, 80% { 
      opacity: 1;
   }
}


@keyframes flash_sawtooth {
   0%, 10%, 90% {
      opacity: 1;
   }
   40%, 60% { 
      opacity: 0;
   }
}



@keyframes flash {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


@keyframes flashme {
  from {
    color: #fff;

  }
  to {
    color: #444;
  }
}


@keyframes shake {
  10%,
  90% {
    transform: translate3d(-4px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(4px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-8px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(8px, 0, 0);
  }
}

.animated_elem{
  position: absolute;
}

.copied_elem {
  visibility: hidden;
}

/* For sliding color bar on a clickable option*/
.animated-mask {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: var(--saito-red);
  left: 0;
  top: 0;
}


.animated-mask.animated {

}.health-meter{
	height: calc(100%);
	width: 10px;
	border: solid 1px gray;
	background-color: black;
	position: absolute;
	left: -15px;
	top: -1px;
	box-sizing: content-box;
}

.health-meter-health {
	width: 100%;
	position: absolute;
	bottom: 0;
	background-color: var(--saito-red);
}::-webkit-scrollbar {
  width: 8px;
  height: 3px;
}
::-webkit-scrollbar-button {
  background-color: #c9c9c9;
}
::-webkit-scrollbar-track {
  background-color: #c9c9c9;
}
::-webkit-scrollbar-track-piece {
  background-color: #ddd;
}
::-webkit-scrollbar-thumb {
  height: 50px;
  background-color: #c9c9c9;
  border-radius: 3px;
}
::-webkit-scrollbar-corner {
  background-color: #c9c9c9;
}
::-webkit-resizer {
  background-color: #ddd;
}

:root {
  --background-color-shim-normal: color-mix(in srgb, var(--saito-black) 70%, transparent);

  /* for the header */
  --saito-header-height: 3.333rem;
}

html.game {
    font-size: 12px;

    /* Design tokens authored at 10px rem — keep prior pixel footprint */
    --saito-space-xs: 0.417rem;
    --saito-space-sm: 0.625rem;
    --saito-space-md: 0.833rem;
    --saito-space-lg: 1.333rem;
    --saito-space-xl: 1.667rem;
    --saito-space-xxl: 2.5rem;
    --saito-radius: 0.375rem;
    --saito-radius-sm: 0.292rem;
    --saito-radius-lg: 0.583rem;
    --font-size-large: 1.667rem;
    --font-size-medium: 1.25rem;
    --font-size-tiny: 1.083rem;
}

html.game #saito-alert-box {
  color: var(--saito-foreground);
}

html.game .saito-user-menu {
  color: var(--saito-foreground);
}

body {
  position: relative;
  background-color: #4e4e4e;
  background-image: url(/saito/img/tiled-logo.svg);
  color: #333;
}

.main {
  margin-top: unset;
  padding: unset;
}

#saito-header {
    background: transparent !important;
}

.game .saito-header-backdrop {
    top: 0;
    height: 100vh;
}

.gameboard {
  /*transform-origin: left top; /* For resizing game boards */
  user-select: none;
}

.debug-stats {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.chat-container {
  z-index: 90;
}

.chat-container.active {
  z-index: 91;
}

/*
  Chat popup rem geometry was authored at a 10px root.
  html.game uses 12px — scale width/height back so the popup matches
  chat JS placement (innerWidth - 375 / 360) and covers less of the board.
  ≤600px stays fullscreen via saito-chat.css.
*/
@media screen and (min-width: 601px) {
  html.game .chat-container:not(.minimized) {
    width: 30rem;
    min-width: 25rem;
    height: 41.667rem;
    min-height: 16.667rem;
  }
}

/*********************/
/*  SIZING ISSUES    */
/*********************/
div.h1 {
  font-size: 32px;
  margin: 12px 0;
  font-weight: bold;
}
div.h2 {
  font-size: 24px;
  margin: 10px 0;
  font-weight: bold;
}
div.h3 {
  font-size: 18px;
  margin: 8px 0;
}

/***********************/
/* MOUSE HOVER TIPS    */
/***********************/

.tip {
  position: relative;
}

.tip .tiptext {
  visibility: hidden;
  color: #444 !important;
  position: absolute;
  width: 90%;
  min-width: 400px;
  max-width: 750px;
  border: 1px solid var(--saito-primary);
  background-color: var(--saito-background);
  font-size: 1.333rem;
  font-style: italic;
  line-height: 1.667rem;
}

.tip:hover .tiptext {
  visibility: visible;
}

/*********************/
/*** PORTRAIT MODE ***/
/*********************/
@media screen and (orientation: portrait) and (max-width: 400px) {
  .hud-long .status-cardbox {
    grid-template-columns: repeat(auto-fit, minmax(18vw, 1fr));
  }
}

@media screen and (orientation: portrait) and (min-width: 400px) and (max-width: 600px) {
  .hud-long .status-cardbox {
    grid-template-columns: repeat(auto-fit, minmax(15vw, 1fr));
  }
}

/*****************/
/*** LANDSCAPE ***/
/*****************/
@media screen and (orientation: landscape) and (max-height: 650px) {
  .game-overlay-menu {
    font-size: 1.4em;
  }
}

@media screen and (max-width: 768px) {
  .chat-container:not(.minimized) {
    max-height: 50vh !important;
    height: 280px !important;
    top: 45px;
  }
}

.logobox {
    color: #222;
}

.message_box {
  background-image: url(/saito/img/arcade/your_move.png);
  background-size: cover;
  background-position: center;
  width: 400px;
  max-width: 95vw;
  font-size: 3.333rem;
  height: 404px;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  color: white;
  text-shadow: 2px 2px black;
  padding: 0.833rem 0;
  text-transform: uppercase;
  font-family: impact;
}

/*******************
    Crypto
******************/
.game-crypto-logo-container {
  position: absolute;
  bottom: 20px;
  left: 50px;
  width: min(10rem, 20vw);
  height: auto /*min(10rem, 20vw)*/;
  z-index: 0;
}

/***************************
* Standardized Landing Pages
****************************/
.scrollable-page {
  overflow: auto;
  position: relative;
  height: 100vh;
  scroll-behavior: smooth;
  padding-left: min(13.333rem, calc(20.833rem - 9vw));
}

.saito-splash-image,
.saito-splash-info {
  width: 800px;
  max-width: calc(100vw - 15rem);
  margin: auto;
}

.scrollable-page > .saito-splash-image,
.scrollable-page > .saito-splash-info,
.saito-splash-image.full .saito-splash-section-title {
  /*left: min(13.333rem, max(0px, calc(20.833rem - 15vw)));*/
}

.saito-splash-image {
  background-position: center;
  background-size: cover;
  position: relative;
  min-height: min(150px, 25vh);
  border-radius: 0.833rem 0.833rem 0 0;
  margin-top: 1.667rem;
}

.saito-splash-info {
  position: relative;
  background-color: var(--saito-profile-background);
  color: var(--saito-foreground);
  padding: min(4.167rem, 5vh) min(6.667rem, 5vw);
  min-height: min(300px, 30vh);
  margin-bottom: 3.333rem;
  border-radius: 0 0 0.833rem 0.833rem;
}

.saito-splash-image.full {
  height: 100vh;
  width: 100vw;
  max-width: unset;
  background-attachment: fixed;
  margin: 0 !important;
  left: max(-13.333rem, calc(9vw - 20.833rem));
}

.saito-splash-image.full .saito-splash-section-title {
  padding-left: min(13.333rem, calc(20.833rem - 9vw));
}

.saito-splash-section-title {
  position: absolute;
  top: 50%;
  width: 100%;
  text-align: center;
  transform: translateY(-50%);
  color: var(--saito-white);
  text-shadow: 1px 3px 4px var(--saito-black);
}

.saito-splash-section-title h3 {
  font-size: 24px;
}

.saito-splash-section-title .saito-splash-info {
  margin-bottom: unset;
  border-radius: 0.833rem;
  max-width: min(650px, 75vw);
  min-height: min(200px, 20vh);
  padding: min(3.333rem, 4vh) min(5rem, 4vw);
}

.splash-page-game-description {
  font-size: 18px;
  margin: 0.833rem 0;
  line-height: 24px;
}

.splash-page-leaderboard,
.league-overlay-games-list {
  max-height: min(600px, 70vh);
  max-width: 66.667rem;
  margin: auto;
  overflow: auto;
}

#mobile-anchor {
  display: none;
}

@media screen and (max-width: 600px) {
  .saito-splash-image,
  .saito-splash-info {
    max-width: 90vw;
  }

  .saito-splash-nav {
    display: none;
  }
  .saito-splash-image.full {
    left: unset;
  }
  .scrollable-page,
  .saito-splash-image.full .saito-splash-section-title {
    padding: 0;
  }

  #mobile-anchor {
    position: fixed;
    display: flex;
    right: 0.833rem;
    bottom: 1.667rem;
  }

  #create-game-button-mobile {
    min-width: 4.167rem;
    height: 4.167rem;
    padding: unset;
    border-radius: 4.167rem;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
  }

  .saito-splash-image {
    min-height: min(100px, 20vh);
  }

  .splash-page-leaderboard,
  .league-overlay-games-list {
    max-height: min(400px, 60vh);
  }
}

/**********************************************
* Side navigation for Standardized Landing Pages
***********************************************/
.saito-splash-nav {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  padding: 1.667rem;

  background-size: cover;
  background-position: right;
}

.saito-splash-nav ul {
  list-style: none;
  font-size: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.083rem;
}

.saito-splash-nav a {
  color: var(--saito-foreground);
  text-shadow: 1px 1px 2px var(--saito-black);
  filter: drop-shadow(1px 1px 1px var(--saito-black));
}

.saito-splash-nav button {
  min-width: unset;
  max-width: 16.667rem;
}

@media screen and (max-width: 900px) {
  .saito-splash-nav {
    bottom: 0;
    top: unset;
    transform: unset;
  }
}
.game-overlay-menu {
  padding: 10px;
  background-color: whitesmoke;
  opacity: 0.8;
  box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);
  width: 450px;
  max-width: 80vw;
}
.game-overlay-menu ul li {
  width: 100%;
  line-height: 3.5em;
  border-top: 1px solid var(--saito-gray-light);
  cursor: pointer;
  text-align: -webkit-match-parent;
  display: list-item;
  list-style: none;
  padding: 0 1em;
}
.game-overlay-menu ul li:hover {
  font-weight: bold;
  background: #0001;
}
.game-overlay-cardlist-container {
  width: 85vw;
  max-height: 85vh;
  display: flex;
  overflow-y: scroll;
  row-gap: 0.833rem;
  column-gap: 0.833rem;
  text-align: left;
  flex-direction: rows;
  flex-wrap: wrap;
  justify-content: space-around;
}
.game-overlay-button-close {
  margin-left: 50px;
  width: 240px;
  float: left;
}
.game-overlay-button-continue {
  width: 240px;
  float: left;
}
.game-overlay-button-container {
  display: flex;
  justify-content: center;
  font-size: 1.5em;
  margin-top: 25px;
  margin-bottom: 25px;
}
.game-overlay-cardlist-title {
  font-size: 3em;
  padding: 20px;
  text-align: center;
  color: white;
  padding-bottom: 20px;
}

.game-overlay-cardlist-subtitle {
  background-color: whitesmoke;
  display: inline-block;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 6px;
  padding-bottom: 5px;
  border-radius: 5px;
  font-size: 1.4em;
  margin-top: 0px;
  margin-bottom: 16px;
}
.game-overlay-button {
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
  width: 240px;
  margin-top: 14px;
  margin-bottom: 20px;
  font-size: 2em;
}
.game-overlay-cardlist-card {
  position: relative;
  z-index: 2;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
}

.game-overlay-cardlist-button {
}
.game-overlay-cardlist-unselectable {
  opacity: 0.4;
}

/** For various common overlays**/

.rules-overlay {
  background-color: var(--saito-background);
  padding: 3.333rem;

  /* No scrollbars */
  overflow-y: auto;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Hide scrollbar for IE, Edge and Firefox */
/* Hide scrollbar for Chrome, Safari and Opera */
.rules-overlay::-webkit-scrollbar {
  display: none;
}

.rules-overlay h4 {
  margin-bottom: 0.833rem;
}

.rules-overlay p {
  margin: 0.833rem 0;
  line-height: 1.583rem;
  font-size: 1.333rem;
}

.rules-overlay em {
  font-weight: bold;
}

/*.saito-overlay .rules-overlay {
  border-radius: 0.833rem;
  border: 1px solid var(--saito-black);
}*/

.shim-notice {
  font-size: 20px;
  background: #000c;
  color: #fff;
  padding: min(5vh, 5vw);
  width: min(800px, 95vw);
  overflow-y: auto;
  border-radius: 2%;
  border: 2px solid var(--saito-border);
  cursor: grab;
}

.shim-notice .player-result {
  display: grid;
  width: 100%;
  max-width: 750px;
  margin: auto;
  grid-template-columns: 2fr 5fr;
  grid-column-gap: 1.667rem;
}

.shim-notice .htmlCards {
  display: flex;
  width: 100%;
  max-width: 500px;
  justify-content: space-between;
}

.shim-notice .card {
  max-width: 100px;
  height: auto;
  margin-left: 3px;
}

.shim-notice .htmlCards.pocket .card {
  width: 50%;
}

.shim-notice .htmlCards.pool .card {
  width: 20%;
}

.game_warning_overlay {
  background: #222b;
  color: #fff;
  padding: min(2vh, 2vw);
  min-width: min(400px, 85vw);
  max-width: 95vw;
  min-height: min(240px, 50vh);
  max-height: 70vh;
  border-radius: min(2vh, 2vw);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.game_warning_header {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.game_warning_header i {
  font-size: 2em;
  color: yellow;
}

.game_warning_overlay h2 {
  font-size: 1.6em;
  width: 100%;
  flex: 1;
}

.game_warning_overlay p {
  font-size: 1.5em;
}

/***********************
 * 
 * GAme stake info
 * 
 **********************/
.stake-info-overlay {
  width: min(400px, 80vw);
  min-height: 250px;
  max-height: 70vh;
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.667rem;
  padding: 1.667rem;
  justify-content: space-evenly;
}

.stake-info-overlay .h3 {
  font-size: 2.5rem;
}

.stake-info-overlay > div {
  margin: 0.833rem;
}

.stake-info-overlay .player-table {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  row-gap: 0.833rem;
  column-gap: 1.667rem;
  justify-items: center;
}

/*******************/
/* A welcome image  */
/*******************/
.splash_overlay {
  padding: 2px;
  width: min(800px, 110vh);
  height: auto;
  max-height: 90vh;
  max-width: 95vw;
}

.splash_overlay img {
  width: 100%;
  height: auto;
}

@media screen and (max-width: 800px) {
  .splash_overlay {
    padding: 2px;
    width: auto;
    height: auto;
    min-width: min(600px, 95vw);
    max-height: 90vh;
    max-width: 95vh;
  }
}
@media screen and (max-width: 600px) {
  .splash_overlay {
    padding: 2px;
    width: 95vw;
    height: auto;
    min-width: unset;
    max-height: 90vh;
    max-width: 95vw;
  }

  .rules-overlay {
    padding: 0.833rem;
  }
}

@media screen and (max-width: 800px) and (orientation: landscape) {
  .splash_overlay {
    padding: 2px;
    height: 85vh;
    width: auto;
    min-width: unset;
    max-width: 95vw;
    max-height: 50vw;
  }
  .splash_overlay img {
    height: 100%;
    width: auto;
  }
}

/**********************************
Useful declarations for game stats 
**********************************/
.solitaire-stats-overlay {
  min-width: min(600px, 90vw);
  background-color: #f5f5f5;
  padding: clamp(1.667rem, 5vw, 50px);
  border-radius: 5px;
  border: 2px solid var(--saito-black-heavy);
  box-shadow: 4px 4px 6px 4px black;
  max-height: 99vh;
  color: var(--saito-accent);
}

.solitaire-stats-overlay hr {
  margin: 0.417rem 0 1.667rem;
  color: var(--saito-red);
}

.solitaire-stats-overlay .saito-table-row {
  grid-template-columns: minmax(150px, 1fr) 1fr 1fr;
}

.solitaire-stats-overlay .saito-table-body {
  font-size: 1.667rem;
}

.solitaire-stats-overlay .saito-table-label,
.solitaire-stats-overlay .saito-table-header {
  white-space: nowrap;
  font-weight: bold;
  font-size: 1.333rem;
}

.solitaire-stats-overlay .saito-table-header {
  padding: unset;
  margin-bottom: 0.417rem;
}

.saito-table-body .saito-table-row > div:not(.saito-table-label) {
  text-align: center;
}

@media screen and (max-width: 600px) and (orientation: portrait) {
  .solitaire-stats-overlay {
    min-width: 90vw;
    padding: 1.667rem;
  }
}

@media screen and (max-height: 600px) and (orientation: landscape) {
  .solitaire-stats-overlay {
    min-height: 90vh;
    padding: 1.667rem;
  }
}

.saito-modal-menu-option .option-keyword {
  display: grid;
  gap: 0.833rem;
  grid-template-columns: max-content min-content 1fr;
  margin: 0;
  text-wrap: nowrap;
}

.saito-modal-menu-option span.option-explanation {
  font-size: 1.333rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.debug_overlay {
  max-height: 90vh;
  max-width: 92vw;
  background: var(--saito-background);
  color: var(--saito-foreground);
  padding: 2.5rem;
  padding-left: 1.667rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.833rem;
}

.debug_overlay button {
  margin: auto;
  padding-left: 1.667rem;
  padding-right: 1.667rem;
}

@media screen and (max-width: 600px) {
  .debug_overlay {
    padding: 0.833rem;
    padding-left: 0;
  }
}

/*json tree */

.jsontree_node {
  list-style: none;
}

.module-settings-overlay {
  min-height: unset;
}
