[hidden] {
  display: none !important;
}
#table-room.lobby-room {
  width: min(94%, 1100px);
  margin: 18px auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
  align-items: start;
  gap: 20px;
}
.online-app:not(.playing) #table-room.lobby-room #game {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.seat-readiness {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}
[data-ready-status='ready'] {
  color: #bcefc6;
}
[data-ready-status='not-ready'] {
  color: #ffd3a8;
}
.lobby-ready {
  padding: 14px;
  margin: 18px 0;
  border: 1px solid #dfc79655;
  border-radius: 12px;
  background: #102e24;
}
.lobby-ready h2 {
  font-size: 20px;
  margin: 0;
}
.lobby-ready button {
  min-height: 44px;
  background: #214d3e;
  border: 1px solid #dfc79666;
  border-radius: 7px;
  padding: 10px 12px;
}
.lobby-ready .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lobby-ready [aria-pressed='true'] {
  background: var(--gold);
  color: #143a2d;
}
@media (max-width: 800px) {
  #table-room.lobby-room {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .lobby-room .room-head [data-stakes],
  .lobby-room .room-head [data-profiles] {
    display: none;
  }
}
#entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  color: var(--muted);
}
#entry-header > a:first-child {
  font-family: Georgia, serif;
  font-size: 22px;
  text-decoration: none;
}
#lobby,
#account-panel,
.online-app:not(.playing) #game {
  width: min(94%, 600px);
  margin: 18px auto;
}
#lobby p,
#account-panel p,
.online-app:not(.playing) #game p {
  line-height: 1.6;
  margin: 12px 0;
}
#lobby h1,
.session-summary h1 {
  font-size: 32px;
  margin: 10px 0;
}
#lobby button,
#account-panel button,
.room-head button,
.table-inspection button,
.session-summary button,
.roster ~ .actions button {
  background: #214d3e;
  border: 1px solid #dfc79644;
  border-radius: 7px;
  padding: 10px 14px;
  margin: 3px;
}
#lobby .primary,
#account-panel #google-sign-in,
.session-summary .primary,
.roster ~ .actions .primary {
  background: var(--gold);
  color: #143a2d;
  font-weight: 650;
}
#lobby label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
  font-size: 14px;
}
#lobby .check {
  flex-direction: row;
  align-items: center;
}
#lobby input:not([type='checkbox']),
#lobby select,
.table-inspection input,
.table-inspection textarea,
.table-inspection select {
  background: #102e24;
  color: #eee6d3;
  border: 1px solid #71876d;
  border-radius: 6px;
  padding: 10px;
  width: 100%;
  min-width: 0;
}
#lobby .check input {
  width: 18px;
  height: 18px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.stake-preview summary,
.local-seats summary {
  cursor: pointer;
  padding-block: 10px;
}
.stake-preview p {
  font-size: 13px;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #182f26;
  border: 1px solid #e6cc8b;
  border-radius: 8px;
  padding: 12px 18px;
  max-width: 92%;
  z-index: 100;
}
#entry-footer {
  padding: 20px;
  text-align: center;
  font-size: 12px;
}
body.playing > #entry-header,
body.playing > #entry-footer {
  display: none;
}
.room-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}
.roster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.roster .seat {
  position: static;
  border: 1px solid #dfc79633;
  padding: 12px;
  border-radius: 8px;
}
.roster h3 {
  margin: 10px 0;
}
.seat-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.session-summary {
  background: #193c30;
  padding: 25px;
  border: 1px solid #dfc79644;
  border-radius: 16px;
}
.session-summary button {
  display: block;
  width: 100%;
  margin: 12px 0;
}
.table-inspection {
  width: min(640px, 94vw);
  max-height: 88dvh;
  overflow: auto;
  background: #14372c;
  color: #eee6d3;
  border: 1px solid #c4b28566;
  border-radius: 14px;
  padding: 22px;
}
.table-inspection::backdrop {
  background: #001a11bb;
}
.table-inspection h2 {
  font-size: 24px;
  margin: 0 0 15px;
}
.table-inspection h3 {
  margin: 18px 0 8px;
}
.table-inspection p {
  line-height: 1.6;
  margin: 10px 0;
}
.inspection-tiles,
.winning-hand,
.inspection-tiles .tiles,
.winning-hand .tiles {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 18px 0;
}
.inspection-tiles .tile {
  --tile-w: 47px;
  --tile-h: 66px;
}
.inspection-close {
  display: block;
  margin: 18px auto 0 !important;
}
.result-scores {
  display: grid;
  gap: 8px;
}
.player-profile-link {
  padding: 0;
  min-height: 30px;
  background: none;
  text-align: left;
  color: inherit;
}
.player-profile-link:hover {
  text-decoration: underline;
}
.online-app .table-actions > .ghost {
  border: 0;
  background: transparent;
  padding: 4px 7px;
  min-height: 30px;
  font-size: 13px;
  color: #b8c8bb;
}
.online-app .landscape-controls > .ghost {
  padding: 5px 8px;
}
.online-app .nav {
  gap: 5px;
}
.online-app .nav button {
  padding: 8px 10px;
}
#countdown {
  white-space: nowrap;
  color: var(--gold);
}
.online-app .table-inspection .arrange-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.online-app .table-inspection .arrange-tiles .tile {
  --tile-w: 35px;
  --tile-h: 49px;
}
.online-app .arrange-options {
  display: flex;
  flex-wrap: wrap;
}
.online-app .arrange-move {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
@media (max-width: 800px) {
  #entry-header {
    padding: 14px 12px;
    font-size: 12px;
  }
  #entry-header > a:first-child {
    font-size: 18px;
  }
  .online-app .topbar {
    gap: 6px;
  }
  .online-app .mobile-header-actions .ghost {
    padding: 5px 8px;
  }
  .online-app .table-inspection {
    padding: 16px;
  }
  .online-app .table-actions {
    gap: 3px;
  }
}

