@font-face {
  font-family: "VazirmatnFallback";
  src: local("Vazirmatn"), local("Tahoma");
  font-display: swap;
}

:root {
  --bg: #071713;
  --surface: rgba(17, 48, 41, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f7f4e9;
  --muted: #a8bbb4;
  --gold: #e9be68;
  --gold-deep: #b9852f;
  --green: #35c88a;
  --red: #e86161;
  --black-card: #17211e;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
  --safe-top: max(14px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 70% -10%, #214e42 0, transparent 42%),
    linear-gradient(160deg, #0b211c 0%, #06130f 75%);
  font-family: "VazirmatnFallback", Tahoma, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(75px);
  pointer-events: none;
  opacity: 0.25;
}

.ambient-one {
  width: 250px;
  height: 250px;
  top: 15%;
  left: -130px;
  background: #45b991;
  animation: ambient-drift 9s ease-in-out infinite alternate;
}

.ambient-two {
  width: 300px;
  height: 300px;
  right: -180px;
  bottom: 4%;
  background: #b27c31;
  animation: ambient-drift 12s ease-in-out infinite alternate-reverse;
}

@keyframes ambient-drift {
  to {
    transform: translate3d(25px, -18px, 0) scale(1.12);
  }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--safe-top) clamp(8px, 2.4vw, 14px)
    calc(var(--safe-bottom) + 174px);
}

body.audio-collapsed .app-shell {
  padding-bottom: calc(var(--safe-bottom) + 76px);
}

.splash {
  min-height: 80dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.splash h1 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: -0.06em;
}

.splash p {
  color: var(--muted);
}

.loader {
  width: 30px;
  height: 30px;
  margin-top: 14px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand h1 {
  margin: 0;
  font-size: 1.3rem;
}

.brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
}

.status-pill {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.78rem;
  white-space: nowrap;
}

.status-pill.live {
  color: #9ce2c3;
  border-color: rgba(53, 200, 138, 0.35);
}

.live-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(53, 200, 138, 0.5);
  animation: live-pulse 1.7s infinite;
}

@keyframes live-pulse {
  70% {
    box-shadow: 0 0 0 7px rgba(53, 200, 138, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(53, 200, 138, 0);
  }
}

.panel {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: panel-rise 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 1rem;
}

.muted {
  color: var(--muted);
}

.lobby-hero {
  padding: 22px 18px;
  text-align: center;
}

.lobby-hero h2 {
  margin: 0 0 5px;
  font-size: 1.65rem;
}

.lobby-hero p {
  margin: 0;
  color: var(--muted);
}

.player-list {
  display: grid;
  gap: 8px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.12);
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--gold);
  background: rgba(233, 190, 104, 0.12);
  font-weight: 800;
}

.player-row .name {
  flex: 1;
  font-weight: 650;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.72rem;
}

.tag.gold {
  color: var(--gold);
  background: rgba(233, 190, 104, 0.12);
}

.empty-seat {
  opacity: 0.52;
  border-style: dashed;
}

.settings-grid,
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.action-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.btn {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface-soft);
  cursor: pointer;
  transition:
    transform 0.14s ease,
    background 0.14s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  border-color: rgba(233, 190, 104, 0.55);
  color: #15221d;
  background: linear-gradient(145deg, #f0cf7c, #c38e36);
  font-weight: 850;
  background-size: 180% 100%;
  animation: primary-shimmer 3.4s ease-in-out infinite alternate;
}

@keyframes primary-shimmer {
  to {
    background-position: 100% 0;
  }
}

.btn.success {
  border-color: rgba(53, 200, 138, 0.42);
  background: rgba(53, 200, 138, 0.15);
}

.btn.danger {
  color: #ffaaaa;
  border-color: rgba(232, 97, 97, 0.3);
  background: rgba(232, 97, 97, 0.1);
}

