:root {
  color-scheme: light;
  --bg: #fff8f2;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --text: #2d1820;
  --muted: #806873;
  --line: rgba(96, 54, 69, 0.14);
  --accent: #f68fab;
  --accent-2: #7ed3d3;
  --accent-3: #ffe066;
  --accent-strong: #8d3b56;
  --shadow: 0 24px 70px rgba(126, 75, 90, 0.18);
  --tile-a: #ff9ecd;
  --tile-b: #c8a2ff;
  --tile-c: #7ed3d3;
  --tile-face: #fffdf8;
  --tile-ink: #55323f;
  --radius: 20px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.classic-247-replica {
  --classic-header-height: 108px;
  --classic-blue: #064ea4;
  --classic-dark-blue: #073377;
  min-width: 1024px;
  background: #f9fdff;
  color: #111;
  overflow: hidden;
}

.classic-247-header {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--classic-header-height);
  padding: 0 12px 0 0;
  border-bottom: 1px solid rgba(34, 94, 126, 0.14);
  background:
    linear-gradient(180deg, #ffffff 0%, #ffffff 82%, rgba(223, 241, 249, 0.95) 100%);
  box-shadow: 0 2px 8px rgba(51, 103, 128, 0.12);
}

.classic-247-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.classic-logo-tile {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 2px solid #003f95;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #ffffff, #eef4fb 54%, #c2d4ec),
    #fff;
  color: #0751ac;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 1000;
  box-shadow:
    inset -7px -8px rgba(7, 59, 128, 0.18),
    5px 5px 0 #083d85;
}

.classic-logo-text {
  color: #0b56ad;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4.2vw, 4rem);
  font-weight: 1000;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow:
    -2px -2px 0 #ffffff,
    2px 2px 0 #ffffff,
    4px 5px 0 rgba(7, 61, 133, 0.25),
    0 8px 18px rgba(5, 54, 121, 0.24);
  white-space: nowrap;
}

.classic-247-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #0068a8;
  font-size: 1.25rem;
  font-weight: 900;
}

.classic-247-nav a:hover {
  color: #003f95;
}

.classic-247-game {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--classic-header-height));
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 77% 13%, rgba(155, 209, 233, 0.58), transparent 22rem),
    linear-gradient(90deg, rgba(242, 250, 254, 0.96), rgba(228, 247, 255, 0.78) 47%, rgba(255, 255, 255, 0.98) 78%),
    #f8fdff;
}

.classic-paper-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.classic-paper-bg::before,
.classic-paper-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 42px,
      rgba(29, 126, 167, 0.05) 43px 45px,
      transparent 46px 96px
    );
  opacity: 0.65;
}

.classic-paper-bg::after {
  background:
    radial-gradient(ellipse at 82% 8%, rgba(81, 156, 190, 0.24), transparent 21rem),
    radial-gradient(ellipse at 12% 84%, rgba(242, 139, 72, 0.16), transparent 15rem);
}