/* Home choices keep practice visible without requiring an account. */
.play-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
#lobby .play-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  text-align: left;
  margin: 0;
  padding: 16px;
  min-height: 88px;
  border: 1px solid #dfc79666;
  border-radius: 10px;
  text-decoration: none;
  white-space: normal;
}
.play-choice strong {
  font-size: 18px;
}
.play-choice span {
  font-size: 13px;
  line-height: 1.45;
}
#lobby .practice-choice {
  grid-column: 1/-1;
  background: var(--gold);
  color: #143a2d;
  min-height: 94px;
}
.practice-choice strong {
  font-size: 23px;
}
.online-solo-option {
  padding-top: 14px;
  border-top: 1px solid #dfc79633;
}
.online-solo-option > span {
  display: block;
  font-size: 13px;
  margin: 6px 3px;
}
.public-room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #dfc79633;
}
.public-room h3 {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.public-room > div {
  min-width: 0;
}
.public-room > button {
  flex-shrink: 0;
}
#lobby .public-room p {
  margin: 5px 0;
  font-size: 13px;
}
.public-host {
  margin-top: 22px;
  border-top: 1px solid #dfc79655;
  padding-top: 18px;
}
.public-host h2 {
  font-size: 23px;
}
@media (max-width: 380px) {
  #lobby .play-choice {
    padding: 12px;
  }
  .play-choice strong {
    font-size: 17px;
  }
  .play-choice span {
    font-size: 12px;
  }
  .public-room {
    gap: 6px;
  }
  #lobby .public-room > button {
    padding: 10px;
  }
}

.coaching-option {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 18px 0;
}
#lobby .coaching-option p {
  margin: 0;
  font-size: 13px;
}

/* Account-first entry: choose a way to play before seeing table settings. */
.online-app:not(.playing) #online-root {
  width: 100%;
}
#lobby,
#account-panel {
  width: min(720px, calc(100% - 32px));
}
#account-panel:not(.signed-in) {
  margin: 48px auto 32px;
  padding: 42px;
  text-align: center;
  background: #173f32;
}
#welcome-copy h1 {
  font-size: clamp(34px, 6vw, 48px);
  margin: 14px 0;
}
#welcome-copy > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 380px;
  margin: 18px auto;
}
#account-panel #google-sign-in {
  min-width: 245px;
  padding: 14px 22px;
  margin: 12px 0;
}
#account-panel #signup-explanation {
  font-size: 13px;
  margin: 10px 0 22px;
}
#account-panel.signed-in {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 15px 20px;
  margin: 18px auto;
  background: transparent;
  border-color: #d6c99f25;
  font-size: 13px;
}
#account-panel.signed-in #account-status {
  margin: 0;
  flex: 1 1 250px;
}
#account-panel.signed-in #account-message {
  flex-basis: 100%;
}
#account-actions {
  font-size: 12px;
}
#account-actions summary {
  cursor: pointer;
  padding-block: 8px;
}
#account-actions > a {
  display: block;
  margin: 8px 3px;
}
#lobby {
  padding: 30px;
}
#lobby h1 {
  font-size: clamp(27px, 4vw, 34px);
  margin-top: 12px;
}
#lobby .entry-intro {
  color: var(--muted);
  margin: 8px 0 23px;
  font-size: 15px;
}
.play-choices {
  grid-template-columns: 1fr;
  gap: 12px;
}
#lobby .play-choice {
  padding: 20px 22px;
  min-height: 98px;
  width: 100%;
  background: #214b3b;
}
#lobby .practice-choice {
  min-height: 110px;
  background: var(--gold);
}
.play-choice strong,
.practice-choice strong {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  font-size: 22px;
}
.play-choice strong > span {
  font-size: 24px;
  font-weight: 400;
}
.play-choice > span {
  font-size: 14px;
}
#lobby .entry-footnote {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
}
#lobby .back-link {
  background: transparent;
  border: 0;
  padding-left: 0;
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
}
.entry-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #173d2d;
  padding: 13px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 650;
  margin: 10px 0 24px;
}
.online-solo-option,
.entry-help {
  font-size: 13px;
  margin-top: 18px;
}
.online-solo-option summary,
.entry-help summary,
.public-host summary {
  cursor: pointer;
  padding: 12px 0;
}
.entry-help {
  color: var(--muted);
  border-top: 1px solid #dfc79633;
}
.public-host > summary {
  font-size: 18px;
  font-weight: 600;
}
#resume:not([hidden]) {
  margin-top: 22px;
}
@media (max-width: 520px) {
  #entry-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 16px;
  }
  #entry-header > span {
    display: none;
  }
  #entry-header > a:first-child {
    font-size: 19px;
  }
  #account-panel:not(.signed-in) {
    padding: 28px 20px;
    margin-top: 28px;
  }
  #account-panel.signed-in {
    padding: 12px 16px;
    gap: 5px 14px;
  }
  #lobby {
    padding: 24px 18px;
  }
  #lobby .play-choice {
    padding: 18px;
  }
  .play-choice strong,
  .practice-choice strong {
    font-size: 20px;
  }
  .play-choice > span {
    font-size: 13px;
  }
}

#entry-header nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
#entry-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.room-identity {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.room-identity small {
  color: var(--muted);
}
@media (max-width: 559px) {
  #entry-header {
    padding: 12px 4%;
    flex-wrap: wrap;
    gap: 2px 12px;
  }
  #entry-header > a:first-child {
    font-size: 19px;
  }
}

/* The signed-in account card belongs to the home screen; keep the whole table in view. */
.online-app.playing #account-panel {
  display: none;
}
