:root {
  --bg: #0f151d;
  --panel: #151d27;
  --panel-2: #1e2a36;
  --text: #eff5f7;
  --muted: #9fb1bc;
  --line: rgba(255, 255, 255, .11);
  --green: #10b36b;
  --yellow: #f0c84b;
  --blue: #4aa3ff;
  --red: #ef5a5a;
  --ink: #071016;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

[data-theme="light"] {
  --bg: #eef3f5;
  --panel: #ffffff;
  --panel-2: #e7eef2;
  --text: #13212a;
  --muted: #5c6b74;
  --line: rgba(19, 33, 42, .14);
  --ink: #f8fbfc;
  --shadow: 0 22px 58px rgba(35, 56, 70, .18);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 20%, rgba(16, 179, 107, .16), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(74, 163, 255, .14), transparent 28%),
    linear-gradient(135deg, #0b1017, var(--bg) 58%, #121821);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: block;
  padding: 0;
  background: var(--panel);
}

.sidebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  min-height: 0;
  padding: 0 max(12px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom));
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--green), #0c764b 50%, var(--yellow));
  color: #fff;
  font-weight: 950;
  letter-spacing: 0;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand span,
.side-meter span,
.setting-row span,
.hero-copy span,
.qr-head span,
.empty-state span,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
}

.nav-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  width: min(430px, calc(100% - 8px));
  min-height: 70px;
  margin: 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(19, 33, 42, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .16);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.nav-btn {
  position: relative;
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #5c6b74;
  text-align: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.message-count-badge,
.account-message-badge {
  position: absolute;
  z-index: 2;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(239, 68, 68, .26);
}

.message-count-badge {
  right: 12px;
  top: 5px;
}

.nav-btn span:last-child {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-btn.active {
  color: var(--green);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nav-ico {
  width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  color: currentColor;
}

.nav-ico svg,
.map-action svg,
.map-target-btn svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn-primary {
  min-height: 64px;
  transform: translateY(-10px);
  color: var(--green);
}

.nav-btn-primary .nav-ico {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #11bd75, #078c58);
  box-shadow: 0 14px 28px rgba(16, 179, 107, .34);
}

.nav-btn-primary .nav-ico svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.3;
}

.brand,
.side-meter {
  display: none;
}

.side-meter {
  margin-top: auto;
  display: none;
  gap: 8px;
}

.side-meter strong {
  font-size: 34px;
}

.line-meter {
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .1);
}

.line-meter i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--blue));
}

.phone-frame {
  min-height: 100vh;
  max-height: none;
  overflow: auto;
  border: 0;
  background: var(--panel);
  box-shadow: none;
  scrollbar-width: thin;
  padding-bottom: 104px;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px max(18px, calc((100vw - 980px) / 2 + 18px)) 12px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-bottom: 1px solid var(--line);
}

.top-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-shell:not([data-view="map"]) .topbar {
  padding-top: 12px;
  padding-bottom: 10px;
}

.app-shell:not([data-view="map"]) .eyebrow {
  display: none;
}

.app-shell:not([data-view="map"]) .top-actions {
  display: none;
}

.app-shell:not([data-view="map"]) h1 {
  font-size: 22px;
}

.top-actions,
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

h1 {
  margin: 2px 0 0;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: 0;
}

.icon-btn,
.account-btn,
.account-chip,
.share-btn,
.text-btn,
.ghost-btn,
.primary-btn,
.danger-btn,
.segmented button,
.dialog-close {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.icon-btn {
  width: 42px;
  padding: 0;
  font-size: 12px;
  font-weight: 900;
}

.account-btn {
  min-width: 74px;
  padding: 0 12px;
  color: #071016;
  background: #fff;
  font-size: 12px;
  font-weight: 950;
}

.account-btn.connected {
  color: #06382f;
  border-color: rgba(16, 179, 107, .36);
  background: #c9f7ed;
}

#google-login.connected {
  display: none;
}

.google-logo-btn {
  width: 42px;
  min-width: 42px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border-color: rgba(19, 33, 42, .12);
  background: #fff;
}

.google-logo-btn img {
  width: 23px;
  height: 23px;
  display: block;
  object-fit: contain;
}

.account-chip {
  position: relative;
  min-height: 42px;
  display: grid;
  grid-template-columns: 36px minmax(0, auto);
  align-items: center;
  gap: 8px;
  max-width: min(190px, 42vw);
  padding: 3px 10px 3px 3px;
  border-color: rgba(19, 33, 42, .12);
  background: rgba(255, 255, 255, .62);
  color: #13212a;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.account-message-badge {
  right: -7px;
  top: -7px;
}

.message-count-badge[hidden],
.account-message-badge[hidden] {
  display: none;
}

.account-photo {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--green), var(--blue));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.72);
  isolation: isolate;
}

.account-photo::before {
  grid-area: 1 / 1;
  content: attr(data-initials);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  position: relative;
  z-index: 0;
}

.account-photo img {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #fff;
  object-fit: contain;
  object-position: center center;
}

.account-photo img[hidden] {
  display: none;
}

.account-photo::after,
.profile-photo-edit::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background:
    linear-gradient(180deg, transparent, rgba(2,15,29,.48));
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 2;
}

.account-chip.connected .account-photo {
  cursor: pointer;
}

.account-chip.connected .account-photo:hover::after,
.profile-photo-edit:hover::after,
.profile-photo-edit.uploading::after {
  opacity: 1;
}

#account-name-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-btn {
  min-height: 36px;
  padding: 0 10px;
  color: #071016;
  background: #f0c84b;
  border-color: transparent;
  font-size: 12px;
  font-weight: 950;
}

.tutorial-btn {
  color: #fff;
  background: #12b8a8;
}

.hero-band {
  position: relative;
  min-height: 154px;
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 14px;
  width: min(980px, calc(100% - 32px));
  margin: 16px auto;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(16, 179, 107, .35), rgba(74, 163, 255, .18)),
    var(--panel-2);
}

.pitch-visual {
  position: absolute;
  inset: 0;
  opacity: .34;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.45) 50%, transparent 50.5%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 48px);
}

.pitch-visual span {
  position: absolute;
  border: 1px solid rgba(255,255,255,.5);
}

.pitch-visual span:nth-child(1) {
  left: 18px;
  top: 34px;
  width: 70px;
  height: 86px;
}

.pitch-visual span:nth-child(2) {
  right: 18px;
  top: 34px;
  width: 70px;
  height: 86px;
}

.pitch-visual span:nth-child(3) {
  left: calc(50% - 34px);
  top: 42px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
}

.progress-ring {
  position: relative;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(var(--yellow) calc(var(--progress, 0) * 1%), rgba(255,255,255,.14) 0);
}

.progress-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: var(--panel);
}

.progress-ring strong,
.progress-ring span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.progress-ring strong {
  font-size: 26px;
}

.progress-ring span {
  margin-top: 30px;
  color: var(--muted);
  font-size: 11px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.hero-copy strong {
  font-size: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 16px 16px;
}

.stats-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.stats-grid span {
  color: var(--muted);
  font-size: 11px;
}

.stats-grid strong {
  font-size: 24px;
}

.toolbar {
  position: relative;
  z-index: 120;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 16px 14px;
  overflow: visible;
}

.search-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
}

.search-box input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--text);
  outline: none;
}

textarea {
  resize: vertical;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.sticker-mode-toggle {
  position: relative;
  z-index: 1;
  width: 108px;
  height: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #16c763;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.42),
    0 10px 22px rgba(22,199,99,.22);
  isolation: isolate;
  transition: background .22s ease, box-shadow .22s ease;
}

.sticker-mode-toggle::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 0;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15,23,42,.18);
  transition: transform .22s ease;
}

body.sticker-mode-remove .sticker-mode-toggle {
  background: #ef3f2d;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.42),
    0 10px 22px rgba(239,63,45,.22);
}

body.sticker-mode-remove .sticker-mode-toggle::before {
  transform: translateX(calc(100% + 4px));
}

.sticker-mode-toggle button {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  cursor: pointer;
  line-height: 1;
  box-shadow: none;
  transition: color .2s ease;
}

.sticker-mode-toggle button.active {
  color: #16a34a;
  background: transparent;
  box-shadow: none;
}

.sticker-mode-toggle button[data-sticker-mode="remove"].active {
  color: #dc2626;
  background: transparent;
}

.sticker-mode-toggle button:focus-visible {
  outline: 2px solid rgba(255,255,255,.95);
  outline-offset: 2px;
}

.segmented.small {
  grid-template-columns: repeat(2, minmax(64px, 1fr));
}

.segmented button {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.segmented button.active {
  color: #071016;
  background: var(--yellow);
  border-color: transparent;
}

.group-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(19, 33, 42, .28) transparent;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.group-strip::-webkit-scrollbar {
  height: 4px;
}

.group-strip::-webkit-scrollbar-track {
  background: transparent;
}

.group-strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(19, 33, 42, .24);
}

.group-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: fit-content;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.group-chip.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green), white 18%);
  box-shadow: inset 0 -3px 0 var(--green);
}

.user-search-results {
  position: absolute;
  top: 64px;
  left: 16px;
  right: 16px;
  z-index: 1400;
  display: grid;
  gap: 8px;
  max-height: min(360px, calc(100vh - 150px));
  padding: 10px;
  overflow-y: auto;
  border: 1px solid rgba(19, 33, 42, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .2);
  backdrop-filter: blur(16px);
}

.user-search-results[hidden] {
  display: none;
}

.user-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.user-search-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.user-search-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}

.user-search-row:hover {
  border-color: rgba(17, 189, 117, .34);
  background: rgba(237, 246, 247, .95);
}

.user-search-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--card-a, var(--green)), var(--card-b, var(--blue)));
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.76);
}

