:root {
  color-scheme: light;
  --ink: #142033;
  --ink-soft: #526174;
  --paper: #f2f4f7;
  --panel: #ffffff;
  --navy: #101a2c;
  --navy-light: #1b2940;
  --lime: #dafa69;
  --mint: #78e0c8;
  --coral: #ff786b;
  --blue: #6c8cff;
  --line: #e5e9ef;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 92% 8%, rgba(108, 140, 255, 0.08), transparent 23rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.game-active {
  min-width: 0;
  --ink: #eff8f3;
  --ink-soft: #bfd1c7;
  --paper: #123a32;
  background:
    radial-gradient(ellipse at 50% 22%, rgba(47, 127, 92, 0.3), transparent 38rem),
    #123a32;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(108, 140, 255, 0.65);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(100% - 48px, 1200px);
  margin: 0 auto;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.8px;
  text-decoration: none;
}

.brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #080d18;
  box-shadow: 0 4px 14px rgba(40, 108, 255, 0.18);
  object-fit: cover;
}

.header-nav,
.connection-badge {
  display: flex;
  align-items: center;
}

.header-nav {
  gap: 28px;
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: color 160ms ease;
}

.text-button:hover {
  color: var(--ink);
}

.connection-badge {
  gap: 8px;
  color: #657286;
  font-size: 12px;
  font-weight: 600;
}

.connection-dot,
.eyebrow-dot,
.waiting-indicator span,
.turn-pulse,
.art-caption-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #c5ccd6;
}

.connection-badge[data-connected="true"] .connection-dot {
  background: #42bd91;
  box-shadow: 0 0 0 4px rgba(66, 189, 145, 0.13);
}

.screen {
  padding-bottom: 30px;
}

.hero {
  min-height: 400px;
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  overflow: hidden;
  padding: 50px 64px;
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 74% 16%, rgba(119, 145, 220, 0.2), transparent 28%),
    linear-gradient(123deg, #101a2c 4%, #17243a 100%);
  color: white;
}

.hero::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 0.7px, transparent 0.7px);
  background-size: 19px 19px;
  content: "";
  opacity: 0.13;
  pointer-events: none;
}

.hero-copy {
  z-index: 1;
  max-width: 510px;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: #94a2b7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  background: var(--lime);
}

.hero h1,
.screen-heading h1,
.game-brand-lockup h1 {
  font-family: var(--font-display);
  letter-spacing: -2.7px;
}

.hero h1 {
  margin: 21px 0 15px;
  font-size: clamp(43px, 5.6vw, 66px);
  line-height: 0.99;
}

.hero h1 span {
  color: var(--lime);
}

.hero-description {
  max-width: 420px;
  margin: 0;
  color: #b7c1d0;
  font-size: 15px;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 25px;
  color: #d8dfeb;
  font-size: 11px;
  font-weight: 600;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-tags span:first-child {
  color: var(--lime);
}

.hero-art {
  height: 315px;
  position: relative;
  z-index: 1;
}

.art-orbit {
  position: absolute;
  top: 50%;
  left: 53%;
  border: 1px solid rgba(213, 225, 245, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-24deg);
}

.art-orbit--one {
  width: 350px;
  height: 215px;
}

.art-orbit--two {
  width: 270px;
  height: 315px;
  transform: translate(-50%, -50%) rotate(43deg);
}

.art-card {
  position: absolute;
  top: 48%;
  left: 52%;
  width: 137px;
  height: 202px;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.93);
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(3, 8, 17, 0.28);
  transform-origin: center;
}

.art-card--back {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(255, 255, 255, 0.18) 8px 10px),
    #6b86f6;
  transform: translate(-81%, -50%) rotate(-21deg);
}

.art-card-pattern {
  display: grid;
  width: 82px;
  height: 127px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 35px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 59px;
  font-weight: 700;
  transform: rotate(-14deg);
}

.art-card--middle {
  background: var(--lime);
  color: var(--navy);
  transform: translate(-23%, -51%) rotate(9deg);
}

.art-card-corner {
  position: absolute;
  top: 7px;
  left: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.art-card-number {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--font-display);
  font-size: 90px;
  font-weight: 700;
  transform: translate(-50%, -52%) rotate(-9deg);
}

.art-card--front {
  background:
    linear-gradient(135deg, transparent 43%, rgba(255, 255, 255, 0.08) 44% 55%, transparent 56%),
    #fb776a;
  color: white;
  transform: translate(28%, -46%) rotate(18deg);
}

.art-card--front .art-card-corner {
  font-size: 20px;
}

.wild-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 3px solid white;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -62%) rotate(-18deg);
}

.wild-mark i {
  position: absolute;
  width: 50%;
  height: 50%;
}

.wild-mark i:nth-child(1) {
  top: 0;
  left: 0;
  background: #f64f55;
}

.wild-mark i:nth-child(2) {
  top: 0;
  right: 0;
  background: #f8d94b;
}

.wild-mark i:nth-child(3) {
  bottom: 0;
  left: 0;
  background: #44c981;
}

.wild-mark i:nth-child(4) {
  right: 0;
  bottom: 0;
  background: #597df1;
}

