:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #101717;
  color: #f7f2e8;
}

html {
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  display: grid;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  overflow-x: hidden;
  place-items: center;
}

.game-shell {
  width: min(100%, 1080px);
}

.menu-screen {
  width: min(100%, 700px);
  margin: min(12vh, 96px) auto;
  border: 1px solid #315447;
  border-radius: 18px;
  padding: clamp(24px, 6vw, 48px);
  background:
    linear-gradient(145deg, rgb(27 83 57 / 28%), transparent 48%),
    #13241e;
  box-shadow:
    0 18px 42px rgb(0 0 0 / 38%),
    inset 0 1px rgb(255 239 204 / 8%);
  text-align: center;
}

.menu-screen h1 {
  color: #f6c85f;
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-introduction {
  margin: 10px 0 26px;
  color: #b6c3bb;
}

.main-menu-actions,
.sub-menu {
  display: grid;
  gap: 10px;
  margin-inline: auto;
  max-width: 360px;
}

.main-menu-actions button,
.sub-menu button,
.back-button {
  min-height: 48px;
  border-color: #6e8278;
  background: rgb(6 45 30 / 45%);
  font-size: 1rem;
}

.main-menu-actions button:first-child {
  border-color: #d6a444;
}

.main-menu-actions small {
  margin-left: 5px;
  color: #aebbb4;
  font-size: 0.72em;
}

.sub-menu {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #315447;
}

.sub-menu p,
.menu-notice {
  margin: 0;
  color: #d5ded8;
}

.menu-notice {
  margin-top: 18px;
  color: #f6c85f;
}

.detail-screen {
  width: min(100%, 840px);
  text-align: left;
}

.detail-screen h1 {
  text-align: center;
}

.cue-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0;
}

.cue-profile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
}

.cue-profile-summary p {
  margin: 0;
  border: 1px solid #315447;
  border-radius: 7px;
  padding: 9px;
  background: rgb(6 45 30 / 42%);
  color: #d5ded8;
  font-size: 0.82rem;
}

.cue-profile-summary strong {
  display: block;
  margin-top: 3px;
  color: #f6c85f;
  font-size: 0.95rem;
}

.cue-card {
  border: 1px solid #315447;
  border-radius: 8px;
  padding: 13px;
  background: rgb(6 45 30 / 42%);
}

.cue-preview {
  --preview-background: #123b2a;
  --cue-butt-color: #5b3119;
  --cue-butt-accent: #c58a4a;
  --cue-shaft-color: #e1b778;
  --cue-tip-color: #e8ded0;
  position: relative;
  display: flex;
  align-items: center;
  height: 68px;
  margin: -3px -3px 12px;
  overflow: hidden;
  border: 1px solid rgb(220 190 136 / 20%);
  border-radius: 6px;
  background:
    linear-gradient(120deg, transparent 44%, rgb(255 255 255 / 7%) 50%, transparent 56%),
    var(--preview-background);
  box-shadow: inset 0 1px rgb(255 255 255 / 9%), inset 0 -12px 18px rgb(0 0 0 / 18%);
}

.cue-preview-body {
  z-index: 1;
  display: flex;
  align-items: center;
  width: 78%;
  margin-left: 10%;
  transform: rotate(-7deg);
  transform-origin: center;
}

.cue-preview-butt,
.cue-preview-shaft,
.cue-preview-tip {
  display: block;
}

.cue-preview-butt {
  position: relative;
  width: 39%;
  height: var(--cue-butt-height, 11px);
  border: 1px solid rgb(22 12 5 / 60%);
  border-radius: 10px 2px 2px 10px;
  background:
    linear-gradient(90deg, rgb(255 235 181 / 18%), transparent 24%),
    linear-gradient(180deg, var(--cue-butt-accent), var(--cue-butt-color) 64%);
  box-shadow: 0 3px 6px rgb(0 0 0 / 35%);
}

.cue-preview-shaft {
  width: 57%;
  height: var(--cue-shaft-height, 6px);
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #fff3c8, var(--cue-shaft-color) 55%, #9a6c38);
  box-shadow: 0 2px 4px rgb(0 0 0 / 24%);
}

