:root {
  color-scheme: dark;
  --bg: #080c17;
  --bg-soft: #0b1120;
  --surface-1: #11182a;
  --surface-2: #161d31;
  --surface-3: #1e2740;
  --surface-4: #253151;
  --border: #2c3860;
  --border-strong: #43537f;
  --text: #f3f6ff;
  --muted: #a5afc8;
  --muted-dark: #747f9d;
  --gold: #ffcf5c;
  --gold-dark: #f0a92e;
  --gold-ink: #20160a;
  --blue: #5aa8ff;
  --green: #4fd07a;
  --red: #ff5a6a;
  --purple: #a875d2;
  --focus: #ffe08a;
  --shadow-small: 0 8px 24px rgba(0, 0, 0, .24);
  --shadow-large: 0 26px 80px rgba(0, 0, 0, .48);
  --header-height: 72px;
  --page-width: 1280px;
  --radius-small: 10px;
  --radius: 18px;
  --radius-large: 26px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% -8%, rgba(90, 168, 255, .13), transparent 34rem),
    radial-gradient(circle at 92% 10%, rgba(168, 117, 210, .1), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.is-hidden {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 5000;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-small);
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: opacity .16s ease;
}

body.auth-pending .app-shell,
body.auth-required .app-shell {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.auth-restore-screen {
  position: fixed;
  z-index: 4900;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at 50% 38%, rgba(90, 168, 255, .13), transparent 24rem),
    var(--bg);
  color: var(--text);
}

.auth-restore-screen > strong {
  margin-top: 4px;
  font-size: 16px;
  letter-spacing: .04em;
}

.auth-restore-screen > small {
  color: var(--muted);
  font-size: 10px;
}

.loading-line {
  width: 150px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.loading-line i {
  width: 44%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  animation: auth-loading 1.1s ease-in-out infinite;
}

@keyframes auth-loading {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(340%);
  }
}

#main-content {
  flex: 1;
  min-height: 70vh;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(67, 83, 127, .6);
  background: rgba(8, 12, 23, .82);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .16);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--page-width), calc(100% - 48px));
  min-height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 32px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 207, 92, .6);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 224, 138, .18), transparent 58%),
    #151b2c;
  box-shadow: inset 0 0 18px rgba(255, 207, 92, .08);
}

.brand-mark i {
  position: absolute;
  bottom: 8px;
  width: 8px;
  height: 15px;
  border: 2px solid var(--gold);
  border-bottom: 0;
  background: rgba(255, 207, 92, .12);
}

.brand-mark i::before {
  content: "";
  position: absolute;
  top: -7px;
  left: -2px;
  width: 8px;
  height: 7px;
  background: var(--gold);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.brand-mark i:nth-child(1) {
  left: 6px;
}

.brand-mark i:nth-child(2) {
  left: 15px;
  height: 21px;
}

.brand-mark i:nth-child(3) {
  right: 5px;
}

.brand-mark-large {
  width: 52px;
  height: 52px;
  border-radius: 15px;
}

.brand-mark-large i {
  bottom: 10px;
  width: 10px;
  height: 21px;
}

.brand-mark-large i:nth-child(1) {
  left: 8px;
}

.brand-mark-large i:nth-child(2) {
  left: 20px;
  height: 29px;
}

.brand-mark-large i:nth-child(3) {
  right: 7px;
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .11em;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .28em;
}

.desktop-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  transition: color .16s ease, background .16s ease;
}

.desktop-nav a:hover {
  background: rgba(30, 39, 64, .7);
  color: var(--text);
}

.desktop-nav a[aria-current="page"] {
  background: var(--surface-3);
  color: var(--text);
}

.desktop-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 5px;
  left: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.coin-pill,
.icon-button,
.profile-chip {
  min-height: 42px;
  border: 1px solid var(--border);
  background: rgba(22, 29, 49, .88);
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}

.coin-pill:hover,
.icon-button:hover,
.profile-chip:hover {
  border-color: var(--gold);
  background: var(--surface-3);
}