.user-search-avatar img {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.user-search-avatar b {
  grid-area: 1 / 1;
  position: relative;
  z-index: 0;
}

.user-search-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-search-info strong,
.user-search-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-search-info strong {
  font-size: 13px;
}

.user-search-info small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.user-search-open {
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
}

.map-view {
  padding-top: 6px;
}

.map-stage {
  position: relative;
  min-height: min(68vh, 610px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgba(64,184,200,.28), rgba(16,179,107,.16)),
    linear-gradient(160deg, #edf8f9, #cdecef 44%, #edf6f1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.58), 0 18px 40px rgba(20,60,70,.14);
}

.leaflet-stage {
  min-height: min(70vh, 640px);
  background: #edf6f7;
}

.event-countdown {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(19,33,42,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 34px rgba(15,23,42,.11);
  backdrop-filter: blur(14px);
}

.event-countdown[hidden] {
  display: none !important;
}

.event-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.event-copy span,
.event-copy small {
  overflow: hidden;
  color: #5c6b74;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-countdown .event-copy span,
.event-countdown .event-copy small {
  display: block;
}

.event-copy strong {
  color: #13212a;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}

.event-countdown button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #13212a;
  background: #edf6f7;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.event-countdown .event-summary-card {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(19,33,42,.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 16%, rgba(255,255,255,.96), rgba(255,255,255,0) 32%),
    linear-gradient(145deg, rgba(255,255,255,.95), rgba(220,247,240,.95));
  color: #13212a;
  text-align: left;
  box-shadow: 0 14px 34px rgba(15,23,42,.13), inset 0 1px 0 rgba(255,255,255,.72);
}

.event-summary-reward {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.event-summary-reward img {
  width: 48px;
  height: 42px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(132, 85, 0, .22));
}

.event-summary-reward b {
  color: #0f7a4e;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.challenge-gift-fab {
  position: relative;
  z-index: 2;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255,255,255,.96), rgba(255,255,255,0) 38%),
    linear-gradient(145deg, #fff1a8, #f0c84b 48%, #f87171);
  box-shadow: 0 18px 40px rgba(239,90,90,.28), 0 0 0 9px rgba(240,200,75,.18);
  cursor: pointer;
}

.challenge-gift-fab b {
  position: absolute;
  right: -2px;
  top: -4px;
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(239,68,68,.32);
}

.challenge-gift-box {
  position: relative;
  width: 42px;
  height: 35px;
  display: block;
  border-radius: 7px;
  background: linear-gradient(145deg, #ef4444, #fb923c);
  box-shadow: inset 0 -8px 0 rgba(124,45,18,.18), 0 10px 16px rgba(124,45,18,.24);
}

.challenge-gift-box::before,
.challenge-gift-box::after,
.challenge-gift-box i {
  content: "";
  position: absolute;
  display: block;
  background: #fde047;
}

.challenge-gift-box::before {
  left: 18px;
  top: 0;
  width: 7px;
  height: 35px;
}

.challenge-gift-box i {
  left: 0;
  top: 12px;
  width: 42px;
  height: 7px;
}

.challenge-gift-box::after {
  left: 7px;
  top: -9px;
  width: 28px;
  height: 12px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(90deg, #fde047 0 43%, #ef4444 43% 57%, #fde047 57%);
}

.leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 100%;
}

.leaflet-stage .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(19, 33, 42, .12);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20,60,70,.14);
}

.leaflet-stage .leaflet-control-zoom a {
  color: #13212a;
  background: rgba(255,255,255,.94);
}

.leaflet-popup-content-wrapper {
  border: 1px solid rgba(19,33,42,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 40px rgba(20,60,70,.18);
}

.leaflet-popup-content {
  margin: 10px 12px;
}

.leaflet-popup-tip {
  background: rgba(255,255,255,.96);
}

.official-location-marker,
.collector-location-marker,
.user-location-marker {
  border: 0;
  background: transparent;
}

.official-pin {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.official-point-badge {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: .86;
}

.official-point-badge img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.official-mini-cube {
  display: none;
}

.official-online-count {
  position: absolute;
  right: -9px;
  top: -9px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #10b36b;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .2);
}

.official-location-marker.zoom-far .official-pin {
  width: 18px;
  height: 18px;
  perspective: 180px;
}

.official-location-marker.zoom-far .official-point-badge {
  width: 15px;
  height: 15px;
  display: grid;
  opacity: .78;
}

.official-location-marker.zoom-far .official-mini-cube {
  display: none;
}

.official-location-marker.zoom-far .official-mini-cube::before,
.official-location-marker.zoom-far .official-mini-cube::after,
.official-location-marker.zoom-far .official-mini-cube i {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(135deg, #13c8a3, #40b8c8);
}

.official-location-marker.zoom-far .official-mini-cube::before {
  transform: rotateY(90deg) translateZ(7px);
  background: linear-gradient(135deg, #0f766e, #20c7b5);
}

.official-location-marker.zoom-far .official-mini-cube::after {
  transform: rotateX(90deg) translateZ(7px);
  background: linear-gradient(135deg, #5eead4, #22d3ee);
}

.official-location-marker.zoom-far .official-mini-cube i {
  transform: translateZ(7px);
}

.official-location-marker.zoom-far .official-point-badge img {
  width: 15px;
  height: 15px;
}

.event-point-pin {
  width: 104px;
  height: 24px;
  position: relative;
  grid-template-columns: 21px auto;
  align-content: center;
  align-items: center;
  justify-items: start;
  gap: 5px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  isolation: isolate;
}

.event-point-pin::before,
.event-point-pin::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.event-point-pin::before {
  width: 64px;
  height: 64px;
  background:
    radial-gradient(circle, rgba(255, 252, 196, .95) 0 10%, rgba(255, 226, 106, .6) 32%, rgba(240, 200, 75, 0) 76%);
  filter: blur(2px);
  animation: meetingAuraPulse 2.2s ease-in-out infinite;
}

.event-point-pin::after {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 246, 186, .95);
  box-shadow:
    0 0 16px rgba(255, 226, 106, .72),
    0 0 30px rgba(240, 200, 75, .5);
  animation: meetingRingPulse 2.2s ease-out infinite;
}

.event-light-beams {
  position: absolute;
  left: 10px;
  top: 50%;
  z-index: -1;
  width: 76px;
  height: 76px;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    conic-gradient(from 0deg,
      rgba(255,255,255,0) 0deg,
      rgba(255,244,174,.92) 18deg,
      rgba(255,255,255,0) 34deg,
      rgba(255,255,255,0) 92deg,
      rgba(255,226,106,.9) 112deg,
      rgba(255,255,255,0) 130deg,
      rgba(255,255,255,0) 206deg,
      rgba(255,255,255,.86) 224deg,
      rgba(255,255,255,0) 242deg,
      rgba(255,255,255,0) 306deg,
      rgba(240,200,75,.82) 322deg,
      rgba(255,255,255,0) 340deg);
  filter: blur(.6px) drop-shadow(0 0 10px rgba(255,226,106,.78));
  opacity: .92;
  mix-blend-mode: screen;
  animation: meetingBeamsSpin 5.8s linear infinite;
}

.official-location-marker.zoom-far .event-point-pin {
  width: 58px;
  height: 16px;
  grid-template-columns: 13px auto;
  gap: 2px;
  padding: 0;
  border-radius: 0;
}

.official-location-marker.zoom-far .event-point-pin::before {
  width: 42px;
  height: 42px;
  left: 7px;
}

.official-location-marker.zoom-far .event-point-pin::after {
  width: 34px;
  height: 34px;
  left: 7px;
}

.official-location-marker.zoom-far .event-light-beams {
  width: 50px;
  height: 50px;
  left: 7px;
  opacity: .78;
}

.official-location-marker.zoom-near .event-point-pin {
  width: 94px;
  height: 22px;
  grid-template-columns: 19px auto;
}

.official-location-marker.zoom-near .event-point-pin::before {
  width: 60px;
  height: 60px;
  left: 10px;
}

.official-location-marker.zoom-near .event-point-pin::after {
  width: 46px;
  height: 46px;
  left: 10px;
}

.official-location-marker.zoom-near .event-light-beams {
  width: 72px;
  height: 72px;
  left: 10px;
}

.official-location-marker.zoom-detail .event-point-pin {
  width: 116px;
  height: 28px;
  grid-template-columns: 24px auto;
  gap: 6px;
}

.official-location-marker.zoom-detail .event-point-pin::before {
  width: 78px;
  height: 78px;
  left: 12px;
}

.official-location-marker.zoom-detail .event-point-pin::after {
  width: 60px;
  height: 60px;
  left: 12px;
}

.official-location-marker.zoom-detail .event-light-beams {
  width: 92px;
  height: 92px;
  left: 12px;
  opacity: 1;
}

.official-location-marker.zoom-far .event-point-label {
  display: none;
}

.event-point-pin .official-point-badge {
  width: 21px;
  height: 21px;
  display: grid;
  background: transparent;
  box-shadow: none;
  opacity: .72;
  filter:
    drop-shadow(0 0 8px rgba(255, 226, 106, .88))
    drop-shadow(0 5px 10px rgba(122, 74, 0, .28));
}

.event-point-pin .official-point-badge img {
  width: 21px;
  height: 21px;
}

.official-location-marker.zoom-far .event-point-pin .official-point-badge {
  width: 13px;
  height: 13px;
  display: grid;
  opacity: .52;
}

.official-location-marker.zoom-far .event-point-pin .official-point-badge img {
  width: 13px;
  height: 13px;
}

.official-location-marker.zoom-near .event-point-pin .official-point-badge {
  width: 19px;
  height: 19px;
}

.official-location-marker.zoom-near .event-point-pin .official-point-badge img {
  width: 19px;
  height: 19px;
}

.official-location-marker.zoom-detail .event-point-pin .official-point-badge,
.official-location-marker.zoom-detail .event-point-pin .official-point-badge img {
  width: 24px;
  height: 24px;
}

.event-point-label {
  min-width: 0;
  display: grid;
  gap: 1px;
  color: #071016;
  text-align: left;
}

.event-point-label b,
.event-point-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 950;
  line-height: 1;
}

.event-point-label b {
  font-size: 10px;
}

.event-point-label small {
  font-size: 9px;
}

.event-point-timer {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #66717a;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.78);
}

.official-location-marker.zoom-far .event-point-timer {
  font-size: 7px;
  opacity: .68;
}

.official-location-marker.zoom-near .event-point-timer {
  font-size: 10px;
  opacity: .86;
}

.official-location-marker.zoom-detail .event-point-timer {
  font-size: 13px;
  opacity: 1;
}

@keyframes meetingAuraPulse {
  0%, 100% { opacity: .7; transform: translate(-50%, -50%) scale(.9); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes meetingRingPulse {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(.72); }
  80%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.62); }
}

@keyframes meetingBeamsSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(.92); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.05); }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(.92); }
}

.collector-card-pin.leaflet-pin {
  left: 0;
  top: 0;
  width: var(--pin-width, 44px);
}

.collector-card-pin.leaflet-pin.mine {
  width: var(--pin-width, 52px);
}

.collector-card-pin.leaflet-pin .pin-card-face {
  padding: 6px 5px;
}

.collector-card-pin.leaflet-pin .pin-avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.location-card {
  display: grid;
  gap: 4px;
  min-width: 190px;
  max-width: 260px;
  color: #13212a;
}

.location-card strong {
  font-size: 14px;
}

.location-card span {
  color: #5c6b74;
  font-size: 12px;
  font-weight: 800;
}

.point-location-photo {
  width: 100%;
  height: 96px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(240, 200, 75, .44);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,246,186,.72), rgba(237,246,247,.82));
}

.point-location-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.point-address {
  color: #6b7c86;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.event-location-card {
  min-width: 220px;
}

.event-location-card strong[data-event-timer-inline] {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(7,16,22,.84);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.event-location-card b {
  display: inline-grid;
  width: fit-content;
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #10b36b;
  color: #fff;
  font-size: 12px;
}

.event-location-card small {
  color: #5c6b74;
  font-size: 11px;
  font-weight: 800;
}

.point-action-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.point-route-link,
.point-share-link {
  min-width: 76px;
  display: inline-grid;
  place-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  color: #0b6b57;
  background: rgba(16, 179, 107, .12);
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
}

.point-share-link {
  color: #22406b;
  background: rgba(64, 184, 200, .16);
}

.point-player-block {
  display: grid;
  gap: 7px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(19, 33, 42, .1);
}

.point-player-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.point-player-head strong {
  font-size: 12px;
}

.point-player-head small,
.point-player-empty {
  color: #6b7c86;
  font-size: 11px;
  font-weight: 800;
}

.point-player-list {
  display: grid;
  gap: 6px;
}

.event-location-card .point-player-list {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 200, 75, .76) rgba(19,33,42,.08);
}

.event-location-card .point-player-list::-webkit-scrollbar {
  width: 5px;
}

.event-location-card .point-player-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(240, 200, 75, .8);
}

.point-player-row {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(19, 33, 42, .08);
  border-radius: 8px;
  background: rgba(237, 246, 247, .82);
  color: #13212a;
  text-align: left;
  cursor: pointer;
}

.point-player-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.point-player-avatar img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.point-player-info {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.point-player-info strong,
.point-player-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.point-player-info strong {
  color: #13212a;
  font-size: 12px;
}

.point-player-info small {
  color: #5c6b74;
  font-size: 10px;
  font-weight: 800;
}

.user-dot {
  width: 16px;
  height: 16px;
  display: block;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 7px rgba(37,99,235,.14), 0 8px 18px rgba(37,99,235,.26);
}

.map-fallback {
  position: absolute;
  inset: 16px;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(19, 33, 42, .18);
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  color: #13212a;
  text-align: center;
}

.map-fallback[hidden] {
  display: none;
}

.map-fallback span {
  color: #5c6b74;
  font-size: 12px;
}

.map-park {
  position: absolute;
  inset: 0;
  opacity: .82;
}

.map-park::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 2px solid rgba(7,86,96,.14);
  border-radius: 18px;
}

.map-ring {
  position: absolute;
  border: 2px solid rgba(7,86,96,.16);
  border-radius: 50%;
}

.map-ring.one {
  left: 18%;
  top: 16%;
  width: 42%;
  aspect-ratio: 1;
}

.map-ring.two {
  right: 8%;
  bottom: 7%;
  width: 46%;
  aspect-ratio: 1;
}

.map-path {
  position: absolute;
  left: 9%;
  right: 9%;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 0 0 1px rgba(7,86,96,.08);
}

.map-path.main {
  top: 48%;
  transform: rotate(-18deg);
}

.map-path.cross {
  top: 43%;
  transform: rotate(42deg);
}

.trade-point {
  position: absolute;
  z-index: 2;
  width: 38px;
  min-height: 38px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  perspective: 280px;
}

.trade-point b {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(255,255,255,.88);
  color: #31525d;
  font-size: 9px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(20,60,70,.12);
}

.exchange-cube {
  --cube-size: 17px;
  position: relative;
  width: var(--cube-size);
  height: var(--cube-size);
  display: block;
  transform-style: preserve-3d;
  animation: exchangeCubeSpin 2.7s linear infinite;
  filter: drop-shadow(0 8px 8px rgba(2,8,23,.24));
}

.exchange-cube::before,
.exchange-cube::after,
.exchange-cube i {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(135deg, #13c8a3, #40b8c8);
}

.exchange-cube::before {
  transform: rotateY(90deg) translateZ(8px);
  background: linear-gradient(135deg, #0f766e, #20c7b5);
}

.exchange-cube::after {
  transform: rotateX(90deg) translateZ(8px);
  background: linear-gradient(135deg, #5eead4, #22d3ee);
}

.exchange-cube i {
  transform: translateZ(8px);
}

@keyframes exchangeCubeSpin {
  from { transform: rotateX(-18deg) rotateY(0deg); }
  to { transform: rotateX(-18deg) rotateY(360deg); }
}

.collector-card-pin {
  position: absolute;
  z-index: 4;
  --pin-scale: 1;
  --pin-width: 44px;
  width: var(--pin-width);
  aspect-ratio: 9 / 16;
  transform: translate(-50%, -50%) scale(var(--pin-scale));
  transform-origin: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 13px 13px rgba(7,36,44,.25));
  perspective: 520px;
  transition: width .18s ease, filter .18s ease;
}

.collector-card-pin.mine {
  z-index: 5;
  --pin-width: 52px;
}

.pin-card-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr;
  justify-items: center;
  gap: 3px;
  padding: 9px 7px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.78);
  color: #fff;
  background:
    radial-gradient(circle at 26% 12%, rgba(255,255,255,.9), rgba(255,255,255,.14) 18%, transparent 34%),
    linear-gradient(145deg, var(--card-a), var(--card-b));
  background-color: var(--card-b);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
  transform: none;
  transform-style: flat;
  backface-visibility: hidden;
  opacity: 1;
}

.collector-card-pin .pin-card-face > * {
  display: none !important;
}

.pin-card-face::after {
  content: "";
  position: absolute;
  inset: -22%;
  background: linear-gradient(115deg, transparent 24%, rgba(255,255,255,.7) 34%, transparent 50%);
  transform: translateX(-55%) rotate(8deg);
  animation: rareSweep 4.2s ease-in-out infinite;
  pointer-events: none;
}

.pin-avatar {
  align-self: center;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 950;
  font-size: 13px;
  overflow: visible;
}

.pin-rank-emblem {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  display: none;
  place-items: center;
  align-self: center;
}

.pin-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border: 2px solid rgba(255,255,255,.72);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 12px rgba(15,23,42,.22);
}

.tier-emblem {
  --emblem-a: var(--card-a);
  --emblem-b: var(--card-b);
  --emblem-edge: var(--tier-accent);
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  clip-path: polygon(50% 0, 89% 18%, 100% 56%, 73% 100%, 27% 100%, 0 56%, 11% 18%);
  background: linear-gradient(145deg, var(--emblem-edge), var(--emblem-a) 33%, var(--emblem-b));
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.42),
    inset 0 -10px 18px rgba(7,16,22,.22),
    0 8px 16px rgba(15,23,42,.24);
}

.tier-emblem::before {
  content: "";
  position: absolute;
  inset: 18%;
  clip-path: inherit;
  background: linear-gradient(145deg, rgba(255,255,255,.4), rgba(255,255,255,.08));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.38);
}

.tier-emblem::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 12%;
  width: 24%;
  height: 24%;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  filter: blur(1px);
}

.tier-emblem i {
  position: absolute;
  inset: 34% 30%;
  display: block;
  transform: rotate(45deg);
  background: rgba(255,255,255,.7);
  box-shadow: 0 0 12px rgba(255,255,255,.42);
}

.tier-fresh {
  --emblem-a: #67e8f9;
  --emblem-b: #14b8a6;
  --emblem-edge: #ccfbf1;
}

.tier-bronze {
  --emblem-a: #9a5a18;
  --emblem-b: #d97706;
  --emblem-edge: #fed7aa;
}

.tier-silver {
  --emblem-a: #64748b;
  --emblem-b: #cbd5e1;
  --emblem-edge: #f8fafc;
}

.tier-gold {
  --emblem-a: #facc15;
  --emblem-b: #f59e0b;
  --emblem-edge: #fef08a;
}

.tier-master {
  --emblem-a: #7c3aed;
  --emblem-b: #d946ef;
  --emblem-edge: #f5d0fe;
}

.tier-diamond {
  --emblem-a: #edfaff;
  --emblem-b: #38bdf8;
  --emblem-edge: #ffffff;
}

