@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;800;900&display=swap");

:root {
  --ink: #030615;
  --ink2: #07142d;
  --panel: rgba(6, 20, 51, 0.84);
  --panel2: rgba(10, 33, 76, 0.78);
  --line: #2c94ff;
  --cyan: #26dcff;
  --violet: #9d4dff;
  --pink: #ea4bff;
  --text: #f4f7ff;
  --muted: #b4c4e5;
  --blue: #1677ef;
  --green: #0fbd74;
  --amber: #f2ae1a;
  --coral: #ec4d63;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--ink);
  scroll-behavior: smooth;
}
body {
  min-width: 320px;
  overflow-x: hidden;
  margin: 0;
  color: var(--text);
  font-family:
    "Nunito Sans",
    Segoe UI,
    sans-serif;
  background:
    radial-gradient(850px 500px at 70% 5%, #234fc94d, transparent 72%),
    radial-gradient(800px 600px at 7% 90%, #7f25d342, transparent 74%),
    var(--ink);
  min-height: 100vh;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(#468dff12 1px, transparent 1px),
    linear-gradient(90deg, #468dff12 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(#0008, transparent 90%);
}
body:after { opacity: .85; }
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.shell {
  width: min(1480px, calc(100% - 48px));
  margin: auto;
}
.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 26px;
  border-bottom: 1px solid #27466e78;
}
.wordmark {
  border: 0;
  background: transparent;
  color: #f6f8ff;
  font-size: 25px;
  font-weight: 900;
  padding: 0;
  letter-spacing: -1px;
}
.wordmark span,
.hero h1 span {
  background: linear-gradient(92deg, #60b9ff, #bc67ff 40%, #ff4bd4 75%);
  background-clip: text;
  color: transparent;
}
.nav nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-left: auto;
}
.nav nav button {
  border: 0;
  background: none;
  padding: 8px 2px;
  color: #c3d3ef;
  font-weight: 700;
}
.nav nav button:hover {
  color: #fff;
}
.button {
  border: 1px solid #427bde;
  border-radius: 11px;
  background: #102752;
  color: #fff;
  font-weight: 900;
  padding: 13px 19px;
  box-shadow: inset 0 1px #ffffff16;
  transition:
    transform 0.18s,
    filter 0.18s;
}
.button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.danger { border-color: #ff4b68; background: linear-gradient(105deg, #7f1836, #d7214d); box-shadow: 0 0 20px #ff28555c, inset 0 1px #ffffff2b; }
.primary {
  background: linear-gradient(105deg, #255fff, #b120ff);
  border-color: #7d75ff;
  box-shadow: 0 0 25px #773aff7d;
}
.violet {
  background: linear-gradient(105deg, #7138ee, #dd42ff);
  border-color: #bc62ff;
}
.ghost {
  background: #0b1d41cc;
  border-color: #3866ad;
}
.text-button {
  border: 0;
  background: transparent;
  color: #61dffc;
  font-weight: 900;
  padding: 12px 0;
}
.eyebrow {
  display: block;
  color: #36dfff;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 900;
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  min-height: 500px;
  padding: 55px 34px 48px;
}
.hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(60px, 8.5vw, 118px);
  line-height: 0.86;
  letter-spacing: -5px;
}
.hero h1:not(span) {
  background: linear-gradient(
    90deg,
    #fff 0%,
    #c4dcff 25%,
    #79c2ff 42%,
    #c65dff 74%
  );
  background-clip: text;
  color: transparent;
}
.hero p,
.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 27px;
}
.cards {
  height: 310px;
  position: relative;
  filter: drop-shadow(0 0 42px #7549ff52);
}
.number-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: 138px;
  height: 200px;
  border: 3px solid #f8fbff;
  border-radius: 18px;
  font-size: 60px;
  font-style: normal;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 3px 1px #0006;
  box-shadow:
    0 10px 22px #0008,
    0 0 28px currentColor;
}
.number-card:nth-child(1) {
  left: 8%;
  top: 82px;
  transform: rotate(-19deg);
}
.number-card:nth-child(2) {
  left: 28%;
  top: 50px;
  transform: rotate(-7deg);
}
.number-card:nth-child(3) {
  left: 50%;
  top: 40px;
  transform: rotate(8deg);
}
.number-card:nth-child(4) {
  left: 68%;
  top: 80px;
  transform: rotate(19deg);
}
.hero::after { content: ""; position: absolute; inset: 78px 1% 6px 36%; z-index: -1; pointer-events: none; background: radial-gradient(circle at 52% 44%, #2cf3ff70 0 1px, transparent 2px), radial-gradient(circle at 61% 33%, #ff3deb80 0 2px, transparent 3px), linear-gradient(115deg, transparent 24%, #37e5ff20 32%, transparent 35%), linear-gradient(50deg, transparent 45%, #d72cff2d 51%, transparent 57%); background-size: 66px 66px, 100px 100px, 100% 100%, 100% 100%; filter: blur(.2px); }
.blue {
  background: linear-gradient(145deg, #299cff, #1552c7);
}
.green {
  background: linear-gradient(145deg, #36dd8f, #068c54);
}
.amber {
  background: linear-gradient(145deg, #ffd34d, #d88800);
}
.coral {
  background: linear-gradient(145deg, #ff6c7e, #c62444);
}
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 42px;
  border: 1px solid #326fc3;
  border-radius: 16px;
  overflow: hidden;
  background: #061832af;
  box-shadow: 0 20px 44px #0005;
}
.features div {
  padding: 18px 22px;
  border-right: 1px solid #31558670;
  color: var(--muted);
}
.features b {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}
.panel {
  border: 1px solid #2877d6;
  border-radius: 17px;
  background: linear-gradient(135deg, #0d2b61b8, #06152fb8);
  box-shadow:
    inset 0 1px #78c4ff2d,
    0 20px 50px #0006;
}
.preview {
  margin-bottom: 52px;
  padding: 26px 30px;
  min-height: 245px;
}
.preview h2 {
  margin: 9px 0 22px;
}
.preview-table {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 130px;
}
.mini-stack {
  display: grid;
  place-items: center;
  width: 90px;
  height: 125px;
  border: 3px solid #8cafff;
  border-radius: 12px;
  background: repeating-linear-gradient(
    -45deg,
    #103276,
    #103276 11px,
    #08205a 11px,
    #08205a 22px
  );
  font-size: 26px;
  font-weight: 900;
}
.mini-stack.coral {
  background: linear-gradient(145deg, #ff6c7e, #c62444);
}
.arrow {
  color: #39dfff;
  font-size: 50px;
}
.preview-hand {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.preview-hand i {
  display: grid;
  place-items: center;
  width: 62px;
  height: 88px;
  border: 2px solid #fff;
  border-radius: 9px;
  font-size: 26px;
  font-style: normal;
  font-weight: 900;
}
.screen {
  padding: 36px 0 54px;
}
.lobby {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}
.lobby-panel {
  padding: 31px;
}
.lobby h1,
.page h1 {
  margin: 5px 0 8px;
  font-size: 42px;
}
.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 27px;
}
.mode {
  position: relative;
  padding: 23px;
  border: 1px solid #3373d1;
  border-radius: 13px;
  background: #061936ad;
  overflow: hidden;
}
.mode:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
}
.mode h3 {
  margin: 8px 0 8px;
  font-size: 23px;
}
.mode p {
  min-height: 49px;
  color: var(--muted);
  line-height: 1.45;
}
.mode-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1557ae;
  color: #86edff;
  font-size: 24px;
  font-weight: 900;
}
.join-mode .mode-icon {
  background: #692ac6;
}
.mode label {
  display: block;
  color: #b9c8e6;
  font-size: 13px;
  font-weight: 800;
  margin-top: 10px;
}
.mode input,
.mode select {
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  border: 1px solid #3984df;
  border-radius: 9px;
  background: #061635;
  color: #fff;
  outline: none;
}
.mode input:focus,
.mode select:focus {
  border-color: #48efff;
  box-shadow: 0 0 0 3px #36dfff1c;
}
.mode .button {
  width: 100%;
  margin-top: 16px;
}
.goal-aside {
  padding: 25px;
}
.goal-aside h2 {
  margin: 5px 0 16px;
}
.goals {
  display: grid;
  gap: 7px;
}
.goal {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #3460a047;
  color: #e9efff;
  font-size: 14px;
  font-weight: 700;
}
.goal:last-child {
  border: 0;
}
.goal b {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  height: 25px;
  border-radius: 7px;
  background: linear-gradient(135deg, #2b8fff, #7a4cff);
  font-size: 12px;
}
.toast {
  min-height: 22px;
  color: #ffbdc7;
  font-weight: 700;
}
.page {
  margin: 35px 0 55px;
  padding: 34px;
}
.goal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.goal-card {
  padding: 19px;
  border: 1px solid #367ce0;
  border-radius: 12px;
  background: #071a3c;
}
.goal-card:nth-child(4n + 2) {
  border-color: #a357ec;
}
.goal-card:nth-child(4n + 3) {
  border-color: #38caa4;
}
.goal-card:nth-child(4n) {
  border-color: #ed9a41;
}
.goal-card > b {
  color: #40ddff;
  font-size: 14px;
}
.goal-card h2 {
  margin: 5px 0;
  font-size: 21px;
}
.goal-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
  margin-top: 30px;
}
.guide-grid article {
  padding: 22px;
  border: 1px solid #356ebf;
  border-radius: 13px;
  background: #071936;
}
.guide-grid b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #337eff, #c13dff);
  font-size: 19px;
}
.guide-grid h2 {
  margin: 12px 0 5px;
}
.guide-grid p,
.note {
  color: var(--muted);
  line-height: 1.55;
}
.note {
  margin-top: 28px;
  padding: 14px;
  border-left: 3px solid var(--cyan);
  background: #0b2244;
}
.game-shell {
  padding: 22px 0 44px;
}
.gamebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.gamebar h2 {
  margin: 1px 0;
  font-size: 23px;
}
.room-code {
  padding: 10px 13px;
  border: 1px solid #3969ae;
  border-radius: 10px;
  background: #061a39;
  color: var(--muted);
}
.room-code b {
  color: #fff;
  margin-left: 7px;
  letter-spacing: 0.1em;
}
.game-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 16px;
}
.player-panel,
.round-panel {
  padding: 19px;
}
.player {
  padding: 14px 11px;
  border-bottom: 1px solid #34599063;
}
.player.active {
  background: #1766d329;
  border-left: 3px solid var(--cyan);
}
.player small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.board {
  min-height: 500px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(ellipse at center, #15568e60, transparent 53%),
    linear-gradient(135deg, #0b2954cf, #06142dcf);
  overflow: hidden;
}
.opponent-row {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.opponent {
  text-align: center;
  color: #dce8ff;
  font-size: 13px;
  font-weight: 800;
}
.backs {
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.backs i {
  width: 36px;
  height: 58px;
  margin-left: -13px;
  border: 2px solid #b7d1ff;
  border-radius: 6px;
  background: repeating-linear-gradient(
    -45deg,
    #16377e,
    #16377e 7px,
    #0a2053 7px,
    #0a2053 14px
  );
}
.stacks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin: auto;
}
.pile {
  width: 122px;
  height: 165px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 3px solid #e9f2ff;
  border-radius: 13px;
  color: #fff;
}
.pile.back {
  background: repeating-linear-gradient(
    -45deg,
    #173b89,
    #173b89 12px,
    #0b2157 12px,
    #0b2157 24px
  );
}
.pile strong,
.pile b {
  font-size: 54px;
}
.pile span {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
  margin-top: 8px;
}
.stack-arrow {
  font-size: 53px;
  color: #34dfff;
}
.turn-message {
  text-align: center;
  color: #c7d9f7;
  font-weight: 700;
}
.waiting {
  text-align: center;
  margin: auto;
}
.round-panel h3 {
  margin: 7px 0;
}
.round-panel p {
  color: var(--muted);
  line-height: 1.5;
}
.round-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid #315e9c;
  border-radius: 9px;
}
.round-status span {
  color: var(--muted);
}
.hand-panel {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) 220px;
  align-items: center;
  gap: 17px;
  padding: 16px;
  margin-top: 16px;
}
.hand-panel h3 {
  margin: 2px 0;
}
.hand {
  display: flex;
  gap: 7px;
  justify-content: center;
  overflow: auto;
  padding: 18px 5px 8px;
}
.game-card {
  flex: 0 0 68px;
  height: 100px;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 5px 13px #0008;
  transition: transform 0.16s;
}
.game-card:hover,
.game-card.selected {
  transform: translateY(-14px);
  outline: 3px solid #c15cff;
}
.game-card strong {
  display: block;
  font-size: 33px;
}
.game-card small {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 900;
}
.game-actions {
  display: grid;
  gap: 8px;
}
.game-actions .button {
  padding: 10px;
}
.special {
  background: linear-gradient(145deg, #273556, #11182a) !important;
}
.special strong {
  color: #cbb5ff;
}
@media (max-width: 960px) {
  .shell {
    width: min(100% - 28px, 760px);
  }
  .nav nav {
    display: none;
  }
  .nav-play {
    margin-left: auto;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 45px 12px 30px;
  }
  .cards {
    margin-top: 5px;
    transform: scale(0.8);
    transform-origin: left top;
    margin-bottom: -48px;
  }
  .lobby,
  .game-grid {
    grid-template-columns: 1fr;
  }
  .features {
    grid-template-columns: 1fr 1fr;
  }
  .goal-aside {
    order: -1;
  }
  .hand-panel {
    grid-template-columns: 1fr;
  }
  .gamebar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .room-code {
    margin-left: auto;
  }
}
@media (max-width: 560px) {
  .nav-play { display: none; }
  .hero h2 { font-size: 22px; }
  .shell {
    width: min(100% - 20px, 540px);
  }
  .nav {
    min-height: 64px;
  }
  .wordmark {
    font-size: 22px;
  }
  .nav-play {
    padding: 9px 12px;
    font-size: 13px;
  }
  .hero {
    padding-top: 38px;
  }
  .hero h1 {
    font-size: 58px;
    letter-spacing: -3px;
  }
  .hero p,
  .lead {
    font-size: 16px;
  }
  .cards {
    height: 260px;
    transform: scale(0.64);
    margin-bottom: -91px;
  }
  .features {
    grid-template-columns: 1fr;
    margin-bottom: 26px;
  }
  .features div {
    border-right: 0;
    border-bottom: 1px solid #31558670;
  }
  .modes,
  .goal-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .lobby-panel,
  .page {
    padding: 20px;
  }
  .lobby h1,
  .page h1 {
    font-size: 34px;
  }
  .gamebar {
    gap: 10px;
  }
  .gamebar .ghost {
    order: 3;
  }
  .room-code {
    margin-left: 0;
  }
  .board {
    min-height: 410px;
  }
  .stacks {
    gap: 13px;
  }
  .pile {
    width: 100px;
    height: 140px;
  }
  .pile strong,
  .pile b {
    font-size: 44px;
  }
  .player-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .player-panel .eyebrow,
  .player-panel .text-button {
    grid-column: 1/-1;
  }
  .player {
    border: 1px solid #34599063;
    border-radius: 8px;
  }
  .hand {
    justify-content: flex-start;
  }
  .game-card {
    flex-basis: 61px;
    height: 91px;
  }
  .preview-hand i {
    width: 45px;
    height: 67px;
    font-size: 20px;
  }
  .preview-table {
    gap: 8px;
  }
  .mini-stack {
    width: 70px;
    height: 100px;
  }
  .arrow {
    font-size: 34px;
  }
}

/* Reference-level depth, motion, and consistent preview cards. */
body:after { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(circle at 72% 24%, #286dff45 0 2px, transparent 3px), radial-gradient(circle at 29% 72%, #ca39ff45 0 2px, transparent 3px), linear-gradient(124deg, transparent 29%, #1554d51c 30% 31%, transparent 32%); background-size: 170px 170px, 230px 230px, 100% 100%; animation: ambient 18s ease-in-out infinite alternate; }
.hero h2 { margin: 0; color: #f6f8ff; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.12; }
.hero p { margin-top: 15px; }
.number-card:nth-child(1) { animation: float 4.5s ease-in-out infinite; }
.number-card:nth-child(2) { animation: float 5.2s ease-in-out .6s infinite; }
.number-card:nth-child(3) { animation: float 4.8s ease-in-out 1s infinite; }
.number-card:nth-child(4) { animation: float 5.5s ease-in-out .25s infinite; }
.goal-preview { margin: 20px 0 42px; }
.section-heading h2 { margin: 6px 0 18px; font-size: 31px; }
.goal-teasers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; margin-bottom: 16px; }
.teaser { min-height: 200px; padding: 16px; border: 1px solid #2d7ad5; border-radius: 13px; background: linear-gradient(145deg, #102f69d1, #07172f); transition: transform .2s, border-color .2s, box-shadow .2s; }
.teaser:hover { transform: translateY(-7px); border-color: #67eaff; box-shadow: 0 12px 27px #0d69ff4c; }
.teaser-2 { border-color: #8a4be5; }.teaser-3 { border-color: #1acda1; }.teaser-4 { border-color: #e780d3; }.teaser-5 { border-color: #e5a61e; }
.teaser > b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #287bff, #893bff); font-size: 13px; }
.teaser h3 { font-size: 17px; margin: 10px 0 2px; }.teaser p { margin: 0; color: #b7c8e8; font-size: 13px; line-height: 1.35; }
.sample-cards { display: flex; align-items: flex-end; min-height: 54px; margin-top: 14px; overflow: hidden; }.sample-cards i { display: grid; place-items: center; flex: 0 0 28px; height: 43px; margin-left: -4px; border: 1px solid #eff6ff; border-radius: 5px; color: #fff; font-style: normal; font-size: 16px; font-weight: 900; box-shadow: 0 2px 7px #0007; }.sample-cards i:first-child { margin-left: 0; }
.goal small { display: block; color: #aabdda; font-size: 11px; font-weight: 700; margin-top: 1px; }
.game-card { background-image: linear-gradient(145deg, #ffffff18, transparent 45%); }
.laid-area { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 52px; }.laid-set { display: flex; align-items: flex-end; padding: 7px; border: 1px solid #4d7fc2; border-radius: 9px; background: #061735b8; }.laid-set small { align-self: flex-start; margin-right: 7px; color: #abd4ff; font-weight: 800; }.laid-set i { display: grid; place-items: center; width: 25px; height: 38px; margin-left: -4px; border: 1px solid #f0f6ff; border-radius: 5px; color: white; font-size: 13px; font-style: normal; font-weight: 900; }
@keyframes float { 50% { translate: 0 -14px; } } @keyframes ambient { to { translate: 0 -16px; filter: hue-rotate(14deg); } }
@media (max-width: 1100px) { .goal-teasers { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .goal-teasers { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
.settings { max-width: 760px; margin: 42px auto 58px; }.setting-row { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; margin: 18px 0; padding: 18px; border: 1px solid #315f9f; border-radius: 12px; background: #071936; }.setting-row b,.setting-row small { display: block; }.setting-row small { color: var(--muted); margin-top: 3px; }.setting-row input[type="text"] { width: 210px; padding: 10px; border: 1px solid #3a7fd8; border-radius: 8px; background: #061635; color: #fff; }.setting-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: #8d49ff; }.reduced-motion *, .reduced-motion *:before, .reduced-motion *:after { animation: none !important; transition: none !important; }

/* Multiplayer table: every laid group stays readable and can become a valid target. */
.game-neon { position: relative; padding: 18px 0 44px; }
.game-neon::before { content: ""; position: absolute; inset: 112px 8% 120px; z-index: -1; border-radius: 42px; background: radial-gradient(ellipse at 48% 28%, #177dff28, transparent 42%), radial-gradient(ellipse at 75% 68%, #9b38ff22, transparent 39%); filter: blur(14px); }
.table-header { display: grid; grid-template-columns: minmax(160px, .75fr) minmax(280px, 1.7fr) minmax(170px, .7fr); align-items: center; gap: 16px; padding: 15px 18px; }
.table-goal { text-align: center; }.table-goal h1 { margin: 3px 0; font-size: clamp(22px, 2.4vw, 35px); }.table-goal p { margin: 0; color: var(--muted); font-size: 14px; }.table-code { display: grid; justify-items: end; gap: 2px; color: #a9bedf; font-size: 10px; font-weight: 800; letter-spacing: 1px; }.table-code b { color: #fff; font-size: 18px; letter-spacing: 2px; }.exit-game { justify-self: start; }
.table-opponents { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 14px 0; }.opponent-seat { min-width: 0; padding: 12px 14px; border: 1px solid #255a9a; border-radius: 12px; background: linear-gradient(135deg, #0b2348d9, #07142dd9); }.opponent-seat.is-active { border-color: #27dfff; box-shadow: 0 0 20px #087cff48; }.seat-profile { display: flex; align-items: center; gap: 9px; }.seat-profile > i,.status-player > i { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #257eff, #7743ff); color: #fff; font-style: normal; font-weight: 900; }.seat-profile b,.seat-profile small { display: block; }.seat-profile small { color: #b1c3e5; font-size: 12px; }.seat-profile small strong { color: #fff; }.backs { display: flex; height: 42px; align-items: end; margin-top: 7px; padding-left: 3px; overflow: hidden; transition: width .24s ease; }.backs i { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 36px; margin-left: -8px; border: 1px solid #d6e9ff; border-radius: 5px; background: repeating-linear-gradient(135deg, #091c54 0 4px, #1846a3 4px 8px); color: #78d9ff; font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: -.5px; box-shadow: 0 3px 7px #0008, inset 0 0 0 2px #071336; animation: dealIn .2s ease both; }.backs i:first-child { margin-left: 0; }
.table-core { display: grid; grid-template-columns: minmax(210px, .74fr) minmax(360px, 1.7fr) minmax(210px, .78fr); gap: 14px; align-items: stretch; }.pile-zone,.combinations-zone,.table-status { min-width: 0; min-height: 340px; padding: 16px; }.pile-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; }.pile-zone .stacks { display: flex; align-items: center; gap: clamp(10px, 2vw, 25px); margin: 16px 0 8px; }.pile-zone .pile { width: clamp(76px, 8vw, 102px); height: clamp(112px, 12vw, 148px); }.pile-zone .pile strong,.pile-zone .pile b { font-size: clamp(26px, 3.2vw, 42px); }.stack-arrow { color: #25cfff; font-size: 42px; text-shadow: 0 0 15px #178aff; }.turn-message { max-width: 230px; margin: 10px auto 0; color: #bed0ef; text-align: center; font-size: 13px; line-height: 1.45; }
.combinations-zone { display: flex; flex-direction: column; background: linear-gradient(145deg, #0a2148ea, #06142dd9); }.zone-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }.zone-heading > b { color: #c8e7ff; font-size: 13px; }.laid-area { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-content: start; justify-content: stretch; gap: 10px; min-height: 0; max-height: 310px; padding: 2px 4px 8px; overflow: auto; scrollbar-color: #267fdc #08172e; scrollbar-width: thin; }.laid-player { min-width: 0; padding: 10px; border: 1px solid #244f8d; border-radius: 10px; background: #061731d8; }.laid-player.is-own { border-color: #23d0bb; box-shadow: inset 0 0 20px #12c5a016; }.laid-player header { display: flex; justify-content: space-between; align-items: start; gap: 6px; margin-bottom: 8px; }.laid-player header b,.laid-player header small { display: block; }.laid-player header b { color: #f5f8ff; font-size: 14px; }.laid-player header small { color: #96b3d7; font-size: 11px; }.laid-player header > span { padding: 3px 6px; border: 1px solid #305b91; border-radius: 999px; color: #bde0ff; font-size: 10px; white-space: nowrap; }.laid-combos { display: flex; flex-wrap: wrap; gap: 7px; }.laid-combo { position: relative; min-width: 0; padding: 7px; border: 1px solid #315b8e; border-radius: 8px; background: #0a2347; color: #fff; text-align: left; }.laid-combo:disabled { opacity: 1; }.laid-combo > span { display: block; margin-bottom: 4px; color: #a4c7ec; font-size: 9px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; }.laid-combo > div { display: flex; align-items: end; min-height: 45px; padding-right: 3px; }.laid-card { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 42px; margin-left: -5px; border: 1px solid #eff8ff; border-radius: 5px; color: #fff; font-size: 14px; font-style: normal; font-weight: 900; box-shadow: 0 3px 7px #0007; }.laid-card:first-child { margin-left: 0; }.laid-combo em { display: block; margin-top: 5px; color: #8dfff0; font-size: 10px; font-style: normal; font-weight: 900; }.laid-combo.can-attach { cursor: pointer; border-color: #64fff0; box-shadow: 0 0 0 1px #2cffe180, 0 0 22px #14d9c558; animation: targetPulse 1.35s ease-in-out infinite alternate; }.laid-combo.can-attach:hover { transform: translateY(-2px); background: #104565; }.empty-combinations { grid-column: 1/-1; margin: auto; color: #b4c7e7; text-align: center; line-height: 1.5; }
.table-status { display: flex; flex-direction: column; gap: 7px; }.status-player { display: flex; align-items: center; gap: 8px; padding: 7px; border-bottom: 1px solid #2b4f7c77; }.status-player.is-active { border-radius: 8px; background: #1366a339; }.status-player b,.status-player small { display: block; }.status-player b { font-size: 13px; }.status-player small { color: #a7bada; font-size: 11px; }.log { margin-top: auto; padding-top: 10px; border-top: 1px solid #2b4f7c; }.log p { margin: 5px 0 0; color: #c5d5ec; font-size: 13px; line-height: 1.4; }
.hand-panel { margin-top: 14px; padding: 14px 18px; }.hand-panel .hand { min-height: 112px; }.game-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 10px; }.game-actions .button { min-width: 150px; }
.route-toggle { margin-top: 5px; border: 1px solid #7344df; border-radius: 999px; background: #1a1641; color: #e5ddff; padding: 5px 9px; font-size: 10px; font-weight: 900; }.table-goals-rail { position: fixed; z-index: 10; top: 92px; right: 14px; width: min(300px, calc(100vw - 28px)); max-height: calc(100vh - 110px); padding: 18px; overflow: auto; border: 1px solid #467cff; border-radius: 16px; background: linear-gradient(145deg, #081b43f5, #080b25fa); box-shadow: 0 20px 60px #000b, 0 0 34px #5435cc52; transform: translateX(calc(100% + 26px)); transition: transform .25s ease; }.table-goals-rail.is-open { transform: translateX(0); }.table-goals-rail h2 { margin: 5px 0 12px; font-size: 22px; }.rail-close { float: right; border: 0; background: #1d315c; color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 20px; }.rail-goal { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px solid #2a477075; }.rail-goal > b { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, #257cff, #a238ff); color: #fff; }.rail-goal span,.rail-goal small { display: block; }.rail-goal span { color: #ecf5ff; font-size: 13px; font-weight: 900; }.rail-goal small { margin-top: 1px; color: #a9bddf; font-size: 10px; font-weight: 700; }.rail-goal.is-current { margin: 0 -8px; padding: 8px; border-radius: 9px; background: #277cff29; box-shadow: inset 0 0 18px #2c8aff2b; }
@keyframes targetPulse { to { box-shadow: 0 0 0 1px #8ffff7, 0 0 31px #29e7d994; } }
@keyframes dealIn { from { opacity: 0; transform: translateY(-8px) rotate(-5deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
@media (max-width: 1100px) { .table-core { grid-template-columns: minmax(220px, .78fr) minmax(360px, 1.45fr); }.table-status { grid-column: 1/-1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); min-height: auto; }.table-status > .eyebrow,.table-status .log { grid-column: 1/-1; }.laid-area { max-height: 360px; } }
@media (max-width: 720px) { .game-neon { padding-top: 8px; }.table-header { grid-template-columns: 1fr; text-align: center; }.exit-game { justify-self: center; }.table-code { justify-items: center; }.table-opponents { display: flex; overflow-x: auto; padding-bottom: 4px; }.opponent-seat { flex: 0 0 210px; }.table-core { grid-template-columns: 1fr; }.pile-zone,.combinations-zone { min-height: auto; }.laid-area { grid-template-columns: 1fr; max-height: 410px; }.table-status { grid-column: auto; }.hand-panel { padding: 13px; }.hand-panel .hand { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }.hand-panel .game-card { flex: 0 0 63px; }.game-actions .button { flex: 1 1 145px; min-width: 0; } }

/* Four-panel reference refinement: shared cosmic light, glass depth, compact navigation. */
.shell { position: relative; isolation: isolate; }.shell::before { content: ""; position: fixed; inset: 76px 0 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 43% 14%, #1268ff2f, transparent 23%), radial-gradient(ellipse at 70% 32%, #d227ff2b, transparent 21%), radial-gradient(ellipse at 12% 76%, #ff2c8b17, transparent 28%); filter: blur(4px); }
.wordmark { display: flex; align-items: center; gap: 9px; }.wordmark::before { content: "TR"; display: grid; place-items: center; width: 29px; height: 31px; border: 2px solid #d8eaff; border-radius: 5px; background: linear-gradient(145deg, #284eff, #7228cf); color: #fff; font-size: 11px; font-weight: 900; transform: rotate(-11deg); box-shadow: 8px 3px 0 -2px #12d8bf, 0 0 18px #6c37ff; }.nav { min-height: 64px; gap: 18px; }.nav nav { gap: 17px; }.nav nav button { font-size: 12px; }.nav-play { padding: 10px 18px; border-radius: 10px; }
.hero { position: relative; min-height: 460px; overflow: hidden; border-bottom: 1px solid #2c78b4a8; background: radial-gradient(ellipse at 72% 42%, #007fff3a, transparent 31%), radial-gradient(ellipse at 66% 62%, #df17fb31, transparent 38%), linear-gradient(105deg, #03071a 0%, #061535e8 49%, #091a41b9 100%); }.hero::before { content: ""; position: absolute; inset: 0 0 0 42%; pointer-events: none; background: repeating-linear-gradient(128deg, transparent 0 48px, #50c7ff13 49px 50px, transparent 51px 106px), radial-gradient(circle at 62% 21%, #42e9ff 0 1px, transparent 2px), radial-gradient(circle at 41% 72%, #f340ff 0 2px, transparent 4px); background-size: auto, 73px 73px, 107px 107px; }.hero-copy,.cards { z-index: 1; }.hero h2 { max-width: 450px; font-size: clamp(25px, 2.5vw, 34px); }.hero p { max-width: 430px; font-size: 15px; }.cards { transform: translateY(10px) scale(1.04); }.number-card { border-width: 3px; border-radius: 14px; box-shadow: 0 14px 30px #000a, 0 0 30px currentColor, inset 0 1px #fff8; }.features { margin-top: -1px; border-radius: 0 0 15px 15px; background: linear-gradient(90deg, #061a36e8, #0a1740e8); }.features div { padding: 15px 19px; font-size: 12px; }
.lobby { position: relative; padding-top: 64px; }.lobby::before,.page::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0 0 auto; height: 220px; background: radial-gradient(ellipse at 57% 8%, #087fff42, transparent 48%), radial-gradient(ellipse at 77% 38%, #d32aff34, transparent 43%), repeating-linear-gradient(125deg, transparent 0 80px, #4c8eff12 81px 82px, transparent 83px 160px); }.lobby-panel,.goal-aside,.page { backdrop-filter: blur(12px); }.lobby-panel { border-color: #277de8; box-shadow: 0 0 0 1px #1b62bc50, 0 24px 70px #0009; }.mode { min-height: 326px; background: linear-gradient(155deg, #09245acc, #06132fef); box-shadow: inset 0 1px #a7e5ff23, 0 12px 32px #0005; }.mode:hover { border-color: #5bddff; box-shadow: 0 0 23px #2779ff44, inset 0 1px #a7e5ff38; }.goal-aside { background: linear-gradient(160deg, #0a2859dc, #07142fde); }
.page { position: relative; overflow: hidden; background: linear-gradient(145deg, #09245ce8, #06132de8); }.goal-card { position: relative; overflow: hidden; min-height: 150px; background: linear-gradient(150deg, #0d2b61e8, #061632ed); box-shadow: inset 0 1px #a5e4ff24; }.goal-card::after { content: ""; position: absolute; width: 120px; height: 160px; right: -48px; bottom: -89px; border: 1px solid #4f8dff5c; border-radius: 11px; transform: rotate(24deg); box-shadow: 0 0 25px #7f38ff3d; }.goal-card:nth-child(4n + 2)::after { border-color: #c450ff70; }.goal-card:nth-child(4n + 3)::after { border-color: #2ee3a970; }.goal-card:nth-child(4n)::after { border-color: #ffba3f70; }
.game-neon { background: radial-gradient(ellipse at 46% 29%, #147dff24, transparent 28%), radial-gradient(ellipse at 12% 57%, #c720ff1c, transparent 32%); }.table-header,.table-core > .panel,.hand-panel { backdrop-filter: blur(12px); }.table-header { border-color: #326fd4; background: linear-gradient(135deg, #071a3ee8, #091630e8); }.opponent-seat { border-color: #3481df; box-shadow: inset 0 1px #8edbff1b; }.pile-zone { background: radial-gradient(circle at 50% 42%, #2389ff22, transparent 48%), #071832d9; }.combinations-zone { border-color: #365dce; }.hand-panel { border-color: #397ad5; background: linear-gradient(140deg, #071a3fe8, #0a1430ee); }.game-card { border-radius: 9px; box-shadow: 0 8px 17px #0009, inset 0 1px #fff6; }.game-card.selected { transform: translateY(-16px) scale(1.04); box-shadow: 0 12px 28px #23d5ff8a, inset 0 1px #fff8; }

/* Table composition follows the lower-left reference: opponents frame a compact central table. */
.game-neon { max-width: 1480px; margin-inline: auto; }.table-opponents { grid-template-columns: repeat(auto-fit, minmax(170px, 230px)); justify-content: center; margin: 12px auto; }.opponent-seat { padding: 9px 11px; border-radius: 10px; }.opponent-seat .backs { height: 27px; }.table-core { grid-template-columns: minmax(220px, .9fr) minmax(320px, 1.25fr) minmax(220px, .9fr); grid-template-rows: minmax(235px, auto) minmax(155px, auto); align-items: stretch; }.pile-zone { grid-column: 2; grid-row: 1; min-height: 235px; border-color: #3d86e9; background: radial-gradient(ellipse at 50% 48%, #147fff48, transparent 52%), linear-gradient(145deg, #061a3bdf, #07112bdd); }.pile-zone .stacks { margin: 8px 0 2px; }.pile-zone .pile { width: 82px; height: 118px; }.pile-zone .pile strong,.pile-zone .pile b { font-size: 33px; }.combinations-zone { grid-column: 1 / -1; grid-row: 2; min-height: 155px; padding: 13px 15px; }.laid-area { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); max-height: 195px; }.table-status { grid-column: 3; grid-row: 1; min-height: 235px; padding: 13px; }.table-status .log { display: none; }.table-status .status-player { padding: 5px; }.table-status .status-player > i { width: 27px; height: 27px; flex-basis: 27px; }.hand-panel { position: relative; margin-top: 12px; min-height: 175px; padding: 13px 17px 56px; }.hand-panel .hand { justify-content: center; min-height: 102px; }.hand-panel .game-card { width: 68px; height: 100px; }.game-actions { position: absolute; right: 16px; bottom: 12px; }.game-actions .button { min-width: 132px; padding: 10px 13px; }.hand-title { position: absolute; left: 17px; top: 12px; z-index: 1; }.hand-title + .hand { padding-top: 29px; }
@media (max-width: 900px) { .table-core { grid-template-columns: minmax(190px, .8fr) minmax(300px, 1.2fr); }.table-status { grid-column: 1; grid-row: 1; }.pile-zone { grid-column: 2; }.combinations-zone { grid-column: 1 / -1; }.game-actions { position: static; justify-content: center; margin-top: 10px; }.hand-panel { padding-bottom: 14px; }.hand-title { position: static; }.hand-title + .hand { padding-top: 0; } }

/* Keep opponents private and make the number cards readable on every screen. */
.backs { overflow: visible; max-width: 100%; }
.backs i { flex-basis: var(--back-width, 16px); width: var(--back-width, 16px); margin-left: calc(-1 * var(--back-overlap, 5px)); font-size: clamp(5px, .65vw, 8px); }
.backs i:first-child { margin-left: 0; }
.hand-panel .game-card.blue { background: linear-gradient(145deg, #41b9ff 0%, #0b67e6 52%, #083ba9 100%); }
.hand-panel .game-card.green { background: linear-gradient(145deg, #51e99d 0%, #12ac66 52%, #07623f 100%); }
.hand-panel .game-card.amber { background: linear-gradient(145deg, #ffe46b 0%, #f4a40f 54%, #bd6500 100%); }
.hand-panel .game-card.coral { background: linear-gradient(145deg, #ff8190 0%, #ed3e5a 54%, #a51235 100%); }
.hand-panel .game-card.special { background: linear-gradient(145deg, #2f3158 0%, #11152d 65%, #050816 100%); }
.hand-panel .game-card strong { margin-top: 7px; color: #fff; font-size: 38px; line-height: 1; text-shadow: 0 3px 2px #0008, 0 0 13px #fff5; }
.hand-panel .game-card small { display: block; margin-top: 35px; color: #fff; font-size: 10px; letter-spacing: .55px; text-shadow: 0 2px 2px #000c; }
.hand-panel .game-card { border-color: #f5fbff; }
.hand-panel .hand { display: flex; flex-wrap: nowrap; align-items: stretch; gap: clamp(2px, .5vw, 7px); overflow: visible; }
.hand-panel .game-card { display: flex; flex: 1 1 0; align-items: center; justify-content: space-between; width: auto; min-width: 0; max-width: 68px; height: auto; aspect-ratio: 68 / 100; padding: 7px 2px; flex-direction: column; }
.hand-panel .game-card strong { margin-top: 0; font-size: clamp(18px, 3vw, 38px); }
.hand-panel .game-card small { margin-top: 0; font-size: clamp(6px, 1vw, 10px); white-space: nowrap; letter-spacing: 0; }
@media (max-width: 720px) {
  .table-opponents { gap: 9px; scroll-snap-type: x mandatory; }
  .opponent-seat { flex-basis: min(84vw, 250px); scroll-snap-align: start; }
  .backs { min-width: 162px; }
}

/* Lobby and goals match the two right-hand reference panels. */
.lobby { align-items: start; }.lobby-panel { padding: 28px; }.lobby-panel > .lead { margin-top: 0; max-width: 680px; }.modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }.mode { min-height: 345px; padding: 21px; border-radius: 11px; }.mode.create-mode { border-color: #237eff; }.mode.join-mode { border-color: #a748fb; }.mode h3 { font-size: 22px; }.mode .button { margin-top: 17px; }.goal-aside { position: sticky; top: 16px; padding: 20px; }.goal-aside .goal { min-height: 35px; padding: 5px 0; }.goal-aside .goal b { flex-basis: 27px; height: 27px; }.route-page { max-width: 1300px; margin-inline: auto; }.route-page > .lead { max-width: 760px; }.route-page .goal-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }.route-page .goal-card { min-height: 208px; padding: 15px; }.route-page .goal-card > b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #1f8fff, #7342ff); color: #fff; }.route-page .goal-card h2 { font-size: 17px; }.route-page .goal-card p { min-height: 34px; font-size: 12px; }.route-sample-cards { display: flex; align-items: end; min-height: 52px; overflow: hidden; margin-top: 12px; }.route-sample-cards i { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 40px; margin-left: -5px; border: 1px solid #f5fbff; border-radius: 5px; color: #fff; font-size: 14px; font-style: normal; font-weight: 900; box-shadow: 0 3px 8px #0008; }.route-sample-cards i:first-child { margin-left: 0; }.route-guide { display: block; margin: 24px auto 0; }
@media (max-width: 1100px) { .route-page .goal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .lobby { grid-template-columns: 1fr; }.modes { grid-template-columns: 1fr; }.goal-aside { position: static; }.route-page .goal-grid { grid-template-columns: repeat(2, 1fr); } }