.coin-pill:active,
.icon-button:active,
.profile-chip:active {
  transform: scale(.97);
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px 0 7px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.coin-symbol {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #ffe18c;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  box-shadow: inset 0 0 0 2px rgba(115, 69, 12, .28), 0 3px 10px rgba(240, 169, 46, .2);
  color: var(--gold-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.coin-label {
  color: var(--muted);
  font-size: 10px;
}

.icon-button {
  position: relative;
  width: 42px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
}

.friends-icon {
  position: absolute;
  inset: 0;
}

.friends-icon i {
  position: absolute;
  top: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.friends-icon i::after {
  content: "";
  position: absolute;
  top: 10px;
  left: -3px;
  width: 15px;
  height: 10px;
  border-radius: 9px 9px 4px 4px;
  background: var(--muted);
}

.friends-icon i:first-child {
  left: 10px;
}

.friends-icon i:last-child {
  right: 9px;
  transform: scale(.8);
  transform-origin: bottom right;
  opacity: .72;
}

.request-badge,
.mobile-request-badge {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.request-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid var(--bg);
  font-size: 9px;
}

.profile-chip {
  max-width: 210px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
}

.profile-chip-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.profile-chip-copy strong,
.profile-chip-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip-copy strong {
  font-size: 12px;
}

.profile-chip-copy small {
  color: var(--muted);
  font-size: 9px;
}

.signed-out-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.session-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.loading-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(255, 207, 92, .55);
  animation: loading-pulse 1.2s ease infinite;
}

@keyframes loading-pulse {
  50% {
    box-shadow: 0 0 0 6px rgba(255, 207, 92, 0);
    opacity: .7;
  }
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.button:not(:disabled):active {
  transform: scale(.97);
}

.button-primary {
  border-color: rgba(255, 224, 138, .72);
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  box-shadow: 0 8px 22px rgba(240, 169, 46, .16);
  color: var(--gold-ink);
}

.button-primary:hover {
  box-shadow: 0 10px 28px rgba(240, 169, 46, .27);
  filter: brightness(1.04);
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface-3);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-4);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button-quiet:hover {
  background: var(--surface-2);
  color: var(--text);
}

.button-danger {
  border-color: rgba(255, 90, 106, .32);
  background: rgba(255, 90, 106, .08);
  color: #ff9ba5;
}

.button-disabled,
.button:disabled {
  border-color: var(--border);
  background: #141b2d;
  color: var(--muted-dark);
  box-shadow: none;
  cursor: not-allowed;
}

.button-large {
  min-height: 50px;
  width: 100%;
  border-radius: 14px;
  font-size: 14px;
}

.button-small {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 11px;
}

.page {
  width: min(var(--page-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 0, rgba(255, 207, 92, .08), transparent 32%),
    linear-gradient(120deg, rgba(24, 32, 55, .96), rgba(15, 22, 39, .96));
  box-shadow: var(--shadow-small);
}

.dashboard-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-identity > div {
  min-width: 0;
}

.dashboard-identity .eyebrow {
  margin-bottom: 3px;
}

.dashboard-identity h1 {
  overflow: hidden;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-identity p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 8px;
}

.dashboard-summary a,
.dashboard-summary button {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(10, 16, 29, .72);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-summary a:hover,
.dashboard-summary button:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.dashboard-summary span,
.dashboard-summary strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-summary span {
  color: var(--muted);
  font-size: 9px;
}

.dashboard-summary strong {
  margin-top: 2px;
  color: var(--gold);
  font-size: 13px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.home-main,
.home-sidebar {
  min-width: 0;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .16em;
}

.play-arrow {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.section-heading h2,
.section-heading h3 {
  font-size: clamp(22px, 2.5vw, 29px);
  letter-spacing: -.025em;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.section-heading.compact h3 {
  font-size: 18px;
}

.section-link {
  flex: 0 0 auto;
  padding: 7px 3px;
  border-radius: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--shadow-small);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.game-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .34);
  transform: translateY(-2px);
}

.game-card > a {
  display: block;
  border-radius: inherit;
}

.game-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.game-art::after {
  content: "";
  position: absolute;
  z-index: 9;
  inset: auto 0 0;
  height: 50%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(8, 12, 23, .56));
}

.game-card-body {
  padding: 16px;
}

.game-status {
  position: absolute;
  z-index: 12;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(79, 208, 122, .45);
  border-radius: 999px;
  background: rgba(11, 45, 28, .88);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  color: #a1f3bb;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .09em;
  backdrop-filter: blur(8px);
}

.game-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
}

.game-status.coming {
  border-color: rgba(255, 207, 92, .38);
  background: rgba(55, 41, 13, .88);
  color: #ffe59f;
}

.game-status.coming::before {
  background: var(--gold);
  box-shadow: 0 0 9px var(--gold);
}

.game-title-row {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.game-title-row h3 {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-arrow {
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
}

.game-byline {
  display: block;
  margin-top: 2px;
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 700;
}

.game-description {
  min-height: 38px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.game-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 13px;
  color: #cbd4e9;
  font-size: 10px;
  font-weight: 800;
}

.meta-liked,
.meta-visits {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mini-like {
  position: relative;
  width: 11px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: rotate(-8deg);
}

.mini-like::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 1px;
  width: 4px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.mini-eye {
  width: 14px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50% 12% 50% 12%;
  transform: rotate(45deg);
}

.mini-eye::after {
  content: "";
  position: absolute;
}

.future-card {
  grid-column: 1 / -1;
  min-height: 116px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, rgba(90, 168, 255, .05), rgba(168, 117, 210, .07)),
    var(--surface-1);
}

.future-symbol {
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid var(--border-strong);
  border-radius: 17px;
  background: var(--surface-2);
}

.future-symbol::before,
.future-symbol::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold);
  transform: translate(-50%, -50%);
}

.future-symbol::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.future-card .eyebrow {
  margin-bottom: 3px;
}

.future-card h3 {
  font-size: 16px;
}

.future-card p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.future-dots {
  display: flex;
  gap: 6px;
}

.future-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}

.future-dots i:nth-child(2) {
  background: var(--gold);
}

.side-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 24, 42, .88);
  box-shadow: var(--shadow-small);
}

.side-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.side-card-header h2 {
  font-size: 16px;
}

.side-card-header a,
.side-card-header button {
  min-height: 36px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gold);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-summary-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.account-summary-copy strong,
.account-summary-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary-copy strong {
  font-size: 15px;
}

.account-summary-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.platform-level {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.level-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.level-copy strong {
  color: var(--gold);
  font-size: 11px;
}

.level-bar {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 6px;
  background: #080d18;
}

.level-bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.signed-out-card {
  text-align: center;
}

.signed-out-card .guest-avatar {
  margin: 0 auto 12px;
}

.signed-out-card h2 {
  font-size: 17px;
}

.signed-out-card p {
  margin: 6px 0 15px;
  color: var(--muted);
  font-size: 11px;
}

.signed-out-card .button + .button {
  margin-top: 7px;
}

.friend-preview-list,
.friend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-preview {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.friend-preview + .friend-preview {
  border-top: 1px solid rgba(44, 56, 96, .62);
}

.friend-preview-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.friend-preview-copy strong,
.friend-preview-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-preview-copy strong {
  font-size: 12px;
}

.friend-preview-copy span {
  color: var(--muted);
  font-size: 9px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 2px solid var(--surface-1);
  border-radius: 50%;
  background: var(--muted-dark);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px rgba(79, 208, 122, .7);
}

.empty-state {
  padding: 24px 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(22, 29, 49, .5);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.empty-state p {
  margin-top: 4px;
  font-size: 10px;
}

/* CSS artwork for game cards and detail pages */
.tower-art {
  background: #10182a;
}

.game-cover-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.002);
}

.game-cover-vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 9, 17, .2), transparent 36%, rgba(5, 9, 17, .1)),
    linear-gradient(180deg, transparent 56%, rgba(5, 9, 17, .4));
}

.tower-defense-wordmark {
  position: absolute;
  z-index: 7;
  right: 13px;
  bottom: 10px;
  width: min(47%, 230px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .72));
}

.detail-art .game-cover-image {
  object-position: center 48%;
}

.detail-art .tower-defense-wordmark {
  top: clamp(26px, 4vw, 48px);
  right: clamp(24px, 4vw, 52px);
  bottom: auto;
  width: clamp(230px, 34vw, 410px);
}

.tower-art .art-moon {
  position: absolute;
  top: 15%;
  right: 18%;
  width: 13%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffe8a6;
  box-shadow: 0 0 34px rgba(255, 232, 166, .45);
}

.tower-art .art-hill {
  position: absolute;
  z-index: 1;
  right: -12%;
  bottom: 16%;
  left: -12%;
  height: 44%;
  border-radius: 50% 50% 0 0;
  background: #1a2d30;
  transform: rotate(-3deg);
}

