:root {
  --bg-1: #000000;
  --bg-2: #06090d;
  --panel: rgba(8, 10, 13, 0.9);
  --panel-border: rgba(255, 255, 255, 0.09);
  --soft-text: #8ea0b0;
  --strong-text: #f3f8fd;
  --accent: #16a3ff;
  --accent-2: #ff7a1a;
  --danger: #ff6c6c;
  --light-square: #78a8d6;
  --dark-square: #295783;
  --highlight: rgba(11, 153, 255, 0.32);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--strong-text);
  background:
    radial-gradient(circle at top left, rgba(18, 161, 255, 0.12), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(255, 121, 26, 0.1), transparent 22%),
    linear-gradient(140deg, #010203, #04080d 52%, #090f14);
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 1rem;
}

.login-shell {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 22%, rgba(22, 163, 255, 0.22), transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(255, 111, 0, 0.2), transparent 26%),
    linear-gradient(145deg, #020406, #09131d 44%, #160905 100%);
}

.ambient {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(84px);
  opacity: 0.26;
  pointer-events: none;
}

.ambient-left {
  top: -8rem;
  left: -8rem;
  background: rgba(20, 166, 255, 0.2);
}

.ambient-right {
  right: -8rem;
  bottom: -10rem;
  background: rgba(255, 122, 26, 0.16);
}

.login-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.42;
  pointer-events: none;
}

.login-glow-a {
  width: 26rem;
  height: 26rem;
  top: 10%;
  right: 10%;
  background: rgba(255, 126, 24, 0.34);
}

.login-glow-b {
  width: 22rem;
  height: 22rem;
  left: 8%;
  bottom: 8%;
  background: rgba(0, 149, 255, 0.3);
}

.topbar,
.page-grid,
.play-layout {
  position: relative;
  z-index: 1;
}

.login-stage {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
  min-height: calc(100vh - 2rem);
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(340px, 430px);
  gap: 0.15rem;
  align-items: center;
  justify-content: center;
}

.topbar {
  width: min(1360px, 100%);
  margin: 0 auto 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-mark-image {
  width: min(230px, 40vw);
  height: auto;
  display: block;
  filter:
    drop-shadow(0 0 10px rgba(17, 162, 255, 0.12))
    drop-shadow(0 0 18px rgba(255, 117, 24, 0.1));
}

.eyebrow,
.mini-label,
.status-label {
  margin: 0 0 0.35rem;
  color: var(--soft-text);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.acronym-mark {
  color: #d8e7f8;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(126, 165, 207, 0.35);
}

h1,
.panel-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 0.92;
}

.panel-title {
  font-size: 2rem;
}

.session-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.session-user {
  color: var(--strong-text);
  font-weight: 700;
}

.login-hero {
  max-width: 340px;
  padding-inline: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  transform: translateX(22px);
  z-index: 3;
}

.login-logo-wrap {
  margin: 0;
}

.login-logo {
  width: min(100%, 360px);
  height: auto;
  display: block;
  filter:
    drop-shadow(0 0 12px rgba(18, 171, 255, 0.18))
    drop-shadow(0 0 22px rgba(255, 117, 24, 0.14));
}

.login-kicker {
  margin-bottom: 1.1rem;
  color: #d7e7f7;
}

.login-panel {
  position: relative;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(3, 21, 38, 0.92), rgba(21, 10, 6, 0.88));
  border: 1px solid rgba(186, 219, 250, 0.16);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 42px rgba(14, 163, 255, 0.1),
    0 0 54px rgba(255, 122, 19, 0.08);
  backdrop-filter: blur(18px);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(184, 225, 255, 0.24), transparent 34%, rgba(255, 139, 43, 0.22));
  opacity: 0.7;
  pointer-events: none;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
}

.login-panel-inner {
  position: relative;
  padding: 2rem;
}

.login-title {
  margin-top: 0.1rem;
}

.login-form {
  margin-top: 1.2rem;
}