.btn.selected {
  color: var(--gold);
  border-color: var(--gold-deep);
  background: rgba(233, 190, 104, 0.14);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.score-item {
  padding: 10px;
  border-radius: 14px;
  text-align: center;
  background: var(--surface-soft);
  animation: score-enter 0.35s calc(var(--i, 0) * 70ms) both;
}

.score-item.score-red,
.round-score-item.score-red {
  border: 1px solid rgba(232, 97, 97, 0.24);
  background: rgba(232, 97, 97, 0.1);
}

.score-item.score-blue,
.round-score-item.score-blue {
  border: 1px solid rgba(80, 164, 255, 0.24);
  background: rgba(80, 164, 255, 0.1);
}

.score-item.score-green,
.round-score-item.score-green {
  border: 1px solid rgba(53, 200, 138, 0.24);
  background: rgba(53, 200, 138, 0.1);
}

.score-item small,
.round-score-item small {
  display: block;
  min-height: 1.1em;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-item.score-bump strong,
.round-score-item.score-bump strong {
  animation: score-bump 0.55s cubic-bezier(0.2, 0.9, 0.2, 1.4);
}

@keyframes score-enter {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
}

@keyframes score-bump {
  50% {
    transform: scale(1.45);
    color: #fff0b3;
  }
}

.score-item strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 1.35rem;
}

.round-score-title {
  margin: 12px 2px 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.round-score-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.round-score-item {
  padding: 8px;
  border-radius: 13px;
  text-align: center;
}

.round-score-item span {
  font-weight: 700;
}

.round-score-item strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 1.05rem;
}

.game-table {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid rgba(233, 190, 104, 0.2);
  border-radius: 48% / 22%;
  background:
    radial-gradient(
      ellipse at center,
      rgba(39, 112, 88, 0.9),
      rgba(15, 58, 48, 0.98) 66%
    ),
    #174f40;
  box-shadow:
    inset 0 0 0 7px rgba(5, 18, 14, 0.27),
    inset 0 0 55px rgba(0, 0, 0, 0.25),
    var(--shadow);
  animation: table-arrive 0.55s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

@keyframes table-arrive {
  from {
    opacity: 0;
    transform: scale(0.96) rotateX(8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotateX(0);
  }
}

.table-meta {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 10px auto 0;
  padding: 6px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(233, 190, 104, 0.18);
  border-radius: 999px;
  background: rgba(4, 20, 15, 0.42);
  text-align: center;
}

.trump-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(233, 190, 104, 0.3);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(4, 20, 15, 0.5);
  font-size: 0.78rem;
  white-space: nowrap;
}

.trump-badge.trump-reveal {
  animation: trump-reveal 0.8s cubic-bezier(0.2, 0.9, 0.2, 1.2);
}

@keyframes trump-reveal {
  0% {
    transform: scale(0.3) rotate(-12deg);
    opacity: 0;
  }
  55% {
    transform: scale(1.16) rotate(3deg);
  }
}

.turn-clock {
  margin-top: 0;
  color: #d4e0db;
  font-size: 0.7rem;
  text-align: center;
  white-space: nowrap;
}

.seat {
  position: absolute;
  width: 100px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 16px;
  text-align: center;
  background: rgba(4, 20, 15, 0.68);
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.seat.active {
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(233, 190, 104, 0.18);
  animation: active-seat 1.5s ease-in-out infinite alternate;
}

@keyframes active-seat {
  to {
    box-shadow: 0 0 30px rgba(233, 190, 104, 0.42);
  }
}

.seat .seat-name {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat .seat-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.seat-0 {
  bottom: 12px;
  left: calc(50% - 50px);
}
.seat-1 {
  top: calc(50% - 36px);
  right: 8px;
}
.seat-2 {
  top: 12px;
  left: calc(50% - 50px);
}
.seat-3 {
  top: calc(50% - 36px);
  left: 8px;
}

.trick-zone {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 174px;
  height: 158px;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
}

.played-card {
  position: absolute;
  width: 52px;
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: card-to-table 0.46s cubic-bezier(0.18, 0.82, 0.22, 1.2) both;
}

.played-card img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

@keyframes card-to-table {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translate(var(--card-from-x, 0), var(--card-from-y, 45px))
      scale(0.58) rotate(var(--card-from-rotate, -14deg));
  }
  70% {
    filter: blur(0);
  }
}

.played-card.played-seat-0 {
  --card-from-y: 95px;
  --card-from-rotate: 7deg;
  bottom: 0;
  left: 61px;
  transform: rotate(-3deg);
}
.played-card.played-seat-1 {
  --card-from-x: 95px;
  --card-from-y: 5px;
  --card-from-rotate: 12deg;
  right: 0;
  top: 40px;
  transform: rotate(5deg);
}
.played-card.played-seat-2 {
  --card-from-y: -95px;
  --card-from-rotate: -8deg;
  top: 0;
  left: 61px;
  transform: rotate(3deg);
}
.played-card.played-seat-3 {
  --card-from-x: -95px;
  --card-from-y: 5px;
  --card-from-rotate: -12deg;
  left: 0;
  top: 40px;
  transform: rotate(-5deg);
}

.played-card.played-seat-unknown {
  top: 40px;
  left: 61px;
}

.event-line {
  margin: 11px 2px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.83rem;
  direction: rtl;
  unicode-bidi: isolate;
}

.event-fragment {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  direction: rtl;
}

.event-player,
.event-card {
  unicode-bidi: isolate;
}

.event-player {
  direction: ltr;
}

.event-card {
  direction: ltr;
  white-space: nowrap;
}

.hand-panel {
  padding-bottom: 12px;
}

.hand {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  min-height: 0;
  padding: 0;
  aspect-ratio: 2 / 3;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f8f7ee;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  cursor: default;
  overflow: hidden;
  animation: card-deal 0.45s calc(var(--i, 0) * 32ms)
    cubic-bezier(0.16, 0.85, 0.25, 1.1) both;
  transition:
    opacity 0.2s ease,
    filter 0.2s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

@keyframes card-deal {
  from {
    opacity: 0;
    transform: translateY(-55px) rotate(calc((var(--i, 0) - 6) * 2deg))
      scale(0.7);
  }
}

.card.legal {
  cursor: pointer;
  border-color: var(--gold);
  transform: translateY(-3px);
}

.card.legal:hover,
.card.legal:focus-visible {
  transform: translateY(-8px) scale(1.035);
  box-shadow: 0 12px 24px rgba(233, 190, 104, 0.24);
}

.card.not-legal {
  opacity: 0.34;
  filter: grayscale(0.55) saturate(0.35);
  transform: scale(0.96);
}

.card.action-picked {
  z-index: 5;
  animation: card-picked 0.23s ease-in forwards;
}

@keyframes card-picked {
  to {
    opacity: 0;
    transform: translateY(-95px) scale(0.72) rotate(5deg);
  }
}

.draft-card {
  width: 90px;
  min-height: 0;
  aspect-ratio: 2 / 3;
  margin: 8px auto 15px;
  display: block;
  padding: 0;
  animation: draft-flip 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes draft-flip {
  0% {
    transform: rotateY(90deg) scale(0.85);
    opacity: 0;
  }
  100% {
    transform: rotateY(0) scale(1);
    opacity: 1;
  }
}

.notice {
  padding: 11px 13px;
  border: 1px solid rgba(53, 200, 138, 0.25);
  border-radius: 14px;
  color: #bcebd6;
  background: rgba(53, 200, 138, 0.08);
  text-align: center;
  font-size: 0.84rem;
}

.winner {
  padding: 27px 18px;
  text-align: center;
}

.winner .cup {
  font-size: 3rem;
}

.winner h2 {
  margin: 8px 0 4px;
  color: var(--gold);
}

.error-state {
  min-height: 75dvh;
  display: grid;
  place-content: center;
  padding: 20px;
  text-align: center;
}

.error-state .icon {
  font-size: 2.4rem;
}

.error-state h2 {
  margin-bottom: 4px;
}

.error-state p {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.9;
}

.audio-dock {
  position: fixed;
  z-index: 9;
  right: 12px;
  bottom: calc(var(--safe-bottom) + 4px);
  left: 12px;
  width: min(760px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(233, 190, 104, 0.22);
  border-radius: 20px;
  background: rgba(8, 28, 23, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.audio-dock.collapsed {
  padding: 8px 10px;
}

.audio-now {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-bottom: 8px;
}

.audio-now.compact {
  margin-bottom: 0;
}

.audio-now > div {
  flex: 1;
  min-width: 0;
}

.audio-now strong,
.audio-now small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-now strong {
  font-size: 0.86rem;
}

.audio-now small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.audio-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(168, 187, 180, 0.5);
}

.audio-dot.playing {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(53, 200, 138, 0.5);
  animation: live-pulse 1.7s infinite;
}

.audio-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-bottom: 8px;
}

.audio-search input {
  min-width: 0;
  height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 0.75rem;
  outline: none;
}

.audio-search input::placeholder {
  color: rgba(168, 187, 180, 0.72);
}

.audio-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-items: center;
}

.audio-btn {
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.audio-btn:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.panel-toggle {
  flex: 0 0 auto;
  min-width: 88px;
}

.volume-control {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  direction: ltr;
  font-size: 0.72rem;
}

.volume-control input {
  width: 100%;
  accent-color: var(--gold);
}

.toast {
  position: fixed;
  z-index: 60;
  top: calc(var(--safe-top) + 10px);
  right: 16px;
  left: 16px;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: rgba(20, 38, 33, 0.97);
  box-shadow: var(--shadow);
  opacity: 0;
  text-align: center;
  transform: translateY(-18px);
  pointer-events: none;
  transition: 0.2s ease;
}

body.audio-collapsed .toast {
  top: calc(var(--safe-top) + 10px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.turn-changed .game-table {
  animation: turn-flash 0.65s ease;
}

@keyframes turn-flash {
  45% {
    box-shadow:
      inset 0 0 0 3px rgba(233, 190, 104, 0.45),
      var(--shadow);
  }
}

.busy [data-action] {
  pointer-events: none;
}

.no-animate .panel,
.no-animate .game-table,
.no-animate .card,
.no-animate .score-item,
.no-animate .played-card,
.no-animate .draft-card {
  animation: none !important;
}

.burned-preview {
  margin: 6px auto 14px;
  padding: 12px 10px 14px;
  border: 1px solid rgba(232, 97, 97, 0.3);
  border-radius: 16px;
  background: rgba(232, 97, 97, 0.08);
  text-align: center;
  animation: burned-reveal 0.4s ease both;
}

@keyframes burned-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.burned-preview .burned-label {
  color: #ffaaaa;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.burned-preview .burned-card {
  width: 78px;
  margin: 0 auto;
  filter: grayscale(0.3) brightness(0.92);
  opacity: 0.85;
}

.burned-preview .burned-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.74rem;
}

@media (min-width: 600px) {
  .app-shell {
    padding-right: 20px;
    padding-left: 20px;
  }

  .game-table {
    min-height: 390px;
  }

  .seat {
    width: 120px;
  }

  .seat-0 {
    left: calc(50% - 60px);
  }
  .seat-2 {
    left: calc(50% - 60px);
  }

  .hand {
    grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
  }

  .audio-dock {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 260px) 340px;
    gap: 12px;
    align-items: center;
  }

  .audio-dock.collapsed {
    display: block;
  }

  .audio-now,
  .audio-search {
    margin-bottom: 0;
  }

  .audio-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  :root {
    --safe-top: max(8px, env(safe-area-inset-top));
    --safe-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .topbar {
    padding-bottom: 8px;
  }

  .brand h1 {
    font-size: 1.08rem;
  }

  .brand small,
  .status-pill {
    font-size: 0.68rem;
  }

  .panel {
    margin-bottom: 9px;
    padding: 12px;
    border-radius: 18px;
  }

  .panel-title {
    margin-bottom: 9px;
  }

  .score-strip {
    gap: 7px;
  }

  .score-item {
    padding: 8px 6px;
  }

  .score-item strong {
    font-size: 1.15rem;
  }

  .game-table {
    min-height: 286px;
    border-radius: 42% / 18%;
  }

  .table-meta {
    margin-top: 8px;
    padding: 5px;
    gap: 6px;
  }

  .trump-badge {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 0.7rem;
  }

  .turn-clock {
    margin-top: 0;
    font-size: 0.62rem;
  }

  .seat {
    width: 90px;
    padding: 6px;
    border-radius: 14px;
  }

  .seat .seat-name {
    font-size: 0.7rem;
  }

  .seat .seat-meta {
    font-size: 0.62rem;
  }

  .seat-0 {
    left: calc(50% - 45px);
  }
  .seat-2 {
    left: calc(50% - 45px);
  }

  .trick-zone {
    width: 156px;
    height: 138px;
  }

  .played-card {
    width: 46px;
  }

  .played-card.played-seat-0,
  .played-card.played-seat-2,
  .played-card.played-seat-unknown {
    left: 55px;
  }

  .played-card.played-seat-1,
  .played-card.played-seat-3,
  .played-card.played-seat-unknown {
    top: 34px;
  }

  .event-line {
    margin-top: 8px;
    font-size: 0.76rem;
  }

  .hand {
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
    gap: 12px;
  }

  .hand-panel {
    padding-bottom: 14px;
  }

  .audio-dock {
    right: 8px;
    left: 8px;
    width: calc(100% - 16px);
  }
}

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