.tower-art .art-road {
  position: absolute;
  z-index: 3;
  bottom: -35%;
  left: 50%;
  width: 30%;
  height: 95%;
  border: 2px solid rgba(255, 224, 138, .14);
  background: linear-gradient(90deg, #695a42, #a28a5f 49%, #695a42);
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.art-castle {
  position: absolute;
  z-index: 7;
  top: 32%;
  left: 50%;
  width: 26%;
  height: 33%;
  border: 1px solid rgba(255, 255, 255, .24);
  background: linear-gradient(90deg, #626b78, #a3a9ad 50%, #596472);
  box-shadow: 0 16px 24px rgba(0, 0, 0, .34), 0 0 28px rgba(255, 207, 92, .1);
  transform: translateX(-50%);
}

.art-castle::before {
  content: "";
  position: absolute;
  top: -22%;
  left: -10%;
  width: 120%;
  height: 27%;
  background: #7a8490;
  clip-path: polygon(0 100%, 0 35%, 13% 35%, 13% 0, 27% 0, 27% 35%, 43% 35%, 43% 0, 57% 0, 57% 35%, 73% 35%, 73% 0, 87% 0, 87% 35%, 100% 35%, 100% 100%);
}

.art-castle::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 20%;
  height: 34%;
  border-radius: 12px 12px 0 0;
  background: #1b2030;
  transform: translateX(-50%);
}

.art-tower {
  position: absolute;
  z-index: 8;
  bottom: 22%;
  width: 7%;
  height: 21%;
  border: 1px solid rgba(255, 207, 92, .38);
  background: linear-gradient(90deg, #66451f, #b77b37 55%, #52371b);
  box-shadow: 0 9px 14px rgba(0, 0, 0, .36);
}

.art-tower::before {
  content: "";
  position: absolute;
  top: -13%;
  left: -20%;
  width: 140%;
  height: 16%;
  background: var(--gold);
  clip-path: polygon(0 100%, 0 30%, 22% 30%, 22% 0, 40% 0, 40% 30%, 60% 30%, 60% 0, 78% 0, 78% 30%, 100% 30%, 100% 100%);
}

.art-tower.left {
  left: 20%;
}

.art-tower.middle {
  bottom: 12%;
  left: 46.5%;
}

.art-tower.right {
  right: 20%;
}

.restaurant-art {
  background: #171a1f;
}

.restaurant-art::before {
  content: none;
}

.restaurant-cover-image {
  object-position: center 50%;
}

.restaurant-cover-vignette {
  background:
    linear-gradient(90deg, rgba(8, 10, 13, .14), transparent 28%, rgba(8, 10, 13, .08)),
    linear-gradient(180deg, rgba(8, 10, 13, .03) 52%, rgba(8, 10, 13, .42));
}

.detail-art .restaurant-cover-image {
  object-position: center 52%;
}

.restaurant-building {
  position: absolute;
  z-index: 4;
  right: 18%;
  bottom: 12%;
  width: 55%;
  height: 62%;
  border: 2px solid rgba(255, 235, 209, .35);
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(90deg, #d7a27c, #f1c299 55%, #c88b6e);
  box-shadow: 0 18px 35px rgba(0, 0, 0, .32);
}

.restaurant-building::before {
  content: "";
  position: absolute;
  top: -13%;
  right: -4%;
  left: -4%;
  height: 18%;
  border: 2px solid rgba(255, 235, 209, .38);
  border-radius: 8px 8px 2px 2px;
  background: #542b3d;
}

.restaurant-awning {
  position: absolute;
  z-index: 7;
  top: 21%;
  left: 8%;
  width: 84%;
  height: 19%;
  border-radius: 3px 3px 8px 8px;
  background: repeating-linear-gradient(90deg, #fbdfb8 0 12%, #8e4050 12% 24%);
  box-shadow: 0 7px 12px rgba(57, 21, 31, .25);
  clip-path: polygon(0 0, 100% 0, 95% 100%, 86% 82%, 75% 100%, 63% 82%, 50% 100%, 37% 82%, 25% 100%, 13% 82%, 4% 100%);
}

.restaurant-door {
  position: absolute;
  bottom: 0;
  left: 43%;
  width: 18%;
  height: 42%;
  border: 2px solid #76465a;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(155deg, #233149, #4e7890);
}

.restaurant-window {
  position: absolute;
  bottom: 12%;
  width: 25%;
  height: 30%;
  border: 4px solid #75465a;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(244, 214, 164, .7) 48% 52%, transparent 53%),
    linear-gradient(transparent 47%, rgba(244, 214, 164, .7) 48% 52%, transparent 53%),
    #315069;
  box-shadow: inset 0 0 18px rgba(255, 224, 138, .18);
}

.restaurant-window.left {
  left: 8%;
}

.restaurant-window.right {
  right: 8%;
}

.restaurant-table {
  position: absolute;
  z-index: 8;
  bottom: 7%;
  left: 8%;
  width: 20%;
  height: 3%;
  border-radius: 4px;
  background: #f0c18c;
  box-shadow: 0 8px 0 -3px #5a3340;
}

.restaurant-table::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 48%;
  width: 3px;
  height: 25px;
  background: #613d3a;
}

.restaurant-table.right {
  right: 6%;
  left: auto;
}

.detail-art .restaurant-table {
  height: 2%;
}

.hotel-art {
  background:
    linear-gradient(180deg, #153d54 0%, #3c8291 48%, #f1b76e 100%);
}

.hotel-art::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    radial-gradient(circle at 72% 17%, rgba(255, 239, 180, .18), transparent 22%),
    linear-gradient(90deg, rgba(4, 20, 28, .16), transparent 42%);
}

.hotel-sun {
  position: absolute;
  z-index: 1;
  top: 13%;
  right: 17%;
  width: 13%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffe3a0;
  box-shadow: 0 0 38px rgba(255, 219, 132, .55);
}

.hotel-hill {
  position: absolute;
  z-index: 2;
  right: -12%;
  bottom: -25%;
  left: -12%;
  height: 58%;
  border-radius: 50% 50% 0 0;
  background: #1b4d4d;
  transform: rotate(2deg);
}

.hotel-hill.far {
  z-index: 1;
  right: -22%;
  bottom: 6%;
  left: 32%;
  height: 47%;
  background: rgba(48, 105, 97, .85);
  transform: rotate(-5deg);
}

.hotel-building {
  position: absolute;
  z-index: 5;
  bottom: 8%;
  left: 30%;
  width: 43%;
  height: 68%;
  border: 2px solid rgba(255, 238, 198, .5);
  border-radius: 7px 7px 2px 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 24%, rgba(63, 42, 30, .08)),
    linear-gradient(180deg, #f0d1a4, #c89261);
  box-shadow: 0 18px 38px rgba(3, 14, 19, .46);
}

.hotel-roof {
  position: absolute;
  top: -11%;
  right: -5%;
  left: -5%;
  height: 14%;
  border-radius: 4px 4px 1px 1px;
  background: #5f3942;
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
}

.hotel-window {
  position: absolute;
  top: 19%;
  width: 18%;
  height: 20%;
  border: 2px solid #775548;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 230, 164, .8) 48% 52%, transparent 53%),
    linear-gradient(transparent 47%, rgba(255, 230, 164, .8) 48% 52%, transparent 53%),
    #356376;
  box-shadow: inset 0 0 12px rgba(255, 225, 147, .22);
}

.hotel-window.one,
.hotel-window.three {
  left: 12%;
}

.hotel-window.two,
.hotel-window.four {
  right: 12%;
}

.hotel-window.three,
.hotel-window.four {
  top: 49%;
}

.hotel-door {
  position: absolute;
  bottom: 0;
  left: 41%;
  width: 19%;
  height: 29%;
  border: 2px solid #6d493e;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(150deg, #244756, #4d8791);
}

.hotel-palm {
  position: absolute;
  z-index: 6;
  bottom: 6%;
  left: 19%;
  width: 3%;
  height: 40%;
  border-radius: 70% 30% 30% 70%;
  background: linear-gradient(90deg, #68452c, #a8753f);
  transform: rotate(5deg);
  transform-origin: bottom;
}

.hotel-palm::before {
  content: "";
  position: absolute;
  top: -14%;
  left: 50%;
  width: 590%;
  aspect-ratio: 1.45;
  background: #1c6c51;
  clip-path: polygon(50% 45%, 2% 11%, 40% 51%, 8% 79%, 44% 58%, 35% 100%, 53% 61%, 74% 99%, 60% 56%, 100% 77%, 64% 49%, 99% 11%);
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 5px rgba(3, 22, 19, .28));
}

.hotel-palm.right {
  right: 15%;
  left: auto;
  height: 34%;
  transform: rotate(-7deg);
}

.hotel-wordmark {
  position: absolute;
  z-index: 8;
  right: 4%;
  bottom: 7%;
  display: flex;
  flex-direction: column;
  color: #fff8df;
  font-family: Georgia, serif;
  font-size: clamp(10px, 2vw, 22px);
  letter-spacing: .12em;
  line-height: .92;
  text-align: right;
  text-shadow: 0 3px 9px rgba(0, 0, 0, .82);
}

.hotel-wordmark em {
  color: #ffd582;
  font-size: .72em;
  font-style: normal;
  letter-spacing: .3em;
}

.detail-art .hotel-wordmark {
  top: clamp(28px, 5vw, 58px);
  right: clamp(28px, 5vw, 64px);
  bottom: auto;
  font-size: clamp(31px, 5vw, 66px);
}

.coming-veil {
  position: absolute;
  z-index: 10;
  inset: 0;
  background: rgba(12, 10, 20, .18);
  backdrop-filter: saturate(.82);
}

/* Detail pages */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.breadcrumbs a:hover {
  color: var(--gold);
}

.breadcrumbs i {
  color: var(--muted-dark);
  font-style: normal;
}

.detail-hero {
  position: relative;
  min-height: min(470px, 47vw);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-large);
}

.detail-art {
  position: absolute;
  inset: 0;
}

.detail-art.game-art {
  aspect-ratio: auto;
  border: 0;
}

.detail-art.game-art::after {
  height: 62%;
  background: linear-gradient(transparent, rgba(8, 12, 23, .86));
}

.detail-title-overlay {
  position: absolute;
  z-index: 20;
  right: clamp(20px, 5vw, 56px);
  bottom: clamp(22px, 5vw, 48px);
  left: clamp(20px, 5vw, 56px);
}

.detail-title-overlay .game-status {
  position: static;
  width: fit-content;
  margin-bottom: 10px;
}

.detail-title-overlay h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 950;
  letter-spacing: -.05em;
  line-height: 1;
  text-shadow: 0 5px 20px rgba(0, 0, 0, .55);
}

.detail-title-overlay p {
  margin-top: 9px;
  color: #d2daec;
  font-size: 12px;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  margin-top: 24px;
}

.detail-main,
.detail-sidebar {
  min-width: 0;
}

.content-card,
.action-card,
.metrics-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  box-shadow: var(--shadow-small);
}

.content-card {
  padding: clamp(20px, 3vw, 30px);
}

.content-card + .content-card {
  margin-top: 16px;
}

.content-card h2 {
  font-size: 21px;
}

.content-card > p {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.action-card,
.metrics-card {
  padding: 16px;
}

.play-button {
  min-height: 56px;
  font-size: 16px;
}

.action-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.rating-question {
  font-size: 13px;
  font-weight: 850;
}

.rating-result {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.reaction-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.reaction-button {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .12s ease;
}

.reaction-button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.reaction-button:active {
  transform: scale(.97);
}

.reaction-button[aria-pressed="true"][data-reaction="like"] {
  border-color: rgba(79, 208, 122, .55);
  background: rgba(79, 208, 122, .12);
  color: #9cf0b7;
}

.reaction-button[aria-pressed="true"][data-reaction="dislike"] {
  border-color: rgba(255, 90, 106, .55);
  background: rgba(255, 90, 106, .1);
  color: #ffabb4;
}

.thumb-icon {
  position: relative;
  width: 15px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.thumb-icon::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 2px;
  width: 5px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.thumb-icon.down {
  transform: rotate(180deg);
}

.visit-metric {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.visit-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.visit-copy span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.visit-copy strong {
  margin-top: 2px;
  font-size: 20px;
}

.game-worked-on {
  display: flex;
  flex-direction: column;
  margin-top: 13px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(22, 29, 49, .6);
}

.game-worked-on span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.game-worked-on strong {
  margin-top: 4px;
  color: #e7edfb;
  font-size: 13px;
}

.info-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.info-button:hover,
.info-button[aria-expanded="true"] {
  border-color: var(--gold);
  color: var(--gold);
}

.info-popover {
  position: absolute;
  z-index: 40;
  right: 0;
  top: calc(100% + 10px);
  width: min(280px, calc(100vw - 40px));
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #171f34;
  box-shadow: var(--shadow-large);
}

.info-popover[hidden] {
  display: none;
}

.info-popover header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.info-popover h3 {
  font-size: 13px;
}

.info-popover p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.popover-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.detail-fact {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.detail-fact span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.detail-fact strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

/* Friends */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-heading h1 {
  font-size: clamp(31px, 4vw, 44px);
  letter-spacing: -.04em;
}

.page-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.friends-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
}

.friends-panel,
.add-friend-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  box-shadow: var(--shadow-small);
}

.friend-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg-soft);
}

.friend-tabs button {
  min-height: 40px;
  flex: 1;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.friend-tab-panel[hidden] {
  display: none;
}

.friend-tabs button[aria-selected="true"] {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}

.friend-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.friend-row.request {
  border-color: rgba(255, 207, 92, .44);
  background: linear-gradient(100deg, rgba(255, 207, 92, .06), var(--surface-2));
}

.friend-row-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.friend-row-copy strong,
.friend-row-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-row-copy strong {
  font-size: 13px;
}

.friend-row-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.friend-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.friend-row-actions .button {
  min-width: 70px;
}

.add-friend-panel {
  align-self: start;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.add-friend-panel h2 {
  font-size: 17px;
}

.add-friend-panel > p {
  margin: 5px 0 15px;
  color: var(--muted);
  font-size: 11px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  font-size: 11px;
  font-weight: 800;
}

.form-field input,
.form-field select {
  min-height: 48px;
  width: 100%;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0e1526;
  color: var(--text);
  caret-color: var(--gold);
}

.form-field select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 12px) 20px;
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

.form-field input:hover,
.form-field select:hover {
  border-color: var(--border-strong);
}

.form-field small {
  color: var(--muted-dark);
  font-size: 9px;
}

.form-success,
.inline-message {
  min-height: 18px;
  margin-top: 9px;
  color: var(--green);
  font-size: 10px;
}

.auth-gate {
  max-width: 520px;
  margin: 42px auto;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface-1);
  box-shadow: var(--shadow-large);
  text-align: center;
}

.auth-gate .guest-avatar {
  margin: 0 auto 17px;
}

.auth-gate h1 {
  font-size: 26px;
}

.auth-gate p {
  margin: 8px auto 20px;
  color: var(--muted);
  font-size: 13px;
}

.auth-gate-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* Profile */
.profile-cover {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 207, 92, .2), transparent 26%),
    radial-gradient(circle at 79% 20%, rgba(90, 168, 255, .2), transparent 30%),
    radial-gradient(circle at 64% 88%, rgba(168, 117, 210, .18), transparent 28%),
    linear-gradient(135deg, #1b2440, #12192c);
  box-shadow: var(--shadow-large);
}

.profile-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(#000, transparent);
}

.profile-identity {
  position: absolute;
  right: 28px;
  bottom: 24px;
  left: 28px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.profile-identity-copy {
  min-width: 0;
  flex: 1;
  padding-bottom: 4px;
}

.profile-identity-copy h1 {
  overflow: hidden;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity-copy p {
  margin-top: 3px;
  color: #d1d9ec;
  font-size: 12px;
  font-weight: 700;
}

.profile-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(79, 208, 122, .45);
  border-radius: 999px;
  background: rgba(12, 48, 30, .64);
  color: #a0f3ba;
  font-size: 9px;
  font-weight: 850;
}

.profile-online::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  margin-top: 22px;
}

.profile-section {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  box-shadow: var(--shadow-small);
}

.profile-section + .profile-section {
  margin-top: 16px;
}

.profile-section h2 {
  font-size: 19px;
}

.profile-section > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.global-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.global-stat {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
}

.global-stat strong,
.global-stat span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-stat strong {
  color: var(--gold);
  font-size: 19px;
}

.global-stat span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.progress-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.game-progress-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.progress-art {
  position: relative;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: linear-gradient(145deg, #26385e, #12192b);
}

.progress-art.tower::before {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 8px;
  left: 11px;
  height: 26px;
  border: 2px solid var(--gold);
  border-bottom: 0;
  clip-path: polygon(0 22%, 18% 22%, 18% 0, 36% 0, 36% 22%, 64% 22%, 64% 0, 82% 0, 82% 22%, 100% 22%, 100% 100%, 0 100%);
}

.progress-art.restaurant::before {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  height: 30px;
  border: 2px solid #f2b98f;
  background: repeating-linear-gradient(90deg, #f1c49d 0 7px, #8d4051 7px 14px);
  clip-path: polygon(0 0, 100% 0, 92% 30%, 92% 100%, 8% 100%, 8% 30%);
}

.progress-art.hotel {
  background: linear-gradient(145deg, #397b80, #172c32);
}

.progress-art.hotel::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 7px;
  left: 10px;
  height: 33px;
  border: 2px solid #f3d38d;
  background:
    linear-gradient(90deg, transparent 44%, #f3d38d 45% 55%, transparent 56%),
    repeating-linear-gradient(90deg, #325f6a 0 6px, #f3d38d 6px 8px);
  clip-path: polygon(9% 0, 91% 0, 100% 12%, 94% 12%, 94% 100%, 6% 100%, 6% 12%, 0 12%);
}

.game-progress-copy {
  min-width: 0;
}

.game-progress-copy strong {
  display: block;
  font-size: 13px;
}

.game-progress-copy span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-progress-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 6px;
  color: #ccd6ea;
  font-size: 9px;
  font-weight: 800;
}

.avatar-panel {
  align-self: start;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.avatar-panel h2 {
  font-size: 17px;
}

.avatar-panel > p {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 10px;
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.avatar-option {
  min-height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
  cursor: pointer;
}

.avatar-option:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.avatar-option[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 207, 92, .16);
}

.avatar-option .avatar {
  pointer-events: none;
}

/* Account settings */
.settings-heading {
  align-items: center;
}

.guest-security-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 207, 92, .42);
  border-radius: 15px;
  background: linear-gradient(110deg, rgba(255, 207, 92, .1), rgba(22, 29, 49, .9));
}

.guest-security-icon {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 207, 92, .38);
  border-radius: 50%;
  background: rgba(255, 207, 92, .08);
}

.guest-security-icon::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 14px;
  width: 12px;
  height: 10px;
  border: 2px solid var(--gold);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.guest-security-icon::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: 10px;
  height: 17px;
  border-radius: 5px;
  background: var(--gold);
}

.guest-security-banner h2 {
  font-size: 15px;
}

.guest-security-banner p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 20px;
}