.classic-paper-bg span {
  position: absolute;
  top: 12px;
  color: rgba(43, 145, 184, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  writing-mode: vertical-rl;
}

.classic-paper-bg span:nth-child(1) {
  left: 13%;
}

.classic-paper-bg span:nth-child(2) {
  left: 27%;
  top: 44px;
}

.classic-paper-bg span:nth-child(3) {
  right: 19%;
  top: 8px;
}

.classic-247-replica .classic-board-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.classic-247-replica .classic-blue-table {
  position: relative;
  min-width: 1210px;
  min-height: 100%;
  padding: 14px 0 0;
  background: transparent;
}

.classic-247-replica .classic-blue-table::before {
  content: none;
}

.classic-247-replica .classic-board {
  position: relative;
  margin: 0 auto;
}

.classic-side-controls {
  position: absolute;
  z-index: 30;
  top: 14px;
  display: grid;
  gap: 10px;
}

.classic-left-controls {
  left: 4px;
}

.classic-right-controls {
  right: 16px;
}

.classic-icon-btn {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 3px solid #3c3c3c;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #161616, #000000);
  color: #ffffff;
  font-size: 2.55rem;
  font-weight: 1000;
  line-height: 1;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.15),
    0 2px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.classic-icon-btn.undo {
  background: linear-gradient(180deg, #8f8f8f, #595959);
}

.classic-icon-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.classic-icon-btn:active {
  transform: translateY(1px);
}

.classic-icon-btn.hint,
.classic-icon-btn.help {
  font-family: Georgia, "Times New Roman", serif;
}

.classic-bottom-hud {
  position: absolute;
  z-index: 32;
  bottom: 26px;
  left: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #696969;
}

.classic-pause-btn {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 3px solid #333;
  border-radius: 9px;
  background: linear-gradient(180deg, #202020, #000);
  color: white;
  font-size: 2rem;
  font-weight: 1000;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.13);
  cursor: pointer;
}

.classic-large-time {
  font-size: 2.25rem;
  font-weight: 1000;
  letter-spacing: -0.08em;
  text-shadow:
    1px 1px 0 #ffffff,
    0 2px 4px rgba(0, 0, 0, 0.22);
}

.classic-hud-chip,
.classic-247-replica .classic-status {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #4f5961;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(25, 79, 105, 0.08);
}

.classic-hud-chip strong {
  color: #0b56ad;
}

.classic-247-replica .classic-status {
  max-width: 360px;
  min-height: 0;
  margin: 0;
  border-radius: 10px;
  line-height: 1.35;
}

.classic-corner-actions {
  position: absolute;
  z-index: 32;
  right: 18px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.classic-small-action {
  border: 0;
  background: transparent;
  color: #818181;
  font-size: 3rem;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 1px 1px 0 #ffffff;
  cursor: pointer;
}

.classic-koi {
  position: absolute;
  z-index: 1;
  left: 130px;
  bottom: 156px;
  width: 210px;
  height: 190px;
  opacity: 0.82;
  transform: rotate(-18deg);
  pointer-events: none;
}

.koi-body,
.koi-tail,
.koi-fin {
  position: absolute;
  display: block;
}

.koi-body {
  left: 62px;
  top: 48px;
  width: 108px;
  height: 56px;
  border-radius: 60% 44% 56% 44%;
  background:
    radial-gradient(circle at 76% 42%, #2c1b16 0 4px, transparent 5px),
    radial-gradient(ellipse at 38% 48%, rgba(255, 255, 255, 0.92), transparent 28%),
    linear-gradient(140deg, #fff7e8 0 27%, #f06f2d 28% 48%, #fff6e5 49% 67%, #d84b24 68%);
  box-shadow: 0 8px 18px rgba(168, 73, 35, 0.28);
}

.koi-tail {
  left: 10px;
  top: 42px;
  width: 72px;
  height: 72px;
  border-radius: 8% 92% 8% 92%;
  background:
    linear-gradient(135deg, rgba(255, 246, 225, 0.8), rgba(223, 68, 34, 0.82));
  transform: rotate(42deg);
  filter: drop-shadow(0 4px 6px rgba(136, 62, 26, 0.2));
}

.koi-fin {
  width: 58px;
  height: 30px;
  border-radius: 90% 12% 90% 12%;
  background: linear-gradient(135deg, rgba(253, 232, 204, 0.72), rgba(224, 71, 33, 0.82));
}

.fin-a {
  left: 88px;
  top: 22px;
  transform: rotate(-34deg);
}

.fin-b {
  left: 82px;
  top: 94px;
  transform: rotate(31deg) scaleY(-1);
}

.classic-247-replica .classic-tile {
  position: absolute;
  display: grid;
  width: 68px;
  height: 88px;
  place-items: center;
  border: 2px solid #9c9c9c;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f7f5 48%, #dddddd 100%);
  color: #111;
  box-shadow:
    inset -7px -7px rgba(0, 0, 0, 0.1),
    inset 3px 3px rgba(255, 255, 255, 0.94),
    7px 7px 0 #073985,
    7px 10px 0 rgba(156, 157, 50, 0.94),
    0 8px 14px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition:
    transform 130ms ease,
    filter 130ms ease,
    opacity 130ms ease;
}

.classic-247-replica .classic-tile::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 0;
  border: 1px solid rgba(65, 65, 65, 0.16);
  border-radius: 5px;
  pointer-events: none;
}

.classic-247-replica .classic-tile.locked {
  cursor: default;
}

.classic-247-replica .classic-tile.open:hover,
.classic-247-replica .classic-tile.selected,
.classic-247-replica .classic-tile.hint {
  transform: translateY(-7px);
  filter: brightness(1.06);
}

.classic-247-replica .classic-tile.selected {
  outline: 5px solid #ffdb44;
  outline-offset: -1px;
}

.classic-247-replica .classic-tile.hint {
  outline: 5px solid #44b7ff;
  outline-offset: -1px;
}

.classic-247-replica .classic-tile.matching {
  animation: classic-pop 180ms ease both;
}

.classic-247-replica .classic-mini-rank,
.classic-picture-rank {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  color: #b42e2f;
  font-size: 0.82rem;
  font-weight: 1000;
  line-height: 1;
}

.classic-247-replica .classic-bamboo .classic-mini-rank,
.classic-247-replica .classic-season .classic-mini-rank {
  color: #0c7b4e;
}

.classic-247-replica .classic-dot .classic-mini-rank {
  color: #0b58ad;
}

.classic-247-replica .classic-character-face {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding-top: 0.18rem;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 0.88;
}

.classic-247-replica .classic-character-face strong {
  color: #111111;
  font-size: 2.35rem;
  font-weight: 1000;
}

.classic-247-replica .classic-character-face small {
  color: #b42e2f;
  font-size: 1.18rem;
  font-weight: 1000;
}

.classic-247-replica .classic-pattern {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 62px;
  align-content: center;
  justify-content: center;
  gap: 4px;
  margin-top: 0.42rem;
}

.classic-247-replica .classic-dot-pattern {
  grid-template-columns: repeat(3, 13px);
}

.classic-247-replica .classic-dot-mark {
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid #0d845b;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 24%, transparent 27%),
    radial-gradient(circle, #da3446 0 56%, #0d845b 60%);
}

.classic-247-replica .classic-dot-mark:nth-child(2n) {
  border-color: #0a55b2;
  background:
    radial-gradient(circle, #ffffff 0 24%, transparent 27%),
    radial-gradient(circle, #0a68cf 0 56%, #0d845b 60%);
}

.classic-247-replica .classic-pattern-1 .classic-dot-mark {
  width: 30px;
  height: 30px;
  grid-column: 1 / -1;
  justify-self: center;
  border-width: 3px;
}

.classic-247-replica .classic-bamboo-pattern {
  grid-template-columns: repeat(3, 10px);
}

.classic-247-replica .classic-bamboo-mark {
  display: block;
  width: 6px;
  height: 24px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 39%, rgba(255, 255, 255, 0.6) 41% 57%, transparent 59%),
    repeating-linear-gradient(180deg, #07995c 0 9px, #ffffff 10px 12px, #07995c 13px 22px);
  box-shadow: 0 0 0 1px rgba(3, 106, 67, 0.35);
}

.classic-bird-bamboo {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 62px;
}

.classic-bird-bamboo i {
  position: absolute;
  display: block;
}

.bird-body {
  left: 17px;
  top: 16px;
  width: 27px;
  height: 35px;
  border-radius: 62% 40% 56% 46%;
  background:
    radial-gradient(circle at 73% 20%, #111 0 2px, transparent 3px),
    linear-gradient(135deg, #0c63bf 0 42%, #e53935 43% 62%, #0c894d 63%);
  transform: rotate(24deg);
}

.bird-wing {
  left: 14px;
  top: 26px;
  width: 30px;
  height: 16px;
  border-radius: 90% 12% 90% 12%;
  background: #d62832;
  transform: rotate(-22deg);
}

.bird-tail {
  left: 5px;
  top: 40px;
  width: 24px;
  height: 13px;
  border-radius: 90% 12% 90% 12%;
  background: #0b7847;
  transform: rotate(-30deg);
}

.classic-247-replica .classic-symbol.single {
  position: relative;
  z-index: 1;
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.85rem;
  font-weight: 1000;
  line-height: 1;
}

.classic-247-replica .classic-wind .classic-symbol.single {
  color: #0054b8;
}

.classic-247-replica .classic-code-dr .classic-symbol.single {
  color: #b42e2f;
}

.classic-247-replica .classic-code-dg .classic-symbol.single {
  color: #088b58;
}

.classic-white-dragon {
  position: relative;
  z-index: 1;
  display: block;
  width: 38px;
  height: 54px;
  border: 4px solid #0754bd;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(7, 84, 189, 0.08);
}

.classic-flower-art,
.classic-season-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 56px;
  height: 70px;
  margin-top: 0.35rem;
}

.classic-flower-art::before,
.classic-season-art::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 16px;
  width: 4px;
  height: 45px;
  border-radius: 999px;
  background: #0c8c56;
  transform: rotate(18deg);
}

.classic-flower-art i,
.classic-season-art i {
  position: absolute;
  display: block;
}

.classic-flower-art i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d8313e;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75);
}

.classic-flower-art i:nth-child(1) {
  left: 18px;
  top: 12px;
}

.classic-flower-art i:nth-child(2) {
  left: 31px;
  top: 22px;
}

.classic-flower-art i:nth-child(3) {
  left: 12px;
  top: 31px;
}

.classic-season-art i:nth-child(1) {
  left: 9px;
  bottom: 10px;
  width: 38px;
  height: 19px;
  border-radius: 38px 38px 0 0;
  background: repeating-linear-gradient(90deg, #cf2734 0 4px, #f7e1d2 5px 8px);
}

.classic-season-art i:nth-child(2) {
  left: 7px;
  bottom: 6px;
  width: 42px;
  height: 3px;
  background: #0c8c56;
}

.classic-season-art i:nth-child(3) {
  left: 25px;
  top: 8px;
  width: 4px;
  height: 48px;
  border-radius: 999px;
  background: #0c8c56;
  transform: rotate(-20deg);
}

.classic-paused .classic-board {
  filter: grayscale(0.25) blur(1px);
}

.classic-paused .classic-blue-table::after {
  content: "PAUSED";
  position: absolute;
  z-index: 50;
  left: 50%;
  top: 43%;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  transform: translate(-50%, -50%);
}

@media (max-width: 1200px) {
  .classic-247-replica {
    min-width: 900px;
  }

  .classic-logo-text {
    font-size: 2.6rem;
  }

  .classic-247-replica .classic-blue-table {
    min-width: 1210px;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181015;
  --surface: rgba(45, 29, 39, 0.82);
  --surface-solid: #241821;
  --text: #fff6fb;
  --muted: #d8bdca;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #ff9ecd;
  --accent-2: #8ef0e7;
  --accent-3: #ffe889;
  --accent-strong: #ffd3e1;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --tile-face: #fff8f0;
  --tile-ink: #4d2636;
}

[data-skin="rainbow"] {
  --tile-a: #ff9ecd;
  --tile-b: #c8a2ff;
  --tile-c: #7ed3d3;
}

[data-skin="mint"] {
  --tile-a: #92ead6;
  --tile-b: #caffbf;
  --tile-c: #bde0fe;
}

[data-skin="sunset"] {
  --tile-a: #ffadad;
  --tile-b: #ffd6a5;
  --tile-c: #fdffb6;
}

[data-skin="lavender"] {
  --tile-a: #e0c3fc;
  --tile-b: #c8b6ff;
  --tile-c: #b8c0ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 8%, color-mix(in srgb, var(--tile-a) 35%, transparent), transparent 30rem),
    radial-gradient(circle at 84% 4%, color-mix(in srgb, var(--tile-c) 30%, transparent), transparent 28rem),
    linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--tile-b) 14%, var(--bg)));
  color: var(--text);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--tile-a), var(--tile-b), var(--tile-c));
  color: white;
  font-weight: 900;
  letter-spacing: -0.08em;
  box-shadow: inset 0 -5px rgba(0, 0, 0, 0.13);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.top-nav {
  display: flex;
  gap: 0.45rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav a,
.theme-toggle,
.audio-toggle {
  min-width: max-content;
  padding: 0.58rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.theme-toggle,
.audio-toggle,
.primary-btn,
.secondary-btn,
.modal-close,
.tile,
.skin-card,
.game-card button {
  border: 0;
  cursor: pointer;
}

.site-footer a[href="classic-mahjong-connect.html"] {
  display: none;
}

.audio-controls {
  display: flex;
  gap: 0.4rem;
}

.audio-toggle {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--tile-c) 12%, var(--surface));
  color: var(--muted);
}

.audio-toggle[aria-pressed="true"] {
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tile-c) 35%, transparent);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 1rem;
  align-items: stretch;
  padding: 2rem 0 1rem;
}

.hero-copy,
.hero-preview,
.play-shell,
.skin-section,
.library-section,
.daily-card,
.details-section,
.game-card,
.skin-card,
.finish-card,
.game-help {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-copy,
.hero-preview {
  min-height: 500px;
  border-radius: var(--radius);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.2rem, 5vw, 3.2rem);
}

.pill,
.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 1rem;
  font-size: clamp(2.3rem, 6.5vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.55rem, 3.1vw, 2.5rem);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0.45rem;
}

