:root {
  --bg: #0a241d;
  --bg-soft: #12352a;
  --panel: rgba(8, 21, 17, 0.92);
  --panel-border: rgba(235, 208, 127, 0.18);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --table-edge: rgba(78, 37, 11, 0.9);
  --table-felt: #17573f;
  --table-felt-2: #0f3f2d;
  --text: #f7efd2;
  --muted: #cbbf96;
  --accent: #dfb445;
  --accent-strong: #f3cf73;
  --ok: #53a26c;
  --danger: #c55c54;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
  --card-width: 102px;
  --card-height: 158px;
  font-family: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(247, 216, 113, 0.15), transparent 28%),
    radial-gradient(circle at bottom, rgba(22, 90, 62, 0.2), transparent 32%),
    linear-gradient(160deg, #173d31 0%, #081b16 100%);
}

body.profile-gated {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid rgba(223, 180, 69, 0.35);
  background: linear-gradient(180deg, rgba(248, 210, 110, 0.18), rgba(223, 180, 69, 0.08));
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(223, 180, 69, 0.35);
  background: linear-gradient(180deg, rgba(248, 210, 110, 0.18), rgba(223, 180, 69, 0.08));
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(243, 200, 95, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.button-link:hover {
  transform: translateY(-1px);
  border-color: rgba(243, 200, 95, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(247, 240, 212, 0.14);
  background: rgba(247, 240, 212, 0.06);
  color: var(--text);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

h2 {
  font-size: 1.08rem;
}

h3 {
  font-size: 1rem;
}

.app-shell {
  width: min(1380px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

body.profile-gated .app-shell {
  filter: blur(4px) brightness(0.72);
  transition: filter 160ms ease;
}

.profile-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 224, 132, 0.12), transparent 28%),
    linear-gradient(160deg, rgba(8, 27, 22, 0.9), rgba(4, 15, 12, 0.96));
  backdrop-filter: blur(12px);
}

.profile-gate-card {
  width: min(1240px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(243, 207, 115, 0.25);
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(10, 31, 25, 0.98), rgba(8, 21, 17, 0.96) 58%, rgba(36, 18, 8, 0.92));
  box-shadow: 0 32px 88px rgba(0, 0, 0, 0.45);
}

.profile-gate-copy {
  max-width: 70ch;
}

.profile-gate-lead {
  color: var(--muted);
  line-height: 1.55;
}

.profile-gate-field {
  max-width: 420px;
}

.profile-avatar-section {
  display: grid;
  gap: 12px;
}

.profile-avatar-section-head p {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

.profile-avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

.profile-avatar-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 10px 8px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-avatar-card.is-selected {
  border-color: rgba(243, 207, 115, 0.76);
  background: rgba(243, 207, 115, 0.12);
  box-shadow: 0 0 0 2px rgba(243, 207, 115, 0.18);
}

.profile-avatar-frame {
  width: min(100%, 110px);
  aspect-ratio: 1 / 1;
  display: block;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f7dfa0, #7f5a1a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 10px 20px rgba(0, 0, 0, 0.22);
}

.profile-avatar-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar-frame .avatar-sprite {
  width: 100%;
  height: 100%;
}

.profile-avatar-frame svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

.profile-gate-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .profile-avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-gate {
    padding: 12px;
  }

  .profile-gate-card {
    padding: 18px;
    max-height: calc(100vh - 24px);
  }

  .profile-avatar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hero,
.panel,
.dev-panel,
.game-shell,
.overlay-card {
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.hero,
.panel,
.dev-panel,
.overlay-card {
  background: var(--panel);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 208, 115, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(9, 30, 24, 0.96), rgba(14, 47, 37, 0.94) 52%, rgba(42, 22, 8, 0.92));
}

.hero-side {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: end;
  min-width: 220px;
  position: relative;
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 58ch;
}

.hero-art {
  position: absolute;
  right: 140px;
  top: 14px;
  width: 260px;
  height: 180px;
  pointer-events: none;
}

.hero-art-card {
  position: absolute;
  width: 96px;
  height: 146px;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.35));
}

.hero-art-card-a {
  right: 112px;
  top: 20px;
  transform: rotate(-13deg);
}

.hero-art-card-b {
  right: 56px;
  top: 4px;
  transform: rotate(4deg);
}

.hero-art-card-c {
  right: 0;
  top: 28px;
  transform: rotate(16deg);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.intro {
  max-width: 60ch;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

body:not(.game-active):not(.room-active):not(.profile-gated) .app-shell {
  width: min(1620px, calc(100vw - 28px));
  margin-top: 10px;
  padding: 18px 18px 42px;
  border-radius: 34px;
  border: 1px solid rgba(117, 69, 24, 0.78);
  background:
    linear-gradient(145deg, rgba(109, 63, 22, 0.96), rgba(53, 25, 8, 0.98) 24%, rgba(22, 12, 4, 0.98) 100%);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.34),
    inset 0 0 0 2px rgba(205, 156, 80, 0.16),
    inset 0 0 36px rgba(0, 0, 0, 0.18);
}

body:not(.game-active):not(.room-active):not(.profile-gated) .hero,
body:not(.game-active):not(.room-active):not(.profile-gated) .home-screen {
  position: relative;
  border-radius: 28px;
  border: 1px solid rgba(219, 175, 92, 0.24);
  background:
    radial-gradient(circle at top, rgba(244, 210, 122, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(25, 88, 61, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(8, 45, 31, 0.96), rgba(5, 27, 18, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 230, 172, 0.06),
    inset 0 18px 48px rgba(255, 234, 193, 0.02);
}

body:not(.game-active):not(.room-active):not(.profile-gated) .hero {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
  overflow: hidden;
}

.hero-topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) auto minmax(320px, 0.95fr);
  gap: 14px;
  align-items: center;
}

.home-profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 12px 18px;
  border-radius: 22px;
  border: 1px solid rgba(222, 177, 92, 0.52);
  background:
    radial-gradient(circle at top left, rgba(239, 202, 110, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(9, 50, 34, 0.94), rgba(7, 30, 20, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 238, 196, 0.08),
    0 16px 30px rgba(0, 0, 0, 0.16);
}

.home-profile-card-button {
  width: 100%;
  text-align: left;
}

.home-profile-card-button:hover {
  transform: translateY(-2px);
}

.home-profile-avatar {
  display: grid;
  place-items: center;
}

.home-profile-avatar .avatar-badge {
  width: 68px;
  height: 68px;
  border: 3px solid rgba(243, 207, 115, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

.home-profile-role {
  color: #ffe7aa;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-profile-copy h2 {
  font-size: clamp(1.22rem, 1.75vw, 1.82rem);
  color: #fff3cc;
}

.home-profile-meta {
  margin-top: 4px;
  color: #d7c48e;
  font-size: 0.92rem;
}

.home-topbar-center {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.home-stat-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 148px;
  min-height: 58px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(232, 194, 108, 0.44);
  background: linear-gradient(180deg, rgba(20, 70, 50, 0.94), rgba(10, 35, 25, 0.98));
  color: #fff0c0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 199, 0.06),
    0 10px 20px rgba(0, 0, 0, 0.16);
}

.home-stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d7c189;
}

.home-stat-chip strong {
  margin-top: 3px;
  font-size: 1.36rem;
  color: #f6d88f;
}

.hero .status-pill {
  min-width: 96px;
  min-height: 40px;
  border-color: rgba(232, 194, 108, 0.42);
  background: linear-gradient(180deg, rgba(17, 55, 39, 0.95), rgba(8, 29, 19, 0.98));
  color: #f7ecd1;
  box-shadow: inset 0 0 0 1px rgba(255, 235, 176, 0.06);
}

.home-utility-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.home-utility-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(221, 177, 92, 0.26);
  background: rgba(5, 25, 17, 0.34);
  color: #edd7a1;
  font-size: 0.92rem;
  text-decoration: none;
}

.hero-marquee {
  position: relative;
  min-height: 186px;
  padding: 6px 174px 2px;
  display: grid;
  place-items: center;
}

.hero-decor {
  position: absolute;
  top: 8px;
  bottom: 6px;
  width: 154px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.hero-decor-left {
  left: 8px;
}

.hero-decor-right {
  right: 8px;
}

.hero-book-spine {
  position: relative;
  width: 112px;
  height: 196px;
  border-radius: 14px;
  border: 2px solid rgba(216, 174, 92, 0.68);
  background:
    radial-gradient(circle at top, rgba(244, 210, 122, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(8, 50, 35, 0.96), rgba(5, 29, 20, 0.99));
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 195, 0.08),
    0 22px 38px rgba(0, 0, 0, 0.22);
  transform: rotate(-6deg);
}

.hero-book-border {
  position: absolute;
  inset: 14px;
  border-radius: 10px;
  border: 1px solid rgba(235, 208, 127, 0.38);
}

.hero-book-title {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: #efcf84;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-medallion {
  position: relative;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 3px solid rgba(106, 60, 23, 0.86);
  background:
    radial-gradient(circle at 30% 30%, rgba(168, 110, 57, 0.32), transparent 34%),
    linear-gradient(145deg, rgba(87, 48, 18, 0.98), rgba(42, 20, 8, 0.98));
  box-shadow:
    inset 0 0 0 2px rgba(163, 108, 54, 0.24),
    0 18px 30px rgba(0, 0, 0, 0.22);
}

.hero-medallion::before,
.hero-medallion::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(149, 97, 47, 0.4);
}

.hero-medallion::after {
  inset: 34px;
  border-color: rgba(173, 121, 69, 0.36);
}

.hero-medallion-core {
  position: absolute;
  inset: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(127, 78, 33, 0.82), rgba(74, 39, 15, 0.98));
}

.hero-title-card {
  position: relative;
  z-index: 2;
  width: min(960px, 100%);
  padding: 20px 30px 16px;
  text-align: center;
  border-radius: 30px;
  border: 2px solid rgba(230, 187, 103, 0.72);
  background:
    linear-gradient(180deg, rgba(7, 47, 32, 0.94), rgba(5, 29, 20, 0.98)),
    radial-gradient(circle at top, rgba(244, 210, 122, 0.08), transparent 44%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 237, 191, 0.08),
    0 28px 44px rgba(0, 0, 0, 0.22);
}

.hero-title-card::before,
.hero-title-card::after {
  content: "";
  position: absolute;
  top: 22px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(232, 194, 108, 0.36);
  background: linear-gradient(180deg, rgba(9, 56, 38, 0.94), rgba(5, 28, 19, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 236, 195, 0.06);
}

.hero-title-card::before {
  left: -14px;
}

.hero-title-card::after {
  right: -14px;
}

.hero-title-card .eyebrow {
  margin-bottom: 10px;
  color: #f2cb75;
}

.hero-title-card h1 {
  font-size: clamp(2.8rem, 6.2vw, 4.7rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f5d487;
  text-shadow:
    0 2px 0 rgba(66, 36, 10, 0.72),
    0 8px 24px rgba(0, 0, 0, 0.28);
}

.hero-tagline {
  margin-top: 4px;
  font-size: clamp(0.98rem, 1.35vw, 1.28rem);
  color: #f2ead2;
}

.hero-status-line {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(232, 194, 108, 0.18);
  color: #dac99d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.hero-fan {
  position: absolute;
  top: 14px;
  width: 196px;
  height: 196px;
  pointer-events: none;
}

.hero-fan-left {
  left: 20px;
}

.hero-fan-right {
  right: 20px;
}

.hero-fan-card {
  position: absolute;
  width: 92px;
  height: 142px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.34));
}

.hero-fan-left .hero-fan-card-a {
  left: 0;
  top: 24px;
  transform: rotate(-18deg);
}

.hero-fan-left .hero-fan-card-b {
  left: 44px;
  top: 66px;
  transform: rotate(-6deg);
}

.hero-fan-left .hero-fan-card-c {
  left: 102px;
  top: 12px;
  transform: rotate(10deg);
}

.hero-fan-right .hero-fan-card-a {
  right: 104px;
  top: 18px;
  transform: rotate(-10deg);
}

.hero-fan-right .hero-fan-card-b {
  right: 44px;
  top: 62px;
  transform: rotate(4deg);
}

.hero-fan-right .hero-fan-card-c {
  right: 0;
  top: 22px;
  transform: rotate(16deg);
}

.hero > .notice-banner {
  max-width: 540px;
  width: min(100%, 540px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  justify-self: center;
  background: rgba(7, 27, 18, 0.86);
}

.notice-banner-text {
  flex: 1 1 auto;
}

.notice-refresh-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.home-screen {
  margin-top: 12px;
  padding: 18px 18px 18px;
}

.home-main-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-main-actions-hero {
  margin-top: -2px;
}

.home-main-actions.is-hidden {
  display: none;
}

.home-menu-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 122px;
  padding: 20px 26px;
  border-radius: 28px;
  border: 2px solid rgba(221, 177, 92, 0.5);
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.1), transparent 38%),
    linear-gradient(180deg, rgba(11, 66, 44, 0.98), rgba(7, 40, 27, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 235, 176, 0.07),
    0 18px 34px rgba(0, 0, 0, 0.16);
  text-align: left;
  overflow: hidden;
}

.home-menu-tile::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(244, 210, 122, 0.18);
}

.home-menu-tile::after {
  content: "";
  position: absolute;
  inset: auto -34px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 207, 115, 0.1), transparent 70%);
}