.settings-main,
.settings-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 18px);
}

.settings-card {
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  box-shadow: var(--shadow-small);
}

.settings-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.settings-card h2 {
  font-size: 19px;
}

.settings-card h3 {
  font-size: 14px;
}

.settings-card-heading p,
.settings-subsection > p,
.privacy-card > p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.settings-card form {
  max-width: 620px;
}

.settings-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--border);
}

.settings-subsection {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.settings-avatar-options {
  max-width: 520px;
  margin-top: 12px;
}

.account-overview-card {
  text-align: center;
}

.account-overview-card > .avatar {
  margin: 0 auto 12px;
}

.account-overview-card > h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-overview-card > p {
  color: var(--muted);
  font-size: 11px;
}

.account-overview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 17px 0;
}

.account-overview-stats span {
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.account-overview-stats b {
  display: block;
  overflow: hidden;
  margin-bottom: 2px;
  color: var(--gold);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privacy-card > .button {
  margin-top: 16px;
}

.profile-settings-card .button {
  margin-top: 16px;
}

/* CSS avatar system */
.avatar {
  --avatar-bg-a: #5aa8ff;
  --avatar-bg-b: #253151;
  --avatar-shirt: #ffcf5c;
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-block;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, .22), transparent 25%),
    linear-gradient(145deg, var(--avatar-bg-a), var(--avatar-bg-b));
  box-shadow: inset 0 0 20px rgba(0, 0, 0, .12);
}