.tier-emblem {
  display: grid;
  place-items: center;
  clip-path: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.tier-emblem::before,
.tier-emblem::after,
.tier-emblem i {
  display: none;
  content: none;
}

.tier-emblem img {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
  filter: drop-shadow(0 8px 12px rgba(15,23,42,.22));
}

.pin-card-face strong,
.pin-card-face em,
.pin-card-face small {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-card-face strong {
  font-size: 12px;
}

.pin-card-face em,
.pin-card-face small {
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.pin-summary {
  position: relative;
  z-index: 1;
  display: none;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  gap: 2px 4px;
  width: 100%;
  padding: 3px 5px;
  border-radius: 7px;
  background: rgba(7,16,22,.28);
  font-size: 9px;
  font-weight: 900;
}

.pin-summary span {
  font-size: 8px;
  opacity: .86;
}

.collector-location-marker.zoom-far .collector-card-pin {
  --pin-width: 30px;
  filter: drop-shadow(0 9px 10px rgba(7,36,44,.24));
}

.collector-location-marker.zoom-far .collector-card-pin.mine {
  --pin-width: 34px;
}

.collector-location-marker.zoom-near .collector-card-pin {
  --pin-width: 58px;
}

.collector-location-marker.zoom-near .collector-card-pin.mine {
  --pin-width: 66px;
}

.collector-location-marker.zoom-detail .collector-card-pin {
  --pin-width: 98px;
  filter: drop-shadow(0 17px 20px rgba(7,36,44,.25));
}

.collector-location-marker.zoom-detail .collector-card-pin.mine {
  --pin-width: 108px;
}

.collector-location-marker.zoom-near .pin-card-face {
  grid-template-rows: 1fr auto;
  animation: pinCardSpin 3.4s linear infinite;
  transform-style: preserve-3d;
  backface-visibility: visible;
  opacity: 1;
}

.collector-location-marker.zoom-far .pin-card-face {
  grid-template-rows: 1fr auto;
  gap: 2px;
  padding: 5px 4px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 7px;
  background:
    radial-gradient(circle at 28% 14%, rgba(255,255,255,.78), rgba(255,255,255,.16) 22%, transparent 42%),
    linear-gradient(145deg, var(--card-a), var(--card-b) 64%, #071016);
  background-color: var(--card-b);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  animation: pinCardSpin 3.4s linear infinite;
  transform-style: preserve-3d;
  backface-visibility: visible;
  opacity: 1;
}

.collector-location-marker.zoom-far .pin-avatar,
.collector-location-marker.zoom-far .pin-card-face strong,
.collector-location-marker.zoom-far .pin-card-face small,
.collector-location-marker.zoom-far .pin-summary {
  display: none;
}

.collector-location-marker.zoom-far .collector-card-pin {
  aspect-ratio: 9 / 16;
}

.collector-location-marker.zoom-far .pin-avatar {
  display: none;
}

.collector-location-marker.zoom-far .pin-rank-emblem {
  width: 17px;
  height: 17px;
  display: grid;
}

.collector-location-marker.zoom-far .pin-card-face em {
  display: block;
  font-size: 8px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.42);
}

.collector-location-marker.zoom-far .pin-avatar img,
.collector-location-marker.zoom-far .tier-emblem img {
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 7px 9px rgba(15,23,42,.24));
}

.collector-location-marker.zoom-near .pin-avatar,
.collector-location-marker.zoom-near .pin-card-face strong,
.collector-location-marker.zoom-near .pin-card-face small,
.collector-location-marker.zoom-near .pin-summary {
  display: none;
}

.collector-location-marker.zoom-near .pin-rank-emblem {
  width: 30px;
  height: 30px;
  display: grid;
}

.collector-location-marker.zoom-near .pin-card-face em {
  display: block;
  font-size: 11px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.42);
}

.collector-location-marker.zoom-detail .pin-card-face {
  grid-template-rows: 1fr auto;
  animation: none;
  transform: none;
  opacity: 1;
}

.collector-location-marker.zoom-detail .pin-rank-emblem {
  display: none;
}

.collector-location-marker.zoom-detail .pin-card-face strong,
.collector-location-marker.zoom-detail .pin-card-face small,
.collector-location-marker.zoom-detail .pin-summary {
  display: none;
}

.collector-location-marker.zoom-detail .pin-avatar {
  width: 34px;
  height: 34px;
}

.collector-location-marker.zoom-detail .pin-summary {
  display: grid;
}

.collector-location-marker .pin-rank-emblem,
.collector-location-marker .pin-avatar,
.collector-location-marker .pin-card-face strong,
.collector-location-marker .pin-card-face em,
.collector-location-marker .pin-card-face small,
.collector-location-marker .pin-summary {
  display: none !important;
}

@keyframes pinCardSpin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

@keyframes miniStickerSpin {
  from { transform: rotateY(0deg) rotateZ(-3deg); }
  to { transform: rotateY(360deg) rotateZ(-3deg); }
}

@keyframes rareSweep {
  0%, 18% { transform: translateX(-64%) rotate(8deg); }
  62%, 100% { transform: translateX(64%) rotate(8deg); }
}

.map-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.map-summary-grid > * {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
}

.map-summary-grid button {
  cursor: pointer;
}

.map-summary-grid button:hover {
  border-color: rgba(17, 189, 117, .34);
  background: rgba(255, 255, 255, .98);
}

.map-summary-grid button:focus-visible {
  outline: 3px solid rgba(19, 200, 163, .24);
  outline-offset: 2px;
}

.map-summary-grid span,
.map-summary-grid small {
  color: var(--muted);
  font-size: 11px;
}

.map-summary-grid strong {
  font-size: 22px;
}

.view {
  display: none;
  padding: 0 16px 92px;
}

.view.active {
  display: block;
}

.stats-grid,
.toolbar,
.group-strip,
.view:not(.map-view) {
  max-width: 1012px;
  margin-left: auto;
  margin-right: auto;
}

.app-shell[data-view="map"] {
  background: #edf6f7;
}

.app-shell[data-view="map"] .phone-frame {
  overflow: hidden;
  padding-bottom: 0;
  background: #edf6f7;
}

.app-shell[data-view="map"] .topbar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: auto;
  z-index: 780;
  width: min(390px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #13212a;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell[data-view="map"] .eyebrow {
  color: #5c6b74;
  font-size: 10px;
  font-weight: 950;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}

.app-shell[data-view="map"] h1 {
  margin-top: 0;
  font-size: clamp(16px, 2.2vw, 21px);
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}

.app-shell[data-view="map"] .top-actions {
  align-self: start;
}

.app-shell[data-view="map"] .account-btn,
.app-shell[data-view="map"] .share-btn,
.app-shell[data-view="map"] .account-chip {
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

.app-shell[data-view="map"] .share-btn {
  background: rgba(240, 200, 75, .9);
}

.app-shell[data-view="map"] .tutorial-btn {
  background: rgba(18, 184, 168, .94);
}

.app-shell[data-view="map"] .google-logo-btn {
  background: #fff;
}

.app-shell[data-view="map"] #view-map {
  min-height: 100vh;
  padding: 0;
}

.app-shell[data-view="map"] .map-view {
  padding-top: 0;
}

.app-shell[data-view="map"] .map-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app-shell[data-view="map"] .event-countdown {
  position: fixed;
  right: 16px;
  top: 88px;
  z-index: 790;
  width: min(190px, calc(100vw - 32px));
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
}

.app-shell[data-view="map"] .challenge-gift-fab {
  position: fixed;
  right: 20px;
  top: 184px;
  z-index: 785;
}

.app-shell:not([data-view="map"]) .challenge-gift-fab {
  display: none;
}

@media (max-width: 520px) {
  .app-shell[data-view="map"] .event-countdown {
    right: 10px;
    top: 84px;
    width: min(168px, calc(100vw - 20px));
  }

  .app-shell[data-view="map"] .challenge-gift-fab {
    right: 14px;
    top: 176px;
    width: 60px;
    height: 60px;
  }

  .challenge-gift-box {
    transform: scale(.88);
  }

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

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

  .challenge-card strong {
    grid-column: 2;
    justify-self: start;
  }
}

.app-shell[data-view="map"] .map-view .section-head {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 112px;
  z-index: 780;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #13212a;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.app-shell[data-view="map"] .map-view .section-head > span {
  display: none;
}

.app-shell[data-view="map"] .map-view .section-head .text-btn {
  color: inherit;
  background: #f8fbfc;
}

.app-shell[data-view="map"] .map-view .section-head .section-actions,
.map-target-btn {
  pointer-events: auto;
}

.map-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.map-action svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.map-action-card {
  color: #fff;
  background: linear-gradient(135deg, #11bd75, #06965a);
}

.app-shell[data-view="map"] .map-view .section-head .map-action-card {
  color: #fff;
  background: linear-gradient(135deg, #11bd75, #06965a);
}

.map-action-location {
  color: #13212a;
  background: rgba(255, 255, 255, .96);
}

.map-action-admin {
  color: #13212a;
  background: rgba(255, 255, 255, .96);
}

.map-action-admin[hidden],
.admin-settings-btn[hidden] {
  display: none;
}

.map-target-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 255, 255, .96);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}

.map-target-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.app-shell[data-view="map"] .map-summary-grid {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 770;
  width: min(292px, calc(100vw - 32px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.app-shell[data-view="map"] .map-summary-grid > * {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
  backdrop-filter: blur(14px);
}

.app-shell[data-view="map"] .leaflet-top.leaflet-left {
  top: 102px;
}

.section-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head span {
  font-weight: 900;
}

.text-btn {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 5px;
}

.sticker {
  position: relative;
  min-width: 0;
  aspect-ratio: 1 / 1.08;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  gap: 1px;
  padding: 3px;
  border: 1px solid rgba(8, 41, 48, .96);
  border-radius: 5px;
  background: linear-gradient(180deg, #174f59 0%, #0d3139 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 2px 5px rgba(2,8,23,.18);
  text-align: center;
}

.sticker.missing {
  filter: grayscale(.35) saturate(.75);
  opacity: .62;
}

.sticker.duplicate {
  box-shadow: inset 0 0 0 2px #facc15, 0 0 0 1px rgba(0,0,0,.15), 0 3px 8px rgba(2,8,23,.2);
}

.sticker.owned {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 3px 8px rgba(2,8,23,.16);
}

.sticker:active {
  transform: translateY(1px) scale(.985);
}

.sticker-top,
.sticker-foot {
  width: 100%;
  display: grid;
  place-items: center;
}

.code-pill,
.qty-pill {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.code-pill {
  grid-auto-flow: row;
  gap: 1px;
  padding: 0;
  text-shadow: 0 1px 1px rgba(0,0,0,.38);
}

.qty-pill {
  position: absolute;
  right: 2px;
  top: 2px;
  min-width: 22px;
  min-height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgba(2, 18, 24, .64);
  color: rgba(255,255,255,.92);
  font-size: 8px;
}

.sticker.missing .qty-pill {
  opacity: .72;
}

.flag-img {
  width: 22px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}

.sticker-number {
  align-self: center;
  justify-self: center;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: clamp(13px, 4vw, 18px);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0,0,0,.42);
}

.sticker-mode-remove .sticker-grid {
  --mode-ring: rgba(239,90,90,.74);
}

.sticker-mode-remove .sticker {
  border-color: var(--mode-ring);
}

.sticker-mode-remove .sticker.missing {
  border-color: var(--line);
}

.compact-list,
.trade-stack,
.settings-list {
  display: grid;
  gap: 10px;
}

.list-row,
.trade-row,
.setting-row,
.match-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.list-row {
  grid-template-columns: 52px 1fr auto;
  align-items: center;
}

.mini-card {
  width: 44px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--team-a), var(--team-b));
  color: #fff;
  font-weight: 950;
  font-size: 12px;
}

.list-row strong,
.trade-row strong,
.setting-row strong,
.match-card strong {
  display: block;
}

.list-row span,
.trade-row span,
.match-card span {
  color: var(--muted);
  font-size: 12px;
}

.count-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.count-stepper button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  cursor: pointer;
}

.trade-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.qr-card,
.scanner-panel,
.match-panel {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

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

.qr-matrix {
  width: min(248px, 100%);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 3px;
  padding: 12px;
  margin: 0 auto 12px;
  border: 8px solid #fff;
  background: #fff;
}

.qr-matrix i {
  background: #111;
}

.qr-matrix i.off {
  background: #fff;
}

.qr-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-btn,
.ghost-btn,
.danger-btn {
  padding: 0 14px;
  font-weight: 900;
}

.primary-btn {
  color: #071016;
  border-color: transparent;
  background: var(--yellow);
}

.primary-btn.wide {
  width: 100%;
  margin-top: 10px;
}

.ghost-btn {
  background: transparent;
}

.danger-btn {
  color: #fff;
  border-color: transparent;
  background: var(--red);
}

.disconnect-btn {
  color: var(--red);
  border-color: rgba(239, 90, 90, .28);
  background: #fff;
}

.match-panel {
  margin-top: 12px;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.empty-state {
  min-height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
}

.setting-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.file-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 28px));
  transform: translateX(-50%) translateY(22px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111a22;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  box-shadow: 0 12px 40px rgba(0,0,0,.34);
}

.toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pwa-install-reminder {
  position: fixed;
  left: 50%;
  bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  width: min(330px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid rgba(125, 211, 252, .34);
  border-radius: 8px;
  background: rgba(14, 116, 144, .82);
  color: #f8fdff;
  box-shadow: 0 12px 34px rgba(2, 8, 23, .2);
  backdrop-filter: blur(10px);
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}

.pwa-install-reminder.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.pwa-install-reminder[hidden] {
  display: none;
}

.pwa-install-reminder strong,
.pwa-install-reminder span {
  display: block;
}

.pwa-install-reminder strong {
  font-size: 12px;
  line-height: 1.05;
}

.pwa-install-reminder span {
  margin-top: 2px;
  color: rgba(240, 249, 255, .82);
  font-size: 11px;
  line-height: 1.15;
}

.pwa-install-activate,
.pwa-install-close {
  height: 28px;
  border-radius: 8px;
  font-weight: 950;
  font-size: 11px;
  cursor: pointer;
}

.pwa-install-activate {
  border: 1px solid rgba(255,255,255,.22);
  padding: 0 10px;
  background: rgba(255,255,255,.92);
  color: #075985;
}

.pwa-install-close {
  width: 34px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(8, 47, 73, .28);
  color: #f8fdff;
}

@media (max-width: 520px) {
  .pwa-install-reminder {
    grid-template-columns: 1fr auto auto;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .pwa-install-activate {
    width: max-content;
  }

  .pwa-install-close {
    width: 32px;
  }
}

.sticker-dialog,
.profile-dialog,
.nearby-dialog,
.message-dialog,
.settings-dialog,
.admin-event-dialog,
.admin-metrics-dialog,
.badge-reveal-dialog,
.event-detail-dialog,
.challenge-dialog {
  width: min(420px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  color: var(--text);
}

.profile-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1200;
  width: min(420px, calc(100vw - 24px));
  max-height: min(740px, calc(100vh - 106px));
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.sticker-dialog::backdrop {
  background: rgba(0,0,0,.58);
}

.profile-dialog::backdrop {
  background: transparent;
}

.badge-reveal-dialog {
  width: min(560px, calc(100vw - 26px));
  max-height: min(720px, calc(100vh - 28px));
  border: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.badge-reveal-dialog::backdrop {
  background: rgba(4, 9, 18, .78);
  backdrop-filter: blur(6px);
}

.event-detail-dialog,
.challenge-dialog {
  width: min(520px, calc(100vw - 26px));
  max-height: min(720px, calc(100vh - 30px));
  overflow: auto;
  padding: 14px;
}

.event-detail-dialog::backdrop,
.challenge-dialog::backdrop {
  background: rgba(6, 12, 20, .5);
  backdrop-filter: blur(4px);
}

.event-detail-shell,
.challenge-shell {
  clear: both;
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.event-detail-head,
.challenge-head {
  display: grid;
  gap: 3px;
}

.event-detail-head strong,
.challenge-head strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
}

.event-detail-head span,
.challenge-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.event-detail-timer {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(16,179,107,.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16,179,107,.13), rgba(74,163,255,.1));
}

.event-detail-timer span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.event-detail-timer strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.event-detail-reward {
  width: 100%;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(240,200,75,.45);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.92), rgba(255,255,255,0) 34%),
    linear-gradient(135deg, rgba(255,244,194,.96), rgba(211,247,235,.94));
  color: #13212a;
  text-align: left;
  cursor: pointer;
}

.event-detail-reward img {
  width: 70px;
  height: 64px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(132,85,0,.22));
}

.event-detail-reward span {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
}

.event-detail-reward b {
  color: #0f7a4e;
  font-size: 22px;
  line-height: 1;
}

.event-detail-reward small {
  color: #5c4a15;
  font-size: 12px;
  font-weight: 950;
}

.event-detail-shell p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.challenge-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: var(--panel-2);
}

.challenge-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.challenge-tabs button.active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(16,179,107,.22);
}

