/* Theme tokens and base elements. Components precede responsive overrides. */
.app-header { display: none; }
:root {
  color-scheme:dark;
  --bg:#101816;
  --panel:#17211e;
  --line:#ffffff12;
  --text:#e9eae0;
  --muted:#83948c;
  --gold:#d8bd83;
  --green:#244d3e;
  --serif:Georgia,'Times New Roman',serif;
  --sans:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:14px var(--sans);
  -webkit-font-smoothing:antialiased
}
button,a {
  -webkit-tap-highlight-color:transparent
}
button {
  font:inherit;
  cursor:pointer
}
button:disabled {
  cursor:default
}
button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible {
  outline:2px solid var(--gold);
  outline-offset:5px
}
button {
  color:inherit
}
a {
  color:inherit;
  text-decoration:none
}
button svg {
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round
}
/* Home uses its own layout, with the table hidden until play begins. */
body.home-open > :is(.app-header, .site-header, main),
.home-screen[hidden],
.home-secondary > [hidden] {
  display: none;
}
.home-screen {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  width: min(100%, 30rem);
  min-height: 100dvh;
  margin-inline: auto;
  background: #101a18;
}
.home-art {
  position: relative;
  aspect-ratio: 1.57;
  overflow: hidden;
}
.home-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #101a18, transparent 36%);
  content: "";
}
.home-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 clamp(1rem, 7vw, 2.25rem) 1rem;
  text-align: center;
}
.home-content h1 {
  margin: 0;
  color: #f3e8d3;
  font: clamp(2.25rem, 9vw, 3.4rem)/1 var(--serif);
  letter-spacing: -.045em;
}
.home-content h1 span {
  display: block;
  color: var(--gold);
  font-size: .8em;
}
#home-description {
  margin: .75rem 0 1.25rem;
  color: #c7c1b2;
  font-size: .9rem;
}
.home-actions {
  display: grid;
  gap: .5rem;
}
.home-secondary {
  display: flex;
  gap: .5rem;
}
.home-secondary > button {
  flex: 1;
}
.home-actions .button {
  min-height: 44px;
  height: auto;
  padding: .55em .7em;
  font-size: .9rem;
}
.home-skip {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin: clamp(1.25rem, 5vh, 3.5rem) 0 0;
  padding-top: .75rem;
  color: #c7c1b2;
  text-align: left;
  font-size: .85rem;
  cursor: pointer;
}
.home-skip input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex: none;
  accent-color: var(--gold);
}
.home-skip input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
@media (orientation: landscape) {
  .home-screen {
    grid-template: auto / 1fr 1fr;
    width: min(100%, 58rem);
  }
  .home-art {
    align-self: center;
    aspect-ratio: 1.3;
  }
  .home-art img {
    position: absolute;
    object-position: 80% center;
  }
  .home-art::after {
    background: linear-gradient(to left, #101a18, transparent 22%);
  }
  .home-content {
    justify-content: center;
    padding: 1rem clamp(.75rem, 4vw, 2.25rem);
  }
  .home-content h1 {
    font-size: clamp(1.8rem, 5vw, 3.4rem);
  }
  .home-skip {
    margin-top: .35rem;
  }
}
/* Site header, brand, and navigation. */
.site-header {
  height:100px;
  max-width:1500px;
  margin:auto;
  padding:0 54px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center
}
.brand {
  display:flex;
  align-items:center;
  gap:13px;
  font-family:var(--serif);
  letter-spacing:2.2px;
  font-size:19px
}
.brand-mark {
  font-size:43px;
  line-height:1;
  color:var(--gold)
}
.brand small {
  display:block;
  font:8px var(--sans);
  letter-spacing:2.1px;
  color:var(--muted);
  margin-top:8px
}
nav {
  display:flex;
  align-items:center;
  gap:25px
}
.open-sign {
  font-size:9px;
  letter-spacing:1.25px;
  color:#a0afa5;
  margin-right:18px;
  display:flex;
  gap:9px;
  align-items:center
}
.open-sign i,.live-dot {
  display:inline-block;
  background:#78a68a;
  border-radius:50%;
  width:5px;
  height:5px;
  box-shadow:0 0 8px #78a68a33
}
.icon-button {
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border:0;
  background:transparent;
  color:#aab6ae;
  border-radius:50%;
  font-size:17px
}
.icon-button:hover {
  background:#ffffff09;
  color:var(--gold)
}
.text-button {
  background:none;
  border:0;
  font-size:12px;
  color:#c1c9c1;
  display:flex;
  align-items:center;
  gap:9px
}
.nav-icon {
  border:1px solid #84928a;
  border-radius:50%;
  width:17px;
  height:17px;
  font-size:11px;
  display:grid;
  place-items:center
}
/* Page introduction and shared button variants. */
main {
  max-width:1500px;
  padding:0 54px;
  margin:auto
}
.page-intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:37px 0 30px
}
.eyebrow {
  font-size:9px;
  letter-spacing:2px;
  color:var(--gold);
  font-weight:600;
  margin:0 0 13px
}
h1 {
  font:normal clamp(28px,2.8vw,39px)/1.15 var(--serif);
  letter-spacing:-.8px;
  margin:0 0 10px
}
.intro-copy {
  color:var(--muted);
  font-size:12px;
  margin:0
}
.button {
  border-radius:7px;
  display:inline-flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  height:41px;
  padding:0 18px;
  border:1px solid transparent;
  font-size:12px;
  font-weight:600;
  transition:background .18s,transform .18s,border-color .18s;
  white-space:nowrap
}
.button:not(:disabled):active {
  transform:translateY(1px)
}
.button-outline {
  border-color:#ffffff20;
  background:transparent;
  color:#cad1c9
}
.button-outline:not(:disabled):hover {
  border-color:#d8bd8370;
  background:#d8bd8308
}
.button-gold {
  background:var(--gold);
  color:#1b281f;
  border-color:var(--gold);
  box-shadow:0 3px 12px #0002
}
.button-gold:not(:disabled):hover {
  background:#edcf91;
  box-shadow:0 4px 20px #d8bd8318
}
.button-gold:disabled {
  background:#766d51;
  color:#b1b09a;
  border-color:transparent;
  box-shadow:none
}
.button-outline:disabled {
  opacity:.3
}
.button-subtle {
  background:transparent;
  color:#9daa9f;
  padding:0 10px
}
.button-subtle:not(:disabled):hover {
  color:var(--gold);
  background:#ffffff05
}
.button-subtle:disabled {
  opacity:.35
}
/* Desktop table/sidebar grid and decorative felt surface. */
.club-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 256px;
  gap:23px
}
.game-area {
  min-width:0
}
.table-heading {
  height:46px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 22px;
  background:#1b2721;
  border:1px solid #ffffff09;
  border-radius:12px 12px 0 0;
  font-size:10px;
  color:#879d8e
}
.table-heading>div {
  display:flex;
  align-items:center;
  gap:11px
}
.table-heading strong {
  font-size:9px;
  letter-spacing:1.5px;
  font-weight:600;
  color:#b4c3b2
}
.table-heading>span {
  font-size:9px;
  letter-spacing:1.3px
}
.table-divider {
  opacity:.35
}
.table-dot {
  height:5px;
  width:5px;
  border-radius:50%;
  background:#91b090
}
.table-stage {
  height:568px;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:radial-gradient(ellipse at 50% 38%,#204336 0%,#182f26 47%,#17271f 85%);
  border-left:1px solid #ffffff0b;
  border-right:1px solid #ffffff0b
}
.table-stage:after {
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  opacity:.17;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23ffffff' filter='url(%23n)' opacity='.22' d='M0 0h160v160H0z'/%3E%3C/svg%3E")
}
.felt {
  position:absolute;
  inset:72px 46px 90px;
  border:1px solid #9eb48420;
  border-radius:44%;
  z-index:-1
}
.felt-inner {
  position:absolute;
  inset:7px;
  border:1px solid #9eb4840f;
  border-radius:44%
}
.felt-watermark {
  position:absolute;
  top:40%;
  left:50%;
  transform:translate(-50%,-50%);
  text-align:center;
  color:#b0c2a90b;
  pointer-events:none
}
.felt-watermark>span {
  font:italic 78px var(--serif);
  letter-spacing:-12px
}
.felt-watermark small {
  display:block;
  font-size:7px;
  letter-spacing:3px;
  white-space:nowrap;
  margin-top:5px
}
/* Opponent identities, hidden-card stacks, and active/pass status. */
.seat {
  position:absolute;
  z-index:2;
  display:flex;
  align-items:center;
  flex-direction:column;
  width:130px;
  gap:12px
}
.seat-top {
  top:22px;
  left:50%;
  transform:translateX(-50%);
  width:215px;
  gap:13px
}
.seat-left {
  left:16px;
  top:173px
}
.seat-right {
  right:16px;
  top:173px
}
.player-identity {
  display:flex;
  align-items:center;
  gap:9px
}
.avatar {
  position:relative;
  width:39px;
  height:39px;
  flex:none;
  border-radius:50%;
  display:grid;
  place-items:center;
  font:20px var(--serif);
  color:var(--avatar-color);
  background:var(--avatar-bg);
  box-shadow:0 0 0 3px #14281f;
  transition:box-shadow .3s
}
.seat.active .avatar {
  box-shadow:0 0 0 3px #14281f,0 0 0 4px var(--gold),0 0 22px #d8bd8315
}
.avatar:after {
  content:'';
  position:absolute;
  bottom:1px;
  right:0;
  width:7px;
  height:7px;
  border:2px solid #1c3127;
  border-radius:50%;
  background:#86af8e
}
.player-name {
  font-size:12px;
  font-weight:600;
  display:block
}
.player-caption {
  font-size:9px;
  color:#91a392;
  display:block;
  margin-top:3px
}
.player-count {
  font-size:9px;
  background:#ffffff08;
  border-radius:4px;
  padding:4px 6px;
  color:#b6c6b4
}
.opponent-cards {
  position:relative;
  height:51px;
  width:100px
}
.seat-top .opponent-cards {
  height:45px;
  width:162px
}
.mini-back {
  position:absolute;
  width:32px;
  height:46px;
  border:1px solid #a69c65;
  border-radius:4px;
  background:repeating-linear-gradient(45deg,#425b46 0 2px,#344a37 2px 4px);
  box-shadow:2px 1px 4px #0003;
  transform:rotate(var(--rotation,0deg));
  left:var(--left);
  top:var(--top,0px)
}
.mini-back:after {
  content:'✧';
  position:absolute;
  inset:3px;
  border:1px solid #b9b17755;
  display:grid;
  place-items:center;
  color:#c6bc80;
  font-size:20px;
  border-radius:2px
}
.seat-top .mini-back {
  width:30px;
  height:42px
}
.seat-status {
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:1.4px;
  color:#aac0a4;
  min-height:12px
}
.seat.active .seat-status {
  color:var(--gold)
}
.seat.passed .seat-status {
  color:#a6b19b80
}
/* Current trick and turn announcement at the center of the table. */
.center-play {
  position:absolute;
  top:175px;
  left:50%;
  transform:translateX(-50%);
  width:56%;
  height:145px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center
}
.center-eyebrow {
  font-size:8px;
  letter-spacing:2.6px;
  color:#9bb09799;
  margin:0 0 17px
}
.trick-cards {
  display:flex;
  justify-content:center;
  gap:6px;
  min-height:95px;
  align-items:center
}
.trick-cards:empty {
  min-height:70px
}
.trick-cards:empty:after {
  content:'♠';
  font:70px var(--serif);
  color:#8bab7730
}
.trick-cards .playing-card {
  width:62px;
  height:88px;
  cursor:default;
  flex:none;
  box-shadow:1px 5px 12px #0003;
  animation:play-in .35s ease-out;
  transform:rotate(var(--rotate,0deg))
}
.trick-cards .card-corner {
  font-size:17px
}
.trick-cards .card-corner .suit {
  font-size:14px
}
.trick-cards .card-pip {
  font-size:35px
}
.trick-cards .card-bottom {
  font-size:12px;
  bottom:5px;
  right:5px
}
.trick-cards .card-bottom .suit {
  font-size:10px
}
#trick-label {
  font-size:10px;
  letter-spacing:.2px;
  color:#b3c4a9;
  margin:15px 0 0;
  min-height:13px
}
.table-message {
  position:absolute;
  top:343px;
  left:50%;
  transform:translateX(-50%);
  white-space:nowrap;
  font-size:11px;
  color:#c4ceba;
  display:flex;
  align-items:center;
  gap:8px
}
.table-message .message-pulse {
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--gold);
  box-shadow:0 0 0 4px #d8bd830a
}
/* Human seat and hand. app.js supplies each card’s fan index, angle, and arc. */
.you-marker {
  position:absolute;
  top:392px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:9px;
  align-items:center;
  white-space:nowrap
}
.you-avatar {
  width:31px;
  height:31px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font:16px var(--serif);
  color:var(--gold);
  background:#354438;
  border:1px solid #d8bd8333
}
.you-marker strong {
  font-size:11px;
  font-weight:500;
  display:block
}
.you-marker small {
  font-size:8px;
  color:#9aae99;
  display:block;
  margin-top:3px
}
.your-turn-pill {
  font-size:7px;
  letter-spacing:1px;
  border:1px solid #d8bd8340;
  background:#d8bd8310;
  color:var(--gold);
  border-radius:20px;
  padding:5px 8px;
  margin-left:5px
}
.your-turn-pill.waiting {
  color:#9db397;
  border-color:#ffffff10;
  background:#ffffff05
}
.hand-area {
  position:absolute;
  bottom:-18px;
  left:0;
  right:0;
  height:145px;
  padding:0 24px;
  display:flex;
  justify-content:center;
  align-items:flex-start
}
/* --spread is the distance between card starts, separate from --card-width.
   app.js can reduce it further to fit cards inside the available width. */
