/* Screens share the table's felt, ivory, and gold material palette. */
.topbar {
  height: 74px;
  padding-inline: 36px;
}
.brand {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
}
.profile-button {
  padding: 0;
  width: 43px;
  height: 43px;
  overflow: hidden;
  border-radius: 13px;
  background: none;
}
.brand-mark {
  grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr));
}
.brand-mark i {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}
.avatar-art {
  display: block;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}
#main-content {
  outline: none;
}
.screen {
  animation: screen-in 0.22s ease-out;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  max-width: 1160px;
  margin: 24px auto 0;
  padding: 18px 30px;
  color: #879c91;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 1.1px;
}
.app-footer button {
  color: #bdc4a7;
  font: inherit;
}
.app-footer .connection-state {
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0;
}
.app-footer .status-dot {
  width: 5px;
  height: 5px;
}
.menu-screen {
  position: relative;
  overflow: hidden;
  max-width: 1160px;
  min-height: min(780px, calc(100svh - 150px));
  margin: auto;
  padding: 65px 48px 70px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 60px;
}
.menu-kicker {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #bac6a6;
}
.menu-kicker > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #efc868;
  box-shadow: 0 0 15px #efc86844;
}
.game-wordmark {
  font: 950 italic 112px/0.83 var(--display);
  letter-spacing: -8px;
  margin: 25px 0 27px;
  text-shadow:
    0 5px 0 #071a1b,
    0 9px 22px #03191e55;
}
.game-wordmark > span {
  display: block;
  color: #edc866;
  position: relative;
}
.wordmark-spark {
  display: inline-block;
  vertical-align: top;
  color: #e3a07d;
  font: 40px/1 var(--display);
  margin: -4px 0 0 10px;
}
.menu-tagline {
  font-size: 17px;
  line-height: 1.55;
  color: #c0cec2;
  margin: 0 0 30px;
}
.main-menu-actions {
  max-width: 330px;
}
.main-menu-actions .button {
  min-height: 56px;
  width: 100%;
  font-size: 13px;
  margin-bottom: 12px;
  padding-inline: 19px;
}
.main-menu-actions .button > svg {
  width: 22px;
  height: 22px;
}
.menu-join {
  font-size: 11px;
  color: #95aca1;
  width: 100%;
  padding: 8px 0;
}
.menu-join strong {
  color: #e7dcae;
  font-weight: 650;
  margin-left: 4px;
}
.menu-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  margin-top: 26px;
  padding: 12px 0;
}
.menu-profile > svg {
  width: 52px;
  height: 52px;
  border: 2px solid #caaf6766;
  border-radius: 16px;
  box-shadow: 0 4px 0 #091d1b;
}
.menu-profile > span {
  display: grid;
  gap: 2px;
}
.menu-profile small {
  font-size: 7px;
  letter-spacing: 1.7px;
  color: #93a89b;
}
.menu-profile strong {
  font-size: 15px;
  color: #f0e7ce;
}
.menu-profile span > span {
  font-size: 10px;
  color: #c8ba85;
}
.menu-art {
  position: relative;
  height: 510px;
  isolation: isolate;
  pointer-events: none;
}
.art-orbit {
  border: 1px solid #ddcc8130;
  border-radius: 50%;
  position: absolute;
  inset: 15px -8px 15px -8px;
  transform: rotate(-25deg);
}
.orbit-one {
  border-style: dashed;
}
.orbit-two {
  inset: 65px 0 55px -10px;
  transform: rotate(25deg);
  background: radial-gradient(ellipse, #92b77b12, transparent 70%);
  border-color: #7eac8c26;
}
.hero-card {
  position: absolute;
  top: 135px;
  left: 142px;
  filter: drop-shadow(0 25px 15px #06171355);
}
.hero-card .playing-card {
  width: 156px;
  height: 220px;
  border-radius: 13px;
  cursor: default;
  box-shadow:
    0 4px 0 #a5ae8c,
    0 6px 0 #dcd6b5;
}
.hero-card .playing-card > .suit {
  width: 70px;
  height: 78px;
}
.hero-card .card-rank {
  top: 12px;
  left: 14px;
  font-size: 32px;
}
.hero-card .card-rank .suit {
  width: 22px;
  height: 25px;
}
.hero-card .card-bottom {
  font-size: 28px;
  right: 14px;
  bottom: 12px;
}
.hero-card .jack-art {
  width: 76px;
  height: 96px;
  margin-top: 13px;
}
.hero-card .jack-label {
  font-size: 9px;
  bottom: 36px;
  letter-spacing: 3px;
}
.hero-card-left {
  transform: translate(-87px, -5px) rotate(-24deg);
  z-index: 2;
}
.hero-card-right {
  transform: translate(82px, -15px) rotate(20deg);
  z-index: 1;
}
.hero-card-center {
  transform: translate(0, 20px) rotate(-4deg);
  z-index: 3;
}
.hero-character {
  position: absolute;
  width: 93px;
  height: 93px;
  border: 4px solid #bfc591;
  border-radius: 30px;
  box-shadow:
    0 6px 0 #0a211e,
    0 17px 28px #05181e66;
  z-index: 4;
  overflow: hidden;
}
.character-fox {
  left: 6px;
  top: 57px;
  transform: rotate(-12deg);
  border-color: #d49c63;
}
.character-owl {
  right: -4px;
  top: 85px;
  transform: rotate(12deg);
  border-color: #baa5ca;
}
.character-frog {
  right: 10px;
  bottom: 38px;
  transform: rotate(9deg);
  width: 79px;
  height: 79px;
  border-radius: 25px;
  border-color: #a7bd7a;
}
.hero-chip.chip {
  position: absolute;
  width: 78px;
  height: 78px;
  left: 22px;
  bottom: 67px;
  z-index: 5;
  transform: rotate(-15deg);
}
.hero-chip.chip + .hero-chip {
  width: 60px;
  height: 60px;
  left: 64px;
  bottom: 34px;
  transform: rotate(12deg);
}
.hero-sequence {
  display: flex;
  gap: 7px;
  position: absolute;
  top: 13px;
  left: 130px;
  transform: rotate(8deg);
}
.hero-sequence .mini-chip {
  width: 31px;
  height: 31px;
  font-size: 19px;
}
.hero-sequence .gold-chip {
  background: #b79540;
  border-color: #ebd181;
  color: #f5e5af;
}
.art-spark {
  position: absolute;
  font-size: 34px;
  color: #c1c88d;
}
.spark-one {
  left: 102px;
  top: 75px;
}
.spark-two {
  right: 20px;
  top: 300px;
  font-size: 24px;
  color: #e8c977;
}
.art-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 7px;
  letter-spacing: 2px;
  font-weight: 800;
  color: #a8b79b;
}
.art-caption i {
  color: #e0bf6c;
  font-style: normal;
}
.menu-bottom {
  position: absolute;
  bottom: 0;
  left: 48px;
  right: 48px;
  display: flex;
  justify-content: center;
  gap: 25px;
  align-items: center;
  color: #92a596;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  border-top: 1px solid #aec29b17;
  padding-top: 24px;
}
.menu-bottom i {
  color: #9d9c67;
  font-style: normal;
}
.menu-bottom button {
  font: inherit;
  color: #e0c782;
}
.setup-screen,
.profile-screen,
.lobby-screen {
  max-width: 1060px;
  margin: auto;
  padding: 28px 40px 10px;
}
.screen-back {
  display: inline-flex;
  align-items: center;
  color: #b9c8b9;
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 800;
  padding: 8px 0;
}
.screen-back:hover {
  color: #f0ce72;
}
.screen-heading {
  margin: 25px 0 35px;
}
.screen-heading .eyebrow {
  margin-bottom: 9px;
  color: #b6bf99;
}
.screen-heading h1 {
  font-size: 38px;
  letter-spacing: -1px;
}
.screen-heading > p {
  margin: 9px 0 0;
  font-size: 13px;
  color: #a3b8a9;
}
.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 65px;
  align-items: start;
}
.selection-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #ddd6ad;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 23px;
}
.selection-label > span + span {
  color: #9eb09b;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 13px;
}
.avatar-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 8px 8px 10px;
  border-radius: 17px;
  border: 1px solid transparent;
  background: #b8c49f08;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