.art-card-caption {
  position: absolute;
  right: 7px;
  bottom: 8px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.art-spark {
  position: absolute;
  z-index: 2;
  color: var(--lime);
}

.art-spark--one {
  top: 25px;
  right: 59px;
  font-size: 26px;
}

.art-spark--two {
  bottom: 43px;
  left: 53px;
  color: var(--mint);
  font-size: 21px;
}

.art-caption {
  position: absolute;
  right: 0;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #97a5ba;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.art-caption-dot {
  width: 6px;
  height: 6px;
  background: var(--lime);
}

.hero-stamp {
  position: absolute;
  top: 19px;
  right: 22px;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-content: center;
  border: 1px solid rgba(218, 250, 105, 0.56);
  border-radius: 50%;
  color: var(--lime);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
  text-align: center;
  transform: rotate(12deg);
}

.account-banner {
  margin-top: 14px;
  padding: 15px 19px;
  border: 1px solid #e2e7ec;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 18px rgba(23, 38, 61, 0.025);
}

.account-banner-content,
.account-banner-copy {
  display: flex;
  align-items: center;
}

.account-banner-content {
  justify-content: space-between;
  gap: 18px;
}

.account-banner-copy {
  min-width: 0;
  gap: 12px;
}

.account-banner-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: #eef5d8;
  color: #758b32;
  font-size: 19px;
}

.account-banner-copy > div {
  min-width: 0;
}

.account-banner-copy strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: -0.2px;
}

.account-banner-copy p:last-child {
  margin: 3px 0 0;
  color: #8792a0;
  font-size: 10px;
  line-height: 1.5;
}

.account-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 15px;
  background: #eaf0ff;
  color: #5b75d2;
  font-size: 16px;
  font-weight: 700;
}

.button--discord {
  flex: 0 0 auto;
  background: #5865f2;
  color: #fff;
}

.button--discord:hover:not(:disabled) {
  background: #4752c4;
}

.lobby-entry {
  padding-top: 43px;
}

.entry-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 17px;
}

.eyebrow--light {
  margin-bottom: 8px;
  color: #8693a4;
}

.entry-heading h2,
.player-list-heading h2,
.hand-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.8px;
}

.name-field {
  display: grid;
  gap: 6px;
  color: #8390a0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.name-field input {
  width: 195px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e0e5ec;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.entry-card {
  min-height: 234px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid rgba(223, 228, 235, 0.84);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 5px 17px rgba(23, 38, 61, 0.025);
}

.entry-card--quick {
  border-color: #dce9bd;
  background:
    radial-gradient(circle at 100% 0%, rgba(218, 250, 105, 0.17), transparent 44%),
    #fff;
}

.entry-card-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
}

.entry-card-icon--lime {
  background: #eef9cf;
  color: #526b15;
}

.entry-card-icon--blue {
  background: #e8edff;
  color: #586fd1;
}

.entry-card-icon--coral {
  background: #ffebe8;
  color: #d8655b;
}

.entry-card-copy {
  margin: 15px 0 17px;
}

.card-kicker {
  color: #8a96a7;
  font-size: 9px;
  letter-spacing: 1.25px;
}

.entry-card-copy h3 {
  margin: 6px 0 4px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.45px;
}

.entry-card-copy p:last-child {
  max-width: 290px;
  margin: 0;
  color: #718093;
  font-size: 12px;
  line-height: 1.5;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button--lime {
  background: var(--lime);
  color: #192239;
}

.button--lime:hover:not(:disabled) {
  background: #d0f25d;
}

.button--dark {
  background: var(--navy);
  color: white;
}

.button--dark:hover:not(:disabled) {
  background: #253550;
}

.button--outline {
  border: 1px solid #dce2ea;
  background: white;
  color: var(--ink);
}

.button--outline:hover:not(:disabled) {
  background: #f7f8fa;
}

.entry-card > .button {
  width: 100%;
  margin-top: auto;
}

.join-form {
  width: 100%;
  display: flex;
  gap: 7px;
  margin-top: auto;
}

.join-form input {
  width: 0;
  min-width: 0;
  flex: 1;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #e0e5ec;
  border-radius: 9px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.join-form input::placeholder {
  color: #a3adba;
  font-size: 10px;
  letter-spacing: 0.8px;
}

.join-form .button {
  flex: 0 0 auto;
  padding: 0 11px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 2px 10px;
  color: #8a95a3;
  font-size: 10px;
}

.site-footer span:first-child {
  color: #697688;
  font-weight: 700;
}

.interior-screen {
  min-height: calc(100vh - 100px);
  padding: 34px 0 60px;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(245px, 0.72fr) minmax(0, 1.55fr);
  gap: 17px;
  align-items: start;
}

.profile-panel,
.shop-panel {
  padding: 22px;
}

.profile-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  margin: 7px 0 14px;
  border: 4px solid #fff;
  border-radius: 31px;
  background: linear-gradient(145deg, #263e71, #111a30);
  box-shadow: 0 5px 19px rgba(28, 48, 93, 0.2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
}

.profile-panel h2 {
  margin: 5px 0 5px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -0.6px;
}

.profile-description {
  min-height: 32px;
  margin: 0;
  color: #8692a1;
  font-size: 10px;
  line-height: 1.5;
}

.profile-balance {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
  padding: 12px 13px;
  border: 1px solid #e7edda;
  border-radius: 10px;
  background: #f8fbed;
  color: #7b8c40;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.profile-balance strong {
  color: #334119;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0;
}

.profile-equipment {
  width: 100%;
  margin-top: 19px;
  text-align: left;
}

.equipped-list {
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.equipped-item {
  min-height: 37px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  color: #738094;
  font-size: 9px;
}

.equipped-item-icon {
  width: 22px;
  text-align: center;
  font-size: 14px;
}

.equipped-item-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #334155;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipped-remove {
  padding: 3px 4px;
  border: 0;
  background: transparent;
  color: #9aa4b1;
  cursor: pointer;
  font-size: 9px;
}

.equipped-remove:hover {
  color: #d05b56;
}

.profile-login,
.profile-logout {
  width: 100%;
  margin-top: 15px;
}

.shop-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-panel-heading h2 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.8px;
}

.shop-points-pill {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #e5ebd5;
  border-radius: 8px;
  background: #f8fbed;
  color: #718436;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.shop-login-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #f0e7c7;
  border-radius: 9px;
  background: #fffdf5;
  color: #8c7841;
  font-size: 10px;
  line-height: 1.5;
}

.shop-login-note a {
  color: #5d6dd2;
  font-weight: 700;
}

.cosmetic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.cosmetic-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  padding: 11px;
  border: 1px solid #e8ecf1;
  border-radius: 11px;
  background: #fff;
}

.cosmetic-art {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background:
    radial-gradient(circle at 75% 20%, rgba(117, 141, 246, 0.3), transparent 45%),
    #eef1fb;
  font-size: 24px;
}

.cosmetic-copy {
  min-width: 0;
}

.cosmetic-copy strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #263247;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: -0.2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cosmetic-copy p:last-child {
  margin: 4px 0 0;
  color: #8792a0;
  font-size: 9px;
  line-height: 1.4;
}