.hand {
  --spread:45px;
  --card-width:74px;
  position:relative;
  height:145px;
  width:calc(var(--spread) * (var(--count) - 1) + var(--card-width));
  flex-shrink:0;
  max-width:100%
}
.playing-card {
  position:relative;
  display:block;
  width:var(--card-width,74px);
  height:108px;
  background:#f4f1e6;
  border:1px solid #ddd7c6;
  border-radius:7px;
  color:#243d33;
  padding:0;
  font-family:var(--serif);
  text-align:left;
  user-select:none
}
.playing-card.red {
  color:#b6433a
}
.hand .playing-card {
  position:absolute;
  left:calc(var(--index) * var(--spread));
  top:calc(var(--arc) * 1px);
  transform:rotate(calc(var(--angle) * 1deg));
  transform-origin:50% 160%;
  box-shadow:-2px 1px 5px #0003;
  transition:transform .23s,top .23s,box-shadow .23s,border .15s;
  background:linear-gradient(115deg,#fffdf4,#eae8dc)
}
.hand .playing-card:hover {
  top:calc(var(--arc) * 1px - 13px);
  z-index:20!important;
  box-shadow:0 5px 20px #0005
}
.hand .playing-card.selected {
  top:calc(var(--arc) * 1px - 24px);
  border-color:var(--gold);
  box-shadow:0 0 0 2px var(--gold),0 6px 17px #0005;
  background:#fff9e8
}
.playing-card.selected:after {
  content:'✓';
  position:absolute;
  top:-9px;
  right:-5px;
  border-radius:50%;
  background:var(--gold);
  color:#1d3829;
  width:16px;
  height:16px;
  font:10px var(--sans);
  display:grid;
  place-items:center;
  border:2px solid #1d3829
}
.card-corner {
  position:absolute;
  top:6px;
  left:7px;
  display:flex;
  flex-direction:column;
  align-items:center;
  font-size:21px;
  line-height:1;
  font-weight:600
}
.card-corner .suit {
  font-size:18px;
  margin-top:2px
}
.card-pip {
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  font-size:45px;
  line-height:1
}
.card-bottom {
  top:auto;
  left:auto;
  bottom:7px;
  right:7px;
  transform:rotate(180deg);
  font-size:17px
}
.card-bottom .suit {
  font-size:14px
}
/* Selection feedback and play/pass/hint controls below the table. */
.action-bar {
  height:83px;
  border-radius:0 0 12px 12px;
  background:#1a2720;
  border:1px solid #ffffff09;
  border-top:1px solid #a0b2961a;
  padding:0 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:relative;
  z-index:5
}
.selection-info {
  display:flex;
  gap:11px;
  align-items:center;
  min-width:0
}
.selection-info strong {
  display:block;
  font-size:12px;
  font-weight:500;
  margin-bottom:5px
}
.selection-info>div>span {
  font-size:10px;
  color:#93a38f;
  display:block;
  max-width:240px
}
.selection-dot {
  width:6px;
  height:6px;
  background:var(--gold);
  border-radius:50%;
  flex:none;
  box-shadow:0 0 0 5px #d8bd8308
}
.selection-dot.invalid {
  background:#a6a58d
}
.actions {
  display:flex;
  gap:7px;
  align-items:center;
  margin-left:10px
}
.action-divider {
  height:21px;
  width:1px;
  background:var(--line);
  margin:0 4px
}
.hint-symbol {
  font-size:20px;
  font-weight:400
}
.below-table {
  display:flex;
  justify-content:space-between;
  font-size:8px;
  letter-spacing:1px;
  color:#667e6d;
  padding:17px 3px;
  gap:10px
}
.below-table>span:first-child {
  display:flex;
  align-items:center;
  gap:7px
}
.keyboard-tip {
  letter-spacing:.1px;
  color:#7f9183;
  font-size:9px;
  display:flex;
  gap:6px;
  align-items:center
}
.keyboard-tip kbd {
  font:8px var(--sans);
  border:1px solid #ffffff12;
  padding:2px 4px;
  border-radius:3px;
  color:#a5b09e
}
.keyboard-tip kbd:not(:first-child) {
  margin-left:7px
}
/* Session statistics, standings, recent activity, and house tip. */
.club-sidebar {
  display:flex;
  flex-direction:column;
  gap:17px
}
.session-card,.standings-card,.activity-card {
  border:1px solid var(--line);
  border-radius:10px;
  padding:19px 20px;
  background:#17211c
}
.section-label {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:8px;
  letter-spacing:1.65px;
  font-weight:500;
  color:#95a58f
}
.tiny-suit {
  font-size:21px;
  color:var(--gold);
  line-height:15px
}
.session-card h2 {
  font:normal 23px var(--serif);
  margin:20px 0 9px;
  letter-spacing:-.4px
}
.session-card>p {
  color:#899c86;
  font-size:10px;
  line-height:1.8;
  margin:0
}
.session-stats {
  display:flex;
  justify-content:space-between;
  padding:23px 0 20px
}
.session-stats>div {
  display:flex;
  flex-direction:column;
  gap:7px
}
.session-stats strong {
  font:24px var(--serif);
  color:#dedecd
}
.session-stats span {
  font-size:7px;
  letter-spacing:1.3px;
  color:#7e917b
}
.difficulty-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-top:1px solid var(--line);
  padding-top:14px;
  font-size:9px
}
.difficulty-row>span {
  display:flex;
  align-items:center;
  gap:7px;
  color:#acb79f
}
.difficulty-row i {
  width:5px;
  height:5px;
  background:#8aa276;
  transform:rotate(45deg)
}
.difficulty-row button {
  background:transparent;
  border:0;
  color:#879b7d;
  font-size:9px;
  padding:3px
}
.difficulty-row button:hover {
  color:var(--gold)
}
.standings-card .section-label {
  margin-bottom:16px
}
.standing {
  display:flex;
  align-items:center;
  padding:9px 0;
  gap:9px
}
.standing .avatar {
  width:29px;
  height:29px;
  font-size:15px;
  box-shadow:none
}
.standing .avatar:after {
  display:none
}
.standing-name {
  font-size:11px;
  flex:1
}
.standing-name small {
  font-size:8px;
  color:#899a81;
  margin-left:5px
}
.standing-score {
  font-size:11px;
  font-variant-numeric:tabular-nums;
  color:#9cac91
}
.standing-score.positive {
  color:var(--gold)
}
.standing.you {
  background:#d8bd8307;
  margin:3px -9px 0;
  padding:10px 9px;
  border:1px solid #d8bd8312;
  border-radius:6px
}
.standing.you .standing-name {
  color:var(--gold)
}
.score-footnote {
  font-size:8px;
  color:#6e8368;
  margin:12px 0 0;
  line-height:1.5
}
.activity-card {
  padding-bottom:12px;
  min-height:154px
}
.activity-mark {
  font-size:15px
}
.activity-card ol {
  list-style:none;
  padding:0;
  margin:13px 0 0;
  display:flex;
  flex-direction:column;
  gap:11px
}
.activity-card li {
  font-size:9px;
  display:flex;
  align-items:baseline;
  gap:8px;
  line-height:1.5;
  color:#98a88e;
  animation:fade-in .3s
}
.activity-card li:before {
  content:'';
  width:3px;
  height:3px;
  flex:none;
  background:#687b60;
  border-radius:50%;
  align-self:flex-start;
  margin-top:5px
}
.activity-card li:first-child {
  color:#c7cbb4
}
.activity-card li:first-child:before {
  background:var(--gold)
}
.activity-card li strong {
  font-weight:500
}
.log-time {
  font-size:8px;
  color:#61755b;
  margin-left:auto;
  white-space:nowrap
}
/* Page footer and transient notifications. */
footer {
  margin-top:12px;
  border-top:1px solid var(--line);
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  column-gap:12px;
  min-height:72px;
  font-size:9px;
  color:#6f836b
}
footer .footer-brand {
  font-family:var(--serif);
  letter-spacing:1.6px;
  font-size:10px;
  color:#95a58b
}
.footer-tagline {
  text-align: center;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
#web-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#web-links::before {
  content: "";
  height: 1em;
  border-left: 1px solid #6f836b;
}
#privacy,
#web-links a {
  color: #c5cbb4;
  font-size: 12px;
}
#privacy {
  background: transparent;
  border: 0;
  padding: 8px 0;
}
#privacy:hover,
#web-links a:hover {
  text-decoration: underline;
}
.settings-actions button[hidden] {
  display: none;
}
.toast {
  position:fixed;
  bottom:26px;
  left:50%;
  transform:translate(-50%,20px);
  padding:13px 23px;
  background:#e3d1a2;
  color:#243b2b;
  border-radius:8px;
  box-shadow:0 8px 45px #0005;
  z-index:100;
  font-size:12px;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s,transform .2s;
  text-align:center;
  max-width:90vw;
  width:max-content
}
.toast.visible {
  opacity:1;
  transform:translate(-50%,0)
}
/* Shared dialog shell and rules, settings, and result content. */
dialog {
  background:#18271f;
  color:var(--text);
  border:1px solid #a0b38a30;
  border-radius:17px;
  max-width:560px;
  width:calc(100% - 36px);
  padding:27px 32px;
  box-shadow:0 24px 150px #0009;
  max-height:88vh;
  overscroll-behavior:contain
}
dialog::backdrop {
  background:#06110cd9;
  backdrop-filter:blur(7px)
}
.modal-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:15px
}
.modal-top .eyebrow {
  margin:0;
  font-size:8px
}
.modal-top .icon-button {
  width:27px;
  height:27px;
  font-size:14px
}
dialog h2 {
  font:normal 34px var(--serif);
  letter-spacing:-.5px;
  margin:0 0 12px
}
dialog h3 {
  font-size:12px;
  font-weight:500;
  color:var(--gold);
  margin:25px 0 9px
}
dialog p {
  color:#a9b7a1;
  font-size:12px;
  line-height:1.9;
  margin:8px 0
}
dialog .button {
  margin-top:20px
}
.rules-lede {
  font-size:13px!important
}
.rank-line {
  padding:15px 13px;
  background:#ffffff04;
  border:1px solid var(--line);
  border-radius:7px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font:16px var(--serif);
  color:#d3d9c5;
  gap:4px;
  margin-top:12px
}
.rank-line span:last-child {
  color:var(--gold)
}
.suit-line {
  text-align:center!important;
  font-size:16px!important;
  letter-spacing:7px
}
.red-text {
  color:#cc776b
}
.rules-list {
  padding-left:18px;
  font-size:12px;
  color:#a9b7a1;
  line-height:1.9
}
.rules-list li {
  padding-left:4px;
  margin:7px 0
}
.rules-note {
  border-left:2px solid #d8bd8370;
  padding-left:12px;
  margin:17px 0!important;
  font-size:11px!important
}
.combo-list {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:14px 0
}
.combo-list span {
  padding:11px 10px;
  background:#ffffff04;
  border:1px solid var(--line);
  border-radius:6px;
  font-size:10px;
  color:#afbba5
}
.combo-list b {
  display:inline-block;
  color:var(--gold);
  font-weight:500;
  width:16px
}
.settings-options {
  display:flex;
  gap:8px;
  margin:18px 0 12px
}
.level-option {
  flex:1;
  background:#ffffff03;
  border:1px solid var(--line);
  border-radius:8px;
  padding:16px 8px;
  text-align:center;
  font-size:11px;
  color:#a6b49b
}
.level-option.selected {
  background:#d8bd830d;
  border-color:#d8bd8380;
  color:var(--gold)
}
.level-option small {
  display:block;
  margin-top:8px;
  font-size:8px;
  color:#899b7e
}
.setting-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--line);
  padding:17px 0
}
.setting-row label {
  font-size:12px
}
.setting-row small {
  display:block;
  color:#84977b;
  font-size:10px;
  margin-top:5px
}
.setting-row select {
  background:#20352a;
  border:1px solid #ffffff20;
  border-radius:5px;
  padding:8px;
  color:#c6d2b9;
  font:11px var(--sans)
}
.setting-toggle {
  border:1px solid #ffffff20;
  border-radius:6px;
  padding:8px 14px;
  background:#20352a;
  color:var(--gold);
  font-size:11px
}
.result-emblem {
  font-size:56px;
  color:var(--gold);
  text-align:center;
  line-height:1.3;
  margin-bottom:13px
}
.result-heading,.result-subtitle {
  text-align:center
}
.result-breakdown {
  margin:23px 0 8px;
  border-top:1px solid var(--line)
}
.result-row {
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 0;
  border-bottom:1px solid var(--line);
  font-size:12px
}
.result-row .avatar {
  width:30px;
  height:30px;
  font-size:16px;
  box-shadow:none
}
.result-row .avatar:after {
  display:none
}
.result-row>span:nth-last-child(2) {
  margin-left:auto;
  color:#92a487;
  font-size:10px
}
.result-row>strong {
  color:var(--gold);
  min-width:35px;
  text-align:right;
  font-weight:500
}
.result-actions {
  display:flex;
  gap:10px;
  justify-content:center
}
.modal-confirm-actions {
  display:flex;
  gap:10px
}
/* Optional celebration and entry animations. Motion settings override these. */
.confetti {
  position:absolute;
  z-index:10;
  width:7px;
  height:12px;
  background:var(--gold);
  top:-20px;
  left:var(--x);
  animation:confetti-fall var(--duration) ease-in var(--delay) forwards;
  pointer-events:none;
  border-radius:1px
}
.no-motion * {
  animation:none!important;
  transition:none!important
}
@keyframes fade-in {
  from {
    opacity:0;
    transform:translateY(3px)
  }
  to {
    opacity:1;
    transform:translateY(0)
  }
}
@keyframes play-in {
  from {
    opacity:0;
    translate:0 12px
  }
  to {
    opacity:1;
    translate:0 0
  }
}
@keyframes confetti-fall {
  to {
    top:110%;
    transform:rotate(650deg) translateX(70px);
    opacity:.2
  }
}
/* Large desktops: expand the table and card fan. */
@media(min-width:1450px) {
  .table-stage {
    height:610px
  }
  .seat-top {
    top:30px
  }
  .center-play {
    top:198px
  }
  .seat-left,.seat-right {
    top:192px
  }
  .table-message {
    top:374px
  }
  .you-marker {
    top:424px
  }
  .hand-area {
    bottom:-13px
  }
  .hand {
    --spread:49px;
    --card-width:78px
  }
  .playing-card {
    height:115px
  }
  .club-sidebar {
    gap:20px
  }
  .session-card,.standings-card,.activity-card {
    padding:22px
  }
  .activity-card {
    min-height:170px
  }
}
/* Smaller desktops: tighten gutters, sidebar, and hand spacing. */
@media(max-width:1180px) {
  main {
    padding:0 30px
  }
  .site-header {
    padding:0 30px
  }
  .club-layout {
    grid-template-columns:minmax(0,1fr) 225px;
    gap:17px
  }
  .hand {
    --spread:36px;
    --card-width:66px
  }
  .hand .playing-card {
    height:100px
  }
  .action-bar {
    padding:0 15px
  }
  .actions {
    gap:3px
  }
  .actions .button {
    padding:0 12px
  }
  .selection-info>div>span {
    max-width:170px;
    font-size:9px
  }
  .seat-left {
    left:5px
  }
  .seat-right {
    right:5px
  }
  .seat {
    width:105px
  }
  .player-identity {
    gap:7px
  }
  .player-count {
    display:none
  }
  .session-card,.standings-card,.activity-card {
    padding-left:16px;
    padding-right:16px
  }
  .open-sign {
    display:none
  }
  .table-stage {
    height:550px
  }
  .you-marker {
    top:381px
  }
  .table-message {
    top:331px
  }
  .center-play {
    width:59%
  }
  .trick-cards {
    gap:4px
  }
  .trick-cards .playing-card {
    width:53px;
    height:79px
  }
  .seat-top {
    width:210px
  }
  .seat-top .player-count {
    display:block
  }
  .hand-area {
    bottom:-24px
  }
  .actions .button-subtle span:not(.hint-symbol) {
    display:none
  }
}
/* Tablets: move the sidebar beneath the table in three columns. */
@media(max-width:980px) {
  .club-layout {
    grid-template-columns:minmax(0,1fr)
  }
  .club-sidebar {
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:15px
  }
  .session-card h2 {
    font-size:21px
  }
  .session-stats {
    padding:19px 0
  }
  .activity-card {
    min-height:unset
  }
  .hand {
    --spread:47px;
    --card-width:76px
  }
  .hand .playing-card {
    height:111px
  }
  .table-stage {
    height:570px
  }
  .hand-area {
    bottom:-15px
  }
  .you-marker {
    top:395px
  }
  .table-message {
    top:344px
  }
  .center-play {
    top:179px
  }
  .seat-left {
    left:40px
  }
  .seat-right {
    right:40px
  }
  .seat-top {
    top:24px
  }
  .trick-cards .playing-card {
    width:63px;
    height:90px
  }
  .selection-info>div>span {
    max-width:260px
  }
  .actions .button-subtle span:not(.hint-symbol) {
    display:inline
  }
  .actions {
    gap:7px
  }
  .actions .button {
    padding:0 17px
  }
  .page-intro {
    padding:30px 0
  }
  .standings-card .section-label {
    margin-bottom:11px
  }
  .standing {
    padding:8px 0
  }
  .score-footnote {
    margin-top:8px
  }
  .open-sign {
    display:flex;
    font-size:8px;
    margin-right:0
  }
  .site-header {
    height:85px
  }
  nav {
    gap:17px
  }
}
/* Narrow tablets/phones: simplify navigation and use two sidebar columns. */
@media(max-width:720px) {
  .open-sign {
    display:none
  }
  .club-sidebar {
    grid-template-columns:1fr 1fr
  }
  .activity-card {
    display:none
  }
  main {
    padding:0 18px
  }
  .site-header {
    padding:0 20px;
    height:78px
  }
  .brand {
    font-size:16px;
    gap:9px;
    letter-spacing:1.7px
  }
  .brand-mark {
    font-size:35px
  }
  .brand small {
    font-size:6px;
    letter-spacing:1.7px;
    margin-top:5px
  }
  nav {
    gap:10px
  }
  .text-button {
    font-size:0;
    gap:0
  }
  .nav-icon {
    width:20px;
    height:20px;
    font-size:12px
  }
  .icon-button {
    width:29px
  }
  .page-intro {
    padding:27px 0 25px
  }
  .eyebrow {
    font-size:7px;
    letter-spacing:1.5px;
    margin-bottom:11px
  }
  h1 {
    font-size:30px
  }
  .intro-copy {
    font-size:10px
  }
  .hand {
    --spread:36px;
    --card-width:66px
  }
  .hand .playing-card {
    height:101px
  }
  .hand-area {
    bottom:-21px;
    padding:0 14px
  }
  .seat-left {
    left:13px
  }
  .seat-right {
    right:13px
  }
  .table-stage {
    height:549px
  }
  .you-marker {
    top:384px
  }
  .table-message {
    top:339px;
    font-size:10px
  }
  .felt {
    inset:80px 24px 90px
  }
  .action-bar {
    height:114px;
    flex-direction:column;
    justify-content:center;
    gap:15px;
    padding:10px 15px
  }
  .selection-info {
    align-self:flex-start;
    margin-left:6px
  }
  .selection-info>div {
    display:flex;
    align-items:center;
    gap:9px
  }
  .selection-info strong {
    margin:0;
    font-size:11px
  }
  .selection-info>div>span {
    font-size:9px;
    max-width:100%
  }
  .actions {
    margin:0;
    width:100%;
    justify-content:flex-end;
    gap:9px
  }
  .actions .button {
    height:35px;
    padding:0 14px
  }
  .actions #sort {
    margin-right:auto;
    padding-left:5px
  }
  .action-divider {
    margin:0
  }
  .keyboard-tip {
    display:none
  }
  .below-table {
    justify-content:center;
    padding:14px 0;
    font-size:7px
  }
  .table-heading {
    padding:0 14px;
    font-size:9px;
    height:43px
  }
  .table-heading strong {
    font-size:8px;
    letter-spacing:1px
  }
  .table-heading>div {
    gap:8px
  }
  .table-heading>span {
    font-size:8px
  }
  .center-play {
    top:176px;
    width:61%
  }
  .trick-cards .playing-card {
    width:49px;
    height:73px
  }
  .trick-cards .card-corner {
    font-size:15px;
    top:5px;
    left:5px
  }
  .trick-cards .card-corner .suit {
    font-size:12px
  }
  .trick-cards .card-pip {
    font-size:27px
  }
  .trick-cards .card-bottom {
    left:auto;
    right:5px;
    top:auto;
    bottom:5px;
    font-size:11px
  }
  .trick-cards {
    gap:3px
  }
  #trick-label {
    font-size:9px
  }
  .center-eyebrow {
    font-size:7px;
    letter-spacing:1.5px
  }
  .seat {
    width:90px
  }
  .seat-top {
    width:180px
  }
  .seat-left,.seat-right {
    top:173px
  }
  .seat-left .player-identity,.seat-right .player-identity {
    flex-direction:column;
    text-align:center;
    gap:6px
  }
  .seat-left .player-caption,.seat-right .player-caption {
    display:none
  }
  .seat-left,.seat-right {
    gap:10px
  }
  .opponent-cards {
    width:62px;
    height:45px
  }
  .seat-left .mini-back,.seat-right .mini-back {
    width:25px;
    height:37px
  }
  .seat-status {
    font-size:8px;
    letter-spacing:1px
  }
  .player-name {
    font-size:11px
  }
  .avatar {
    width:33px;
    height:33px;
    font-size:18px
  }
  .seat-top .player-count {
    display:block
  }
  .club-sidebar {
    gap:12px
  }
  .session-card,.standings-card {
    padding:17px
  }
  .session-card h2 {
    font-size:22px
  }
  .section-label {
    font-size:7px;
    letter-spacing:1px
  }
  .session-card>p {
    font-size:9px
  }
  .session-stats strong {
    font-size:23px
  }
  .session-stats span {
    font-size:6px
  }
  .difficulty-row {
    font-size:8px
  }
  .difficulty-row button {
    font-size:8px
  }
  .standing-name {
    font-size:10px
  }
  .standing-name small {
    font-size:7px
  }
  .standing-score {
    font-size:10px
  }
  .score-footnote {
    font-size:7px
  }
  footer {
    grid-template-columns:auto 1fr;
    row-gap:2px;
    min-height:65px;
    font-size:8px;
    margin-top:23px;
    padding:8px 0
  }
  footer .footer-brand {
    font-size:9px
  }
  .footer-tagline {
    grid-column:1 / -1;
    grid-row:2
  }
}
/* Small phones: compact cards, seats, and controls to fit the viewport. */
@media(max-width:490px) {
  main {
    padding:0 12px
  }
  .site-header {
    padding:0 16px
  }
  .page-intro {
    padding:25px 3px 23px
  }
  .page-intro h1 {
    font-size:26px
  }
  .intro-copy {
    font-size:9px
  }
  .hand {
    --spread:25px;
    --card-width:55px
  }
  .hand .playing-card {
    height:88px;
    border-radius:5px
  }
  .hand .card-corner {
    font-size:17px;
    left:5px;
    top:5px
  }
  .hand .card-corner .suit {
    font-size:14px
  }
  .hand .card-pip {
    font-size:33px
  }
  .hand .card-bottom {
    left:auto;
    top:auto;
    right:5px;
    bottom:5px;
    font-size:13px
  }
  .hand .card-bottom .suit {
    font-size:11px
  }
  .table-stage {
    height:514px
  }
  .you-marker {
    top:359px
  }
  .hand-area {
    bottom:-35px
  }
  .table-message {
    top:319px;
    font-size:9px
  }
  .center-play {
    top:165px;
    width:62%
  }
  .seat-top {
    top:21px
  }
  .seat-left,.seat-right {
    top:153px;
    width:65px;
    gap:9px
  }
  .seat-left {
    left:3px
  }
  .seat-right {
    right:3px
  }
  .seat-left .opponent-cards,.seat-right .opponent-cards {
    width:48px
  }
  .seat-left .mini-back,.seat-right .mini-back {
    width:22px;
    height:33px
  }
  .seat-left .mini-back:after,.seat-right .mini-back:after {
    font-size:14px;
    inset:2px
  }
  .seat-left .seat-status,.seat-right .seat-status {
    font-size:7px;
    letter-spacing:.7px
  }
  .trick-cards .playing-card {
    width:39px;
    height:61px;
    border-radius:4px
  }
  .trick-cards .card-corner {
    font-size:13px;
    left:4px;
    top:4px
  }
  .trick-cards .card-corner .suit {
    font-size:10px
  }
  .trick-cards .card-pip {
    font-size:23px
  }
  .trick-cards .card-bottom {
    left:auto;
    top:auto;
    right:4px;
    bottom:4px;
    font-size:9px
  }
  .trick-cards .card-bottom .suit {
    font-size:8px
  }
  .trick-cards {
    gap:3px;
    min-height:74px
  }
  .center-eyebrow {
    font-size:6px;
    letter-spacing:1.3px;
    margin-bottom:10px
  }
  .center-play #trick-label {
    font-size:8px;
    margin-top:10px
  }
  .felt {
    inset:68px 12px 72px
  }
  .you-marker .your-turn-pill {
    font-size:6px;
    padding:5px 7px
  }
  .you-marker small {
    font-size:7px
  }
  .actions {
    gap:5px
  }
  .actions .button {
    padding:0 13px;
    font-size:11px
  }
  .actions #sort {
    padding:0 6px
  }
  .actions #sort span {
    display:none
  }
  .action-divider {
    margin:0 3px
  }
  .selection-info>div>span {
    font-size:8px
  }
  .selection-info>div {
    gap:7px
  }
  .selection-info strong {
    font-size:10px
  }
  .action-bar {
    height:107px;
    padding:10px 12px;
    gap:14px
  }
  .session-card,.standings-card {
    padding:15px 12px
  }
  .session-card h2 {
    font-size:20px;
    margin-top:17px
  }
  .session-stats {
    padding:20px 0
  }
  .standing {
    gap:6px
  }
  .standing .avatar {
    width:25px;
    height:25px;
    font-size:13px
  }
  .standing.you {
    padding-left:6px;
    padding-right:6px;
    margin-left:-6px;
    margin-right:-6px
  }
  .standing-name small {
    display:none
  }
  .score-footnote {
    line-height:1.6
  }
  .table-heading strong {
    font-size:7px;
    letter-spacing:.9px
  }
  .table-heading>div {
    gap:7px
  }
  .table-heading {
    padding:0 12px
  }
  .table-heading>span {
    font-size:7px
  }
  .table-heading .table-divider {
    margin:0 -2px
  }
  .table-heading>div>span:last-child {
    font-size:8px
  }
  dialog {
    padding:22px
  }
  dialog h2 {
    font-size:29px
  }
  .rank-line {
    font-size:14px;
    gap:2px;
    padding:13px 9px
  }
  .combo-list {
    gap:6px
  }
  .combo-list span {
    font-size:9px;
    padding:10px 7px
  }
  .settings-options {
    gap:6px
  }
  .level-option {
    font-size:10px
  }
  .level-option small {
    font-size:7px
  }
  .toast {
    font-size:11px;
    padding:12px 17px
  }
  .below-table {
    font-size:6px;
    letter-spacing:1px
  }
}
/* Honor the operating system preference independently of the in-game toggle. */
.native-app body {
  padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  padding-right: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
  padding-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  padding-left: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
}
.native-app button { min-height: 44px; }
.privacy-policy { line-height: 1.6; }
.privacy-policy h1 { font-size: 18px; }
.privacy-policy h2 { font-size: 15px; margin-top: 20px; }
.privacy-policy .draft { border: 1px solid #d3b675; padding: 12px; }

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
}