.avatar-choice svg {
  width: 100%;
  max-width: 100px;
  height: auto;
  border-radius: 23px;
  box-shadow:
    0 4px 0 #091e1b,
    0 8px 12px #071a1d44;
  transition: transform 0.16s;
}
.avatar-choice > span {
  color: #c6d0bc;
  font-size: 11px;
  font-weight: 650;
}
.avatar-choice:hover {
  background: #e6ce7e0d;
  transform: translateY(-3px);
}
.avatar-choice.selected {
  background: #d5ba5620;
  border-color: #d5bb62;
  box-shadow: 0 0 0 2px #d2b35718;
}
.avatar-choice.selected > span {
  color: #f3d477;
}
.avatar-choice i {
  position: absolute;
  display: none;
  width: 22px;
  height: 22px;
  place-items: center;
  top: 2px;
  right: 2px;
  border-radius: 50%;
  background: #f0cd6f;
  border: 2px solid #263d31;
  color: #233d30;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.avatar-choice.selected i {
  display: grid;
}
.avatar-helper {
  margin: 24px 0 0;
  color: #91aa9b;
  font-size: 11px;
  text-align: center;
}
.setup-controls {
  padding: 27px;
  background: #264039;
  border: 1px solid #72866755;
  border-radius: 16px;
  box-shadow:
    0 6px 0 #0c211e66,
    0 15px 35px #071a1d44;
}
.setup-controls .field {
  margin-bottom: 22px;
}
.setup-controls input {
  background: #132f2c;
}
.setup-controls .button-full {
  margin-top: 26px;
  justify-content: space-between;
}
.setup-controls .color-options {
  margin-bottom: 0;
}
.setup-divider {
  border-top: 1px solid #97ac7940;
  margin: 25px 0;
}
.setup-controls .setup-fields {
  margin: 0;
  gap: 12px;
}
.setup-controls .setup-fields .field {
  margin-bottom: 0;
}
.code-entry {
  font-size: 28px !important;
  font-weight: 850;
  letter-spacing: 7px;
  height: 62px !important;
  text-align: center;
  text-transform: uppercase;
}
#join-form {
  margin-top: 24px;
}
.profile-layout {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 70px;
}
.profile-preview {
  text-align: center;
  padding: 20px 0 0;
}
.profile-portrait {
  width: 170px;
  height: 170px;
  border-radius: 43px;
  padding: 4px;
  margin: 0 auto 20px;
  border: 2px solid #d7be70;
  box-shadow:
    0 0 0 7px #c6bc6a0b,
    0 18px 40px #06181b66;
}
.profile-portrait svg {
  border-radius: 36px;
}
.profile-preview h2 {
  font: 900 italic 32px var(--display);
  color: #eee7c9;
  margin: 0;
}
.profile-preview > p {
  color: #a8b994;
  letter-spacing: 2px;
  font-size: 9px;
  margin: 4px 0 30px;
}
.profile-preview .field,
.profile-preview .colors-label {
  text-align: left;
}
.profile-preview .color-options {
  justify-content: center;
}
.profile-preview .button {
  margin-top: 26px;
}
.profile-collection {
  padding-top: 20px;
}
.profile-collection .avatar-grid {
  gap: 21px 16px;
}
.lobby-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lobby-code {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #eacd7f;
  border: 1px solid #b6b87944;
  background: #36504355;
  border-radius: 9px;
  padding: 9px 15px;
}
.lobby-code > span {
  color: #a3b49a;
  font-size: 8px;
  letter-spacing: 1.5px;
}
.lobby-code strong {
  letter-spacing: 6px;
  font-size: 22px;
}
.lobby-code svg {
  width: 17px;
  height: 17px;
}
.lobby-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 40px;
}
.squad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.squad-grid[data-seats="2"],
.squad-grid[data-seats="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.squad-player {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 230px;
  padding: 15px 10px 16px;
  border-radius: 15px;
  border: 1px solid #819a7955;
  background: linear-gradient(155deg, #47604a30, #1d352e55);
}
.squad-team {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #b8c5ae;
  font-size: 9px;
  margin-bottom: 16px;
}
.squad-portrait {
  width: 82px;
  height: 82px;
  padding: 3px;
  border: 1px solid var(--player-color);
  border-radius: 24px;
  background: #182d26;
  box-shadow: 0 6px 0 #10271f;
}
.squad-portrait svg {
  border-radius: 19px;
}
.squad-player h2 {
  font-size: 16px;
  font-weight: 800;
  margin: 16px 0 7px;
}
.squad-player h2 small {
  display: inline-block;
  color: #e7cc7c;
  font-size: 7px;
  letter-spacing: 0.7px;
  vertical-align: middle;
}
.squad-status {
  color: #a6afa0;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.6px;
}
.squad-status.ready {
  color: #8dd0a2;
}
.squad-edit,
.squad-role {
  color: #aab8a0;
  font-size: 8px;
  padding: 15px 0 0;
  margin-top: auto;
}
.squad-edit {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #d9ca93;
}
.empty-seat {
  border-style: dashed;
  background: #112a2222;
  justify-content: center;
}
.empty-portrait {
  width: 69px;
  height: 69px;
  display: grid;
  place-items: center;
  border: 1px dashed #9dad7e55;
  border-radius: 22px;
  color: #8b9e80;
}
.empty-portrait svg {
  width: 31px;
  height: 31px;
  opacity: 0.5;
}
.empty-seat h2 {
  color: #9db196;
  margin: 14px 0 0;
  font-size: 14px;
}
.empty-seat p {
  font-size: 10px;
  color: #8c9e8b;
  text-align: center;
  line-height: 1.6;
}
.empty-seat button {
  color: #c7b981;
  font-size: 8px;
  font-weight: 750;
  padding: 5px 0;
}
.squad-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.squad-bottom .button {
  font-size: 10px;
}
.lobby-controls {
  padding: 24px;
  border: 1px solid #82927155;
  border-radius: 15px;
  background: #293e34;
  align-self: start;
}
.lobby-controls .setup-fields {
  gap: 13px;
}
.lobby-controls .button-full {
  margin-top: 12px;
}
.lobby-controls .button-primary:disabled {
  opacity: 0.4;
}
.lobby-rule {
  text-align: center;
  padding: 17px 0;
  margin: 12px 0;
  border-block: 1px solid #9db08230;
}
.lobby-rule .mini-chip {
  width: 27px;
  height: 27px;
  font-size: 15px;
}
.lobby-rule .connection-art {
  justify-content: center;
  margin: 0;
}
.lobby-rule p {
  font-size: 10px;
  color: #a4b69c;
  margin: 12px 0 0;
}
.lobby-wait-note {
  color: #97aa93;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
  margin: 16px 0 0;
}
/* In-match view: the table is the screen, with players at its sides. */
body[data-screen="game"] .topbar {
  height: 62px;
}
body[data-screen="game"] .brand {
  font-size: 21px;
}
body[data-screen="game"] .brand-mark {
  width: 35px;
  height: 35px;
  padding: 6px;
  gap: 2px;
  border-radius: 9px;
}
body[data-screen="game"] .brand > span:last-child {
  font-size: 23px;
}
body[data-screen="game"] .brand small {
  display: none;
}
body[data-screen="game"] .app-footer {
  margin-top: 0;
  padding-top: 4px;
  padding-bottom: 8px;
  font-size: 7px;
}
.match-screen {
  --arena-board-width: min(
    650px,
    max(460px, calc((100svh - 415px) * 1.24 + 40px))
  );
  max-width: 1140px;
  margin: auto;
  padding: 18px 30px 0;
}
.match-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  max-width: 990px;
  margin: 0 auto 21px;
  min-height: 55px;
}
.match-title {
  min-width: 140px;
}
.match-title .eyebrow {
  font-size: 7px;
  letter-spacing: 1.7px;
}
.match-title h1 {
  font-size: 23px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}
