/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #080d17;
  --surface: #111a2a;
  --surface-2: #18253a;
  --surface-3: #223452;
  --line: rgba(148, 181, 224, 0.18);
  --text: #f4f7fb;
  --muted: #a0afc4;
  --accent: #5aa7ff;
  --accent-2: #8b75ff;
  --success: #4bd39b;
  --warning: #ffc55c;
  --danger: #ff6e7a;
  --safe-top: calc(
    var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) +
      var(--tg-content-safe-area-inset-top, 0px)
  );
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.35;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

* {
  box-sizing: border-box;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  max-width: 100%;
  min-width: 0;
}

button:disabled {
  cursor: default !important;
  opacity: 0.58;
}

h1,
h2,
h3,
p,
span,
div,
button,
a {
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

main {
  isolation: isolate;
}

main:not(.screen-center) {
  background: radial-gradient(
      110% 45% at 50% -10%,
      rgba(79, 139, 235, 0.2),
      transparent 70%
    ),
    var(--bg) !important;
}

.app-nav {
  background: rgba(14, 23, 39, 0.9) !important;
  border-top-color: var(--line) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-nav button {
  min-height: 64px !important;
  color: var(--muted) !important;
  transition:
    color 0.18s ease,
    transform 0.18s ease;
  font-size: clamp(9px, 2.7vw, 11px) !important;
  white-space: normal;
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-nav button:active {
  transform: scale(0.94);
}

.app-nav button[data-active="true"] {
  color: var(--accent) !important;
}

.app-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  overflow-x: clip;
}

.mobile-page {
  width: 100%;
  min-height: 100vh;
  padding-top: 18px !important;
}

.mobile-page > div {
  width: min(100%, 560px);
}

.mobile-page h1,
.mobile-page h2 {
  letter-spacing: -0.025em;
  max-width: 100%;
  min-width: 0;
}

.mobile-page article,
.mobile-page section {
  border-color: var(--line) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

/* Keep legacy inline action rows safe on narrow Telegram WebView widths. */
.mobile-page :is(button, a, input, select, textarea),
.admin-area :is(button, a, input, select, textarea),
.mod-area :is(button, a, input, select, textarea) {
  min-width: 0;
  max-width: 100%;
}
.mobile-page [style*="display: flex"] > *,
.mobile-page [style*="display:flex"] > *,
.admin-area [style*="display: flex"] > *,
.admin-area [style*="display:flex"] > *,
.mod-area [style*="display: flex"] > *,
.mod-area [style*="display:flex"] > * { min-width: 0; }

.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.action-row > button { flex: 1 1 130px; min-width: 0; }
.action-row > input { flex: 2 1 160px; min-width: 0; }
.trades-toolbar { flex-wrap: wrap; }
.trades-toolbar > div { flex: 1 1 180px; }
.trades-toolbar > button { flex: 0 1 auto; min-height: 44px; }
.home-toolbar > div:last-child { flex-shrink: 0; }
.home-toolbar button { flex-shrink: 0; }
.home-toolbar svg { flex-shrink: 0; }
@media (max-width: 380px) { .home-online-label { display: none; } }

.mobile-page button:not([style*="background: none"]),
.mobile-page a[role="button"] {
  min-height: 44px;
}

.app-content {
  width: 100%;
  min-width: 0;
}

.app-content > * {
  min-width: 0;
}

.app-nav {
  left: 50% !important;
  right: auto !important;
  width: min(100%, 720px);
  transform: translateX(-50%);
  box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.28);
}

.home-screen {
  position: relative;
  max-width: 420px;
  padding: 28px 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: radial-gradient(
      circle at 50% 20%,
      rgba(90, 167, 255, 0.2),
      transparent 43%
    ),
    linear-gradient(155deg, rgba(24, 37, 58, 0.94), rgba(13, 21, 35, 0.94));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.3),
    inset 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.home-screen > button {
  position: relative;
  z-index: 1;
  box-shadow: 0 12px 28px rgba(67, 124, 217, 0.3);
}

.home-screen::before,
.home-screen::after {
  content: "";
  position: absolute;
  width: 104px;
  aspect-ratio: 3 / 4;
  left: 50%;
  top: 34px;
  border: 1px solid rgba(126, 177, 255, 0.24);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(90, 167, 255, 0.1), transparent);
  pointer-events: none;
}

.home-screen::before {
  transform: translateX(-76%) rotate(-11deg);
}
.home-screen::after {
  transform: translateX(-24%) rotate(11deg);
}

.home-mark {
  position: relative;
  z-index: 1;
  width: 104px;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  color: #beddff;
  border: 1px solid rgba(154, 196, 255, 0.42);
  border-radius: 18px;
  background: linear-gradient(145deg, #203c64, #17233a);
  box-shadow:
    0 15px 35px rgba(29, 92, 175, 0.38),
    inset 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.home-mark img {
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  object-fit: contain !important;
}

.panel-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, rgba(90, 167, 255, 0.2), transparent 58%),
    linear-gradient(145deg, #18253a, #111a2a);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.panel-hero > div {
  min-width: 0;
}

.panel-hero h1 {
  margin: 2px 0 3px;
  font-size: clamp(21px, 6vw, 28px);
  line-height: 1.08;
}

.panel-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.eyebrow {
  color: #8ebeff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.admin-page,
.mod-page,
.notifications-page {
  padding-bottom: 34px !important;
}

.admin-page > *,
.mod-page > *,
.notifications-page > * {
  width: min(100%, 560px);
  margin-left: auto;
  margin-right: auto;
}

.panel-menu {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.panel-menu-button {
  width: 100%;
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(24, 37, 58, 0.96), rgba(17, 26, 42, 0.96));
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.panel-menu-button:active {
  transform: scale(0.985);
}

.panel-menu-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  color: var(--menu-accent, var(--accent));
  background: color-mix(in srgb, var(--menu-accent, var(--accent)) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--menu-accent, var(--accent)) 28%, transparent);
}

.profile-section-header {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(24, 37, 58, .96), rgba(17, 26, 42, .96));
}

.profile-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profile-section-heading h1 {
  min-width: 0;
  margin: 0;
  font-size: clamp(21px, 5.8vw, 26px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-section-header p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel-menu-copy {
  min-width: 0;
  flex: 1 1;
}

.panel-menu-title {
  display: block;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
}

.panel-menu-description {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.panel-menu-chevron {
  flex-shrink: 0;
  color: #6f829c;
  font-size: 24px;
  line-height: 1;
}

.section-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 4px 2px 0;
}

.notification-card {
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
}

.notification-card[data-read="true"] {
  box-shadow: none;
}

.admin-subpage,
.mod-subpage {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 36px !important;
  color: var(--text) !important;
}

.admin-area,
.mod-area {
  width: 100%;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
}

.admin-area main,
.mod-area main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.admin-area main > div,
.mod-area main > div {
  max-width: 560px;
}

.admin-area input,
.admin-area textarea,
.admin-area select,
.mod-area input,
.mod-area textarea,
.mod-area select {
  border-color: var(--line) !important;
}

.admin-area button,
.mod-area button {
  touch-action: manipulation;
  transition:
    transform 0.16s ease,
    filter 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.admin-area button:not(.panel-menu-button):not(.icon-control):not(.switch-control),
.mod-area button:not(.panel-menu-button):not(.icon-control):not(.switch-control) {
  min-height: 44px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-area button:not([style*="background: none"]):not(.icon-control):not(.switch-control):not(.panel-menu-button),
.mod-area button:not([style*="background: none"]):not(.icon-control):not(.switch-control):not(.panel-menu-button) {
  border: 1px solid rgba(170, 202, 244, 0.16) !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.06);
}

.admin-area button:active:not(:disabled),
.mod-area button:active:not(:disabled) {
  transform: scale(0.97);
  filter: brightness(1.08);
}

.admin-area button:disabled,
.mod-area button:disabled {
  box-shadow: none !important;
}

.control-btn {
  min-height: 44px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35;
  white-space: normal;
  min-width: 0;
}

.control-btn--primary {
  background: linear-gradient(135deg, #438ee8, #6858df) !important;
  box-shadow: 0 4px 12px rgba(77, 106, 224, 0.18) !important;
}

.control-btn--success {
  background: linear-gradient(135deg, #25a876, #43cf9a) !important;
  color: #06160f !important;
  box-shadow: 0 10px 24px rgba(42, 180, 128, 0.24) !important;
}

.control-btn--danger {
  background: linear-gradient(135deg, #d94e60, #ff7180) !important;
  box-shadow: 0 10px 24px rgba(220, 71, 91, 0.25) !important;
}

.control-btn--gold {
  background: linear-gradient(135deg, #d98722, #f1b84a) !important;
  color: #211302 !important;
  box-shadow: 0 10px 24px rgba(218, 143, 36, 0.25) !important;
}

.control-btn--secondary {
  background: linear-gradient(145deg, #263954, #1a293f) !important;
  color: #dce9fa !important;
}

.control-chip {
  min-height: 44px !important;
  border-radius: 999px !important;
  padding: 8px 13px !important;
  white-space: normal;
  box-shadow: none !important;
}

.control-list-button {
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.13) !important;
}
.control-list-button:not(.player-banner-card) { background: linear-gradient(145deg, #18253a, #111a2a) !important; }

.icon-control {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  flex-shrink: 0;
  display: grid !important;
  place-items: center;
  border: 1px solid var(--line) !important;
  background: rgba(9, 16, 28, 0.82) !important;
  color: var(--muted) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.switch-control {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28) !important;
}

.admin-area button[style*="background: none"],
.mod-area button[style*="background: none"] {
  color: #a9ccec !important;
  box-shadow: none !important;
}

@media (hover: hover) {
  .admin-area button:hover:not(:disabled),
  .mod-area button:hover:not(:disabled) {
    border-color: rgba(113, 177, 255, 0.38) !important;
    filter: brightness(1.07);
  }
}

@media (max-width: 380px) {
  .control-btn {
    padding-left: 11px !important;
    padding-right: 11px !important;
    font-size: 14px !important;
  }

  .admin-area [style*="display: flex"][style*="gap: 8"] > .control-btn,
  .mod-area [style*="display: flex"][style*="gap: 8"] > .control-btn {
    min-width: 0;
  }
}

/* Desktop override comes last so the mobile rules above cannot shrink it. */
@media (min-width: 700px) {
  .app-shell { max-width: 1180px; }
  .app-content { padding: 24px 28px calc(108px + var(--safe-bottom)) !important; }
  .app-content > * { width: min(100%, 1040px); }
  .home-screen { max-width: 620px; padding: 36px 34px !important; }
  .inventory-screen { max-width: 1040px; gap: 18px; }
  .inventory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .inventory-art { padding: 8px; }
  .inventory-card-copy { padding: 13px 13px 15px; gap: 6px; }
  .inventory-card-copy strong { font-size: 15px; }
  .inventory-card-copy small, .inventory-meta, .inventory-ready { font-size: 11px; }
  .dialog-layer > article.inventory-detail { width: min(92vw, 520px); max-width: 520px; max-height: min(90dvh, 820px) !important; border-radius: 24px !important; }
  .inventory-detail > .inventory-detail-body { padding: 18px 22px calc(var(--safe-bottom) + 22px); gap: 15px; }
  .inventory-detail-art { width: min(100%, 270px); }
  .inventory-detail h2 { font-size: 25px; }
  .inventory-detail p { font-size: 14px; }
  .inventory-detail-stats { gap: 10px; padding: 12px; }
  .inventory-detail-stats b { font-size: 14px; }
  .app-nav { width: min(100%, 1180px); }
}
@media (min-width: 1050px) { .inventory-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; } .inventory-card-copy strong { font-size: 16px; } }

/* Telegram Desktop/tablet: use the available window while keeping the iPhone
   layout as the default below this breakpoint. */
@media (min-width: 560px) {
  .app-shell { max-width: 1180px; }
  .app-content { padding: 24px 28px calc(108px + var(--safe-bottom)) !important; }
  .app-content > * { width: min(100%, 1040px); }
  .home-screen { max-width: 620px; padding: 36px 34px !important; }
  .inventory-screen { max-width: 1040px; gap: 18px; }
  .inventory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .inventory-art { aspect-ratio: 4 / 5; padding: 8px; }
  .inventory-card-copy { padding: 13px 13px 15px; gap: 6px; }
  .inventory-card-copy strong { font-size: 15px; }
  .inventory-card-copy small, .inventory-meta, .inventory-ready { font-size: 11px; }
  .dialog-layer > article.inventory-detail { width: min(92vw, 520px); max-width: 520px; max-height: min(90dvh, 820px) !important; border-radius: 24px !important; }
  .inventory-detail > .inventory-detail-body { padding: 18px 22px calc(var(--safe-bottom) + 22px); gap: 15px; }
  .inventory-detail-art { width: min(100%, 270px); }
  .inventory-detail h2 { font-size: 25px; }
  .inventory-detail p { font-size: 14px; }
  .inventory-detail-stats { gap: 10px; padding: 12px; }
  .inventory-detail-stats b { font-size: 14px; }
  .app-nav { width: min(100%, 1180px); }
}

@media (min-width: 1050px) {
  .inventory-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
  .inventory-card-copy strong { font-size: 16px; }
}

/* Legacy inline colors inside tool pages are normalized here so all nested
   admin/mod screens inherit the same Spy Cards surfaces without API rewrites. */
.admin-subpage > div > div,
.admin-subpage > div > section,
.mod-subpage > div,
.mod-subpage > section {
  border-color: var(--line) !important;
}

.admin-subpage button,
.mod-subpage button {
  min-height: 44px;
}

.admin-subpage > *,
.mod-subpage > * {
  width: min(100%, 560px);
  margin-left: auto;
  margin-right: auto;
}

.admin-subpage h1,
.admin-subpage h2,
.mod-subpage h1,
.mod-subpage h2 {
  letter-spacing: -0.025em;
}

.admin-subpage input,
.admin-subpage textarea,
.admin-subpage select,
.mod-subpage input,
.mod-subpage textarea,
.mod-subpage select {
  border-color: var(--line) !important;
  background: #0b1320 !important;
}

.admin-subpage section,
.admin-subpage article,
.mod-subpage section,
.mod-subpage article {
  border-color: var(--line) !important;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-width: 0;
  font-size: clamp(22px, 6vw, 28px) !important;
}

.page-title-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(90, 167, 255, 0.26);
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  color: var(--accent);
  background: rgba(90, 167, 255, 0.12);
}

.subpage-panel {
  border: 1px solid var(--line) !important;
  background: linear-gradient(145deg, rgba(24, 37, 58, 0.96), rgba(17, 26, 42, 0.96)) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.swipe-hint {
  align-self: flex-start;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 26, 42, 0.75);
  color: var(--muted);
  font-size: 11px;
}

.button-chevron {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.62);
  font-size: 24px;
  line-height: 1;
}

.collection-screen h2,
.trades-screen h2 {
  letter-spacing: -0.02em;
}

.collection-card,
.trades-screen button {
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.collection-card:active,
.trades-screen button:active {
  transform: scale(0.985);
}

.collection-screen input,
.trades-screen input,
.trades-screen select {
  border-color: var(--line) !important;
  background: rgba(10, 17, 29, 0.82) !important;
}

@media (max-width: 430px) {
  .collection-screen > div[style*="grid-template-columns"] {
    gap: 8px !important;
  }
  .collection-screen > div[style*="grid-template-columns"] button {
    padding: 6px !important;
  }
}

@media (max-width: 380px) {
  .app-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .home-screen {
    padding-left: 12px;
    padding-right: 12px;
  }
}

input,
textarea,
select {
  max-width: 100%;
  font-size: 16px !important;
}

@media (max-width: 380px) {
  body {
    font-size: 15px;
  }
}

/* Shared mobile layout, including tools rendered inside a portal. */
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button, a[role="button"] { min-height: 44px; }
input, select, textarea { min-width: 0; min-height: 44px; border-radius: 12px; color: var(--text); }
.mobile-page :is(section, article, label), .admin-area :is(section, article, label) { min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
button { cursor: pointer; }
button svg { flex-shrink: 0; }
.app-shell, .mobile-page, .admin-area, .mod-area, .screen-center {
  min-height: calc(100dvh - var(--safe-top)) !important;
}
.mobile-page, .admin-subpage, .mod-subpage {
  padding-bottom: calc(28px + var(--safe-bottom)) !important;
}
.app-content { padding-bottom: calc(96px + var(--safe-bottom)) !important; }
.app-nav { padding-bottom: var(--safe-bottom) !important; }
.screen-center { background: var(--bg) !important; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-gap: 12px !important; gap: 12px !important; }
.field-label { display: grid; grid-gap: 6px; gap: 6px; min-width: 0; font-size: 13px; color: var(--muted); }
.form-grid > *, .stats-grid > *, .panel-hero > *, .dialog-layer > * > * { min-width: 0; }
.admin-area main > div > *, .mod-area main > div > *, .mobile-page > div > * { min-width: 0; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)) !important; }
.control-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #356bb8, #5948b8) !important;
  border: 1px solid #91bcff !important;
  box-shadow: inset 0 -3px #a8caff !important;
}
.switch-control { min-height: 44px !important; height: 44px !important; border-radius: 24px !important; flex-shrink: 0; }
.inline-icon { display: inline-flex; vertical-align: -0.18em; margin-right: .35em; color: var(--accent); }
.icon-control .inline-icon { margin: 0; color: inherit; }
.dialog-layer button[aria-label="Закрыть"] { min-width: 44px; min-height: 44px; display: grid; place-items: center; flex-shrink: 0; }
.dialog-layer button[aria-label="Закрыть"] .inline-icon { margin: 0; }
.rewards-feedback { position: -webkit-sticky; position: sticky; top: 8px; z-index: 2; box-shadow: 0 8px 24px #0005; }
.feedback { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--text); line-height: 1.5; }
.segmented-control { display: flex; gap: 6px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.segmented-control button { flex: 1 1; border: 1px solid transparent; border-radius: 11px; padding: 10px 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.segmented-control button[aria-pressed="true"] { color: var(--text); background: var(--surface-3); border-color: var(--accent); }
.dialog-layer {
  position: fixed; inset: 0; z-index: 100; width: 100% !important; max-width: none !important;
  margin: 0 !important; display: flex !important; align-items: flex-end !important; justify-content: center;
  padding: calc(var(--safe-top) + 12px) 12px calc(var(--safe-bottom) + 12px) !important;
  background: rgba(3, 8, 16, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden !important; outline: none; color: var(--text);
}
.dialog-layer[data-placement="center"] { align-items: center !important; }
.dialog-layer > div, .dialog-layer > section, .dialog-layer > article {
  width: 100%; min-width: 0; min-height: 0 !important; max-height: 100% !important;
  margin: 0 auto !important; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  border-radius: 24px !important; border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0,0,0,.45); scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
.dialog-layer > div > *, .dialog-layer > section > *, .dialog-layer > article > * { flex-shrink: 0; }
.dialog-layer :is(div, section, article, span) { min-width: 0; }
.dialog-layer input, .dialog-layer textarea, .dialog-layer select { background: var(--surface) !important; border-color: var(--line) !important; }
.dialog-layer h2, .dialog-layer h3 { line-height: 1.25; }
.dialog-layer > .trade-create-sheet { max-width: 420px; gap: 9px !important; padding: 12px !important; background: linear-gradient(180deg,#1d2c42,#111a2a) !important; }
.trade-create-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trade-picker-back { min-height: 40px; border: 0; background: transparent; color: #a8d2ff; font-size: 13px; font-weight: 750; }
.trade-selected-section h3 { margin: 3px 0 7px; color: #d8e6fa; font-size: 13px; }
.trade-selected-section h3 span { color: var(--accent); }
.trade-selected-strip { display: flex; align-items: flex-start; gap: 8px; overflow-x: auto; padding: 2px 2px 7px; scrollbar-width: thin; scrollbar-color: #6482aa transparent; }
.trade-selected-card,.trade-add-card { position: relative; flex: 0 0 66px; width: 66px; height: 86px; overflow: hidden; border: 1px solid #58749a; border-radius: 10px; background: #0d1729; color: #b9d5f7; padding: 0; }
.trade-selected-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.trade-selected-remove { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #07101be8; color: #fff; }
.trade-add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-style: dashed; background: #1d3453; color: #b8d9ff; }
.trade-add-card span { font-size: 10px; font-weight: 700; }
.trade-add-card:disabled { opacity: .48; }
.trade-picker-heading h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.trade-picker-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.trade-picker-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-gap: 9px; gap: 9px; overflow-y: auto; }
.trade-picker-card { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); text-align: left; }
.trade-picker-art { display: grid; place-items: center; overflow: hidden; width: 100%; aspect-ratio: 4/5; border-radius: 8px; background: #0c1423; }
.trade-picker-art img { width: 100%; height: 100%; object-fit: cover; }
.trade-picker-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.trade-picker-card small { font-size: 10px; }
.trade-picker-empty { padding: 22px 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); font-size: 13px; text-align: center; }
.brand-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center; overflow: hidden;
  background: var(--bg) !important;
}
.brand-loading__art { width: 128px; height: 128px; display: grid; place-items: center; }
.brand-loading__logo { animation: brand-breathe 2.4s ease-in-out infinite; }
.brand-loading--inline { min-height: 240px !important; min-height: min(45dvh, 320px) !important; width: 100%; background: transparent !important; }
@keyframes brand-breathe { 0%,100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.07); opacity: 1; } }
@keyframes brand-progress { from { transform: translateX(-100%); } to { transform: translateX(225%); } }
@media (max-width: 380px) {
  .panel-hero { padding: 14px; gap: 10px; }
  .panel-hero > img { width: 42px !important; height: 42px !important; }
  .panel-hero h1 { font-size: 21px; }
  .notifications-page .panel-hero h1 svg { display: none !important; }
  .dialog-layer { padding-left: 8px !important; padding-right: 8px !important; }
  .mobile-page { padding-left: 12px !important; padding-right: 12px !important; }
  .app-nav button { padding-left: 1px !important; padding-right: 1px !important; }
  .profile-wallets { gap: 8px; }
  .profile-wallets strong { font-size: 20px; }
}
@media (max-width: 330px) { .form-grid { grid-template-columns: minmax(0, 1fr) !important; } }

.economy-page { padding: 18px 16px 32px; }
.economy-content { width: 100%; max-width: 560px; margin: auto; display: grid; grid-gap: 12px; gap: 12px; min-width: 0; }
.economy-content > *, .economy-panel > *, .shop-grid > * { min-width: 0; }
.economy-content h2 { margin: 0; font-size: 19px; }
.economy-content small, .profile-screen small { color: var(--muted); display: block; font-size: 12px; }
.economy-panel { padding: 16px; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; }
.economy-panel p, .economy-note { font-size: 13px; color: var(--muted); line-height: 1.5; }
.economy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.economy-row > div { min-width: 0; }
.economy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.economy-actions button { flex: 1 1 130px; }
.economy-content .control-chip { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.economy-content .control-btn { border: 1px solid var(--line); }
.economy-row > .control-chip { flex-shrink: 0; }
.wallet-panel { display: flex; gap: 12px; align-items: center; padding: 14px 16px; color: var(--warning); border-radius: 18px; border: 1px solid #e5b95644; background: radial-gradient(at top left,#70512066,transparent),var(--surface); }
.wallet-panel strong { display: block; font-size: clamp(24px,7vw,34px); color: var(--text); margin-top: 4px; }
.shop-grid { display: grid; grid-template-columns: minmax(0,1fr); grid-gap: 10px; gap: 10px; }
.shop-product { display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: start; grid-gap: 10px 12px; gap: 10px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(155deg,var(--surface-2),var(--surface)); }
.shop-product-copy { min-width: 0; display: grid; grid-gap: 4px; gap: 4px; }
.shop-product h2 { font-size: 16px; line-height: 1.3; }
.shop-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.shop-product-footer { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.shop-product-footer .control-btn { min-height: 44px; padding: 10px 16px; margin: 0; width: auto; }
.shop-product-footer > small { flex: 1 1 110px; }
.shop-product p { font-size: 13px; color: var(--muted); margin: 0; }
.shop-product-art { height: 80px; overflow: hidden; display: grid; place-items: center; background: #080d1766; border-radius: 12px; color: var(--accent); }
.shop-product-art img { width: 100%; height: 80px; min-height: 0; display: block; object-fit: contain; }
.shop-limit { margin-top: auto; font-size: 12px; color: var(--muted); }
.purchase-confirm, .shop-editor { display: grid; grid-gap: 14px; gap: 14px; max-width: 520px; }
.shop-editor :is(input,textarea,select) { width: 100%; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.profile-screen { width: 100%; max-width: 520px; padding-top: 12px; display: grid; grid-gap: 12px; gap: 12px; }
.profile-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 210px; border-radius: 20px; border: 1px solid var(--line); background-color: #202126; background-image: linear-gradient(145deg,#293349,#171a22); background-size: cover; background-position: center; }
.profile-background { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; -webkit-clip-path: inset(0 round 20px); clip-path: inset(0 round 20px); contain: paint; pointer-events: none; z-index: 0; }
.profile-avatar-backdrop { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; filter: blur(10px); transform: scale(1.1); opacity: .6; }
.profile-hero-shade { position: absolute; inset: 0; background: linear-gradient(0deg,#0d1017f5 0%,#10131bc9 42%,#10131b18 100%); }
.profile-identity { position: relative; z-index: 1; }
.profile-identity { padding: 22px 16px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.profile-identity h1 { margin: 6px 0 0; font-size: 24px; line-height: 1.2; }
.profile-identity p { margin: 0; color: #b7d8ff; }
.profile-avatar { width: 94px; height: 94px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 38px; font-weight: 800; background: linear-gradient(135deg,#5aa7ff,#806dff); border: 3px solid #d6e7ff; box-shadow: 0 0 0 5px #83b5ff20, 0 12px 30px #0006; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.role-badge, .decoration-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 9px; border: 1px solid #8dbaff55; color: #b9daff; background: #4e80b326; font-size: 12px; font-weight: 700; }
.role-badge[data-role="owner"], .decoration-badge[data-color="gold"] { color: #ffe095; border-color: #ecc56d66; background: #d4972026; }
.role-badge[data-role="sub"], .decoration-badge[data-color="violet"] { color: #debeff; border-color: #aa78e866; background: #945bd826; }
.decoration-badge[data-color="rose"] { color: #ffc0d3; border-color: #e875a166; background: #d8558026; }
.role-badge[data-role="mod"], .decoration-badge[data-color="mint"] { color: #adf7dc; border-color: #62dda766; background: #43b68626; }
.profile-wallets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-gap: 12px; gap: 12px; }
.profile-wallets button { display: grid; grid-gap: 5px; gap: 5px; justify-items: start; text-align: left; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--warning); }
.profile-wallets strong { font-size: 24px; color: var(--text); }
.profile-stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-gap: 8px; gap: 8px; text-align: center; }
.profile-stat-grid strong { display: block; font-size: 22px; }
.leaderboard { display: grid; grid-gap: 8px; gap: 8px; }
.leader-row { display: flex; gap: 10px; align-items: center; padding: 14px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.leader-row[data-me="true"] { border-color: var(--accent); background: var(--surface-2); }
.leader-rank { color: var(--warning); min-width: 20px; }
.leader-avatar { width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; }
.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader-person { flex: 1 1; min-width: 0; font-size: 14px; }
.leader-points { text-align: right; font-size: 14px; min-width: 0; max-width: 32%; }
.drop-earnings { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; color: #ffe095; font-size: 13px; padding: 10px; border: 1px solid #ffe09544; border-radius: 12px; background: #0003; }
summary { cursor: pointer; min-height: 44px; align-content: center; }
@media (max-width: 380px) { .shop-grid { grid-template-columns: minmax(0,1fr); } .leader-row { gap: 7px; padding: 12px 8px; } }

.game-page { padding: 18px 16px 32px; }
.game-content, .games-hub { width: 100%; max-width: 560px; min-width: 0; margin: 0 auto; display: grid; grid-gap: 18px; gap: 18px; }
.games-hub { padding-top: 0; }
.compact-section-header { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 4px 2px; }
.compact-section-header > div { min-width: 0; }
.compact-section-header h1, .compact-section-header h2 { margin: 0; font-size: 23px; line-height: 1.15; }
.compact-section-header p, .compact-section-header small { display: block; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.3; }
.profile-identity { min-height: 210px; padding: 76px 15px 14px; display: grid; grid-template-columns: 72px minmax(0,1fr); grid-template-rows: auto auto auto; align-content: end; grid-column-gap: 12px; column-gap: 12px; text-align: left; }
.profile-identity h1 { align-self: end; margin: 0; font-size: 20px; line-height: 1.15; }
.profile-avatar { grid-row: 1 / span 3; width: 72px; height: 72px; border-radius: 50%; font-size: 30px; border: 3px solid #10131b; box-shadow: 0 0 0 2px #e6edf5, 0 8px 20px #0008; }
.profile-roles { grid-column: 1 / -1; justify-content: flex-start; gap: 6px; margin-top: 12px; }
.profile-identity .decoration-badge { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
.profile-banner-editor { display: grid; grid-gap: 12px; gap: 12px; }
.profile-banner-editor > p { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.profile-banner-preview { height: 150px; border-radius: 18px; padding: 14px; display: flex; align-items: flex-end; gap: 10px; background-color: #202126; background-image: linear-gradient(145deg,#293349,#171a22); background-size: cover; overflow: hidden; box-shadow: inset 0 -70px 60px #080b12d9; }
.profile-banner-preview-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #161b25; border: 2px solid #fff; }
.profile-banner-preview-profile { display: flex; align-items: center; gap: 9px; position: relative; z-index: 1; padding: 8px 10px; border-radius: 13px; background: linear-gradient(90deg,#101a2bd9,#101a2b99); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.profile-banner-preview-profile strong, .profile-banner-preview-profile small { display: block; }.profile-banner-preview-profile small { color: #b9c9dc; font-size: 10px; margin-top: 2px; }
.profile-banner-file { position: relative; overflow: hidden; }
.profile-banner-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.profile-banner-position { display: grid; grid-gap: 8px; gap: 8px; color: var(--muted); font-size: 13px; }
.profile-banner-position input { width: 100%; accent-color: var(--accent); }
.profile-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Keep user-supplied banner backgrounds instead of the generic list gradient. */
.player-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-gap: 8px; gap: 8px; }
.player-filters .player-filter { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 0 10px; border: 1px solid var(--line) !important; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; box-shadow: none !important; }
.player-filters .player-filter[aria-pressed="true"], .player-filters .player-filter[data-active="true"] { background: #213957; color: #c5e1ff; border-color: var(--accent) !important; }
.filter-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.player-filter[aria-pressed="true"] .filter-dot { background: var(--success); }
.role-filter svg { flex-shrink: 0; }
.role-filter:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Override the legacy admin input surface; the label is the sole visible surface. */
.admin-subpage .role-filter select { flex: 1 1; min-width: 0; width: 100%; min-height: 44px; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent !important; color: inherit; font-weight: inherit; color-scheme: dark; }
.role-filter option { background: var(--surface-2); color: var(--text); }
.game-header p { max-width: 32ch; }
.game-balance { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 13px; }
.game-balance > span { display: flex; align-items: center; gap: 8px; }
.game-balance svg { color: #b7a5ff; }
.game-balance b { color: #fff; font-size: 19px; }
.game-balance small, .game-hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.game-hint { margin: 0; display: flex; align-items: flex-start; gap: 9px; }
.game-hint svg { margin-top: 2px; color: var(--accent); }
.game-content .control-btn { border: 1px solid var(--line); }
.game-main-action { width: 100%; min-height: 52px; justify-content: center; }
.game-tile { position: relative; isolation: isolate; width: 100%; min-height: 138px; padding: 12px; display: flex; align-items: center; gap: 12px; overflow: hidden; text-align: left; color: var(--text); border: 1px solid #789fff38; border-radius: 18px; background: radial-gradient(at 0% 30%,#365d8c70,transparent 65%),#111c2f; }
.game-tile--lotto { background: radial-gradient(at 0% 10%,#9857b65c,transparent 65%),#1c1830; border-color: #c694ff38; }
.game-tile-copy { display: grid; grid-gap: 5px; gap: 5px; flex: 1 1; min-width: 0; }
.game-tile-copy > strong { font-size: 23px; letter-spacing: -.03em; }
.game-tile-copy > span:not(.eyebrow):not(.game-tile-cta) { color: #bac6da; font-size: 13px; line-height: 1.5; }
.game-tile-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #c6dfff; font-size: 13px; font-weight: 700; margin-top: 6px; }
.game-tile-art { width: 82px; flex: 0 0 82px; height: 112px; display: grid; place-items: center; position: relative; }
.game-tile-die { --die-size: 58px; perspective: 500px; transform: rotate(-12deg); }
.game-tile-cards > .lotto-back { width: 62px; height: 94px; position: absolute; inset: auto; transform: rotate(-15deg) translate(-9px,0); }
.game-tile-cards > .lotto-back + .lotto-back { transform: rotate(12deg) translate(12px,0); }
.game-tile-cards .lotto-back-brand b { font-size: 20px; }
.game-tile-cards .lotto-back-brand small { display: none; }
.game-tile-cards .lotto-back-brand svg { width: 17px; }
.game-help { border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; background: var(--surface); color: var(--muted); }
.game-help summary { color: var(--text); font-size: 13px; font-weight: 700; }
.game-help p { margin: 0 0 12px; font-size: 12px; line-height: 1.5; }
.game-help .game-history { padding-bottom: 12px; }
.lotto-stage { padding: 12px 10px; display: grid; grid-gap: 14px; gap: 14px; border: 1px solid #b3a0ff26; border-radius: 18px; background: radial-gradient(ellipse at 50% 25%,#5c387a45,transparent 65%),#0c1320; }
.lotto-heading { text-align: center; }
.lotto-heading h2 { margin: 0 0 5px; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
.lotto-heading p { margin: 0; color: #b9c5d9; font-size: 12px; line-height: 1.4; }
.lotto-grid { --lotto-gap: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-gap: 15px var(--lotto-gap); gap: 15px var(--lotto-gap); width: 100%; max-width: 330px; justify-self: center; }
.lotto-card { position: relative; min-width: 0; min-height: 7.5em; width: 100%; aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: 12px; background: transparent; color: white; perspective: 650px; -webkit-tap-highlight-color: transparent; }
.lotto-card:disabled { opacity: 1; cursor: default; }
.lotto-card-inner { display: block; position: relative; width: 100%; height: 100%; }
/* Two positive-scale faces avoid mirrored nested text in Telegram/iOS WebViews. */
.lotto-card .lotto-back { transform: scaleX(1); visibility: visible; transition: transform .3s .3s, visibility 0s .3s; }
.lotto-card[data-open="true"] .lotto-back { transform: scaleX(0); visibility: hidden; transition: transform .3s, visibility 0s .3s; }
.lotto-card .lotto-front { transform: scaleX(0); visibility: hidden; transition: transform .3s, visibility 0s .3s; }
.lotto-card[data-open="true"] .lotto-front { transform: scaleX(1); visibility: visible; transition: transform .3s .3s, visibility 0s .3s; }
.lotto-grid[data-shuffling="true"] .lotto-card { animation: lotto-shuffle 2.4s var(--shuffle-delay,0ms) ease-in-out both; }
.lotto-grid[data-shuffling="true"] .lotto-card-number { opacity: 0; }
@keyframes lotto-shuffle {
  0%,100% { transform: translate(0,0) rotate(0); }
  28% { transform: translate(var(--stack-x),var(--stack-y)) rotate(var(--mix-angle)); }
  43% { transform: translate(calc(var(--stack-x) + var(--mix-x)),var(--stack-y)) rotate(calc(0deg - var(--mix-angle))); }
  58% { transform: translate(calc(var(--stack-x) - var(--mix-x)),var(--stack-y)) rotate(var(--mix-angle)); }
  72% { transform: translate(var(--stack-x),var(--stack-y)) rotate(0); }
}
.lotto-back, .lotto-front { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; border: 2px solid #e0d9ff; border-radius: 11px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: 0 8px 20px #0004; }
.lotto-back { background: radial-gradient(ellipse at 110% 95%,#ff899e 0%,#e582bc 33%,transparent 34%),radial-gradient(ellipse at -10% 10%,#b4a5ff,transparent 60%),linear-gradient(145deg,#6551b6,#8c77d5 55%,#ec92ac); }
.lotto-back::before { content: ''; position: absolute; width: 170%; height: 60%; border: 8px solid #fff2; border-radius: 50%; transform: rotate(-40deg); }
.lotto-back::after { content: ''; position: absolute; top: 8px; left: 8px; width: 5px; height: 5px; background: #fff9; border-radius: 50%; }
.lotto-back-orbit { position: absolute; inset: 5px; border: 1px solid #fff4; border-radius: 6px; }
.lotto-back-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 1; transform: rotate(-10deg); text-shadow: 0 2px 6px #47337955; }
.lotto-back-brand b { font-size: clamp(18px,5.5vw,32px); line-height: .94; letter-spacing: -.05em; font-weight: 950; }
.lotto-back-brand small { font-size: 5px; letter-spacing: .1em; font-weight: 800; }
.lotto-front { background: radial-gradient(at 50% 0%,#765b2633,transparent),#192338; border-color: #f4d183; gap: 8px; padding: 8px 4px; color: #ffe0a2; }
.lotto-front strong { font-size: clamp(19px,6vw,30px); }
.lotto-front > span { font-size: clamp(9px,2.5vw,12px); color: #e1e7f5; }
.lotto-front[data-tone="ice"] { border-color: #89d5f6; color: #89d5f6; background: linear-gradient(155deg,#284658,#172338); }
.lotto-front[data-tone="violet"] { border-color: #b8a1ff; color: #c5b2ff; background: linear-gradient(155deg,#42355e,#172338); }
.lotto-card-number { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #151e30; border: 1px solid #bca5f3; font-size: 10px; }
.lotto-card[data-picked="true"] { filter: drop-shadow(0 0 10px #e6c16780); }
.lotto-card[data-picked="true"] .lotto-card-number { background: #d4ae58; color: #141414; }
.lotto-card[data-selecting="true"] { animation: brand-breathe .6s ease-in-out infinite; }
.game-prize { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: #d5ab4317; border: 1px solid #e3c16d55; border-radius: 16px; color: #ffe0a2; }
.game-prize strong, .game-prize small { display: block; }
.game-prize small { color: #bbc8dc; margin-bottom: 3px; font-size: 12px; }
.game-prize[data-tone="ice"] { color: #89d5f6; border-color: #89d5f655; background: #89d5f617; }
.dice-arena { --die-size: 76px; position: relative; height: 208px; display: grid; place-items: center; border-radius: 18px; overflow: hidden; border: 1px solid #93baff24; background: radial-gradient(ellipse at 50% 25%,#385e9166,transparent 65%),linear-gradient(#111e33,#121827); }
.dice-camera { perspective: 650px; transform: translateY(8px) rotateX(-14deg) rotateY(-18deg); transform-style: preserve-3d; }
.dice-toss { transform-style: preserve-3d; }
.dice-body { width: var(--die-size); height: var(--die-size); position: relative; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.8,.3,1); }
.dice-face { position: absolute; inset: 0; padding: 14%; border-radius: 8%; background: linear-gradient(145deg,#fff,#e7edf5 70%,#c6cfdb); border: 1px solid #cfd9e5; box-shadow: inset 0 0 8px #fff; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.dice-cell { display: grid; place-items: center; }
.dice-cell i { width: 68%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#3e4651,#161c25); box-shadow: inset 0 2px 2px #0007; }
.dice-shadow { position: absolute; width: 110px; height: 22px; top: 72%; border-radius: 50%; background: #0008; filter: blur(7px); }
.dice-arena-rings { position: absolute; width: 230px; height: 90px; bottom: 33px; border-radius: 50%; border: 1px solid #7fa9e51f; box-shadow: 0 0 0 18px #789ad409,0 0 0 38px #789ad406; }
.dice-stage-caption { position: absolute; bottom: 16px; font-size: 12px; color: #a5b8d2; }
.dice-arena[data-phase="throw"] .dice-toss { animation: dice-throw .8s ease-in-out infinite; }
.dice-body[data-rolling="true"] { animation: dice-tumble .8s linear infinite; }
.dice-arena[data-phase="throw"] .dice-shadow { animation: dice-shadow .8s ease-in-out infinite; }
.dice-arena[data-phase="land"] .dice-toss { animation: dice-land .55s ease-out both; }
.dice-outcome { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; text-align: left; color: #b8c9df; }
.dice-outcome p { margin: 0; font-size: 13px; max-width: 28ch; }
.dice-outcome small, .dice-outcome strong { display: block; }
.dice-outcome strong { font-size: 17px; color: #fff; margin-top: 4px; }
.game-history { display: grid; grid-gap: 9px; gap: 9px; }
.game-history h2 { font-size: 17px; margin: 8px 0; }
.game-history-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.game-history-row > span:nth-child(2) { flex: 1 1; min-width: 0; }
.game-history-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.game-history-row b { font-size: 13px; }
.game-history-value { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #e8edf6; color: #202a3a; font-weight: 800; }
@keyframes dice-throw { 0%,100% { transform: translateY(15px) scale(1.03,.96); } 45% { transform: translateY(-58px) scale(.92); } }
@keyframes dice-tumble { from { transform: rotateX(0) rotateY(0) rotateZ(0); } to { transform: rotateX(360deg) rotateY(540deg) rotateZ(180deg); } }
@keyframes dice-shadow { 0%,100% { transform: scale(1); opacity: .8; } 45% { transform: scale(.6); opacity: .25; } }
@keyframes dice-land { 0% { transform: translateY(-30px); } 55% { transform: translateY(16px) scale(1.07,.93); } 80% { transform: translateY(2px); } 100% { transform: translateY(0); } }
@media (max-width: 380px) {
  .game-tile-art { flex-basis: 70px; width: 70px; }
  .game-tile-die { --die-size: 52px; }
  .game-tile-cards > .lotto-back { width: 54px; height: 82px; }
  .game-tile-cards .lotto-back-brand b { font-size: 18px; }
  .game-tile-copy > strong { font-size: 22px; }
  .lotto-grid { --lotto-gap: 8px; }
  .lotto-back-brand svg { width: 17px; height: 17px; }
}

.inventory-screen { display: grid; width: 100%; max-width: 680px; margin: 0 auto; grid-gap: 14px; gap: 14px; min-width: 0; }
.inventory-header > div { flex: 1 1; min-width: 0; }
.inventory-header > .icon-control { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.inventory-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-gap: 8px; gap: 8px; padding: 12px 8px; background: linear-gradient(130deg,#233452,#131d30); border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.inventory-summary strong { display: block; font-size: 25px; }
.inventory-summary small { display: block; font-size: 10px; color: #9fb3d0; margin-top: 4px; }
.inventory-progress { height: 4px; background: #273148; border-radius: 10px; overflow: hidden; }
.inventory-progress span { display: block; height: 100%; background: linear-gradient(90deg,#5aa7ff,#b899ff); border-radius: inherit; }
.inventory-history-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-gap: 8px; gap: 8px; }
.inventory-history-button { min-width: 0; min-height: 46px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #b4a3ff44; border-radius: 13px; background: linear-gradient(135deg,#1a2740,#171b31); color: #cfc2ff; font-size: 11px; font-weight: 750; text-align: left; }
.inventory-history-button svg { flex: 0 0 auto; }
.inventory-history-button span { min-width: 0; overflow-wrap: anywhere; }
.inventory-history-button b { margin-left: auto; color: #fff; font-size: 11px; }
.inventory-history-dialog { width: 100%; max-width: 440px; max-height: min(680px,calc(100dvh - 32px)); overflow: hidden; display: flex; flex-direction: column; border: 1px solid #8caeff55; border-radius: 22px; background: linear-gradient(155deg,#1b2942,#101725); box-shadow: 0 18px 60px #0008; }
.inventory-history-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.inventory-history-dialog h2 { margin: 4px 0 0; font-size: 20px; }
.inventory-history-dialog p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.inventory-dialog-kicker { display: inline-flex; align-items: center; gap: 5px; color: #bfaeff; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.inventory-history-dialog > .inventory-history-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 14px 14px; }
.inventory-drop-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.inventory-drop-art { width: 42px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: #0b1322; color: #8bbdff; }
.inventory-drop-art img { width: 100%; height: 100%; object-fit: cover; }
.inventory-drop-copy { min-width: 0; flex: 1 1; }
.inventory-drop-copy strong,.inventory-drop-copy small,.inventory-drop-copy time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-drop-copy strong { color: var(--text); font-size: 12px; }
.inventory-drop-copy small,.inventory-drop-copy time { margin-top: 3px; color: var(--muted); font-size: 10px; }
.inventory-drop-row > b { color: #b4e8ce; white-space: nowrap; font-size: 12px; }
.inventory-history-empty { display: grid; place-items: center; grid-gap: 6px; gap: 6px; padding: 34px 16px; color: var(--muted); text-align: center; }
.inventory-history-empty p { margin: 0; }
.inventory-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; color: var(--muted); }
.inventory-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 14px 0; font-size: 14px; }
.collection-screen .inventory-search input { background: transparent !important; }
.inventory-search button { border: 0; background: transparent; color: var(--muted); min-height: 44px; }
.inventory-rarities { display: flex; gap: 6px; flex-wrap: wrap; }
.inventory-rarities button { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11px; }
.inventory-rarities button[aria-pressed="true"] { color: var(--rarity,#a8cfff); border-color: currentColor; background: var(--surface-2); }
.inventory-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-gap: 8px; gap: 8px; }
.inventory-filters label { display: flex; align-items: center; gap: 5px; padding: 5px 8px; color: #9ebaf1; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.inventory-filters select { min-width: 0; width: 100%; min-height: 38px; border: 0; background: transparent; color: var(--text); font-size: 11px; }
.inventory-filters option { background: var(--surface); }
.inventory-rules { border: 1px solid #b4a3ff30; border-radius: 16px; padding: 8px 12px; background: #a897ed09; }
.inventory-rules summary { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: #c6b6ff; }
.inventory-rules p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.inventory-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-gap: 12px; gap: 12px; }
.inventory-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; border-radius: 18px; border: 1px solid color-mix(in srgb,var(--rarity) 30%,transparent); color: var(--text); background: linear-gradient(155deg,#1b2a40,#121a29); text-align: left; }
.inventory-art { display: block; width: 100%; aspect-ratio: 4/5; position: relative; padding: 6px; background: #070d18; }
.inventory-art img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 12px; }
.inventory-detail-art img { width: 100%; height: auto; display: block; object-fit: contain; border-radius: 12px; }
.inventory-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--rarity,var(--accent)); background: radial-gradient(at 50% 35%,#2c3e5d,#111827); border-radius: 12px; }
.inventory-count { position: absolute; top: 10px; right: 10px; padding: 5px 7px; font-size: 11px; font-weight: 800; border: 1px solid #ffffff24; background: #111827e6; border-radius: 8px; }
.inventory-rarity-mark { position: absolute; bottom: 11px; left: 11px; color: var(--rarity); background: #101827dd; padding: 5px; border-radius: 8px; }
.inventory-card-copy { display: grid; grid-gap: 5px; gap: 5px; padding: 11px 10px 12px; width: 100%; }
.inventory-card-copy strong { font-size: 13px; line-height: 1.35; }
.inventory-card-copy small { font-size: 10px; color: var(--rarity); }
.inventory-meta { color: var(--muted); font-size: 10px; line-height: 1.5; }
.inventory-ready { display: inline-flex; align-items: center; gap: 4px; color: #b4e8ce; font-size: 10px; line-height: 1.5; }
.inventory-empty { padding: 25px 16px; display: grid; justify-items: center; grid-gap: 8px; gap: 8px; text-align: center; color: var(--muted); }
.inventory-empty h3, .inventory-empty p { margin: 0; }
.inventory-empty p { font-size: 13px; }
.inventory-receipt { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 12px; border-top: 1px solid var(--line); }
.inventory-receipt > span { flex: 1 1; min-width: 0; }
.inventory-receipt small { display: block; color: var(--muted); margin-top: 4px; }
.inventory-receipt b { color: #b4e8ce; }
.dialog-layer > .inventory-detail { position: relative; width: min(100%, 330px); max-width: 330px; max-height: min(78dvh,600px); padding: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 22px 22px 0 0; background: linear-gradient(150deg,#23324b,#111928); animation: inventory-detail-in .2s ease-out both; }
.dialog-layer > article.inventory-detail { max-width: 330px; max-height: min(78dvh,600px,calc(100% - var(--safe-top) - 12px)) !important; }
.inventory-detail-handle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 44px; padding: 6px 12px; background: #172339; color: #b7c8de; font-size: 11px; border: 0; border-bottom: 1px solid var(--line); cursor: -webkit-grab; cursor: grab; touch-action: none; }
.inventory-handle-bar { width: 40px; height: 4px; border-radius: 999px; background: #91a8c566; }
.inventory-detail-header > span { color: #b7c8de; font-size: 12px; }
.inventory-close { position: static; width: 44px; height: 44px; background: #0c1528e8; border: 1px solid var(--line); border-radius: 50%; color: var(--text); }
.inventory-detail > .inventory-detail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.inventory-detail-body > * { flex-shrink: 0; }
.inventory-detail-art { align-self: center; width: min(100%, 178px); height: auto; min-height: 0; border-radius: 13px; overflow: hidden; background: transparent; }
.inventory-detail h2 { font-size: 20px; margin: 7px 0; }
.inventory-detail p { font-size: 12px; line-height: 1.45; margin: 5px 0; color: #adbed4; }
.inventory-detail-rarity { display: inline-flex; align-items: center; gap: 6px; color: var(--rarity); font-size: 12px; }
.inventory-detail-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-gap: 6px; gap: 6px; background: #0b14266b; padding: 9px; border-radius: 13px; }
.inventory-detail-stats small { display: block; font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.inventory-detail-stats b { font-size: 12px; }
.inventory-exchange { padding: 0; background: #bfa0ff0c; border: 1px solid #c4a4ff3a; border-radius: 14px; overflow: hidden; }
.inventory-exchange summary { display: flex; align-items: center; gap: 7px; min-height: 43px; padding: 7px 10px; list-style: none; color: #dbc9ff; font-size: 12px; font-weight: 750; cursor: pointer; }
.inventory-exchange summary::-webkit-details-marker { display: none; }
.inventory-exchange summary::after { content: '⌄'; margin-left: auto; color: #a99bce; font-size: 16px; }
.inventory-exchange[open] summary::after { content: '⌃'; }
.inventory-exchange summary span { white-space: nowrap; }
.inventory-exchange summary b { margin-left: auto; color: #bfe2ff; font-size: 10px; font-weight: 650; }
.inventory-exchange-body { display: grid; grid-gap: 8px; gap: 8px; padding: 0 10px 10px; }
.inventory-exchange p { margin: 0; }
.inventory-exchange small { font-size: 11px; color: var(--muted); }
.inventory-exchange .inventory-warning { color: #ffd896; }
.inventory-screen .control-btn, .inventory-detail .control-btn { border: 1px solid var(--line); justify-content: center; }
@keyframes inventory-detail-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .dialog-layer > .inventory-detail { animation: none; } }

/* Compact mobile profile: a friend-card style identity block. */
.profile-screen { max-width: 520px; gap: 9px; padding-top: 8px; }
.profile-hero { min-height: 0; border-radius: 17px; background-position: center; }
.profile-hero-shade { background: linear-gradient(90deg, #0b1019f2 0%, #0b1019cf 48%, #0b101944 100%); }
.profile-settings-button { position: absolute; z-index: 3; top: 8px; right: 8px; display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 1px solid #d2e4ff55; border-radius: 12px; background: #07101bb8; color: #e4efff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.profile-settings-button:active { transform: scale(.94) rotate(12deg); }
.profile-hero[data-frame="blue"], .profile-avatar[data-frame="blue"] { box-shadow: 0 0 0 2px #65b9ff, 0 8px 20px #0008; }
.profile-hero[data-frame="violet"], .profile-avatar[data-frame="violet"] { box-shadow: 0 0 0 2px #bd78ff, 0 8px 20px #0008; }
.profile-hero[data-frame="gold"], .profile-avatar[data-frame="gold"] { box-shadow: 0 0 0 2px #f2c45f, 0 8px 20px #0008; }
.profile-hero[data-frame="rose"], .profile-avatar[data-frame="rose"] { box-shadow: 0 0 0 2px #f37d9f, 0 8px 20px #0008; }
.profile-hero[data-frame="mint"], .profile-avatar[data-frame="mint"] { box-shadow: 0 0 0 2px #62dca8, 0 8px 20px #0008; }
.profile-identity { min-height: 0; padding: 12px 13px; display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto; align-content: center; align-items: center; grid-gap: 0 11px; gap: 0 11px; text-align: left; }
.profile-avatar { grid-row: auto; width: 56px; height: 56px; font-size: 24px; border-width: 2px; border-color: #edf5ff; box-shadow: 0 0 0 3px #83b5ff25, 0 7px 16px #0008; }
.profile-person-copy { min-width: 0; display: grid; grid-gap: 2px; gap: 2px; align-content: center; }
.profile-identity h1 { min-width: 0; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 18px; line-height: 1.15; }
.profile-identity p { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c1dcff; font-size: 12px; }
.profile-identity small { margin: 0; font-size: 10px; line-height: 1.2; }
.profile-roles { justify-content: flex-start; gap: 4px; margin-top: 4px; }
.profile-person-copy :is(.role-badge, .decoration-badge) { max-width: 100%; overflow-wrap: anywhere; gap: 4px; padding: 3px 6px; border-radius: 7px; font-size: 11px; line-height: 1.25; }
.profile-person-copy .profile-roles { grid-column: auto; max-height: 24px; overflow: hidden; }
.profile-person-copy .profile-roles:empty { display: none; }
.profile-person-copy .decoration-badge { grid-column: auto; justify-self: start; margin-top: 3px; }
.profile-menu { gap: 7px; }
.profile-menu .panel-menu-button { min-height: 48px; padding: 7px 9px; gap: 9px; border-radius: 14px; }
.profile-menu .panel-menu-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; }
.profile-menu .panel-menu-icon svg { width: 20px; height: 20px; }
.profile-menu .panel-menu-title { font-size: 14px; line-height: 1.15; }
.profile-menu .panel-menu-description { display: none; }
.profile-menu .panel-menu-chevron { font-size: 21px; }
.profile-management { margin-top: 3px; padding-top: 3px; border-top: 1px solid var(--line); }

.compact-page .economy-content { gap: 9px; }
.compact-page .panel-hero, .compact-page .profile-section-header { padding: 11px 13px; border-radius: 15px; }
.compact-page .panel-hero h1, .compact-page .profile-section-heading h1 { font-size: 20px; }
.compact-page .panel-hero p, .compact-page .profile-section-header p { display: none; }
.compact-page .wallet-panel { padding: 10px 12px; border-radius: 14px; }
.compact-page .wallet-panel strong { font-size: 24px; }
.compact-page .economy-panel { padding: 12px; border-radius: 15px; }
.compact-page .economy-content > h2 { font-size: 16px; }
.compact-page .segmented-control { padding: 3px; border-radius: 13px; }
.compact-page .segmented-control button { min-height: 38px; padding: 7px 5px; }
.compact-page .shop-grid { gap: 7px; }
.compact-page .shop-product { grid-template-columns: 54px minmax(0, 1fr); gap: 7px 9px; padding: 9px; border-radius: 14px; }
.compact-page .shop-product-art, .compact-page .shop-product-art img { height: 64px; }
.compact-page .shop-product h2 { font-size: 14px; line-height: 1.2; }
.compact-page .shop-product p, .compact-page .shop-limit { display: none; }
.compact-page .shop-product-footer .control-btn { min-height: 38px; padding: 7px 10px; font-size: 13px; }
.compact-page .leader-row { padding: 9px 10px; border-radius: 13px; }
.compact-page .leader-avatar { width: 36px; height: 36px; border-radius: 11px; }
.compact-page .profile-stat-grid { gap: 6px; }
.compact-page .profile-stat-grid strong { font-size: 19px; }
.profile-customization .profile-banner-editor { gap: 8px; }
.profile-customization .profile-banner-editor h2, .profile-customization .cosmetic-section h2 { font-size: 16px; }
.profile-banner-controls { display: grid; grid-gap: 8px; gap: 8px; border: 0; padding: 0; margin: 0; }
.profile-banner-controls:disabled { opacity: .62; }
.subscription-lock { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 11px; border: 1px solid #ad78e855; border-radius: 13px; background: #8b54b41b; color: #e3ccff; font-size: 12px; }
.subscription-lock > svg { flex: 0 0 auto; }
.subscription-lock > span { flex: 1 1 150px; }
.setting-row { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.setting-row > div { min-width: 0; flex: 1 1; }
.setting-row b { display: block; font-size: 14px; }
.setting-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.setting-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; color: var(--accent); background: #5aa7ff1c; }
.setting-switch { min-width: 57px; min-height: 34px; padding: 5px 8px; border: 1px solid #62dca866; border-radius: 18px; background: #257a52; color: #fff; font-size: 12px; font-weight: 750; }
.setting-switch[aria-checked="false"] { border-color: var(--line); background: var(--surface-3); color: var(--muted); }
.setting-switch:disabled { opacity: .55; }
.cosmetic-section .economy-row { padding: 5px 0; }
.cosmetic-copy { flex: 1 1; min-width: 0; }
.cosmetic-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cosmetic-preview { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border: 2px solid #65b9ff; border-radius: 12px; color: #cbe6ff; background: #162840; }
.cosmetic-preview--profile_frame { width: 56px; flex-basis: 56px; border-radius: 9px; }
.cosmetic-preview--decoration { border-radius: 50%; }
.cosmetic-preview[data-frame="violet"] { border-color: #bd78ff; color: #e4c9ff; }
.cosmetic-preview[data-frame="gold"] { border-color: #f2c45f; color: #ffe6a5; }
.cosmetic-preview[data-frame="rose"] { border-color: #f37d9f; color: #ffd0dc; }
.cosmetic-preview[data-frame="mint"] { border-color: #62dca8; color: #bff9df; }
.ticket-page .profile-section-header { padding: 11px 13px; }
.ticket-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 3px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); scrollbar-width: none; }
.ticket-tabs { display: none; }
.ticket-tabs button { flex: 1 0 auto; min-height: 36px; padding: 7px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }
.ticket-tabs button[aria-pressed="true"] { background: var(--surface-3); border-color: var(--accent); color: var(--text); }
.ticket-list { display: grid; grid-gap: 7px; gap: 7px; }
.ticket-card { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg,var(--surface-2),var(--surface)); color: var(--text); text-align: left; }
.ticket-card:active { transform: scale(.985); }
.ticket-card-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; color: #ffd38d; background: #c781271e; }
.ticket-card-icon--in_progress { color: #9dcdff; background: #5aa7ff1e; }
.ticket-card-icon--reviewed { color: #8fe1b5; background: #36b8761e; }
.ticket-card-icon--transferred { color: #d5b4ff; background: #9a64e51e; }
.ticket-card-icon--closed { color: #aebaca; background: #8b98a51e; }
.ticket-card-copy { display: grid; grid-gap: 3px; gap: 3px; min-width: 0; flex: 1 1; }
.ticket-card-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ticket-card-copy small { color: var(--muted); font-size: 10px; }
.ticket-status { display: inline-flex; align-items: center; gap: 4px; width: -moz-fit-content; width: fit-content; color: #ffd38d; font-size: 11px; font-weight: 700; }
.ticket-status--in_progress { color: #9dcdff; }.ticket-status--reviewed { color: #8fe1b5; }.ticket-status--transferred { color: #d5b4ff; }.ticket-status--closed { color: #aebaca; }
.ticket-chevron { color: var(--muted); font-size: 22px; }
.ticket-empty, .ticket-staff-note { display: grid; justify-items: center; grid-gap: 6px; gap: 6px; padding: 26px 14px; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); text-align: center; }
.ticket-empty b { color: var(--text); }.ticket-empty small { font-size: 12px; }
.ticket-staff-note { display: flex; justify-content: center; padding: 10px; color: #cdb5ff; font-size: 12px; }
.ticket-create { position: fixed; z-index: 120; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(calc(100% - 24px), 520px); max-height: min(82dvh, 620px); overflow-y: auto; display: grid; grid-gap: 9px; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(160deg,var(--surface-2),var(--surface)); box-shadow: 0 0 0 100vmax rgba(3,8,16,.72), 0 24px 70px #0009; }
.ticket-create-head, .ticket-detail-head, .ticket-compose-row, .ticket-message-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ticket-create h2, .ticket-detail-head h1 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.ticket-create input, .ticket-create textarea, .ticket-compose textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); color: var(--text); resize: vertical; }
.ticket-create textarea, .ticket-compose textarea { min-height: 110px; }
.ticket-attach { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 7px 10px; border: 1px dashed #6388b4; border-radius: 10px; color: #b9d9ff; font-size: 12px; cursor: pointer; overflow: hidden; }
.ticket-attach input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ticket-back { display: none; }
.ticket-detail-head { align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.ticket-detail-head > div:first-child { min-width: 0; }.ticket-detail-head small { color: var(--muted); font-size: 10px; letter-spacing: .08em; }.ticket-detail-head h1 { margin: 4px 0 7px; }
.ticket-label { display: inline-flex; margin-left: 6px; padding: 3px 7px; border-radius: 7px; background: #9a64e51e; color: #d5b4ff; font-size: 10px; font-weight: 750; }
.ticket-label-select { min-height: 34px; max-width: 150px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-3); color: var(--text); font-size: 11px; }
.ticket-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }.ticket-actions .control-chip { min-height: 34px; padding: 6px 8px; font-size: 11px; }
.ticket-thread { display: grid; grid-gap: 7px; gap: 7px; }.ticket-message { padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }.ticket-message-meta { justify-content: flex-start; }.ticket-message-meta b { font-size: 12px; }.ticket-message-meta time { color: var(--muted); font-size: 10px; }.ticket-message p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }.ticket-files { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }.ticket-files a { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 5px 7px; border-radius: 8px; background: var(--surface-3); color: #b9d9ff; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.ticket-compose { display: grid; grid-gap: 7px; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }.ticket-compose-row { justify-content: flex-end; }.ticket-compose-row .ticket-attach { margin-right: auto; }.ticket-compose > small { color: var(--muted); font-size: 11px; }
.analytics-page .economy-content { gap: 12px; }
.analytics-summary { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 9px; gap: 9px; padding: 13px; border: 1px solid #314966; border-radius: 17px; background: linear-gradient(145deg,#1a2d48,#121c30); }
.analytics-summary > div { display: flex; align-items: center; gap: 9px; min-width: 0; }.analytics-summary > div + div { padding-left: 12px; border-left: 1px solid #ffffff18; }.analytics-summary b { display: block; font-size: 23px; line-height: 1; color: #f3f7ff; }.analytics-summary small { display: block; margin-top: 4px; color: #9eb4ce; font-size: 11px; }.analytics-online { color: #73e0ae; }.analytics-live-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #5fe3a2; box-shadow: 0 0 0 4px #5fe3a220; }
.analytics-chart-panel { padding: 14px 12px 11px; border: 1px solid #304967; border-radius: 18px; background: linear-gradient(155deg,#182a43,#101a2c); }.analytics-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }.analytics-eyebrow { color: #76baff; font-size: 10px; font-weight: 800; letter-spacing: .13em; }.analytics-chart-heading h2 { margin: 4px 0 0; font-size: 18px; }.analytics-period { padding: 5px 8px; border: 1px solid #6388b455; border-radius: 8px; color: #b8d6f7; font-size: 11px; }
.analytics-chart-grid { display: grid; grid-template-columns: 27px minmax(0,1fr); grid-gap: 6px; gap: 6px; height: 170px; margin-top: 15px; }.analytics-y-labels { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 20px; color: #7790ae; font-size: 10px; text-align: right; }.analytics-bars { display: flex; align-items: stretch; justify-content: space-around; gap: 5px; min-width: 0; }.analytics-bar-wrap { display: flex; flex: 1 1; min-width: 0; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }.analytics-bar-track { display: flex; align-items: flex-end; width: 100%; height: 145px; border-bottom: 1px solid #6985a533; background: repeating-linear-gradient(to top, transparent 0, transparent 47px, #6985a315 48px); }.analytics-bar { position: relative; display: block; width: min(28px,70%); min-height: 6px; margin: 0 auto; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg,#7ec7ff,#4776e8); box-shadow: 0 4px 14px #4e91ff55; transition: height .35s ease; }.analytics-bar i { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); color: #bcdcff; font-size: 9px; font-style: normal; white-space: nowrap; }.analytics-bar-wrap small { color: #839ab6; font-size: 10px; text-transform: capitalize; }
.analytics-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }.analytics-section-title h2 { margin: 2px 0 0; font-size: 18px; }.analytics-section-title small { color: var(--muted); font-size: 11px; }.analytics-metric-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-gap: 8px; gap: 8px; }.analytics-metric { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px; border: 1px solid color-mix(in srgb,var(--metric-color) 28%,var(--line)); border-radius: 14px; background: color-mix(in srgb,var(--metric-color) 7%,var(--surface)); }.analytics-metric-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; color: var(--metric-color); background: color-mix(in srgb,var(--metric-color) 14%,transparent); }.analytics-metric b { display: block; color: #f4f7ff; font-size: 17px; line-height: 1.05; }.analytics-metric small { display: block; margin-top: 3px; overflow: hidden; color: #9aafc8; font-size: 10px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }

/* The card sheet touches the bottom edge; safe-area padding stays inside its scrollable content. */
.dialog-layer:has(> article.inventory-detail) { padding-bottom: 0 !important; }
.dialog-layer > article.inventory-detail { width: min(100%, 360px); max-width: 360px; max-height: min(86dvh, 680px, calc(100% - var(--safe-top) - 12px)) !important; border-radius: 22px 22px 0 0 !important; }
.dialog-layer > article.inventory-detail > .inventory-detail-body { padding-bottom: calc(var(--safe-bottom) + 14px); }
@media (max-width: 380px) {
  .profile-identity { grid-template-columns: 50px minmax(0, 1fr); padding: 10px; gap: 0 9px; }
  .profile-avatar { width: 50px; height: 50px; }
  .profile-identity h1 { font-size: 17px; }
  .profile-menu .panel-menu-button { min-height: 46px; }
}
@media (min-width: 580px) { .inventory-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 360px) { .inventory-filters { grid-template-columns: minmax(0,1fr); } }

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

/* Final mobile pass: consistent rhythm and collision-safe action layouts. */
.app-content {
  align-items: center !important;
  padding: 12px 14px calc(84px + var(--safe-bottom)) !important;
}
.app-nav {
  min-height: calc(60px + var(--safe-bottom));
  padding-top: 3px !important;
  padding-bottom: var(--safe-bottom) !important;
}
.app-nav button {
  min-height: 56px !important;
  gap: 2px !important;
  padding-top: 6px !important;
  padding-bottom: 5px !important;
  line-height: 1.05;
}
.app-nav button > span:first-child {
  width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
}
.home-screen {
  width: min(100%, 390px);
  padding: 20px 16px !important;
  border-radius: 22px;
}
.home-screen > button { width: min(100%, 320px); }
.profile-screen,
.collection-screen,
.trades-screen,
.games-hub,
.game-content { padding-top: 0 !important; }
.inventory-screen { gap: 11px; }
.inventory-grid { gap: 9px; }
.inventory-card-copy { padding: 9px 9px 10px; }
.inventory-card-copy strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.game-content, .games-hub { gap: 12px; }
.dialog-layer > :is(div, section, article) { max-width: min(100%, 560px); }
.dialog-layer .economy-actions,
.dialog-layer .form-actions { flex-wrap: wrap; }
.dialog-layer .economy-actions > button,
.dialog-layer .form-actions > button { flex: 1 1 130px; }

@media (max-width: 380px) {
  .app-content { padding-left: 10px !important; padding-right: 10px !important; }
  .home-screen { padding-left: 12px !important; padding-right: 12px !important; }
  .inventory-grid { gap: 7px; }
  .inventory-card-copy strong { font-size: 12px; }
  .profile-wallets { gap: 7px; }
  .profile-wallets button { padding: 10px; }
  .profile-wallets strong { font-size: 19px; }
}

@media (min-width: 700px) {
  .app-shell { max-width: 1180px; }
  .app-content { padding: 24px 28px calc(108px + var(--safe-bottom)) !important; }
  .app-content > * { width: min(100%, 1040px); }
  .home-screen { max-width: 620px; padding: 36px 34px !important; }
  .inventory-screen { max-width: 1040px; gap: 18px; }
  .inventory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 16px; }
  .inventory-art { padding: 8px; }
  .inventory-card-copy { padding: 13px 13px 15px; gap: 6px; }
  .inventory-card-copy strong { font-size: 15px; }
  .inventory-card-copy small, .inventory-meta, .inventory-ready { font-size: 11px; }
  .dialog-layer > article.inventory-detail { width: min(92vw, 520px); max-width: 520px; max-height: min(90dvh, 820px) !important; border-radius: 24px !important; }
  .inventory-detail > .inventory-detail-body { padding: 18px 22px calc(var(--safe-bottom) + 22px); gap: 15px; }
  .inventory-detail-art { width: min(100%, 270px); }
  .inventory-detail h2 { font-size: 25px; }
  .inventory-detail p { font-size: 14px; }
  .inventory-detail-stats { gap: 10px; padding: 12px; }
  .inventory-detail-stats b { font-size: 14px; }
  .app-nav { width: min(100%, 1180px); }
}
@media (min-width: 1050px) { .inventory-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 18px; } .inventory-card-copy strong { font-size: 16px; } }

/* Global responsive bounds: fluid on phones, comfortably capped on large windows. */
html { min-width: 320px; }
.app-shell, .app-nav { max-width: 1180px; }
.app-content { min-width: 0; overflow-x: clip; }
.app-content > *, .mobile-page > div, .admin-area > main, .mod-area > main { min-width: 0; max-width: 1040px; }
.inventory-grid, .shop-grid, .leaderboard, .analytics-metric-grid { min-width: 0; }
img, svg, video, canvas { max-width: 100%; }
@media (min-width: 700px) {
  .app-content { padding-left: clamp(20px, 4vw, 48px) !important; padding-right: clamp(20px, 4vw, 48px) !important; }
  .mobile-page > div, .admin-area > main, .mod-area > main { width: min(100%, 1040px); margin-inline: auto; }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .app-shell, .app-nav { max-width: 1280px; }
  .app-content > *, .mobile-page > div, .admin-area > main, .mod-area > main { max-width: 1120px; }
}