.home-menu-tile:hover,
.home-menu-tile.is-active {
  transform: translateY(-2px);
  border-color: rgba(244, 210, 122, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 235, 176, 0.08),
    0 20px 38px rgba(0, 0, 0, 0.2);
}

.home-menu-tile-primary {
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(19, 100, 64, 0.98), rgba(10, 56, 38, 0.98));
}

.home-menu-tile-gold {
  background:
    radial-gradient(circle at top right, rgba(255, 240, 189, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(221, 176, 69, 0.98), rgba(161, 108, 26, 0.98));
  color: #271408;
}

.home-menu-tile-gold .home-menu-copy strong,
.home-menu-tile-gold .home-menu-copy small,
.home-menu-tile-gold .home-menu-icon {
  color: #2a1707;
}

.home-menu-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid rgba(244, 210, 122, 0.82);
  background: radial-gradient(circle at 30% 30%, rgba(255, 238, 187, 0.18), rgba(8, 45, 31, 0.9));
  font-size: 2rem;
  line-height: 1;
}

.home-menu-tile-gold .home-menu-icon {
  background: radial-gradient(circle at 30% 30%, rgba(255, 249, 224, 0.34), rgba(186, 130, 36, 0.92));
  border-color: rgba(93, 55, 12, 0.48);
}

.home-menu-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.home-menu-copy strong {
  font-size: clamp(1.22rem, 1.8vw, 1.72rem);
  color: #fff0bf;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.home-menu-copy small {
  color: #ead7a4;
  font-size: 0.98rem;
  line-height: 1.35;
}

.home-action-detail {
  display: grid;
  justify-items: center;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 220ms ease,
    opacity 180ms ease,
    margin-top 220ms ease;
}

.home-action-detail.is-open {
  max-height: 420px;
  opacity: 1;
  margin-top: 14px;
}

.home-action-detail.is-focused {
  max-height: 980px;
}

.home-detail-panel {
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid rgba(221, 177, 92, 0.3);
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(8, 39, 27, 0.98), rgba(5, 25, 17, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 235, 176, 0.04),
    0 18px 34px rgba(0, 0, 0, 0.16);
}

.home-detail-panel-create {
  width: min(1080px, 100%);
  gap: 20px;
  padding: 24px;
}

.home-detail-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.home-detail-head > div {
  display: grid;
  gap: 6px;
}

.home-detail-back {
  min-width: 112px;
  min-height: 44px;
}

.home-detail-head h2 {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  color: #f2d186;
}

.home-detail-lead {
  max-width: 72ch;
  color: #dccda1;
  line-height: 1.55;
}

.home-detail-panel button {
  min-height: 52px;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, rgba(247, 213, 112, 0.94), rgba(186, 130, 36, 0.98));
  color: #241306;
}

.home-code-field {
  display: grid;
  gap: 8px;
}

.home-code-field span {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-detail-panel input,
.home-detail-panel select {
  min-height: 44px;
  border-color: rgba(255, 241, 204, 0.2);
  background: rgba(4, 20, 13, 0.32);
}

.home-create-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: stretch;
}

.home-create-summary,
.home-field-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(221, 177, 92, 0.22);
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(11, 48, 33, 0.9), rgba(6, 27, 18, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255, 235, 176, 0.04);
}

.home-create-summary h3 {
  font-size: 1.3rem;
  color: #f4d58f;
}

.home-create-points {
  margin: 0;
  padding-left: 18px;
  color: #e4d3a2;
  line-height: 1.6;
}

.home-create-form {
  display: grid;
  gap: 16px;
}

.home-field-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff0bf;
}

.home-field-help {
  color: #d8c79a;
  line-height: 1.45;
}

.home-switch-card .checkbox-row {
  margin-top: 4px;
  color: #f0e2b5;
}

.home-create-actions {
  display: flex;
  justify-content: flex-end;
}

.home-rooms-stage {
  margin-top: 10px;
  padding: 16px 18px 14px;
  border-radius: 28px;
  border: 1px solid rgba(221, 177, 92, 0.24);
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.1), transparent 35%),
    linear-gradient(180deg, rgba(8, 39, 27, 0.98), rgba(5, 25, 17, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 235, 176, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.16);
}

.home-rooms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.home-rooms-head h2 {
  font-size: clamp(1.55rem, 2.1vw, 2.12rem);
  color: #f3d48e;
}

.home-screen .rooms-list {
  gap: 16px;
}

.home-screen .rooms-table {
  gap: 10px;
}

.home-screen .rooms-table-head,
.home-screen .rooms-table-row {
  grid-template-columns: minmax(74px, 0.8fr) minmax(180px, 1.5fr) minmax(86px, 0.7fr) minmax(110px, 0.8fr) auto;
}

.home-screen .rooms-table-head {
  padding: 0 10px;
  color: #d9c695;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-screen .rooms-table-row {
  min-height: 76px;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(219, 175, 92, 0.18);
  background:
    linear-gradient(180deg, rgba(11, 46, 32, 0.84), rgba(6, 25, 17, 0.88));
}

.home-screen .rooms-table-row.inactive {
  opacity: 0.72;
}

.rooms-table-mode {
  color: #f2ebd4;
}

.rooms-table-players {
  font-weight: 700;
  color: #f0d78e;
}

.room-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.room-status-chip.waiting {
  color: #ffeab3;
  background: rgba(195, 141, 47, 0.22);
}

.room-status-chip.active {
  color: #d9f4e3;
  background: rgba(56, 131, 86, 0.24);
}

.home-screen .rooms-table-row button {
  min-width: 120px;
  min-height: 42px;
  border-radius: 16px;
}