.match-chat {
  font-size: 10px;
  min-height: 36px;
  padding: 9px 12px;
}
.match-chat svg {
  width: 17px;
  height: 17px;
}
.match-hud {
  display: flex;
  align-items: center;
  gap: 24px;
}
.match-scores {
  display: flex;
  gap: 23px;
  align-items: center;
}
.match-score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #d6dfc7;
}
.match-score .sequence-pips {
  margin-left: 3px;
}
.match-score .sequence-pip {
  width: 13px;
  height: 13px;
}
.match-hud .timer-ring {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.match-hud .timer-ring span {
  font-size: 12px;
}
.arena {
  display: grid;
  grid-template-columns: 135px minmax(0, var(--arena-board-width)) 135px;
  grid-template-rows:
    repeat(3, calc((var(--arena-board-width) / 1.24 + 24px) / 3))
    auto;
  column-gap: 27px;
  justify-content: center;
  align-items: center;
}
#game-table .table-players {
  display: contents;
}
.arena .play-area {
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: start;
}
.arena .board {
  aspect-ratio: 1.24;
  gap: 4px;
}
.arena .board-wrap {
  padding-inline: 17px;
}
.arena .board-topline,
.arena .board-bottomline {
  height: 27px;
}
.arena .board-cell {
  border-radius: 4px;
}
.arena .hand-area {
  margin: 23px -2px 0;
  padding-inline: 2px;
  padding-bottom: 5px;
}
.arena .hand-cards {
  min-height: 115px;
  padding-top: 22px;
  padding-bottom: 7px;
  gap: 8px;
}
.arena .playing-card {
  width: 63px;
  height: 91px;
}
.arena .hand-heading {
  font-size: 8px;
  letter-spacing: 1.2px;
}
.arena .hand-hint {
  font-size: 9px;
}
.arena .hand-note {
  font-size: 10px;
  margin-top: 10px;
}
.arena-player.team-0,
.squad-player.team-0 {
  --player-color: #72c995;
}
.arena-player.team-1,
.squad-player.team-1 {
  --player-color: #e58e70;
}
.arena-player.team-2,
.squad-player.team-2 {
  --player-color: #81b8dd;
}
.arena .arena-player {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 11px;
  position: relative;
  text-align: center;
  width: 100%;
  min-height: 140px;
  margin: 0;
  padding: 5px;
}
.portrait-ring {
  position: relative;
  padding: 4px;
  border: 1px solid #7f92774d;
  border-radius: 29px;
  box-shadow: 0 7px 0 #0b241e88;
}
.arena-player .avatar {
  width: 76px;
  height: 76px;
  background: none;
  padding: 0;
  border: 0;
  box-shadow: none;
  border-radius: 23px;
  overflow: visible;
}
.arena-player .avatar > .avatar-art {
  width: 100%;
  height: 100%;
}
.arena-player .avatar-art {
  border-radius: 23px;
}
.arena-player .avatar.thinking:after {
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
}
.arena-player.active-player .portrait-ring {
  border-color: #eac86b;
  box-shadow:
    0 0 0 4px #dec46b16,
    0 7px 0 #0b241e88,
    0 0 35px #e8c26719;
}
.arena-player.active-player .avatar {
  outline: 0;
}
.player-team-symbol {
  position: absolute;
  right: -6px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #182e28;
  color: var(--player-color);
  border: 1px solid var(--player-color);
  font-size: 11px;
}
.arena-player .player-name {
  color: #ece7d0;
  font-size: 14px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-player .player-name small {
  font-size: 6px;
  color: #d8c57d;
  vertical-align: middle;
  margin-left: 3px;
  font-weight: 800;
}
.arena-player .player-subtitle {
  font-size: 9px;
  margin-top: 3px;
  color: #9bb39f;
}
.active-turn-label {
  position: absolute;
  bottom: -14px;
  background: #e5c368;
  color: #203c2c;
  border: 1px solid #f7db89;
  border-radius: 10px;
  font-size: 7px;
  letter-spacing: 1px;
  font-weight: 850;
  padding: 4px 9px;
}
.table-deck {
  display: flex;
  grid-column: 3;
  grid-row: 4;
  gap: 13px;
  justify-content: center;
  align-self: start;
  margin-top: 30px;
}
.table-deck .playing-card,
.table-deck .empty-discard {
  width: 43px;
  height: 61px;
  border-radius: 5px;
}
.table-deck .card-rank {
  font-size: 12px;
}
.table-deck .card-rank .suit {
  width: 7px;
  height: 8px;
}
.table-deck .card-bottom {
  font-size: 8px;
}
.table-deck .playing-card > .suit {
  width: 21px;
  height: 24px;
}
.table-deck .deck-stack label {
  font-size: 6px;
  letter-spacing: 0.6px;
  white-space: nowrap;
  color: #a3b394;
}
.table-deck .jack-art {
  width: 20px;
  height: 26px;
}
.table-deck .jack-label {
  font-size: 4px;
}
.table-exit {
  grid-column: 1;
  grid-row: 4;
  text-align: center;
  align-self: start;
  margin-top: 60px;
}
.table-exit .tiny-button {
  color: #a6b49c;
  font-size: 9px;
}
.social-drawer {
  position: fixed;
  right: 22px;
  top: 85px;
  bottom: 22px;
  z-index: 40;
  width: 340px;
  max-width: calc(100vw - 24px);
  display: flex;
  flex-direction: column;
  padding: 23px;
  background: #203b33;
  border: 1px solid #b7b17a77;
  border-radius: 16px;
  box-shadow:
    0 20px 80px #05191bd9,
    0 0 0 100vmax #061c2144;
}
.drawer-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding-bottom: 18px;
  border-bottom: 1px solid #9db08230;
}
.drawer-heading h2 {
  font: 850 italic 25px var(--display);
  margin: 4px 0 0;
}
.social-drawer .social-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-top: 18px;
}
.social-drawer .feed {
  flex: 1;
  height: auto;
  min-height: 80px;
  margin-bottom: 16px;
}
.drawer-invite {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #d9ca97;
  font-size: 11px;
  padding-top: 18px;
  margin-top: 15px;
  border-top: 1px solid #9db08230;
}
.drawer-invite svg {
  width: 15px;
  height: 15px;
}
body[data-screen="profile"] .app-footer {
  margin-top: 34px;
}
@media (min-width: 901px) and (max-height: 850px) {
  .menu-screen {
    min-height: 610px;
    padding-top: 32px;
    padding-bottom: 55px;
  }
  .game-wordmark {
    font-size: 94px;
    margin-block: 20px;
  }
  .menu-tagline {
    font-size: 15px;
    margin-bottom: 22px;
  }
  .main-menu-actions .button {
    min-height: 49px;
  }
  .menu-profile {
    margin-top: 13px;
  }
  .menu-art {
    transform: scale(0.9);
  }
  .screen-heading {
    margin: 15px 0 25px;
  }
  .screen-heading h1 {
    font-size: 32px;
  }
  .setup-screen,
  .profile-screen,
  .lobby-screen {
    padding-top: 20px;
  }
  .avatar-choice svg {
    max-width: 80px;
  }
  .avatar-grid {
    gap: 12px;
  }
  .profile-portrait {
    width: 135px;
    height: 135px;
    border-radius: 37px;
  }
  .profile-preview {
    padding-top: 0;
  }
  .profile-preview > p {
    margin-bottom: 22px;
  }
  .profile-collection {
    padding-top: 0;
  }
  .squad-player {
    min-height: 205px;
    padding-top: 10px;
  }
  .squad-portrait {
    width: 69px;
    height: 69px;
  }
  .squad-team {
    margin-bottom: 10px;
  }
  .squad-player h2 {
    margin-top: 12px;
  }
  .arena {
    column-gap: 22px;
    grid-template-columns: 120px minmax(0, var(--arena-board-width)) 120px;
  }
  .arena-player .avatar {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }
  .arena-player .avatar-art {
    border-radius: 20px;
  }
  .portrait-ring {
    border-radius: 26px;
  }
  .arena .arena-player {
    min-height: 120px;
    gap: 8px;
  }
  .arena .playing-card {
    width: 56px;
    height: 80px;
  }
  .arena .hand-cards {
    min-height: 104px;
    padding-top: 18px;
  }
  .arena .hand-area {
    margin-top: 19px;
  }
  .table-deck .playing-card,
  .table-deck .empty-discard {
    width: 39px;
    height: 56px;
  }
}
@media (max-width: 1050px) {
  .menu-screen {
    padding-inline: 38px;
    gap: 30px;
  }
  .game-wordmark {
    font-size: 95px;
    letter-spacing: -6px;
  }
  .menu-art {
    transform: scale(0.87);
    transform-origin: 40% 50%;
  }
  .setup-layout {
    gap: 35px;
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .profile-layout {
    gap: 40px;
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .lobby-layout {
    gap: 25px;
    grid-template-columns: minmax(0, 1fr) 270px;
  }
  .match-screen {
    padding-inline: 18px;
  }
  .arena {
    column-gap: 18px;
    grid-template-columns: 100px minmax(0, var(--arena-board-width)) 100px;
  }
  .arena-player .player-name {
    max-width: 100px;
    font-size: 12px;
  }
  .arena-player .avatar {
    width: 62px;
    height: 62px;
  }
  .match-scores {
    gap: 14px;
  }
  .match-score {
    font-size: 9px;
    gap: 5px;
  }
  .match-hud {
    gap: 13px;
  }
}
@media (max-width: 800px) {
  .topbar {
    padding-inline: 22px;
  }
  .table-location {
    display: none;
  }
  .menu-screen {
    padding: 35px 30px 65px;
    min-height: 670px;
    grid-template-columns: 1fr 0.8fr;
    gap: 0;
    overflow: hidden;
  }
  .game-wordmark {
    font-size: 90px;
  }
  .menu-art {
    transform: scale(0.7);
    transform-origin: 10% 50%;
    width: 440px;
  }
  .main-menu-actions {
    max-width: 300px;
  }
  .menu-bottom {
    left: 30px;
    right: 30px;
    gap: 14px;
    font-size: 7px;
  }
  .setup-screen,
  .profile-screen,
  .lobby-screen {
    padding: 20px 24px;
  }
  .setup-layout {
    grid-template-columns: 1fr 270px;
    gap: 23px;
  }
  .avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 9px;
  }
  .avatar-choice {
    padding: 6px;
  }
  .avatar-choice svg {
    max-width: 82px;
  }
  .selection-label {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .selection-label > span + span {
    font-size: 7px;
  }
  .setup-controls {
    padding: 23px;
  }
  .profile-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 35px;
  }
  .lobby-layout {
    grid-template-columns: 1fr 250px;
    gap: 20px;
  }
  .squad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .squad-portrait {
    width: 66px;
    height: 66px;
  }
  .squad-player {
    min-height: 212px;
  }
  .squad-bottom {
    flex-direction: column;
  }
  .arena {
    grid-template-columns: 85px minmax(0, 1fr) 85px;
    gap: 12px;
    grid-template-rows: repeat(3, 125px) auto;
  }
  .arena-player .avatar {
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }
  .arena-player .avatar-art {
    border-radius: 17px;
  }
  .arena-player .portrait-ring {
    border-radius: 23px;
  }
  .arena-player .player-name {
    max-width: 85px;
    font-size: 11px;
  }
  .arena-player .player-subtitle {
    font-size: 8px;
  }
  .arena .hand-cards {
    gap: 4px;
  }
  .arena .playing-card {
    width: 49px;
    height: 72px;
  }
  .match-heading {
    gap: 10px;
    flex-wrap: wrap;
  }
  .match-title {
    flex: 1;
  }
  .match-hud {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .match-title h1 {
    font-size: 21px;
  }
  .table-deck {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 0;
  }
  .table-deck .playing-card,
  .table-deck .empty-discard {
    width: 37px;
    height: 52px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 63px;
    padding-inline: 18px;
  }
  .topbar .brand {
    font-size: 19px;
  }
  .topbar .brand-mark {
    width: 31px;
    height: 36px;
  }
  .brand small {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .rules-button,
  .header-actions [data-action="fullscreen"] {
    display: none;
  }
  .header-actions .icon-button {
    width: 32px;
    height: 32px;
  }
  .profile-button {
    display: block;
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }
  .menu-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 31px 25px 55px;
    min-height: 0;
    overflow: hidden;
  }
  .menu-copy {
    width: 100%;
    text-align: center;
    z-index: 2;
  }
  .menu-kicker {
    justify-content: center;
    font-size: 7px;
    letter-spacing: 1.8px;
  }
  .game-wordmark {
    font-size: 86px;
    letter-spacing: -5px;
    margin: 23px auto 18px;
    width: fit-content;
    text-align: left;
  }
  .wordmark-spark {
    font-size: 29px;
    margin-left: 6px;
  }
  .menu-tagline {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 23px;
  }
  .main-menu-actions {
    max-width: 320px;
    margin: auto;
  }
  .main-menu-actions .button {
    min-height: 49px;
    margin-bottom: 11px;
    font-size: 11px;
  }
  .menu-join {
    font-size: 10px;
  }
  .menu-profile {
    margin: 16px auto 0;
    text-align: left;
    width: fit-content;
  }
  .menu-profile > svg {
    width: 44px;
    height: 44px;
  }
  .menu-profile strong {
    font-size: 13px;
  }
  .menu-art {
    display: none;
  }
  .menu-bottom {
    position: static;
    flex-wrap: wrap;
    padding-top: 18px;
    margin-top: 23px;
    width: 100%;
    gap: 12px;
    font-size: 6px;
  }
  .app-footer {
    margin-top: 0;
    padding: 12px 18px;
    font-size: 7px;
  }
  .app-footer > span:nth-child(2) {
    display: none;
  }
  .setup-screen,
  .profile-screen,
  .lobby-screen {
    padding: 16px 21px 25px;
  }
  .screen-heading {
    margin: 18px 0 26px;
  }
  .screen-heading h1 {
    font-size: 28px;
    line-height: 1.1;
  }
  .screen-heading .eyebrow {
    font-size: 7px;
    letter-spacing: 1.4px;
  }
  .screen-heading > p {
    font-size: 11px;
    line-height: 1.5;
  }
  .screen-back {
    font-size: 8px;
  }
  .setup-layout {
    display: flex;
    flex-direction: column;
    gap: 29px;
  }
  .character-selection,
  .setup-controls {
    width: 100%;
  }
  .avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 5px;
  }
  .avatar-choice {
    padding: 5px 4px 7px;
    border-radius: 13px;
    gap: 7px;
  }
  .avatar-choice svg {
    border-radius: 16px;
  }
  .avatar-choice > span {
    font-size: 9px;
  }
  .avatar-choice i {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
  .avatar-helper {
    font-size: 9px;
    margin-top: 16px;
  }
  .selection-label {
    margin-bottom: 16px;
  }
  .setup-controls {
    padding: 22px;
  }
  .setup-controls .button-full {
    min-height: 49px;
  }
  .profile-layout {
    display: flex;
    flex-direction: column-reverse;
    gap: 28px;
  }
  .profile-collection {
    padding-top: 0;
  }
  .profile-collection .avatar-grid {
    gap: 10px 5px;
  }
  .profile-preview {
    padding-top: 0;
    max-width: 320px;
    width: 100%;
    margin: auto;
  }
  .profile-portrait {
    width: 112px;
    height: 112px;
    border-radius: 32px;
    margin-bottom: 15px;
  }
  .profile-portrait svg {
    border-radius: 25px;
  }
  .profile-preview h2 {
    font-size: 27px;
  }
  .profile-preview > p {
    margin-bottom: 23px;
  }
  .profile-preview .color-options {
    justify-content: flex-start;
  }
  .lobby-code {
    gap: 10px;
    padding: 7px 9px;
  }
  .lobby-code > span {
    display: none;
  }
  .lobby-code strong {
    font-size: 18px;
    letter-spacing: 4px;
  }
  .lobby-code svg {
    width: 14px;
    height: 14px;
  }
  .lobby-layout {
    display: block;
  }
  .squad-grid {
    gap: 12px;
  }
  .squad-player {
    min-height: 208px;
    padding-inline: 8px;
  }
  .squad-player h2 {
    font-size: 14px;
  }
  .squad-portrait {
    width: 72px;
    height: 72px;
  }
  .squad-bottom {
    flex-direction: row;
    gap: 9px;
    margin-block: 20px 28px;
  }
  .squad-bottom .button {
    font-size: 9px;
    padding: 9px;
    flex: 1;
  }
  .lobby-controls {
    padding: 22px;
  }
  body[data-screen="game"] .topbar {
    height: 57px;
  }
  body[data-screen="game"] .brand {
    font-size: 18px;
  }
  body[data-screen="game"] .brand-mark {
    width: 28px;
    height: 32px;
  }
  .match-screen {
    padding: 12px 14px 0;
  }
  .match-heading {
    margin-bottom: 14px;
    gap: 10px;
  }
  .match-title h1 {
    font-size: 18px;
  }
  .match-title .eyebrow {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .match-chat {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 9px;
  }
  .match-hud {
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #a6bb8d22;
    padding-top: 10px;
  }
  .match-scores {
    gap: 13px;
    flex-wrap: wrap;
  }
  .match-score {
    font-size: 8px;
    gap: 5px;
  }
  .match-score .sequence-pip {
    width: 10px;
    height: 10px;
  }
  .match-score .sequence-pips {
    gap: 5px;
  }
  .match-hud .timer-ring {
    width: 31px;
    height: 31px;
  }
  .match-hud .timer-ring span {
    font-size: 10px;
  }
  .arena {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  #game-table .table-players {
    display: flex;
    justify-content: space-around;
    width: 100%;
    gap: 6px;
    margin: 0 0 19px;
    min-height: 0;
  }
  .arena .arena-player {
    min-width: 0;
    min-height: 0;
    width: auto;
    flex: 1;
    padding: 0;
    gap: 7px;
  }
  .arena-player .portrait-ring {
    border-radius: 19px;
    padding: 3px;
  }
  .arena-player .avatar,
  .arena-player .avatar-art {
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }
  .arena-player .player-name {
    max-width: 75px;
    font-size: 9px;
  }
  .arena-player .player-name small {
    font-size: 5px;
    margin-left: 1px;
  }
  .arena-player .player-subtitle {
    font-size: 7px;
    margin-top: 2px;
  }
  .player-team-symbol {
    width: 16px;
    height: 16px;
    font-size: 8px;
    right: -4px;
    bottom: -3px;
  }
  .active-turn-label {
    display: none;
  }
  .arena-player .avatar.thinking:after {
    transform: translateX(-50%) scale(0.7);
    bottom: -9px;
  }
  .arena .play-area {
    width: 100%;
  }
  .arena .board-wrap {
    padding-inline: 10px;
    border-radius: 14px;
  }
  .arena .board {
    aspect-ratio: 1.12;
    gap: 3px;
  }
  .arena .board-topline {
    height: 23px;
    font-size: 4px;
    letter-spacing: 1px;
  }
  .arena .board-topline > span:first-child {
    font-size: 5px;
  }
  .arena .board-bottomline {
    height: 22px;
  }
  .arena .hand-area {
    margin-top: 20px;
    padding-inline: 0;
  }
  .arena .hand-cards {
    gap: 5px;
    min-height: 109px;
    padding-top: 20px;
    padding-bottom: 7px;
  }
  .arena .playing-card {
    width: min(12vw, 49px);
    height: min(17.5vw, 72px);
  }
  .arena .hand-heading {
    font-size: 7px;
  }
  .arena .hand-hint {
    font-size: 8px;
  }
  .arena .hand-note {
    font-size: 9px;
    margin-top: 5px;
  }
  .table-deck {
    flex-direction: row;
    gap: 22px;
    width: 100%;
    margin-top: 13px;
    justify-content: center;
    padding: 13px 0;
    border-top: 1px solid #a6bb8d22;
  }
  .table-deck .deck-stack {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .table-deck .playing-card,
  .table-deck .empty-discard {
    width: 28px;
    height: 40px;
  }
  .table-deck .card-rank {
    font-size: 8px;
  }
  .table-deck .card-rank .suit {
    display: none;
  }
  .table-deck .playing-card > .suit {
    width: 13px;
    height: 15px;
  }
  .table-deck .deck-stack label {
    font-size: 6px;
  }
  .table-exit {
    margin: 6px 0 15px;
  }
  .social-drawer {
    top: 69px;
    bottom: 12px;
    right: 12px;
    padding: 20px;
  }
  .app-footer {
    gap: 8px;
  }
}
@media (max-width: 360px) {
  .topbar {
    padding-inline: 12px;
  }
  .topbar .brand {
    font-size: 17px;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions .icon-button {
    width: 29px;
    height: 29px;
  }
  .setup-screen,
  .profile-screen,
  .lobby-screen {
    padding-inline: 16px;
  }
  .screen-heading h1 {
    font-size: 25px;
  }
  .arena .hand-cards {
    gap: 3px;
  }
  .match-screen {
    padding-inline: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .screen {
    animation: none;
  }
}
body.reduce-motion .screen {
  animation: none;
}

@media (max-width: 600px) {
  .topbar .brand > span:last-child,
  body[data-screen="game"] .brand > span:last-child {
    font-size: 18px;
    letter-spacing: -0.8px;
  }
  .topbar .brand-mark {
    padding: 5px;
    gap: 2px;
    height: 31px;
  }
  body[data-screen="game"] .brand-mark {
    padding: 4px;
    height: 28px;
  }
}

.squad-player h2 {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.player-identity {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 600px) {
  .arena-player .player-name {
    max-width: 100%;
  }
}

/* Large, explicit choices for players arriving on a phone. */
.friends-menu { max-width: 560px; margin: 0 auto; }
.friends-menu .screen-heading { margin-top: 28px; }
.friends-menu .screen-heading > p { font-size: 16px; line-height: 1.5; }
.friends-actions { display: grid; gap: 20px; }
.friends-actions .friends-choice {
  display: flex; align-items: center; gap: 16px; width: 100%;
  min-height: 100px; padding: 22px; text-align: left;
}
.friends-choice > svg { width: 24px; height: 24px; flex-shrink: 0; }
.friends-choice > svg:last-child { margin-left: auto; width: 20px; }
.friends-choice > span { display: grid; gap: 8px; }
.friends-choice strong { font-size: 18px; letter-spacing: .5px; }
.friends-choice small { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.4; }
.friends-characters { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 38px auto 20px; color: #b6bf99; }
.friends-characters svg { width: 64px; height: 64px; }
body[data-screen="friends"] .screen-back,
body[data-screen="join"] .screen-back,
body[data-screen="multiplayer"] .screen-back { min-height: 44px; font-size: 12px; }
@media (max-width: 600px) {
  .main-menu-actions .button { min-height: 60px; font-size: 14px; }
  .friends-menu .screen-heading h1 { font-size: 28px; }
  .friends-menu .screen-heading { margin: 20px 0 28px; }
  .friends-actions .friends-choice { padding: 20px 16px; gap: 12px; }
  .friends-choice strong { font-size: 17px; }
}

.result-card .result-leave { display: block; margin: 10px auto 0; min-height: 44px; padding: 8px 18px; color: #c6d3c1; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.result-card .result-leave:hover { color: #f0ce72; }
.result-card .button { min-height: 52px; font-size: 15px; }
.result-card p { font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
@media (max-width: 600px) {
  .board-overlay { padding: 10px; }
  .result-card { padding: 14px 18px 8px; }
  .result-flower { font-size: 28px; }
  .result-card .eyebrow { margin-top: 6px; font-size: 9px; }
  .result-card h2 { font-size: 26px; margin: 8px 0 10px; }
  .result-card .button { margin-top: 6px; }
  .result-card .result-leave { margin-top: 4px; }
}

/* Keep the mobile match compact without clipping controls on short screens. */
@media (max-width: 600px) {
  body[data-screen="game"] .app-footer { display: none; }
  body[data-screen="game"] .topbar { height: 48px; min-height: 48px; }
  body[data-screen="game"] .match-screen { padding: 6px 10px 0; }
  body[data-screen="game"] .match-heading {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin-bottom: 8px;
  }
  body[data-screen="game"] .match-title h1 { font-size: 16px; }
  body[data-screen="game"] .match-title .eyebrow { display: none; }
  body[data-screen="game"] .match-chat { grid-column: 2; grid-row: 1 / 3; min-height: 44px; }
  body[data-screen="game"] .match-hud { grid-column: 1; border: 0; padding: 0; }
  body[data-screen="game"] .match-hud .timer-ring { width: 25px; height: 25px; }
  body[data-screen="game"] #game-table .table-players { margin-bottom: 10px; }
  body[data-screen="game"] .arena-player { gap: 4px; }
  body[data-screen="game"] .arena .board-topline,
  body[data-screen="game"] .arena .board-bottomline { height: 15px; }
  body[data-screen="game"] .arena .hand-area { margin-top: 10px; }
  body[data-screen="game"] .arena .hand-cards { min-height: 87px; padding-top: 12px; padding-bottom: 4px; }
  body[data-screen="game"] .arena .hand-note { min-height: 24px; margin-top: 2px; }
  body[data-screen="game"] .table-deck { margin-top: 0; padding: 4px 0; gap: 20px; }
  body[data-screen="game"] .table-deck .playing-card,
  body[data-screen="game"] .table-deck .empty-discard { width: 18px; height: 26px; }
  body[data-screen="game"] .table-exit { margin: 0; }
  body[data-screen="game"] .table-exit button { min-height: 44px; }
}
@media (max-width: 600px) {
  body[data-screen="game"] .arena .board-wrap { width: 100%; }
  body[data-screen="game"] .arena .board { width: 100%; height: auto; }
  body[data-screen="game"] .arena .hand-area { margin-inline: 0; }
  body[data-screen="game"] .arena .hand-cards { gap: 3px; padding-inline: 6px; }
  body[data-screen="game"] .arena .hand-cards .playing-card { width: min(11.5vw, 44px); height: min(16.8vw, 65px); }
}
@media (max-width: 600px) and (max-height: 740px) {
  body[data-screen="game"] .table-deck { display: none; }
  body[data-screen="game"] .arena-player .avatar,
  body[data-screen="game"] .arena-player .avatar-art { width: 32px; height: 32px; }
  body[data-screen="game"] .arena-player .player-subtitle { display: none; }
  body[data-screen="game"] .arena .hand-cards { min-height: 76px; }
  body[data-screen="game"] .arena .hand-area { margin-top: 6px; }
}

/* A dedicated footer keeps Jack actions clear at phone hand sizes. */
.hand-cards .playing-card.jack-card .jack-art {
  position: absolute;
  top: 24%;
  left: 32%;
  width: 48%;
  height: 49%;
  margin: 0;
}
.hand-cards .playing-card.jack-card .card-bottom { display: none; }
.hand-cards .playing-card.jack-card .jack-label {
  left: 2px;
  right: 2px;
  bottom: 3px;
  padding: 3px 0;
  border-radius: 3px;
  background: #173b36;
  color: #fff9df;
  font: 900 clamp(7px, 1.8vw, 10px)/1.1 var(--sans);
  letter-spacing: 0;
  text-align: center;
}
.hand-cards .playing-card.jack-card.red .jack-label { background: #8e2827; }
.invitation-notice { padding-block: 48px; }

.menu-ranking { margin-top: 12px; width: 100%; max-width: 380px; }
.ranking-personal { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 24px 0; }
.ranking-personal span { background: #ffffff08; border: 1px solid #e6cc7633; border-radius: 12px; padding: 14px 4px; text-align: center; font-size: 9px; letter-spacing: .5px; }
.ranking-personal strong { display: block; color: var(--gold); font-size: 28px; line-height: 1.3; }
.ranking-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ranking-table caption { text-align: left; padding-bottom: 14px; color: #d6c58c; }
.ranking-table th, .ranking-table td { padding: 10px 4px; text-align: center; border-bottom: 1px solid #ffffff12; }
.ranking-table thead { font-size: 9px; color: #a9bcb5; }
.ranking-player { display: flex; align-items: center; gap: 8px; text-align: left; overflow-wrap: anywhere; }
.ranking-player svg { width: 34px; height: 34px; flex-shrink: 0; }
.ranking-player small { display: block; font-size: 8px; color: #eed27d; }
.ranking-wins { color: #ffdd77; font-size: 19px; font-weight: 900; }
.ranking-you { background: #eac9670d; }
.ranking-rules { font-size: 11px; color: #9eb4ae; line-height: 1.6; margin: 20px 0; }
.ranking-empty { padding: 25px 12px; border: 1px dashed #e6cc7655; border-radius: 12px; text-align: center; }
.ranking-history { list-style: none; padding: 0; }
.ranking-history li { display: flex; gap: 12px; align-items: center; padding: 10px 0; font-size: 12px; border-bottom: 1px solid #ffffff12; }
.ranking-history time { margin-left: auto; color: #9eb4ae; }
.result-win { color: #80d5a7; }
.result-loss { color: #ecaa92; }

@media (max-width: 420px) {
  #info-dialog.ranking-dialog { width: calc(100% - 24px); max-width: none; padding: 22px 16px; }
  .ranking-dialog .dialog-heading h2 { font-size: 24px; overflow-wrap: anywhere; min-width: 0; }
  .ranking-dialog .dialog-heading .icon-button { flex-shrink: 0; }
}