.avatar::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 18%;
  left: 50%;
  width: 30%;
  height: 34%;
  border-radius: 48% 48% 44% 44%;
  background: #e7ad79;
  box-shadow: 0 -4px 0 #53372f;
  transform: translateX(-50%);
}

.avatar::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: 16%;
  bottom: -12%;
  left: 16%;
  height: 54%;
  border-radius: 45% 45% 8% 8%;
  background: var(--avatar-shirt);
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, .13);
}

.avatar-small {
  width: 34px;
  height: 34px;
}

.avatar-tiny {
  width: 38px;
  height: 38px;
}

.avatar-large {
  width: 104px;
  height: 104px;
  border: 3px solid rgba(255, 255, 255, .22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35), inset 0 0 30px rgba(0, 0, 0, .12);
}

.avatar[data-avatar="ember"] {
  --avatar-bg-a: #d45d47;
  --avatar-bg-b: #3d1d28;
  --avatar-shirt: #ffcf5c;
}

.avatar[data-avatar="ocean"] {
  --avatar-bg-a: #55b8d0;
  --avatar-bg-b: #163653;
  --avatar-shirt: #dcefff;
}

.avatar[data-avatar="forest"] {
  --avatar-bg-a: #4fd07a;
  --avatar-bg-b: #183b32;
  --avatar-shirt: #283d26;
}

.avatar[data-avatar="royal"] {
  --avatar-bg-a: #a875d2;
  --avatar-bg-b: #342149;
  --avatar-shirt: #ffcf5c;
}

.avatar[data-avatar="midnight"] {
  --avatar-bg-a: #586a99;
  --avatar-bg-b: #10182b;
  --avatar-shirt: #222a3e;
}

.avatar[data-avatar="rose"] {
  --avatar-bg-a: #dd708e;
  --avatar-bg-b: #572744;
  --avatar-shirt: #f5bdcf;
}

.avatar[data-avatar="sunrise"] {
  --avatar-bg-a: #f0a92e;
  --avatar-bg-b: #7d3d2b;
  --avatar-shirt: #fff0b5;
}

.avatar[data-avatar="frost"] {
  --avatar-bg-a: #a6d5ee;
  --avatar-bg-b: #3e5a80;
  --avatar-shirt: #eaf8ff;
}

.guest-avatar::before {
  width: 34%;
  height: 34%;
  background: #78839e;
  box-shadow: none;
}

.guest-avatar::after {
  background: #3b465f;
}

/* Footer and mobile navigation */
.site-footer {
  border-top: 1px solid rgba(44, 56, 96, .7);
  background: rgba(8, 12, 23, .72);
}

.footer-inner {
  width: min(var(--page-width), calc(100% - 48px));
  min-height: 108px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  color: var(--muted-dark);
  font-size: 10px;
}

.footer-brand {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.footer-inner nav {
  display: flex;
  gap: 16px;
}

.footer-inner nav a:hover {
  color: var(--text);
}

.mobile-nav {
  display: none;
}

/* Dialogs */
.modal {
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--text);
}

.modal::backdrop {
  background: rgba(3, 6, 13, .78);
  backdrop-filter: blur(8px);
}