.challenge-panel {
  display: grid;
  gap: 8px;
}

.challenge-panel[hidden] {
  display: none !important;
}

.challenge-card {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.challenge-card.featured {
  border-color: rgba(240,200,75,.48);
  background: linear-gradient(135deg, rgba(240,200,75,.14), rgba(16,179,107,.1)), var(--panel-2);
}

.challenge-card > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.challenge-card b {
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
}

.challenge-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.challenge-card strong {
  color: #2563eb;
  font-size: 13px;
  white-space: nowrap;
}

.challenge-card i {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(92,107,116,.18);
}

.challenge-card i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #2563eb);
}

.challenge-icon,
.challenge-badge-thumb {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #60a5fa, #2563eb);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 18px rgba(37,99,235,.18);
}

.challenge-icon::before {
  content: "";
  width: 26px;
  height: 26px;
  display: block;
  border: 3px solid #fff;
  border-radius: 7px;
}

.challenge-icon.people::before {
  border-radius: 50%;
  box-shadow: 16px 0 0 -5px #fff;
}

.challenge-icon.trade::before {
  border-radius: 50%;
  border-color: transparent;
  border-top-color: #fff;
  border-right-color: #fff;
  transform: rotate(45deg);
}

.challenge-icon.share::before {
  width: 28px;
  height: 18px;
  border: 0;
  border-top: 4px solid #fff;
  border-left: 4px solid #fff;
  transform: rotate(-35deg);
}

.challenge-icon.trophy::before {
  width: 25px;
  height: 20px;
  border-radius: 4px 4px 10px 10px;
}

.challenge-icon.check::before {
  width: 25px;
  height: 14px;
  border: 0;
  border-left: 5px solid #fff;
  border-bottom: 5px solid #fff;
  transform: rotate(-45deg);
}

.challenge-badge-thumb img {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
}

.badge-reveal-shell {
  width: 100%;
  display: grid;
  place-items: center;
}

.badge-reveal-card {
  position: relative;
  width: 100%;
  min-height: min(660px, calc(100vh - 34px));
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  overflow: hidden;
  padding: 34px 22px 26px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,226,112,.62), transparent 28%),
    radial-gradient(circle at 35% 62%, rgba(19,200,163,.34), transparent 24%),
    linear-gradient(160deg, #071016, #102335 58%, #071016);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.14),
    0 28px 80px rgba(0,0,0,.46);
  animation: badgeRevealPop .34s ease both;
}

.badge-reveal-card::before,
.badge-reveal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.88) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 18%, rgba(255,240,150,.94) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 62%, rgba(255,255,255,.78) 0 1px, transparent 2px),
    radial-gradient(circle at 27% 74%, rgba(240,200,75,.9) 0 2px, transparent 3px);
  opacity: .9;
  animation: badgeSpark 1.45s ease-in-out infinite alternate;
  pointer-events: none;
}

.badge-reveal-card::after {
  transform: rotate(18deg) scale(1.08);
  opacity: .55;
  animation-delay: .28s;
}

.badge-reveal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.badge-reveal-glow {
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,167,.78), rgba(19,200,163,.2) 44%, transparent 68%);
  filter: blur(8px);
  animation: badgeGlowPulse 1.65s ease-in-out infinite alternate;
  pointer-events: none;
}

.badge-reveal-image {
  position: relative;
  z-index: 2;
  width: min(300px, 78vw);
  max-height: 330px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,.42));
}