.login-form input {
  padding-block: 1rem;
  background: rgba(2, 9, 15, 0.82);
  border-color: rgba(194, 215, 238, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
}

.login-form input:focus {
  border-color: rgba(255, 147, 64, 0.34);
  box-shadow:
    0 0 0 4px rgba(255, 122, 19, 0.1),
    0 0 22px rgba(20, 165, 255, 0.08);
}

.login-submit {
  margin-top: 0.4rem;
  color: #1b0d03;
  background: linear-gradient(135deg, #ffe4c2, #ff9b31 54%, #ff6c14);
  box-shadow:
    0 12px 30px rgba(255, 117, 24, 0.24),
    0 0 24px rgba(255, 145, 48, 0.14);
}

.login-error {
  min-height: 1.5rem;
  margin-top: 1rem;
}

.page-grid {
  width: min(1360px, 100%);
  margin: 0 auto;
}

.hero-panel,
.board-panel,
.side-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 0 32px rgba(22, 163, 255, 0.045),
    0 0 28px rgba(255, 122, 26, 0.035);
  backdrop-filter: blur(18px);
}

.hero-panel,
.board-panel,
.side-panel {
  padding: 1rem;
}

.auth-panel {
  max-width: 480px;
}

.hero-copy,
.status-text {
  color: #ccd8e4;
  line-height: 1.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1rem;
}

.control-column {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.compact-panel {
  gap: 0.75rem;
}

.lobby-card,
.status-card,
.meta-card,
.player-card,
.history-card {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 18px;
}

.lobby-card,
.status-card,
.history-card {
  padding: 1rem;
}

.field,
.stack-form {
  display: grid;
  gap: 0.45rem;
}

.field label {
  color: var(--soft-text);
  font-size: 0.92rem;
}

input,
select {
  width: 100%;
  padding: 0.9rem 0.95rem;
  color: var(--strong-text);
  background: rgba(3, 7, 11, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(255, 132, 40, 0.32);
  box-shadow:
    0 0 0 4px rgba(255, 122, 26, 0.08),
    0 0 18px rgba(22, 163, 255, 0.06);
}

input::placeholder {
  color: #8094a7;
}

.split-fields,
.join-row,
.actions-row,
.auth-tabs,
.tab-row {
  display: grid;
  gap: 0.75rem;
}

.split-fields,
.join-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.95rem;
}

.actions-row,
.stack-form {
  margin-top: 0.95rem;
}

.auth-tabs,
.tab-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button,
.secondary-button,
.ghost-button {
  padding: 0.88rem 1rem;
  font-weight: 700;
}

.primary-button {
  color: #1b0d03;
  background: linear-gradient(135deg, #ffdcae, #ff9b31 54%, #ff6e17);
  box-shadow:
    0 10px 24px rgba(255, 122, 26, 0.2),
    0 0 18px rgba(255, 122, 26, 0.08);
}

.secondary-button {
  color: var(--strong-text);
  background: linear-gradient(135deg, rgba(22, 163, 255, 0.32), rgba(22, 163, 255, 0.12));
}

.ghost-button {
  color: var(--strong-text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ghost-button.is-active {
  background: linear-gradient(135deg, rgba(22, 163, 255, 0.24), rgba(255, 122, 26, 0.18));
}

.error-text {
  min-height: 1.3rem;
  margin: 0.5rem 0 0;
  color: var(--danger);
}

.status-card {
  margin-top: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.head-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.head-item {
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.play-column {
  min-width: 0;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
}

.board-topbar,
.players-strip,
.meta-grid,
.reaction-header {
  display: grid;
  gap: 0.8rem;
}

.board-topbar {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.room-code-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

#activeRoomCode {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.players-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem;
}

.player-tone {
  width: 12px;
  height: 42px;
  border-radius: 999px;
}

.white-tone {
  background: linear-gradient(180deg, #f4f8fc, #bcd4ee);
}

.black-tone {
  background: linear-gradient(180deg, #32485f, #131b24);
}

.board-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.board-plate {
  width: min(100%, 620px);
  padding: 0.5rem;
  background: linear-gradient(135deg, #0b1118, #12181e);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 18px rgba(20, 166, 255, 0.06);
  border-radius: 0;
}

.board {
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  border: 2px solid #182330;
  overflow: hidden;
  border-radius: 0;
}

.square {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  user-select: none;
  border: 0;
  border-radius: 0 !important;
  padding: 0;
}

.square.light {
  background: var(--light-square);
}

.square.dark {
  background: var(--dark-square);
}

.square.selected {
  box-shadow: inset 0 0 0 3px #ffb258;
}

.square.legal::after,
.square.last-move::before {
  content: "";
  position: absolute;
}

.square.legal::after {
  width: 18%;
  height: 18%;
  border-radius: 999px;
  background: var(--highlight);
}

.square.last-move::before {
  inset: 0;
  border: 3px solid rgba(255, 140, 43, 0.42);
}

.piece {
  position: relative;
  z-index: 2;
  font-size: clamp(1.9rem, 5vw, 3.25rem);
  line-height: 1;
  font-family: "DejaVu Sans", "Segoe UI Symbol", "Noto Sans Symbols 2", serif;
  font-weight: 700;
}

.piece.white {
  color: #f4f8fc;
  text-shadow: 0 1px 0 rgba(23, 36, 48, 0.28);
}

.piece.black {
  color: #11161b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.square:hover {
  transform: none;
}

.coord-label {
  position: absolute;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 700;
}

.coord-rank {
  top: 0.28rem;
  left: 0.35rem;
}

.coord-file {
  right: 0.35rem;
  bottom: 0.24rem;
}

.square.light .coord-label {
  color: rgba(24, 41, 61, 0.74);
}

.square.dark .coord-label {
  color: rgba(235, 243, 251, 0.72);
}

.meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1rem;
}

.meta-card {
  padding: 0.95rem;
}

.meta-value {
  margin: 0;
  font-size: 1rem;
}

.reaction-panel {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.social-games-panel {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.game-hub-panel {
  min-height: 820px;
  overflow: hidden;
}

.game-view {
  display: grid;
  min-height: 720px;
  align-content: start;
  animation: gameViewFade 180ms ease;
}

.game-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

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

.social-panel {
  margin-top: 0.8rem;
}

.social-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.mahjong-board {
  margin-top: 0.8rem;
  position: relative;
  min-height: 34rem;
  overflow: auto;
  padding: 1rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(10, 16, 24, 0.98), rgba(5, 8, 13, 0.98));
  border: 1px solid rgba(72, 113, 157, 0.22);
}

.mahjong-tile {
  position: absolute;
  left: calc(var(--tile-x) * 2.8rem);
  top: calc(var(--tile-y) * 2rem);
  z-index: calc(10 + var(--tile-z));
  width: 4.7rem;
  height: 5.9rem;
  border-radius: 10px;
  border: 1px solid rgba(16, 25, 37, 0.2);
  background:
    linear-gradient(180deg, #fffdf9, #f6edd9 56%, #eadbb8);
  color: #173249;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 0.35rem 0.4rem 0.45rem;
  box-shadow:
    calc(var(--tile-z) * 0.18rem) calc(var(--tile-z) * 0.2rem) 0 rgba(0, 0, 0, 0.34),
    0 8px 18px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.mahjong-corner {
  width: 100%;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  opacity: 0.72;
}

.mahjong-main {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
}

.mahjong-suit {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.mahjong-tile.accent-blue .mahjong-main,
.mahjong-tile.accent-blue .mahjong-corner,
.mahjong-tile.accent-blue .mahjong-suit {
  color: #1d6ac7;
}

.mahjong-tile.accent-green .mahjong-main,
.mahjong-tile.accent-green .mahjong-corner,
.mahjong-tile.accent-green .mahjong-suit {
  color: #1b8e53;
}

.mahjong-tile.accent-red .mahjong-main,
.mahjong-tile.accent-red .mahjong-corner,
.mahjong-tile.accent-red .mahjong-suit {
  color: #c23f2f;
}

.mahjong-tile.accent-gold .mahjong-main,
.mahjong-tile.accent-gold .mahjong-corner,
.mahjong-tile.accent-gold .mahjong-suit {
  color: #9b6a14;
}

.mahjong-tile.is-blocked {
  opacity: 0.5;
  filter: saturate(0.8);
}

.mahjong-tile.is-selected {
  border-color: rgba(255, 123, 23, 0.8);
  box-shadow:
    0 0 0 3px rgba(255, 123, 23, 0.18),
    calc(var(--tile-z) * 0.2rem) calc(var(--tile-z) * 0.22rem) 0 rgba(0, 0, 0, 0.34),
    0 10px 20px rgba(255, 123, 23, 0.24);
}

.mahjong-tile.is-removed {
  visibility: hidden;
  pointer-events: none;
}

.score-strip {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.score-chip {
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.words-rack {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.word-tile {
  min-width: 2.35rem;
  padding: 0.7rem 0.5rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  color: #1e0f04;
  background: linear-gradient(135deg, #ffe3bc, #ff9a30 58%, #ff741a);
}

.compact-chat {
  max-height: 12rem;
}

.reaction-actions,
.reaction-list {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.reaction-header {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.reaction-chip {
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.reaction-btn {
  min-width: 3rem;
}

.side-panel {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  min-height: 820px;
}

.tab-panel {
  display: grid;
  gap: 0.8rem;
}

.chat-messages,
.ghost-games {
  max-height: 22rem;
  overflow: auto;
  display: grid;
  gap: 0.6rem;
}

.chat-message,
.ghost-card {
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ghost-card.is-selected {
  border-color: rgba(22, 163, 255, 0.38);
  background: linear-gradient(135deg, rgba(22, 163, 255, 0.12), rgba(255, 122, 26, 0.1));
}

.chat-name {
  font-weight: 700;
}

.chat-time,
.ghost-meta {
  color: var(--soft-text);
  font-size: 0.85rem;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

.entry-grid {
  display: grid;
  gap: 1rem;
}

.entry-panel {
  max-width: 760px;
}

.entry-actions,
.quick-links,
.mode-grid {
  display: grid;
  gap: 0.75rem;
}

.entry-actions,
.quick-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.mode-card {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.text-link {
  color: inherit;
  text-decoration: none;
}

.room-entry-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.room-entry-form .field {
  max-width: 320px;
}

.game-shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.game-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.chat-panel {
  min-height: 100%;
}

.chat-panel .chat-messages {
  max-height: 38rem;
}

.board-caption {
  margin-top: 0.85rem;
  color: var(--soft-text);
  line-height: 1.5;
}

body[data-active-game="mahjong"] .game-hub-panel {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 0 44px rgba(255, 122, 26, 0.06),
    0 0 36px rgba(22, 163, 255, 0.04);
}

body[data-active-game="words"] .game-hub-panel {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 0 40px rgba(255, 122, 26, 0.05),
    0 0 30px rgba(22, 163, 255, 0.03);
}

@keyframes gameViewFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#historyText {
  margin: 0;
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  color: #d6e0ea;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .app-shell,
  .play-layout {
    grid-template-columns: 1fr;
  }

  .login-stage {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    align-items: center;
    justify-items: center;
    padding-block: 2rem;
  }

  .login-hero {
    justify-content: center;
    width: 100%;
    max-width: 420px;
    transform: none;
  }

  .login-logo {
    margin-inline: auto;
    width: min(100%, 420px);
  }

  .login-panel {
    width: min(100%, 480px);
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 0.65rem;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .split-fields,
  .join-row,
  .players-strip,
  .meta-grid,
  .board-topbar,
  .reaction-header,
  .chat-form,
  .social-header,
  .entry-actions,
  .quick-links,
  .mode-grid {
    grid-template-columns: 1fr;
  }

  .social-row {
    grid-template-columns: 1fr;
  }

  .mahjong-board {
    min-height: 28rem;
    padding: 0.6rem;
  }

  .board-plate {
    width: 100%;
    padding: 0.35rem;
  }

  .login-stage {
    min-height: calc(100vh - 1.3rem);
    gap: 0.65rem;
  }

  .login-panel-inner {
    padding: 1.35rem;
  }

  .brand-mark-image {
    width: min(200px, 52vw);
  }

  .game-view-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mahjong-tile {
    left: calc(var(--tile-x) * 2rem);
    top: calc(var(--tile-y) * 1.45rem);
    width: 3.45rem;
    height: 4.45rem;
    padding: 0.25rem 0.28rem 0.3rem;
  }

  .mahjong-main {
    font-size: 1.5rem;
  }

  .mahjong-suit,
  .mahjong-corner {
    font-size: 0.54rem;
  }

  .piece {
    font-size: clamp(1.65rem, 8vw, 2.45rem);
  }

  .coord-label {
    font-size: 0.56rem;
  }
}