.rooms-empty-state,
.rooms-subhead {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(219, 175, 92, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #dccda1;
}

.rooms-subhead {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-footer-banner {
  margin-top: 12px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(219, 175, 92, 0.24);
  background: linear-gradient(180deg, rgba(10, 38, 27, 0.92), rgba(6, 22, 16, 0.98));
  color: #e8d4a0;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .hero-topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .home-topbar-center,
  .home-utility-nav {
    justify-content: flex-start;
  }

  .hero-marquee {
    padding: 20px 34px;
  }

  .hero-fan {
    opacity: 0.58;
    transform: scale(0.9);
  }

  .hero-decor {
    display: none;
  }

  .home-main-actions {
    grid-template-columns: 1fr;
  }

  .home-action-detail.is-open {
    max-height: 520px;
  }

  .home-action-detail.is-focused {
    max-height: 1200px;
  }
}

@media (max-width: 860px) {
  body:not(.game-active):not(.room-active):not(.profile-gated) .app-shell {
    width: min(100vw - 12px, 100%);
    padding: 12px 12px 28px;
    border-radius: 24px;
  }

  .hero-title-card {
    padding: 26px 20px 22px;
  }

  .hero-title-card h1 {
    font-size: clamp(2.8rem, 13vw, 4.6rem);
  }

  .hero-fan {
    display: none;
  }

  .home-screen {
    padding: 20px 14px 16px;
  }

  .home-menu-tile,
  .home-detail-panel,
  .home-rooms-stage {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-create-layout {
    grid-template-columns: 1fr;
  }

  .home-screen .rooms-table-head,
  .home-screen .rooms-table-row {
    grid-template-columns: minmax(68px, 0.9fr) minmax(0, 1.4fr) minmax(84px, 0.8fr);
  }

  .home-screen .rooms-table-head span:nth-child(4),
  .home-screen .rooms-table-head span:nth-child(5),
  .home-screen .rooms-table-row .rooms-table-status,
  .home-screen .rooms-table-row .rooms-table-action {
    display: none;
  }
}

@media (max-width: 640px) {
  .home-profile-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .home-topbar-center {
    width: 100%;
  }

  .home-chip-button,
  .hero .status-pill {
    flex: 1 1 0;
  }

  .hero-marquee {
    min-height: 0;
    padding: 12px 4px 0;
  }

  .hero-title-card::before,
  .hero-title-card::after {
    display: none;
  }

  .home-footer-banner {
    border-radius: 24px;
    line-height: 1.5;
  }

  .home-menu-tile {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .home-menu-copy {
    justify-items: center;
  }

  .home-detail-head {
    flex-direction: column;
    align-items: stretch;
  }

  .home-create-actions {
    justify-content: stretch;
  }
}

.panel-copy {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.screen {
  margin-top: 18px;
}

.lobby-stage {
  width: min(880px, 100%);
  margin: 14px auto 0;
  padding: 16px;
  gap: 14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(8, 39, 27, 0.96), rgba(5, 25, 17, 0.98));
}

.lobby-stage .section-head {
  align-items: center;
  gap: 12px;
}

.lobby-stage .section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: 0.08em;
  color: #f3d48e;
}

.lobby-stage .summary-card {
  padding: 12px;
  border-radius: 18px;
}

.lobby-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.lobby-stat-chip {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(221, 177, 92, 0.22);
  background: linear-gradient(180deg, rgba(13, 52, 36, 0.92), rgba(6, 27, 18, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 235, 176, 0.03);
}

.lobby-stat-chip-countdown {
  border-color: rgba(243, 207, 115, 0.4);
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(21, 67, 45, 0.96), rgba(8, 34, 22, 0.96));
}

.lobby-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d6c18f;
}

.lobby-stat-chip strong {
  color: #fff1c2;
  font-size: 1rem;
  line-height: 1.3;
}

.room-chat-panel {
  margin-top: 18px;
}

.room-chat-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(11, 28, 22, 0.96), rgba(7, 18, 14, 0.94)),
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.08), transparent 34%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.room-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.room-chat-list {
  min-height: 320px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
  display: grid;
  gap: 10px;
}

.room-chat-message,
.room-chat-empty {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
}

.room-chat-message.mine {
  border-color: rgba(223, 180, 69, 0.24);
  background: rgba(223, 180, 69, 0.08);
}

.room-chat-message.system {
  border-color: rgba(243, 207, 115, 0.3);
  background: rgba(243, 207, 115, 0.1);
}

.room-chat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.room-chat-message p,
.room-chat-empty {
  margin: 0;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
}

.room-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.room-chat-compose input {
  min-height: 46px;
}

.game-active .app-shell {
  width: min(1500px, calc(100vw - 12px));
  padding-top: 12px;
}

.game-active .hero {
  padding: 16px 20px;
}

.game-active .intro {
  display: none;
}

.game-active .eyebrow {
  margin-bottom: 4px;
}

.game-active .screen {
  margin-top: 12px;
}

.game-active .hero,
.room-active .hero {
  padding: 14px 18px;
}

.game-active .hero-marquee,
.room-active .hero-marquee,
.game-active .home-footer-banner,
.room-active .home-footer-banner {
  display: none;
}

.game-active .hero-topbar,
.room-active .hero-topbar {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.game-active .home-utility-nav,
.room-active .home-utility-nav {
  display: none;
}

.game-active .home-profile-card,
.room-active .home-profile-card {
  min-height: 84px;
  padding: 12px 16px;
}

.game-active .home-profile-avatar .avatar-badge,
.room-active .home-profile-avatar .avatar-badge {
  width: 68px;
  height: 68px;
}

.game-active .home-topbar-center,
.room-active .home-topbar-center,
.game-active .home-action-detail,
.room-active .home-action-detail {
  display: none;
}

@media (min-width: 1180px) {
  body.room-active .app-shell {
    width: min(1120px, calc(100vw - 390px));
    margin-left: 20px;
    margin-right: 350px;
  }

  .room-chat-panel {
    position: fixed;
    top: 24px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 24px);
    margin-top: 0;
    z-index: 20;
  }

  .room-chat-card {
    min-height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
  }

  .room-chat-list {
    min-height: 0;
    max-height: none;
    height: 100%;
  }
}

.hidden {
  display: none !important;
}

.grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  padding: 18px;
}

.stack {
  display: grid;
  gap: 12px;
}

.section-head,
.button-row,
.table-topbar,
.table-tools,
.seat-header,
.compact-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.compact {
  align-items: start;
}

.ghost {
  background: rgba(255, 255, 255, 0.04);
}

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

.checkbox-row input {
  width: auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-pill.offline {
  color: #ffd4c5;
  background: rgba(197, 92, 84, 0.22);
}

.status-pill.online {
  color: #d5f7e0;
  background: rgba(77, 162, 108, 0.24);
}

.summary-card,
.room-card,
.seat-card,
.notice-banner,
.log-box,
.mini-log,
.control-panel,
.center-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.summary-card,
.notice-banner,
.log-box,
.mini-log,
.control-panel,
.center-card {
  padding: 14px;
}

.notice-banner {
  max-width: 320px;
}

.notice-banner.error {
  border-color: rgba(197, 92, 84, 0.45);
  background: rgba(197, 92, 84, 0.16);
}

.notice-banner.success {
  border-color: rgba(77, 162, 108, 0.45);
  background: rgba(77, 162, 108, 0.16);
}

@media (max-width: 640px) {
  .hero > .notice-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .notice-refresh-btn {
    width: 100%;
  }
}

.rooms-list,
.seat-grid {
  display: grid;
  gap: 12px;
}

.room-card,
.seat-card {
  padding: 14px;
}

.room-card {
  display: grid;
  gap: 10px;
}

.room-card.inactive {
  opacity: 0.65;
}

.online-entry-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.online-entry-card {
  align-content: start;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14, 35, 28, 0.98), rgba(8, 21, 17, 0.92)),
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.08), transparent 35%);
}

.online-home-lead {
  background:
    linear-gradient(180deg, rgba(16, 41, 32, 0.98), rgba(8, 21, 17, 0.92)),
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.12), transparent 38%);
}

.primary-entry {
  border-color: rgba(243, 207, 115, 0.32);
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 235, 176, 0.08);
}

.primary-entry::after,
.online-entry-card::after {
  content: "";
  position: absolute;
  inset: auto -36px -44px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 207, 115, 0.12), transparent 68%);
  pointer-events: none;
}

.rooms-table {
  display: grid;
  gap: 8px;
}

