/* ==========================================================
   WizardXP — platform pages. Builds on the tokens in styles.css.
   ========================================================== */
:root { --panel-radius: 16px; --danger: #ff5a6e; --ok: #2fd47e; --warn: #ffb21e; }
:root[data-theme="dark"] { --input-bg: rgba(10, 16, 28, .9); --input-border: rgba(120, 150, 200, .25); --hover: rgba(127, 160, 220, .1); --menu-bg: #0b1220; }
:root[data-theme="light"] { --input-bg: #ffffff; --input-border: #d9e0ea; --hover: rgba(30, 90, 200, .07); --menu-bg: #ffffff; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--blue-2); color: #fff; font-weight: 600; }
.skip-link:focus { top: 12px; }
.view { min-height: 60vh; outline: none; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.prose { margin: 0; line-height: 1.65; color: var(--text-2); overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.ic-heart { fill: currentColor; }
:where(svg.ic:not([width])) { width: 20px; height: 20px; }   /* default size; component rules override */
h1:focus { outline: none; }

/* ---------------------------------------------------------- shell additions */
.topnav, .header-search, .account, .theme-btn { display: none; }
.header__login, .header__signup { height: 31px; padding: 0 14px; font-size: 13px; }
.header .icon-btn.bell { display: grid; }
.avatar {
  display: block; flex: none; max-width: none; aspect-ratio: 1;
  border-radius: 50%; object-fit: cover; background: #0b2a5a; filter: hue-rotate(var(--hue, 0deg));
}
.nav-avatar .avatar { width: 100%; height: 100%; }
.nav-avatar.is-active { transform: translateY(-1px); }

.account { position: relative; flex: none; }
.account__btn {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: 50%; box-shadow: 0 0 0 2px var(--blue-2); transition: box-shadow .2s;
}
.account__btn .avatar { width: 36px; height: 36px; }
.account__btn:hover { box-shadow: 0 0 0 2px var(--blue-1), 0 0 12px rgba(var(--a1-rgb), .5); }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: 240px; padding: 8px;
  border-radius: 14px; background: var(--menu-bg); border: 1px solid var(--card-border); box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  animation: fadeUp .2s var(--ease);
}
.menu__head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--card-border); }
.menu__head div { display: flex; flex-direction: column; min-width: 0; }
.menu__head span { font-size: 12.5px; color: var(--text-3); }
.menu a, .menu button[role="menuitem"] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; font-size: 14px; font-weight: 500; text-align: left; }
.menu a:hover, .menu button[role="menuitem"]:hover, .menu a:focus-visible { background: var(--hover); }
.menu .ic { width: 18px; height: 18px; color: var(--text-3); }
.menu-toggle span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.menu .menu-toggle { margin: 4px 0; padding: 10px; border-top: 1px solid var(--card-border); font-size: 14px; font-weight: 500; }

.drawer { overflow-y: auto; }
.drawer__head { position: relative; }
.drawer__close { margin-left: auto; }
.drawer__user { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px; margin-bottom: 8px; border-radius: 12px; background: var(--hover); }
.drawer__user .avatar { width: 44px; height: 44px; }
.drawer__user span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.drawer__user strong, .drawer__user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__user small { color: var(--text-3); }
.drawer__search { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 0 12px; height: 42px; border-radius: 12px; background: var(--input-bg); border: 1px solid var(--input-border); }
.drawer__search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; }
.drawer__link { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font-size: 15px; }
.drawer__link .ic { width: 20px; height: 20px; color: var(--accent-text); }
.drawer__link .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--blue-2); color: #fff; font-size: 12px; text-align: center; }
.drawer__auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

@media (min-width: 1024px) {
  .app { max-width: 1200px; padding-bottom: 48px; }
  .header { gap: 20px; }
  .header__menu, .bottom-nav { display: none; }
  .topnav { position: relative; display: flex; flex: none; gap: 4px; margin-left: 16px; }
  .topnav a { position: relative; z-index: 1; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--text-2); transition: color .25s; }
  .topnav a:hover { color: var(--text); }
  .topnav a.is-active { color: var(--accent-text); font-weight: 700; }
  /* Sliding pixel-corner brackets (not the usual pill/underline) */
  .topnav-pill {
    position: absolute; z-index: 0; top: 0; left: 0; height: 100%; width: 0;
    border-radius: 0; pointer-events: none; opacity: 0;
    background:
      linear-gradient(var(--blue-2), var(--blue-2)) 0 0 / 7px 2px no-repeat,
      linear-gradient(var(--blue-2), var(--blue-2)) 0 0 / 2px 7px no-repeat,
      linear-gradient(var(--blue-2), var(--blue-2)) 100% 0 / 7px 2px no-repeat,
      linear-gradient(var(--blue-2), var(--blue-2)) 100% 0 / 2px 7px no-repeat,
      linear-gradient(var(--blue-2), var(--blue-2)) 0 100% / 7px 2px no-repeat,
      linear-gradient(var(--blue-2), var(--blue-2)) 0 100% / 2px 7px no-repeat,
      linear-gradient(var(--blue-2), var(--blue-2)) 100% 100% / 7px 2px no-repeat,
      linear-gradient(var(--blue-2), var(--blue-2)) 100% 100% / 2px 7px no-repeat;
    filter: drop-shadow(0 0 5px rgba(var(--a2-rgb), .45));
    transition: transform .4s cubic-bezier(.3, 1.25, .4, 1), width .4s cubic-bezier(.3, 1.25, .4, 1), opacity .2s;
  }
  .topnav-pill.is-on { opacity: 1; }
  @media (prefers-reduced-motion: reduce) {
    .topnav-pill { transition: opacity .15s; }
  }
  .header-search { position: relative; display: flex; align-items: center; gap: 8px; flex: 0 1 240px; height: 38px; margin-left: auto; padding: 0 12px; border-radius: 12px; background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text-3); transition: border-color .2s, box-shadow .2s; }
  .header-search:focus-within { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(var(--a2-rgb), .2); z-index: 40; }
  .header-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; outline: none; }
  .search-suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 280px; z-index: 50;
    padding: 6px; border-radius: 12px; background: var(--menu-bg); border: 1px solid var(--card-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35); display: grid; gap: 2px;
  }
  .search-suggest[hidden] { display: none; }
  .search-suggest__item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
    color: var(--text); text-align: left;
  }
  .search-suggest__item:hover, .search-suggest__item:focus-visible { background: var(--hover); outline: none; }
  .search-suggest__icon { flex: none; width: 28px; height: 28px; border-radius: 6px; object-fit: cover; display: grid; place-items: center; background: rgba(var(--a2-rgb), .12); color: var(--accent-text); }
  .search-suggest__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; gap: 2px; }
  .search-suggest__text strong { font-size: 13.5px; font-weight: 650; }
  .search-suggest__text small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search-suggest__more {
    display: block; margin-top: 2px; padding: 8px 10px; border-radius: 8px;
    font-size: 12.5px; font-weight: 600; color: var(--accent-text); text-align: center;
  }
  .search-suggest__more:hover { background: var(--hover); }
  .search-suggest__empty { padding: 14px 10px; font-size: 13px; color: var(--text-3); text-align: center; }
  .header__right { margin-left: 0; }
  .account, .theme-btn { display: inline-flex; }
}