.cosmetic-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding-top: 2px;
}

.cosmetic-price {
  color: #76833f;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.button--small {
  min-height: 30px;
  gap: 5px;
  padding: 0 9px;
  font-size: 9px;
}

.shop-empty {
  grid-column: 1 / -1;
  margin: 4px 0;
  color: #8792a0;
  font-size: 11px;
  text-align: center;
}

.screen-heading {
  margin: 16px 0 31px;
  text-align: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 27px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #758194;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.back-button:hover {
  color: var(--ink);
}

.back-button span {
  font-size: 16px;
}

.screen-heading h1 {
  margin: 4px 0 7px;
  font-size: 41px;
  line-height: 1.1;
}

.screen-heading > p:last-child {
  margin: 0;
  color: #778497;
  font-size: 13px;
}

.lobby-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
  gap: 17px;
  align-items: start;
}

.panel,
.invite-aside {
  border: 1px solid rgba(223, 228, 235, 0.9);
  border-radius: 18px;
  background: white;
  box-shadow: 0 9px 28px rgba(23, 38, 61, 0.035);
}

.lobby-panel {
  padding: 22px;
}

.room-code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 20px;
  border: 1px solid #e8ebef;
  border-radius: 13px;
  background: #f8f9fb;
}

.room-code {
  display: block;
  margin: 4px 0 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 31px;
  letter-spacing: 6px;
}

.room-code-hint {
  margin: 0;
  color: #8490a0;
  font-size: 11px;
}

.player-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 1px 10px;
}

.player-list-heading h2 {
  margin-top: 4px;
  font-size: 18px;
}

.player-list-heading h2 span {
  margin-left: 5px;
  color: #98a2af;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.waiting-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8994a2;
  font-size: 10px;
  font-weight: 600;
}

.waiting-indicator span {
  width: 6px;
  height: 6px;
  background: #f2b84b;
}

.player-list {
  min-height: 83px;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.player-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 1px solid #edf0f4;
  border-radius: 10px;
  background: #fff;
}

.player-avatar,
.opponent-avatar {
  position: relative;
  isolation: isolate;
  overflow: visible;
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: #eaf0ff;
  color: #5b75d2;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.cosmetic-avatar {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.cosmetic-avatar::before {
  position: absolute;
  z-index: 2;
  inset: -3px;
  border: 2px solid transparent;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.avatar-fallback {
  position: relative;
  z-index: 0;
}

.cosmetic-avatar[data-frame="nebula"]::before {
  border-color: #9a74ff;
  box-shadow: 0 0 10px rgba(154, 116, 255, 0.45);
}

.cosmetic-avatar[data-aura="orbit"] {
  box-shadow: 0 0 0 4px rgba(89, 187, 255, 0.28), 0 0 14px rgba(89, 187, 255, 0.55);
}

.avatar-image {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  object-fit: cover;
}

.avatar-hat,
.avatar-accessory {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 1px 2px rgba(20, 32, 51, 0.28));
  line-height: 1;
  pointer-events: none;
}

.avatar-hat {
  top: -0.78em;
  left: 50%;
  font-size: 0.95em;
  transform: translateX(-50%);
}

.avatar-accessory {
  right: -0.34em;
  bottom: -0.25em;
  font-size: 0.72em;
}

.player-avatar--bot {
  background: #eef8d8;
  color: #7d9b29;
}