.auth-required .auth-modal::backdrop {
  background:
    radial-gradient(circle at 50% 35%, rgba(90, 168, 255, .14), transparent 28rem),
    rgba(3, 6, 13, .96);
  backdrop-filter: none;
}

.auth-modal[open] {
  display: grid;
  place-items: center;
}

.modal[open] {
  animation: dialog-in .18s ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }
}

.modal-card {
  position: relative;
  width: min(440px, calc(100vw - 28px));
  max-height: min(780px, calc(100dvh - 28px));
  overflow-y: auto;
  padding: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(90, 168, 255, .1), transparent 27%),
    var(--surface-1);
  box-shadow: var(--shadow-large);
}

.auth-modal .modal-card {
  width: min(460px, calc(100vw - 28px));
  border-color: rgba(90, 109, 160, .72);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .66);
}

@media (max-height: 780px) {
  .auth-modal .modal-card {
    padding: 22px 26px;
  }

  .auth-modal .auth-brand {
    margin-bottom: 7px;
  }

  .auth-modal .auth-tabs {
    margin: 13px 0 11px;
  }

  .auth-modal .form-field {
    gap: 4px;
    margin-bottom: 9px;
  }

  .auth-modal .form-field input,
  .auth-modal .form-field select {
    min-height: 43px;
  }

  .auth-modal .divider {
    margin: 10px 0;
  }

  .auth-modal .auth-note {
    margin-top: 9px;
  }
}

.dialog-close {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.dialog-close-static {
  position: static;
  flex: 0 0 auto;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.modal-card h2 {
  font-size: 26px;
  text-align: center;
  letter-spacing: -.03em;
}

.modal-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 20px 0 16px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg-soft);
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.auth-tabs button[aria-selected="true"] {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 64px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 7px;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-field button:hover {
  background: var(--surface-3);
  color: var(--text);
}

.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 14px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  cursor: pointer;
}

.legal-check input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--gold);
}

.form-error {
  min-height: 19px;
  margin: -3px 0 5px;
  color: #ff9ba5;
  font-size: 10px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 15px 0;
  color: var(--muted-dark);
  font-size: 9px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.auth-note {
  margin: 14px auto 0;
  color: var(--muted-dark);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.drawer-modal {
  margin: 0 0 0 auto;
  height: 100dvh;
}

.drawer-modal[open] {
  animation: drawer-in .2s ease-out;
}

@keyframes drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}

.drawer-card {
  width: min(480px, 100vw);
  height: 100dvh;
  overflow-y: auto;
  padding: 26px;
  border-left: 1px solid var(--border-strong);
  background:
    radial-gradient(circle at 70% 0, rgba(255, 207, 92, .09), transparent 26%),
    var(--bg-soft);
  box-shadow: -20px 0 70px rgba(0, 0, 0, .42);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 21px;
}

.drawer-header .eyebrow {
  margin-bottom: 3px;
}

.drawer-header h2 {
  font-size: 30px;
  letter-spacing: -.035em;
}

.drawer-header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.wallet-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(255, 207, 92, .5);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 0, rgba(255, 207, 92, .17), transparent 38%),
    linear-gradient(135deg, #272419, #171d2d 62%);
  box-shadow: inset 0 0 28px rgba(255, 207, 92, .04);
}

.shop-page-layout {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: 18px;
}

.shop-page .wallet-card {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  margin-bottom: 0;
}

.wallet-card > div {
  display: flex;
  flex-direction: column;
}

.wallet-card > div > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.wallet-card strong {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
}

.wallet-card strong b {
  font-size: 27px;
  letter-spacing: -.03em;
}

.wallet-card > p {
  color: #ffe4a0;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.coin-source-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 21px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(8, 12, 23, .72);
}

.coin-source-tabs button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.coin-source-tabs button:hover {
  color: var(--text);
}

.coin-source-tabs button[aria-selected="true"] {
  border-color: rgba(255, 207, 92, .35);
  background: linear-gradient(145deg, rgba(255, 207, 92, .16), rgba(255, 207, 92, .06));
  color: #ffe5a0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
}

.coin-source-tabs button:focus-visible,
.coin-game-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.coin-source-panel[hidden],
.coin-achievement-drawer[hidden] {
  display: none;
}

.coin-games-heading {
  margin-bottom: 12px;
}

.coin-account-rewards {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.shop-page .coin-account-rewards {
  margin-bottom: 22px;
}

.coin-daily-card,
.creator-support-card {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-2);
}

.coin-daily-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px;
}

.coin-daily-card.claimed {
  border-color: rgba(79, 208, 122, .27);
  background:
    radial-gradient(circle at 0 0, rgba(79, 208, 122, .1), transparent 42%),
    var(--surface-2);
}

.coin-daily-reward {
  min-width: 62px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(255, 207, 92, .38);
  border-radius: 12px;
  background: rgba(255, 207, 92, .09);
  color: #ffe29a;
  font-size: 14px;
  font-weight: 950;
}

.coin-daily-card strong,
.creator-support-heading strong {
  font-size: 12px;
}

.coin-daily-card p,
.creator-support-heading p,
.creator-current,
.creator-owner-summary p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.coin-daily-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted-dark);
  font-size: 8px;
}

.creator-support-card {
  padding: 14px;
}

.creator-support-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.creator-support-heading > div {
  min-width: 0;
}

.creator-active-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(79, 208, 122, .65);
}

.creator-current {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(7, 11, 22, .46);
}

.creator-current.active {
  border-color: rgba(79, 208, 122, .24);
  color: #a6ebbc;
}

.creator-support-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  margin-top: 10px;
}

.creator-support-form input {
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0a1120;
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.creator-support-form input:focus {
  border-color: var(--gold);
  outline: 2px solid rgba(255, 207, 92, .13);
}

.creator-support-form .button {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 9px;
}

.creator-owner-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.creator-owner-summary > strong {
  font-size: 10px;
}

.creator-owner-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.creator-owner-codes > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(7, 11, 22, .42);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
}

.creator-owner-codes > span.active {
  border-color: rgba(255, 207, 92, .3);
  color: #ffe29a;
}

.creator-owner-codes small {
  color: var(--muted-dark);
  font-size: 7px;
}