.rooms-table-head,
.rooms-table-row {
  display: grid;
  grid-template-columns: minmax(64px, 0.8fr) minmax(0, 1.4fr) minmax(70px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
}

.rooms-table-head {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.rooms-table-row {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.rooms-table-row.inactive {
  opacity: 0.65;
}

.rooms-table-code {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rooms-table-action {
  display: flex;
  justify-content: flex-end;
}

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

.room-meta,
.room-actions,
.seat-meta,
.seat-tags,
.center-chip-row,
.result-list,
.result-points,
.ranking-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

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

.lobby-stage .seat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lobby-stage .seat-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  min-height: 96px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(243, 207, 115, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(12, 45, 31, 0.9), rgba(7, 27, 18, 0.94));
}

.lobby-stage .seat-header {
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.lobby-player-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.lobby-player-name {
  display: block;
  font-size: 1rem;
  color: #fff0bf;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-stage .seat-meta {
  gap: 8px;
  color: #dccc9f;
  font-size: 0.83rem;
}

.lobby-seat-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(243, 207, 115, 0.28);
  background: rgba(243, 207, 115, 0.08);
  color: #f4d487;
  font-weight: 700;
}

.lobby-stage .seat-tags {
  gap: 8px;
}

.lobby-stage .button-row {
  justify-content: flex-end;
  gap: 10px;
}

.lobby-stage .button-row button {
  min-width: 152px;
}

.avatar-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff8df;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  flex: none;
}

.avatar-badge.lobby-avatar {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(243, 207, 115, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 18px rgba(0, 0, 0, 0.18);
}

.lobby-stage .avatar-badge.lobby-avatar {
  width: 56px;
  height: 56px;
  border-width: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 14px rgba(0, 0, 0, 0.16);
}

@media (max-width: 900px) {
  .lobby-stage {
    width: min(100%, 720px);
  }

  .lobby-stage .seat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lobby-stage {
    margin-top: 10px;
    padding: 12px;
    gap: 12px;
    border-radius: 20px;
  }

  .lobby-stage .section-head h2 {
    font-size: 1.5rem;
  }

  .lobby-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lobby-stat-chip {
    min-height: 64px;
    padding: 10px 12px;
  }

  .lobby-stage .seat-card {
    padding: 10px;
    min-height: 88px;
  }

  .lobby-stage .button-row button {
    min-width: 0;
    flex: 1 1 100%;
  }
}

.avatar-badge-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-sprite {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background-image: url("./assets/avatars/roster-premium-16.png");
  background-repeat: no-repeat;
  background-color: rgba(6, 14, 16, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.avatar-badge-svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

.avatar-badge-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.avatar-badge[data-online-avatar="rozsa"] {
  background: linear-gradient(180deg, #b64c68, #6d1834);
}

.avatar-badge[data-online-avatar="makk"] {
  background: linear-gradient(180deg, #7b5b2a, #33210c);
}

.avatar-badge[data-online-avatar="tok"] {
  background: linear-gradient(180deg, #b86a24, #5a2b09);
}

.avatar-badge[data-online-avatar="zold"] {
  background: linear-gradient(180deg, #3f9150, #143f1d);
}

.avatar-badge[data-online-avatar="bagoly"] {
  background: linear-gradient(180deg, #5f5d9a, #201b48);
}

.avatar-badge[data-online-avatar="farkas"] {
  background: linear-gradient(180deg, #7d8a93, #2d3438);
}

.avatar-badge[data-online-avatar="mokus"] {
  background: linear-gradient(180deg, #a05633, #4b200f);
}

.avatar-badge[data-online-avatar="csillag"] {
  background: linear-gradient(180deg, #9d8631, #4d3c0d);
}

.game-shell {
  position: relative;
  overflow: visible;
  padding: 22px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 15%),
    linear-gradient(180deg, rgba(89, 42, 10, 0.96), rgba(57, 23, 6, 0.96));
}

.table-topbar {
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
}

.table-headline {
  display: grid;
  gap: 6px;
}

.table-status,
.subtle-copy {
  color: var(--muted);
  line-height: 1.45;
}

.table-topbar .table-status {
  display: none;
}

.table-stage {
  position: relative;
  min-height: 620px;
  padding: 20px 20px 154px;
  overflow: visible;
  border-radius: 32px;
  border: 2px solid rgba(230, 200, 115, 0.14);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 34%),
    repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 14px),
    linear-gradient(180deg, var(--table-felt), var(--table-felt-2));
  box-shadow:
    inset 0 0 0 10px rgba(82, 37, 12, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.table-center {
  position: absolute;
  inset: 92px 188px 126px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.center-summary {
  display: none;
}

.center-chip-row {
  gap: 8px;
}

.center-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 21, 17, 0.34);
  font-size: 0.88rem;
  color: var(--text);
}

.center-chip strong {
  color: var(--accent-strong);
}

.trick-board {
  display: grid;
  grid-template-columns: minmax(148px, 1fr) minmax(320px, 420px) minmax(148px, 1fr);
  grid-template-rows: auto minmax(180px, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 24px 18px;
  min-height: 388px;
}

.trick-slot {
  min-width: 120px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trick-slot-north {
  grid-column: 2;
  grid-row: 1;
}

.trick-slot-west {
  grid-column: 1;
  grid-row: 2;
}

.trick-slot-east {
  grid-column: 3;
  grid-row: 2;
}

.trick-slot-south {
  grid-column: 2;
  grid-row: 3;
}

.trick-center-card {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  display: grid;
  gap: 12px;
}

.table-corner-summary {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 6;
  width: min(340px, calc(100% - 36px));
  display: grid;
  justify-items: end;
  gap: 8px;
}

.table-corner-chip-row {
  justify-content: flex-end;
}

.table-corner-chip-row .center-chip {
  background: rgba(6, 18, 14, 0.84);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
}

.table-corner-chip-row-secondary .center-chip {
  font-size: 0.8rem;
  opacity: 0.95;
}

.table-status-box {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 6;
  width: min(320px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 18, 14, 0.86);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28);
}

.table-status-box-phase {
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.table-status-box-text {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.45;
}

.seat-anchor {
  position: absolute;
}

.seat-anchor.north {
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(260px, calc(100% - 520px));
}

.seat-anchor.west {
  top: 104px;
  left: 16px;
  width: 208px;
}

.seat-anchor.east {
  top: 104px;
  right: 16px;
  width: 208px;
}

.seat-anchor.south {
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(660px, calc(100% - 250px));
}

.seat-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 21, 17, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.seat-panel.is-current-turn {
  border-color: rgba(243, 207, 115, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(243, 207, 115, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.2);
}

.seat-panel.is-safe {
  opacity: 0.82;
}

.seat-panel.is-self {
  background: rgba(13, 36, 29, 0.66);
}

.seat-panel.empty {
  opacity: 0.55;
}

.seat-panel-north {
  width: min(260px, 100%);
  min-height: 260px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.seat-panel-north .seat-header {
  justify-content: center;
  flex-direction: column;
}

.seat-panel-north .seat-meta,
.seat-panel-north .seat-tags {
  justify-content: center;
}

.seat-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tag-pill.accent {
  color: #fff7d5;
  background: rgba(223, 180, 69, 0.2);
  border-color: rgba(223, 180, 69, 0.32);
}

.tag-pill.danger {
  color: #ffd4c5;
  background: rgba(197, 92, 84, 0.18);
  border-color: rgba(197, 92, 84, 0.28);
}

.tag-pill.ok {
  color: #d6f6df;
  background: rgba(77, 162, 108, 0.2);
  border-color: rgba(77, 162, 108, 0.28);
}

.card-stack {
  position: relative;
  height: 86px;
  width: 100%;
}

.card-stack img {
  position: absolute;
  width: 58px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.card-stack.horizontal img:nth-child(1) {
  left: 0;
}

.card-stack.horizontal img:nth-child(2) {
  left: 18px;
}

.card-stack.horizontal img:nth-child(3) {
  left: 36px;
}

.card-stack.horizontal img:nth-child(4) {
  left: 54px;
}

.card-stack.horizontal img:nth-child(5) {
  left: 72px;
}

.card-stack.vertical img:nth-child(1) {
  top: 0;
  left: 0;
}

.card-stack.vertical img:nth-child(2) {
  top: 10px;
  left: 8px;
}

.card-stack.vertical img:nth-child(3) {
  top: 20px;
  left: 16px;
}

.card-stack.vertical img:nth-child(4) {
  top: 30px;
  left: 24px;
}

.card-stack.vertical img:nth-child(5) {
  top: 40px;
  left: 32px;
}

.card-stack.fan-west,
.card-stack.fan-east {
  height: 128px;
  width: 116px;
  margin: 0 auto;
}

.card-stack.fan-west img,
.card-stack.fan-east img {
  left: 50%;
  top: 20px;
  transform-origin: center bottom;
}

.card-stack.fan-west img:nth-child(1) {
  transform: translateX(-50%) rotate(-28deg);
}

.card-stack.fan-west img:nth-child(2) {
  transform: translateX(-50%) rotate(-14deg);
}

.card-stack.fan-west img:nth-child(3) {
  transform: translateX(-50%) rotate(0deg);
}

.card-stack.fan-west img:nth-child(4) {
  transform: translateX(-50%) rotate(14deg);
}

.card-stack.fan-west img:nth-child(5) {
  transform: translateX(-50%) rotate(28deg);
}

.card-stack.fan-east img:nth-child(1) {
  transform: translateX(-50%) rotate(28deg);
}

.card-stack.fan-east img:nth-child(2) {
  transform: translateX(-50%) rotate(14deg);
}

.card-stack.fan-east img:nth-child(3) {
  transform: translateX(-50%) rotate(0deg);
}

.card-stack.fan-east img:nth-child(4) {
  transform: translateX(-50%) rotate(-14deg);
}

.card-stack.fan-east img:nth-child(5) {
  transform: translateX(-50%) rotate(-28deg);
}

.card-stack-label {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 17, 14, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
}

.table-footer {
  position: relative;
  height: 0;
  margin-top: 0;
}

.control-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  right: 18px;
  bottom: 214px;
  width: 288px;
  z-index: 9;
}

.control-column.is-call-mode {
  left: 50%;
  right: auto;
  bottom: 240px;
  width: min(620px, calc(100% - 260px));
  transform: translateX(-50%);
  z-index: 12;
}

@media (max-width: 1360px) {
  .table-stage {
    min-height: 590px;
    padding-bottom: 148px;
  }

  .table-footer {
    height: auto;
    margin-top: 18px;
  }

  .control-column {
    position: static;
    right: auto;
    bottom: auto;
    width: min(100%, 720px);
    margin: 0 auto;
  }

  .control-column.is-call-mode {
    position: static;
    left: auto;
    bottom: auto;
    width: min(100%, 760px);
    transform: none;
  }

  .table-center {
    inset: 104px 152px 118px;
    gap: 18px;
  }

  .trick-board {
    grid-template-columns: minmax(128px, 1fr) minmax(280px, 360px) minmax(128px, 1fr);
    gap: 20px 14px;
    min-height: 352px;
  }

  .seat-anchor.north {
    width: min(240px, calc(100% - 360px));
  }

  .seat-anchor.south {
    width: min(640px, calc(100% - 140px));
  }
}

.table-card {
  width: var(--card-width);
  min-width: var(--card-width);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #fff8ea;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.table-card img {
  display: block;
  width: 100%;
  height: var(--card-height);
  object-fit: contain;
}

.table-card.trick-card {
  width: 96px;
  min-width: 96px;
}

.table-card.trick-card img {
  height: 148px;
}

.card-owner {
  margin-top: 8px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.online-turn-status,
.online-call-prompt,
.online-game-banner,
.online-hand-caption,
.online-talon-info {
  display: none !important;
}

.online-turn-status,
.online-call-prompt,
.online-choice-group,
.online-talon-info,
.online-choice-strip,
.online-action-buttons {
  padding: 10px;
  border-radius: 14px;
  background: rgba(6, 20, 12, 0.92);
  border: 1px solid rgba(216, 180, 95, 0.24);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.22);
}

.online-talon-info {
  color: #f0dfac;
  font-size: 12px;
  line-height: 1.5;
}

.online-call-prompt {
  color: #fff0bd;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.online-action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.online-choice-group {
  display: grid;
  gap: 8px;
}

.online-action-panel.is-call-mode {
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.34);
}

.online-choice-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  color: #f6e2a6;
}

.online-choice-header strong {
  font-size: 13px;
  letter-spacing: 0.03em;
}

.online-choice-header span {
  color: rgba(246, 226, 166, 0.74);
  font-size: 11px;
}

.online-choice-strip {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.online-choice-card,
.online-action-btn,
.online-suit-btn {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 234, 164, 0.75);
  background: linear-gradient(#264d35, #0a2918 62%, #04140c);
  color: #f6e2a6;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 6px 10px rgba(0, 0, 0, 0.34);
}

.online-action-btn {
  padding: 10px 12px;
}

.online-action-btn.is-primary {
  background: linear-gradient(#7a5422, #26472f 56%, #0b1c12);
}

.online-action-btn.is-danger {
  background: linear-gradient(#6f2f1e, #341610 62%, #160907);
}

.online-choice-card,
.online-suit-btn {
  padding: 0 14px;
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 92px;
}

.online-choice-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.online-card-mini {
  width: 55px;
  height: 79px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff8ea;
  border: 1px solid rgba(123, 80, 28, 0.7);
}

.online-card-mini img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.online-choice-card.is-selected,
.online-suit-btn.is-selected {
  border-color: rgba(255, 244, 186, 0.98);
  box-shadow: inset 0 0 0 2px rgba(255, 236, 164, 0.26), 0 8px 16px rgba(0, 0, 0, 0.38);
  transform: translateY(-1px);
}

.online-action-btn:disabled,
.online-choice-card:disabled,
.online-suit-btn:disabled {
  opacity: 0.58;
  filter: grayscale(0.14);
}

.online-hand-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 154px;
  z-index: 8;
  margin: 0;
  color: rgba(255, 236, 180, 0.88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-shell .hand {
  --hand-count: 6;
  --hand-card-w: calc(var(--card-width) * 1.1);
  --hand-card-h: calc(var(--card-height) * 1.1);
  --hand-step: calc(var(--hand-card-w) * 0.75);
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: min(92vw, 440px);
  height: 190px;
  transform: translateX(-50%);
  z-index: 7;
  display: block;
}

.game-shell .hand > .card {
  --render-card-w: var(--hand-card-w);
  --render-card-h: var(--hand-card-h);
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--render-card-w);
  height: var(--render-card-h);
  padding: 0;
  border-radius: 8px;
  background: #fff8ea;
  border: 1.5px solid #7b501c;
  box-shadow: 0 7px 12px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(126, 80, 24, 0.12);
  display: block;
  overflow: hidden;
  margin-left: 0;
  transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(var(--hand-lift, 0px)) rotate(var(--hand-tilt, 0deg));
  transition: transform 0.28s ease, filter 0.28s ease, box-shadow 0.28s ease;
}

.game-shell .hand > .card.is-playable:hover:not(:disabled),
.game-shell .hand > .card.is-playable:focus-visible:not(:disabled),
.game-shell .hand > .card.is-selected {
  filter: brightness(1.08);
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(126, 80, 24, 0.12);
  z-index: 20;
  outline: none;
}

.game-shell .hand > .card.is-playable:hover:not(:disabled),
.game-shell .hand > .card.is-playable:focus-visible:not(:disabled),
.game-shell .hand > .card.is-selected {
  transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(-20px) rotate(0deg);
}

.game-shell .hand > .card:disabled {
  cursor: not-allowed;
  filter: saturate(0.85) brightness(0.9);
  opacity: 1;
}

.game-shell .card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff8ea;
  pointer-events: none;
}

.trick-enter {
  animation: trick-arrive 880ms cubic-bezier(0.18, 0.82, 0.22, 1);
}

.trick-slot-resolved .table-card {
  box-shadow:
    0 20px 34px rgba(0, 0, 0, 0.28),
    0 0 0 2px rgba(243, 207, 115, 0.18);
}

.trick-enter-south {
  animation-name: trick-arrive-south;
}

.trick-enter-west {
  animation-name: trick-arrive-west;
}

.trick-enter-east {
  animation-name: trick-arrive-east;
}

.trick-enter-north {
  animation-name: trick-arrive-north;
}

@keyframes trick-arrive-south {
  from {
    opacity: 0.35;
    transform: translateY(180px) scale(0.86) rotate(-6deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes trick-arrive-north {
  from {
    opacity: 0.35;
    transform: translateY(-180px) scale(0.86) rotate(6deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes trick-arrive-west {
  from {
    opacity: 0.35;
    transform: translateX(-220px) scale(0.86) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1) rotate(0deg);
  }
}

@keyframes trick-arrive-east {
  from {
    opacity: 0.35;
    transform: translateX(220px) scale(0.86) rotate(10deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1) rotate(0deg);
  }
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(4, 11, 9, 0.6);
  backdrop-filter: blur(8px);
}

.overlay-card {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.round-end-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 10, 7, 0.7);
  backdrop-filter: blur(8px);
}

.round-end-card {
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  margin: 0 auto;
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top, rgba(170, 39, 23, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(10, 37, 24, 0.98), rgba(5, 18, 12, 0.98));
  border: 1px solid rgba(244, 215, 154, 0.12);
  border-radius: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 30px 56px rgba(0, 0, 0, 0.42);
}

.round-end-card h2 {
  margin: 0 0 8px;
  font-size: 1.9rem;
}

.round-end-summary {
  margin: 0 0 14px;
  color: rgba(247, 239, 217, 0.84);
  font-size: 0.94rem;
  line-height: 1.45;
}

.round-end-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.round-end-stat {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(244, 215, 154, 0.12);
  background: rgba(4, 20, 13, 0.36);
}

.round-end-stat span {
  color: rgba(247, 239, 217, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.round-end-stat strong {
  color: #fff3cb;
  font-size: 1.02rem;
}

.round-end-players {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(244, 215, 154, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.round-end-players-title {
  margin: 0 0 10px;
  color: rgba(247, 239, 217, 0.82);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.round-end-players-list,
.round-end-meta {
  display: grid;
  gap: 8px;
}

.round-end-meta {
  margin-top: 12px;
}

.round-end-meta-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) 1.2fr;
  gap: 10px;
  align-items: start;
  color: #f3e3b1;
  font-size: 13px;
}

.round-end-meta-row strong {
  color: #fff3cb;
}

.round-end-player-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(244, 215, 154, 0.12);
  background: rgba(4, 20, 13, 0.36);
}

.round-end-player-name {
  color: #fff4cf;
  font-size: 0.98rem;
  font-weight: 800;
}

.round-end-player-values {
  color: rgba(247, 239, 217, 0.82);
  font-size: 0.84rem;
  line-height: 1.35;
}

.round-end-actions {
  margin-top: auto;
}

.round-end-actions button {
  width: 100%;
}

.overlay-body,
.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.result-row,
.ranking-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.result-row strong {
  color: var(--accent-strong);
}

.ranking-item {
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
}

.ranking-number {
  width: 28px;
  text-align: center;
  color: var(--accent-strong);
  font-weight: 700;
}

.bug-card {
  width: min(620px, calc(100vw - 32px));
}

.dev-panel {
  margin-top: 22px;
  padding: 14px 18px 18px;
}

.dev-panel > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 700;
  list-style: none;
}

.dev-panel > summary::-webkit-details-marker {
  display: none;
}

.dev-grid {
  margin-top: 16px;
}

.span-two {
  grid-column: 1 / -1;
}

.log-box,
.mini-log {
  white-space: pre-wrap;
  overflow: auto;
}

.log-box {
  min-height: 240px;
}

.mini-log {
  min-height: 140px;
}

@media (max-width: 1200px) {
  .table-stage {
    min-height: 560px;
    padding-bottom: 148px;
  }

  .table-center {
    inset: 116px 128px 114px;
    gap: 16px;
  }

  .trick-board {
    grid-template-columns: minmax(108px, 1fr) minmax(250px, 320px) minmax(108px, 1fr);
    gap: 16px 12px;
    min-height: 320px;
  }

  .seat-anchor.north {
    width: min(220px, calc(100% - 300px));
  }

  .seat-anchor.west,
  .seat-anchor.east {
    width: 176px;
  }

  .seat-anchor.south {
    width: min(620px, calc(100% - 120px));
  }

  .control-column {
    position: static;
    right: auto;
    bottom: auto;
    width: min(100%, 720px);
    margin: 0 auto;
  }

  .game-shell .hand {
    width: min(88vw, 400px);
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100vw - 12px, 960px);
    padding: 14px 0 28px;
  }

  .hero,
  .two-col {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero {
    padding: 18px;
    gap: 16px;
  }

  .hero-art {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    height: 130px;
    margin-top: 6px;
  }

  .hero-art-card {
    width: 82px;
    height: 126px;
  }

  .hero-art-card-a {
    left: 4px;
    right: auto;
  }

  .hero-art-card-b {
    left: 74px;
    right: auto;
  }

  .hero-art-card-c {
    left: 144px;
    right: auto;
  }

  .rooms-table-head,
  .rooms-table-row {
    grid-template-columns: 1fr;
  }

  .rooms-table-action {
    justify-content: flex-start;
  }

  .hero-side {
    justify-items: start;
  }

  .span-two {
    grid-column: auto;
  }

  .game-shell {
    padding: 16px;
  }

  .table-stage {
    min-height: 0;
    padding: 16px 14px 180px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    overflow: visible;
  }

  .seat-anchor,
  .table-center {
    position: static;
    transform: none;
    width: auto;
    inset: auto;
  }

  .seat-anchor.north,
  .table-center,
  .seat-anchor.south {
    grid-column: 1 / -1;
  }

  .seat-anchor.north {
    order: 1;
  }

  .table-center {
    order: 2;
    gap: 14px;
  }

  .table-corner-summary {
    position: static;
    order: 2;
    width: 100%;
    justify-items: stretch;
  }

  .table-corner-chip-row {
    justify-content: flex-start;
  }

  .table-status-box {
    position: static;
    order: 6;
    width: 100%;
  }

  .seat-anchor.west {
    order: 3;
    grid-column: 1;
  }

  .seat-anchor.east {
    order: 4;
    grid-column: 2;
  }

  .seat-anchor.south {
    order: 5;
  }

  .trick-board {
    grid-template-columns: minmax(54px, 1fr) minmax(158px, 220px) minmax(54px, 1fr);
    grid-template-rows: auto auto auto;
    gap: 10px 8px;
    min-height: auto;
  }

  .trick-slot {
    min-width: 0;
    min-height: 0;
  }

  .control-column {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin: 0;
  }

  .control-column.is-call-mode {
    position: static;
    width: 100%;
    transform: none;
  }

  .round-end-card {
    width: min(100%, 410px);
    max-height: calc(100vh - 24px);
    padding: 24px 16px 18px;
    border-radius: 24px;
  }

  .round-end-grid {
    gap: 8px;
  }

  .center-card,
  .summary-card {
    padding: 12px;
  }

  .seat-panel {
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .seat-panel-north {
    min-height: 0;
    aspect-ratio: auto;
    width: 100%;
  }

  .card-stack {
    height: 74px;
  }

  .card-stack img {
    width: 50px;
    height: 74px;
  }

  .card-stack.horizontal img:nth-child(2) {
    left: 14px;
  }

  .card-stack.horizontal img:nth-child(3) {
    left: 28px;
  }

  .card-stack.horizontal img:nth-child(4) {
    left: 42px;
  }

  .card-stack.horizontal img:nth-child(5) {
    left: 56px;
  }

  .card-stack.vertical img:nth-child(2) {
    top: 8px;
    left: 6px;
  }

  .card-stack.vertical img:nth-child(3) {
    top: 16px;
    left: 12px;
  }

  .card-stack.vertical img:nth-child(4) {
    top: 24px;
    left: 18px;
  }

  .card-stack.vertical img:nth-child(5) {
    top: 32px;
    left: 24px;
  }

  .online-hand-caption {
    left: 18px;
    right: 18px;
    bottom: 156px;
  }

  .game-shell .hand {
    left: 50%;
    bottom: 12px;
    width: min(94vw, 360px);
    height: 166px;
    transform: translateX(-50%);
  }

  .game-shell .hand > .card {
    width: 94px;
    height: 146px;
  }

  .table-card,
  .table-card.trick-card {
    width: 76px;
    min-width: 76px;
  }

  .table-card img,
  .table-card.trick-card img {
    height: 118px;
  }

  .card-owner {
    font-size: 0.74rem;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: calc(100vw - 8px);
  }

  .hero,
  .panel,
  .dev-panel,
  .game-shell,
  .overlay-card {
    border-radius: 18px;
  }

  .table-topbar {
    gap: 10px;
  }

  .table-tools {
    width: 100%;
  }

  .table-tools > * {
    flex: 1 1 0;
  }

  .table-stage {
    padding: 12px 10px 170px;
    gap: 12px;
    border-radius: 22px;
  }

  .seat-anchor.west,
  .seat-anchor.east {
    grid-column: 1 / -1;
  }

  .table-corner-summary,
  .table-status-box {
    width: 100%;
  }

  .trick-board {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 8px;
  }

  .trick-slot-north {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .trick-slot-west {
    grid-column: 1;
    grid-row: 2;
  }

  .trick-slot-east {
    grid-column: 2;
    grid-row: 2;
  }

  .trick-center-card {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .trick-slot-south {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .online-action-buttons {
    grid-template-columns: 1fr;
  }

  .online-choice-card,
  .online-suit-btn {
    min-width: 56px;
    min-height: 80px;
  }

  .online-card-mini {
    width: 48px;
    height: 70px;
  }

  .online-hand-caption {
    left: 12px;
    right: 12px;
    bottom: 148px;
  }

  .table-card,
  .table-card.trick-card {
    width: 68px;
    min-width: 68px;
  }

  .table-card img,
  .table-card.trick-card img {
    height: 106px;
  }
}

@media (max-width: 420px) {
  .hero-art {
    height: 112px;
  }

  .hero-art-card {
    width: 72px;
    height: 110px;
  }

  .hero-art-card-b {
    left: 56px;
  }

  .hero-art-card-c {
    left: 108px;
  }

  .table-stage {
    padding-bottom: 160px;
  }

  .online-choice-card,
  .online-suit-btn {
    min-height: 76px;
  }
}

.game-shell {
  display: grid;
  place-items: center;
  padding: 18px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.game-shell .phone,
.game-shell .phone button {
  font-family: Georgia, "Times New Roman", serif;
}

.game-shell .phone {
  position: relative;
  width: min(calc(100vw - 36px), 560px);
  height: min(calc(100vh - 84px), 980px);
  min-height: 760px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(33, 118, 73, 0.68) 0 22%, rgba(15, 66, 40, 0.78) 48%, rgba(5, 28, 18, 0.98) 100%),
    repeating-radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, #0b2d1b, #06180f 68%);
  box-shadow: 0 0 0 8px #2a1508, 0 0 0 13px #6e4b20, 0 26px 70px rgba(0, 0, 0, 0.7);
}

.game-shell .phone::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(216, 180, 95, 0.82);
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px rgba(20, 8, 2, 0.7), inset 0 0 34px rgba(0, 0, 0, 0.78);
  pointer-events: none;
  z-index: 1;
}

.game-shell .phone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 223, 135, 0.12), transparent 18%),
    radial-gradient(circle at 82% 26%, rgba(255, 223, 135, 0.09), transparent 20%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent 15%, transparent 85%, rgba(0, 0, 0, 0.3));
  mix-blend-mode: screen;
  opacity: 0.75;
}

.game-shell .screen.table-screen {
  position: absolute;
  inset: 0;
  margin-top: 0;
  padding: 14px 14px 148px;
  z-index: 2;
}

.game-shell .ornate {
  background: linear-gradient(180deg, rgba(26, 73, 47, 0.98), rgba(5, 24, 15, 0.98));
  border: 1px solid rgba(216, 180, 95, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 245, 182, 0.16), inset 0 0 18px rgba(0, 0, 0, 0.48), 0 8px 18px rgba(0, 0, 0, 0.38);
}

.game-shell .topbar {
  position: absolute;
  left: 18px;
  top: 18px;
  right: 18px;
  height: 74px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  z-index: 4;
}

.game-shell .status-panel {
  width: 148px;
  border-radius: 13px;
  padding: 9px 12px;
  text-align: left;
}

.game-shell .status-panel .small {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #f8e7b0;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.25;
  text-shadow: 0 1px 2px #000;
}

.game-shell .status-panel .target {
  font-size: 12.5px;
  margin-top: 4px;
  color: rgba(240, 223, 172, 0.88);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 2px #000;
}

.game-shell .player {
  position: absolute;
  display: grid;
  place-items: center;
  z-index: 3;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.38));
}

.game-shell .player.top {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.game-shell .player.left {
  left: 10px;
  top: 218px;
}

.game-shell .player.right {
  right: 10px;
  top: 218px;
}

.game-shell .player.me {
  left: 50%;
  bottom: 252px;
  transform: translateX(-50%);
  z-index: 5;
}

.game-shell .player.is-safe {
  opacity: 0.76;
}

.game-shell .player.is-bunko .nameplate {
  background: linear-gradient(180deg, #7a2e20, #3f130f);
  border-color: rgba(255, 183, 160, 0.66);
}

.game-shell .opponent-cards {
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: -12px;
}

.game-shell .mini-back {
  width: 28px;
  height: 40px;
  margin-left: -9px;
  border-radius: 6px;
  border: 1px solid rgba(216, 180, 95, 0.78);
  background-image: url("./assets/cards/backs/back-green.png");
  background-size: cover;
  background-position: center;
  background-color: #f4ead4;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.35);
}

.game-shell .mini-back:first-child {
  margin-left: 0;
}

.game-shell .mini-back:nth-child(1) { transform: rotate(-16deg); }
.game-shell .mini-back:nth-child(2) { transform: rotate(-8deg); }
.game-shell .mini-back:nth-child(3) { transform: rotate(0deg); }
.game-shell .mini-back:nth-child(4) { transform: rotate(8deg); }
.game-shell .mini-back:nth-child(5) { transform: rotate(16deg); }
.game-shell .mini-back:nth-child(6) { transform: rotate(24deg); }

.game-shell .opponent-cards.is-revealed {
  gap: 0;
}

.game-shell .mini-face-card {
  width: 30px;
  height: 47px;
  margin-left: -10px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 132, 0.78);
  background: #f8efd8;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}

.game-shell .mini-face-card:first-child {
  margin-left: 0;
}

.game-shell .mini-face-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.game-shell .mini-face-card:nth-child(1) { transform: rotate(-16deg); }
.game-shell .mini-face-card:nth-child(2) { transform: rotate(-8deg); }
.game-shell .mini-face-card:nth-child(3) { transform: rotate(0deg); }
.game-shell .mini-face-card:nth-child(4) { transform: rotate(8deg); }
.game-shell .mini-face-card:nth-child(5) { transform: rotate(16deg); }
.game-shell .mini-face-card:nth-child(6) { transform: rotate(24deg); }

.game-shell .avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.game-shell .avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid var(--accent-strong);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff0bc;
  text-shadow: 0 2px 4px #000;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.55), 0 5px 14px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.game-shell .avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.game-shell .avatar-sprite {
  width: 100%;
  height: 100%;
}

.game-shell .avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

.game-shell .avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.game-shell .avatar.is-empty,
.game-shell .avatar[data-online-avatar="rozsa"] {
  background: radial-gradient(circle at 38% 28%, #e6a1b3, #8a3552 56%, #260b13);
}

.game-shell .avatar[data-online-avatar="makk"] {
  background: radial-gradient(circle at 38% 28%, #d5ba82, #7a5620 56%, #241608);
}

.game-shell .avatar[data-online-avatar="tok"] {
  background: radial-gradient(circle at 38% 28%, #f1bc6f, #985317 56%, #281208);
}

.game-shell .avatar[data-online-avatar="zold"] {
  background: radial-gradient(circle at 38% 28%, #9fd8a1, #2f7c3d 56%, #0f2714);
}

.game-shell .avatar[data-online-avatar="bagoly"] {
  background: radial-gradient(circle at 38% 28%, #b8b1ef, #564596 56%, #161126);
}

.game-shell .avatar[data-online-avatar="farkas"] {
  background: radial-gradient(circle at 38% 28%, #d0d7db, #66747d 56%, #1b2125);
}

.game-shell .avatar[data-online-avatar="mokus"] {
  background: radial-gradient(circle at 38% 28%, #deae87, #8b4b26 56%, #251109);
}

.game-shell .avatar[data-online-avatar="csillag"] {
  background: radial-gradient(circle at 38% 28%, #ead88e, #8d7224 56%, #241a09);
}

.game-shell .player.is-current .avatar {
  border-color: #ffe39a;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.55), 0 5px 14px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 213, 107, 0.5);
}

.game-shell .badge {
  position: absolute;
  right: -8px;
  bottom: -5px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(#ead184, #8b5d1b);
  border: 1px solid #fff0b0;
  color: #1b1104;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
}

.game-shell .nameplate {
  margin-top: 5px;
  min-width: 74px;
  max-width: 156px;
  padding: 4px 10px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(216, 180, 95, 0.72);
  background: rgba(5, 23, 14, 0.84);
  font-size: 13px;
  font-weight: 700;
  color: #f5e2ab;
  text-shadow: 0 1px 2px #000;
}

.game-shell .player.is-current .nameplate {
  background: linear-gradient(180deg, #ffe39a 0%, #d8b45f 45%, #8d6725 100%);
  border-color: #fff1b8;
  color: #1d1205;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(216, 180, 95, 0.24), 0 0 18px rgba(255, 213, 107, 0.58), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.game-shell .trick-value-box {
  margin-top: 4px;
  min-width: 114px;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(216, 180, 95, 0.58);
  background: linear-gradient(180deg, rgba(12, 45, 28, 0.92), rgba(2, 12, 7, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045), 0 3px 7px rgba(0, 0, 0, 0.34);
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
  color: rgba(240, 223, 172, 0.88);
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}

.game-shell .trick-value-box strong {
  color: #ffd77f;
  font-size: 11px;
  font-weight: 900;
}

.game-shell .table-center {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 280px;
  height: 264px;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.game-shell .glow-ring {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 180, 95, 0.16), rgba(216, 180, 95, 0.04) 42%, transparent 70%);
  border: 1px solid rgba(216, 180, 95, 0.18);
  box-shadow: 0 0 35px rgba(216, 180, 95, 0.11);
}

.game-shell .call-preview {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  pointer-events: none;
}

.game-shell .call-preview-card,
.game-shell .call-preview-badge {
  min-width: 138px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 223, 142, 0.68);
  background: linear-gradient(180deg, rgba(18, 46, 28, 0.96), rgba(5, 16, 10, 0.96));
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 247, 214, 0.06) inset;
  text-align: center;
}

.game-shell .call-preview-card img {
  display: block;
  width: 112px;
  height: auto;
  margin: 6px auto 0;
  border-radius: 11px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.34);
}

.game-shell .call-preview-badge strong {
  display: block;
  margin-top: 4px;
  color: #ffe19a;
  font-size: 24px;
  font-weight: 900;
}

.game-shell .call-preview-label {
  color: #f4e2ad;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px #000;
}

.game-shell .trick-card {
  position: absolute;
  width: 102px;
  height: 154px;
  transition: 0.25s transform, 0.25s opacity;
}

.game-shell .trick-card.north { left: 89px; top: -8px; transform: rotate(5deg); }
.game-shell .trick-card.west { left: 2px; top: 70px; transform: rotate(-13deg); }
.game-shell .trick-card.east { right: 2px; top: 70px; transform: rotate(13deg); }
.game-shell .trick-card.south { left: 89px; bottom: -8px; transform: rotate(-4deg); }

.game-shell .trick-card .card {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #fff8ea;
  border: 1.5px solid #7b501c;
  box-shadow: 0 7px 12px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(126, 80, 24, 0.12);
}

.game-shell .trick-card.winning-card .card {
  box-shadow: 0 0 0 2px rgba(255, 227, 154, 0.7), 0 0 20px rgba(255, 213, 107, 0.32), 0 7px 12px rgba(0, 0, 0, 0.45);
}

.game-shell .trick-card .card.online-trick-card {
  animation: none;
  transition: transform 0.6s ease, opacity 0.4s ease, filter 0.4s ease;
  transform-style: preserve-3d;
}

.game-shell .trick-card .card.online-trick-card.is-facedown {
  transform: rotateY(180deg) scale(0.98);
  filter: saturate(0.92) brightness(0.92);
}

.game-shell .trick-card .card.online-trick-card.is-entering.from-seat-0 {
  animation: online-card-enter-south 1320ms cubic-bezier(0.2, 0.7, 0.16, 1) both;
}

.game-shell .trick-card .card.online-trick-card.is-entering.from-seat-1 {
  animation: online-card-enter-west 1440ms cubic-bezier(0.2, 0.7, 0.16, 1) both;
}

.game-shell .trick-card .card.online-trick-card.is-entering.from-seat-2 {
  animation: online-card-enter-north 1440ms cubic-bezier(0.2, 0.7, 0.16, 1) both;
}

.game-shell .trick-card .card.online-trick-card.is-entering.from-seat-3 {
  animation: online-card-enter-east 1440ms cubic-bezier(0.2, 0.7, 0.16, 1) both;
}

.game-shell .trick-card.taking-card .card.online-trick-card,
.game-shell .trick-card.winning-card .card.online-trick-card {
  box-shadow: 0 0 0 2px rgba(255, 238, 177, 0.24), 0 14px 26px rgba(0, 0, 0, 0.42);
}

@keyframes online-trick-settle {
  from {
    transform: scale(0.96);
    opacity: 0.7;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes online-card-enter-south {
  from {
    transform: translateY(84px) scale(0.88);
    opacity: 0.18;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes online-card-enter-west {
  from {
    transform: translateX(-82px) translateY(14px) scale(0.88);
    opacity: 0.18;
  }
  to {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes online-card-enter-north {
  from {
    transform: translateY(-74px) scale(0.88);
    opacity: 0.18;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes online-card-enter-east {
  from {
    transform: translateX(82px) translateY(14px) scale(0.88);
    opacity: 0.18;
  }
  to {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
  }
}

.game-shell .call-panel {
  position: absolute;
  right: 14px;
  top: 16px;
  width: 176px;
  border-radius: 11px;
  padding: 8px 10px;
  text-align: left;
  z-index: 6;
}

.game-shell .call-panel p {
  margin: 1px 0;
  font-size: 13.5px;
  line-height: 1.3;
  color: #f0dfac;
  text-shadow: 0 1px 2px #000;
  overflow-wrap: anywhere;
}

.game-shell .call-panel strong {
  color: #ffb55c;
  font-weight: 900;
}

.game-shell .table-status-box {
  position: absolute;
  left: 18px;
  bottom: 246px;
  width: 214px;
  max-width: 214px;
  min-height: 188px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(216, 180, 95, 0.62);
  background: linear-gradient(180deg, rgba(15, 53, 33, 0.96), rgba(4, 16, 10, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 8px 14px rgba(0, 0, 0, 0.34);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #f4e2ad;
  text-shadow: 0 1px 2px #000;
  text-align: center;
  z-index: 7;
}

.game-shell .table-status-box-phase {
  color: var(--accent-strong);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.game-shell .table-status-box-text {
  color: #f4e2ad;
  font-size: 12.5px;
}

.game-shell .table-status-box-hint {
  margin-top: 8px;
  color: rgba(239, 229, 194, 0.82);
  font-size: 11px;
  line-height: 1.35;
}

.game-shell .table-status-box-log {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 239, 178, 0.16);
  text-align: left;
}

.game-shell .table-status-box-log-title {
  margin-bottom: 7px;
  color: #ffdc88;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-shell .table-status-box-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 182px;
  overflow-y: auto;
  padding-right: 4px;
}

.game-shell .table-status-box-log-entry {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(245, 233, 191, 0.95);
}

.game-shell .table-status-box-log-time {
  color: rgba(255, 220, 136, 0.88);
  font-variant-numeric: tabular-nums;
}

.game-shell .table-status-box-log-text {
  color: rgba(245, 233, 191, 0.95);
  overflow-wrap: anywhere;
}

.game-shell .table-status-box-log-empty {
  color: rgba(239, 229, 194, 0.72);
  font-size: 11px;
  line-height: 1.35;
}

.game-shell .table-status-box-scoreboard {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 239, 178, 0.16);
  text-align: left;
}

.game-shell .table-status-box-scoreboard-title {
  margin-bottom: 8px;
  color: #ffdc88;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-shell .table-status-box-score-grid {
  display: grid;
  gap: 6px 8px;
  align-items: center;
}

.game-shell .table-status-box-score-label {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 233, 176, 0.86);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-shell .table-status-box-score-cell {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 7px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 244, 205, 0.08);
}

.game-shell .table-status-box-score-cell-player {
  justify-content: flex-start;
}

.game-shell .table-status-box-score-cell-player.is-self {
  background: linear-gradient(180deg, rgba(234, 191, 83, 0.2), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 226, 140, 0.22);
}

.game-shell .table-status-box-score-player {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.game-shell .table-status-box-score-avatar {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.game-shell .table-status-box-score-avatar .avatar-badge-image,
.game-shell .table-status-box-score-avatar .avatar-badge-sprite,
.game-shell .table-status-box-score-avatar .avatar-badge-fallback {
  width: 22px;
  height: 22px;
}

.game-shell .table-status-box-score-name {
  min-width: 0;
  color: #f7e8ba;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-shell .table-status-box-score-bunkos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 14px;
}

.game-shell .table-status-box-score-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #3d3d3d, #090909 72%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.game-shell .table-status-box-score-zero {
  color: rgba(239, 229, 194, 0.74);
  font-size: 11px;
  font-weight: 700;
}

.game-shell .table-status-box-score-value {
  color: #fff3c4;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.game-shell .action-status-box {
  position: absolute;
  right: 30px;
  width: 168px;
  bottom: 246px;
  z-index: 7;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
}

.game-shell .action-status-box p {
  margin: 0;
  color: #f4e2ad;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 2px #000;
}

.game-shell .action-status-box p + p {
  margin-top: 4px;
}

.game-shell .action-status-box span:last-child {
  color: #fff0bc;
}

.game-shell .actions {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 186px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  z-index: 8;
}

.game-shell .action-btn {
  min-height: 46px;
  border-radius: 13px;
  border: 1px solid rgba(255, 238, 164, 0.75);
  background: linear-gradient(#254f34, #092917 62%, #04140c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 7px 12px rgba(0, 0, 0, 0.45);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #f6e2a6;
  text-shadow: 0 2px 3px #000;
}

.game-shell .action-btn.snapszer {
  background: linear-gradient(#704b1c, #1e3d23 55%, #07170c);
  color: #fff0b8;
}

.game-shell .control-column {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 236px;
  width: auto;
  z-index: 9;
}

.game-shell .control-column.is-call-mode {
  left: 18px;
  right: 18px;
  bottom: 246px;
  width: auto;
  transform: none;
}

.game-shell .online-action-panel {
  padding: 10px;
  border-radius: 14px;
  background: rgba(6, 20, 12, 0.92);
  border: 1px solid rgba(216, 180, 95, 0.24);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.22);
}

.game-shell .online-turn-status:not(.hidden),
.game-shell .online-talon-info:not(.hidden),
.game-shell .online-call-prompt:not(.hidden),
.game-shell .online-hand-caption:not(.hidden) {
  display: block !important;
}

.game-shell .online-action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.game-shell .online-choice-strip {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: 4px 6px 8px;
  scrollbar-gutter: stable both-edges;
}

.game-shell .online-choice-card,
.game-shell .online-suit-btn {
  flex: 0 0 auto;
}

.game-shell .online-choice-card {
  min-width: 68px;
  min-height: 92px;
}

.game-shell .online-suit-btn {
  min-width: 68px;
  min-height: 92px;
}

.game-shell .hand {
  --hand-count: 6;
  --hand-card-w: 128px;
  --hand-card-h: 198px;
  --hand-step: 90px;
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: min(92%, 500px);
  height: 210px;
  transform: translateX(-50%);
  z-index: 7;
}

.game-shell .hand > .card {
  background: #fff8ea;
  opacity: 1;
}

.game-shell .hand > .card:nth-child(1) { transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(12px) rotate(-15deg); }
.game-shell .hand > .card:nth-child(2) { transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(2px) rotate(-9deg); }
.game-shell .hand > .card:nth-child(3) { transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(-4px) rotate(-3deg); }
.game-shell .hand > .card:nth-child(4) { transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(-4px) rotate(3deg); }
.game-shell .hand > .card:nth-child(5) { transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(2px) rotate(9deg); }
.game-shell .hand > .card:nth-child(6) { transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(12px) rotate(15deg); }

.game-shell .hand > .card.is-playable:hover:not(:disabled),
.game-shell .hand > .card.is-playable:focus-visible:not(:disabled),
.game-shell .hand > .card.is-selected {
  transform: translateX(calc(-50% + (var(--hand-offset) * var(--hand-step)))) translateY(-18px) rotate(0deg);
}

.game-shell .online-hand-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 220px;
  z-index: 8;
  margin: 0;
  color: rgba(255, 236, 180, 0.88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-shell .online-bug-fab {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  min-width: 66px;
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 236, 164, 0.75);
  background: linear-gradient(#6f2f1e, #341610 62%, #160907);
  color: #f8e5c0;
}

@media (min-width: 901px) {
  .game-shell {
    padding: 18px 116px 18px 236px;
    overflow: visible;
  }

  .game-shell .phone {
    overflow: visible;
    justify-self: center;
  }

  .game-shell .topbar {
    left: 18px;
    top: 18px;
    right: 18px;
    width: auto;
    height: auto;
    z-index: 4;
  }

  .game-shell .status-panel {
    width: 148px;
  }

  .game-shell .table-status-box {
    left: -274px;
    top: 18px;
    bottom: auto;
    width: 252px;
    max-width: 252px;
    z-index: 14;
  }

  .game-shell .table-status-box-log-list {
    max-height: 312px;
  }

  .game-shell .table-status-box-score-grid {
    gap: 7px 8px;
  }

  .game-shell .table-status-box-score-label {
    padding-inline: 7px;
  }

  .game-shell .actions {
    left: auto;
    right: -164px;
    bottom: 246px;
    width: 138px;
    grid-template-columns: 1fr;
    gap: 10px;
    z-index: 14;
  }

  .game-shell .action-btn {
    min-height: 48px;
  }

  .game-shell .online-bug-fab {
    right: -104px;
    bottom: 14px;
    min-width: 78px;
    z-index: 14;
  }
}

.game-shell .table-card,
.game-shell .table-topbar,
.game-shell .table-stage,
.game-shell .table-footer,
.game-shell .center-summary,
.game-shell .center-card,
.game-shell .table-corner-chip-row {
  display: none;
}

@media (max-width: 900px) {
  .game-shell {
    --mobile-safe-bottom: max(env(safe-area-inset-bottom, 0px), 10px);
    --mobile-hand-bottom: calc(var(--mobile-safe-bottom) + 54px);
    padding: 8px 0 0;
  }

  .game-shell .phone {
    width: calc(100vw - 8px);
    height: calc(100dvh - 8px);
    min-height: 0;
    border-radius: 20px;
  }

  .game-shell .player.left,
  .game-shell .player.right {
    top: 196px;
  }

  .game-shell .table-center {
    top: 40%;
    width: 244px;
    height: 232px;
  }

  .game-shell .trick-card {
    width: 88px;
    height: 132px;
  }

  .game-shell .trick-card.north,
  .game-shell .trick-card.south {
    left: 78px;
  }

  .game-shell .call-panel {
    width: 148px;
    padding: 7px 8px;
  }

  .game-shell .table-status-box,
  .game-shell .action-status-box {
    width: 138px;
    max-width: 138px;
    bottom: 224px;
    font-size: 11.5px;
  }

  .game-shell .table-status-box {
    display: none;
  }

  .game-shell .table-status-box {
    min-height: 156px;
  }

  .game-shell .table-status-box-log-list {
    max-height: 120px;
  }

  .game-shell .table-status-box-score-grid {
    gap: 5px 6px;
  }

  .game-shell .table-status-box-score-label,
  .game-shell .table-status-box-score-cell {
    min-height: 30px;
    padding: 5px 6px;
  }

  .game-shell .table-status-box-score-name {
    font-size: 10px;
  }

  .game-shell .player.me {
    bottom: calc(var(--mobile-hand-bottom) + 216px);
  }

  .game-shell .actions {
    bottom: calc(var(--mobile-hand-bottom) + 154px);
  }

  .game-shell .control-column,
  .game-shell .control-column.is-call-mode {
    left: 12px;
    right: 12px;
    bottom: calc(var(--mobile-hand-bottom) + 200px);
  }

  .game-shell .hand {
    bottom: var(--mobile-hand-bottom);
    width: min(96%, 420px);
    height: 184px;
  }

  .game-shell .hand > .card {
    width: 108px;
    height: 168px;
  }

  .game-shell .online-hand-caption {
    bottom: calc(var(--mobile-hand-bottom) + 204px);
  }

  .game-shell .online-bug-fab {
    position: fixed;
    right: 10px;
    bottom: var(--mobile-safe-bottom);
    min-width: 108px;
    min-height: 44px;
    z-index: 20;
  }
}

@media (max-width: 640px) {
  .game-shell .status-panel {
    width: 126px;
    padding: 8px 9px;
  }

  .game-shell .player.left {
    left: 4px;
  }

  .game-shell .player.right {
    right: 4px;
  }

  .game-shell .avatar {
    width: 76px;
    height: 76px;
  }

  .game-shell .badge {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .game-shell .nameplate {
    max-width: 132px;
    font-size: 12px;
  }

  .game-shell .call-panel {
    right: 10px;
    width: 138px;
  }

  .game-shell .table-status-box {
    left: 12px;
    width: 124px;
    max-width: 124px;
  }

  .game-shell .table-status-box-log-list {
    max-height: 98px;
  }

  .game-shell .table-status-box-score-grid {
    gap: 4px 5px;
  }

  .game-shell .table-status-box-score-label {
    font-size: 9px;
  }

  .game-shell .table-status-box-score-name {
    font-size: 9.5px;
  }

  .game-shell .table-status-box-score-avatar,
  .game-shell .table-status-box-score-avatar .avatar-badge-image,
  .game-shell .table-status-box-score-avatar .avatar-badge-sprite,
  .game-shell .table-status-box-score-avatar .avatar-badge-fallback {
    width: 18px;
    height: 18px;
  }

  .game-shell .action-status-box {
    right: 18px;
    width: 132px;
  }

  .game-shell .actions {
    left: 12px;
    right: 12px;
    gap: 6px;
  }

  .game-shell .action-btn {
    min-height: 42px;
    font-size: 13px;
  }

  .game-shell .hand {
    width: 100%;
    height: 170px;
  }

  .game-shell .hand > .card {
    width: 92px;
    height: 144px;
  }

  .game-shell .online-bug-fab {
    right: 8px;
    min-width: 98px;
    padding-inline: 12px;
    font-size: 12px;
  }
}