.hero-copy p:not(.pill),
.section-heading p,
.game-card p,
.game-help p,
.daily-card p,
.finish-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.tool-row,
.finish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.primary-btn,
.secondary-btn {
  min-height: 48px;
  padding: 0 1.05rem;
  border-radius: 14px;
  font-weight: 900;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--tile-b) 72%, var(--accent)));
  color: white;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 28%, transparent);
}

.secondary-btn {
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin: 1.3rem 0 0;
}

.hero-stats div {
  padding: 0.85rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 70%, transparent);
}

.hero-stats dt {
  font-size: 1.6rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-preview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  overflow: hidden;
}

.preview-board {
  flex: 1;
  min-height: 380px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tile-a) 28%, transparent), transparent),
    color-mix(in srgb, var(--surface-solid) 72%, var(--tile-c));
  position: relative;
}

.preview-caption {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.8rem;
}

.preview-caption span {
  color: var(--muted);
}

.skin-section,
.library-section,
.details-section,
.play-shell {
  margin-top: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--radius);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.2rem;
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.skin-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 16px;
  color: var(--text);
  text-align: left;
}

.skin-card.active {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, white);
}

.skin-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.skin-swatches span {
  height: 48px;
  border-radius: 12px;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.game-metrics {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.game-metrics span {
  padding: 0.62rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--muted);
}

.game-metrics strong {
  color: var(--text);
}

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

.game-help {
  align-self: start;
  padding: 1rem;
  border-radius: 18px;
}

.hint-text {
  min-height: 3rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tile-c) 15%, var(--surface-solid));
}