.badge-reveal-copy {
  position: relative;
  z-index: 2;
  width: min(430px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.badge-reveal-copy small {
  color: #f0c84b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.badge-reveal-copy strong {
  color: #fff;
  font-size: clamp(28px, 7vw, 42px);
  line-height: .96;
}

.badge-reveal-copy p {
  max-width: 36ch;
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.badge-reveal-copy span {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(255,255,255,.11);
}

.badge-reveal-copy b {
  color: #18e8ad;
  font-size: 20px;
}

.badge-reveal-copy em {
  max-width: 38ch;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

@keyframes badgeRevealPop {
  0% { opacity: 0; transform: translateY(18px) scale(.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes badgeSpark {
  0% { transform: translateY(0) scale(1); opacity: .55; }
  100% { transform: translateY(-12px) scale(1.03); opacity: 1; }
}

@keyframes badgeGlowPulse {
  0% { transform: scale(.94); opacity: .7; }
  100% { transform: scale(1.06); opacity: 1; }
}

.settings-dialog::backdrop {
  background: rgba(0,0,0,.48);
}

.nearby-dialog {
  width: min(520px, calc(100vw - 26px));
  max-height: min(720px, calc(100vh - 34px));
  overflow: auto;
  padding: 14px;
}

.nearby-dialog::backdrop {
  background: rgba(6, 12, 20, .46);
  backdrop-filter: blur(3px);
}

.message-dialog {
  width: min(520px, calc(100vw - 26px));
  max-height: min(720px, calc(100vh - 34px));
  overflow: auto;
  padding: 14px;
}

.message-dialog::backdrop {
  background: rgba(6, 12, 20, .5);
  backdrop-filter: blur(3px);
}

.message-shell {
  clear: both;
  display: grid;
  gap: 12px;
}

.message-head {
  padding-right: 42px;
}

.message-head strong,
.message-head span {
  display: block;
}

.message-head strong {
  color: var(--text);
  font-size: 22px;
}

.message-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-safety-note {
  padding: 10px;
  border: 1px solid rgba(245,158,11,.28);
  border-radius: 8px;
  background: rgba(255,251,235,.9);
  color: #7c2d12;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.message-options {
  display: grid;
  gap: 8px;
}

.message-option {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.message-option:hover {
  border-color: rgba(17, 189, 117, .34);
  background: rgba(237, 246, 247, .95);
}

.message-option.cooling {
  opacity: .68;
}

.message-option strong,
.message-option span,
.message-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-option strong {
  font-size: 14px;
}

.message-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.message-option small {
  color: #b45309;
  font-size: 11px;
  font-weight: 950;
}

.message-send-status {
  padding: 9px 10px;
  border: 1px solid rgba(16,179,107,.28);
  border-radius: 8px;
  background: rgba(220, 252, 231, .86);
  color: #07543f;
  font-size: 12px;
  font-weight: 900;
}

.nearby-shell {
  clear: both;
  display: grid;
  gap: 12px;
}

.nearby-head {
  padding-right: 42px;
}

.nearby-head strong,
.nearby-head span {
  display: block;
}

.nearby-head strong {
  color: var(--text);
  font-size: 22px;
}

.nearby-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nearby-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nearby-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 950;
}

.nearby-tabs button.active {
  border-color: rgba(17, 189, 117, .34);
  background: linear-gradient(135deg, #11bd75, #06965a);
  color: #fff;
}

.nearby-list {
  display: grid;
  gap: 8px;
}

.nearby-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(86px, auto);
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.nearby-row:hover {
  border-color: rgba(17, 189, 117, .34);
  background: rgba(237, 246, 247, .95);
}

.official-point-row {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.official-point-row:hover {
  border-color: rgba(240, 200, 75, .55);
  background: rgba(255, 250, 224, .94);
}

.official-point-index {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff1a6, #d59a12);
  color: #13212a;
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.official-point-thumb {
  position: relative;
  width: 50px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(240, 200, 75, .45);
  border-radius: 8px;
  background: rgba(255, 250, 224, .85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.76);
}

.official-point-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.official-point-thumb i {
  position: absolute;
  left: 4px;
  top: 4px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(145deg, #fff1a6, #d59a12);
  color: #13212a;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(19,33,42,.18), inset 0 1px 0 rgba(255,255,255,.72);
}

.official-point-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.official-point-info strong,
.official-point-info small,
.official-point-distance {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.official-point-info strong {
  font-size: 14px;
}

.official-point-info small,
.official-point-distance {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.official-point-distance {
  justify-self: end;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(240, 200, 75, .18);
  color: #8a5a00;
}

body.official-points-highlighted .official-location-marker .official-pin {
  filter: drop-shadow(0 0 13px rgba(240, 200, 75, .84)) drop-shadow(0 6px 12px rgba(122, 74, 0, .28));
}

body.official-points-highlighted .official-location-marker .official-point-badge {
  opacity: 1;
  transform: scale(1.2);
}

.nearby-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.nearby-avatar .tier-emblem {
  width: 38px;
  height: 38px;
}

.nearby-status {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.nearby-status.online {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.14);
}

.nearby-status.recent {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,.14);
}

.nearby-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.nearby-info strong,
.nearby-info small,
.nearby-trade small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-info strong {
  font-size: 14px;
}

.nearby-info small,
.nearby-trade small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.nearby-trade {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.nearby-trade b {
  color: var(--green);
  font-size: 22px;
  line-height: 1;
}

.nearby-empty {
  min-height: 120px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: center;
}

.nearby-empty span {
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-metrics-dialog {
  width: min(920px, calc(100vw - 26px));
  max-height: min(780px, calc(100vh - 34px));
  overflow: auto;
  padding: 14px;
}

.admin-metrics-dialog::backdrop {
  background: rgba(6, 12, 20, .46);
  backdrop-filter: blur(3px);
}

.admin-event-dialog {
  width: min(460px, calc(100vw - 26px));
}

.admin-event-dialog::backdrop {
  background: rgba(6, 12, 20, .46);
  backdrop-filter: blur(3px);
}

.admin-event-shell {
  clear: both;
  display: grid;
  gap: 14px;
}

.admin-event-head {
  padding-right: 42px;
}

.admin-event-head strong,
.admin-event-head span {
  display: block;
}

.admin-event-head strong {
  font-size: 22px;
}

.admin-event-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-event-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-event-field {
  display: grid;
  gap: 6px;
}

.admin-event-field span,
.admin-event-preview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.admin-event-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 900;
}

.admin-event-preview {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.admin-event-preview strong {
  color: #13212a;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}

.admin-event-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-metrics-shell {
  clear: both;
  display: grid;
  gap: 12px;
}

.admin-metrics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 42px;
}

.admin-metrics-head strong,
.admin-metrics-head span {
  display: block;
}

.admin-metrics-head strong {
  font-size: 22px;
}

.admin-metrics-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-metrics-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-metrics-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 950;
}

.admin-metrics-tabs button.active {
  border-color: rgba(17, 189, 117, .34);
  background: linear-gradient(135deg, #11bd75, #06965a);
  color: #fff;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-metrics-grid div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.admin-metrics-grid strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.admin-metrics-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.admin-metrics-chart {
  min-height: 210px;
  display: flex;
  align-items: end;
  gap: 6px;
  overflow-x: auto;
  padding: 22px 10px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(248,251,252,.98), rgba(234,244,246,.98));
}

.admin-chart-bar {
  position: relative;
  flex: 1 0 44px;
  min-width: 36px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #11bd75, #087f63);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}

.admin-metrics-chart.compact .admin-chart-bar {
  flex-basis: 30px;
  min-width: 26px;
}

.admin-bar-value {
  position: absolute;
  left: 50%;
  bottom: 5px;
  min-width: 18px;
  padding: 2px 4px;
  border-radius: 5px;
  background: rgba(255,255,255,.9);
  color: #064e3b;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  transform: translateX(-50%);
}

.admin-chart-bar small {
  position: absolute;
  left: 50%;
  bottom: -22px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  transform: translateX(-50%);
}

.admin-metrics-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-metrics-section,
.admin-metrics-detail {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.admin-metrics-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.admin-metrics-section table {
  width: 100%;
  border-collapse: collapse;
}

.admin-metrics-section td {
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-metrics-section td:last-child {
  color: var(--text);
  text-align: right;
}

.admin-metrics-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 900;
}

.admin-metrics-detail span {
  color: var(--green);
}

.settings-card {
  clear: both;
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.settings-profile-head {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
}

.profile-photo-edit {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--green), var(--blue));
  color: #fff;
  box-shadow: 0 0 0 3px rgba(16,179,107,.18);
  cursor: pointer;
  isolation: isolate;
}

.profile-photo-edit::before {
  grid-area: 1 / 1;
  content: attr(data-initials);
  font-size: 17px;
  font-weight: 950;
  position: relative;
  z-index: 0;
}

.profile-photo-edit img {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  background: #fff;
}

.profile-photo-edit img[hidden] {
  display: none;
}

.profile-photo-edit.uploading {
  pointer-events: none;
  filter: saturate(.75);
}

.profile-photo-status {
  display: block;
  margin-top: 3px;
  color: #0b8f73;
  font-size: 11px;
  font-weight: 900;
}

.settings-profile-head strong,
.settings-profile-head span {
  display: block;
}

.settings-profile-head strong {
  font-size: 20px;
}

.settings-profile-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field-row {
  display: grid;
  gap: 6px;
}

.field-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field-row input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-messages,
.settings-friends {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(19,33,42,.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 0%, rgba(19,200,163,.13), transparent 34%),
    rgba(255,255,255,.74);
}

.settings-messages header,
.settings-friends header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.settings-messages strong,
.settings-messages span,
.settings-friends strong,
.settings-friends span {
  display: block;
}

.settings-messages header strong,
.settings-friends header strong {
  color: var(--text);
  font-size: 16px;
}

.settings-messages header span,
.settings-friends header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.profile-message-list,
.friends-list {
  display: grid;
  gap: 8px;
}

.profile-message-empty,
.profile-message-sent-head {
  padding: 9px;
  border-radius: 8px;
  background: rgba(237,246,247,.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.profile-message-sent-head {
  padding-bottom: 2px;
  background: transparent;
  color: #0b6b57;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.profile-message-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(19,33,42,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.profile-message-row.sent {
  background: rgba(237,246,247,.9);
}

.profile-message-row.answered {
  border-color: rgba(16,179,107,.24);
}

.profile-message-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #13c8a3, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 0 0 3px rgba(19,200,163,.12);
}

.profile-message-avatar::before {
  grid-area: 1 / 1;
  content: attr(data-initials);
}

.profile-message-avatar img {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-message-avatar img + * {
  display: none;
}

.profile-message-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.profile-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-message-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-message-meta small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.profile-message-text,
.profile-message-response {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.profile-message-response {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(220,252,231,.78);
  color: #07543f;
}

.profile-message-trade {
  display: block;
  padding: 6px 8px;
  border: 1px solid rgba(240, 200, 75, .38);
  border-radius: 8px;
  background: rgba(255, 250, 224, .86);
  color: #5f3b05;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.profile-message-trade b {
  color: #13212a;
  font-weight: 950;
}

.profile-message-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-message-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #10b36b;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.profile-message-actions em {
  flex: 1 1 110px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.friend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(19,33,42,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.friend-open {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.friend-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0c84b, #10b36b);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 0 0 3px rgba(240,200,75,.16);
}

.friend-avatar::before {
  grid-area: 1 / 1;
  content: attr(data-initials);
}

.friend-avatar img {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.friend-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.friend-info strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-info small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-remove {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: rgba(15,23,42,.08);
  color: #334155;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

.dialog-close {
  float: right;
  padding: 0 10px;
  min-height: 32px;
  font-size: 12px;
}

.profile-dialog .dialog-close {
  display: none;
  position: absolute;
  right: 24px;
  top: 18px;
  z-index: 3;
  float: none;
  border-color: rgba(255,255,255,.44);
  background: rgba(255,255,255,.88);
  color: #13212a;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}

.dialog-card {
  clear: both;
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.dialog-visual {
  height: 180px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--team-a), var(--team-b));
  color: #fff;
  font-size: 72px;
  font-weight: 950;
}

.profile-shell {
  clear: both;
  display: grid;
  gap: 12px;
  padding: 0;
  filter: drop-shadow(0 28px 48px rgba(15, 23, 42, .26));
}

.profile-card {
  width: min(360px, calc(100vw - 28px));
  aspect-ratio: 9 / 16;
  justify-self: center;
  border: 0;
  padding: 0;
  background: transparent;
  perspective: 1000px;
  cursor: pointer;
  outline: none;
}

.profile-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .5s ease;
}

.profile-card.flipped .profile-card-inner {
  transform: rotateY(180deg);
}

.profile-front {
  pointer-events: auto;
}

.profile-back {
  pointer-events: none;
}

.profile-card.flipped .profile-front {
  pointer-events: none;
}

.profile-card.flipped .profile-back {
  pointer-events: auto;
}

.profile-front,
.profile-back {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
  border-radius: 20px;
  backface-visibility: hidden;
  border: 1px solid rgba(255,255,255,.76);
  color: #fff;
  background:
    radial-gradient(circle at 28% 15%, rgba(255,255,255,.94), rgba(255,255,255,.16) 19%, transparent 38%),
    linear-gradient(145deg, var(--card-a), var(--card-b));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.3),
    inset 0 -44px 70px rgba(7,16,22,.16),
    0 20px 50px rgba(20,50,64,.24);
}

.profile-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.profile-shine {
  display: none;
}

.profile-front::before,
.profile-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 24%, rgba(255,255,255,.8) 34%, transparent 48%),
    radial-gradient(circle at 76% 24%, var(--tier-accent), transparent 16%);
  opacity: .56;
  transform: translateX(-42%) rotate(8deg);
  animation: premiumSweep 3.8s ease-in-out infinite alternate;
  pointer-events: none;
}

.profile-front::after,
.profile-back::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.24);
  pointer-events: none;
}

.profile-front > *,
.profile-back > * {
  position: relative;
  z-index: 1;
}

.profile-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 25% 18%, rgba(255,255,255,.24), transparent 30%),
    linear-gradient(145deg, color-mix(in srgb, var(--card-a), #071016 44%), color-mix(in srgb, var(--card-b), #071016 36%));
}

.profile-avatar,
.compare-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #18e8ad;
  background: #071016;
  color: #fff;
  font-weight: 950;
}

.profile-front strong {
  font-size: 24px;
  text-align: center;
}

.profile-photo {
  position: relative;
  width: 92px;
  height: 92px;
  display: block;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.38);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.38),
    0 14px 30px rgba(15,23,42,.18);
}

.profile-photo > img,
.profile-photo > svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.profile-default-photo {
  filter: drop-shadow(0 7px 10px rgba(15,23,42,.18));
}

.profile-photo-badge {
  position: absolute;
  right: -2px;
  bottom: -4px;
  width: 34px;
  height: 34px;
  display: block;
  border: 0;
  border-radius: 50%;
  padding: 3px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 8px 18px rgba(15,23,42,.2);
  cursor: pointer;
}

.profile-photo-badge .tier-emblem {
  width: 100%;
  height: 100%;
}

.profile-photo-badge:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.profile-front em,
.profile-front span,
.profile-back span {
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.profile-stat-line {
  display: block;
  min-width: 96px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.14);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.profile-stat-line b,
.profile-stat-line small {
  display: block;
  line-height: 1.15;
}

@keyframes premiumSweep {
  0% { transform: translateX(-54%) rotate(8deg); }
  100% { transform: translateX(56%) rotate(8deg); }
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.user-sticker-strip {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.user-sticker-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.user-sticker-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-sticker-strip b {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--panel);
  font-size: 12px;
}

.album-compare-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, #45b9c7, #1c9fad);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}

.compare-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  text-align: center;
  text-transform: uppercase;
}

.compare-head button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.compare-people {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: end;
  text-align: center;
  gap: 8px;
}

.compare-people div {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.compare-people b {
  align-self: center;
  font-size: 28px;
}

.album-compare-panel p {
  margin: 0;
  text-align: center;
  font-weight: 900;
}

.trade-count {
  display: block;
  color: #18e8ad;
  font-size: 44px;
  line-height: 1;
  text-align: center;
}

.compare-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.compare-columns > div {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #101c28;
}

.compare-columns h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
}

.compare-card-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 6px;
  border-radius: 8px;
  background: #1e2a36;
}

.compare-card-row span {
  grid-row: span 2;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #334250;
  color: #fff;
  font-weight: 950;
  font-size: 12px;
}

.compare-card-row strong,
.compare-card-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-card-row small,
.compare-empty {
  color: #cdd8e3;
  font-size: 11px;
  font-weight: 900;
}

.profile-identity {
  width: min(292px, 100%);
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 4px 0 0;
  text-align: center;
}

.profile-identity .profile-photo {
  width: 76px;
  height: 76px;
}

.profile-user-meta {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
}

.profile-identity strong {
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.profile-identity em {
  max-width: 100%;
  color: rgba(255,255,255,.84);
  font-size: 12px;
  font-style: normal;
  line-height: 1.22;
  text-align: center;
}

.profile-xp-card {
  width: min(252px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  background: rgba(2, 15, 29, .42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.profile-xp-card > span {
  min-width: 0;
  display: grid;
  gap: 1px;
  text-align: left;
}

.profile-xp-card b,
.profile-xp-card small,
.profile-xp-card strong {
  line-height: 1;
  text-align: left;
}

.profile-xp-card b {
  color: #fff;
  font-size: 13px;
}

.profile-xp-card small {
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 850;
}

.profile-xp-card strong {
  color: var(--tier-accent);
  font-size: 11px;
  white-space: nowrap;
}

.profile-xp-card i {
  grid-column: 1 / -1;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(2,15,29,.7);
}

.profile-xp-card i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #13c8a3, #f0c84b);
  box-shadow: 0 0 14px rgba(240,200,75,.36);
}

.profile-official-badges {
  width: min(252px, 100%);
  display: flex;
  justify-content: center;
  gap: 6px;
}

.profile-official-badge {
  width: 58px;
  min-height: 52px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.13);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.profile-official-badge img {
  width: 38px;
  height: 34px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 7px 9px rgba(2, 15, 29, .28));
}

.profile-official-badge span {
  max-width: 100%;
  overflow: hidden;
  color: rgba(255,255,255,.88);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-instagram {
  min-height: 30px;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(2, 15, 29, .35);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}

.profile-instagram img {
  width: 21px;
  height: 21px;
  display: block;
  object-fit: contain;
}

.profile-friend-btn {
  min-height: 30px;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(240, 200, 75, .44);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,224,117,.78));
  color: #5d3a00;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.74),
    0 7px 14px rgba(122, 74, 0, .12);
}

.profile-follow-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  flex-wrap: wrap;
}

.profile-follow-count {
  min-height: 30px;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(16,179,107,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #0f2833;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
}

.profile-follow-count b {
  color: #07543f;
  font-size: 13px;
  font-weight: 950;
}

.profile-follow-count small {
  color: #52636d;
  font-size: 10px;
  font-weight: 900;
}

.profile-friend-btn i {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  font-style: normal;
}

.profile-friend-btn i::before {
  content: "\2795";
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 16px;
  line-height: 1;
}

.profile-friend-btn.saved {
  border-color: rgba(16,179,107,.34);
  background: linear-gradient(135deg, rgba(236,253,245,.94), rgba(175,255,214,.82));
  color: #07543f;
}

.profile-friend-btn.saved i::before {
  content: "\2705";
}

.profile-reputation-panel {
  width: min(292px, 100%);
  display: grid;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(2, 15, 29, .48);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.profile-reputation-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.profile-reputation-head b {
  color: rgba(255,255,255,.9);
  font-size: 12px;
  text-align: left;
}

.profile-reputation-head > span {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.profile-reputation-head strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.profile-stars {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 1px;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
}

.profile-stars i {
  display: block;
  font-style: normal;
}

.profile-stars i.active {
  color: #facc15;
  text-shadow: 0 1px 6px rgba(250,204,21,.35);
}

.profile-reputation-head em {
  color: rgba(255,255,255,.76);
  font-size: 11px;
  font-style: normal;
}

.profile-reputation-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.profile-reputation-metrics span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 5px 3px;
  border-radius: 8px;
  background: rgba(255,255,255,.11);
  text-align: center;
}

.profile-reputation-metrics b {
  color: var(--tier-accent);
  font-size: 15px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-reputation-metrics small {
  color: rgba(255,255,255,.78);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-status-panel {
  width: min(292px, 100%);
  display: grid;
  gap: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(2, 15, 29, .52);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.profile-stat-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  text-align: left;
}

.profile-stat-row:last-child {
  border-bottom: 0;
}

.profile-stat-row i,
.complete-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-stat-row i::before,
.complete-icon::before {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 25px;
  line-height: 1;
}

.stat-owned i::before { content: "\2705"; }
.stat-missing i::before { content: "\274C"; }
.stat-duplicates i::before { content: "\1F501"; }
.stat-total i::before { content: "\1F522"; }

.profile-stat-row b {
  color: #fff;
  font-size: 15px;
  text-align: left;
}

.profile-stat-row strong {
  color: var(--tier-accent);
  font-size: 24px;
  line-height: 1;
  text-align: right;
}

.profile-complete-panel {
  width: min(292px, 100%);
  margin-top: auto;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(2, 15, 29, .44);
}

.complete-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, #2dd4bf, #0891b2);
}

.complete-icon::before {
  content: "♕";
  font-size: 24px;
}

.profile-complete-panel span:nth-child(2) {
  display: grid;
  gap: 5px;
  text-align: left;
}

.profile-complete-panel b {
  font-size: 15px;
  text-align: left;
}

.profile-complete-panel i {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(2, 15, 29, .66);
}

.profile-complete-panel i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tier-accent), var(--card-b));
}

.profile-complete-panel strong {
  font-size: 26px;
  line-height: 1;
}

.profile-back-scroll {
  width: 100%;
  height: 100%;
}

.profile-emblem-guide {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
}

.profile-emblem-guide header {
  display: grid;
  gap: 3px;
  text-align: left;
}

.profile-emblem-guide header strong {
  color: #fff;
  font-size: 19px;
  text-align: left;
}

.profile-emblem-guide header span,
.profile-emblem-guide p {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-align: left;
}

.profile-emblem-guide p {
  margin: 0;
}

.profile-rank-progress {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: rgba(2,15,29,.34);
}

.profile-rank-progress span {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 8px;
  text-align: left;
}

.profile-rank-progress b {
  color: #fff;
  font-size: 15px;
  text-align: left;
}

.profile-rank-progress small {
  overflow: hidden;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-rank-progress i {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(2,15,29,.72);
}

.profile-rank-progress i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tier-accent), var(--card-b));
}

.profile-emblem-grid {
  min-height: 0;
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.profile-emblem-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-areas:
    "icon name"
    "icon text";
  align-items: center;
  gap: 2px 10px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(2,15,29,.28);
}

.profile-emblem-step.active {
  border-color: rgba(255,255,255,.52);
  background: rgba(255,255,255,.16);
}

.profile-emblem-step .tier-emblem {
  grid-area: icon;
  width: 38px;
  height: 38px;
}

.profile-emblem-step b,
.profile-emblem-step small {
  text-align: left;
}

.profile-emblem-step b {
  grid-area: name;
  color: #fff;
  font-size: 14px;
}

.profile-emblem-step small {
  grid-area: text;
  color: rgba(255,255,255,.74);
  font-size: 11px;
  font-weight: 850;
}

.album-compare-panel {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto auto;
  gap: 7px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.compare-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.compare-head-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.compare-handshake {
  width: 42px;
  height: 42px;
  display: block;
  padding: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}

.compare-handshake .tier-emblem {
  width: 100%;
  height: 100%;
}

.compare-head strong {
  font-size: 18px;
  line-height: 1.05;
  text-transform: uppercase;
}

.compare-head-copy small {
  color: rgba(255,255,255,.82);
  font-size: 11px;
  font-weight: 850;
}

.compare-trade-plan {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 6px;
}

.compare-plan-metric {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px 4px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(2,15,29,.5);
  text-align: center;
}

.compare-plan-metric small,
.compare-plan-metric em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-plan-metric small {
  color: rgba(255,255,255,.78);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.compare-plan-metric b {
  color: #fff;
  font-size: 19px;
  line-height: .98;
}

.compare-plan-metric em {
  color: rgba(255,255,255,.78);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.compare-plan-ideal {
  border-color: color-mix(in srgb, var(--tier-accent), #fff 20%);
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(2,15,29,.58));
}

.compare-plan-ideal b {
  color: var(--tier-accent);
  font-size: 22px;
}

.compare-total-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,.9);
  font-size: 13px;
}

.compare-total-line strong {
  color: var(--tier-accent);
  font-size: 46px;
  line-height: .95;
}

.compare-trade-section {
  min-height: 178px;
  display: grid;
  grid-template-rows: auto 146px;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(2,15,29,.48);
}

.compare-section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.compare-section-head span {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.compare-section-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

.compare-section-head small {
  overflow: hidden;
  color: rgba(255,255,255,.72);
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-section-head b {
  min-width: 42px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--card-a), var(--card-b));
  font-size: 18px;
}

.compare-card-strip {
  min-height: 146px;
  max-height: 146px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 58px;
  grid-template-rows: repeat(2, 67px);
  gap: 6px;
  align-content: stretch;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 5px 0;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 226, 106, .72) rgba(2,15,29,.3);
  -webkit-overflow-scrolling: touch;
}

.compare-card-strip::-webkit-scrollbar {
  height: 5px;
}

.compare-card-strip::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(2,15,29,.28);
}

.compare-card-strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 226, 106, .76);
}

.compare-sticker-tile {
  position: relative;
  width: 58px;
  min-width: 58px;
  min-height: 67px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 5px 3px;
  border: 1px solid rgba(103,232,249,.36);
  border-radius: 8px;
  background: rgba(2,15,29,.66);
  color: #fff;
  font: inherit;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
}

.compare-sticker-tile.selected {
  border-color: rgba(255, 226, 106, .92);
  background:
    linear-gradient(145deg, rgba(255, 226, 106, .32), rgba(2,15,29,.76));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 0 12px rgba(255, 211, 76, .24);
}

.compare-sticker-tile.selected::after {
  content: "✓";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #10b36b;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.compare-sticker-tile img {
  width: 31px;
  height: 21px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18);
}

.compare-sticker-tile strong {
  font-size: 13px;
  line-height: 1;
}

.compare-sticker-tile b {
  font-size: 19px;
  line-height: 1;
}

.compare-empty {
  width: 100%;
  min-width: 220px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  text-align: center;
}

.compare-selection-summary {
  min-height: 16px;
  display: block;
  overflow: hidden;
  color: rgba(255,255,255,.82);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.compare-action-btn {
  min-width: 0;
  min-height: 42px;
  padding: 4px 5px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--card-a), #02101d 22%), color-mix(in srgb, var(--card-b), #02101d 22%));
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.08;
  text-transform: uppercase;
}

.compare-tip {
  display: block;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  background: rgba(2,15,29,.46);
  color: rgba(255,255,255,.9);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.own-card-panel {
  grid-template-rows: auto 1fr;
  align-content: center;
}

.own-card-action {
  display: grid;
  place-items: center;
  min-height: 190px;
}

.primary-own-action {
  width: min(230px, 100%);
  min-height: 58px;
  background: linear-gradient(145deg, #f0c84b, #10b36b);
  color: #071016;
  font-size: 13px;
}

.profile-album-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 7px;
  color: #fff;
  touch-action: pan-y;
}

.profile-album-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(2,15,29,.42);
}

.profile-album-tabs button,
.profile-album-strip button {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(32, 16, 64, .48);
  color: rgba(255,255,255,.86);
  cursor: pointer;
  font-weight: 950;
}

.profile-album-tabs button {
  min-height: 28px;
  border-radius: 7px;
  font-size: 9px;
}

.profile-album-tabs button.active,
.profile-album-strip button.active {
  border-color: rgba(167,139,250,.82);
  background: linear-gradient(145deg, #4c1d95, #7c3aed);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 18px rgba(76,29,149,.24);
}

.profile-album-strip {
  min-height: 62px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scrollbar-color: rgba(255,255,255,.42) rgba(2,15,29,.20);
  scrollbar-width: thin;
}

.profile-album-strip::-webkit-scrollbar {
  height: 5px;
}

.profile-album-strip::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(2,15,29,.20);
}

.profile-album-strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255,255,255,.42);
}

.profile-album-strip button {
  width: 50px;
  min-width: 50px;
  min-height: 56px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 5px 4px;
  border-radius: 8px;
}

.profile-album-strip button[data-album-group] {
  width: 70px;
  min-width: 70px;
}

.profile-album-strip img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.2);
}

.profile-album-strip b {
  font-size: 10px;
  line-height: 1;
}

.profile-album-strip small {
  color: rgba(255,255,255,.82);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.profile-album-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.profile-album-heading strong {
  font-size: 17px;
  line-height: 1;
  text-align: left;
}

.profile-album-heading span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.9);
  font-size: 11px;
}