/* ---------------------------------------------------------- page scaffolding */
.page { padding: 8px var(--gutter) 24px; animation: fadeUp .5s var(--ease) both; }
.page--narrow { max-width: 780px; margin-inline: auto; }
.page-head { margin: 8px 0 18px; }
.page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title { margin: 0; font-size: clamp(26px, 7vw, 38px); font-weight: 800; letter-spacing: -.8px; line-height: 1.1; }
.page-title--sm { font-size: clamp(22px, 5.5vw, 28px); letter-spacing: -.4px; }
.page-sub { margin: 6px 0 0; color: var(--text-3); font-size: 14.5px; }
.page-sub a, .muted a, .login-prompt a, .auth-card__foot a, .form-row-end a, .prose a { color: var(--accent-text); font-weight: 600; }
.crumbs { display: flex; align-items: center; gap: 6px; margin: 4px 0 14px; font-size: 13px; color: var(--text-3); }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel { border-radius: var(--panel-radius); background: var(--card-bg); border: 1px solid var(--card-border); box-shadow: var(--card-shadow); }
.section { padding: 16px; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.section-title .ic { width: 20px; height: 20px; color: var(--accent-text); }
.sub-title { margin: 16px 0 6px; font-size: 15px; }
.section-head--tight { margin: 0 0 10px; }
.section-head__icon--line { width: 24px; height: 24px; color: var(--accent-text); filter: drop-shadow(0 0 6px rgba(var(--a1-rgb), .4)); }
.stack { display: grid; gap: 12px; }
.stack--tight { gap: 8px; margin-bottom: 12px; }
.home-sec { margin-top: 8px; }
.home-sec > .section-head { margin-inline: 0; }
.home .home-sec { margin-inline: var(--gutter); }
.home-split { display: grid; gap: 8px; }
.two-col { display: grid; gap: 16px; }
.col-side .section { position: static; }
.result-count { margin: 4px 2px 10px; font-size: 13px; color: var(--text-3); }
.load-more { display: flex; justify-content: center; margin-top: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.details { display: grid; gap: 10px; margin: 0; }
.details div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 14px; }
.details dt { color: var(--text-3); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.details dd a { color: var(--accent-text); }
.notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: rgba(255, 178, 30, .1); border: 1px solid rgba(255, 178, 30, .35); color: var(--text-2); }
.notice .ic { width: 20px; height: 20px; color: var(--warn); flex: none; }

@media (min-width: 768px) {
  .page { padding: 12px 8px 32px; }
  .home .home-sec { margin-inline: 0; }
  .section { padding: 20px 22px; }
}
@media (min-width: 1024px) {
  .two-col { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .col-side { position: sticky; top: 16px; }
  .home-split { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ---------------------------------------------------------- game grid / cards */
.game-card { border-color: var(--accent, var(--game-border)); }
[data-theme="dark"] .game-card {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, var(--blue-mid)) 25%, transparent), 0 0 18px color-mix(in srgb, var(--accent, var(--blue-mid)) 50%, transparent), inset 0 0 16px color-mix(in srgb, var(--accent, var(--blue-mid)) 30%, transparent);
}
[data-theme="dark"] .game-card:hover {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, var(--blue-mid)) 45%, transparent), 0 0 28px color-mix(in srgb, var(--accent, var(--blue-mid)) 75%, transparent), inset 0 0 20px color-mix(in srgb, var(--accent, var(--blue-mid)) 40%, transparent);
}
.game-card__title a { color: inherit; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.game-card .btn--play, .game-card .tag { position: relative; z-index: 1; }
.stats__star--empty { color: var(--text-3); filter: none; }
.game-grid { display: grid; gap: 14px; }
.game-list--compact .game-card { min-height: 130px; }
@media (min-width: 640px) { .game-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------- toolbar / filters / tabs */
.toolbar { display: grid; gap: 12px; padding: 12px; margin-bottom: 14px; }
.toolbar__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-field { position: relative; }
.search-field > .ic { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-field .input { padding-left: 40px; }
.select-wrap { flex: 1 1 160px; }
.select-wrap--sm { flex: 0 1 200px; }
.select-wrap--sm .input { height: 36px; font-size: 13.5px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn, .chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: var(--tag-bg); color: var(--tag-text); border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s;
}
.chip { height: 24px; padding: 0 10px; font-size: 12px; }
.chip .ic { width: 14px; height: 14px; }
.chip--game { margin: 0 0 8px; color: var(--accent-text); --pad-cut: var(--tag-bg); }
.chip-btn:hover { border-color: var(--blue-2); }
.chip-btn.is-on { background: var(--blue-2); color: #fff; box-shadow: 0 0 12px rgba(var(--a2-rgb), .35); }
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--tag-bg); width: max-content; max-width: 100%; }
.tabs--scroll { overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; height: 32px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-3); transition: background .2s, color .2s; }
.tab:hover { color: var(--text); }
.tab.is-on { background: var(--btn-grad); color: #fff; box-shadow: 0 2px 10px rgba(var(--a2-rgb), .35); }
.toolbar .tabs { margin: 0; }
.feed-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 16px 0 12px; }
.feed-bar .tabs { margin: 0; }

/* ---------------------------------------------------------- forms */
.form { display: grid; gap: 12px; }
.form--inline { grid-template-columns: 1fr auto; align-items: start; }
.form--inline .btn { margin-top: 23px; }
.form--inline .form-status { grid-column: 1 / -1; }
.field { position: relative; display: grid; gap: 6px; min-width: 0; }
.type-pop {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  translate: -50% -50%;
  /* 11x11 pixel burst (6 frames) at 2x, centred on the caret */
  width: 22px;
  height: 22px;
  background: url(/assets/ui/anims/type_burst.png) 0 0 / 600% 100% no-repeat;
  image-rendering: pixelated;
  animation: typeBurst .3s steps(6, jump-none) forwards;
}
.type-pop--erase { background-image: url(/assets/ui/anims/type_erase.png); }
@keyframes typeBurst { to { background-position: 100% 0; } }
.auth-card .input { caret-color: var(--blue-2); }
@media (prefers-reduced-motion: reduce) {
  .type-pop { display: none; }
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field__label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field__hint { margin: 0; font-size: 12.5px; color: var(--text-3); }
.field__error { margin: 0; min-height: 0; font-size: 12.5px; color: var(--danger); }
.field__error:empty { display: none; }
.input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 12px; font: inherit; font-size: 14.5px; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--input-border); transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: right 16px center, right 11px center; background-size: 5px 5px; background-repeat: no-repeat; }
.input::placeholder { color: var(--text-3); opacity: .8; }
.input:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(var(--a2-rgb), .2); }
.input[aria-invalid] { border-color: var(--danger); }
.form-status { margin: 0; font-size: 13.5px; }
.form-status:empty { display: none; }
.form-status--error { color: var(--danger); }
.form-status--ok { color: var(--ok); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.form-row-end { margin: -4px 0 0; text-align: right; font-size: 13px; }

/* ---------------------------------------------------------- buttons */
.btn--sm { height: 34px; padding: 0 14px; gap: 6px; font-size: 13.5px; }
.btn--sm .ic { width: 16px; height: 16px; }
.btn--sm.btn--primary, .btn--sm.btn--danger { --lift: 3px; --lift-hover: 3px; }
.btn--block { width: 100%; }
.btn--ghost { --edge: transparent; --face: transparent; --ink: var(--text-2); }
.btn--ghost:hover { --edge: var(--hover); --face: var(--hover); --ink: var(--text); }
.btn--danger { --edge: #e5384f; --face: #e5384f; --ink: #fff; --ledge: #8f1f30; --lift: 4px; --lift-hover: 4px; --lift-press: 1px; }
.btn--danger:hover { --edge: #f0485e; --face: #f0485e; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn--outline.is-loading::after { border-color: rgba(var(--a2-rgb), .3); border-top-color: var(--blue-2); }
.link-btn { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.link-btn:hover { text-decoration: underline; }
.link-btn--danger { color: var(--danger); }
.icon-btn--sm { width: 30px; height: 30px; color: var(--text-3); }
.icon-btn--sm:hover { color: var(--danger); }

/* ---------------------------------------------------------- states */
.page-loading, .state--loading { display: grid; place-items: center; min-height: 160px; }
.page-loading { min-height: 50vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(var(--a2-rgb), .2); border-top-color: var(--blue-2); animation: spin .8s linear infinite; }
.state { display: grid; justify-items: center; gap: 8px; padding: 32px 16px; text-align: center; }
.state__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--hover); color: var(--accent-text); }
.state__icon .ic { width: 28px; height: 28px; }
.state--error .state__icon { color: var(--danger); }
.state__ok { color: var(--ok); }
.state__title { margin: 4px 0 0; font-size: 17px; }
.state__text { margin: 0 0 6px; max-width: 360px; color: var(--text-3); font-size: 14px; }
.skeletons { display: grid; gap: 12px; }
.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--tag-bg) 0%, var(--hover) 50%, var(--tag-bg) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton--row { height: 72px; }
.skeleton--card { height: 140px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--menu-bg); border: 1px solid var(--card-border); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-size: 14px; animation: fadeUp .3s var(--ease); transition: opacity .3s, transform .3s; }
.toast .ic { width: 20px; height: 20px; flex: none; color: var(--ok); }
.toast--error .ic { color: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
@media (min-width: 1024px) { .toasts { bottom: 24px; } }

.dialog { width: min(92vw, 420px); padding: 0; border: 1px solid var(--card-border); border-radius: 16px; background: var(--menu-bg); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.dialog::backdrop { background: rgba(0, 0, 0, .5); }
.dialog form { padding: 20px; }
.dialog__title { margin: 0 0 6px; font-size: 18px; }
.dialog__text { margin: 0; color: var(--text-3); font-size: 14px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dialog--crop { width: min(92vw, 340px); }
.crop__stage {
  position: relative; width: 260px; height: 260px; margin: 14px auto 0; overflow: hidden;
  border-radius: 50%; background: #0b0f18; touch-action: none; cursor: grab; user-select: none;
  box-shadow: inset 0 0 0 2px rgba(var(--a2-rgb), .45);
}
.crop__stage.is-dragging { cursor: grabbing; }
.crop__img { position: absolute; top: 0; left: 0; max-width: none !important; width: auto; height: auto; pointer-events: none; will-change: transform; }
.crop__mask { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); border-radius: 50%; }
.crop__zoom { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-size: 13px; color: var(--text-3); }
.crop__zoom input { flex: 1; accent-color: var(--blue-2); }

/* ---------------------------------------------------------- posts, reactions, comments */
.post { padding: 14px 16px; }
.post__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.post__author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post__author > span { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; min-width: 0; }
.post__author small { flex-basis: 100%; color: var(--text-3); font-size: 12.5px; }
.role { padding: 1px 7px; border-radius: 999px; background: var(--blue-2); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; }
.post__body { margin: 0 0 12px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
.post__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.post__comments { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
a.post__comments:hover { color: var(--accent-text); }
.reactions { display: flex; flex-wrap: wrap; gap: 6px; }
.react { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border-radius: 999px; font-size: 13px; color: var(--text-2); background: var(--tag-bg); border: 1px solid transparent; transition: transform .15s, border-color .2s, background .2s, color .2s; }
.react:hover { border-color: var(--blue-2); color: var(--text); }
.react:active { transform: scale(.92); }
.react.is-on { background: rgba(var(--a2-rgb), .18); border-color: var(--blue-2); color: var(--accent-text); }
.react__icon { flex: none; fill: currentColor; }
.react__n { min-width: 6px; font-weight: 600; color: inherit; }
.login-prompt { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 12px 14px; font-size: 14px; color: var(--text-3); }
.login-prompt .ic { width: 18px; height: 18px; }
.post-composer, .composer { display: flex; gap: 10px; align-items: flex-start; }
.post-composer { padding: 14px; }
.composer { margin-bottom: 14px; }
.composer__main { display: grid; gap: 8px; flex: 1; min-width: 0; }
.composer__actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-composer .composer__actions { justify-content: space-between; }
.comments { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.comments--replies { margin-top: 12px; padding-left: 4px; border-left: 2px solid var(--card-border); padding-inline-start: 12px; }
.comment { display: flex; gap: 10px; }
.comment__main { flex: 1; min-width: 0; }
.comment__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.comment__time { font-size: 12px; color: var(--text-3); }
.comment__body { margin: 4px 0 8px; font-size: 14px; line-height: 1.55; color: var(--text-2); overflow-wrap: anywhere; }
.comment__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.comment__actions .react { height: 24px; padding: 0 7px; font-size: 12px; }
.composer--reply { margin: 10px 0 0; }

/* ---------------------------------------------------------- requests */
.request { display: flex; gap: 12px; padding: 14px; }
.request__main { flex: 1; min-width: 0; }
.request__top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.request__title { margin: 0 0 4px; font-size: 16px; }
.request__title a:hover { color: var(--accent-text); }
.request__desc { margin: 0 0 6px; font-size: 13.5px; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.request__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0; font-size: 12.5px; color: var(--text-3); }
.request__meta a { color: var(--accent-text); }
.request__meta .ic { width: 14px; height: 14px; }
.vote { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex: none; width: 52px; height: 58px; border-radius: 12px; background: var(--tag-bg); border: 1px solid var(--card-border); color: var(--text-2); transition: border-color .2s, background .2s, transform .15s; }
.vote:hover { border-color: var(--blue-2); }
.vote:active { transform: scale(.94); }
.vote.is-on { background: rgba(var(--a2-rgb), .16); border-color: var(--blue-2); color: var(--accent-text); box-shadow: 0 0 12px rgba(var(--a2-rgb), .3); }
.vote__n { font-weight: 700; font-size: 14px; }
.status { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; }
.status--pending { background: rgba(160, 170, 190, .18); color: var(--text-2); }
.status--under_review { background: rgba(255, 178, 30, .16); color: #e59a00; }
.status--approved { background: rgba(47, 212, 126, .16); color: #1fb868; }
.status--rejected { background: rgba(255, 90, 110, .15); color: var(--danger); }
.status--released { background: rgba(var(--a2-rgb), .18); color: var(--accent-text); }
.dupes:empty { display: none; }
.dupes { padding: 10px 12px; border-radius: 12px; font-size: 13px; background: rgba(255, 178, 30, .1); border: 1px solid rgba(255, 178, 30, .3); }
.dupes__title { margin: 0 0 6px; font-weight: 600; }
.dupes ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dupes li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dupes a { color: var(--accent-text); font-weight: 600; }
.request-detail__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.inline-user { display: inline-flex; align-items: center; gap: 6px; }
.timeline { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 6px; padding: 0; list-style: none; counter-reset: step; }
.timeline li { flex: 1 1 100px; position: relative; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; text-align: center; background: var(--tag-bg); color: var(--text-3); }
.timeline li.is-done { background: rgba(var(--a2-rgb), .14); color: var(--accent-text); }
.timeline li.is-current { box-shadow: inset 0 0 0 1.5px var(--blue-2); }
.timeline li.is-rejected { background: rgba(255, 90, 110, .14); color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }

/* ---------------------------------------------------------- game page */
.game-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; margin-bottom: 16px; border-radius: 20px; border: 1.5px solid var(--accent); }
[data-theme="dark"] .game-hero { box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.game-hero__banner { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.game-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--game-overlay); }
.game-hero__content { display: grid; gap: 10px; justify-items: start; padding: 18px; width: 100%; }
.game-hero__content .crumbs { margin: 0; }
.game-hero__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(30px, 8vw, 48px); font-weight: 800; letter-spacing: -1px; }
.game-hero__logo { width: 40px; height: 40px; flex: none; color: var(--text); }
.game-hero__tagline { margin: 0; max-width: 520px; color: var(--text-2); font-size: 15px; }
.game-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.game-hero__cta .btn { height: 44px; padding: 0 20px; }
.game-hero .tag:hover { background: var(--blue-2); color: #fff; }
.btn--offline { display: none; }
.btn--offline__main { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.btn--offline__price {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding-left: 14px;
  border-left: 1px solid color-mix(in srgb, var(--blue-2) 45%, transparent);
  font-size: 15px; font-weight: 700; color: var(--text);
}

.btn--offline__price strong { letter-spacing: -.2px; }
.game-tabs { display: none; }
.game-overview-details { display: none; }
.game-layout { display: grid; gap: 0 16px; }
@media (max-width: 1023px) {
  .game-page { padding-bottom: 8px; }
  .game-hero { margin-bottom: 12px; border-radius: 16px; }
  .game-hero__cta { display: grid; width: 100%; gap: 10px; }
  .game-hero__cta > .btn { width: 100%; justify-content: center; }
  .game-hero__discuss { display: none; }
  .btn--offline {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; height: 48px; padding: 0 16px; border-width: 1.5px;
  }
  .btn--offline--owned { justify-content: center; }
  .game-shots { display: none; }
  .game-tabs {
    display: flex; position: sticky; top: 0; z-index: 12;
    margin: 0 calc(var(--gutter) * -1) 12px; padding: 0 var(--gutter);
    background: var(--bg);
    border-bottom: 1px solid var(--card-border);
  }
  .game-tabs__btn {
    flex: 1; height: 44px; padding: 0 8px;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    font-size: 14px; font-weight: 600; color: var(--text-3);
    transition: color .2s, border-color .2s;
  }
  .game-tabs__btn:hover { color: var(--text); }
  .game-tabs__btn.is-on { color: var(--text); border-bottom-color: var(--blue-2); }
  .game-overview-details { display: block; }
  .game-side-details { display: none; }
  .game-side { display: none; }
  .game-layout { gap: 0; }
  .game-block[hidden] { display: none !important; }
  .game-page .section { padding: 14px; margin-bottom: 10px; }
  .game-page .section-title { margin-bottom: 10px; font-size: 16px; }
  .game-page .details--compact { gap: 8px; }
  .game-page .details--compact div { grid-template-columns: 96px 1fr; gap: 8px; font-size: 13.5px; }
  .game-page .rating-summary { gap: 14px; margin-bottom: 12px; }
  .game-page .review-form { margin-bottom: 12px; padding: 12px; }
  .game-page .home-sec { margin-top: 8px; padding-bottom: 8px; }
}
@media (min-width: 1024px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .game-side { position: sticky; top: 16px; }
  .game-hero { min-height: 380px; }
  .game-hero__content { padding: 28px; }
  .game-tabs { display: none !important; }
  .game-overview-details { display: none !important; }
  .game-side-details { display: contents; }
  .game-block[hidden] { display: revert !important; }
}
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.stars { display: inline-flex; gap: 2px; }
.stars .ic { width: 16px; height: 16px; color: var(--text-3); opacity: .5; }
.stars .ic.is-on { color: var(--star); opacity: 1; }
.stars--sm .ic { width: 13px; height: 13px; }
.rating-summary { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-bottom: 16px; }
.rating-summary__score { display: grid; justify-items: center; gap: 4px; min-width: 96px; }
.rating-summary__score strong { font-size: 40px; line-height: 1; }
.bars { display: grid; gap: 4px; }
.bar { display: grid; grid-template-columns: 10px 14px 1fr 28px; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.bar .ic { width: 12px; height: 12px; color: var(--star); }
.bar__track { height: 7px; border-radius: 999px; background: var(--tag-bg); overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: inherit; background: var(--gold-grad); }
.bar__n { text-align: right; }
.review-form { display: grid; gap: 10px; margin-bottom: 18px; padding: 14px; border-radius: 14px; background: var(--hover); }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin: 0; padding: 0; border: 0; }
.star-input legend { float: left; width: 100%; margin-bottom: 4px; font-size: 13.5px; font-weight: 600; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; padding: 2px; }
.star-input label .ic { width: 28px; height: 28px; color: var(--text-3); opacity: .45; transition: color .15s, opacity .15s, transform .15s; }
.star-input label:hover .ic, .star-input label:hover ~ label .ic, .star-input input:checked ~ label .ic { color: var(--star); opacity: 1; }
.star-input label:hover .ic { transform: scale(1.15); }
.star-input input:focus-visible + label { outline: 2px solid var(--blue-2); border-radius: 6px; }
.reviews { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.review { display: flex; gap: 10px; }
.review__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.review__head .muted { font-size: 12px; }
.review__body { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-2); overflow-wrap: anywhere; }

/* ---------------------------------------------------------- store / support */
.balance { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px; margin-bottom: 8px; }
.balance__coin { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: rgba(255, 190, 30, .12); filter: drop-shadow(0 0 12px rgba(255, 190, 30, .35)); }
.balance__coin .coin {
  --coin-s: 44px;
  width: var(--coin-s);
  height: var(--coin-s);
  background: url('/assets/coin/anims/coin_shine.png') 0 0 / calc(var(--coin-s) * 8) var(--coin-s) no-repeat;
  animation: coinShineCard 1.6s steps(8) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .balance__coin .coin {
    animation: none;
    background: url('/assets/coin/sprites/coin.png') 0 0 / var(--coin-s) var(--coin-s) no-repeat;
  }
}
.balance__label { margin: 0; font-size: 13px; color: var(--text-3); }
.balance__value { margin: 2px 0; font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.balance__value span { font-size: 15px; font-weight: 600; color: var(--text-3); }
.balance__support { margin-left: auto; }
.tx-list { display: grid; margin: 0; padding: 0; list-style: none; }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--card-border); }
.tx:last-child { border-bottom: 0; }
.tx__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(47, 212, 126, .14); color: var(--ok); flex: none; }
.tx__icon .ic { width: 16px; height: 16px; }
.tx__icon--support, .tx__icon--spend { background: rgba(var(--a2-rgb), .14); color: var(--accent-text); }
.tx__main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tx__main small { color: var(--text-3); font-size: 12px; text-transform: capitalize; }
.tx__amount { font-weight: 800; }
.tx__amount.is-pos { color: var(--ok); }
.tx__amount.is-neg { color: var(--text-2); }
.coin-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.support-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .support-grid { grid-template-columns: 1fr 1fr; align-items: stretch; }
}
.support-opt {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  row-gap: 12px;
  align-items: start;
  padding: 18px;
  min-height: 148px;
}
.support-opt__icon {
  grid-row: 1;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--hover);
  color: var(--accent-text);
}
.support-opt__icon .ic { width: 22px; height: 22px; }
.support-opt__icon .coin {
  --coin-s: 24px;
  width: var(--coin-s);
  height: var(--coin-s);
  background: url('/assets/coin/anims/coin_shine.png') 0 0 / calc(var(--coin-s) * 8) var(--coin-s) no-repeat;
  animation: coinShineCard 1.6s steps(8) infinite;
}
.support-opt__body { grid-row: 1; grid-column: 2; min-width: 0; }
.support-opt__title { margin: 0 0 4px; font-size: 17px; line-height: 1.25; }
.support-opt__text { margin: 0; font-size: 14px; line-height: 1.4; color: var(--text-3); }
.support-opt__action {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  display: flex;
  align-items: center;
  min-height: 36px;
}
.support-opt--tip {
  grid-template-columns: 44px 1fr;
  margin-bottom: 12px;
  min-height: 0;
}
.support-opt--tip .support-opt__action { display: block; width: 100%; }
.support-tip { gap: 10px; width: 100%; }
.support-tip__bal { margin: 0; }
.support-tip__row {
  display: grid;
  grid-template-columns: minmax(0, 140px) auto;
  gap: 10px;
  align-items: end;
}
.support-tip__row .field { margin: 0; }
.support-tip__row .btn { height: 40px; }

/* ---------------------------------------------------------- profile */
.profile-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px; margin-bottom: 12px; }
.profile-card__avatar .avatar { width: 84px; height: 84px; box-shadow: var(--avatar-ring); }
.profile-card__main { min-width: 0; }
.profile-card__main .muted { margin: 4px 0 0; font-size: 13.5px; }
.profile-card__bio { margin: 8px 0 0; color: var(--text-2); overflow-wrap: anywhere; }
.profile-card__side { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-3); }
.profile-stats strong { color: var(--text); }
@media (min-width: 768px) { .profile-card { grid-template-columns: auto 1fr auto; padding: 24px; } .profile-card__side { grid-column: auto; flex-direction: column; align-items: flex-end; } .profile-card__avatar .avatar { width: 104px; height: 104px; } }
.account-info { padding: 14px 18px; margin-bottom: 14px; }
.details--row { grid-template-columns: 1fr; }
@media (min-width: 768px) { .details--row { grid-template-columns: repeat(3, 1fr); } .details--row div { grid-template-columns: 1fr; gap: 2px; } }
.achievements { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.achievement { display: flex; align-items: center; gap: 12px; padding: 12px; opacity: .55; }
.achievement.is-earned { opacity: 1; border-color: rgba(255, 190, 30, .4); }
.achievement span:last-child { display: flex; flex-direction: column; }
.achievement small { color: var(--text-3); font-size: 12.5px; }
.achievement__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--hover); color: var(--text-3); flex: none; }
.achievement.is-earned .achievement__icon { background: rgba(255, 190, 30, .15); color: #f5b301; }
.activity { display: grid; margin: 0; padding: 6px 14px; list-style: none; }
.activity li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--card-border); font-size: 14px; }
.activity li:last-child { border-bottom: 0; }
.activity a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity a:hover { color: var(--accent-text); }
.activity__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--hover); color: var(--accent-text); flex: none; }
.activity__icon .ic { width: 16px; height: 16px; }
.avatar--photo { filter: none; background: #1a1224; object-fit: cover; }
.avatar-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar-upload__preview .avatar { width: 72px; height: 72px; box-shadow: 0 0 0 2px rgba(var(--a2-rgb), .45); }
.avatar-upload__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.avatar-upload__btn { cursor: pointer; }
.avatar-upload__btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; padding: 0; border: 0; }
.avatar-pick[hidden] { display: none; }
.avatar-pick legend { margin-bottom: 8px; width: 100%; }
.avatar-pick__item { position: relative; cursor: pointer; border-radius: 50%; }
.avatar-pick__item input { position: absolute; opacity: 0; }
.avatar-pick__item .avatar { transition: box-shadow .2s, transform .2s; }
.avatar-pick__item:hover .avatar { transform: scale(1.06); }
.avatar-pick__item input:checked + .avatar { box-shadow: 0 0 0 3px var(--blue-2), 0 0 14px rgba(var(--a2-rgb), .6); }
.avatar-pick__item input:focus-visible + .avatar { outline: 2px solid var(--blue-1); outline-offset: 3px; }