.coin-game-card {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 17px;
  background:
    radial-gradient(circle at 13% 0, rgba(90, 168, 255, .13), transparent 32%),
    linear-gradient(145deg, #18233a, #111827);
  box-shadow: var(--shadow-small);
}

.coin-game-card.expanded {
  border-color: rgba(255, 207, 92, .42);
}

.coin-game-card + .coin-game-card {
  margin-top: 10px;
}

.coin-game-card.restaurant-coin-game {
  background:
    radial-gradient(circle at 13% 0, rgba(255, 170, 89, .16), transparent 35%),
    linear-gradient(145deg, #2a2130, #151827);
}

.coin-game-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.coin-game-toggle:hover {
  background: rgba(255, 255, 255, .025);
}

.coin-game-logo {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid rgba(127, 154, 207, .22);
  border-radius: 10px;
  background: rgba(5, 9, 18, .55);
}

.coin-game-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.restaurant-gamecoin-logo {
  min-height: 58px;
  overflow: hidden;
  border-color: rgba(255, 190, 112, .3);
  background:
    linear-gradient(180deg, rgba(255, 231, 190, .16), transparent 50%),
    repeating-linear-gradient(90deg, #9b3d34 0 12px, #f0dfbd 12px 24px);
  box-shadow: inset 0 -26px 0 rgba(44, 24, 25, .88);
}

.restaurant-gamecoin-logo b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid #f6d99f;
  border-radius: 50%;
  background: #7c2f2b;
  color: #fff3d6;
  font-family: Georgia, serif;
  font-size: 19px;
  box-shadow: 0 4px 9px rgba(0, 0, 0, .4);
}

.hotel-gamecoin-logo {
  min-height: 58px;
  overflow: hidden;
  border-color: rgba(105, 225, 205, .3);
  background:
    linear-gradient(180deg, rgba(255, 222, 144, .18), transparent 48%),
    linear-gradient(145deg, #286b6c, #17343e);
  box-shadow: inset 0 -22px 0 rgba(7, 22, 28, .34);
}

.hotel-gamecoin-logo b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid #f5d98f;
  border-radius: 6px 6px 2px 2px;
  background: #2b7070;
  color: #fff5d4;
  font-family: Georgia, serif;
  font-size: 19px;
  box-shadow: 0 4px 9px rgba(0, 0, 0, .4);
}

.coin-game-copy,
.coin-game-total {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.coin-game-copy strong {
  font-size: 14px;
}

.coin-game-copy small,
.coin-game-total small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.coin-game-total {
  align-items: flex-end;
}

.coin-game-total b {
  color: var(--gold);
  font-size: 14px;
}

.coin-game-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.coin-game-card.expanded .coin-game-chevron {
  transform: rotate(225deg);
}

.coin-game-progress {
  height: 5px;
  margin: 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #0a1020;
}

.coin-game-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  box-shadow: 0 0 10px rgba(255, 207, 92, .4);
}

.coin-game-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 14px 14px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.coin-game-quick-stats span {
  padding: 6px 4px;
  border: 1px solid rgba(127, 154, 207, .14);
  border-radius: 8px;
  background: rgba(5, 9, 18, .3);
}

.coin-game-quick-stats b {
  color: #e8eefc;
}

.coin-achievement-drawer {
  padding: 14px;
  border-top: 1px solid var(--border);
  background: rgba(5, 9, 18, .3);
}

.coin-achievement-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.coin-achievement-toolbar > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.coin-achievement-toolbar strong {
  font-size: 12px;
}

.coin-achievement-toolbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.coin-achievement-toolbar .button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 8px 11px;
  font-size: 9px;
}

.coin-achievement-list {
  max-height: min(420px, 48dvh);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-color: var(--border-strong) transparent;
}

.coin-achievement-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 84px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(127, 154, 207, .14);
  border-radius: 11px;
  background: rgba(16, 24, 42, .82);
}

.coin-achievement-row.claimable {
  border-color: rgba(255, 207, 92, .36);
  background: rgba(255, 207, 92, .055);
}

.coin-achievement-row.claimed {
  border-color: rgba(79, 208, 122, .2);
}

.coin-world-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: #dce5f7;
  font-size: 10px;
  font-weight: 900;
}

.coin-world-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.coin-world-copy strong,
.coin-world-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-world-copy strong {
  font-size: 10px;
}

.coin-world-copy small {
  margin-top: 2px;
  color: var(--muted-dark);
  font-size: 8px;
}

.coin-task-row .coin-world-copy small {
  line-height: 1.35;
  white-space: normal;
}

.coin-task-row .coin-world-copy small b {
  display: inline-block;
  margin-left: 4px;
  color: #f5cf7f;
  font-weight: 850;
}

.coin-world-reward {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffe4a0;
  font-size: 10px;
  font-weight: 900;
}

.coin-world-reward .coin-symbol {
  width: 18px;
  height: 18px;
  font-size: 7px;
}

.coin-world-claim {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 9px;
}

.coin-world-state {
  color: var(--muted-dark);
  font-size: 8px;
  font-weight: 850;
  text-align: right;
  text-transform: uppercase;
}

.coin-world-state.claimed {
  color: #8cebac;
}