.board-wrap {
  position: relative;
  min-height: 440px;
  padding: clamp(0.65rem, 2vw, 1.2rem);
  border-radius: 22px;
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--tile-c) 22%, transparent), transparent 24rem),
    color-mix(in srgb, #8a5b46 18%, var(--surface-solid));
  overflow: auto;
}

.mahjong-board {
  display: grid;
  gap: 0.55rem;
  min-width: 620px;
  padding: 0.5rem;
}

.connect-board,
.mahjong-board {
  grid-template-columns: repeat(var(--connect-cols, 8), minmax(58px, 1fr));
}

.path-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.connect-path-glow,
.connect-path-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connect-path-glow {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 15;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 65%, transparent));
}

.connect-path-line {
  stroke: url("#connectGradient");
  stroke-width: 6;
}

.board-row {
  display: flex;
  justify-content: center;
  gap: 0.42rem;
  min-height: 70px;
}

.tile {
  width: clamp(54px, 6vw, 70px);
  min-height: clamp(62px, 7vw, 78px);
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.72)),
    linear-gradient(135deg, var(--tile-a), var(--tile-b), var(--tile-c));
  color: var(--tile-ink);
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 900;
  box-shadow:
    inset 0 -7px rgba(60, 35, 45, 0.12),
    0 12px 20px rgba(85, 45, 60, 0.16);
  position: relative;
}

