/* v1.3: shared party table, compact touch controls, content-led motion. */
:root {
  --radius: 18px;
  --gold: #e9c989;
  --line: rgba(233, 201, 137, 0.2);
}
html {
  scrollbar-gutter: stable;
}
body {
  overflow-x: clip;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
input,
select {
  font-size: 16px !important;
}
button,
input,
select {
  max-width: 100%;
}
button[hidden],
[hidden] {
  display: none !important;
}
.grow {
  min-width: 0;
}
.grow b {
  overflow-wrap: anywhere;
}
.topbar {
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  min-height: 64px;
}
.brand-mark {
  width: 36px;
  height: 36px;
}
.brand-copy b {
  font-size: 17px;
  letter-spacing: 0.1em;
}
.top-actions {
  gap: 6px;
}
.icon-btn,
.avatar-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.status-pill {
  display: none;
}
.btn {
  font-weight: 750;
  min-height: 44px;
  border-radius: 12px;
  font-size: 14px;
  padding: 11px 13px;
}
.chip {
  min-height: 44px;
}
.section {
  margin-top: 14px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
}
.in-game .bottom-nav {
  display: none;
}
.in-game .app-shell {
  padding-bottom: env(safe-area-inset-bottom);
}
.in-game .view {
  width: min(100%, 660px);
  padding: 10px max(10px, env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}
.in-game .section-actions {
  display: none;
}
.in-game .extra-head {
  margin-bottom: 10px;
}
.in-game .game-top {
  gap: 8px;
  align-items: center;
}
.game-top h1 {
  font-size: 20px;
}
.game-head-actions {
  width: auto;
  flex: 0 1 auto;
  flex-wrap: wrap;
  max-width: 55%;
  gap: 4px;
}
.game-head-actions .mode-pill {
  display: none;
}
.turn-banner {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 7px 9px;
  font-size: 11px;
}
.game-head-actions .help-btn {
  width: 44px;
  height: 44px;
}
.game-title-wrap {
  flex: 1;
}
.in-game .game-title-wrap .eyebrow {
  font-size: 9px;
}
.game-title-wrap h1 {
  overflow-wrap: anywhere;
}
.game-menu {
  display: grid;
  gap: 10px;
}
.game-actions,
.exp-actions {
  gap: 7px;
}
.game-shell,
.exp-shell,
.puzzle-shell,
.arc-shell {
  min-width: 0;
  gap: 9px;
}
.game-shell > * {
  min-width: 0;
}
.in-game .board-wrap {
  width: min(100%, 500px);
  margin: auto;
  padding: 6px;
  border-radius: 14px;
}
.board-wrap-slim .gomoku-board {
  width: 100% !important;
}
.gomoku-cell {
  background: transparent;
  border-color: rgba(60, 33, 11, 0.35);
  min-width: 0;
  padding: 0;
}
.gomoku-board {
  border-width: 4px;
}
.in-game .board-legend {
  padding: 6px 8px;
  font-size: 10px;
  gap: 8px;
}
.in-game .mini-score {
  padding: 7px 10px;
}
.in-game .compact-score-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.chess-cell,
.checker-cell,
.shogi-cell {
  padding: 0;
}
.chess-piece {
  font-size: clamp(22px, 8vw, 46px);
}
.card-table-shell {
  width: 100%;
}
.table-seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
}
.table-seat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 7px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #08291f;
  min-width: 0;
  position: relative;
}
.table-seat b {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-seat span {
  font-size: 11px;
  color: #bacfc4;
}
.table-seat strong {
  font-size: 15px;
  color: #f4d99e;
  font-variant-numeric: tabular-nums;
}
.table-seat small {
  font-size: 8px;
  color: #c8d3c6;
  display: block;
}
.table-seat i {
  font-size: 10px;
  min-height: 12px;
  color: #e9c989;
  font-style: normal;
}
.table-seat.turn {
  background: #0b4031;
  border-color: #74dcb4;
  box-shadow: inset 0 0 0 1px #74dcb426;
}
.table-seat.me:before {
  content: "YOU";
  position: absolute;
  top: -4px;
  right: 6px;
  color: #ffe3a0;
  background: #08291f;
  font-size: 8px;
  padding: 0 4px;
  letter-spacing: 0.1em;
}
.felt-table {
  position: relative;
  min-height: 170px;
  border-radius: 50% / 26%;
  border: 6px solid #533b27;
  box-shadow:
    inset 0 0 0 2px #a88b56,
    inset 0 0 36px #00271e,
    0 8px 22px #0003;
  background: radial-gradient(
    ellipse at 50% 30%,
    #17664e,
    #0b4433 68%,
    #073023
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 14px;
  overflow: hidden;
}
.felt-table:before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 14px;
  border: 1px solid #d9cb9822;
  border-radius: inherit;
}
.felt-table p {
  font-size: 11px;
  color: #d2e1d5;
  margin: 0;
  max-width: 100%;
  text-align: center;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.felt-table h2 {
  font-size: 17px;
  margin: 0;
}
.rule-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}
.rule-badges span {
  font-size: 10px;
  color: #ebd399;
  background: #031e1780;
  padding: 4px 9px;
  border-radius: 20px;
}
.pile-cards {
  min-height: 68px;
}
.playing-card {
  display: inline-flex;
  vertical-align: middle;
  min-width: 44px;
  width: 50px;
  height: 72px;
  flex: 0 0 50px;
  border-radius: 7px;
  background: linear-gradient(160deg, #fffdf6, #f0e5cc);
  color: #152922;
  border: 1px solid #cfbea1;
  box-shadow: 0 4px 8px #00190c45;
  padding: 6px;
  user-select: none;
}
.playing-card.back {
  background: repeating-linear-gradient(35deg, #133c32 0 5px, #205042 5px 6px);
  border: 1px solid #ccad6c;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #f7dba5;
}
.playing-card b {
  font-size: 21px;
}
.playing-card span {
  font-size: 12px;
}
.hand-zone {
  padding: 10px 8px 5px;
  border: 1px solid #f4dfad19;
  background: #031c1680;
  border-radius: 14px;
}
.hand-zone .eyebrow {
  margin-left: 3px;
}
.hand-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 12px 3px 10px;
  scrollbar-width: thin;
  scrollbar-color: #b4975f #082b21;
  gap: 5px;
}
.hand-scroll .playing-card {
  margin-left: 0 !important;
  min-width: 44px;
  flex-basis: 50px;
}
.hand-scroll .playing-card.selected {
  transform: translateY(-6px);
  outline: 2px solid #ffe2a0;
}
.winning-card {
  outline: 2px solid #f2c879;
  box-shadow: 0 0 12px #e9ba5855;
}
.om-table {
  border-radius: 26px;
  min-height: 160px;
  padding: 15px 8px;
}
.draw-targets {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  max-width: 100%;
}
.draw-targets .chip {
  font-size: 11px;
  padding: 8px;
}
.draw-backs {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  overflow-x: auto;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 4px;
  scrollbar-width: thin;
}
.draw-backs .playing-card {
  min-width: 44px;
  flex-basis: 44px;
  height: 66px;
}
.draw-receipt {
  padding: 10px 12px;
  border: 1px solid #e9c98935;
  border-radius: 12px;
  background: #f7d98b08;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.draw-receipt b {
  color: #ffe1a0;
}
.joker-result {
  font-size: 14px;
  margin: 5px;
  text-align: center;
}
.poker-table {
  padding: 15px 10px;
  min-height: 205px;
}
.poker-street {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #e7c982;
  text-align: center;
}
.poker-street small {
  display: block;
  font-size: 8px;
  color: #adccbb;
  margin-top: 4px;
}
.community-cards {
  display: flex;
  gap: 5px;
  max-width: 100%;
}
.community-cards .playing-card,
.card-slot {
  width: 48px;
  min-width: 0;
  flex: 0 0 48px;
  height: 66px;
}
.card-slot {
  display: grid;
  place-items: center;
  border: 1px dashed #ebcb8c44;
  border-radius: 7px;
  color: #d4c59755;
  font-size: 10px;
}
.pot-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #fff0c8;
}
.pot-display span,
.pot-display small {
  font-size: 9px;
  letter-spacing: 0.12em;
}
.pot-display b {
  font-size: 28px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.poker-controls {
  display: grid;
  gap: 7px;
}
.raise-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 6px;
  align-items: end;
}
.raise-row label {
  font-size: 10px;
  color: #b9ccbf;
  display: grid;
  gap: 3px;
}
.raise-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #b49a6266;
  border-radius: 12px;
  min-height: 44px;
  background: #05261d;
  color: #fff1ce;
  padding: 8px;
}
.raise-row button {
  font-size: 12px;
  padding: 10px 3px;
}
.poker-showdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.poker-showdown > div {
  padding: 10px;
  border: 1px solid #d0b67a44;
  border-radius: 12px;
  font-size: 12px;
  min-width: 0;
}
.poker-showdown b,
.poker-showdown span {
  display: block;
  font-size: 11px;
}
.showdown-cards {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}
.showdown-cards .playing-card {
  display: inline-flex;
}
.virtual-note {
  font-size: 10px;
  color: #a4bcae;
  text-align: center;
  margin: 0;
}
.uno-table {
  min-height: 174px;
  border-radius: 50% / 22%;
  border: 5px solid #59422e;
  padding-top: 32px;
}
.uno-color-label {
  position: absolute;
  top: 10px;
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 11px;
  background: #061f18;
  color: #fff;
}
.uno-color-label.red {
  border-left: 10px solid #ec6670;
}
.uno-color-label.blue {
  border-left: 10px solid #68a8ff;
}
.uno-color-label.green {
  border-left: 10px solid #72d698;
}
.uno-color-label.yellow {
  border-left: 10px solid #ffe276;
}
.uno-colors {
  flex-wrap: wrap;
  overflow: visible;
}
.uno-colors button {
  width: 44px;
  height: 44px;
  font-size: 12px;
  color: #fff;
  flex: 0 0 44px;
}
.uno-colors button[data-uno-color="yellow"] {
  color: #36220f;
}
.uno-colors span {
  white-space: normal;
}
.uno-hand {
  gap: 5px;
  scrollbar-width: thin;
}
.uno-hand .uno-card {
  margin-left: 0;
  min-width: 48px;
}
.exp-opponents {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.bj-wallets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 5px;
  overflow: visible;
}
.bj-wallets span {
  font-size: 10px;
  padding: 7px;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.bj-wallets b {
  display: block;
}
.bj-table {
  min-height: 288px;
  border-radius: 45% / 16%;
  padding: 16px 10px;
  gap: 10px;
}
.bj-zone > div {
  flex-wrap: wrap;
  gap: 4px;
  min-height: 68px;
}
.bj-card {
  flex: 0 0 47px;
  width: 47px;
  height: 67px;
}
.bj-card b {
  font-size: 18px;
}
.bj-message b {
  font-size: 14px;
}
.bj-zone small {
  font-size: 10px;
}
.party-results {
  margin-top: 15px;
  padding: 20px 15px;
  border-radius: 22px;
  border: 1px solid #e9c98965;
  background:
    radial-gradient(circle at 50% 0, #78622e33, transparent 60%), #092f24;
  text-align: center;
}
.party-results h2 {
  font-size: 26px;
  color: #ffe1a0;
  margin: 8px 0 18px;
  overflow-wrap: anywhere;
}
.result-ranks {
  display: grid;
  gap: 7px;
}
.result-ranks > div {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  text-align: left;
  align-items: center;
  background: #ffffff05;
  border-bottom: 1px solid #ffffff12;
  padding: 10px 6px;
  font-size: 12px;
}
.result-ranks b {
  min-width: 0;
  overflow-wrap: anywhere;
}
.result-ranks strong {
  color: #e9c989;
  font-size: 11px;
}
.result-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.party-game-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.party-pick {
  min-height: 62px;
  border: 1px solid #b9995766;
  background: #123e30;
  border-radius: 12px;
  color: #f0e5cc;
  padding: 10px;
  text-align: left;
}
.party-pick b,
.party-pick small {
  display: block;
  font-size: 12px;
}
.party-pick small {
  font-size: 10px;
  color: #9fbcac;
  margin-top: 4px;
}
.party-pick.active {
  border-color: #ffe2a0;
  background: #335036;
}
.party-pick:disabled {
  opacity: 0.3;
}
.ready-tag {
  font-size: 10px;
  color: #9de3bf;
  max-width: 60px;
}
.party-standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.party-standings th,
.party-standings td {
  padding: 10px 6px;
  text-align: left;
  border-bottom: 1px solid #fff1;
}
.party-standings th {
  color: #b7c9c1;
  font-size: 10px;
}
#connectionBanner {
  position: sticky;
  top: 64px;
  z-index: 21;
  margin: 0;
  padding: 10px 14px;
  background: #553e1c;
  color: #ffe8b6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
}
#connectionBanner button {
  font-size: 11px;
  padding: 5px;
  flex: 0 0 62px;
}
.in-game .toast-root {
  bottom: calc(15px + env(safe-area-inset-bottom));
}
.modal-open {
  overflow: hidden;
}
.modal-backdrop {
  align-items: center;
}
.modal {
  padding: 0;
  max-height: calc(
    100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  border-radius: 20px;
  overscroll-behavior: contain;
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #06291f;
  padding: 12px 14px;
  border-bottom: 1px solid #b99c5533;
  margin: 0;
  gap: 10px;
}
.modal-head h3 {
  font-family: inherit;
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.modal-body {
  padding: 16px;
}
.rules-intro {
  font-size: 16px;
  line-height: 1.7;
  color: #ffe9b5;
  margin: 0 0 8px;
}
.rules-meta {
  color: #a5c1af;
  font-size: 11px;
  margin-bottom: 12px;
}
.rules-guide details {
  border-bottom: 1px solid #ddd2;
  padding: 6px 0;
}
.rules-guide summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  align-content: center;
  color: #f8e5b8;
  font-weight: 700;
  font-size: 14px;
}
.rules-guide details p {
  font-size: 13px;
  line-height: 1.9;
  color: #d3e0d7;
  margin: 6px 0 12px;
}
.audio-settings {
  display: grid;
  gap: 20px;
}
.audio-settings label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  font-size: 14px;
}
.audio-settings input[type="range"] {
  grid-column: 1/-1;
  width: 100%;
  height: 44px;
  accent-color: #e9c989;
}
.audio-settings .mute-label {
  display: flex;
  align-items: center;
}
.audio-settings input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: #e9c989;
}
.audio-settings output {
  color: #e9c989;
}
.audio-settings p {
  font-size: 12px;
}
#momentRoot {
  position: fixed;
  left: 10px;
  right: 10px;
  top: calc(118px + env(safe-area-inset-top));
  z-index: 35;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.game-moment {
  max-width: 95%;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.05em;
  background: #0a201bee;
  border: 1px solid #e9c98988;
  color: #ffe2a0;
  padding: 14px 22px;
  border-radius: 16px;
  box-shadow: 0 12px 30px #0004;
  text-align: center;
  animation: momentIn 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.game-moment.draw,
.game-moment.rank {
  font-size: 15px;
}
.game-moment.revolution {
  color: #ffdbec;
  border-color: #ed85b2;
  background: #391327ed;
}
.game-moment.seven {
  color: #b7ddff;
  border-color: #92c7ff;
  background: #122c4bee;
}
@keyframes momentIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
#dealRoot {
  position: fixed;
  inset: 0;
  z-index: 32;
  pointer-events: none;
  overflow: hidden;
}
#dealRoot i {
  position: absolute;
  left: calc(50% - 22px);
  top: 40%;
  width: 44px;
  height: 62px;
  background: repeating-linear-gradient(35deg, #123e31 0 5px, #35694d 5px 6px);
  border: 1px solid #d1b579;
  border-radius: 6px;
  color: #f5d69a;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 10px;
  animation: dealOut 0.72s both ease-in-out;
  animation-delay: var(--delay);
}
.shuffle-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 33%;
  font-size: 10px;
  text-align: center;
  color: #ffe2a0;
  text-shadow: 0 2px 10px #000;
  letter-spacing: 0.2em;
  animation: dealLabel 1.5s both;
}
@keyframes dealOut {
  0% {
    transform: rotate(-8deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  40% {
    transform: rotate(12deg) translateX(8px);
  }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(0);
    opacity: 0;
  }
}
@keyframes dealLabel {
  0%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
/* Critical information fits above the touch bar. Board cells may be denser than 44px. */
.in-game .arc-controls {
  position: static;
  padding: 5px;
}
.in-game .block-board {
  width: min(100%, calc((100dvh - 265px) * 0.556), 300px);
  grid-template-rows: repeat(18, 1fr);
}
.in-game .puyo-board {
  width: min(100%, calc((100dvh - 265px) * 0.5), 270px);
  grid-template-rows: repeat(12, 1fr);
}
.in-game .inv-board {
  width: min(100%, calc((100dvh - 260px) * 0.846), 400px);
  grid-template-rows: repeat(13, 1fr);
}
.in-game .arc-statbar span {
  padding: 5px 7px;
}
.in-game .arc-opponents {
  grid-template-columns: 1fr;
}
.in-game .arc-opp {
  padding: 6px 10px;
}
.in-game .arc-opp b,
.in-game .arc-opp span {
  display: inline;
  font-size: 11px;
  margin-right: 6px;
}
.arc-controls button {
  min-height: 44px;
}
.arc-shell .arc-statbar {
  min-height: 42px;
}
.in-game .sticky-inline-panel {
  position: static;
  padding: 8px;
}
.player-money-strip {
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 5px;
}
.money-pill {
  padding: 8px 6px;
}
.money-pill .money-name {
  font-size: 10px;
}
.money-pill b {
  font-size: 17px;
}
.money-pill small {
  font-size: 9px;
}
.inline-meta-row span {
  padding: 4px;
  font-size: 9px;
}
.dice-stage.cinematic {
  min-height: 270px !important;
  padding: 10px;
}
.stage-bowl {
  min-height: 145px !important;
}
.stage-cover {
  height: 62%;
}
.dice-stage.cinematic .die {
  width: 58px;
  height: 58px;
  font-size: 38px;
}
.hand-result b {
  animation: none;
  font-size: 18px;
}
.result-burst {
  animation: none;
}
.in-game .chinchiro-shell > .game-actions,
.in-game .board-shell > .game-actions {
  display: flex;
  flex-wrap: wrap;
}
.in-game .chinchiro-shell > .game-actions .primary-roll {
  width: 100%;
}
.in-game .chinchiro-shell > .game-actions button:not(.primary-roll),
.in-game .board-shell > .game-actions button {
  font-size: 11px;
  flex: 1;
  min-height: 44px;
  padding: 8px 3px;
}
.sol-tableau {
  min-height: 270px;
  overflow: auto;
}
.sol-pile {
  min-height: 240px;
}
.sol-top {
  grid-template-columns: 44px 44px minmax(0, 1fr);
  gap: 6px;
}
.sol-foundation {
  min-height: 64px;
}
.sol-pile .sol-card {
  height: 58px;
  flex-basis: 58px;
}
.sudoku-pad button {
  min-height: 44px;
  padding: 0;
}
.sudoku-pad {
  gap: 3px;
}
.picross-wrap {
  max-width: 100%;
}
.sudoku-grid,
.mine-board,
.go-board {
  max-width: 450px;
}
.bg-board {
  padding: 7px;
  gap: 3px;
}
.bg-point {
  min-height: 56px;
}
.scoreboard {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.score-card {
  padding: 6px 9px;
}
.score-card b {
  font-size: 12px;
}
.score-card small {
  font-size: 9px;
}
@media (max-width: 360px) {
  .brand-copy b {
    font-size: 14px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .top-actions {
    gap: 2px;
  }
  .community-cards {
    gap: 3px;
  }
  .community-cards .playing-card,
  .card-slot {
    width: 43px;
    flex-basis: 43px;
    height: 62px;
  }
  .table-seat strong {
    font-size: 13px;
  }
  .table-seat b {
    font-size: 11px;
  }
  .game-top h1 {
    font-size: 18px;
  }
  .turn-banner {
    font-size: 10px;
  }
  .uno-colors span {
    font-size: 10px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .in-game .topbar {
    position: relative;
    min-height: 50px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .in-game .view {
    width: min(100%, 960px);
    padding-top: 5px;
  }
  .in-game .extra-head {
    margin-bottom: 4px;
  }
  .in-game .arc-shell {
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    gap: 6px;
  }
  .in-game .arc-opponents,
  .in-game .arc-statbar {
    grid-column: 2;
  }
  .in-game .block-board,
  .in-game .puyo-board,
  .in-game .inv-board,
  .in-game .mine-board {
    grid-row: 1/5;
    grid-column: 1;
    max-height: none;
    height: calc(100dvh - 120px);
    width: auto;
    justify-self: center;
  }
  .in-game .arc-controls {
    grid-column: 2;
    grid-row: 3;
  }
  .in-game .block-board {
    aspect-ratio: 10/18;
  }
  .in-game .puyo-board {
    aspect-ratio: 6/12;
  }
  .in-game .inv-board {
    aspect-ratio: 11/13;
  }
  .in-game .card-table-shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .card-table-shell .table-seats {
    grid-column: 1/-1;
  }
  .card-table-shell .felt-table {
    grid-column: 1;
    grid-row: 2/4;
  }
  .card-table-shell .hand-zone,
  .card-table-shell .game-actions,
  .card-table-shell .poker-controls,
  .card-table-shell .draw-receipt {
    grid-column: 2;
  }
  .card-table-shell .virtual-note {
    grid-column: 1/-1;
  }
  .poker-table {
    min-height: 180px;
  }
  .in-game .game-top h1 {
    font-size: 18px;
  }
  .modal {
    max-height: calc(100dvh - 24px);
  }
  #momentRoot {
    top: 65px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  #dealRoot {
    display: none;
  }
}

.table-flight {
  position: fixed;
  z-index: 38;
  pointer-events: none;
  display: flex;
  gap: 5px;
  will-change: transform, opacity;
}
.table-flight .playing-card {
  width: 56px;
  height: 78px;
  box-shadow: 0 10px 22px #0007;
}
.flying-chip {
  display: block;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 4px dashed #ffdf9b;
  background: #ad7025;
  box-shadow: 0 3px 0 #5b3d20;
  margin-left: -14px;
}
.pair-flight:after {
  content: "PAIR";
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffe2a0;
  font-size: 12px;
  font-weight: 800;
}
.hand-zone {
  position: relative;
}
.hand-zone:after {
  content: "横にスワイプして手札を見る";
  display: block;
  font-size: 9px;
  color: #a6bcae;
  text-align: right;
  margin-top: 6px;
}
.poker-shell .hand-zone:after {
  display: none;
}
@media (orientation: portrait) and (max-height: 700px) {
  .in-game .topbar {
    min-height: 56px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .poker-shell .table-seat {
    padding: 6px 5px;
    gap: 2px;
  }
  .poker-shell .table-seat b,
  .poker-shell .table-seat span {
    font-size: 10px;
  }
  .poker-shell .table-seat strong {
    font-size: 15px;
  }
  .poker-table {
    min-height: 150px;
    padding: 10px 6px;
    gap: 5px;
  }
  .poker-table > p {
    margin: 3px 0 0;
    font-size: 10px;
  }
  .poker-table .playing-card,
  .poker-table .card-slot {
    height: 60px;
  }
  .poker-shell .hand-zone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
  }
  .poker-shell .hand-zone .eyebrow {
    margin: 0;
    max-width: 75px;
  }
  .poker-shell .hand-scroll {
    padding: 0;
  }
  .poker-shell .hand-scroll .playing-card {
    height: 58px;
    width: 44px;
    flex-basis: 44px;
  }
  .dice-stage.cinematic {
    min-height: 205px !important;
    padding: 7px;
    gap: 6px;
  }
  .stage-bowl {
    min-height: 106px !important;
  }
  .dice-stage.cinematic .die {
    width: 50px;
    height: 50px;
    font-size: 34px;
  }
}
