:root {
  color-scheme: light;
  --paper: #f0f1e8;
  --ink: #29433e;
  --muted: #64746c;
  --line: #344e3c28;
  --coral: #c86d67;
  --gold: #d2aa4f;
  --sage: #629576;
  --blue: #5e8ba9;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.5 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #e6b967;
  outline-offset: 4px;
}
button {
  border: 0;
}
button,
input {
  border-radius: 9px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover:enabled {
  filter: brightness(1.06);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.topbar {
  height: 82px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.acre {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.acre > span {
  font-size: 24px;
  font-weight: 400;
}
.acre small {
  font-size: 8px;
  font-weight: 500;
  color: var(--muted);
}
.wordmark {
  font:
    italic 600 48px/0.8 Georgia,
    serif;
  letter-spacing: -4px;
  text-decoration: none;
}
.wordmark span {
  display: inline-block;
  font-size: 24px;
  color: #a07c3f;
  margin-left: 3px;
  transform: translateY(-14px);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiet,
.secondary {
  padding: 11px 15px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 650;
  font-size: 11px;
  min-height: 42px;
}
.volume {
  display: flex;
  align-items: center;
}
.volume input {
  width: 62px;
  accent-color: #587864;
}
.landing {
  padding: 23px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 23px;
  max-width: 1680px;
  margin: auto;
}
.hero {
  min-height: 715px;
  position: relative;
  border-radius: 17px;
  overflow: hidden;
  background:
    linear-gradient(90deg, #112d4775, transparent 75%),
    url("/arcade/assets/onu-cover-1024.webp") 60% center/cover;
  color: #f7f0d7;
  box-shadow: 0 12px 28px #173e3020;
}
.hero-copy {
  padding: 58px 44px;
  position: relative;
}
.eyebrow {
  font:
    650 9px/1.7 ui-monospace,
    monospace;
  letter-spacing: 0.15em;
}
.hero .eyebrow {
  color: #e4dcbf;
}
.hero h1 {
  font:
    normal clamp(42px, 4.3vw, 72px) / 1.08 Georgia,
    serif;
  letter-spacing: -0.04em;
  margin: 34px 0 25px;
  max-width: 620px;
  text-shadow: 0 2px 18px #152735aa;
}
.hero-copy > p {
  font-size: 14px;
  line-height: 1.9;
  color: #e7e5dd;
  text-shadow: 0 1px 8px #183644;
}
.hero-tags {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 30px;
  font:
    8px ui-monospace,
    monospace;
  letter-spacing: 0.08em;
}
.hero-tags span + span:before {
  content: "✧";
  margin-right: 15px;
  color: #e0c493;
}
.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  background: linear-gradient(transparent, #061f308f);
  font:
    7px/1.7 ui-monospace,
    monospace;
  letter-spacing: 0.12em;
}
.hero-bottom a {
  font-size: 9px;
  white-space: nowrap;
  text-underline-offset: 4px;
}
.room-card {
  padding: 29px 26px;
  background: #f8f8ef;
  border: 1px solid var(--line);
  border-radius: 17px;
  align-self: start;
  min-width: 0;
}
.room-card .eyebrow {
  color: #7a856d;
}
.room-card h2 {
  font:
    normal 40px/1.07 Georgia,
    serif;
  letter-spacing: -0.03em;
  margin: 23px 0 18px;
}
.muted {
  color: var(--muted);
  line-height: 1.8;
  font-size: 12px;
}
.room-card label:not(.check) {
  display: block;
  font:
    650 8px ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  margin: 25px 0 9px;
}
.room-card input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fffef7;
  color: var(--ink);
  height: 46px;
}
.room-card input::placeholder {
  color: #929b8c;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 15px 0 20px;
  font-size: 10px;
  color: var(--muted);
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: #48705c;
}
.primary {
  width: 100%;
  padding: 14px 17px;
  background: #3f6958;
  color: #fffcec;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  font-weight: 700;
  min-height: 47px;
  box-shadow: 0 3px 0 #23433418;
}
.primary span {
  margin-left: auto;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #88917f;
  font:
    7px ui-monospace,
    monospace;
  letter-spacing: 0.13em;
  margin-top: 25px;
}
.divider:before,
.divider:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.join-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
#room-code {
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}
.list-heading h3 {
  font-size: 11px;
}
.text-button {
  background: none;
  color: #4f7965;
  padding: 10px 0;
  font-size: 11px;
  text-underline-offset: 4px;
}
.text-button:hover {
  text-decoration: underline;
}
.fine {
  font-size: 10px;
  line-height: 1.9;
  color: #7b8476;
}
.room-card .fine {
  margin-top: 21px;
}
.open-room {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}
.open-room small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.open-room button {
  padding: 8px 12px;
}
.lobby-actions {
  display: grid;
  gap: 9px;
  margin: 23px 0;
}
.roster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  padding: 15px 0;
  font-size: 12px;
}
.roster-row small {
  font:
    8px ui-monospace,
    monospace;
  color: var(--muted);
}
#lobby-code {
  font:
    32px ui-monospace,
    monospace;
  letter-spacing: 0.12em;
}
.leave {
  color: #946957;
}
.page-footer {
  max-width: 1680px;
  padding: 2px 28px 22px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #7f8c7c;
  font:
    8px/1.8 ui-monospace,
    monospace;
  letter-spacing: 0.06em;
}
.page-footer > span + span {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0;
}
.page-footer span span {
  color: #a88751;
  margin-left: 15px;
  font-size: 20px;
}
.notice {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(580px, 92vw);
  width: max-content;
  border-radius: 12px;
  padding: 12px 20px;
  background: #f7f4df;
  color: #334e43;
  box-shadow: 0 5px 35px #112c3740;
  font-size: 12px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.notice.visible {
  opacity: 1;
}
.notice.error {
  background: #ffe3d0;
  color: #713c2c;
}
/* A responsive, keyboard-accessible table: the actual cards remain DOM buttons. */
body.playing {
  background: #142e35;
}
body.playing .topbar {
  background: #ecf0e4;
}
body.playing .page-footer {
  color: #a3b9b2;
  padding-top: 10px;
}
.table {
  max-width: 1600px;
  margin: auto;
  padding: 17px 28px 22px;
  color: #f6f1db;
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 130px);
}
.table:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#143039cc, #143036ef),
    url("/arcade/assets/onu-cover-1024.webp") center/cover;
  z-index: -1;
  opacity: 0.95;
}
.table-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.table-top > .eyebrow {
  color: #a8c4b6;
}
.table-top .eyebrow span {
  color: #e3cea0;
  letter-spacing: 0.1em;
  margin-left: 8px;
}
.table-button {
  color: #dddcc9;
  border: 1px solid #b4c6ac3d;
  border-radius: 8px;
  background: #f0f0cc08;
  font-size: 11px;
  padding: 9px 13px;
  min-height: 38px;
}
.table-top > div {
  display: flex;
  gap: 8px;
}
.opponents {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 23px auto 12px;
  flex-wrap: wrap;
  max-width: 1080px;
}
.opponent {
  min-width: 100px;
  max-width: 154px;
  flex: 1;
  text-align: center;
  border-radius: 13px;
  padding: 12px 9px 9px;
  border: 1px solid transparent;
  position: relative;
  background: #edf4d908;
}
.opponent.active {
  background: #a5c1a51c;
  border-color: #ced4a680;
  box-shadow: 0 0 22px #d5c79510;
}
.opponent .avatar {
  display: block;
  margin: auto auto 5px;
  font-size: 24px;
  line-height: 1.1;
  color: #d4c9a5;
}
.opponent b {
  display: block;
  font-weight: 550;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opponent small {
  font:
    8px ui-monospace,
    monospace;
  color: #a5b8af;
}
.opponent .mini-cards {
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 4px;
}
.mini-cards i {
  width: 15px;
  height: 22px;
  margin-left: -5px;
  border-radius: 3px;
  border: 1px solid #b0bcb1;
  background: #2d4f51;
  transform: rotate(-7deg);
}
.mini-cards i:first-child {
  margin-left: 0;
}
.onu-badge {
  position: absolute;
  top: -8px;
  right: -3px;
  border-radius: 7px;
  padding: 2px 7px;
  background: #e8c78d;
  color: #344e43;
  font:
    700 8px ui-monospace,
    monospace;
}
.table-centre {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  max-width: 1120px;
  margin: 32px auto 35px;
  min-height: 245px;
}
.turn-copy {
  max-width: 300px;
}
.turn-copy > .eyebrow {
  color: #c9d3b5;
}
.turn-copy h2 {
  font:
    normal 32px/1.12 Georgia,
    serif;
  letter-spacing: -0.03em;
  margin: 10px 0 13px;
}
.turn-copy p {
  font-size: 12px;
  color: #b4c6be;
  line-height: 1.8;
  margin: 0 0 10px;
}
.timer {
  font:
    9px ui-monospace,
    monospace;
  color: #a9bcb1;
}
.piles {
  display: flex;
  align-items: center;
  gap: 26px;
}
.card {
  --card-color: #324e58;
  --card-ink: #fff9e5;
  width: 106px;
  height: 153px;
  border: 5px solid #fff9e5;
  border-radius: 13px;
  background: var(--card-color);
  color: var(--card-ink);
  padding: 7px;
  box-shadow: 0 6px 12px #061b2436;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  flex: none;
  user-select: none;
  overflow: hidden;
}
.card:before {
  content: "";
  position: absolute;
  inset: 18px 10px;
  border: 1px solid #fff9e552;
  border-radius: 45% 45% 43% 43%;
  transform: rotate(22deg);
  pointer-events: none;
}
.card[data-color="coral"] {
  --card-color: var(--coral);
}
.card[data-color="gold"] {
  --card-color: var(--gold);
  --card-ink: #3c422f;
}
.card[data-color="sage"] {
  --card-color: var(--sage);
}
.card[data-color="blue"] {
  --card-color: var(--blue);
}
.card[data-color="wild"] {
  background: conic-gradient(
    from 20deg,
    #608dab,
    #648f77,
    #d3b363,
    #cb7970,
    #608dab
  );
}
.card-corner {
  font:
    bold 15px/1 Georgia,
    serif;
  align-self: flex-start;
  position: relative;
  z-index: 1;
}
.card-corner.end {
  align-self: flex-end;
  transform: rotate(180deg);
}
.card-symbol {
  font:
    bold 42px/1 Georgia,
    serif;
  z-index: 1;
  letter-spacing: -3px;
}
.card-name {
  font:
    600 6px/1.4 ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  z-index: 1;
  text-transform: uppercase;
}
.card-back {
  background: #243f48;
  border-color: #acb9ab;
  transform: rotate(-5deg);
  box-shadow:
    -3px 3px 0 #d6d9c4,
    -6px 6px 0 #526461,
    0 7px 12px #061b2444;
  padding: 14px 6px;
}
.card-back b {
  font:
    italic 38px/1 Georgia,
    serif;
  letter-spacing: -3px;
  z-index: 1;
}
.card-back small {
  font:
    7px ui-monospace,
    monospace;
  letter-spacing: 0.13em;
  color: #d3cbae;
}
.card-back-orbit {
  font-size: 34px;
  line-height: 1;
  color: #d6bc87;
}
.card-back:disabled {
  opacity: 0.85;
}
.card-back:not(:disabled):hover {
  transform: rotate(-2deg) translateY(-5px);
}
.discard-wrap {
  position: relative;
  transform: rotate(6deg);
}
.active-color {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: absolute;
  bottom: -35px;
  width: 155px;
  left: -25px;
  font:
    700 10px ui-monospace,
    monospace;
  transform: rotate(-6deg);
  letter-spacing: 0.04em;
}
.color-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--dot);
  display: inline-block;
}
.table-notes {
  max-width: 240px;
  justify-self: end;
}
.direction {
  font:
    10px ui-monospace,
    monospace;
  color: #c5d0b4;
  letter-spacing: 0.05em;
}
.table-notes p {
  font:
    italic 17px/1.5 Georgia,
    serif;
  color: #c8d4c5;
  min-height: 65px;
}
.catch {
  background: #cfac671c;
  border-color: #dab97f85;
  color: #ffe0a9;
}
.hand-area {
  max-width: 1160px;
  margin: auto;
  border-top: 1px solid #a6bc9d33;
  padding-top: 18px;
}
.hand-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.hand-heading .eyebrow {
  color: #8faf9f;
  font-size: 8px;
}
.hand-heading h3 {
  font:
    normal 23px Georgia,
    serif;
  margin: 3px 0;
}
.hand-heading h3 span {
  font:
    10px ui-monospace,
    monospace;
  color: #9fb5a5;
  margin-left: 8px;
}
.hand-actions {
  display: flex;
  gap: 9px;
}
.onu-button {
  background: #edd29e;
  color: #3d5144;
  font-weight: 750;
  font-size: 12px;
  padding: 10px 17px;
  border: 1px solid #e9d09e;
  min-height: 40px;
}
.onu-button[aria-pressed="true"] {
  background: #6d967e;
  color: #fff8df;
  border-color: #c5d3ab;
}
.onu-button:disabled {
  opacity: 0.35;
}
.hand-hint {
  font-size: 10px;
  color: #aec4b4;
  margin: 9px 0 0;
  min-height: 17px;
}
.hand {
  display: flex;
  align-items: flex-end;
  justify-content: safe center;
  overflow-x: auto;
  padding: 23px 10px 14px;
  gap: 9px;
  min-height: 205px;
  scrollbar-color: #96b09b55 transparent;
  scrollbar-width: thin;
}
.hand .card {
  width: 100px;
  height: 146px;
  transition:
    transform 0.2s,
    filter 0.2s,
    box-shadow 0.2s;
}
.hand .card:disabled {
  opacity: 0.75;
  filter: saturate(0.7);
  box-shadow: none;
}
.hand .card.playable {
  box-shadow:
    0 0 0 2px #d5e4b5,
    0 5px 17px #0c232d88;
}
.hand .card.playable:hover,
.hand .card.playable:focus-visible {
  transform: translateY(-13px) rotate(-2deg);
  filter: brightness(1.1);
}
.hand .card.new-card:after {
  content: "NEW";
  position: absolute;
  right: 6px;
  top: 7px;
  background: #fff7d8;
  color: #355247;
  border-radius: 3px;
  padding: 3px;
  font:
    7px ui-monospace,
    monospace;
}
.hand .card.playable:active {
  transform: translateY(-5px);
}
dialog {
  border: 1px solid #566e5426;
  border-radius: 20px;
  padding: 38px;
  max-width: min(800px, calc(100vw - 30px));
  max-height: calc(100svh - 40px);
  color: var(--ink);
  background: #f5f4e8;
  box-shadow: 0 20px 100px #041a2870;
}
dialog::backdrop {
  background: #061e2abf;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font:
    normal 38px/1.12 Georgia,
    serif;
  letter-spacing: -0.035em;
  margin: 17px 0 22px;
}
.dialog-close {
  position: absolute;
  right: 16px;
  top: 12px;
  background: none;
  color: var(--ink);
  font-size: 27px;
  width: 38px;
  height: 38px;
}
.rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.rule-grid article > b {
  font:
    8px ui-monospace,
    monospace;
  letter-spacing: 0.1em;
  color: #7e916f;
}
.rule-grid h3 {
  font:
    normal 20px Georgia,
    serif;
  margin: 10px 0;
}
.rule-grid p {
  font-size: 12px;
  color: #617466;
  line-height: 1.8;
  margin: 0;
}
#wild-picker {
  width: 460px;
}
.color-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.color-choices button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px;
  border: 3px solid #fff9e5;
  background: var(--choice);
  color: #fff8e5;
  font-weight: 700;
  min-height: 65px;
  box-shadow: 0 0 0 1px #1b48361a;
}
.color-choices button[data-color="gold"] {
  color: #3c422f;
}
.color-choices svg {
  width: 25px;
  height: 25px;
}
#result {
  width: 430px;
  text-align: center;
}
#result .result-flower {
  font-size: 60px;
  color: #a18246;
}
#result h2 {
  margin-top: 14px;
}
#standings {
  margin: 22px 0;
}
.standing {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.standing.winner {
  color: #4c7455;
  font-weight: 750;
}
.noscript {
  position: fixed;
  inset: 0;
  background: #f2f1df;
  padding: 50px;
  z-index: 50;
}
@media (min-width: 1500px) {
  .hero {
    min-height: 760px;
  }
  .hero-copy {
    padding: 68px 55px;
  }
  .table-centre {
    margin-top: 50px;
    margin-bottom: 50px;
  }
  .hand .card {
    width: 114px;
    height: 164px;
  }
}
@media (max-width: 1000px) {
  .landing {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 15px;
    padding: 15px;
  }
  .hero-copy {
    padding: 43px 25px;
  }
  .hero h1 {
    font-size: 46px;
  }
  .hero-tags {
    gap: 8px;
    font-size: 7px;
  }
  .hero-tags span + span:before {
    margin-right: 8px;
  }
  .hero-bottom > span {
    max-width: 180px;
  }
  .room-card {
    padding: 25px 21px;
  }
  .table-centre {
    gap: 22px;
    grid-template-columns: 1fr auto;
  }
  .table-notes {
    grid-column: 1/-1;
    justify-self: center;
    max-width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 15px;
  }
  .table-notes p {
    margin: 0;
    min-height: 0;
    font-size: 14px;
  }
  .table-centre {
    min-height: 0;
    margin: 25px auto;
  }
  .opponents {
    gap: 7px;
  }
  .opponent {
    min-width: 85px;
    padding: 10px 7px;
  }
  .opponent b {
    font-size: 10px;
  }
  .table-top > .eyebrow {
    font-size: 8px;
  }
  .table-notes .direction {
    font-size: 8px;
  }
  .hand {
    min-height: 185px;
  }
  .hand .card {
    width: 91px;
    height: 132px;
  }
  .hand .card-symbol {
    font-size: 35px;
  }
}
@media (max-width: 720px) {
  .topbar {
    padding: 0 15px;
    height: 68px;
    gap: 8px;
  }
  .acre {
    font-size: 9px;
    gap: 5px;
  }
  .acre small {
    display: none;
  }
  .acre > span {
    font-size: 19px;
  }
  .wordmark {
    font-size: 38px;
  }
  .wordmark span {
    font-size: 19px;
    transform: translateY(-10px);
  }
  .top-actions {
    gap: 5px;
  }
  .quiet {
    font-size: 10px;
    padding: 8px;
    min-height: 37px;
  }
  .volume {
    display: none;
  }
  .landing {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 14px;
  }
  .hero {
    min-height: 520px;
    background-position: 60% center;
  }
  .hero-copy {
    padding: 32px 24px;
  }
  .hero h1 {
    font-size: 44px;
    margin-top: 28px;
  }
  .hero-copy .eyebrow {
    font-size: 7px;
  }
  .hero-copy > p {
    font-size: 12px;
  }
  .hero-tags {
    font-size: 6px;
    margin-top: 22px;
  }
  .hero-bottom {
    font-size: 6px;
    padding: 18px;
  }
  .hero-bottom a {
    font-size: 8px;
  }
  .room-card {
    width: 100%;
    padding: 28px;
  }
  .room-card h2 br {
    display: none;
  }
  .room-card h2 {
    font-size: 33px;
  }
  .page-footer {
    padding: 5px 17px 20px;
    display: block;
    font-size: 7px;
  }
  .page-footer > span + span {
    display: block;
    font-size: 11px;
    margin-top: 6px;
  }
  .table {
    padding: 12px 12px 10px;
    min-height: calc(100svh - 115px);
  }
  .table-top {
    gap: 6px;
  }
  .table-top > .eyebrow {
    font-size: 6px;
    letter-spacing: 0.09em;
  }
  .table-top .eyebrow span {
    display: block;
    margin: 0;
    font-size: 10px;
    letter-spacing: 0.2em;
  }
  .table-top .table-button {
    font-size: 9px;
    padding: 7px 9px;
    min-height: 35px;
  }
  .opponents {
    gap: 5px;
    margin: 16px auto 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: safe center;
    padding: 5px 2px 6px;
  }
  .opponent {
    min-width: 78px;
    flex: 1;
    padding: 8px 5px 6px;
    border-radius: 10px;
  }
  .opponent .avatar {
    font-size: 19px;
  }
  .opponent b {
    font-size: 9px;
    max-width: 85px;
    margin: auto;
  }
  .opponent small {
    font-size: 7px;
  }
  .mini-cards i {
    height: 18px;
    width: 12px;
    margin-left: -5px;
  }
  .opponent .mini-cards {
    margin: 5px auto 2px;
    height: 19px;
  }
  .onu-badge {
    font-size: 6px;
    top: -5px;
    right: 0;
  }
  .table-centre {
    gap: 16px 15px;
    grid-template-columns: 1fr auto;
    margin: 23px auto 18px;
  }
  .turn-copy h2 {
    font-size: 24px;
    margin: 7px 0 9px;
  }
  .turn-copy > .eyebrow {
    font-size: 7px;
  }
  .turn-copy p {
    font-size: 10px;
    line-height: 1.7;
    margin-bottom: 7px;
  }
  .timer {
    font-size: 8px;
  }
  .piles {
    gap: 12px;
    padding-right: 4px;
    padding-bottom: 17px;
  }
  .piles .card {
    width: 75px;
    height: 110px;
    border-width: 4px;
    border-radius: 10px;
    padding: 6px;
  }
  .piles .card-symbol {
    font-size: 30px;
  }
  .piles .card-corner {
    font-size: 11px;
  }
  .piles .card-name {
    font-size: 5px;
  }
  .card-back b {
    font-size: 28px;
  }
  .card-back-orbit {
    font-size: 24px;
  }
  .card-back small {
    font-size: 5px;
  }
  .active-color {
    font-size: 8px;
    width: 110px;
    left: -17px;
    bottom: -26px;
  }
  .table-notes {
    display: block;
    max-width: 90%;
    min-height: 58px;
  }
  .table-notes p {
    font-size: 13px;
    margin-top: 6px;
    min-height: 20px;
  }
  .table-notes .direction {
    font-size: 7px;
  }
  .catch {
    margin-top: 8px;
    font-size: 10px;
    padding: 6px 12px;
    min-height: 33px;
  }
  .hand-area {
    padding-top: 14px;
  }
  .hand-heading h3 {
    font-size: 20px;
  }
  .hand-heading .eyebrow {
    font-size: 6px;
  }
  .hand-heading h3 span {
    font-size: 8px;
    margin-left: 5px;
  }
  .hand-actions {
    gap: 5px;
  }
  .onu-button {
    font-size: 10px;
    padding: 8px 11px;
    min-height: 36px;
  }
  .hand-actions .table-button {
    font-size: 9px;
    padding: 8px;
    min-height: 36px;
  }
  .hand-hint {
    font-size: 9px;
    min-height: 28px;
    margin-top: 9px;
  }
  .hand {
    justify-content: flex-start;
    min-height: 156px;
    padding: 18px 6px 13px;
    gap: 7px;
  }
  .hand .card {
    width: 78px;
    height: 115px;
    border: 4px solid #fff9e5;
    border-radius: 10px;
    padding: 5px;
  }
  .hand .card-symbol {
    font-size: 32px;
  }
  .hand .card-corner {
    font-size: 12px;
  }
  .hand .card-name {
    font-size: 5px;
  }
  .hand .card.playable:hover {
    transform: translateY(-7px);
  }
  .hand .card.new-card:after {
    font-size: 5px;
    right: 3px;
    top: 4px;
  }
  .hand .card:disabled {
    opacity: 0.8;
  }
  dialog {
    padding: 29px 24px;
    border-radius: 16px;
  }
  dialog h2 {
    font-size: 30px;
  }
  .rule-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .color-choices {
    gap: 8px;
  }
  .color-choices button {
    padding: 13px 8px;
    min-height: 62px;
    font-size: 12px;
  }
  .notice {
    font-size: 11px;
    bottom: 15px;
  }
  body.playing .page-footer > span + span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep decorative transforms inside the table on narrow phones. */
.table {
  overflow: clip;
}
.turn-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
.table-centre {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
@media (max-width: 1000px) {
  .table-centre {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
@media (max-width: 370px) {
  .topbar {
    padding: 0 10px;
  }
  .acre {
    font-size: 8px;
  }
  .quiet {
    font-size: 9px;
    padding: 7px;
  }
  .wordmark {
    font-size: 33px;
  }
  .top-actions {
    gap: 4px;
  }
  .piles {
    gap: 10px;
  }
  .piles .card {
    width: 68px;
    height: 102px;
  }
}