.connect-cell {
  min-width: 0;
  min-height: clamp(72px, 8vw, 92px);
  border-radius: 16px;
}

.connect-cell.empty {
  border: 1px dashed color-mix(in srgb, var(--accent) 18%, transparent);
  background: color-mix(in srgb, var(--surface-solid) 32%, transparent);
  opacity: 0.42;
}

.connect-tile {
  z-index: 3;
  display: grid;
  width: 100%;
  min-height: clamp(78px, 8.6vw, 96px);
  place-items: center;
  padding: 0.48rem 0.35rem 0.42rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 252, 0.78)),
    radial-gradient(circle at 25% 12%, color-mix(in srgb, var(--shape-accent, var(--tile-a)) 70%, white), transparent 38%),
    linear-gradient(145deg, var(--tile-a), var(--tile-b), var(--tile-c));
  overflow: hidden;
}

.connect-tile::before {
  content: "";
  position: absolute;
  inset: auto 12% 0 12%;
  height: 8px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--tile-a), var(--tile-b), var(--tile-c));
  opacity: 0.72;
}

.connect-tile::after {
  inset: 7px;
}

.connect-tile:hover,
.connect-tile.selected,
.connect-tile.hint,
.connect-tile.matched {
  transform: translateY(-5px) scale(1.02);
}

.connect-tile.selected {
  outline: 4px solid #ffe066;
}

.connect-tile.hint {
  outline: 4px solid #8ef0e7;
}

.connect-tile.matched {
  animation: tile-pop 320ms ease both;
}

.tile-label {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 100%;
  color: color-mix(in srgb, var(--tile-ink) 86%, var(--shape-color, var(--accent)));
  font-size: clamp(0.56rem, 1vw, 0.72rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.tile-art {
  --shape-color: var(--accent);
  --shape-accent: #fff4c9;
  position: relative;
  z-index: 2;
  display: block;
  width: clamp(34px, 5vw, 48px);
  height: clamp(30px, 4.6vw, 42px);
  margin: 0 auto 0.2rem;
}

.tile-art::before,
.tile-art::after,
.tile-art .art-core,
.tile-art .art-mark {
  position: absolute;
  display: block;
  content: "";
}

.tile-art.butterfly::before,
.tile-art.butterfly::after {
  top: 4px;
  width: 46%;
  height: 70%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 50% 28%, var(--shape-accent) 0 18%, transparent 20%),
    var(--shape-color);
  box-shadow: inset 0 -6px rgba(80, 30, 60, 0.14);
}

.tile-art.butterfly::before {
  left: 0;
  border-radius: 70% 45% 60% 45%;
  transform: rotate(-16deg);
}

.tile-art.butterfly::after {
  right: 0;
  border-radius: 45% 70% 45% 60%;
  transform: rotate(16deg);
}

.tile-art.butterfly .art-core {
  left: 45%;
  top: 8%;
  width: 10%;
  height: 82%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--shape-color) 65%, #55323f);
}

.tile-art.butterfly .art-mark {
  left: 31%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--shape-accent);
  box-shadow: 17px 0 var(--shape-accent);
}

.tile-art.turtle::before {
  left: 16%;
  top: 18%;
  width: 58%;
  height: 56%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 48% 52% 42% 48%;
  background:
    linear-gradient(45deg, transparent 46%, rgba(255, 255, 255, 0.55) 47% 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(255, 255, 255, 0.45) 47% 53%, transparent 54%),
    var(--shape-color);
}

.tile-art.turtle::after {
  right: 2%;
  top: 36%;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--shape-color) 70%, white);
}

.tile-art.turtle .art-core {
  left: 8%;
  top: 67%;
  width: 12%;
  height: 12%;
  border-radius: 50%;
  background: var(--shape-color);
  box-shadow:
    5px -34px var(--shape-color),
    27px 0 var(--shape-color),
    32px -34px var(--shape-color);
}

.tile-art.flower::before {
  inset: 10%;
  border-radius: 50%;
  background: var(--shape-color);
  box-shadow:
    0 -12px var(--shape-color),
    12px 0 var(--shape-color),
    0 12px var(--shape-color),
    -12px 0 var(--shape-color);
}

.tile-art.flower .art-core {
  left: 36%;
  top: 33%;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: var(--shape-accent);
}

.tile-art.bow::before,
.tile-art.bow::after {
  top: 20%;
  width: 42%;
  height: 58%;
  border-radius: 52% 18% 52% 18%;
  background: var(--shape-color);
  box-shadow: inset 0 -6px rgba(80, 30, 60, 0.14);
}

.tile-art.bow::before {
  left: 3%;
  transform: rotate(10deg);
}

.tile-art.bow::after {
  right: 3%;
  transform: rotate(-10deg) scaleX(-1);
}

.tile-art.bow .art-core {
  left: 42%;
  top: 34%;
  width: 16%;
  height: 28%;
  border-radius: 50%;
  background: var(--shape-accent);
}

.tile-art.heart::before,
.tile-art.heart::after {
  top: 20%;
  width: 48%;
  height: 62%;
  border-radius: 999px 999px 0 0;
  background: var(--shape-color);
}