.player-details,
.opponent-detail {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.player-details strong,
.opponent-detail strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-details > span,
.opponent-detail > span {
  color: #98a2af;
  font-size: 9px;
}

.player-badges {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.player-badge {
  padding: 5px 7px;
  border-radius: 5px;
  background: #f0f2f6;
  color: #788597;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.player-badge--host {
  background: #f0f6db;
  color: #71842d;
}

.player-badge--bot {
  background: #eaf0ff;
  color: #6278c8;
}

.lobby-hint {
  min-height: 16px;
  margin: 10px 2px 0;
  color: #8b96a5;
  font-size: 10px;
}

.lobby-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 21px;
  padding-top: 15px;
  border-top: 1px solid #edf0f4;
}

.lobby-actions > .text-button {
  font-size: 11px;
}

.lobby-host-actions {
  display: flex;
  gap: 8px;
}

.lobby-host-actions .button {
  min-height: 38px;
  font-size: 11px;
}

.invite-aside {
  padding: 23px 21px;
  background:
    radial-gradient(circle at 100% 0%, rgba(218, 250, 105, 0.11), transparent 42%),
    #fff;
}

.invite-aside-icon {
  margin-bottom: 28px;
  color: #829c35;
  font-size: 26px;
}

.invite-aside h2 {
  max-width: 235px;
  margin: 9px 0 9px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.9px;
  line-height: 1.15;
}

.invite-aside > p:not(.card-kicker) {
  margin: 0;
  color: #7e8a9b;
  font-size: 12px;
  line-height: 1.6;
}

.aside-rule {
  height: 1px;
  margin: 21px 0 14px;
  background: #e9edf1;
}

.invite-aside .aside-footnote {
  color: #718039 !important;
  font-size: 10px !important;
  font-weight: 700;
}

.game-screen {
  padding: 12px 0 45px;
}

body.game-active .connection-badge {
  color: rgba(232, 247, 239, 0.72);
}

body.game-active .game-room-code,
body.game-active .hand-instruction,
body.game-active .hand-heading h2 span {
  color: rgba(222, 240, 229, 0.68);
}

body.game-active .game-brand-lockup .card-kicker,
body.game-active .hand-heading .card-kicker {
  color: rgba(194, 222, 205, 0.72);
}

body.game-active .active-color-label {
  color: rgba(222, 240, 229, 0.68);
}

body.game-active .active-color-label strong {
  color: #f2fbf5;
}

.game-header,
.game-header-actions,
.game-brand-lockup {
  display: flex;
  align-items: center;
}

.game-header {
  justify-content: space-between;
  min-height: 66px;
  margin-bottom: 16px;
}

.game-brand-lockup {
  gap: 11px;
}

.game-mini-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  transform: rotate(-5deg);
}

.game-brand-lockup .card-kicker {
  font-size: 8px;
}

.game-brand-lockup h1 {
  margin: 2px 0 0;
  font-size: 19px;
  letter-spacing: -0.7px;
}

.game-header-actions {
  gap: 22px;
}

.game-room-code {
  color: #929dac;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.game-room-code strong {
  margin-left: 4px;
  color: var(--ink-soft);
  letter-spacing: 1.8px;
}

.game-header-actions .text-button {
  font-size: 11px;
}

.game-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 1px 12px;
}

.turn-message {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.turn-message p {
  margin: 0;
}

.turn-pulse {
  width: 7px;
  height: 7px;
  background: #68c29d;
  box-shadow: 0 0 0 4px rgba(104, 194, 157, 0.13);
}

.active-color-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8994a3;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.active-color-label strong {
  color: #445267;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: capitalize;
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c7cbd3;
  box-shadow: 0 0 0 3px white, 0 0 0 4px #e2e6eb;
}

.color-dot--red {
  background: #f25558;
}

.color-dot--yellow {
  background: #f0cc43;
}

.color-dot--green {
  background: #38bd7c;
}

.color-dot--blue {
  background: #5579ed;
}

.game-table {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  padding: 17px 22px 24px;
  border: 1px solid rgba(194, 255, 226, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(70, 145, 105, 0.72), rgba(35, 101, 76, 0.22) 47%, transparent 74%),
    linear-gradient(145deg, #174e3e, #123f35 60%, #0e342d);
  box-shadow:
    inset 0 0 0 7px rgba(233, 255, 241, 0.035),
    inset 0 0 45px rgba(4, 27, 23, 0.2),
    0 18px 36px rgba(2, 16, 12, 0.23);
  color: white;
}

.game-table::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(74%, 600px);
  height: 185px;
  border: 1px solid rgba(223, 251, 226, 0.12);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%) rotate(-8deg);
}

.game-table::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(61%, 500px);
  height: 132px;
  border: 1px solid rgba(223, 251, 226, 0.1);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%) rotate(14deg);
}

.table-grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.19) 0.6px, transparent 0.6px);
  background-size: 14px 14px;
  opacity: 0.1;
  pointer-events: none;
}