/* Match goals, restart settings, and final rankings share the existing table palette. */
.session-card .match-goal {
  color: var(--gold);
  font-size: 11px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.match-settings-note,
.match-ending-reason {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.match-standings {
  list-style: none;
  padding: 0;
  margin: 22px 0;
}
.match-standing {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.match-standing.champion {
  color: var(--gold);
}
.match-rank {
  width: 16px;
  font-size: 12px;
}
.match-player {
  flex: 1;
  min-width: 0;
}
.match-player small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.match-standing .avatar {
  flex-shrink: 0;
}
@media (max-width: 490px) {
  .match-standing {
    gap: 8px;
  }
  .setting-row select {
    max-width: 55%;
  }
}

/* Make pending rule changes and their reset consequence visible beside the action. */
.match-change-notice {
  margin: 20px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #d8bd8310;
}
.match-change-notice strong { color: var(--gold); font-size: 13px; }
dialog .match-change-notice p { margin: 6px 0 0; font-size: 12px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.settings-actions .button { margin-top: 0; }
@media (max-width: 490px) {
  .settings-actions { flex-direction: column-reverse; }
  .settings-actions .button { width: 100%; justify-content: center; }
}

/* Keep the standard settings actions together, including on narrow screens. */
.settings-actions-default {
  margin-top: 24px;
  flex-wrap: nowrap;
}
@media (max-width: 490px) {
  .settings-actions-default { flex-direction: row; }
  .settings-actions-default .button {
    flex: 1;
    width: auto;
    min-width: 0;
    padding-inline: 8px;
  }
}