.tile-art.heart::before {
  left: 18%;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.tile-art.heart::after {
  right: 18%;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.tile-art.shell::before {
  left: 13%;
  top: 16%;
  width: 74%;
  height: 70%;
  border-radius: 90% 90% 44% 44%;
  background:
    repeating-radial-gradient(circle at 50% 92%, transparent 0 7px, rgba(255, 255, 255, 0.58) 8px 9px),
    var(--shape-color);
  box-shadow: inset 0 -8px rgba(80, 30, 60, 0.12);
}

.tile-art.leaf::before {
  left: 20%;
  top: 8%;
  width: 58%;
  height: 78%;
  border-radius: 90% 8% 90% 8%;
  background: var(--shape-color);
  transform: rotate(42deg);
}

.tile-art.leaf .art-core {
  left: 49%;
  top: 16%;
  width: 3px;
  height: 70%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  transform: rotate(42deg);
}

.tile-art.moon::before {
  left: 21%;
  top: 8%;
  width: 64%;
  height: 78%;
  border-radius: 50%;
  background: var(--shape-color);
}

.tile-art.moon::after {
  left: 39%;
  top: 0;
  width: 58%;
  height: 78%;
  border-radius: 50%;
  background: var(--tile-face);
}

.tile-art.gem::before {
  left: 24%;
  top: 8%;
  width: 54%;
  height: 70%;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.75), transparent 44%),
    var(--shape-color);
  transform: rotate(45deg);
  box-shadow: inset -7px -7px rgba(80, 30, 60, 0.12);
}

@keyframes tile-pop {
  0% {
    transform: translateY(-5px) scale(1.02);
  }

  55% {
    transform: translateY(-9px) scale(1.12) rotate(-1deg);
  }

  100% {
    transform: translateY(-4px) scale(0.92);
    opacity: 0.35;
  }
}

.tile::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(90, 50, 65, 0.13);
  border-radius: 10px;
}

.tile.free:hover,
.tile.selected {
  transform: translateY(-4px);
}

.tile.selected,
.tile.hint {
  outline: 4px solid var(--accent-3);
}

.tile.locked {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.game-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 18px;
}

.game-card-preview {
  min-height: 150px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tile-a) 40%, transparent), transparent),
    linear-gradient(160deg, color-mix(in srgb, var(--tile-c) 35%, white), var(--surface-solid));
  position: relative;
  overflow: hidden;
}

.mini-tiles {
  position: absolute;
  inset: 0.75rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}

.cute-mini-tiles {
  grid-template-columns: repeat(4, 1fr);
}

.mini-cute-tile {
  min-height: 58px;
}

.mini-cute-tile .tile-art {
  width: 38px;
  height: 34px;
  margin: 0;
}

.classic-mini-tiles {
  grid-template-columns: repeat(3, 1fr);
}

.classic-mini-tile {
  min-height: 58px;
  color: #8f1025;
  font-size: 1.05rem;
  font-weight: 900;
  background:
    linear-gradient(180deg, #ffffff, #f1f3ec 62%, #d9ded4),
    #f7f7f0 !important;
  box-shadow:
    inset -4px -5px rgba(14, 55, 44, 0.14),
    0 8px 14px rgba(0, 0, 0, 0.14) !important;
}

.large-tiles .connect-cell {
  min-height: clamp(88px, 10vw, 112px);
}

.large-tiles .tile-art {
  width: clamp(42px, 6vw, 58px);
  height: clamp(36px, 5.6vw, 50px);
}

.mini-tiles span {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--tile-face);
  color: var(--tile-ink);
  font-weight: 900;
  box-shadow: inset 0 -4px rgba(0, 0, 0, 0.12);
}

.card-tags,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tile-b) 18%, var(--surface-solid));
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.daily-section {
  margin-top: 1rem;
}

.daily-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  border-radius: var(--radius);
}

.detail-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.detail-links a {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  font-weight: 900;
}

.classic-connect-page {
  background:
    radial-gradient(circle at 20% 10%, rgba(64, 163, 207, 0.2), transparent 24rem),
    linear-gradient(135deg, #063956, #075b83 48%, #06334e);
}

.classic-connect-main {
  width: min(1240px, calc(100% - 2rem));
}

.classic-connect-shell {
  margin: 0.65rem 0 1.25rem;
  padding: clamp(0.8rem, 2vw, 1rem);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(0, 26, 45, 0.26);
}

.classic-connect-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.classic-connect-top h1 {
  margin-bottom: 0.3rem;
  font-size: clamp(1.75rem, 3.4vw, 3.1rem);
  line-height: 0.95;
}

.classic-connect-top p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.45;
}

.classic-scorebar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  min-width: min(100%, 360px);
}

.classic-scorebar span {
  padding: 0.58rem 0.74rem;
  border-radius: 999px;
  background: #082d45;
  color: #d8edf7;
  font-size: 0.9rem;
  font-weight: 900;
}

.classic-scorebar strong {
  color: #ffe066;
}