.cue-preview-tip {
  width: 9px;
  height: 8px;
  margin-left: -1px;
  border-radius: 1px 4px 4px 1px;
  background: var(--cue-tip-color);
  box-shadow: 0 1px 3px rgb(0 0 0 / 35%);
}

.cue-preview-inlay {
  position: absolute;
  top: 50%;
  left: 16%;
  width: 20%;
  height: 42%;
  border-radius: 50%;
  transform: translateY(-50%);
}

.cue-preview::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 50%, rgb(255 255 255 / 10%), transparent 28%);
  content: "";
  pointer-events: none;
}

.cue-preview--camp-wood {
  --preview-background: #263629;
}

.cue-preview--patinee-aged-wood {
  --cue-butt-color: #5a3a28;
  --cue-butt-accent: #947053;
  --cue-shaft-color: #d2b48c;
  --preview-background: repeating-linear-gradient(12deg, #3b3026 0 3px, #47372c 3px 7px);
}

.cue-preview--droite-straight-grain {
  --cue-butt-color: #26383c;
  --cue-butt-accent: #8fb5b2;
  --cue-shaft-color: #e2d8b8;
  --cue-butt-height: 8px;
  --cue-shaft-height: 4px;
  --preview-background: #152f31;
}

.cue-preview--costaude-dark-oak {
  --cue-butt-color: #24140c;
  --cue-butt-accent: #7d4d27;
  --cue-shaft-color: #d0a66c;
  --cue-butt-height: 15px;
  --cue-shaft-height: 8px;
  --preview-background: #2d2018;
}

.cue-preview--velours-walnut {
  --cue-butt-color: #442339;
  --cue-butt-accent: #a76d83;
  --cue-shaft-color: #e6d3af;
  --preview-background: #342638;
}

.cue-preview--tireuse-amber {
  --cue-butt-color: #5a260d;
  --cue-butt-accent: #e19a36;
  --cue-shaft-color: #f3d994;
  --cue-butt-height: 8px;
  --cue-shaft-height: 4px;
  --preview-background: #442716;
}

.cue-preview--marteau-ironwood {
  --cue-butt-color: #202426;
  --cue-butt-accent: #7d8585;
  --cue-shaft-color: #d2bd8a;
  --cue-butt-height: 16px;
  --cue-shaft-height: 8px;
  --preview-background: #252a2a;
}

.cue-preview--oeil-du-camp-emerald {
  --cue-butt-color: #0d473d;
  --cue-butt-accent: #4db58b;
  --cue-shaft-color: #d6c575;
  --cue-tip-color: #75d6ae;
  --preview-background: #123b37;
}

.cue-preview--boheme-violet-gold {
  --cue-butt-color: #4a285b;
  --cue-butt-accent: #d9ad52;
  --cue-shaft-color: #f0d58d;
  --cue-tip-color: #d9ad52;
  --preview-background: #392244;
}

.cue-preview--niglo-royale-purple-gold {
  --cue-butt-color: #130e19;
  --cue-butt-accent: #d7b45a;
  --cue-shaft-color: #bca5e4;
  --cue-tip-color: #f6d980;
  --cue-butt-height: 13px;
  --preview-background:
    radial-gradient(circle at 22% 50%, rgb(215 180 90 / 28%), transparent 20%),
    linear-gradient(115deg, #171020, #3c2255 52%, #14101d);
}

.cue-preview--camp-wood .cue-preview-butt {
  background: linear-gradient(90deg, #d3a56e, #9c6133 45%, #603417);
}

.cue-preview--camp-wood .cue-preview-inlay {
  border-left: 2px solid rgb(255 227 170 / 30%);
}

.cue-preview--patinee-aged-wood .cue-preview-butt {
  background:
    repeating-linear-gradient(102deg, transparent 0 7px, rgb(230 204 164 / 22%) 7px 8px),
    linear-gradient(90deg, #a67850, #563522 48%, #2f1b13);
}

.cue-preview--patinee-aged-wood .cue-preview-inlay {
  border: 1px solid rgb(224 190 136 / 35%);
  box-shadow: 12px 0 0 -1px rgb(217 181 125 / 20%);
}

.cue-preview--droite-straight-grain .cue-preview-body {
  width: 82%;
  margin-left: 8%;
}

.cue-preview--droite-straight-grain .cue-preview-butt,
.cue-preview--droite-straight-grain .cue-preview-shaft {
  box-shadow: 0 0 0 1px rgb(157 204 200 / 32%);
}

.cue-preview--droite-straight-grain .cue-preview-inlay {
  width: 4px;
  border-radius: 0;
  background: #a9cfca;
  box-shadow: 9px 0 #a9cfca, 18px 0 #a9cfca;
}

.cue-preview--costaude-dark-oak .cue-preview-butt {
  border-width: 2px;
  background: linear-gradient(90deg, #936039, #3b2010 44%, #180d08);
}

.cue-preview--costaude-dark-oak .cue-preview-inlay {
  left: 9%;
  width: 54%;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #20110a 0 6px, #754321 6px 10px);
}

.cue-preview--velours-walnut .cue-preview-butt {
  background:
    linear-gradient(90deg, transparent, rgb(255 230 242 / 22%), transparent),
    linear-gradient(90deg, #321329, #722d62 45%, #25101e);
}

.cue-preview--velours-walnut .cue-preview-inlay {
  left: 8%;
  width: 50%;
  border-radius: 2px;
  background: linear-gradient(90deg, #4e1f43, #b97da7 48%, #4e1f43);
  opacity: 0.8;
}

.cue-preview--tireuse-amber .cue-preview-body {
  width: 84%;
  margin-left: 7%;
}

.cue-preview--tireuse-amber .cue-preview-shaft {
  background:
    repeating-linear-gradient(90deg, transparent 0 13px, rgb(116 78 28 / 56%) 13px 15px),
    linear-gradient(180deg, #fff1c5, #e1ba62 55%, #9a6c38);
}

.cue-preview--tireuse-amber .cue-preview-inlay {
  width: 5px;
  border-radius: 1px;
  background: #f4cb5c;
  box-shadow: 10px 0 #f4cb5c, 20px 0 #f4cb5c;
}

.cue-preview--marteau-ironwood .cue-preview-butt {
  border-width: 2px;
  background: linear-gradient(90deg, #697170, #252a2b 40%, #101213);
}

.cue-preview--marteau-ironwood .cue-preview-shaft {
  box-shadow:
    -4px 0 0 #9da4a2,
    -8px 0 0 #363c3b,
    0 2px 4px rgb(0 0 0 / 24%);
}

.cue-preview--marteau-ironwood .cue-preview-inlay {
  left: 11%;
  width: 42%;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #15191a 0 5px, #767e7c 5px 7px);
}

.cue-preview--oeil-du-camp-emerald .cue-preview-butt {
  background: linear-gradient(90deg, #1e7865, #102c28 43%, #071511);
}

.cue-preview--oeil-du-camp-emerald .cue-preview-inlay {
  width: 21px;
  height: 12px;
  border: 1px solid #d5b24e;
  border-radius: 50%;
  background: radial-gradient(circle, #d5b24e 0 18%, #102c28 22% 43%, transparent 46%);
  box-shadow: 29px 0 0 -5px #d5b24e;
}

.cue-preview--boheme-violet-gold .cue-preview-butt {
  background:
    repeating-linear-gradient(55deg, transparent 0 7px, rgb(235 195 99 / 45%) 7px 9px),
    linear-gradient(90deg, #73406e, #351a44 46%, #1d0f26);
}

.cue-preview--boheme-violet-gold .cue-preview-inlay {
  left: 8%;
  width: 58%;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #d9ad52 0 4px, transparent 4px 11px);
}

.cue-preview--niglo-royale-purple-gold .cue-preview-body {
  width: 82%;
  margin-left: 8%;
}

.cue-preview--niglo-royale-purple-gold .cue-preview-butt {
  border-color: #d7b45a;
  background:
    linear-gradient(90deg, transparent, rgb(255 239 174 / 35%), transparent),
    linear-gradient(90deg, #0c0911, #40235a 48%, #120d19);
  box-shadow: 0 0 12px rgb(215 180 90 / 32%), 0 3px 6px rgb(0 0 0 / 40%);
}

.cue-preview--niglo-royale-purple-gold .cue-preview-shaft {
  background:
    linear-gradient(90deg, #d7b45a 0 4px, transparent 4px 10px),
    linear-gradient(180deg, #eee0ff, #bca5e4 55%, #6f5799);
}

.cue-preview--niglo-royale-purple-gold .cue-preview-inlay {
  left: 8%;
  width: 62%;
  border: 1px solid #d7b45a;
  border-radius: 2px;
  background:
    radial-gradient(circle at 20% 50%, #f6d980 0 7%, transparent 9%),
    radial-gradient(circle at 80% 50%, #f6d980 0 7%, transparent 9%);
}

.cue-card h2,
.cue-card p {
  margin: 0;
}

.cue-card h2 {
  color: #f7f2e8;
  font-size: 1rem;
}

.cue-rarity {
  margin-top: 4px !important;
  color: #f6c85f;
  font-size: 0.82rem;
  font-weight: bold;
}

.cue-rarity.rarity-common {
  color: #c5d1ca;
}

.cue-rarity.rarity-uncommon {
  color: #85d6a7;
}

.cue-rarity.rarity-rare {
  color: #8bbcf4;
}

.cue-rarity.rarity-epic {
  color: #c79af3;
}

.cue-rarity.rarity-prestige {
  color: #e8b96a;
}

.cue-rarity.rarity-legendary {
  color: #f6c85f;
}

.cue-stats {
  margin-top: 9px !important;
  color: #b6c3bb;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-line;
}

.cue-price,
.cue-requirement,
.cue-state {
  margin-top: 7px !important;
  font-size: 0.8rem;
}

.cue-price,
.cue-requirement {
  color: #b6c3bb;
}

.cue-state {
  color: #f6c85f;
  font-weight: bold;
}

.cue-card button {
  width: 100%;
  margin-top: 12px;
}

.cue-card.is-equipped {
  border-color: #d6a444;
  box-shadow: inset 3px 0 #d6a444;
}

.cue-card.is-locked {
  background: rgb(7 24 18 / 60%);
}

.cue-card.is-legendary {
  border-color: #9d782f;
  background: linear-gradient(145deg, rgb(214 164 68 / 16%), rgb(6 45 30 / 42%));
}

.rules-content {
  display: grid;
  gap: 12px;
  margin: 26px 0;
  color: #d5ded8;
  line-height: 1.55;
}

.rules-content p {
  margin: 0;
}

.rules-content strong {
  color: #f6c85f;
}

.online-lobby-actions {
  display: grid;
  gap: 12px;
  margin: 26px auto 14px;
  max-width: 360px;
}

.online-lobby-actions label {
  display: grid;
  gap: 6px;
  color: #d5ded8;
  font-size: 0.86rem;
  text-align: left;
}

.online-lobby-actions input {
  min-height: 44px;
  border: 1px solid #6e8278;
  border-radius: 5px;
  padding: 8px 10px;
  background: #0d1d18;
  color: #f7f2e8;
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}

.online-room-code {
  margin: 18px 0;
  border: 1px solid #d6a444;
  border-radius: 10px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgb(214 164 68 / 16%), transparent 62%),
    #1e2a20;
  text-align: center;
}

.online-room-code span,
.online-room-code p {
  display: block;
  margin: 0;
  color: #d5ded8;
  font-size: 0.82rem;
}

.online-room-code strong {
  display: block;
  margin: 5px 0;
  color: #f6c85f;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.18em;
}

.online-players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 18px 0;
}

.online-player-card {
  min-height: 94px;
  margin: 0;
  border: 1px solid #315447;
  border-radius: 7px;
  padding: 10px;
  background: rgb(6 45 30 / 42%);
}

.online-player-card.is-you {
  border-color: #d6a444;
  box-shadow: inset 3px 0 #d6a444;
}

.online-player-card h2,
.online-player-card p {
  margin: 0;
}

.online-player-card h2 {
  color: #f7f2e8;
  font-size: 0.95rem;
}

.online-player-card p {
  margin-top: 5px;
  color: #d5ded8;
  font-size: 0.85rem;
}

.online-player-role {
  color: #f6c85f !important;
  font-size: 0.75rem !important;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.online-wager-panel {
  margin: 18px 0;
  border: 1px solid #725b2d;
  border-radius: 8px;
  padding: 14px;
  background: rgb(70 48 14 / 22%);
}

.online-wager-panel h2,
.online-wager-panel p {
  margin: 0;
}

.online-wager-panel h2 {
  color: #f6c85f;
  font-size: 1rem;
}

.online-wager-panel > p,
.online-wager-response p {
  margin-top: 8px;
  color: #d5ded8;
  font-size: 0.88rem;
}

.online-wager-actions,
.online-wager-response {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.online-wager-mode-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.online-wager-mode-choice button.is-selected {
  border-color: #f6c85f;
  background: #d6a444;
  color: #1d1a15;
}

.online-wager-actions button,
.online-wager-response button {
  min-height: 36px;
  padding: 6px 10px;
}

.online-wager-response {
  align-items: center;
}

.online-wager-response p {
  flex-basis: 100%;
  margin-top: 0;
}

.online-wager-acceptance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.online-wager-acceptance p {
  margin: 0;
  border: 1px solid #6e8278;
  border-radius: 6px;
  padding: 8px;
  color: #d5ded8;
  font-size: 0.78rem;
}

.online-wager-acceptance .is-accepted {
  border-color: #74bc83;
  background: rgb(58 122 72 / 20%);
  color: #b8e4bf;
}

.online-wager-acceptance .is-pending {
  border-color: #d6a444;
  color: #f6c85f;
}

.online-wager-acceptance .is-rejected {
  border-color: #c35b4d;
  color: #f0aaa1;
}

.back-button {
  display: block;
  margin-left: auto;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #d6a444;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.status {
  max-width: 390px;
  margin: 0;
  color: #d5ded8;
  font-size: 0.95rem;
  text-align: right;
}

.game-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.mode-selector {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #d5ded8;
  font-size: 0.82rem;
}

.bet-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid #315447;
  border-radius: 7px;
  background: #13241e;
  font-size: 0.82rem;
}

.bet-panel button {
  min-height: 30px;
  padding: 5px 8px;
}

.pot-indicator {
  width: fit-content;
  border: 1px solid #725b2d;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgb(70 48 14 / 22%);
  color: #f6c85f;
  font-weight: bold;
}

.online-connection-notice {
  margin: 0;
  border: 1px solid #d6a444;
  border-radius: 7px;
  padding: 9px 11px;
  background: rgb(70 48 14 / 22%);
  color: #f6c85f;
  font-weight: bold;
  line-height: 1.45;
  white-space: pre-line;
}

.forfeit-dialog {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(0 0 0 / 58%);
}

.forfeit-dialog-content {
  width: min(100%, 390px);
  border: 1px solid #9a4238;
  border-radius: 10px;
  padding: 22px;
  background: #1d211e;
  box-shadow: 0 18px 42px rgb(0 0 0 / 46%);
}

.forfeit-dialog-content h2,
.forfeit-dialog-content p {
  margin: 0;
}

.forfeit-dialog-content h2 {
  color: #f6c85f;
}

.forfeit-dialog-content p {
  margin-top: 10px;
  color: #d5ded8;
}

.forfeit-dialog-content div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

#confirmForfeitButton {
  border-color: #c35b4d;
  background: #612d26;
}

select {
  min-height: 34px;
  border: 1px solid #6e8278;
  border-radius: 5px;
  padding: 5px 8px;
  background: #13241e;
  color: #f7f2e8;
  font: inherit;
  touch-action: manipulation;
}

button {
  border: 1px solid #d6a444;
  border-radius: 5px;
  padding: 8px 12px;
  background: transparent;
  color: #f7f2e8;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  white-space: nowrap;
  touch-action: manipulation;
}

button:hover,
button:focus-visible {
  background: #d6a444;
  color: #1d1a15;
}

#soundButton.is-muted {
  border-color: #6e8278;
  color: #aebbb4;
}

.game-info {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  color: #d5ded8;
  font-size: 0.9rem;
}

.game-info p {
  margin: 0;
}

.orientation-hint {
  display: none;
  margin: 0 0 10px;
  color: #d6a444;
  font-size: 0.82rem;
  text-align: center;
}

.screen-size-hint {
  display: none;
  margin: 0 0 6px;
  color: #aebbb4;
  font-size: 0.75rem;
  text-align: center;
}

.turn-indicator {
  width: fit-content;
  border: 1px solid #725b2d;
  border-radius: 7px;
  padding: 8px 11px;
  background: #2b2115;
  color: #f6c85f;
  font-weight: bold;
}

.turn-indicator.is-your-turn {
  border-color: #74bc83;
  background: rgb(58 122 72 / 22%);
  color: #c9f0ce;
}

.cue-indicator {
  color: #b6c3bb;
  font-size: 0.82rem;
}

.player-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.player-panel {
  min-height: 84px;
  border: 1px solid #315447;
  border-radius: 7px;
  padding: 9px 11px;
  background: #13241e;
}

.player-panel.is-active {
  border-color: #d6a444;
  box-shadow: inset 3px 0 #d6a444;
}

.player-panel.is-online-active {
  background:
    linear-gradient(135deg, rgb(214 164 68 / 12%), transparent 65%),
    #13241e;
}

.player-panel.is-solids {
  border-color: #d6a444;
}

.player-panel.is-stripes {
  border-color: #aebbb4;
}

.player-panel h2 {
  margin: 0 0 4px;
  color: #f7f2e8;
  font-size: 0.95rem;
}

.solo-panel {
  min-height: 84px;
}

.solo-records {
  margin-top: 5px !important;
  color: #f6c85f;
  font-size: 0.78rem;
}

.remaining-balls {
  display: flex;
  min-height: 24px;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
  color: #aebbb4;
  font-size: 0.78rem;
}

.ball-chip {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgb(0 0 0 / 55%);
  border-radius: 50%;
  background: var(--ball-color);
  color: #1d1a15;
  font-size: 0.66rem;
  font-weight: bold;
}

.ball-chip.striped {
  background: linear-gradient(
    to bottom,
    #f7f4ea 0 26%,
    var(--ball-color) 26% 74%,
    #f7f4ea 74% 100%
  );
}

.eight-ball-chip {
  background: #202020;
  color: #f7f4ea;
}

.eight-objective {
  color: #f6c85f;
  font-weight: bold;
}

.game-message {
  color: #f6c85f;
  font-weight: bold;
}

.game-over-panel {
  margin: 0 0 12px;
  border: 1px solid #d6a444;
  border-radius: 7px;
  padding: 12px 16px;
  background: #2b2115;
  color: #f6c85f;
  text-align: center;
}

.game-over-panel .game-message {
  margin: 0;
  font-size: 1rem;
  white-space: pre-line;
}

.online-result-details {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  border-top: 1px solid rgb(214 164 68 / 38%);
  padding-top: 14px;
}

.online-result-details p {
  margin: 0;
  color: #d5ded8;
}

.online-result-outcome {
  color: #f6c85f !important;
  font-size: 1.35rem;
  font-weight: bold;
  letter-spacing: 0.1em;
}

.online-result-details.is-victory .online-result-outcome {
  color: #b8e4bf !important;
}

.online-result-details.is-defeat .online-result-outcome {
  color: #f0aaa1 !important;
}

.online-result-pot {
  color: #f6c85f !important;
  font-weight: bold;
}

.online-result-details button {
  justify-self: center;
  margin-top: 5px;
}

.solo-result-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.score-change {
  color: #85d6a7;
  font-weight: bold;
}

.table-frame {
  --felt-watermark-image: url("../assets/image/d1bd3744-15dc-4ee6-8e41-ee9527973cfe.png");
  position: relative;
  overflow: hidden;
  border: 10px solid;
  border-color: #5a321d;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgb(255 224 174 / 12%), transparent 38%),
    repeating-linear-gradient(0deg, rgb(255 220 166 / 3%) 0 1px, transparent 1px 8px),
    linear-gradient(135deg, #714126, #482613 52%, #351a0c);
  box-shadow:
    0 16px 38px rgb(0 0 0 / 48%),
    0 2px 7px rgb(0 0 0 / 38%),
    inset 0 1px 1px rgb(255 225 180 / 24%),
    inset 0 -2px 4px rgb(29 13 5 / 48%);
}

.table-frame::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image: var(--felt-watermark-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: min(43%, 390px);
  content: "";
  filter: grayscale(1) sepia(1) hue-rotate(78deg) saturate(0.65) brightness(0.92) contrast(1.35);
  mix-blend-mode: screen;
  opacity: 0.215;
  pointer-events: none;
}

canvas {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  background: #0d5538;
  cursor: crosshair;
  touch-action: none;
}

.power-indicator {
  margin: 12px 0 0;
  color: #d5ded8;
  font-size: 0.9rem;
  text-align: right;
}

.power-indicator strong {
  color: #f6c85f;
  font-variant-numeric: tabular-nums;
}

.instructions {
  margin: 14px 0 0;
  color: #b6c3bb;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 620px) {
  body {
    padding: 16px;
  }

  .menu-screen {
    margin: 16px auto;
    border-radius: 12px;
  }

  .cue-catalog {
    grid-template-columns: 1fr;
  }

  .cue-profile-summary {
    grid-template-columns: 1fr;
  }

  .online-players,
  .online-wager-acceptance {
    grid-template-columns: 1fr;
  }

  .game-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .status {
    text-align: left;
  }

  .game-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .mode-selector,
  select {
    width: 100%;
  }

  .bet-panel button {
    min-height: 40px;
  }

  .mode-selector {
    justify-content: space-between;
  }

  .game-info {
    gap: 4px;
  }

  .player-panels {
    grid-template-columns: 1fr;
  }

  .table-frame {
    border-width: 7px;
    border-radius: 12px;
  }

  button {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .power-indicator,
  .instructions {
    font-size: 0.82rem;
  }
}

@media (max-width: 620px) and (orientation: portrait) {
  .orientation-hint {
    display: block;
  }

  h1 {
    font-size: 1.7rem;
  }

  .player-panel {
    min-height: 72px;
  }

  .mode-selector {
    font-size: 0.72rem;
  }

  select {
    min-height: 30px;
    padding: 3px 5px;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  body {
    align-items: start;
    padding: 10px;
  }

  .game-shell {
    width: min(100%, 1000px);
  }

  .game-header {
    margin-bottom: 5px;
  }

  .screen-size-hint {
    display: block;
  }

  .eyebrow {
    display: none;
  }

  h1 {
    font-size: 1.45rem;
  }

  .game-controls {
    gap: 8px;
  }

  .status {
    max-width: 260px;
    font-size: 0.75rem;
  }

  .game-info {
    gap: 4px;
    margin-bottom: 6px;
    font-size: 0.75rem;
  }

  .player-panels {
    gap: 6px;
  }

  .player-panel {
    min-height: 58px;
    padding: 5px 8px;
  }

  .player-panel h2 {
    margin-bottom: 2px;
    font-size: 0.8rem;
  }

  .remaining-balls {
    min-height: 18px;
    gap: 3px;
    margin-top: 3px;
  }

  .ball-chip {
    width: 18px;
    height: 18px;
    font-size: 0.58rem;
  }

  .table-frame {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
  }

  canvas {
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 142px);
    margin-inline: auto;
  }

  .power-indicator {
    margin-top: 5px;
    font-size: 0.75rem;
  }

  .instructions {
    display: none;
  }
}