.coin-achievement-loading,
.coin-achievement-error {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.coin-achievement-error {
  flex-direction: column;
  color: #ffabb4;
}

.coin-more-games {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 13px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(22, 29, 49, .52);
}

.coin-more-games .future-symbol {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.coin-more-games strong {
  font-size: 11px;
}

.coin-more-games p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.coin-packages {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.coin-package {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-1);
}

.coin-package.featured {
  border-color: rgba(255, 207, 92, .36);
  background: linear-gradient(100deg, rgba(255, 207, 92, .05), var(--surface-1));
}

.coin-package > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.coin-package strong,
.coin-package span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-package strong {
  font-size: 13px;
}

.coin-package > div span {
  margin-top: 2px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 850;
}

.coin-stack {
  position: relative;
  width: 52px;
  height: 42px;
}

.coin-stack i {
  position: absolute;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #ffe18c;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: var(--gold-ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.coin-stack i:nth-child(1) {
  top: 1px;
  left: 2px;
}

.coin-stack i:nth-child(2) {
  right: 2px;
  bottom: 0;
}

.coin-stack i:nth-child(3) {
  bottom: 1px;
  left: 6px;
}

.shop-notice {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(22, 29, 49, .65);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.drawer-link {
  margin-top: 18px;
}

.toast-region {
  position: fixed;
  z-index: 4000;
  top: calc(var(--header-height) + 14px);
  left: 50%;
  width: min(420px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  width: fit-content;
  max-width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(22, 29, 49, .96);
  box-shadow: var(--shadow-large);
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  animation: toast-in .18s ease-out;
}

.toast.error {
  border-color: rgba(255, 90, 106, .55);
  color: #ffbbc2;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.page-loader {
  width: min(var(--page-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.skeleton {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-1);
}

.skeleton::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent);
  animation: skeleton-slide 1.25s linear infinite;
}

.skeleton-hero {
  height: 310px;
}

.skeleton-row {
  height: 220px;
  margin-top: 20px;
}

@keyframes skeleton-slide {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(270%);
  }
}

.offline-banner {
  width: min(var(--page-width), calc(100% - 48px));
  margin: 12px auto -12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 207, 92, .25);
  border-radius: 10px;
  background: rgba(67, 48, 10, .42);
  color: #ffe5a1;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 18px;
  }

  .desktop-nav {
    justify-self: start;
  }

  .desktop-nav a {
    padding-inline: 11px;
  }

  .coin-label,
  .profile-chip-copy small {
    display: none;
  }

  .profile-chip {
    max-width: 150px;
  }

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

  .home-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .friends-layout,
  .profile-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

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

@media (max-width: 900px) {
  .brand-copy {
    display: none;
  }

  .header-inner {
    width: min(100% - 28px, var(--page-width));
  }

  .desktop-nav {
    gap: 2px;
  }

  .desktop-nav a {
    padding-inline: 10px;
    font-size: 12px;
  }

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

  .dashboard-summary {
    width: 100%;
  }

  .header-register {
    display: none;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }

  .friends-layout,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .add-friend-panel,
  .avatar-panel {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 767px) {
  .shop-page-layout {
    grid-template-columns: 1fr;
  }

  .shop-page .wallet-card {
    position: static;
  }

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

  .settings-sidebar {
    position: static;
  }

  :root {
    --header-height: 60px;
  }

  html {
    scroll-padding-top: calc(var(--header-height) + 15px);
  }

  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  .site-header {
    min-height: var(--header-height);
  }

  .header-inner {
    width: calc(100% - 24px);
    min-height: var(--header-height);
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .desktop-nav,
  .header-register,
  #friends-button,
  .profile-chip {
    display: none !important;
  }

  .header-actions {
    min-width: 0;
  }

  .coin-pill {
    min-width: 0;
    max-width: 145px;
    margin-left: auto;
    padding-right: 10px;
  }

  .coin-label {
    display: none;
  }

  .session-loading {
    max-width: 145px;
    margin-left: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .signed-out-actions:not(.is-hidden) {
    display: flex;
    margin-left: auto;
  }

  .header-login {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
  }

  .page,
  .page-loader {
    width: calc(100% - 32px);
    padding: 20px 0 40px;
  }

  .offline-banner {
    width: calc(100% - 32px);
    margin-top: 9px;
  }

  .home-main {
    gap: 24px;
  }

  .dashboard-header {
    padding: 17px;
  }

  .dashboard-identity {
    align-items: flex-start;
  }

  .dashboard-identity h1 {
    font-size: 24px;
    white-space: normal;
  }

  .dashboard-identity p {
    line-height: 1.5;
  }

  .dashboard-summary {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-summary > :last-child {
    grid-column: 1 / -1;
  }

  .game-grid,
  .home-sidebar {
    grid-template-columns: 1fr;
  }

  .future-card {
    grid-template-columns: auto 1fr;
  }

  .future-dots {
    display: none;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .site-footer {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    z-index: 120;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 5px 8px env(safe-area-inset-bottom, 0px);
    border-top: 1px solid rgba(67, 83, 127, .72);
    background: rgba(8, 12, 23, .94);
    box-shadow: 0 -10px 34px rgba(0, 0, 0, .28);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 10px;
    color: var(--muted-dark);
    font-size: 9px;
    font-weight: 800;
  }

  .mobile-nav a[aria-current="page"] {
    background: var(--surface-2);
    color: var(--gold);
  }

  .mobile-nav a > span:first-child {
    position: relative;
    width: 21px;
    height: 20px;
  }

  .mobile-home-icon::before {
    content: "";
    position: absolute;
    inset: 4px 3px 1px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 2px;
  }

  .mobile-home-icon::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 4px;
    width: 13px;
    height: 13px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .mobile-games-icon::before,
  .mobile-games-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 3px;
  }

  .mobile-games-icon::before {
    top: 1px;
    left: 1px;
  }

  .mobile-games-icon::after {
    right: 1px;
    bottom: 1px;
  }

  .mobile-friends-icon::before,
  .mobile-profile-icon::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 50%;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    transform: translateX(-50%);
  }

  .mobile-friends-icon::after,
  .mobile-profile-icon::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 0;
    left: 2px;
    height: 9px;
    border: 2px solid currentColor;
    border-radius: 8px 8px 3px 3px;
  }

  .mobile-friends-icon {
    transform: scale(.88);
  }

  .mobile-friends-icon::before {
    box-shadow: 8px 2px 0 -2px var(--bg);
  }

  .mobile-settings-icon::before {
    content: "";
    position: absolute;
    inset: 2px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-shadow:
      0 -4px 0 -2px currentColor,
      0 4px 0 -2px currentColor,
      4px 0 0 -2px currentColor,
      -4px 0 0 -2px currentColor;
  }

  .mobile-settings-icon::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
  }

  .mobile-request-badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 8px);
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border: 2px solid var(--bg);
    font-size: 8px;
  }

  .detail-hero {
    min-height: clamp(300px, 80vw, 390px);
  }

  .detail-layout {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
  }

  .detail-page {
    padding-bottom: 132px;
  }

  .detail-sidebar {
    display: contents;
  }

  .action-card {
    position: fixed;
    z-index: 110;
    right: 8px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    padding: 7px;
    border-color: rgba(67, 83, 127, .8);
    background: rgba(11, 17, 32, .94);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .35);
    backdrop-filter: blur(16px);
  }

  .action-card .play-button {
    min-height: 50px;
  }

  .action-card .action-note {
    display: none;
  }

  .metrics-card {
    order: -1;
  }

  .content-card {
    padding: 20px;
  }

  .detail-facts {
    grid-template-columns: 1fr 1fr;
  }

  .friends-panel,
  .add-friend-panel,
  .profile-section {
    padding: 14px;
  }

  .friend-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .friend-row-copy {
    padding-top: 3px;
  }

  .friend-row-actions {
    width: 100%;
    padding-left: 49px;
  }

  .friend-row-actions .button {
    flex: 1;
  }

  .profile-cover {
    min-height: 300px;
  }

  .profile-identity {
    right: 18px;
    bottom: 20px;
    left: 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .profile-identity-copy h1 {
    max-width: 100%;
  }

  .avatar-large {
    width: 88px;
    height: 88px;
  }

  .global-stats {
    grid-template-columns: 1fr 1fr;
  }

  .game-progress-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .progress-art {
    width: 50px;
    height: 50px;
  }

  .game-progress-card > .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .avatar-options {
    grid-template-columns: repeat(4, 1fr);
  }

  .modal-card {
    max-height: calc(100dvh - 16px);
    padding: 24px 20px;
    border-radius: 20px;
  }

  .drawer-modal {
    width: 100vw;
  }

  .drawer-card {
    width: 100vw;
    padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    border-left: 0;
  }

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

  .wallet-card > p {
    text-align: left;
  }

  .coin-game-toggle {
    grid-template-columns: 88px minmax(0, 1fr) 14px;
  }

  .coin-game-total {
    display: none;
  }

  .coin-achievement-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .coin-achievement-toolbar .button {
    width: 100%;
  }

  .coin-package {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .coin-package .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 430px) {
  .page,
  .page-loader {
    width: calc(100% - 24px);
  }

  .game-card-body {
    padding: 14px;
  }

  .dashboard-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-summary > :last-child {
    grid-column: auto;
  }

  .settings-card {
    padding: 17px;
  }

  .settings-avatar-options {
    grid-template-columns: repeat(4, 1fr);
  }

  .future-card {
    padding: 16px;
  }

  .detail-title-overlay {
    right: 18px;
    bottom: 22px;
    left: 18px;
  }

  .detail-title-overlay h1 {
    font-size: 36px;
  }

  .detail-art .tower-defense-wordmark {
    top: 24px;
    right: 18px;
    width: min(56vw, 260px);
  }

  .coin-game-toggle {
    grid-template-columns: 78px minmax(0, 1fr) 12px;
    gap: 8px;
    padding: 11px;
  }

  .creator-support-form {
    grid-template-columns: 1fr 1fr;
  }

  .creator-support-form input {
    grid-column: 1 / -1;
  }

  .creator-support-form .button {
    width: 100%;
  }

  .creator-support-form button:nth-child(2):last-child {
    grid-column: 1 / -1;
  }

  .coin-achievement-drawer {
    padding: 10px;
  }

  .coin-achievement-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .coin-world-reward {
    justify-self: end;
  }

  .coin-world-claim,
  .coin-world-state {
    grid-column: 2 / -1;
    width: 100%;
    text-align: center;
  }

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

  .auth-gate {
    padding: 24px 18px;
  }

  .auth-gate-actions {
    flex-direction: column;
  }

  .avatar-options {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .game-card:hover {
    transform: none;
  }
}