.classic-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.classic-status {
  min-height: 2.5rem;
  margin-bottom: 0.75rem;
  padding: 0.62rem 0.85rem;
  border-radius: 12px;
  background: color-mix(in srgb, #d8edf7 48%, white);
  color: #21465a;
  font-weight: 900;
}

.classic-board-stage {
  overflow: auto;
  border: 4px solid #35383b;
  border-radius: 10px;
  background: #050505;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.classic-blue-table {
  position: relative;
  min-width: 780px;
  min-height: 505px;
  padding: 4.45rem 1.2rem 2rem;
  background:
    radial-gradient(circle at 50% 45%, rgba(28, 45, 62, 0.58), transparent 18rem),
    linear-gradient(180deg, #111, #050505 62%, #020202);
}

.classic-blue-table::before {
  content: "Classic";
  position: absolute;
  top: 0.55rem;
  left: 0;
  right: 0;
  color: #ffffff;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 4px 0 #000,
    0 6px 10px rgba(0, 0, 0, 0.7);
}

.classic-board {
  position: relative;
  margin: 0 auto;
}

.classic-tile {
  position: absolute;
  display: grid;
  width: 42px;
  height: 56px;
  place-items: center;
  border: 1px solid #bfc8c8;
  border-radius: 5px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f9f5 52%, #d9dfd7 100%),
    #f8f8f1;
  color: #26303a;
  box-shadow:
    inset -3px -5px rgba(33, 46, 44, 0.18),
    inset 2px 2px rgba(255, 255, 255, 0.92),
    3px 4px 0 #014b98,
    0 7px 8px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  transition:
    transform 140ms ease,
    filter 140ms ease,
    opacity 140ms ease;
}

.classic-tile::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(26, 55, 55, 0.16);
  border-radius: 3px;
}

.classic-mini-rank,
.classic-corner-mark {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 5px;
  font-size: 0.62rem;
  font-weight: 1000;
  line-height: 1;
}

.classic-corner-mark {
  color: #256f7e;
  letter-spacing: -0.04em;
}

.classic-character-face {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding-top: 0.25rem;
  color: #a80f27;
  line-height: 0.86;
}

.classic-character-face strong {
  font-size: 1.35rem;
}

.classic-character-face small {
  font-size: 0.82rem;
  font-weight: 1000;
}

.classic-pattern {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 40px;
  align-content: center;
  justify-content: center;
  gap: 2px;
  margin-top: 0.4rem;
}

.classic-dot-pattern {
  grid-template-columns: repeat(3, 7px);
}

.classic-bamboo-pattern {
  grid-template-columns: repeat(3, 6px);
}

.classic-dot-mark {
  display: block;
  width: 6px;
  height: 6px;
  border: 1px solid #0f7159;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 28%, transparent 31%),
    radial-gradient(circle, #d01f37 0 58%, #0f7159 61%);
}

.classic-dot-mark:nth-child(2n) {
  background:
    radial-gradient(circle, #ffffff 0 28%, transparent 31%),
    radial-gradient(circle, #0f7159 0 58%, #1e66ae 61%);
}

.classic-pattern-1 .classic-dot-mark {
  width: 14px;
  height: 14px;
  grid-column: 1 / -1;
  justify-self: center;
}

.classic-bamboo-mark {
  display: block;
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, 0.55) 44% 56%, transparent 58%),
    #0d7a50;
  box-shadow: 0 0 0 1px rgba(4, 86, 56, 0.25);
}

.classic-pattern-1 .classic-bamboo-mark {
  width: 12px;
  height: 20px;
  border-radius: 10px 10px 12px 12px;
  transform: rotate(-16deg);
}

.classic-tile.locked {
  cursor: default;
}

.classic-tile.open:hover,
.classic-tile.selected,
.classic-tile.hint {
  transform: translateY(-4px);
}

.classic-tile.selected {
  outline: 4px solid #ffe066;
  filter: brightness(1.08);
}

.classic-tile.hint {
  outline: 4px solid #59d9ff;
}

.classic-tile.matching {
  animation: classic-pop 220ms ease both;
}

.classic-rank,
.classic-suit,
.classic-symbol {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
  font-weight: 900;
  line-height: 0.92;
}

.classic-rank {
  font-size: 1.02rem;
}

.classic-suit {
  margin-top: 0.05rem;
  font-size: 0.82rem;
}

.classic-symbol.single {
  font-size: 1.55rem;
}

.classic-character {
  color: #a80f27;
}

.classic-bamboo {
  color: #0d7a50;
}

.classic-dot {
  color: #256f7e;
}

.classic-wind {
  color: #111b24;
}

.classic-dragon {
  color: #a80f27;
}

.classic-flower,
.classic-season {
  color: #0b7c58;
}

@keyframes classic-pop {
  0% {
    transform: translateY(-6px) scale(1);
  }

  100% {
    transform: translateY(-12px) scale(0.86);
    opacity: 0.28;
  }
}

.four-player-main {
  width: min(1280px, calc(100% - 2rem));
}

.four-preview-board {
  display: grid;
  min-height: 380px;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--tile-a) 38%, transparent), transparent),
    linear-gradient(160deg, color-mix(in srgb, var(--tile-c) 38%, white), var(--surface-solid));
}