.profile-album-heading i,
.profile-album-legend i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
}

.dot-owned { background: #22c55e; }
.dot-duplicate { background: #8b5cf6; }
.dot-missing { background: #9ca3af; }

.profile-album-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 52px;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.profile-album-sticker {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  padding: 4px 2px;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 7px 14px rgba(0,0,0,.18);
}

.profile-album-sticker img {
  width: 25px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
}

.profile-album-sticker b {
  font-size: 10px;
  line-height: 1;
}

.profile-album-sticker strong {
  font-size: 15px;
  line-height: 1;
}

.profile-album-sticker.album-owned {
  border: 1px solid rgba(34,197,94,.8);
  background: linear-gradient(145deg, rgba(22,163,74,.9), rgba(5,46,22,.9));
}

.profile-album-sticker.album-duplicate {
  border: 1px solid rgba(168,85,247,.9);
  background: linear-gradient(145deg, rgba(126,34,206,.92), rgba(41,14,91,.95));
}

.profile-album-sticker.album-missing {
  border: 1px dashed rgba(148,163,184,.44);
  background: rgba(15,23,42,.42);
  color: rgba(255,255,255,.48);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.profile-album-sticker.album-missing img {
  opacity: .45;
  filter: grayscale(1);
}

.profile-album-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 130px;
  border: 1px dashed rgba(255,255,255,.2);
  border-radius: 12px;
  color: rgba(255,255,255,.76);
  font-size: 12px;
}

.profile-album-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 900;
}

.profile-album-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* NEXO Card premium layer - adapted from the 3333 update package. */
.pin-card-face,
.profile-front,
.profile-back {
  border-color: rgba(255,255,255,.66);
  background:
    radial-gradient(circle at 21% 16%, rgba(255,255,255,.96) 0 1px, transparent 1.7px),
    radial-gradient(circle at 58% 26%, rgba(255,246,184,.42) 0 .8px, transparent 1.5px),
    radial-gradient(circle at 36% 62%, rgba(255,255,255,.42) 0 .7px, transparent 1.4px),
    radial-gradient(circle at 72% 73%, rgba(255,231,117,.42) 0 .8px, transparent 1.5px),
    linear-gradient(122deg, rgba(255,255,255,.44) 0 10%, transparent 11% 42%, rgba(255,255,255,.18) 43% 47%, transparent 48%),
    linear-gradient(154deg, transparent 0 54%, rgba(255,255,255,.16) 55% 59%, transparent 60%),
    radial-gradient(ellipse at 72% 78%, color-mix(in srgb, var(--tier-accent), transparent 68%), transparent 36%),
    linear-gradient(145deg,
      color-mix(in srgb, #ffffff, var(--card-a) 34%) 0%,
      var(--card-a) 24%,
      color-mix(in srgb, var(--card-b), #071016 24%) 52%,
      color-mix(in srgb, var(--tier-accent), var(--card-b) 46%) 74%,
      color-mix(in srgb, var(--card-b), #020b12 38%) 100%);
  box-shadow:
    inset 7px 8px 16px rgba(255,255,255,.28),
    inset -9px -12px 20px rgba(7,16,22,.24),
    0 16px 34px rgba(15,23,42,.22),
    0 0 22px color-mix(in srgb, var(--tier-accent), transparent 62%);
}

.profile-back {
  background:
    radial-gradient(circle at 21% 16%, rgba(255,255,255,.38) 0 1px, transparent 1.7px),
    radial-gradient(circle at 58% 26%, rgba(255,246,184,.24) 0 .8px, transparent 1.5px),
    radial-gradient(circle at 36% 62%, rgba(255,255,255,.24) 0 .7px, transparent 1.4px),
    linear-gradient(122deg, rgba(255,255,255,.22) 0 10%, transparent 11% 42%, rgba(255,255,255,.10) 43% 47%, transparent 48%),
    radial-gradient(ellipse at 72% 78%, color-mix(in srgb, var(--tier-accent), transparent 82%), transparent 36%),
    linear-gradient(145deg,
      color-mix(in srgb, var(--card-a), #071016 52%) 0%,
      color-mix(in srgb, var(--card-a), #071016 40%) 28%,
      color-mix(in srgb, var(--card-b), #020b12 34%) 62%,
      color-mix(in srgb, var(--card-b), #020b12 54%) 100%);
}

.collector-location-marker.zoom-far .pin-card-face,
.collector-location-marker.zoom-near .pin-card-face {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.82) 0 1px, transparent 1.8px),
    radial-gradient(circle at 66% 38%, color-mix(in srgb, var(--tier-accent), transparent 52%) 0 .9px, transparent 1.7px),
    linear-gradient(136deg, rgba(255,255,255,.38) 0 9%, transparent 10% 41%, rgba(255,255,255,.16) 42% 48%, transparent 49%),
    radial-gradient(ellipse at 77% 82%, color-mix(in srgb, var(--tier-accent), transparent 74%), transparent 34%),
    linear-gradient(145deg,
      color-mix(in srgb, #ffffff, var(--card-a) 30%) 0%,
      var(--card-a) 25%,
      color-mix(in srgb, var(--card-b), #071016 25%) 58%,
      color-mix(in srgb, var(--tier-accent), var(--card-b) 56%) 100%);
}

.pin-card-face::before {
  content: "";
  position: absolute;
  inset: 6%;
  z-index: 0;
  pointer-events: none;
  border-radius: calc(100% / 12);
  opacity: .88;
  mix-blend-mode: screen;
  background:
    linear-gradient(30deg, transparent 0 57%, rgba(255,255,255,.26) 58% 59%, transparent 60%),
    linear-gradient(30deg, transparent 0 70%, rgba(7,16,22,.18) 71% 75%, rgba(255,247,178,.34) 76% 77%, transparent 78%),
    radial-gradient(circle at 18% 28%, rgba(255,255,255,.68) 0 .8px, transparent 1.6px),
    radial-gradient(circle at 31% 42%, rgba(255,226,118,.46) 0 .7px, transparent 1.5px),
    radial-gradient(circle at 70% 23%, rgba(255,235,130,.44) 0 .8px, transparent 1.6px),
    radial-gradient(circle at 41% 68%, rgba(255,255,255,.44) 0 .7px, transparent 1.5px),
    linear-gradient(62deg, transparent 0 23%, rgba(255,255,255,.18) 23.2% 23.7%, transparent 24%),
    linear-gradient(117deg, transparent 0 46%, rgba(255,244,174,.16) 46.2% 46.8%, transparent 47%);
}

.pin-card-face::after {
  z-index: 1;
  opacity: .82;
  mix-blend-mode: screen;
}

.pin-avatar,
.pin-rank-emblem,
.pin-card-face strong,
.pin-card-face em,
.pin-card-face small,
.pin-summary {
  position: relative;
  z-index: 2;
}

.profile-front::before,
.profile-back::before {
  z-index: 0;
  background:
    linear-gradient(115deg, transparent 24%, rgba(255,255,255,.72) 34%, transparent 48%),
    radial-gradient(circle at 76% 24%, color-mix(in srgb, var(--tier-accent), transparent 12%), transparent 16%),
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.60) 0 1px, transparent 1.9px),
    radial-gradient(circle at 28% 41%, rgba(255,231,135,.42) 0 .9px, transparent 1.8px),
    radial-gradient(circle at 62% 31%, rgba(255,255,255,.38) 0 .8px, transparent 1.7px),
    radial-gradient(circle at 74% 62%, rgba(255,226,100,.34) 0 .9px, transparent 1.8px),
    linear-gradient(42deg, transparent 0 22%, rgba(255,255,255,.18) 22.4% 22.8%, transparent 23%),
    linear-gradient(102deg, transparent 0 38%, rgba(255,246,179,.16) 38.2% 38.7%, transparent 39%),
    linear-gradient(133deg, transparent 0 55%, rgba(255,255,255,.15) 55.2% 55.8%, transparent 56%);
  opacity: .66;
  mix-blend-mode: screen;
}

.profile-back::before {
  opacity: .38;
}

.profile-front::after,
.profile-back::after {
  z-index: 1;
  border-color: rgba(255,255,255,.18);
  box-shadow:
    inset 2px 2px 5px rgba(255,255,255,.42),
    inset -2px -3px 7px rgba(7,16,22,.24);
}

.profile-front > *,
.profile-back > * {
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .pin-card-face::after,
  .profile-front::before,
  .profile-back::before {
    animation: none;
  }
}

@media (max-width: 840px) {
  body {
    background: var(--bg);
  }

  .admin-metrics-dialog {
    width: min(420px, calc(100vw - 18px));
    max-height: calc(100vh - 24px);
    padding: 12px;
  }

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

  .admin-metrics-sections {
    grid-template-columns: 1fr;
  }

  .app-shell[data-view="map"] .topbar {
    top: 10px;
    left: 10px;
    width: calc(100vw - 20px);
  }

  .app-shell[data-view="map"] .map-summary-grid {
    display: none;
  }

  .app-shell[data-view="map"] .map-view .section-head {
    left: 10px;
    right: 10px;
    bottom: 108px;
  }

  .app-shell[data-view="map"] .leaflet-top.leaflet-left {
    top: 96px;
  }

  .app-shell {
    display: block;
    padding: 0;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    min-height: 0;
    padding: 0 10px calc(10px + env(safe-area-inset-bottom));
    border-width: 0;
  }

  .brand,
  .side-meter {
    display: none;
  }

  .nav-stack {
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px;
    width: min(420px, 100%);
    min-height: 68px;
    padding: 6px;
  }

  .nav-btn {
    min-height: 50px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding: 4px 2px;
    font-size: 10px;
    text-align: center;
  }

  .nav-ico {
    width: 25px;
    height: 23px;
  }

  .nav-btn-primary {
    min-height: 62px;
    transform: translateY(-9px);
  }

  .nav-btn-primary .nav-ico {
    width: 52px;
    height: 52px;
  }

  .phone-frame {
    min-height: 100vh;
    max-height: none;
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 460px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sticker-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
  }

  .sticker {
    padding: 3px;
  }

  .sticker-number {
    font-size: 15px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .sticker-mode-toggle {
    width: 104px;
    height: 38px;
  }

  .sticker-mode-toggle button {
    font-size: 21px;
  }

  .hero-band {
    grid-template-columns: 96px 1fr;
    margin: 12px;
    padding: 14px;
  }

  .progress-ring {
    width: 88px;
    height: 88px;
  }

  .progress-ring strong {
    font-size: 22px;
  }

  .hero-copy strong {
    font-size: 20px;
  }

  .match-grid,
  .setting-row,
  .compare-columns,
  .profile-actions {
    grid-template-columns: 1fr;
  }

  .map-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nearby-dialog,
  .message-dialog {
    width: calc(100vw - 18px);
  }

  .nearby-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .nearby-trade {
    grid-column: 2;
    justify-items: start;
  }
}

/* Profile dashboard and mission symbols */
.profile-dialog {
  width: min(900px, calc(100vw - 24px));
  max-height: min(760px, calc(100vh - 36px));
}

.profile-dialog::backdrop {
  background: rgba(5, 12, 20, .5);
  backdrop-filter: blur(7px);
}

.profile-card {
  width: min(880px, calc(100vw - 28px));
  height: min(610px, calc(100vh - 44px));
  aspect-ratio: auto;
}

.profile-front,
.profile-back {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: stretch;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 15%, rgba(255,255,255,.32), transparent 25%),
    radial-gradient(circle at 86% 80%, color-mix(in srgb, var(--tier-accent), transparent 74%), transparent 30%),
    linear-gradient(145deg, #f8fbfc 0%, #edf8f6 35%, color-mix(in srgb, var(--card-a), #ffffff 60%) 100%);
  color: #10202a;
}

.profile-back {
  color: #fff;
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.24), transparent 30%),
    linear-gradient(145deg, color-mix(in srgb, var(--card-a), #071016 44%), color-mix(in srgb, var(--card-b), #071016 38%));
}

.profile-front::after {
  border-color: rgba(16,179,107,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.56);
}

.profile-dashboard-title {
  min-height: 32px;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  color: #142733;
  letter-spacing: 0;
}

.profile-dashboard-title b {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  line-height: 1;
}

.profile-dashboard-title b::before,
.profile-dashboard-title b::after {
  content: "*";
  color: #f0c84b;
}

.profile-dashboard-title strong {
  color: #10b36b;
  font-size: inherit;
}

.profile-close-control {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(7,16,22,.86);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(7,16,22,.2);
}

.profile-dashboard-hero {
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(270px, .85fr) minmax(280px, 1.15fr);
  align-items: stretch;
  gap: 12px;
}

.profile-identity {
  width: 100%;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(16,179,107,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.76);
  text-align: left;
  box-shadow: 0 12px 24px rgba(15,23,42,.08);
}

.profile-identity .profile-photo {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  border-color: rgba(16,179,107,.32);
  background: #fff;
}

.profile-photo > img,
.profile-photo > svg {
  border-radius: 9px;
}

.profile-photo-badge {
  right: -8px;
  bottom: -8px;
  width: 42px;
  height: 42px;
}

.profile-user-meta {
  justify-items: start;
  gap: 7px;
}

.profile-identity strong {
  color: #10202a;
  font-size: 24px;
  line-height: 1;
  text-align: left;
}

.profile-identity em {
  color: #10a365;
  font-size: 13px;
  text-align: left;
}

.profile-instagram {
  color: #0f2833;
  background: rgba(16,179,107,.1);
  border-color: rgba(16,179,107,.2);
}

.profile-xp-card {
  position: relative;
  width: 100%;
  min-height: 132px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(16,179,107,.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 24%, color-mix(in srgb, var(--tier-accent), transparent 58%), transparent 26%),
    rgba(255,255,255,.78);
  box-shadow: 0 12px 24px rgba(15,23,42,.08);
}

.profile-xp-card::before {
  content: "XP";
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #7c3aed, #2563eb);
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  box-shadow: 0 12px 18px rgba(37,99,235,.22);
}

.profile-xp-card > span {
  gap: 5px;
}

.profile-xp-card b {
  color: #10b36b;
  font-size: 28px;
}

.profile-xp-card small {
  color: #5c6b74;
  font-size: 13px;
}

.profile-xp-card strong {
  align-self: start;
  padding: 8px 10px;
  border-radius: 999px;
  color: #13212a;
  background: rgba(240,200,75,.18);
  font-size: 14px;
}

.profile-xp-card i {
  grid-column: 2 / -1;
  height: 13px;
  background: rgba(92,107,116,.18);
}

.profile-xp-card i span {
  background: linear-gradient(90deg, #10b36b, #13c8a3);
  box-shadow: 0 0 18px rgba(16,179,107,.32);
}

.profile-dashboard-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
  gap: 12px;
}

.profile-dashboard-stats {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}

.profile-status-panel,
.profile-reputation-panel,
.profile-complete-panel,
.profile-emblems-showcase {
  border: 1px solid rgba(16,179,107,.14);
  background: rgba(255,255,255,.78);
  color: #13212a;
  box-shadow: 0 12px 24px rgba(15,23,42,.08);
}

.profile-status-panel {
  width: 100%;
  padding: 8px 12px;
}

.profile-stat-row {
  min-height: 32px;
  border-bottom-color: rgba(19,33,42,.08);
}

.profile-stat-row b {
  color: #42515a;
  font-size: 13px;
}

.profile-stat-row strong {
  color: #13212a;
  font-size: 20px;
}

.profile-stat-row i::before,
.complete-icon::before {
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 950;
}

.stat-owned i::before { content: "OK"; color: #10b36b; }
.stat-missing i::before { content: "--"; color: #ef4444; }
.stat-duplicates i::before { content: "2x"; color: #f0c84b; }
.stat-total i::before { content: "#"; color: #2563eb; }

.profile-complete-panel {
  width: 100%;
  margin-top: 0;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  padding: 10px 12px;
  border-color: rgba(16,179,107,.24);
}

.complete-icon {
  border-radius: 12px;
  background: linear-gradient(145deg, #10b36b, #13c8a3);
}

.complete-icon::before {
  content: "%";
  color: #fff;
  font-size: 22px;
}

.profile-complete-panel b {
  color: #13212a;
  font-size: 14px;
}

.profile-complete-panel i {
  height: 12px;
  background: rgba(92,107,116,.16);
}

.profile-complete-panel i span {
  background: linear-gradient(90deg, #10b36b, #13c8a3);
  box-shadow: 0 0 18px rgba(16,179,107,.24);
}

.profile-complete-panel strong {
  color: #10a365;
  font-size: 30px;
}

.profile-reputation-panel {
  width: 100%;
  padding: 9px 10px;
}

.profile-reputation-head b,
.profile-reputation-head strong {
  color: #13212a;
}

.profile-reputation-head em,
.profile-reputation-metrics small {
  color: #5c6b74;
}

.profile-reputation-metrics span {
  background: rgba(19,200,163,.08);
}

.profile-reputation-metrics b {
  color: #10a365;
}

.profile-emblems-showcase {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
}

.profile-emblems-head {
  display: grid;
  gap: 3px;
  text-align: left;
}

.profile-emblems-head b {
  color: #e2a900;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
}

.profile-emblems-head small {
  color: #66717a;
  font-size: 12px;
  font-weight: 850;
}

.profile-emblems-showcase .profile-official-badges {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  align-content: start;
  gap: 10px;
}

.profile-emblems-showcase .profile-official-badge {
  width: 100%;
  min-height: 106px;
  gap: 5px;
  padding: 8px 6px;
  border-color: rgba(240,200,75,.42);
  background:
    radial-gradient(circle at 50% 16%, rgba(255,237,150,.62), transparent 34%),
    linear-gradient(180deg, #ffffff, #eef8f4);
  color: #13212a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 12px 22px rgba(132,85,0,.12);
}

.profile-emblems-showcase .profile-official-badge img {
  width: 72px;
  height: 64px;
}

.profile-emblems-showcase .profile-official-badge span {
  color: #13212a;
  font-size: 11px;
}

.profile-secret-badge {
  min-height: 106px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 8px 6px;
  border: 1px dashed rgba(19,33,42,.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.66), rgba(237,246,247,.58));
  color: #66717a;
}

.profile-secret-badge i {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.58), transparent 34%),
    linear-gradient(145deg, #d7dee4, #a7b2bb);
  filter: grayscale(1);
}

.profile-secret-badge i::before {
  content: "?";
  color: #fff;
  font-size: 30px;
  font-style: normal;
  font-weight: 950;
}

.profile-secret-badge b {
  color: #66717a;
  font-size: 11px;
  line-height: 1;
}

.profile-emblems-empty {
  min-height: 120px;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 1px dashed rgba(19,33,42,.18);
  border-radius: 10px;
  background: rgba(237,246,247,.72);
  text-align: center;
}

.profile-emblems-empty b {
  color: #13212a;
  font-size: 18px;
}

.profile-emblems-empty small {
  color: #66717a;
  font-size: 12px;
}

.profile-dashboard-nav {
  min-height: 64px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(16,179,107,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 24px rgba(15,23,42,.08);
}

.profile-dashboard-nav button {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, auto);
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #13212a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.profile-dashboard-nav button:hover {
  background: rgba(16,179,107,.1);
}

.profile-nav-ico {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.54);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.74),
    0 5px 10px rgba(122, 74, 0, .13);
}

.profile-nav-ico::before {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.profile-nav-ico.album::before { content: "📒"; }
.profile-nav-ico.trades::before { content: "🔁"; }
.profile-nav-ico.events::before { content: "📅"; }
.profile-nav-ico.ranking::before { content: "🏆"; }
.profile-nav-ico.settings::before { content: "⚙️"; }
.profile-nav-ico.like::before { content: "💚"; }

.challenge-dialog {
  width: min(560px, calc(100vw - 26px));
  padding: 16px;
  border-radius: 12px;
}

.challenge-dialog > .dialog-close {
  width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0;
}

.challenge-dialog > .dialog-close::before {
  content: "x";
  font-size: 16px;
  font-weight: 950;
  text-transform: uppercase;
}

.challenge-head {
  grid-template-columns: 1fr;
  gap: 5px;
}

.challenge-head strong {
  font-size: 26px;
}

.challenge-tabs {
  padding: 5px;
  border-radius: 10px;
}

.challenge-tabs button {
  border-radius: 8px;
}

.challenge-tabs button[data-challenge-tab="event"] {
  color: #9a6b00;
}

.challenge-tabs button[data-challenge-tab="event"].active {
  background: linear-gradient(135deg, #f0c84b, #10b36b);
  color: #071016;
}

.challenge-card {
  min-height: 92px;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #edf6f7);
  box-shadow: 0 12px 22px rgba(15,23,42,.08);
}

.challenge-card strong {
  padding: 6px 8px;
  border-radius: 999px;
  color: #0b62d8;
  background: rgba(37,99,235,.1);
}

.challenge-card.featured strong {
  color: #0f7a4e;
  background: rgba(16,179,107,.14);
}

.challenge-icon,
.challenge-badge-thumb {
  position: relative;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 14px;
}

.challenge-icon::before,
.challenge-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.challenge-icon.cards {
  background: linear-gradient(145deg, #2dd4bf, #2563eb);
}

.challenge-icon.cards::before {
  left: 18px;
  top: 12px;
  width: 24px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 5px;
  background: rgba(255,255,255,.18);
  box-shadow: -8px 7px 0 -2px rgba(255,255,255,.44);
}

.challenge-icon.cards::after {
  left: 24px;
  top: 18px;
  width: 12px;
  height: 5px;
  border-radius: 999px;
  background: #f0c84b;
}

.challenge-icon.people {
  background: linear-gradient(145deg, #60a5fa, #2563eb);
}

.challenge-icon.people::before {
  left: 12px;
  top: 12px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 17px 3px 0 -2px rgba(255,255,255,.82);
}

.challenge-icon.people::after {
  left: 9px;
  bottom: 12px;
  width: 40px;
  height: 18px;
  border-radius: 18px 18px 7px 7px;
  background: #fff;
}

.challenge-icon.trade {
  background: linear-gradient(145deg, #10b36b, #0f766e);
}

.challenge-icon.trade::before {
  left: 10px;
  top: 15px;
  width: 36px;
  height: 24px;
  border: 0;
  color: #fff;
  content: "<>";
  font: 950 26px/1 Arial, sans-serif;
  letter-spacing: -8px;
}

.challenge-icon.share {
  background: linear-gradient(145deg, #8b5cf6, #2563eb);
}

.challenge-icon.share::before {
  left: 12px;
  top: 12px;
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 25px 0 0 #fff, 13px 24px 0 #fff;
}

.challenge-icon.share::after {
  left: 20px;
  top: 19px;
  width: 27px;
  height: 21px;
  border: 4px solid #fff;
  border-left: 0;
  border-bottom: 0;
  transform: rotate(26deg);
}

.challenge-icon.trophy {
  background: linear-gradient(145deg, #f59e0b, #f0c84b);
}

.challenge-icon.trophy::before {
  left: 17px;
  top: 11px;
  width: 24px;
  height: 26px;
  border: 4px solid #fff;
  border-radius: 4px 4px 12px 12px;
}

.challenge-icon.trophy::after {
  left: 21px;
  bottom: 10px;
  width: 17px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 -8px 0 -2px #fff;
}

.challenge-icon.check {
  background: linear-gradient(145deg, #22c55e, #10b36b);
}

.challenge-icon.check::before {
  left: 16px;
  top: 17px;
  width: 29px;
  height: 16px;
  border: 0;
  border-left: 6px solid #fff;
  border-bottom: 6px solid #fff;
  transform: rotate(-45deg);
}

.challenge-icon.check::after {
  display: none;
}

.challenge-card.featured {
  border-color: rgba(240,200,75,.5);
  background:
    radial-gradient(circle at 10% 0%, rgba(255,234,142,.46), transparent 34%),
    linear-gradient(135deg, rgba(255,250,221,.96), rgba(230,249,241,.96));
}

.challenge-badge-thumb {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,232,122,.86), rgba(240,200,75,.18) 52%, rgba(16,179,107,.16));
  box-shadow: 0 12px 24px rgba(132,85,0,.16);
}

.challenge-badge-thumb img {
  width: 56px;
  height: 54px;
}

@media (max-width: 720px) {
  .profile-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 18px);
  }

  .profile-card {
    width: min(390px, calc(100vw - 18px));
    height: min(760px, calc(100vh - 24px));
  }

  .profile-front {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 9px;
    padding: 12px;
  }

  .profile-dashboard-title b {
    font-size: 18px;
  }

  .profile-dashboard-hero,
  .profile-dashboard-body {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .profile-dashboard-hero {
    min-height: 0;
  }

  .profile-identity {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
  }

  .profile-identity .profile-photo {
    width: 78px;
    height: 78px;
    border-radius: 12px;
  }

  .profile-identity strong {
    font-size: 20px;
  }

  .profile-xp-card {
    min-height: 96px;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    padding: 10px;
  }

  .profile-xp-card::before {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 16px;
  }

  .profile-xp-card b {
    font-size: 20px;
  }

  .profile-dashboard-body {
    overflow: hidden;
  }

  .profile-dashboard-stats {
    grid-template-rows: auto auto;
  }

  .profile-status-panel {
    display: none;
  }

  .profile-emblems-showcase {
    min-height: 138px;
    padding: 10px;
  }

  .profile-emblems-head b {
    font-size: 16px;
  }

  .profile-emblems-showcase .profile-official-badges {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 7px;
  }

  .profile-emblems-showcase .profile-official-badge {
    min-height: 82px;
  }

  .profile-secret-badge {
    min-height: 82px;
    gap: 4px;
  }

  .profile-secret-badge i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .profile-secret-badge i::before {
    font-size: 23px;
  }

  .profile-emblems-showcase .profile-official-badge img {
    width: 52px;
    height: 46px;
  }

  .profile-dashboard-nav {
    min-height: 58px;
    gap: 4px;
    padding: 6px;
  }

  .profile-dashboard-nav button {
    grid-template-columns: 1fr;
    gap: 2px;
    font-size: 9px;
  }

  .profile-nav-ico {
    justify-self: center;
    width: 22px;
    height: 22px;
  }

  .challenge-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .challenge-card strong {
    grid-column: 2;
    width: fit-content;
  }
}

/* Profile portrait 9:16 premium card */
.profile-dialog {
  width: min(430px, calc(100vw - 22px));
  max-height: min(740px, calc(100vh - 24px));
}

.profile-card {
  width: min(390px, calc(100vw - 22px));
  height: auto;
  max-height: calc(100vh - 28px);
  aspect-ratio: 9 / 16;
}

.profile-front,
.profile-back {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.9) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72% 9%, rgba(255,226,118,.62) 0 1px, transparent 1.8px),
    radial-gradient(circle at 86% 34%, rgba(255,255,255,.55) 0 .8px, transparent 1.6px),
    radial-gradient(circle at 20% 78%, color-mix(in srgb, var(--tier-accent), transparent 60%), transparent 28%),
    radial-gradient(ellipse at 82% 88%, color-mix(in srgb, var(--card-b), transparent 48%), transparent 38%),
    linear-gradient(122deg, rgba(255,255,255,.62) 0 8%, transparent 9% 38%, rgba(255,255,255,.24) 39% 43%, transparent 44%),
    linear-gradient(154deg, transparent 0 54%, rgba(255,255,255,.22) 55% 58%, transparent 59%),
    linear-gradient(28deg, transparent 0 31%, color-mix(in srgb, var(--tier-accent), transparent 78%) 32% 36%, transparent 37%),
    linear-gradient(145deg,
      color-mix(in srgb, #ffffff, var(--card-a) 34%) 0%,
      color-mix(in srgb, var(--card-a), #ffffff 18%) 26%,
      color-mix(in srgb, var(--card-b), #ffffff 18%) 58%,
      color-mix(in srgb, var(--tier-accent), var(--card-b) 42%) 82%,
      color-mix(in srgb, var(--card-b), #071016 18%) 100%);
  box-shadow:
    inset 7px 8px 16px rgba(255,255,255,.52),
    inset -10px -14px 24px rgba(7,16,22,.12),
    0 24px 48px rgba(15,23,42,.24),
    0 0 24px color-mix(in srgb, var(--tier-accent), transparent 72%);
}

.profile-back {
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.36) 0 1px, transparent 1.8px),
    radial-gradient(circle at 62% 22%, rgba(255,246,184,.22) 0 .9px, transparent 1.6px),
    linear-gradient(122deg, rgba(255,255,255,.24) 0 10%, transparent 11% 42%, rgba(255,255,255,.1) 43% 47%, transparent 48%),
    radial-gradient(ellipse at 76% 82%, color-mix(in srgb, var(--tier-accent), transparent 78%), transparent 36%),
    linear-gradient(145deg, color-mix(in srgb, var(--card-a), #071016 42%), color-mix(in srgb, var(--card-b), #071016 44%));
}

.profile-front::before,
.profile-back::before {
  opacity: .7;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255,255,255,.68) 31%, transparent 44%),
    radial-gradient(circle at 78% 20%, color-mix(in srgb, var(--tier-accent), transparent 8%), transparent 16%),
    radial-gradient(circle at 17% 21%, rgba(255,255,255,.78) 0 1px, transparent 1.9px),
    radial-gradient(circle at 31% 42%, rgba(255,231,135,.5) 0 .9px, transparent 1.8px),
    radial-gradient(circle at 71% 62%, rgba(255,226,100,.42) 0 .9px, transparent 1.8px),
    linear-gradient(62deg, transparent 0 24%, rgba(255,255,255,.16) 24.2% 24.8%, transparent 25%),
    linear-gradient(118deg, transparent 0 48%, rgba(255,247,178,.18) 48.2% 48.8%, transparent 49%);
}

.profile-dashboard-title {
  min-height: 28px;
}

.profile-dashboard-title b {
  gap: 8px;
  font-size: 19px;
}

.profile-close-control {
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
}

.profile-dashboard-hero,
.profile-dashboard-body {
  grid-template-columns: 1fr;
  gap: 8px;
}

.profile-dashboard-hero {
  min-height: 0;
}

.profile-identity {
  grid-template-columns: 84px minmax(0, 1fr);
  min-height: 94px;
  gap: 10px;
  padding: 9px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,.86), transparent 34%),
    linear-gradient(145deg,
      color-mix(in srgb, #ffffff, var(--card-a) 10%),
      color-mix(in srgb, #ffffff, var(--card-b) 12%));
}

.profile-identity .profile-photo {
  width: 80px;
  height: 80px;
  border-radius: 14px;
}

.profile-photo > img,
.profile-photo > svg {
  border-radius: 11px;
}

.profile-photo-badge {
  width: 40px;
  height: 40px;
}

.profile-identity strong {
  font-size: 21px;
}

.profile-identity em {
  font-size: 12px;
}

.profile-xp-card {
  min-height: 96px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  padding: 10px;
  border-radius: 12px;
}

.profile-xp-card::before {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  font-size: 17px;
}

.profile-xp-card b {
  font-size: 22px;
}

.profile-xp-card small {
  font-size: 12px;
}

.profile-xp-card strong {
  padding: 7px 9px;
  font-size: 14px;
}

.profile-xp-card i {
  height: 12px;
}

.profile-dashboard-body {
  min-height: 0;
  overflow: hidden;
}

.profile-dashboard-stats {
  grid-template-rows: auto auto;
  gap: 8px;
}

.profile-status-panel {
  display: none;
}

.profile-complete-panel {
  min-height: 66px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  padding: 10px 11px;
}

.complete-icon {
  width: 40px;
  height: 40px;
}

.profile-complete-panel b {
  font-size: 14px;
}

.profile-complete-panel strong {
  font-size: 30px;
}

.profile-reputation-panel {
  min-height: 78px;
  padding: 8px 9px;
}

.profile-reputation-head {
  gap: 6px;
}

.profile-reputation-head b {
  font-size: 11px;
}

.profile-reputation-head strong {
  font-size: 20px;
}

.profile-reputation-metrics {
  gap: 3px;
}

.profile-reputation-metrics span {
  padding: 5px 2px;
}

.profile-reputation-metrics b {
  font-size: 14px;
}

.profile-reputation-metrics small {
  font-size: 8px;
}

.profile-emblems-showcase {
  min-height: 150px;
  gap: 8px;
  padding: 10px;
}

.profile-emblems-head {
  text-align: center;
}

.profile-emblems-head b {
  font-size: 17px;
  text-align: center;
}

.profile-emblems-head small {
  font-size: 11px;
  text-align: center;
}

.profile-emblems-showcase .profile-official-badges {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.profile-emblems-showcase .profile-official-badge,
.profile-secret-badge {
  min-height: 82px;
  padding: 6px 4px;
}

.profile-emblems-showcase .profile-official-badge img {
  width: 54px;
  height: 48px;
}

.profile-emblems-showcase .profile-official-badge span,
.profile-secret-badge b {
  font-size: 10px;
}

.profile-secret-badge {
  gap: 4px;
}

.profile-secret-badge i {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.profile-secret-badge i::before {
  font-size: 23px;
}

.profile-dashboard-nav {
  min-height: 56px;
  gap: 4px;
  padding: 6px;
}

.profile-dashboard-nav button {
  grid-template-columns: 1fr;
  gap: 2px;
  font-size: 9px;
}

.profile-nav-ico {
  justify-self: center;
  width: 22px;
  height: 22px;
}

@media (max-width: 420px) {
  .profile-dialog {
    width: calc(100vw - 4px);
  }

  .profile-card {
    width: min(390px, calc(100vw - 4px));
  }
}

@media (min-width: 721px) and (max-height: 720px) {
  .profile-card {
    width: min(390px, calc(100vw - 22px));
  }
}

/* Clean map overlay stack */
@media (min-width: 841px) {
  .app-shell[data-view="map"] .event-countdown {
    top: 190px;
    right: 16px;
    width: 216px;
    z-index: 780;
  }

  .app-shell[data-view="map"] .challenge-gift-fab {
    top: 284px;
    right: 25px;
  }
}

.challenge-gift-fab {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.challenge-gift-fab:hover {
  transform: translateY(-1px) scale(1.03);
}

.challenge-gift-box {
  width: 48px;
  height: 40px;
  border-radius: 8px;
  filter: drop-shadow(0 12px 16px rgba(239, 90, 90, .28));
}

.challenge-gift-box::before {
  left: 20px;
  width: 8px;
  height: 40px;
}

.challenge-gift-box i {
  top: 14px;
  width: 48px;
  height: 8px;
}

.challenge-gift-box::after {
  left: 7px;
  top: -9px;
  width: 34px;
  height: 18px;
  border-width: 6px;
  background: transparent;
}

/* Current card texture: categories stay stored in JS, all cards render in gold. */
.pin-card-face,
.profile-front {
  border-color: rgba(255, 226, 106, .92);
  color: #13212a;
  background:
    radial-gradient(circle at 17% 13%, rgba(255,255,255,.96) 0 1px, transparent 1.9px),
    radial-gradient(circle at 82% 18%, rgba(255,244,174,.66) 0 .9px, transparent 1.8px),
    radial-gradient(circle at 31% 64%, rgba(255,255,255,.54) 0 .8px, transparent 1.7px),
    radial-gradient(circle at 72% 72%, rgba(255,212,67,.42) 0 .9px, transparent 1.8px),
    linear-gradient(112deg, transparent 0 20%, rgba(255,255,255,.70) 21% 25%, rgba(255,239,145,.25) 27% 32%, transparent 34%),
    linear-gradient(38deg, transparent 0 53%, rgba(255,250,198,.34) 54% 56%, transparent 58%),
    linear-gradient(148deg,
      #fff8bd 0%,
      #f6d65a 19%,
      #d59a12 42%,
      #fff09a 58%,
      #b87907 76%,
      #fff0a6 100%);
  box-shadow:
    inset 7px 8px 14px rgba(255,255,255,.48),
    inset -10px -13px 22px rgba(97, 58, 0, .24),
    0 22px 46px rgba(77, 48, 0, .24),
    0 0 22px rgba(255, 211, 76, .34);
}

.collector-location-marker.zoom-far .pin-card-face,
.collector-location-marker.zoom-near .pin-card-face {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.82) 0 1px, transparent 1.8px),
    radial-gradient(circle at 68% 40%, rgba(255,231,116,.48) 0 .9px, transparent 1.7px),
    linear-gradient(132deg, transparent 0 30%, rgba(255,255,255,.52) 31% 35%, transparent 37%),
    linear-gradient(145deg, #fff0a0 0%, #e2ad20 34%, #9a6206 68%, #ffd65a 100%);
}

.profile-back {
  border-color: rgba(231, 174, 47, .76);
  color: #fff4ca;
  background:
    radial-gradient(circle at 18% 16%, rgba(255,236,151,.28) 0 1px, transparent 1.9px),
    radial-gradient(circle at 68% 24%, rgba(255,211,76,.24) 0 .9px, transparent 1.8px),
    radial-gradient(ellipse at 78% 86%, rgba(255,194,51,.22), transparent 38%),
    linear-gradient(118deg, transparent 0 23%, rgba(255,232,143,.22) 24% 27%, transparent 29%),
    linear-gradient(151deg,
      #5f3b05 0%,
      #2a1a03 28%,
      #7b5209 53%,
      #3a2403 76%,
      #b87907 100%);
  box-shadow:
    inset 6px 7px 14px rgba(255,219,103,.18),
    inset -10px -14px 24px rgba(0,0,0,.36),
    0 24px 48px rgba(15,23,42,.28),
    0 0 24px rgba(214, 154, 18, .24);
}

.pin-card-face::before {
  background:
    linear-gradient(32deg, transparent 0 52%, rgba(255,255,255,.30) 53% 54%, transparent 56%),
    linear-gradient(70deg, transparent 0 66%, rgba(255,231,116,.28) 67% 68%, transparent 70%),
    radial-gradient(circle at 20% 28%, rgba(255,255,255,.66) 0 .8px, transparent 1.6px),
    radial-gradient(circle at 34% 42%, rgba(255,226,118,.48) 0 .7px, transparent 1.5px),
    radial-gradient(circle at 72% 24%, rgba(255,245,178,.46) 0 .8px, transparent 1.6px);
}

.profile-front::before,
.profile-back::before {
  background:
    linear-gradient(112deg, transparent 17%, rgba(255,255,255,.68) 29%, transparent 43%),
    linear-gradient(38deg, transparent 0 22%, rgba(255,234,132,.22) 22.4% 22.9%, transparent 23.4%),
    radial-gradient(circle at 17% 21%, rgba(255,255,255,.72) 0 1px, transparent 1.9px),
    radial-gradient(circle at 31% 42%, rgba(255,231,135,.48) 0 .9px, transparent 1.8px),
    radial-gradient(circle at 71% 62%, rgba(255,226,100,.40) 0 .9px, transparent 1.8px);
  opacity: .62;
  mix-blend-mode: screen;
}

.profile-back::before {
  opacity: .42;
}

.profile-front::after,
.profile-back::after {
  border-color: rgba(255, 226, 106, .34);
  box-shadow:
    inset 2px 2px 5px rgba(255,255,255,.36),
    inset -2px -3px 7px rgba(97, 58, 0, .26);
}
