:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  color: #eeeade;
  background: #101b18;
  --paper: #eeeade;
  --soft: #acbcb1;
  --line: #35483e;
  --edge: #263c31;
  --panel: #182823;
  --gold: #ebc98e;
  --green: #347b5d;
  --red: #eea9a2;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin-bottom: .55rem; letter-spacing: -.04em; }
h2 { font-size: 1.65rem; margin-bottom: .75rem; }
h3 { font-size: 1.08rem; margin-bottom: .4rem; }
p { line-height: 1.55; }
a { color: inherit; }
button, input, select { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  min-height: 44px; padding: .55rem .95rem; border-radius: 9px; cursor: pointer;
  border: 1px solid #4d6256; background: #243831; color: var(--paper); font-weight: 600;
}
button:hover, .button:hover { border-color: var(--gold); }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--gold); color: #201a13; border-color: var(--gold); }
.primary:hover { background: #f5dcae; }
.negative { color: var(--red); }
.positive { color: #a5ddbd; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.header { border-bottom: 1px solid var(--edge); background: #13201b; }
.bar { width: min(1140px, 94%); min-height: 68px; margin: auto; display: flex; gap: 20px; align-items: center; }
.brand { display: inline-flex; gap: .65rem; align-items: center; white-space: nowrap; text-decoration: none; font: 1.35rem Georgia,serif; }
.brand em { color: var(--gold); font-style: normal; }
.brand-mark { color: var(--gold); background: #253a2f; border: 1px solid #52634d; border-radius: 9px; padding: .18rem .45rem .3rem; }
nav { display: flex; gap: .35rem; flex-wrap: wrap; }
nav a { padding: .5rem .65rem; border-radius: 6px; color: var(--soft); text-decoration: none; font-size: .94rem; }
nav a:hover, nav a[aria-current] { background: #263a30; color: var(--paper); }
#account { margin-left: auto; display: flex; gap: .6rem; align-items: center; }
#account button { min-height: 36px; padding: .25rem .65rem; }
main { margin: 0 auto; width: min(1100px, 94%); padding: clamp(1.3rem, 4vw, 3.6rem) 0 4rem; }
.loading { padding: 2rem; color: var(--soft); }
.intro { margin-bottom: 1.45rem; display: flex; gap: 1rem; align-items: end; justify-content: space-between; }
.intro p { color: var(--soft); margin-bottom: .15rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .85rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .65fr); gap: 1rem; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: clamp(.9rem, 2.4vw, 1.55rem); }
.panel + .panel, .section { margin-top: 1.2rem; }
.grid > .panel, .split > .panel { margin-top: 0; }
.room-card { display: grid; gap: .55rem; align-content: start; text-decoration: none; }
.room-card:hover { border-color: var(--gold); }
.room-card .muted { margin: 0; }
.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.muted, small { color: var(--soft); }
small { font-size: .85rem; }
.tag { border: 1px solid #526554; border-radius: 999px; color: var(--gold); padding: .18rem .6rem; font-size: .82rem; white-space: nowrap; }
form { display: grid; gap: .85rem; }
label { display: grid; gap: .3rem; }
label > span, legend { font-size: .94rem; }
input, select { width: 100%; min-width: 0; padding: .65rem .7rem; border-radius: 8px; border: 1px solid #51675b; color: var(--paper); background: #112019; }
input[type=checkbox] { width: 1.15rem; min-width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--gold); }
.check { display: flex; align-items: center; gap: .55rem; min-height: 34px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem; min-width: 0; }
.settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.signin { display: grid; grid-template-columns: 1.15fr minmax(280px, 410px); gap: clamp(1.4rem,5vw,4rem); align-items: center; min-height: 62vh; }
.signin .display { font-size: clamp(3rem, 7.5vw, 6rem); line-height: .95; }
.signin .display em { color: var(--gold); font-style: normal; }
.signin p { color: var(--soft); max-width: 32ch; }
.signin .art { display: flex; gap: .65rem; margin-bottom: 1.4rem; }
.signin .art .card { transform: rotate(-10deg); }
.signin .art .card + .card { transform: rotate(8deg); margin-top: .38rem; }
.notice { position: fixed; z-index: 2; bottom: 1rem; right: 1rem; max-width: min(28rem, 90vw); padding: .9rem 1.1rem; color: var(--paper); background: #2e4439; border: 1px solid #668575; border-radius: 9px; box-shadow: 0 12px 25px #0006; }
.notice.error { background: #4d2b2a; border-color: #ab6660; }
.facts { display: flex; flex-wrap: wrap; gap: .65rem 1.7rem; margin: 0 0 1rem; }
.facts div { display: grid; gap: .2rem; }
.facts dt { color: var(--soft); font-size: .85rem; }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { border-top: 1px solid var(--line); min-height: 46px; padding: .55rem 0; }
.list li:first-child { border: 0; }
.list button { min-height: 36px; padding: .35rem .6rem; }
.felt {
  position: relative; min-height: 332px; margin: 1rem 0; padding: 1.5rem clamp(.55rem, 4vw, 2rem);
  display: grid; align-content: center; gap: .55rem; text-align: center;
  border: 8px solid #354036; border-radius: clamp(32px,20vw,145px);
  outline: 1px solid #69735b; outline-offset: -8px;
  background: radial-gradient(ellipse at center,#236245,#143e2d); box-shadow: inset 0 0 0 3px #91ae7250, 0 10px 25px #0005;
}
.seats { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.seat { min-width: 100px; max-width: 165px; overflow-wrap: anywhere; border: 1px solid #6e917c; background: #162b23; border-radius: 9px; padding: .35rem .55rem; font-size: .86rem; }
.seat b { display: block; color: var(--gold); }
.seat.turn { outline: 2px solid var(--gold); }
.seat.folded { opacity: .64; }
.table-center { display: grid; justify-items: center; gap: .45rem; margin: .55rem 0; }
.cards { display: flex; gap: .28rem; justify-content: center; min-height: 53px; }
.card {
  display: inline-grid; place-content: center; width: 37px; min-height: 51px; border-radius: 6px;
  background: #f7efdb; color: #222621; text-align: center; font: bold 1rem Georgia,serif;
  box-shadow: 0 2px 5px #0005;
}
.art .card { width: 53px; min-height: 70px; font-size: 1.25rem; }
.card.red { color: #a42c32; }
.card.blank { background: #122c2360; border: 1px dashed #91ad99; box-shadow: none; }
.controls { padding: .65rem 0; min-height: 58px; }
.controls form { display: flex; flex-wrap: wrap; align-items: end; }
.controls input { max-width: 110px; }
.controls .turn-time { margin: 0 0 .5rem; }
.balances { width: 100%; border-collapse: collapse; }
.balances th, .balances td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); }
.balances th:last-child, .balances td:last-child { text-align: right; }
.history { margin: .6rem 0; }
.history summary { padding: .45rem 0; cursor: pointer; }
.history p { margin: .35rem 0; }
@media (max-width: 700px) {
  .bar { flex-wrap: wrap; gap: .35rem .65rem; padding: .55rem 0; }
  nav { width: 100%; order: 3; }
  #account span { display: none; }
  .split, .signin { grid-template-columns: 1fr; }
  .signin { gap: .65rem; min-height: 0; }
  .signin .art { display: none; }
  .intro { flex-wrap: wrap; }
  .felt { min-height: 280px; }
}