.table-chip {
  position: absolute;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--tile-face);
  color: var(--tile-ink);
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow:
    inset 0 -7px rgba(60, 35, 45, 0.12),
    0 18px 28px rgba(85, 45, 60, 0.16);
}

.top-chip {
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
}

.right-chip {
  top: 50%;
  right: 18%;
  transform: translateY(-50%);
}

.bottom-chip {
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
}

.left-chip {
  top: 50%;
  left: 18%;
  transform: translateY(-50%);
}

.mahjong-table-shell {
  margin-top: 1rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.table-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.four-table {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(280px, 1fr) minmax(150px, 0.55fr);
  grid-template-rows: auto minmax(230px, auto) auto;
  gap: 0.8rem;
  min-height: 720px;
  padding: clamp(0.8rem, 2vw, 1.2rem);
  border-radius: 24px;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--tile-c) 26%, transparent), transparent 25rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.16)),
    color-mix(in srgb, #3aa17e 45%, var(--surface-solid));
}

.seat,
.table-center-panel {
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 38px rgba(68, 45, 52, 0.12);
  backdrop-filter: blur(12px);
}

.seat {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.78rem;
}

.seat-top {
  grid-column: 2;
  grid-row: 1;
}

.seat-left {
  grid-column: 1;
  grid-row: 2;
}

.seat-right {
  grid-column: 3;
  grid-row: 2;
}

.seat-bottom {
  grid-column: 1 / 4;
  grid-row: 3;
}

.table-center-panel {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 230px;
  padding: 1rem;
  text-align: center;
}

.table-center-panel h3 {
  max-width: 520px;
  margin-bottom: 0.35rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.table-center-panel p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.65;
}

.seat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.seat-name {
  font-weight: 900;
}

.seat-state {
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tile-b) 18%, var(--surface-solid));
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.opponent-hand,
.human-hand,
.discard-row,
.last-discard {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.opponent-hand {
  min-height: 42px;
}

.human-hand {
  align-items: end;
  min-height: 86px;
}

.discard-row {
  min-height: 38px;
  padding: 0.42rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
}

.empty-discard {
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.real-tile {
  display: grid;
  width: 46px;
  min-height: 62px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 244, 0.8)),
    var(--tile-face);
  color: var(--tile-ink);
  font-weight: 900;
  box-shadow:
    inset 0 -6px rgba(60, 35, 45, 0.13),
    0 10px 18px rgba(60, 35, 45, 0.14);
  position: relative;
}

.real-tile::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(90, 50, 65, 0.14);
  border-radius: 8px;
}

.real-tile.clickable {
  cursor: pointer;
}

.real-tile.clickable:hover,
.real-tile.drawn {
  outline: 3px solid var(--accent-3);
  transform: translateY(-6px);
}

.real-tile.compact {
  width: 32px;
  min-height: 42px;
  border-radius: 8px;
  font-size: 0.86rem;
}

.real-tile:disabled {
  cursor: default;
}

.tile-character {
  color: #b43a4c;
}

.tile-bamboo {
  color: #247f5f;
}

.tile-dot {
  color: #2669a8;
}

.tile-wind,
.tile-dragon {
  color: #5b3450;
}

.tile-back {
  display: block;
  width: 24px;
  height: 38px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--tile-a), var(--tile-b), var(--tile-c)),
    var(--tile-face);
  box-shadow:
    inset 0 -5px rgba(60, 35, 45, 0.18),
    0 7px 12px rgba(60, 35, 45, 0.12);
}

.last-discard {
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
}

.last-discard-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.finish-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(40, 20, 30, 0.42);
  backdrop-filter: blur(10px);
}

.finish-modal.hidden {
  display: none;
}

.finish-card {
  position: relative;
  width: min(520px, 100%);
  padding: 1.2rem;
  border-radius: 22px;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text);
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
  }

  .top-nav {
    order: 3;
    width: 100%;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .audio-controls {
    order: 2;
  }

  .hero,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-preview {
    min-height: auto;
  }

  .skin-grid,
  .game-grid,
  .detail-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  main {
    width: min(100% - 0.8rem, 1180px);
  }

  .hero {
    padding-top: 1rem;
  }

  .hero-stats,
  .skin-grid,
  .game-grid,
  .detail-links {
    grid-template-columns: 1fr;
  }

  .daily-card,
  .game-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .board-wrap {
    min-height: 420px;
  }

  .mahjong-board {
    min-width: 520px;
  }

  .board-row {
    min-height: 76px;
  }

  .tile {
    width: 64px;
    min-height: 76px;
    font-size: 1.22rem;
  }

  .four-player-main {
    width: min(100% - 0.8rem, 1280px);
  }

  .four-table {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .seat,
  .table-center-panel {
    width: 100%;
  }

  .human-hand {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
  }

  .real-tile {
    flex: 0 0 auto;
    width: 42px;
    min-height: 58px;
  }

  .real-tile.compact {
    width: 30px;
    min-height: 40px;
  }

  .tile-back {
    width: 20px;
    height: 34px;
  }
}

.classic-connect-page.classic-247-replica {
  background: #f9fdff;
  overflow: hidden;
}