/* ---------------------------------------------------------- notifications */
.notifs { display: grid; margin: 0 0 14px; padding: 6px; list-style: none; }
.notif { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px; border-radius: 12px; text-align: left; transition: background .2s; }
.notif:hover { background: var(--hover); }
.notif.is-unread { background: rgba(var(--a2-rgb), .08); }
.notif__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--hover); color: var(--accent-text); flex: none; }
.notif__icon .ic { width: 18px; height: 18px; }
.notif__icon--reaction { color: #ff6b9a; }
.notif__icon--reaction .ic { fill: currentColor; }
.notif__icon--request_status { color: #f5b301; }
.notif__main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 14px; }
.notif__main span { color: var(--text-3); overflow-wrap: anywhere; }
.notif__main small { color: var(--text-3); font-size: 12px; }
.notif__dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 8px var(--blue-2); flex: none; }

/* ---------------------------------------------------------- auth */
.auth-page { display: grid; place-items: center; min-height: 65vh; }
.auth-card { display: grid; gap: 12px; width: 100%; max-width: 420px; padding: 24px 20px; }
.auth-card__brand { justify-self: start; margin-bottom: 6px; }
.auth-card .muted { margin: -4px 0 4px; font-size: 14px; }
.auth-card__foot { margin: 4px 0 0; text-align: center; font-size: 14px; color: var(--text-3); }
@media (min-width: 768px) { .auth-card { padding: 32px; } }