.turn-order-heading {
  min-height: 16px;
  position: absolute;
  z-index: 4;
  top: 17px;
  right: 25px;
  left: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 5px;
  color: rgba(239, 249, 241, 0.62);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.opponent-row {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.opponent-card {
  position: absolute;
  width: clamp(130px, 20%, 220px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(8, 30, 26, 0.42);
  box-shadow: 0 7px 18px rgba(2, 21, 17, 0.12);
  pointer-events: auto;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.opponent-card--seat-top {
  top: 43px;
  left: 50%;
  transform: translateX(-50%);
}

.opponent-card--seat-bottom {
  bottom: 17px;
  left: 50%;
  transform: translateX(-50%);
}

.opponent-card--seat-left {
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
}

.opponent-card--seat-right {
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
}

.opponent-order {
  width: 19px;
  height: 19px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  color: rgba(239, 249, 241, 0.8);
  font-size: 8px;
  font-weight: 800;
}

.opponent-card--active {
  border-color: rgba(129, 222, 255, 0.76);
  background: rgba(20, 60, 65, 0.78);
  box-shadow: 0 0 0 1px rgba(129, 222, 255, 0.2), 0 0 22px rgba(102, 207, 255, 0.16);
}

.opponent-card--active .opponent-order {
  background: #9ae7ff;
  color: #123945;
}

.opponent-card[aria-current="step"] {
  outline: 1px solid rgba(129, 222, 255, 0.28);
}

.opponent-avatar {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
}

.opponent-avatar--active,
.own-player-avatar--active {
  outline: 2px solid #9ae7ff;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(115, 216, 255, 0.18), 0 0 24px rgba(115, 216, 255, 0.78);
}

.opponent-avatar .avatar-hat {
  font-size: 0.8em;
}

.opponent-avatar .avatar-accessory {
  font-size: 0.62em;
}

.opponent-avatar--bot {
  background: rgba(218, 250, 105, 0.2);
  color: var(--lime);
}

.opponent-detail {
  flex: 1;
}

.opponent-detail strong {
  max-width: 110px;
  color: #fff;
  font-size: 10px;
}

.opponent-detail > span {
  color: rgba(235, 244, 238, 0.64);
  font-size: 7px;
  letter-spacing: 0.8px;
}

.opponent-count {
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #eaf5ed;
  font-size: 8px;
  white-space: nowrap;
}

.table-center {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(42px, 8vw, 95px);
  width: max-content;
  min-height: 0;
  transform: translate(-50%, -50%);
}

.pile-area,
.discard-area {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.pile-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(239, 249, 241, 0.62);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.pile-count {
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 8px;
  letter-spacing: 0;
}

.draw-pile {
  width: 86px;
  height: 123px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  background:
    repeating-linear-gradient(45deg, transparent 0 7px, rgba(255, 255, 255, 0.13) 7px 9px),
    #647cf0;
  box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.29), 6px 6px 0 rgba(255, 255, 255, 0.14), 0 7px 15px rgba(0, 0, 0, 0.2);
  color: white;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease;
}

.draw-pile[data-skin="stardust"] {
  border-color: #dce4ff;
  background:
    radial-gradient(circle at 22% 26%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 70% 58%, #c7d8ff 0 1px, transparent 2px),
    radial-gradient(circle at 44% 82%, #fff 0 1px, transparent 2px),
    repeating-linear-gradient(45deg, transparent 0 7px, rgba(255, 255, 255, 0.16) 7px 9px),
    linear-gradient(145deg, #674ed5, #243a83);
}

.draw-pile[data-skin="stardust"] .draw-pile-mark {
  color: #dce4ff;
  text-shadow: 0 0 10px rgba(176, 204, 255, 0.7);
}

.draw-pile:hover:not(:disabled) {
  transform: translateY(-4px) rotate(-2deg);
}

.draw-pile:disabled {
  cursor: not-allowed;
  opacity: 0.63;
}

.draw-pile-mark {
  width: 49px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 45px;
  font-weight: 700;
  transform: rotate(-12deg);
}

.draw-pile-caption {
  position: absolute;
  right: 5px;
  bottom: 4px;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.7px;
}

.discard-card-slot {
  width: 86px;
  height: 123px;
  display: grid;
  place-items: center;
}

.turn-direction {
  min-width: 90px;
  position: absolute;
  z-index: 4;
  right: calc(50% - 250px);
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(239, 249, 241, 0.67);
  font-size: 8px;
}

.direction-icon {
  color: var(--lime);
  font-size: 14px;
}

.playing-card {
  width: 79px;
  height: 113px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff9e9;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 9px 19px rgba(3, 13, 9, 0.22);
  color: white;
  isolation: isolate;
}

.playing-card::before {
  position: absolute;
  z-index: 0;
  top: 15%;
  left: -23%;
  width: 145%;
  height: 70%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  content: "";
  transform: rotate(-34deg);
}

.card--red {
  background: linear-gradient(145deg, #ff6e68, #e5404d);
}

.card--yellow {
  background: linear-gradient(145deg, #f6df5f, #e5b928);
  color: #3a3215;
}

.card--green {
  background: linear-gradient(145deg, #52d28e, #19a66d);
}

.card--blue {
  background: linear-gradient(145deg, #7598ff, #4d68dc);
}

.card--wild {
  background: linear-gradient(140deg, #f45559 0 25%, #f3d344 25% 50%, #41c77c 50% 75%, #5876ee 75%);
}

.card--wild::after {
  position: absolute;
  inset: 5px;
  border-radius: 7px;
  background: rgba(16, 26, 44, 0.86);
  content: "";
}

.card-corner {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.card-corner--bottom {
  top: auto;
  right: 6px;
  bottom: 4px;
  left: auto;
  transform: rotate(180deg);
}

.card-center {
  z-index: 2;
  font-family: var(--font-display);
  font-size: 39px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.12);
}

.card--yellow .card-center,
.card--yellow .card-corner {
  text-shadow: none;
}

.wild-mark {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 2px solid white;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%) rotate(-16deg);
}

.wild-mark i {
  display: block;
}

.wild-mark-red {
  background: #f45559;
}

.wild-mark-yellow {
  background: #f3d344;
}

.wild-mark-green {
  background: #41c77c;
}

.wild-mark-blue {
  background: #5876ee;
}

.playing-card--top {
  width: 88px;
  height: 126px;
  border-radius: 13px;
  box-shadow: 0 14px 26px rgba(3, 13, 9, 0.3);
  transform: rotate(-7deg);
}

.playing-card--top .card-center {
  font-size: 43px;
}

.hand-section {
  padding: 23px 1px 4px;
}

.hand-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.hand-title-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
}

.own-player-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: #eaf0ff;
  color: #5b75d2;
  font-size: 14px;
  font-weight: 700;
}

.own-player-avatar--active {
  outline-offset: 3px;
}

.hand-heading h2 {
  margin-top: 4px;
  font-size: 18px;
}

.hand-heading h2 span {
  margin-left: 5px;
  color: #9aa4b1;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

.hand-instruction {
  margin: 0 1px 3px 0;
  color: #8894a3;
  font-size: 10px;
}

.hand-cards {
  min-height: 142px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 8px 2px 14px;
}

.hand-card {
  width: 77px;
  height: 111px;
  flex: 0 0 auto;
  border-color: #fff;
  cursor: not-allowed;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.hand-card .card-center {
  font-size: 36px;
}

.hand-card--playable {
  cursor: pointer;
  box-shadow: 0 6px 13px rgba(21, 37, 58, 0.13);
}

.hand-card--playable:hover {
  z-index: 2;
  transform: translateY(-10px) rotate(-2deg);
}

.hand-card:disabled {
  opacity: 0.72;
}

.hand-card--playable:disabled {
  opacity: 1;
}

.game-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  padding: 17px 19px;
  border: 1px solid #e3e9d4;
  border-radius: 13px;
  background: #fbfdf4;
}

.game-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-result h2 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -0.6px;
}

.game-result-message {
  margin: 0;
  color: #879180;
  font-size: 11px;
}

.game-reward-note {
  margin-bottom: 0;
  margin-top: 5px !important;
  color: #708437 !important;
  font-weight: 700;
}

.dialog-card {
  width: min(100% - 32px, 440px);
  padding: 24px;
  border: 1px solid #e4e8ed;
  border-radius: 18px;
  background: white;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(16, 26, 44, 0.25);
}

.dialog-card::backdrop {
  background: rgba(11, 20, 34, 0.52);
  backdrop-filter: blur(3px);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2,
.color-dialog h2 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -1px;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #e5e9ef;
  border-radius: 9px;
  background: white;
  color: #667386;
  cursor: pointer;
  font-size: 20px;
}

.rules-list {
  display: grid;
  gap: 15px;
  margin: 23px 0 17px;
  padding: 0;
  list-style: none;
}

.rules-list li {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 9px;
  align-items: start;
}

.rules-list li > span {
  padding-top: 1px;
  color: #87964b;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
}

.rules-list p {
  margin: 0;
  color: #5d6a7d;
  font-size: 12px;
  line-height: 1.55;
}

.rules-note {
  margin: 0;
  padding-top: 13px;
  border-top: 1px solid #edf0f4;
  color: #98a1ad;
  font-size: 10px;
}

.color-dialog {
  width: min(100% - 32px, 380px);
  text-align: center;
}

.color-dialog h2 {
  margin: 5px 0 20px;
  font-size: 23px;
}

.color-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.color-choice {
  min-height: 47px;
  border: 0;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: transform 150ms ease;
}

.color-choice:hover {
  transform: translateY(-2px);
}

.color-choice--red {
  background: #ed5356;
}

.color-choice--yellow {
  background: #edc83d;
  color: #302810;
}

.color-choice--green {
  background: #37b879;
}

.color-choice--blue {
  background: #5b78e6;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: min(400px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: var(--navy);
  box-shadow: 0 12px 35px rgba(10, 22, 39, 0.2);
  color: white;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 900px) {
  .hero {
    min-height: 380px;
    padding: 42px 42px;
  }

  .hero-art {
    transform: scale(0.9);
  }

  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-card:last-child {
    grid-column: 1 / -1;
    min-height: 205px;
  }

  .entry-card:last-child .entry-card-copy p:last-child {
    max-width: 420px;
  }

  .join-form {
    max-width: 440px;
  }

  .shop-layout {
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.45fr);
  }

  .profile-panel,
  .shop-panel {
    padding: 17px;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 28px, 520px);
  }

  .site-header {
    min-height: 68px;
  }

  .brand {
    gap: 7px;
    font-size: 18px;
  }

  .brand-logo {
    width: 43px;
    height: 43px;
    border-radius: 10px;
  }

  .header-nav {
    gap: 11px;
  }

  .connection-badge {
    font-size: 10px;
  }

  body.game-active .brand {
    gap: 5px;
    font-size: 15px;
  }

  body.game-active .brand-logo {
    width: 36px;
    height: 36px;
  }

  body.game-active .header-nav {
    gap: 7px;
  }

  body.game-active .header-nav .text-button {
    font-size: 9px;
  }

  body.game-active .connection-badge {
    gap: 4px;
    font-size: 7px;
  }

  .hero {
    min-height: 0;
    display: block;
    padding: 34px 25px 19px;
    border-radius: 20px;
  }

  .account-banner {
    padding: 13px;
  }

  .account-banner-content {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .account-banner-content > .button {
    width: 100%;
  }

  .account-banner-copy strong {
    font-size: 12px;
  }

  .account-banner-copy p:last-child {
    font-size: 9px;
  }

  .hero h1 {
    margin-top: 17px;
    font-size: clamp(41px, 12vw, 58px);
  }

  .hero-description {
    max-width: 400px;
    font-size: 13px;
  }

  .hero-tags {
    gap: 13px;
    margin-top: 17px;
    font-size: 9px;
  }

  .hero-art {
    height: 215px;
    margin: 1px auto -2px;
    transform: scale(0.73);
    transform-origin: center center;
  }

  .art-card {
    top: 43%;
  }

  .art-caption {
    right: 18px;
    bottom: 0;
  }

  .hero-stamp {
    top: 13px;
    right: 13px;
    width: 48px;
    height: 48px;
    font-size: 6px;
  }

  .lobby-entry {
    padding-top: 29px;
  }

  .entry-heading {
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 13px;
  }

  .entry-heading h2 {
    font-size: 21px;
  }

  .name-field {
    gap: 4px;
    font-size: 8px;
  }

  .name-field input {
    width: 130px;
    height: 36px;
    font-size: 12px;
  }

  .entry-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .entry-card,
  .entry-card:last-child {
    min-height: 0;
    display: grid;
    grid-template-columns: 35px 1fr;
    column-gap: 11px;
    padding: 15px;
  }

  .entry-card-icon {
    grid-row: 1 / span 2;
  }

  .entry-card-copy {
    margin: 0 0 12px;
  }

  .entry-card-copy h3 {
    margin-top: 4px;
    font-size: 16px;
  }

  .entry-card-copy p:last-child {
    font-size: 11px;
  }

  .entry-card > .button,
  .join-form {
    grid-column: 2;
    margin-top: 0;
  }

  .entry-card > .button {
    width: 100%;
  }

  .join-form .button {
    min-height: 37px;
  }

  .join-form input {
    height: 37px;
  }

  .site-footer {
    gap: 12px;
    font-size: 9px;
  }

  .interior-screen {
    padding-top: 21px;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .profile-panel,
  .shop-panel {
    padding: 15px;
  }

  .profile-equipment {
    max-width: 420px;
  }

  .shop-panel-heading h2 {
    font-size: 20px;
  }

  .screen-heading {
    margin: 10px 0 22px;
  }

  .back-button {
    margin-bottom: 21px;
  }

  .screen-heading h1 {
    font-size: 34px;
  }

  .screen-heading > p:last-child {
    max-width: 350px;
    margin: auto;
    font-size: 11px;
    line-height: 1.55;
  }

  .lobby-layout {
    grid-template-columns: 1fr;
  }

  .lobby-panel {
    padding: 15px;
  }

  .room-code-card {
    align-items: flex-start;
    padding: 15px;
  }

  .room-code {
    font-size: 26px;
    letter-spacing: 4px;
  }

  .room-code-card .button {
    align-self: center;
    min-height: 35px;
    padding: 0 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  .invite-aside {
    padding: 17px;
  }

  .invite-aside-icon {
    margin-bottom: 15px;
  }

  .invite-aside h2 {
    max-width: none;
    font-size: 19px;
  }

  .invite-aside > p:not(.card-kicker) {
    font-size: 11px;
  }

  .game-screen {
    padding-top: 5px;
  }

  .game-header {
    min-height: 54px;
    margin-bottom: 11px;
  }

  .game-mini-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 18px;
  }

  .game-brand-lockup {
    gap: 8px;
  }

  .game-brand-lockup .card-kicker {
    font-size: 7px;
  }

  .game-brand-lockup h1 {
    font-size: 16px;
  }

  .game-header-actions {
    gap: 12px;
  }

  .game-room-code {
    font-size: 7px;
    letter-spacing: 0.6px;
  }

  .game-room-code strong {
    letter-spacing: 1px;
  }

  .game-header-actions .text-button {
    font-size: 10px;
  }

  .game-status-row {
    align-items: flex-start;
  }

  .turn-message {
    max-width: 62%;
    font-size: 10px;
    line-height: 1.4;
  }

  .active-color-label {
    gap: 5px;
    font-size: 7px;
  }

  .active-color-label strong {
    font-size: 9px;
  }

  .game-table {
    min-height: 392px;
    padding: 12px 7px 16px;
    border-radius: 20px;
  }

  .game-table::before {
    width: 95%;
    height: 143px;
  }

  .game-table::after {
    width: 78%;
    height: 105px;
  }

  .opponent-row {
    inset: 0;
  }

  .turn-order-heading {
    min-height: 14px;
    top: 10px;
    right: 12px;
    left: 12px;
    font-size: 7px;
  }

  .opponent-card {
    min-width: 0;
    max-width: none;
    width: clamp(78px, 25vw, 100px);
    flex: none;
    gap: 4px;
    padding: 5px 4px;
    border-radius: 9px;
  }

  .opponent-card--seat-top {
    top: 31px;
  }

  .opponent-card--seat-bottom {
    bottom: 10px;
  }

  .opponent-card--seat-top,
  .opponent-card--seat-bottom {
    width: clamp(135px, 43vw, 170px);
  }

  .opponent-card--seat-left {
    left: 4px;
  }

  .opponent-card--seat-right {
    right: 4px;
  }

  .opponent-order {
    width: 15px;
    height: 15px;
    font-size: 6px;
  }

  .opponent-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 9px;
  }

  .opponent-detail {
    min-width: 0;
    gap: 1px;
  }

  .opponent-detail strong {
    max-width: 68px;
    font-size: 8px;
  }

  .opponent-detail > span {
    font-size: 6px;
  }

  .opponent-card--seat-left .opponent-detail strong,
  .opponent-card--seat-right .opponent-detail strong {
    max-width: 36px;
    font-size: 7px;
  }

  .opponent-card--seat-left .opponent-detail > span,
  .opponent-card--seat-right .opponent-detail > span {
    display: none;
  }

  .opponent-count {
    display: none;
  }

  .table-center {
    gap: clamp(12px, 4vw, 18px);
  }

  .pile-label {
    gap: 3px;
    font-size: 6px;
    letter-spacing: 0.2px;
  }

  .draw-pile,
  .discard-card-slot {
    width: clamp(43px, 13.6vw, 52px);
    height: clamp(62px, 20vw, 76px);
  }

  .draw-pile {
    border-width: 2px;
    border-radius: 8px;
  }

  .draw-pile-mark {
    width: 29px;
    height: 44px;
    font-size: 28px;
  }

  .draw-pile-caption {
    right: 3px;
    bottom: 3px;
    font-size: 4px;
  }

  .playing-card--top {
    width: clamp(43px, 13.6vw, 52px);
    height: clamp(62px, 20vw, 76px);
    border-radius: 9px;
  }

  .playing-card--top .card-center {
    font-size: clamp(27px, 9vw, 34px);
  }

  .playing-card--top .card-corner {
    top: 3px;
    left: 4px;
    font-size: 10px;
  }

  .turn-direction {
    right: auto;
    bottom: 58px;
    left: 50%;
    min-width: auto;
    font-size: 6px;
    transform: translateX(-50%);
  }

  .hand-section {
    padding-top: 18px;
  }

  .hand-heading {
    align-items: flex-start;
  }

  .hand-heading h2 {
    font-size: 16px;
  }

  .hand-heading h2 span {
    font-size: 9px;
  }

  .hand-instruction {
    max-width: 42%;
    font-size: 8px;
    line-height: 1.4;
    text-align: right;
  }

  .hand-cards {
    min-height: 120px;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px 3px 14px;
    scrollbar-width: thin;
  }

  .hand-card {
    width: 68px;
    height: 98px;
    border-radius: 9px;
  }

  .hand-card .card-center {
    font-size: 32px;
  }

  .hand-card .card-corner {
    font-size: 13px;
  }

  .wild-mark {
    width: 32px;
    height: 32px;
  }

  .game-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .game-result-actions {
    width: 100%;
  }

  .game-result-actions .button {
    flex: 1;
    padding: 0 9px;
    font-size: 10px;
  }

  .game-result h2 {
    font-size: 17px;
  }
}

@media (max-width: 390px) {
  .entry-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .name-field input {
    width: 112px;
  }

  .room-code-card {
    gap: 7px;
  }

  .room-code-card .button {
    font-size: 9px;
  }

  .game-header-actions {
    gap: 8px;
  }

  .cosmetic-grid {
    grid-template-columns: 1fr;
  }

  .game-room-code {
    font-size: 6px;
  }

  .opponent-card {
    min-width: 0;
  }

  .opponent-count {
    padding: 3px;
    font-size: 6px;
  }
}

@media (max-width: 360px) {
  .opponent-card--seat-left,
  .opponent-card--seat-right {
    width: 72px;
    gap: 3px;
    padding: 4px 3px;
  }

  .opponent-card--seat-left .opponent-order,
  .opponent-card--seat-right .opponent-order {
    width: 14px;
    height: 14px;
  }

  .opponent-card--seat-left .opponent-avatar,
  .opponent-card--seat-right .opponent-avatar {
    width: 22px;
    height: 22px;
  }

  .opponent-card--seat-left .opponent-detail strong,
  .opponent-card--seat-right .opponent-detail strong {
    max-width: 25px;
    font-size: 6px;
  }

  .table-center {
    gap: 10px;
  }

  .pile-label {
    font-size: 5px;
    letter-spacing: 0;
  }

  .draw-pile,
  .discard-card-slot,
  .playing-card--top {
    width: 42px;
    height: 61px;
  }

  .draw-pile-mark {
    width: 26px;
    height: 39px;
    font-size: 24px;
  }

  .playing-card--top .card-center {
    font-size: 26px;
  }
}