/* ---------------------------------------------------------- social sign-in */
.soon { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: auto; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; background: rgba(255, 178, 30, .16); color: #e59a00; flex: none; }
.social { display: grid; gap: 10px; }
.btn--social { --edge: var(--input-border); --face: var(--input-bg); --ink: var(--text); height: 44px; justify-content: flex-start; gap: 12px; padding: 0 16px; font-size: 14.5px; }
.btn--social:hover:not(:disabled) { --edge: var(--blue-2); }
.btn--social:disabled { transform: none; }
/* Google: white pixel block + brand mark (official light button look) */
.btn--social.btn--google {
  --edge: #c6c9ce;
  --face: #fff;
  --ink: #3c4043;
  --ledge: transparent;
}
.btn--social.btn--google:hover:not(:disabled) { --edge: #b0b3b8; --face: #f8f9fa; }
.btn--social.btn--google:disabled { opacity: .85; }
.btn--social.btn--google .soon { background: rgba(234, 126, 0, .14); color: #c26400; }
.btn--social.btn--discord .ic {
  color: #fff;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .45));
  opacity: 1;
}
.btn--social:disabled { opacity: .7; }
.btn--social:disabled .soon { margin-left: auto; }
.divider { display: flex; align-items: center; gap: 12px; margin: 2px 0; font-size: 12.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--card-border); }
.connections { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.connection { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--hover); }
.connection__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--input-bg); flex: none; }
.connection__icon--discord { color: #5865f2; }
.connection__main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.connection__main small { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------- payments */
.pay-steps { display: grid; gap: 12px; margin: 0; padding-left: 20px; font-size: 14px; }
.copy-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.copy-row--inline { display: inline-flex; margin: 0 0 0 4px; }
.copy-row code { flex: 1; min-width: 0; }
code { padding: 6px 10px; border-radius: 8px; background: var(--hover); border: 1px solid var(--card-border); font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.break { overflow-wrap: anywhere; word-break: break-all; }
.orders { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.order { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px; border-radius: 12px; background: var(--hover); }
.order__main { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.order__main small { color: var(--text-3); font-size: 12.5px; }
.order__main small a { color: var(--accent-text); }
.order__actions { display: flex; gap: 6px; }
.checkout form { padding: 0; }

/* ---------------------------------------------------------- site banner */
.site-banner { display: flex; align-items: center; gap: 10px; margin: 8px var(--gutter) 0; padding: 8px 8px 8px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: #fff; background: var(--btn-grad); box-shadow: 0 4px 16px rgba(var(--a2-rgb), .35); }
.site-banner > a, .site-banner > span { flex: 1; min-width: 0; }
.site-banner a:hover { text-decoration: underline; }
.site-banner .icon-btn { color: #fff; }
.site-banner .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .15); }
@media (min-width: 768px) { .site-banner { margin: 10px 8px 0; } }
.notice--link { color: var(--text); font-weight: 600; transition: border-color .2s; }
.notice--link:hover { border-color: var(--warn); }

/* ==========================================================
   Page transitions (see js/core/router.js)
   ========================================================== */
.page { animation: none; }                                    /* the swap animation below replaces it */
.view { transition: opacity .2s var(--ease); }
.view.is-loading { opacity: .55; pointer-events: none; }
.view-page.is-entering { animation: pageIn .32s var(--ease) both; }
.view-page.is-entering-auth-fwd { animation: authPageInFwd .38s var(--ease) both; }
.view-page.is-entering-auth-back { animation: authPageInBack .38s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes authPageInFwd { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes authPageInBack { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }

.route-bar {
  position: fixed; z-index: 95; top: 0; left: 0; height: 3px; width: 0; opacity: 0; pointer-events: none;
  background: var(--brand-grad); box-shadow: 0 0 10px rgba(var(--a2-rgb), .8); border-radius: 0 3px 3px 0;
}
.route-bar.is-active { opacity: 1; width: 82%; transition: width 2.5s cubic-bezier(.1, .7, .2, 1), opacity .1s; }
.route-bar.is-done { width: 100%; opacity: 0; transition: width .18s ease-out, opacity .3s .15s; }

/* ==========================================================
   Interactive polish: gradual hover / press / focus everywhere
   ========================================================== */
.btn--outline:hover { --edge: var(--blue-1); }
.btn.btn--outline.btn--discord:hover { --edge: #5865f2; }
.btn .ic { transition: transform .25s var(--ease); }
.btn--primary:hover .ic:first-child, .btn--play:hover .ic { transform: translateX(2px) scale(1.08); }
a, .link-btn, .menu a, .menu button, .drawer__link, .chip, .tag, .status, .crumbs a, .post__comments, .request__title a {
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}
.link-btn { transition: color .2s, opacity .2s; }
.link-btn:hover { opacity: .85; }
.icon-btn { transition: transform .2s var(--ease), background-color .2s, color .2s; }
.icon-btn:hover { transform: scale(1.08); }
.icon-btn:active { transform: scale(.92); }
.drawer__link:hover .ic, .menu a:hover .ic,
.drawer__link:hover .coin, .menu a:hover .coin { transform: translateX(2px); }
.drawer__link .ic, .menu a .ic,
.drawer__link .coin, .menu a .coin { transition: transform .22s var(--ease), color .2s; }
.icon-btn.bell:hover,
.icon-btn.bell:active { transform: none; }
.brand__mark { transition: transform .35s var(--ease), filter .3s; }
.brand:hover .brand__mark { transform: translateY(-2px) rotate(-4deg); filter: drop-shadow(0 0 10px rgba(var(--a1-rgb), .7)); }
.panel { transition: border-color .25s var(--ease), box-shadow .3s var(--ease), transform .25s var(--ease); }
a.panel:hover, .post:hover, .request:hover, .support-opt:hover, .stat:hover, .achievement.is-earned:hover {
  border-color: rgba(var(--a2-rgb), .4);
}
.support-opt:hover, .stat:hover { transform: translateY(-3px); box-shadow: var(--card-shadow), 0 10px 26px rgba(var(--a2-rgb), .18); }
.tab, .chip-btn, .preset, .vote, .react, .notif, .avatar-pick__item .avatar, .account__btn, .nav-avatar {
  transition-duration: .22s; transition-timing-function: var(--ease);
}
.tab:active, .chip-btn:active { transform: scale(.95); }
.chip-btn { transition: background-color .22s var(--ease), border-color .22s var(--ease), color .22s, box-shadow .25s, transform .15s; }
.tab { transition: background .22s var(--ease), color .22s, box-shadow .25s, transform .15s; }
.topnav a { position: relative; transition: color .2s, background-color .2s, box-shadow .25s; }
.avatar { transition: transform .25s var(--ease), box-shadow .25s; }
a:hover > .avatar { transform: scale(1.05); }
.input { transition: border-color .2s, box-shadow .25s var(--ease), background-color .2s; }
.input:hover:not(:focus) { border-color: rgba(var(--a2-rgb), .5); }
:focus-visible { transition: outline-offset .15s; }

/* ==========================================================
   Account pages: login, register, forgot / reset password, verify email
   Mobile: quiet vertical composition. Desktop (≥860px): unchanged two-column.
   ========================================================== */
.auth-page {
  display: grid; justify-items: center; align-content: start;
  min-height: 0;
  padding-block: 8px 24px;
}
.auth {
  display: grid; width: 100%; max-width: 400px; overflow: hidden;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}
.auth__showcase {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 1fr; justify-items: center; align-content: center;
  gap: 12px; padding: 24px 20px 16px; overflow: hidden; color: #fff; text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(var(--a2-rgb), .2), transparent 70%),
    linear-gradient(180deg, #161022 0%, #0a0714 100%);
}
.auth__showcase::before,
.auth__showcase::after { content: none; display: none; }
.auth__stars {
  position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 22%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 16%, #e3d4ff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 36% 72%, #d2b4ff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 38%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 10% 84%, #c9b0ff 50%, transparent 51%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
.auth__hero { position: relative; display: grid; place-items: center; }
/* Wizard: face strip (18 frames, picked by --f) + a separate hands layer; JS sets --hx/--hy (-1..1)
   for the head tilt toward the mouse or caret (js/pages/auth.js). */
.auth__body { position: relative; z-index: 1; animation: wizardFloat 4.5s ease-in-out infinite; }
.auth__wizard {
  position: relative; width: clamp(104px, 30vw, 128px); aspect-ratio: 43 / 44; image-rendering: pixelated;
  background: url(/assets/brand/anims/wiz_face.png?v=3) no-repeat; background-size: 1800% 100%;
  background-position: calc(var(--f, 0) * 100% / 17) 0;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45));
  transform-origin: 50% 80%;
  transform: translate(calc(var(--hx, 0) * 3px), calc(var(--hy, 0) * 2px)) rotate(calc(var(--hx, 0) * 5deg));
  transition: transform .35s cubic-bezier(.25, .8, .3, 1);
}
.auth__hero.is-covered .auth__wizard { transform: none; }
.auth__arm {
  position: absolute; inset: 0; image-rendering: pixelated; pointer-events: none;
  background: center / 100% 100% no-repeat; opacity: 0;
  transition: transform .34s cubic-bezier(.5, 0, .7, .4), opacity .14s .2s;
}
.auth__arm--l { background-image: url(/assets/brand/sprites/wiz_arm_l.png); transform-origin: 20% 80%; transform: translateY(30%) rotate(14deg); }
.auth__arm--r { background-image: url(/assets/brand/sprites/wiz_arm_r.png); transform-origin: 80% 80%; transform: translateY(30%) rotate(-14deg); }
.auth__hero.is-covered .auth__arm {
  opacity: 1; transform: none;
  transition: transform .42s cubic-bezier(.2, 1.25, .35, 1), opacity .1s;
}
.auth__hero.is-covered .auth__arm--r { transition-delay: .04s; }
.auth__ring {
  position: absolute; bottom: -2px; width: 64%; height: 10px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--a2-rgb), .35), transparent);
  animation: ringPulse 4.5s ease-in-out infinite;
}
.auth__tagline {
  margin: 0; max-width: 20ch;
  font-size: clamp(17px, 4.6vw, 20px); font-weight: 700; line-height: 1.25; letter-spacing: -.3px;
  color: #f2f0f7;
}
.auth__tagline-grow { display: inline; }
.auth__tagline-grow > span {
  color: var(--blue-1);
  background: none; -webkit-background-clip: unset; background-clip: unset;
}
.auth__perks { display: none; margin: 0; padding: 0; list-style: none; }
.auth-card {
  display: grid; gap: 12px; width: 100%; max-width: none;
  padding: 20px 18px 22px; align-content: start;
  border-top: 1px solid var(--card-border);
  background: transparent;
}
.auth-card::before,
.auth-card::after { content: none; display: none; }
.auth-card .social { gap: 8px; }
.auth-card__brand { display: none; }
.auth-card .page-title {
  font-size: clamp(22px, 5.5vw, 26px); letter-spacing: -.4px; font-weight: 700;
}
.auth-card .muted { margin: -4px 0 2px; font-size: 14px; line-height: 1.45; }
.auth-card .input { height: 44px; font-size: 15px; }
.auth-card .input:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(var(--a2-rgb), .18);
}
.auth-card .btn--block { height: 44px; font-size: 15px; margin-top: 4px; }
.auth-card .btn--social { height: 44px; }
.auth-card__foot {
  margin: 2px 0 0; padding-top: 14px;
  border-top: 1px solid var(--card-border);
  text-align: center; font-size: 14px; color: var(--text-3);
}
.auth-card .state { padding: 12px 0; }
.field--pw { position: relative; }
.field--pw .input { padding-right: 62px; }
.pw-toggle {
  position: absolute; right: 6px; top: 27px; height: 34px; padding: 0 10px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; color: var(--accent-text);
  transition: background-color .2s, color .2s;
}
.auth-card .pw-toggle { top: 28px; }
.pw-toggle:hover { background: var(--hover); }
@keyframes wizardFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ringPulse { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(.88); opacity: .4; } }
@keyframes twinkle { from { opacity: .35; } to { opacity: .7; } }

@media (min-width: 860px) {
  .auth-page {
    place-items: center; align-content: center;
    min-height: calc(100vh - 220px);
    padding-block: 12px 28px;
  }
  .auth {
    grid-template-columns: 1fr 1.05fr; max-width: 940px; min-height: 560px; border-radius: 24px;
    border: 1px solid rgba(var(--a2-rgb), .3);
    box-shadow: var(--card-shadow), 0 0 0 1px rgba(var(--a2-rgb), .08), 0 24px 70px rgba(var(--a2-rgb), .18);
    /* one night-sky background across the whole card: the form side is transparent, so there is no middle seam */
    background:
      radial-gradient(60% 100% at 10% 0%, rgba(155, 92, 255, .55), transparent 60%),
      radial-gradient(45% 80% at 100% 100%, rgba(240, 140, 255, .22), transparent 60%),
      linear-gradient(160deg, #24104a, #0d0620 70%);
  }
  .auth__showcase {
    gap: 18px; padding: 40px 32px; text-align: center;
    background: none;
  }
  /* light theme: a soft daytime sky across the whole card (no seam), with dark text on the wizard side */
  [data-theme="light"] .auth {
    background:
      radial-gradient(60% 100% at 10% 0%, rgba(var(--a2-rgb), .22), transparent 60%),
      radial-gradient(45% 80% at 100% 100%, rgba(240, 140, 255, .12), transparent 60%),
      linear-gradient(160deg, #f1e9ff 0%, #ffffff 65%);
  }
  [data-theme="light"] .auth__showcase { color: #1d1233; }
  [data-theme="light"] .auth__stars { opacity: 0; }
  [data-theme="light"] .auth__tagline { color: #1d1233; }
  [data-theme="light"] .auth__tagline-grow > span { background: linear-gradient(90deg, #b04cff, #6a2cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
  [data-theme="light"] .auth__perks li { background: rgba(255, 255, 255, .75); border-color: rgba(var(--a2-rgb), .22); color: #2a1f45; }
  [data-theme="light"] .auth__perks li:hover { background: #ffffff; }
  [data-theme="light"] .auth__perks .ic { color: var(--blue-2); }
  .auth__showcase::before,
  .auth__showcase::after { content: none; display: none; }
  .auth__stars {
    inset: 0; opacity: .9;
    background-image:
      radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 78% 14%, #e3d4ff 50%, transparent 51%),
      radial-gradient(2px 2px at 88% 62%, #fff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 34% 78%, #d2b4ff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 58% 36%, #fff 50%, transparent 51%),
      radial-gradient(2px 2px at 8% 88%, #f08cff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 66% 86%, #fff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 44% 8%, #d2b4ff 50%, transparent 51%);
    animation: twinkle 4s ease-in-out infinite alternate;
  }
  .auth__wizard {
    width: 172px;
    filter: drop-shadow(0 0 14px rgba(213, 139, 255, .55));
  }
  .auth__ring { bottom: -10px; height: 22px; width: 78%; background: radial-gradient(closest-side, rgba(240, 140, 255, .55), transparent); }
  .auth__tagline {
    max-width: none; font-size: 34px; font-weight: 800; letter-spacing: -1px; color: #fff;
  }
  .auth__tagline-grow { display: inline; }
  .auth__tagline-grow > span {
    background: linear-gradient(90deg, #f0c4ff, #c35cff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .auth__perks { display: grid; gap: 10px; margin-top: 6px; text-align: left; }
  .auth__perks li {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
    font-size: 14.5px; font-weight: 500;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(4px);
    transition: transform .25s var(--ease), background-color .25s;
  }
  .auth__perks li:hover { transform: translateX(4px); background: rgba(255, 255, 255, .12); }
  .auth__perks .ic { color: #e3c4ff; flex: none; }
  .auth-card { gap: 12px; padding: 44px; border-top: 0; }
  .auth-card .page-title { font-size: clamp(24px, 6vw, 30px); }
  .auth-card .muted { margin: -6px 0 6px; font-size: 14.5px; }
  .auth-card .input { height: 46px; }
  .auth-card .btn--block { height: 46px; margin-top: 2px; font-size: 15.5px; }
  .auth-card .btn--social { height: 46px; }
  .auth-card__foot { margin: 6px 0 0; }
  .auth-card .pw-toggle { top: 29px; }
}

/* ==========================================================
   Account pages — mobile scene (< 860px only; desktop above is untouched)
   Night sky hero with the wizard, floating crystal islands (assets/scenery, drawn in
   art/scenery.px.js), a big italic tagline, and the form in a pixel-framed glowing card.
   ========================================================== */
.auth__deco { display: none; }
@media (min-width: 860px) {
  .auth__deco { display: block; position: absolute; z-index: -1; pointer-events: none; image-rendering: pixelated; background: center / 100% 100% no-repeat; }
  .auth__deco--isle-l { width: 96px; aspect-ratio: 42 / 36; background-image: url(/assets/scenery/sprites/isle.png); left: 6px; top: 210px; animation: isleFloat 6s ease-in-out infinite; }
  .auth__deco--isle-r { width: 104px; aspect-ratio: 46 / 34; background-image: url(/assets/scenery/sprites/isle_b.png); right: 6px; top: 120px; animation: isleFloatFlip 7s ease-in-out -2s infinite; }
  .auth__deco--cloud-l, .auth__deco--cloud-r { width: 76px; aspect-ratio: 34 / 12; background-image: url(/assets/scenery/sprites/cloud.png); opacity: .8; }
  .auth__deco--cloud-l { left: 18px; top: 70px; animation: cloudDrift 14s ease-in-out infinite alternate; }
  .auth__deco--cloud-r { right: 26px; top: 34px; animation: cloudDrift 18s ease-in-out -6s infinite alternate-reverse; }
  .auth__deco--spark { width: 18px; aspect-ratio: 1; background-image: url(/assets/scenery/sprites/spark.png); animation: sparkTwinkle 3.2s ease-in-out infinite; }
  .auth__deco--s1 { left: 20%; top: 30px; }
  .auth__deco--s2 { right: 14%; top: 250px; animation-delay: -1.1s; }
  .auth__deco--s3 { left: 9%; top: 330px; width: 14px; animation-delay: -2.2s; }
}
@media (max-width: 859px) {
  .auth-page { padding-block: 0 20px; }
  .auth { max-width: 440px; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }

  /* hero: full-bleed night sky that fades into the page at the bottom */
  .auth__showcase {
    margin-inline: calc(-1 * var(--gutter));
    gap: 14px; padding: 18px 20px 54px;
    background:
      radial-gradient(circle at 50% 30%, rgba(155, 92, 255, .42) 0, rgba(106, 47, 224, .16) 34%, transparent 62%),
      linear-gradient(180deg, #120827 0%, #1c0d3a 55%, #170a2e 100%);
    -webkit-mask-image: linear-gradient(#000 80%, transparent);
    mask-image: linear-gradient(#000 80%, transparent);
  }
  .auth__showcase::before { content: none; display: none; }
  .auth__stars { opacity: .9; }

  /* pixel-art decorations */
  .auth__deco { display: block; position: absolute; z-index: -1; pointer-events: none; image-rendering: pixelated; background: center / 100% 100% no-repeat; }
  .auth__deco--isle-l { width: 84px; aspect-ratio: 42 / 36; background-image: url(/assets/scenery/sprites/isle.png); left: 4px; top: 150px; animation: isleFloat 6s ease-in-out infinite; }
  .auth__deco--isle-r { width: 90px; aspect-ratio: 46 / 34; background-image: url(/assets/scenery/sprites/isle_b.png); right: 4px; top: 190px; animation: isleFloatFlip 7s ease-in-out -2s infinite; }
  .auth__deco--cloud-l, .auth__deco--cloud-r { width: 68px; aspect-ratio: 34 / 12; background-image: url(/assets/scenery/sprites/cloud.png); opacity: .85; }
  .auth__deco--cloud-l { left: 4px; top: 84px; animation: cloudDrift 14s ease-in-out infinite alternate; }
  .auth__deco--cloud-r { right: 6px; top: 46px; animation: cloudDrift 18s ease-in-out -6s infinite alternate-reverse; }
  .auth__deco--spark { width: 18px; aspect-ratio: 1; background-image: url(/assets/scenery/sprites/spark.png); animation: sparkTwinkle 3.2s ease-in-out infinite; }
  .auth__deco--s1 { left: 18%; top: 26px; }
  .auth__deco--s2 { right: 17%; top: 118px; animation-delay: -1.1s; }
  .auth__deco--s3 { left: 12%; top: 236px; width: 14px; animation-delay: -2.2s; }

  /* bigger wizard: exact 4x pixels (3x on very small screens) */
  .auth__wizard { width: 172px; filter: drop-shadow(0 0 18px rgba(213, 139, 255, .5)) drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
  .auth__ring { bottom: -8px; width: 70%; height: 18px; background: radial-gradient(closest-side, rgba(240, 140, 255, .5), transparent); }

  /* tagline: the headline of the page */
  .auth__tagline {
    max-width: none; margin-top: 4px;
    font-size: clamp(30px, 9vw, 38px); font-weight: 800; font-style: italic; line-height: 1.06; letter-spacing: -1px;
    color: #fff; text-shadow: 0 4px 22px rgba(155, 92, 255, .45);
  }
  .auth__tagline-grow { display: inline; }
  .auth__tagline-grow > span {
    background: linear-gradient(90deg, #f0c4ff, #c35cff); -webkit-background-clip: text; background-clip: text; color: transparent;
    padding-right: .08em;
  }
  .auth__tagline::after {                                      /* underline swoosh with a sparkle */
    content: ""; display: block; height: 18px; margin: 8px auto 0; width: min(76%, 260px);
    background:
      url(/assets/scenery/sprites/spark.png) center / 18px 18px no-repeat,
      linear-gradient(90deg, transparent, rgba(195, 92, 255, .9) 30%, #f0c4ff 50%, rgba(195, 92, 255, .9) 70%, transparent) center / 100% 2px no-repeat;
    image-rendering: pixelated;
  }

  /* the form: a glowing card with pixel corner brackets, overlapping the bottom of the sky */
  .auth-card {
    position: relative; margin-top: -40px; gap: 12px; padding: 28px 22px 22px;
    border: 0; border-radius: 20px;                            /* no box: only the pixel corner brackets frame it */
    background: transparent;
    box-shadow: none;
  }
  .auth-card::before {
    content: ""; display: block; position: absolute; inset: 7px; pointer-events: none; image-rendering: pixelated;
    background:
      url(/assets/scenery/sprites/corner_tl.png) top left / 20px 20px no-repeat,
      url(/assets/scenery/sprites/corner_tr.png) top right / 20px 20px no-repeat,
      url(/assets/scenery/sprites/corner_bl.png) bottom left / 20px 20px no-repeat,
      url(/assets/scenery/sprites/corner_br.png) bottom right / 20px 20px no-repeat;
    opacity: .85;
  }
  .auth-card > .page-title { text-align: center; font-size: clamp(26px, 7.4vw, 30px); font-weight: 800; letter-spacing: -.6px; }
  .auth-card > .muted { text-align: center; margin: -6px 0 6px; }
}
@media (max-width: 359px) {
  .auth__wizard { width: 129px; }
  .auth__deco--isle-l { width: 63px; }
  .auth__deco--isle-r { width: 68px; }
  .auth__showcase { padding-bottom: 50px; }
  .auth-card { padding-inline: 14px; }
  .auth-card .btn--social { padding-inline: 12px; gap: 10px; font-size: 14px; }
}
@keyframes isleFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes isleFloatFlip { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes cloudDrift { from { translate: -6px 0; } to { translate: 8px 0; } }
@keyframes sparkTwinkle { 0%, 100% { opacity: .35; scale: .7; } 50% { opacity: 1; scale: 1; } }

/* Bottom navigation (phones & tablets only): WizardXP frame, raised glowing avatar */
.bottom-nav {
  height: 64px; border-radius: 22px;
  border: 1px solid rgba(var(--a2-rgb), .35);
  box-shadow: var(--nav-shadow), 0 0 24px rgba(var(--a2-rgb), .16), inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme="dark"] .bottom-nav { background: linear-gradient(180deg, rgba(30, 16, 58, .94), rgba(11, 8, 22, .96)); }
.nav-item { height: 52px; font-size: 11.5px; }
.nav-item.is-active { color: var(--accent-text); box-shadow: inset 0 0 0 1px rgba(var(--a2-rgb), .3); }
.nav-avatar {
  width: 60px; height: 60px; margin-top: -26px;
  box-shadow: 0 0 0 3px var(--blue-2), 0 0 0 6px var(--bg), 0 0 22px 6px rgba(var(--a2-rgb), .5);
}

/* Bottom nav: tiny dash under the icon that glides to the active tab */
.nav-pill {
  position: absolute; z-index: 0; top: auto; bottom: 7px; left: 0; height: 2px; margin-top: 0; width: 0;
  border-radius: 999px; pointer-events: none; opacity: 0;
  background: var(--blue-2);
  box-shadow: 0 0 6px rgba(var(--a2-rgb), .45);
  transition: transform .42s cubic-bezier(.3, 1.25, .4, 1), width .42s cubic-bezier(.3, 1.25, .4, 1), opacity .2s;
}
.nav-pill.is-on { opacity: 1; }
.bottom-nav .nav-item { z-index: 1; background: transparent; border-color: transparent; }
.bottom-nav .nav-avatar { z-index: 2; }
.bottom-nav .nav-item.is-active { background: transparent; box-shadow: none; color: var(--accent-text); }
.bottom-nav .nav-item:hover:not(.is-active) { color: var(--accent-text); }
.bottom-nav .nav-item:hover:not(.is-active) .nav-item__icon { transform: translateY(-2px); color: var(--blue-2); }
.nav-item__icon { transition: color .25s, transform .3s var(--ease); }
.nav-item.is-active .nav-item__icon { transform: translateY(-1px) scale(1.06); }

/* Scrollbar: slim, purple, fits the theme */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: var(--bg); }
::-webkit-scrollbar-thumb {
  border: 3px solid var(--bg); border-radius: 999px;
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2) 50%, var(--blue-3));
}
::-webkit-scrollbar-thumb:hover { border-width: 2px; }
@supports (-moz-appearance: none) {                    /* Firefox */
  html { scrollbar-width: thin; scrollbar-color: var(--blue-2) var(--bg); }
}

/* ---------------------------------------------------------- rooms, reports, footer (set from the admin dashboard) */
.post__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip--pin { color: var(--accent-text); border-color: rgba(var(--a2-rgb), .45); }
.room-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.room-chips .chip { cursor: pointer; font: inherit; font-size: 13px; }
.room-chips .chip.is-on { background: rgba(var(--a2-rgb), .18); border-color: var(--blue-2); color: var(--text); }
.post__report { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.role--level { background: transparent; border: 1px solid rgba(var(--a2-rgb), .45); color: var(--accent-text); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; margin: 28px auto 0; padding: 18px 16px 4px; border-top: 1px solid var(--card-border); color: var(--text-3); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; width: 100%; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--accent-text); }
.site-footer__base { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; }
.made-by {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px 5px 8px;
  border: 1px solid rgba(227, 20, 31, .35);
  border-radius: 14px;
  background: rgba(227, 20, 31, .08);
  color: var(--text-2); font-weight: 600; font-size: 13px;
}
.made-by strong { color: #ff4f7b; letter-spacing: .02em; }
.made-by__heart {
  /* 15x16 simplified logo shown at 1.6x */
  flex: none; width: 24px; height: 25.6px;
  background: url('/assets/brand/anims/hyperheart.png') 0 0 / 384px 25.6px no-repeat;
  image-rendering: pixelated;
  animation: hyperHeart 1.6s steps(16) infinite;
}
@keyframes hyperHeart { to { background-position: -384px 0; } }
@media (prefers-reduced-motion: reduce) { .made-by__heart { animation: none; } }
.legal h2 { margin: 1.6em 0 .5em; font-size: 18px; color: var(--text); }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 .9em; }
.legal ul { margin: 0 0 1em; padding-left: 1.3em; }
.legal li { margin: .25em 0; }

/* ---------------------------------------------------------- maintenance notice (staff only) */
.maint-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px var(--gutter, 16px) 0; padding: 10px 14px; border: 2px solid #e59a00; background: rgba(229, 154, 0, .12); color: var(--text); font-size: 13.5px; }
.maint-bar > span { flex: 1 1 260px; }
.maint-bar a { font-weight: 700; color: #e59a00; }

/* game icons uploaded in the dashboard (pixel art stays crisp) */
.game-logo-img { object-fit: cover; image-rendering: pixelated; border-radius: 0; clip-path: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px)); }

/* ---------------------------------------------------------- game labels (Featured / Beta) */
.game-labels { align-self: flex-start; display: flex; gap: 4px; position: relative; z-index: 1; }
.game-card > .game-labels { position: absolute; top: 10px; left: 12px; }
.game-label {
  display: inline-flex; align-items: center; gap: 3px; height: 14px; padding: 0 5px;
  font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; line-height: 1;
  background: rgba(8, 5, 16, .22); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border: 1px solid currentColor;
  clip-path: polygon(0 2px, 2px 2px, 2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px));
}
.game-label .ic { width: 8px; height: 8px; }
.game-label--featured { color: #ffd36a; }
.game-label--beta { color: var(--blue-1); }
[data-theme="light"] .game-label { background: rgba(255, 255, 255, .35); }
[data-theme="light"] .game-label--featured { color: #a36b00; }
[data-theme="light"] .game-label--beta { color: var(--blue-3); }

/* ---------------------------------------------------------- store: coin packs (art: art/coinpacks.px.js) */
.accepts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 0 16px; }
.accepts__label { font-size: 12.5px; color: var(--text-3); margin-right: 2px; }
.accepts__chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; font-size: 12px; font-weight: 600; color: var(--text-3); border: 1px solid var(--card-border); opacity: .55; }
.accepts__chip.is-on { color: var(--text); border-color: rgba(var(--a2-rgb), .45); opacity: 1; }
.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 12px; padding-top: 10px; }
@media (min-width: 760px) { .packs { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.pack {
  --frame: rgba(var(--a2-rgb), .9); --n: 6px;
  position: relative; isolation: isolate; display: grid; justify-items: center; gap: 2px; padding: 18px 12px 14px; text-align: center;
  background: var(--frame);
  clip-path: polygon(0 var(--n), 3px var(--n), 3px 3px, var(--n) 3px, var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) 3px, calc(100% - 3px) 3px, calc(100% - 3px) var(--n), 100% var(--n),
    100% calc(100% - var(--n)), calc(100% - 3px) calc(100% - var(--n)), calc(100% - 3px) calc(100% - 3px), calc(100% - var(--n)) calc(100% - 3px), calc(100% - var(--n)) 100%,
    var(--n) 100%, var(--n) calc(100% - 3px), 3px calc(100% - 3px), 3px calc(100% - var(--n)), 0 calc(100% - var(--n)));
  animation: packIn .45s var(--ease) both; animation-delay: var(--d, 0s);
}
.pack::before { content: ""; position: absolute; inset: 3px; z-index: -1; background: linear-gradient(180deg, #1b1430, #0f0b1d); }
[data-theme="light"] .pack::before { background: linear-gradient(180deg, #ffffff, #f3eefc); }
.pack::after {
  content: ""; position: absolute; inset: 9px; pointer-events: none; opacity: .8;
  background:
    linear-gradient(var(--frame) 0 0) left top / 4px 4px no-repeat, linear-gradient(var(--frame) 0 0) right top / 4px 4px no-repeat,
    linear-gradient(var(--frame) 0 0) left bottom / 4px 4px no-repeat, linear-gradient(var(--frame) 0 0) right bottom / 4px 4px no-repeat;
}
.pack--tag { --frame: #f5b301; padding-top: 26px; }
.pack__ribbon {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 10px;
  font-size: 12px; font-weight: 800; color: #2a1800; background: #ffcb3d; white-space: nowrap;
  box-shadow: inset 0 -3px 0 #d48a00;
}
.pack__ribbon .ic { width: 14px; height: 14px; }
.pack-art {
  --s: 3; width: calc(56px * var(--s)); height: calc(48px * var(--s)); flex: none;
  background: var(--art) 0 0 / calc(56px * var(--s) * 16) calc(48px * var(--s)) no-repeat;
  image-rendering: pixelated; animation: packPlay 1.6s steps(16) infinite;
}
.pack:nth-child(2n) .pack-art { animation-delay: -.6s; }
.pack-art--sm { --s: 1.5; flex: none; }
.pack-art--hero { --s: 2; flex: none; }
@keyframes packPlay { to { background-position: calc(-56px * var(--s) * 16) 0; } }
@keyframes packIn { from { opacity: 0; transform: translateY(8px); } }
.pack__coins { margin: 4px 0 0; font-size: 28px; font-weight: 800; line-height: 1.05; letter-spacing: -.5px; color: var(--text); }
.pack__bonus { margin: 0; min-height: 18px; font-size: 13.5px; font-weight: 700; color: #4ade80; }
.pack__price { margin: 0 0 10px; font-size: 17px; font-weight: 700; color: var(--text-3); }
.pack__buy { width: 100%; }
@media (max-width: 480px) { .pack .pack-art { --s: 2; } .pack__coins { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .pack-art, .pack { animation: none; } }
.center { text-align: center; }
.flip-x { transform: scaleX(-1); }

/* ---------------------------------------------------------- store: checkout sheet */
.sheet {
  width: min(100vw, 480px); max-width: 100vw; max-height: 88vh; margin: auto auto 0; padding: 0; border: 0; overflow-y: auto;
  color: var(--text); background: #130e22; border-top: 2px solid rgba(var(--a2-rgb), .5);
  animation: sheetUp .28s var(--ease);
}
.sheet::backdrop { background: rgba(4, 2, 10, .62); }
@media (min-width: 640px) { .sheet { margin: auto; border: 2px solid rgba(var(--a2-rgb), .5); animation-name: sheetPop; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheetPop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.sheet__grip { width: 44px; height: 4px; margin: 10px auto 0; background: var(--card-border); }
.sheet__body { position: relative; display: grid; gap: 12px; padding: 14px 18px 22px; }
.sheet__close { position: absolute; top: 4px; right: 8px; }
.sheet__pack { display: flex; align-items: center; gap: 12px; padding-right: 36px; }
.sheet__pack div { display: flex; flex-direction: column; line-height: 1.3; }
.sheet__pack strong { font-size: 18px; }
.sheet__pack b { font-size: 20px; margin-top: 2px; }
.sheet__group { margin: 6px 0 -4px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.methods-list { display: grid; border: 1px solid var(--card-border); background: rgba(255, 255, 255, .02); }
.method-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 9px 12px; text-align: left; color: var(--text); background: transparent; border-bottom: 1px solid var(--card-border); cursor: pointer; transition: background-color .15s; }
.method-row:last-child { border-bottom: 0; }
.method-row:hover:not(:disabled) { background: rgba(var(--a2-rgb), .1); }
.method-row:focus-visible { outline: 2px solid var(--blue-1); outline-offset: -2px; }
.method-row.is-off { cursor: not-allowed; opacity: .55; }
.method-row.is-loading { opacity: .6; pointer-events: none; }
.method-row__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; color: #fff; }
.method-row__icon--card { background: #c2410c; }
.method-row__icon--paypal { background: #1d4ed8; }
.method-row__icon--crypto { background: #0f766e; }
.method-row__icon--wallet { background: var(--blue-3); }
.method-row__icon--gift { background: #d4a106; color: #1a1205; }
.method-row__main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.method-row__main strong { font-size: 15px; }
.method-row__main small { font-size: 12.5px; color: var(--text-3); }
.method-row__go { color: var(--text-3); }
.sheet__foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }
[data-theme="light"] .sheet { background: #ffffff; }

.share-sheet__head { display: flex; align-items: center; gap: 12px; padding-right: 36px; }
.share-sheet__art { width: 48px; height: 48px; image-rendering: pixelated; image-rendering: crisp-edges; flex: none; filter: drop-shadow(0 3px 0 rgba(63, 28, 134, .45)); }
.share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.share-tile {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 10px 8px;
  border: 2px solid rgba(var(--a2-rgb), .35);
  border-radius: 0;
  background: rgba(var(--a2-rgb), .08);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.2px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28);
  image-rendering: pixelated;
  transition: transform .12s var(--ease), background .15s, border-color .15s;
}
.share-tile:hover { transform: translateY(-2px); border-color: rgba(var(--a2-rgb), .7); background: rgba(var(--a2-rgb), .16); }
.share-tile:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }
.share-tile--x { --brand: #111; }
.share-tile--facebook { --brand: #1877f2; }
.share-tile--reddit { --brand: #ff4500; }
.share-tile--telegram { --brand: #229ed9; }
.share-tile--whatsapp { --brand: #25d366; }
.share-tile--linkedin { --brand: #0a66c2; }
.share-tile--copy, .share-tile--native { --brand: var(--a2); }
.share-tile--x, .share-tile--facebook, .share-tile--reddit, .share-tile--telegram, .share-tile--whatsapp, .share-tile--linkedin {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}
.share-tile--x:hover, .share-tile--facebook:hover, .share-tile--reddit:hover, .share-tile--telegram:hover, .share-tile--whatsapp:hover, .share-tile--linkedin:hover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 22%, transparent);
}

/* ---------------------------------------------------------- game page: creator, support, discussion */
.game-creator { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: 2px; color: var(--text); }
a.game-creator:hover strong { color: var(--accent-text); }
.game-creator .avatar, .game-creator__mark { flex: none; box-shadow: 0 0 0 2px rgba(var(--a2-rgb), .55); }
.game-creator__mark { image-rendering: pixelated; background: #1b1430; padding: 2px; }
.game-creator span { display: flex; flex-direction: column; line-height: 1.2; }
.game-creator small { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.game-creator strong { font-size: 14px; }
.ic-heart { color: #ff5c8a; }
.btn--primary .ic-heart { color: inherit; }
.support-dialog form { display: grid; gap: 12px; }
.tip-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tip-amount input { position: absolute; opacity: 0; pointer-events: none; }
.tip-amount > span { display: flex; align-items: center; justify-content: center; gap: 5px; height: 40px; font-weight: 800; border: 2px solid var(--card-border); cursor: pointer; transition: border-color .15s, background-color .15s; }
.tip-amount input:checked + span { border-color: var(--blue-2); background: rgba(var(--a2-rgb), .14); }
.tip-amount input:focus-visible + span { outline: 2px solid var(--blue-1); outline-offset: 2px; }
/* discussion */
.discussion-title { display: flex; align-items: center; gap: 8px; }
.count-pill { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; font-size: 12px; font-weight: 800; color: var(--accent-text); background: rgba(var(--a2-rgb), .14); }
.composer { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; margin: 0 0 16px; padding: 12px; border: 1px solid var(--card-border); background: rgba(255, 255, 255, .02); }
.composer--reply { margin: 10px 0 0; padding: 10px; }
.composer .avatar { margin-top: 2px; }
.composer textarea { min-height: 78px; resize: vertical; }
.composer--reply textarea { min-height: 56px; }
.composer__main { gap: 8px; }
.composer__main .field__error:empty { display: none; }
.composer__actions { justify-content: flex-end; }
.composer__hint { margin-right: auto; font-size: 12px; color: var(--text-3); }
[data-discussion] .state, .comments-empty .state { padding: 22px 12px; border: 1px dashed var(--card-border); }
[data-discussion] .state__icon { width: 44px; height: 44px; }
[data-discussion] .state__icon .ic { width: 22px; height: 22px; }
