:root {
  --bg: #f7f6f2;
  --bg-start: #fffdf8;
  --bg-mid: #f5f3ee;
  --bg-end: #efede7;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --panel: rgba(255, 255, 255, 0.84);
  --stroke: rgba(15, 23, 42, 0.08);
  --text: #1f2937;
  --muted: #627085;
  --accent: #5b8def;
  --accent-soft: rgba(91, 141, 239, 0.16);
  --accent-strong: #3568d4;
  --shadow: 0 24px 50px rgba(31, 41, 55, 0.12);
  --radius: 26px;
}

body[data-theme="yellow"] { --accent: #d1a000; --accent-soft: rgba(209, 160, 0, 0.16); --accent-strong: #9b7300; --bg-start: #fffbe7; --bg-mid: #f8f0c8; --bg-end: #efe5b6; }
body[data-theme="red"] { --accent: #d85d66; --accent-soft: rgba(216, 93, 102, 0.15); --accent-strong: #b44653; --bg-start: #fff4f3; --bg-mid: #f6dddc; --bg-end: #edd1d2; }
body[data-theme="green"] { --accent: #46a06d; --accent-soft: rgba(70, 160, 109, 0.15); --accent-strong: #2c7c50; --bg-start: #f5fdf7; --bg-mid: #dff1e5; --bg-end: #d1e7d9; }
body[data-theme="blue"] { --accent: #4d8cf0; --accent-soft: rgba(77, 140, 240, 0.16); --accent-strong: #3568d4; --bg-start: #f4f9ff; --bg-mid: #dfeafb; --bg-end: #d2def2; }
body[data-theme="purple"] { --accent: #8c6ce8; --accent-soft: rgba(140, 108, 232, 0.15); --accent-strong: #6849c9; --bg-start: #faf7ff; --bg-mid: #e8e0f8; --bg-end: #ddd4f1; }
body[data-theme="pink"] { --accent: #de6cad; --accent-soft: rgba(222, 108, 173, 0.16); --accent-strong: #c24e93; --bg-start: #fff6fb; --bg-mid: #f7e0eb; --bg-end: #efd0df; }
body[data-theme="turquoise"] { --accent: #23a9a8; --accent-soft: rgba(35, 169, 168, 0.16); --accent-strong: #1a7c7b; --bg-start: #effcfa; --bg-mid: #d6f2ef; --bg-end: #c6e9e5; }
body[data-theme="orange"] { --accent: #f08a3c; --accent-soft: rgba(240, 138, 60, 0.16); --accent-strong: #c86925; --bg-start: #fff5ea; --bg-mid: #f8e1cd; --bg-end: #f0d3b7; }
body[data-theme="gray"] { --accent: #7b8a9d; --accent-soft: rgba(123, 138, 157, 0.18); --accent-strong: #5b6676; --bg-start: #f8fafc; --bg-mid: #e8edf2; --bg-end: #dbe2ea; }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html {
  overscroll-behavior-y: none;
}
body {
  margin: 0;
  color: var(--text);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(1000px 500px at 0% 0%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(800px 540px at 100% 0%, var(--accent-soft), transparent 55%),
    linear-gradient(180deg, var(--bg-start), var(--bg-mid) 56%, var(--bg-end));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.section-admin {
  background:
    radial-gradient(760px 360px at 0% 0%, rgba(255, 255, 255, 0.92), transparent 58%),
    radial-gradient(640px 400px at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-start) 82%, white), color-mix(in srgb, var(--bg-mid) 86%, white) 64%, color-mix(in srgb, var(--bg-end) 90%, #f0ece4));
}

body.section-user {
  background:
    radial-gradient(840px 420px at 0% 0%, rgba(255, 255, 255, 0.92), transparent 58%),
    radial-gradient(700px 420px at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-start) 92%, white), color-mix(in srgb, var(--bg-mid) 94%, white) 64%, color-mix(in srgb, var(--bg-end) 96%, #f0ece4));
}

a { color: inherit; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar-backdrop {
  display: none;
}
.sidebar {
  width: 320px;
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--stroke);
  padding: max(28px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 18px 0 44px rgba(15, 23, 42, 0.08);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.brand-block h1 { margin: 0; font-size: 2rem; }
.brand-kicker, .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--accent-strong);
  font-weight: 700;
}
.brand-block p, .sidebar-role { color: var(--muted); line-height: 1.5; }
.nav-list { display: flex; flex-direction: column; gap: 10px; }
.nav-link {
  text-decoration: none;
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
  font-weight: 700;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.nav-list .nav-link { justify-content: space-between; }
.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background:
    var(--menu-icon) center / 78% no-repeat,
    linear-gradient(140deg, rgba(255,255,255,0.92), rgba(226,231,245,0.9));
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.9);
  flex: 0 0 26px;
}
.nav-label {
  flex: 1;
  min-width: 0;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.98);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 22px rgba(31, 41, 55, 0.10);
  color: var(--accent-strong);
}
.sidebar-meta {
  margin-top: auto;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,0.75));
  border: 1px solid var(--stroke);
}
.sidebar-avatar {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 22px;
  display: block;
  margin-bottom: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}
.sidebar-user { display: block; font-weight: 800; margin-bottom: 4px; }

body.section-admin .sidebar {
  width: 286px;
  padding: max(18px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
  gap: 16px;
  background: rgba(255, 251, 247, 0.98);
  border-right-color: rgba(15, 23, 42, 0.1);
}
body.section-admin .brand-block h1 {
  font-size: 1.6rem;
}
body.section-admin .nav-list {
  gap: 8px;
}
body.section-admin .nav-link {
  min-height: 46px;
  padding: 12px 13px;
  border-radius: 16px;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.92);
}
body.section-admin .nav-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 9px;
}
body.section-admin .sidebar-meta {
  padding: 12px;
  border-radius: 16px;
}
body.section-admin .sidebar-avatar {
  width: 58px;
  height: 58px;
  margin-bottom: 8px;
  border-radius: 18px;
}
body.section-user .sidebar {
  width: 300px;
  padding: max(20px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
  gap: 18px;
  background: rgba(255, 253, 249, 0.98);
}
body.section-user .nav-list {
  gap: 8px;
}
body.section-user .nav-link {
  min-height: 48px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
}
body.section-user .nav-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 12px;
}
body.section-user .sidebar-meta {
  padding: 13px;
  border-radius: 16px;
}
body.section-user .sidebar-avatar {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  margin-bottom: 8px;
}

.inline-avatar {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.92);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(20px, env(safe-area-inset-top)) 30px 0;
}
.topbar h2 { margin: 4px 0 0; font-size: clamp(1.7rem, 2.6vw, 2.6rem); }
.topbar-avatar {
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: 14px;
  object-fit: cover;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.menu-toggle {
  display: none;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.9);
  border-radius: 16px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  box-shadow: var(--shadow);
  color: var(--text);
  position: relative;
  z-index: 45;
}
.content {
  padding: 24px 30px 12px;
  display: grid;
  gap: 22px;
}
body.section-admin .topbar {
  gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
}
body.section-admin .topbar h2 {
  margin-top: 2px;
  font-size: clamp(1.2rem, 4.8vw, 1.75rem);
}
body.section-admin .content {
  gap: 12px;
  padding: 14px 16px 10px;
}
body.section-user .topbar {
  gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) 18px 0;
}
body.section-user .topbar h2 {
  margin-top: 2px;
  font-size: clamp(1.2rem, 4.8vw, 1.9rem);
}
body.section-user .topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}
body.section-user .content {
  gap: 14px;
  padding: 16px 18px 12px;
}
.card, .hero-card, .table-card, .map-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card {
  padding: 28px;
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(255,255,255,0.95), transparent 55%),
    linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72));
}
.hero-card h3, .card h3, .table-card h3, .map-card h3 { margin-top: 0; }
.hero-grid, .stats-grid, .split-grid, .option-grid {
  display: grid;
  gap: 18px;
}
.hero-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.split-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.admin-action-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat-box, .mini-card {
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--stroke);
}
.stat-box strong { display: block; font-size: 2rem; margin-top: 8px; }
.card, .table-card, .map-card { padding: 24px; }
.subtle { color: var(--muted); line-height: 1.6; }
.compact-note {
  display: inline-block;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
.stat-inline-link {
  text-decoration: none;
  color: inherit;
}
.compact-inline-button {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font-weight: 800;
}
.avatar-preview-card {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--stroke);
}
.avatar-preview-media {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244, 242, 236, 0.9));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  padding: 10px;
}
.avatar-preview-card.has-image .avatar-preview-media {
  border-style: solid;
}
.avatar-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.choice-dropdown {
  display: grid;
  gap: 8px;
}
.choice-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.96);
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: none;
}
.choice-trigger-media,
.choice-option-media {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244, 242, 236, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.10);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 44px;
}
.choice-trigger-media img,
.choice-option-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.choice-trigger-copy,
.choice-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.choice-trigger-copy strong,
.choice-option-copy strong {
  font-size: 0.92rem;
  line-height: 1.2;
}
.choice-trigger-copy small {
  color: var(--muted);
  font-size: 0.74rem;
}
.choice-panel {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  margin-top: 2px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255,255,255,0.99);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}
.choice-panel[hidden] {
  display: none !important;
}
.choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.choice-option.selected {
  border-color: color-mix(in srgb, var(--accent) 32%, white);
  background: color-mix(in srgb, var(--accent-soft) 40%, white);
}
.choice-dropdown-theme .choice-trigger-media,
.choice-dropdown-theme .choice-option-media {
  background: transparent;
  border: 0;
}
.choice-theme-dot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
}
.admin-accordion {
  display: grid;
  gap: 12px;
}
.admin-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(15, 23, 42, 0.10);
  font-weight: 800;
}
.admin-accordion summary::-webkit-details-marker {
  display: none;
}
.admin-accordion[open] summary {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}
.admin-accordion form {
  padding-top: 4px;
}
.account-accordion {
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.account-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-summary-media {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244, 242, 236, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.10);
  flex: 0 0 52px;
}
.account-summary-media .inline-avatar {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.account-summary-fallback {
  font-weight: 800;
  color: var(--muted);
}

[data-filter-item][hidden] {
  display: none !important;
}
.account-summary-copy {
  display: grid;
  gap: 2px;
}
.account-summary-copy strong {
  font-size: 0.96rem;
}
.account-summary-copy small {
  color: var(--muted);
  line-height: 1.25;
}
.admin-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.admin-upload-card {
  gap: 8px;
  align-content: start;
  justify-items: start;
}
.admin-upload-card strong,
.admin-upload-card small {
  display: block;
  overflow-wrap: anywhere;
}
.admin-upload-card small {
  color: var(--muted);
  line-height: 1.25;
}
.admin-upload-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.88);
}
.admin-upload-delete-form {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  min-width: 0;
}
.admin-upload-delete-form input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
}
.danger-button {
  border: 0;
  background: linear-gradient(135deg, #ef4444, #be123c);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(190, 18, 60, 0.18);
}
.danger-button.compact-danger-button {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .admin-upload-delete-form {
    grid-template-columns: 1fr;
  }
  .danger-button.compact-danger-button {
    width: 100%;
  }
}
.admin-compact-filter-card {
  padding: 10px;
}
.admin-filter-dropdowns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.admin-filter-dropdowns label {
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.admin-filter-dropdowns select {
  min-height: 40px;
  padding: 8px 34px 8px 11px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
}
.admin-filter-dropdowns button {
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 14px;
  font-size: 0.82rem;
}
@media (max-width: 560px) {
  .admin-filter-dropdowns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-filter-dropdowns button {
    grid-column: 1 / -1;
    justify-self: end;
    min-height: 34px;
    padding: 7px 12px;
  }
}
.modal-shell[hidden] {
  display: none !important;
}
.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 24px));
  margin: max(16px, env(safe-area-inset-top)) auto;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.26);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.modal-close {
  flex: 0 0 auto;
}
.monster-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.monster-modal-item {
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: none;
  color: var(--text);
}
.monster-modal-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(243, 240, 233, 0.92));
}
button.found-gallery-card {
  cursor: pointer;
  text-align: left;
}
.admin-hide-page button.found-gallery-card {
  text-align: left;
}
.found-gallery-grid .admin-upload-preview {
  background: rgba(255,255,255,0.92);
}
.found-modal-card {
  width: min(680px, calc(100vw - 24px));
}
.found-modal-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.found-modal-card form {
  margin-top: 14px;
}
.found-modal-card .button-row,
.found-modal-card button[type="submit"],
.found-modal-card button.secondary {
  margin-top: 10px;
}
.found-modal-image {
  width: 140px;
  height: 140px;
  border-radius: 22px;
  object-fit: contain;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(243, 240, 233, 0.96));
}
.found-modal-copy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.found-modal-meta {
  padding: 10px;
  border-radius: 18px;
}
.found-modal-meta strong {
  font-size: 0.95rem;
}
.found-modal-meta small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
@media (max-width: 560px) {
  .found-modal-body {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .found-modal-image {
    width: 120px;
    height: 120px;
  }
  .found-modal-copy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
body.modal-open {
  overflow: hidden;
}

.admin-hide-shell {
  display: grid;
  gap: 12px;
}

.admin-hide-stage {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.admin-hide-toolbar {
  display: grid;
  gap: 10px;
}

.admin-hide-toolbar .button-row {
  margin: 0;
}

.admin-hide-audience-switch .nav-link,
.admin-hide-toolbar-actions button {
  min-height: 46px;
}

body.hide-map-page .admin-hide-toolbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.hide-place-page .admin-hide-toolbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.hide-map-page .admin-hide-audience-switch,
body.hide-map-page .admin-hide-toolbar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.hide-place-page .admin-hide-audience-switch,
body.hide-place-page .admin-hide-toolbar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.hide-map-page .admin-hide-audience-switch .nav-link,
body.hide-map-page .admin-hide-toolbar-actions button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

body.hide-place-page .admin-hide-audience-switch .nav-link,
body.hide-place-page .admin-hide-toolbar-actions button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.admin-hide-map {
  min-height: 56dvh;
  position: relative;
  z-index: 0;
}

.admin-hide-sheet {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.admin-hide-sheet-ghost {
  min-height: 170px;
  opacity: 0;
  pointer-events: none;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.admin-hide-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-hide-sheet-head h3 {
  margin: 0;
}

.admin-hide-monster-trigger {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248, 244, 236, 0.98));
  color: var(--text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.admin-hide-monster-trigger span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-hide-monster-trigger strong {
  font-size: 1rem;
}

.admin-hide-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-hide-chip-grid .mini-card {
  gap: 4px;
}

.admin-hide-chip-grid .mini-card span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-hide-chip-grid .mini-card strong {
  font-size: 0.96rem;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.chip-grid.chip-grid-list {
  grid-template-columns: minmax(0, 1fr);
}
.chip-option {
  display: grid;
  gap: 4px;
  padding: 12px 12px 12px 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.78);
  font-size: 0.85rem;
  position: relative;
  min-height: 52px;
}
.chip-option input {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%) scale(1.1);
}
.chip-option span {
  font-weight: 700;
}
.chip-option small {
  color: var(--muted);
  font-size: 0.74rem;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
}

body.admin-events-page .admin-events-create,
body.admin-events-page .admin-events-list {
  max-width: none;
  width: 100%;
  margin: 0;
}
body.admin-events-page .chip-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.admin-events-page .chip-option {
  word-break: break-word;
}
body.admin-events-page .admin-events-list .mini-card p {
  word-break: break-all;
}

@media (max-width: 640px) {
  body.admin-events-page .chip-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.admin-events-page .admin-events-create,
  body.admin-events-page .admin-events-list {
    max-width: 100%;
  }
  body.admin-events-page .hero-card,
  body.admin-events-page .admin-form-card,
  body.admin-events-page .table-card {
    padding: 14px;
  }
  body.admin-events-page .admin-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  body.admin-events-page .stat-box {
    padding: 10px;
  }
  body.admin-events-page .chip-option {
    padding: 12px 12px 12px 50px;
    min-height: 58px;
  }
  body.admin-events-page .chip-option input {
    transform: translateY(-50%) scale(1.2);
  }
  body.admin-events-page .admin-events-list details {
    margin-bottom: 10px;
  }
}

.admin-hide-fields {
  display: none !important;
}

.admin-hide-actions {
  margin: 0;
}

.admin-hide-actions button {
  flex: 1 1 100%;
  width: 100%;
}

.admin-hide-mode-switch .nav-link {
  justify-content: center;
  text-align: center;
}
.admin-hide-event-select {
  margin-top: 6px;
}

.admin-hide-spacer {
  display: none;
}

.admin-hide-map .leaflet-container,
.admin-hide-map .leaflet-pane,
.admin-hide-map .leaflet-control-container {
  z-index: 0 !important;
}

.admin-hide-map .leaflet-top,
.admin-hide-map .leaflet-bottom,
.admin-hide-map .leaflet-control {
  z-index: 1 !important;
}

.weather-card {
  padding: 10px !important;
}

.weather-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.weather-grid .stat-box {
  min-height: 68px;
  padding: 8px !important;
}

.weather-grid .stat-box span {
  font-size: 0.66rem;
  line-height: 1.15;
}

.weather-grid .stat-box strong {
  font-size: 0.92rem;
  line-height: 1.05;
  margin-top: 4px;
}

.weather-grid .stat-box:first-child strong {
  font-size: 1.35rem;
  line-height: 1;
}

.joystick-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.joystick-title {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.joystick-base {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.78) 0 28%, transparent 29%),
    radial-gradient(circle at center, rgba(255,255,255,0.98) 0 62%, rgba(229, 233, 241, 0.98) 63% 100%);
  box-shadow:
    inset 0 8px 18px rgba(255,255,255,0.92),
    inset 0 -10px 16px rgba(15,23,42,0.08),
    0 14px 28px rgba(15,23,42,0.10);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.joystick-ring {
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  border: 2px dashed rgba(15, 23, 42, 0.14);
  pointer-events: none;
}

.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin-left: -29px;
  margin-top: -29px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4d4b69, #26283a);
  box-shadow:
    0 12px 18px rgba(15,23,42,0.22),
    inset 0 2px 8px rgba(255,255,255,0.16);
  cursor: grab;
  touch-action: none;
}

.joystick-knob:active {
  cursor: grabbing;
}

.joystick-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.joystick-pill {
  background: rgba(239, 242, 248, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  color: var(--text);
}

.joystick-pill strong {
  font-size: 0.74rem;
}

.map-focus-toggle {
  min-height: 18px;
  height: 18px;
  padding: 0 7px;
  font-size: 0.64rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.06);
  letter-spacing: 0.01em;
  width: auto;
  min-width: 0;
  line-height: 1;
}

@media (max-width: 640px) {
  .weather-card {
    padding: 8px !important;
  }

  .weather-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .weather-grid .stat-box {
    min-height: 60px;
    padding: 7px !important;
  }

  .weather-grid .stat-box span {
    font-size: 0.6rem;
  }

  .weather-grid .stat-box strong {
    font-size: 0.84rem;
  }

  .weather-grid .stat-box:first-child strong {
    font-size: 1.15rem;
  }

  .joystick-base {
    width: 128px;
    height: 128px;
  }

  .joystick-knob {
    width: 50px;
    height: 50px;
    margin-left: -25px;
    margin-top: -25px;
  }

  .joystick-title {
    font-size: 0.74rem;
  }

  .joystick-pill {
    padding: 5px 8px;
    font-size: 0.66rem;
  }

  .map-focus-toggle {
    min-height: 17px;
    height: 17px;
    padding: 0 5px;
    font-size: 0.6rem;
  }
}

.monster-select-modal {
  width: min(960px, calc(100vw - 18px));
}

body.section-admin .card,
body.section-admin .hero-card,
body.section-admin .table-card,
body.section-admin .map-card {
  padding: 12px;
  border-radius: 20px;
}
body.section-admin .hero-grid,
body.section-admin .stats-grid,
body.section-admin .split-grid,
body.section-admin .option-grid,
body.section-admin .field-grid,
body.section-admin .theme-swatch-grid {
  gap: 12px;
}
body.section-admin .stat-box,
body.section-admin .mini-card {
  padding: 12px;
  border-radius: 18px;
}
body.section-admin .stat-box strong {
  font-size: 1.45rem;
  margin-top: 6px;
}
body.section-admin .eyebrow {
  font-size: 0.64rem;
}
body.section-admin h3 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}
body.section-admin .subtle {
  font-size: 0.88rem;
  line-height: 1.38;
}
body.section-admin .stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.section-admin .admin-dashboard-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
body.section-admin .admin-dashboard-stats .stat-box {
  min-height: 34px;
  padding: 5px 8px 4px;
  border-radius: 14px;
}
body.section-admin .admin-dashboard-stats .stat-box span {
  display: block;
  font-size: 0.58rem;
  line-height: 1;
  margin-bottom: 1px;
}
body.section-admin .admin-dashboard-stats .stat-box strong {
  font-size: 0.84rem;
  margin-top: 0;
  line-height: 1;
}
body.section-admin .admin-action-grid {
  grid-template-columns: 1fr;
}
body.section-admin .table-card table {
  margin-top: 4px;
}
body.section-admin .map-card .button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.section-admin .map-card .button-row .nav-link {
  justify-content: center;
  text-align: center;
}
.dashboard-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.app-home-tiles {
  max-width: 440px;
  margin: 0 auto;
}
body.section-user .app-home-tiles .dashboard-tile::after {
  display: none;
}
.dashboard-tile {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 6px;
  min-height: 0;
  aspect-ratio: 3 / 4;
  padding: 14px;
  border-radius: 24px;
  color: #142033;
  text-align: left;
  text-decoration: none;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.72), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.74));
  border: 1px solid rgba(255,255,255,0.58);
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.82);
}
.dashboard-tile::before {
  content: "";
  position: absolute;
  inset: auto -18% -26% auto;
  width: 110px;
  height: 110px;
  border-radius: 28px;
  background: rgba(255,255,255,0.34);
  transform: rotate(22deg);
}
.dashboard-tile::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255,255,255,0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}
.tile-head-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tile-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 34px;
}
body.section-user .tile-user-settings {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.7), transparent 36%),
    linear-gradient(140deg, color-mix(in srgb, var(--accent) 14%, white), var(--bg-end));
  border-color: color-mix(in srgb, var(--accent) 28%, white);
}
body.section-user .tile-user-settings::before {
  background: color-mix(in srgb, var(--accent) 16%, white);
}
body.section-user .tile-user-settings::after {
  background: color-mix(in srgb, var(--accent) 24%, white);
}
.dashboard-tile > * {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}
.dashboard-tile strong {
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-kicker {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.72;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-title {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.05;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.tile-theme-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tile-theme-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.14);
  border: 2px solid rgba(255,255,255,0.78);
}
.tile-meta {
  font-size: 0.74rem;
  line-height: 1.35;
  color: rgba(20, 32, 51, 0.74);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.tile-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}
.tile-split > div {
  min-width: 0;
}
.tile-split span {
  display: block;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.72;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.tile-split strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.tile-admin-users {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.74), transparent 34%),
    linear-gradient(160deg, rgba(255,239,186,0.96), rgba(255,214,102,0.76));
}
.tile-admin-hide {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.74), transparent 34%),
    linear-gradient(160deg, rgba(212,244,232,0.96), rgba(123,224,188,0.78));
}
.tile-admin-map {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.74), transparent 34%),
    linear-gradient(160deg, rgba(208,233,255,0.96), rgba(129,183,255,0.78));
}
.tile-admin-catches {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.74), transparent 34%),
    linear-gradient(160deg, rgba(255,216,230,0.96), rgba(255,138,180,0.8));
}
.tile-user-hunt {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.74), transparent 34%),
    linear-gradient(160deg, rgba(255,237,181,0.96), rgba(255,201,71,0.8));
}
.tile-user-gallery {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.74), transparent 34%),
    linear-gradient(160deg, rgba(227,216,255,0.96), rgba(179,146,255,0.78));
}
.tile-user-map {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.74), transparent 34%),
    linear-gradient(160deg, rgba(209,242,255,0.96), rgba(108,203,239,0.76));
}
.tile-user-settings {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.74), transparent 34%),
    linear-gradient(160deg, rgba(255,219,233,0.96), rgba(255,150,190,0.78));
}
body.admin-home-page .page-shell,
body.user-home-page .page-shell {
  gap: 14px;
}
body.admin-home-page .page-shell > .hero-card,
body.user-home-page .page-shell > .hero-card {
  display: none;
}
body.section-user .card,
body.section-user .hero-card,
body.section-user .table-card,
body.section-user .map-card {
  padding: 16px;
  border-radius: 22px;
}
body.section-user .hero-grid,
body.section-user .stats-grid,
body.section-user .split-grid,
body.section-user .option-grid,
body.section-user .field-grid,
body.section-user .theme-swatch-grid {
  gap: 12px;
}
body.section-user .stat-box,
body.section-user .mini-card {
  padding: 14px;
  border-radius: 18px;
}
body.section-user .stat-box strong {
  font-size: 1.55rem;
  margin-top: 6px;
}
body.section-user .subtle {
  font-size: 0.94rem;
  line-height: 1.48;
}
body.section-user h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
body.section-user input,
body.section-user select,
body.section-user button,
body.section-user textarea {
  min-height: 48px;
  padding: 12px 13px;
  border-radius: 14px;
}
body.section-user .button-row {
  gap: 10px;
}
body.section-user .map-frame,
.compact-map-frame {
  min-height: clamp(360px, 62svh, 680px);
  border-radius: 18px;
}
body.section-user .gallery-item {
  border-radius: 18px;
  padding: 10px;
}
body.section-user .gallery-item img {
  border-radius: 14px;
}
body.section-user .user-dashboard-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
body.section-user .user-dashboard-stats .stat-box,
body.section-user .user-dashboard-stats .mini-card {
  padding: 10px;
  border-radius: 16px;
}
body.section-user .user-dashboard-stats .stat-box span {
  font-size: 0.7rem;
  line-height: 1.2;
}
body.section-user .user-dashboard-stats .stat-box strong,
body.section-user .user-dashboard-stats .mini-card strong {
  font-size: 1.08rem;
  margin-top: 4px;
  line-height: 1.1;
}
body.section-user .user-identity-card {
  display: grid;
  align-content: center;
}
body.section-user .user-entry-grid {
  gap: 10px;
}
body.section-user .user-entry-grid .mini-card {
  padding: 12px;
}
body.section-user .user-map-note {
  margin: 0 0 8px;
}
body.user-map-page .map-card {
  padding: 12px;
}
body.user-map-page .button-row {
  margin-top: 10px;
}
body.user-map-page .admin-hide-map {
  min-height: min(76svh, 760px) !important;
}
body.user-map-page .admin-hide-sheet-ghost {
  min-height: 260px;
}
@media (max-width: 640px) {
  body.user-map-page .admin-hide-map {
    min-height: min(78svh, 780px) !important;
  }
  body.user-map-page .admin-hide-sheet-ghost {
    min-height: 320px;
  }
}
body.user-settings-page .hero-card {
  padding: 10px;
}
body.user-settings-page .user-dashboard-stats {
  gap: 6px;
}
body.user-settings-page .user-dashboard-stats .stat-box,
body.user-settings-page .user-dashboard-stats .mini-card {
  padding: 8px;
  min-height: 0;
}
body.user-settings-page .user-dashboard-stats .stat-box span {
  font-size: 0.64rem;
}
body.user-settings-page .user-dashboard-stats .stat-box strong,
body.user-settings-page .user-dashboard-stats .mini-card strong {
  font-size: 0.9rem;
}
body.user-settings-page .card {
  padding: 12px;
}
body.user-settings-page .settings-form {
  gap: 12px;
}
body.user-settings-page .settings-panel {
  display: grid;
  gap: 10px;
}
body.user-settings-page .settings-avatar-shell {
  display: grid;
  gap: 10px;
}
body.user-settings-page .avatar-preview-card {
  padding: 12px;
  border-radius: 18px;
}
body.user-settings-page .avatar-preview-media {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}
body.user-settings-page .settings-theme-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.user-settings-page .theme-swatch {
  padding: 8px;
  border-radius: 16px;
}
body.user-settings-page .swatch-preview {
  height: 52px;
  border-radius: 12px;
  margin-bottom: 8px;
}
body.user-settings-page .theme-swatch strong {
  font-size: 0.84rem;
}
body.section-user .hunt-summary-card,
body.section-user .hunt-bottom-sheet,
body.section-user .glass-badge,
body.section-user .monster-card {
  border-radius: 20px;
}
body.section-user .hunt-summary-card,
body.section-user .hunt-bottom-sheet,
body.section-user .monster-card {
  padding: 12px;
}
body.section-user .glass-badge {
  padding: 10px 12px;
}
body.section-user .video-stage,
body.section-user .video-overlay,
body.section-user .hunt-shell {
  min-height: min(74svh, 680px);
}
body.user-hunt-page .video-stage {
  border-radius: 0;
}
body.user-hunt-page .card {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.user-hunt-page .hero-card {
  padding: 10px;
}
body.user-hunt-page .user-dashboard-stats {
  gap: 6px;
}
body.user-hunt-page .user-dashboard-stats .stat-box {
  padding: 7px 8px;
  min-height: 0;
  border-radius: 14px;
}
body.user-hunt-page .user-dashboard-stats .stat-box span {
  font-size: 0.62rem;
}
body.user-hunt-page .user-dashboard-stats .stat-box strong {
  font-size: 0.9rem;
  margin-top: 2px;
}
body.user-hunt-page .hunt-bottom-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
body.user-hunt-page .hunt-bottom-sheet-head {
  margin-bottom: 6px;
}
body.user-hunt-page .hunt-view-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}
body.user-hunt-page .map-follow-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 52px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  text-align: center;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  --pin-color: #ffb14a;
}
body.user-hunt-page .map-follow-toggle[data-follow-map="off"] {
  --pin-color: #63d67e;
}
body.user-hunt-page .map-follow-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--pin-color);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 10px 18px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: -1;
}
body.user-hunt-page .map-follow-toggle::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 16px solid var(--pin-color);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.2));
  z-index: -1;
}
.video-stage.map-mode .map-follow-toggle {
  opacity: 1;
  pointer-events: auto;
}
body.user-hunt-page .view-toggle-btn {
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(10, 16, 32, 0.55);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 12px;
  padding: 6px 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}
body.user-hunt-page .view-toggle-btn.active {
  background: rgba(10, 16, 32, 0.72);
}
body.user-hunt-page .hunt-bottom-sheet-head p {
  font-size: 0.72rem;
  line-height: 1.15;
  padding: 0 2px;
  color: rgba(255,255,255,0.92);
}
body.user-hunt-page .hunt-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
body.user-hunt-page .hunt-actions button,
body.user-hunt-page .hunt-actions button.secondary {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 8px 6px;
  border-radius: 12px;
  background: #0a1020;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: none;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
body.user-hunt-page .hunt-actions .view-toggle-btn[data-view-toggle="camera"] {
  background: #b88cff;
  border-color: rgba(176, 138, 255, 0.6);
}
body.user-hunt-page .hunt-actions .view-toggle-btn[data-view-toggle="map"] {
  background: #6ea7ff;
  border-color: rgba(120, 175, 255, 0.6);
}
body.user-hunt-page .hunt-actions #catchBtn {
  background: #76d58f;
  border-color: rgba(92, 210, 120, 0.75);
  color: #111111;
  text-shadow: none;
}
body.user-hunt-page .hunt-actions .view-toggle-btn {
  color: #111111;
  text-shadow: none;
}
body.user-hunt-page .hunt-actions .view-toggle-btn {
  font-size: 0.7rem;
  padding: 7px 4px;
}
body.user-hunt-page .hunt-actions button[disabled],
body.user-hunt-page .hunt-actions button.secondary[disabled] {
  opacity: 1;
  border-color: rgba(255,255,255,0.7);
}
body.user-hunt-page .hunt-center {
  align-items: end;
}
body.user-hunt-page .hunt-shell {
  grid-template-rows: auto 1fr auto;
  position: relative;
}
.catch-fx[hidden] {
  display: none !important;
}
.catch-fx {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: grid;
  place-items: center;
  opacity: 0;
}
.catch-fx.show {
  animation: catch-fx-in 1.55s ease forwards;
  background: radial-gradient(circle at 50% 55%, rgba(0,0,0,0.35), rgba(0,0,0,0.16) 45%, rgba(0,0,0,0) 74%);
}
.catch-fx-flare {
  position: absolute;
  width: min(62vw, 320px);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.42) 30%, rgba(255,255,255,0) 72%);
  transform: scale(0.6);
  opacity: 0;
}
.catch-fx.show .catch-fx-flare {
  animation: catch-fx-flare 1.4s ease forwards;
}
.catch-fx-burst {
  position: absolute;
  width: min(70vw, 360px);
  height: min(70vw, 360px);
}
.catch-fx-burst span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 46%;
  transform-origin: 50% 100%;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0));
}
.catch-fx-burst span:nth-child(1) { transform: translate(-50%, -100%) rotate(0deg); }
.catch-fx-burst span:nth-child(2) { transform: translate(-50%, -100%) rotate(60deg); }
.catch-fx-burst span:nth-child(3) { transform: translate(-50%, -100%) rotate(120deg); }
.catch-fx-burst span:nth-child(4) { transform: translate(-50%, -100%) rotate(180deg); }
.catch-fx-burst span:nth-child(5) { transform: translate(-50%, -100%) rotate(240deg); }
.catch-fx-burst span:nth-child(6) { transform: translate(-50%, -100%) rotate(300deg); }
.catch-fx.show .catch-fx-burst span {
  animation: catch-fx-burst 0.9s ease forwards;
}
.catch-fx-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 16px 18px;
  min-width: min(78vw, 280px);
  max-width: min(82vw, 320px);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: 0 20px 44px rgba(12, 20, 36, 0.20);
  backdrop-filter: blur(10px);
  transform: translateY(16px) scale(0.92);
  opacity: 0;
}
.catch-fx.show .catch-fx-card {
  animation: catch-fx-card 1.2s ease forwards;
}
.catch-fx-card img {
  width: min(28vw, 108px);
  height: min(28vw, 108px);
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.18));
}
.catch-fx-card strong,
.catch-fx-card small {
  text-align: center;
}
.catch-fx-card strong {
  font-size: 1rem;
  line-height: 1.1;
}
.catch-fx-card small {
  font-size: 0.78rem;
  opacity: 0.9;
}
.catch-fx-kinder .catch-fx-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0.12));
  color: #ffffff;
}
.catch-fx-kinder .catch-fx-burst span {
  width: 12px;
  background: linear-gradient(180deg, rgba(255, 245, 157, 1), rgba(255, 157, 238, 0));
}
.catch-fx-erwachsene .catch-fx-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.08));
  color: #ffffff;
  border-color: rgba(255,255,255,0.34);
}
.catch-fx-erwachsene .catch-fx-burst span {
  width: 8px;
  background: linear-gradient(180deg, rgba(181, 224, 255, 1), rgba(255,255,255,0));
}
@keyframes catch-fx-in {
  0% { opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes catch-fx-flare {
  0% { opacity: 0; transform: scale(0.55); }
  20% { opacity: 1; transform: scale(0.95); }
  100% { opacity: 0; transform: scale(1.25); }
}
@keyframes catch-fx-burst {
  0% { opacity: 0; }
  12% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes catch-fx-card {
  0% { opacity: 0; transform: translateY(16px) scale(0.92); }
  22% { opacity: 1; transform: translateY(0) scale(1); }
  85% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

form { display: grid; gap: 14px; }
.field-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stack-form { gap: 16px; }
label { display: grid; gap: 8px; font-weight: 700; }
input, select, button, textarea {
  font: inherit;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 14px 15px;
  background: rgba(255,255,255,0.94);
  color: var(--text);
  min-height: 52px;
}
textarea { min-height: 110px; resize: vertical; }
body.section-admin label {
  gap: 6px;
  font-size: 0.95rem;
}
body.section-admin input,
body.section-admin select,
body.section-admin button,
body.section-admin textarea {
  min-height: 48px;
  padding: 12px 13px;
  border-radius: 14px;
}
body.section-admin .button-row {
  gap: 10px;
}
body.section-admin .avatar-preview-card {
  padding: 12px;
  gap: 8px;
  border-radius: 18px;
}
body.section-admin .avatar-preview-media {
  width: 78px;
  height: 78px;
  border-radius: 18px;
}
button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  border: none;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(31, 41, 55, 0.12);
}
button.secondary, .link-button {
  background: white;
  color: var(--text);
  border: 1px solid var(--stroke);
  box-shadow: none;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.button-row > * {
  flex: 1 1 160px;
}
.button-row .nav-link {
  justify-content: center;
}
.flash {
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 700;
}
.flash-success { background: rgba(70,160,109,0.14); color: #256144; }
.flash-error { background: rgba(216,93,102,0.14); color: #8c2730; }
.flash-info { background: rgba(77,140,240,0.14); color: #2b56ab; }

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  padding: 16px 18px 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.6);
  color: #132033;
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(255,255,255,0.94), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.84));
  box-shadow: 0 20px 45px rgba(31, 41, 55, 0.22);
  backdrop-filter: blur(18px);
  transform: translateY(22px) scale(0.96);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}
.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.toast.hide {
  transform: translateY(14px) scale(0.96);
  opacity: 0;
}
.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--toast-accent), color-mix(in srgb, var(--toast-accent) 38%, white));
}
.toast-success { --toast-accent: #2f9f64; }
.toast-error { --toast-accent: #da5c71; }
.toast-info { --toast-accent: #4d8cf0; }
.toast-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
  font-weight: 900;
}
.toast-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.toast-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--toast-accent);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--toast-accent) 16%, transparent);
}
.toast-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: #243247;
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.toast p {
  margin: 0;
  color: #516178;
  line-height: 1.5;
  font-weight: 700;
}
.toast-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.toast-btn {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #253246;
}
.toast-btn-ghost {
  background: rgba(255,255,255,0.6);
}
.toast-btn-danger {
  background: linear-gradient(135deg, #f0848d, #e45668);
  color: white;
  border-color: rgba(226, 74, 97, 0.4);
}

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  vertical-align: top;
}
th { font-size: 0.9rem; color: var(--muted); }
.table-card {
  overflow: hidden;
}

.gallery-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.gallery-bookhead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.gallery-bookhead h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}
.gallery-book-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(244, 245, 255, 0.94));
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
}
.gallery-item {
  background: white;
  border-radius: 22px;
  padding: 12px;
  border: 1px solid var(--stroke);
  text-align: center;
}
.gallery-stickerbook {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.gallery-item-button {
  display: grid;
  gap: 8px;
  align-content: start;
  width: 100%;
  color: var(--text);
  box-shadow: none;
}
.sticker-card {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  padding: 10px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.95), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,247,255,0.98));
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 30px rgba(89, 100, 122, 0.12);
}
.sticker-card.is-caught::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.55), rgba(255,255,255,0));
  pointer-events: none;
}
.sticker-card.is-empty {
  background:
    linear-gradient(180deg, rgba(250,251,255,0.95), rgba(241,243,248,0.95));
  border-style: dashed;
  box-shadow: none;
}
.sticker-card.rarity-rare {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.95), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(240,252,255,0.98), rgba(232,244,255,0.98));
}
.sticker-card.rarity-epic {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.95), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(248,241,255,0.98), rgba(239,232,255,0.98));
}
.sticker-card.rarity-legend {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.95), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(255,246,232,0.98), rgba(255,236,213,0.98));
}
.sticker-card.is-granted,
.found-gallery-card.is-granted {
  background: linear-gradient(135deg, rgba(255, 40, 40, 0.42), rgba(255, 120, 120, 0.22));
  border: 1px solid rgba(255, 40, 40, 0.75);
  box-shadow: 0 16px 30px rgba(255, 40, 40, 0.35);
}
.sticker-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sticker-media {
  display: grid;
  place-items: center;
  min-height: 110px;
  margin-top: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.74), rgba(245,247,253,0.9));
}
.sticker-silhouette img {
  filter: grayscale(1) brightness(0.2) opacity(0.38);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(245,245,245,0.9));
}
.gallery-item small { color: var(--muted); display: block; margin-top: 6px; }

.gallery-modal-card {
  width: min(760px, calc(100vw - 20px));
}

.gallery-detail-shell {
  display: grid;
  gap: 12px;
}

.gallery-detail-media {
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247, 242, 234, 0.98));
  padding: 14px;
}

.gallery-detail-media img {
  display: block;
  width: min(100%, 280px);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.gallery-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.picker-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  max-height: 460px;
  overflow: auto;
}
.picker-item {
  border: 2px solid transparent;
  border-radius: 22px;
  background: white;
  padding: 10px;
  text-align: center;
}
.picker-item.selected { border-color: var(--accent); box-shadow: 0 12px 26px rgba(31, 41, 55, 0.12); }
.picker-item button {
  width: 100%;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.theme-swatch-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.theme-swatch {
  border: 2px solid transparent;
  background: white;
  border-radius: 20px;
  padding: 12px;
}
.theme-swatch.selected { border-color: var(--accent); }
.swatch-preview {
  height: 74px;
  border-radius: 16px;
  margin-bottom: 10px;
}
.theme-yellow { background: linear-gradient(135deg, #fff8d9, #f4df99); }
.theme-red { background: linear-gradient(135deg, #ffe1e1, #f4b4b9); }
.theme-green { background: linear-gradient(135deg, #e1f7e8, #acd9bd); }
.theme-blue { background: linear-gradient(135deg, #e4f0ff, #b5cff8); }
.theme-purple { background: linear-gradient(135deg, #efe8ff, #cbbaf4); }
.theme-pink { background: linear-gradient(135deg, #ffe6f1, #f7bed9); }
.theme-turquoise { background: linear-gradient(135deg, #e3fbf8, #a9e5df); }
.theme-orange { background: linear-gradient(135deg, #ffe8d2, #f3b47a); }
.theme-gray { background: linear-gradient(135deg, #eff2f6, #cfd8e3); }

.app-footer {
  margin-top: auto;
  padding: 18px 30px max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.app-footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.legal-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  opacity: 0.8;
}
.legal-link:hover { opacity: 1; }

.login-shell {
  position: relative;
  min-height: 100vh;
  padding: max(20px, env(safe-area-inset-top)) 32px max(24px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}
.login-shell-main {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 0;
}
.login-page {
  min-height: 100vh;
  background: #111827;
}
.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(104, 142, 255, 0.18), rgba(168, 115, 255, 0.22) 48%, rgba(255, 124, 201, 0.26)),
    url("../../images/bg/bg.jpg") center center / cover no-repeat;
  z-index: -2;
}
.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(700px 360px at 50% 18%, rgba(255,255,255,0.14), transparent 60%),
    linear-gradient(135deg, rgba(138, 196, 255, 0.10), rgba(192, 145, 255, 0.12), rgba(255, 170, 212, 0.10));
  z-index: -1;
}
.login-card {
  width: min(1080px, 100%);
  border-radius: 34px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.login-hero {
  padding: 40px;
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(255,255,255,0.95), transparent 55%),
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(255,255,255,0.72));
}
.login-panel {
  padding: 40px;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.65));
}
.login-panel-single {
  width: min(460px, 100%);
  padding: 22px;
  border-radius: 28px;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.42);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.30);
  backdrop-filter: blur(22px);
}
.login-form {
  display: grid;
  gap: 14px;
}
.login-form label {
  gap: 6px;
  color: #0f172a;
  text-shadow: 0 1px 0 rgba(255,255,255,0.38);
}
.login-form input {
  background: rgba(255,255,255,0.92);
  border-color: rgba(15, 23, 42, 0.16);
  color: #0f172a;
}
.login-form button {
  margin-top: 4px;
}
body.login-page .login-footer {
  margin-top: 18px;
  padding-left: 0;
  padding-right: 0;
  color: rgba(255,255,255,0.92);
}
body.login-page .login-footer .legal-link {
  color: rgba(255,255,255,0.92);
}
body.login-page .login-form button {
  background: linear-gradient(135deg, #6b8cff, #b56cff, #ff7cc9);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(140, 108, 232, 0.34);
}
body.login-page .eyebrow {
  color: #0f172a;
  opacity: 0.88;
}
body.login-page .login-panel-single h1,
body.login-page .login-panel-single h2,
body.login-page .login-panel-single h3,
body.login-page .login-panel-single strong,
body.login-page .login-panel-single p {
  color: #0f172a;
}
.feature-list { display: grid; gap: 12px; margin-top: 24px; }
.feature-pill {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--stroke);
}

.map-frame {
  width: 100%;
  min-height: clamp(300px, 56vh, 560px);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--stroke);
}
body.section-admin .map-frame {
  min-height: clamp(240px, 42svh, 420px);
  border-radius: 18px;
}

.video-stage {
  position: relative;
  min-height: min(78svh, 760px);
  border-radius: 24px;
  overflow: hidden;
  background: #111827;
}
.video-stage.map-mode {
  background: #0b1220;
}
.video-stage.camera-idle {
  background:
    radial-gradient(520px 240px at 50% 18%, rgba(255,255,255,0.14), transparent 60%),
    linear-gradient(145deg, rgba(52, 92, 168, 0.88), rgba(113, 88, 193, 0.86) 54%, rgba(223, 104, 170, 0.78));
}
.video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hunt-map-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  background: #0b1220;
}
.video-stage.map-mode .hunt-map-layer {
  opacity: 1;
  visibility: visible;
}
.hunt-map-frame {
  width: 100%;
  height: 100%;
  transform: rotateZ(var(--map-rotate, 0deg));
  transform-origin: center center;
  transition: transform 0.1s linear;
}
.hunt-map-frame .leaflet-container {
  background: #0b1220;
}
.hunt-user-avatar-icon {
  background: transparent;
  border: 0;
}
.hunt-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}
.video-stage.map-mode video {
  opacity: 0;
  visibility: hidden;
}
.video-stage.map-mode .video-overlay {
  pointer-events: none;
}
.video-stage.map-mode .hunt-bottom-sheet,
.video-stage.map-mode .monster-card {
  pointer-events: auto;
}
.video-stage:not(.camera-live) video {
  opacity: 0;
  visibility: hidden;
}
.video-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.10), rgba(10, 16, 28, 0.02) 20%, rgba(10, 16, 28, 0.02) 72%, rgba(10, 16, 28, 0.14));
  z-index: 1;
  pointer-events: none;
}
.video-stage.map-mode::after {
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.04), rgba(10, 16, 28, 0.01) 20%, rgba(10, 16, 28, 0.01) 72%, rgba(10, 16, 28, 0.06));
}
.video-overlay {
  position: relative;
  z-index: 2;
  min-height: min(78svh, 760px);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hunt-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: min(78svh, 760px);
}
.hunt-topbar {
  display: grid;
  gap: 8px;
}
.hunt-summary-card,
.hunt-bottom-sheet,
.glass-badge,
.monster-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.46);
  border-radius: 18px;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}
.hunt-summary-card {
  padding: 8px 10px;
}
.hunt-summary-card h3,
.hunt-summary-card p {
  margin: 0;
}
.badge-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.glass-badge {
  padding: 8px 10px;
  font-weight: 700;
}
.glass-badge strong {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2px;
}
.glass-badge span {
  display: block;
  line-height: 1.2;
  font-size: 0.9rem;
}
.hunt-center {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hunt-center .monster-card {
  pointer-events: auto;
}
.badge-row, .hunt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.monster-card {
  align-self: center;
  width: min(100%, 260px);
  max-width: 260px;
  padding: 10px;
  text-align: center;
}
.monster-card img {
  width: min(46vw, 150px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.monster-card h3 {
  margin: 6px 0 4px;
  font-size: clamp(1rem, 3.8vw, 1.25rem);
}
.monster-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
}
.hunt-bottom-sheet {
  padding: 8px;
}
.hunt-bottom-sheet-head {
  margin-bottom: 8px;
}
.hunt-bottom-sheet-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.25;
}
.hunt-bottom-sheet .hunt-actions {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 8px;
}
.hunt-bottom-sheet .hunt-actions button {
  min-height: 46px;
  border-radius: 14px;
}
.hunt-bottom-sheet .hunt-actions button[disabled] {
  opacity: 1;
  cursor: not-allowed;
}
.table-mobile-note {
  display: none;
}

@media (max-width: 980px) {
  body.sidebar-open {
    overflow: hidden;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.56);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    position: fixed;
    left: -340px;
    top: 0;
    bottom: 0;
    z-index: 40;
    transition: left 0.22s ease;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.22);
    background: rgba(255, 252, 248, 0.995);
    backdrop-filter: blur(20px);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .sidebar.open { left: 0; }
  .sidebar .brand-block,
  .sidebar .nav-list,
  .sidebar .sidebar-meta {
    position: relative;
    z-index: 1;
  }
  .sidebar .nav-list {
    display: grid !important;
    gap: 10px;
    margin: 4px 0 0;
    align-content: start;
  }
  .sidebar .nav-link {
    display: flex !important;
    visibility: visible;
    opacity: 1;
    background: rgba(255,255,255,0.98);
    border-color: rgba(15, 23, 42, 0.10);
    color: var(--text);
    min-height: 50px;
  }
  .sidebar .nav-link:hover,
  .sidebar .nav-link.active {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
  }
  .sidebar .sidebar-meta {
    background: rgba(255,255,255,0.98);
    border-color: rgba(15, 23, 42, 0.10);
    margin-top: 14px;
    margin-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .menu-toggle { display: inline-grid !important; place-items: center; }
  .app-shell { display: block; }
  .login-card { grid-template-columns: 1fr; }
  .page { min-height: 100vh; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: 12px;
    background: linear-gradient(180deg, rgba(247, 246, 242, 0.98), rgba(247, 246, 242, 0.88));
    backdrop-filter: blur(18px);
  }
  .content {
    padding-top: 16px;
  }
  .split-grid,
  .stats-grid,
  .field-grid,
  .hero-grid,
  .admin-action-grid {
    grid-template-columns: 1fr;
  }
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody {
    display: grid;
    gap: 14px;
  }
  tr {
    border: 1px solid var(--stroke);
    border-radius: 20px;
    background: rgba(255,255,255,0.92);
    padding: 12px;
    box-shadow: 0 10px 22px rgba(31, 41, 55, 0.06);
  }
  td {
    border: 0;
    padding: 8px 0;
  }
  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  td form {
    gap: 10px;
  }
  td input,
  td select,
  td button,
  td .nav-link {
    width: 100%;
  }
  body.section-admin .sidebar {
    width: min(82vw, 280px);
    left: calc(-1 * min(82vw, 280px) - 12px);
    background: rgba(255, 251, 247, 0.995);
  }
  body.section-admin .content {
    padding: 12px 12px 10px;
    gap: 10px;
  }
  body.section-admin .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  body.section-admin .menu-toggle {
    display: inline-grid !important;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    background: rgba(255,255,255,0.98);
    border-color: rgba(15, 23, 42, 0.12);
  }
  body.section-admin .card,
  body.section-admin .hero-card,
  body.section-admin .table-card,
  body.section-admin .map-card {
    padding: 10px;
    border-radius: 18px;
  }
  body.section-admin .stat-box,
  body.section-admin .mini-card,
  body.section-admin tr {
    padding: 9px;
    border-radius: 16px;
  }
  body.section-admin th,
  body.section-admin td {
    padding-left: 0;
    padding-right: 0;
  }
  body.section-admin .inline-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }
  body.section-admin .picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.section-admin .picker-item {
    padding: 8px;
    border-radius: 18px;
  }
  body.section-admin .button-row {
    flex-direction: column;
  }
  body.section-admin .button-row > * {
    width: 100%;
    flex-basis: auto;
  }
  body.section-admin .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  body.section-admin .admin-dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  body.section-admin .map-card .button-row {
    grid-template-columns: 1fr 1fr;
  }
  body.section-user .sidebar {
    width: min(84vw, 292px);
    left: calc(-1 * min(84vw, 292px) - 12px);
    background: rgba(255, 253, 249, 0.995);
  }
  body.section-user .content {
    padding: 12px;
    gap: 12px;
  }
  body.section-user .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  body.section-user .menu-toggle {
    display: inline-grid !important;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    background: rgba(255,255,255,0.98);
    border-color: rgba(15, 23, 42, 0.12);
  }
  body.section-user .card,
  body.section-user .hero-card,
  body.section-user .table-card,
  body.section-user .map-card {
    padding: 13px;
    border-radius: 18px;
  }
  body.section-user .stat-box,
  body.section-user .mini-card {
    padding: 12px;
    border-radius: 16px;
  }
  body.section-user .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  body.section-user .gallery-bookhead {
    margin-bottom: 10px;
  }
  body.section-user .gallery-bookhead h3 {
    font-size: 0.92rem;
  }
  body.section-user .gallery-book-pill {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 0.68rem;
  }
  body.section-user .profile-chip {
    gap: 10px;
  }
  body.section-user .inline-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }
  body.section-user .gallery-item {
    padding: 8px;
    border-radius: 16px;
  }
  body.section-user .sticker-card {
    min-height: 156px;
    padding: 8px;
  }
  body.section-user .sticker-chip {
    top: 8px;
    left: 8px;
    min-height: 22px;
    padding: 3px 7px;
    font-size: 0.58rem;
  }
  body.section-user .sticker-media {
    min-height: 88px;
    margin-top: 16px;
    border-radius: 14px;
  }
  body.section-user .gallery-item strong {
    font-size: 0.8rem;
    line-height: 1.15;
  }
  body.section-user .gallery-item small {
    font-size: 0.68rem;
    margin-top: 4px;
  }
  body.section-user .gallery-modal-card {
    width: calc(100vw - 18px);
  }
  body.section-user .gallery-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  body.section-user .user-dashboard-stats .stat-box,
  body.section-user .user-dashboard-stats .mini-card {
    padding: 8px !important;
    min-height: 76px;
  }
  body.section-user .user-dashboard-stats .stat-box span {
    font-size: 0.68rem;
  }
  body.section-user .user-dashboard-stats .stat-box strong,
  body.section-user .user-dashboard-stats .mini-card strong {
    font-size: 1.02rem;
  }
}

@media (max-width: 640px) {
  .sidebar {
    width: min(88vw, 320px);
    left: calc(-1 * min(88vw, 320px) - 12px);
    background: rgba(255, 252, 248, 0.998);
  }
  .content, .topbar, .app-footer { padding-left: 14px; padding-right: 14px; }
  .content { gap: 16px; }
  .card, .hero-card, .table-card, .map-card { padding: 16px; border-radius: 22px; }
  .hero-grid, .stats-grid, .split-grid, .field-grid, .theme-swatch-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .brand-block h1 { font-size: 1.75rem; }
  .topbar h2 { font-size: clamp(1.35rem, 8vw, 2rem); }
  .menu-toggle {
    display: inline-grid !important;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
  }
  .topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  body.section-admin .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  body.section-admin .admin-dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  body.section-admin .admin-dashboard-stats .stat-box {
    min-height: 34px !important;
    padding: 5px 8px 4px !important;
    border-radius: 14px !important;
  }
  body.section-admin .admin-dashboard-stats .stat-box span {
    font-size: 0.58rem !important;
    line-height: 1 !important;
    margin-bottom: 1px !important;
  }
  body.section-admin .admin-dashboard-stats .stat-box strong {
    font-size: 0.84rem !important;
    margin-top: 0 !important;
    line-height: 1 !important;
  }
  body.section-admin .map-card .button-row {
    grid-template-columns: 1fr;
  }
  .dashboard-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .dashboard-tile {
    min-height: 152px;
    padding: 12px;
    border-radius: 22px;
  }
  .dashboard-tile::before {
    width: 96px;
    height: 96px;
  }
  .dashboard-tile::after {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
  .dashboard-tile strong {
    font-size: 1.45rem;
  }
  .tile-title {
    font-size: 0.92rem;
  }
  .tile-meta {
    font-size: 0.68rem;
  }
  .button-row {
    flex-direction: column;
  }
  .button-row > * {
    width: 100%;
    flex-basis: auto;
  }
  .picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .gallery-bookhead {
    margin-bottom: 10px;
  }
  .gallery-bookhead h3 {
    font-size: 0.9rem;
  }
  .gallery-book-pill {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 0.68rem;
  }
  .gallery-item {
    padding: 8px;
    border-radius: 16px;
  }
  .sticker-card {
    min-height: 152px;
    padding: 8px;
  }
  .sticker-chip {
    top: 8px;
    left: 8px;
    min-height: 22px;
    padding: 3px 7px;
    font-size: 0.58rem;
  }
  .sticker-media {
    min-height: 84px;
    margin-top: 16px;
    border-radius: 14px;
  }
  .gallery-item strong {
    font-size: 0.8rem;
    line-height: 1.15;
  }
  .gallery-item small {
    font-size: 0.67rem;
    margin-top: 4px;
  }
  .gallery-modal-card {
    width: calc(100vw - 14px);
    margin: max(8px, env(safe-area-inset-top)) auto;
    padding: 10px;
    border-radius: 18px;
  }
  .gallery-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  body.section-user .user-dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  body.section-user .user-dashboard-stats .stat-box,
  body.section-user .user-dashboard-stats .mini-card {
    padding: 8px !important;
    min-height: 76px;
  }
  body.section-user .user-dashboard-stats .stat-box span {
    font-size: 0.68rem;
  }
  body.section-user .user-dashboard-stats .stat-box strong,
  body.section-user .user-dashboard-stats .mini-card strong {
    font-size: 1.02rem;
  }
  body.section-user .user-identity-card .profile-chip {
    gap: 8px;
  }
  body.section-user .user-identity-card .inline-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
  body.user-settings-page .hero-card {
    padding: 8px !important;
  }
  body.user-settings-page .user-dashboard-stats {
    gap: 4px;
  }
  body.user-settings-page .user-dashboard-stats .stat-box,
  body.user-settings-page .user-dashboard-stats .mini-card {
    padding: 6px !important;
    min-height: 0 !important;
    border-radius: 12px !important;
  }
  body.user-settings-page .user-dashboard-stats .stat-box span {
    font-size: 0.58rem;
  }
  body.user-settings-page .user-dashboard-stats .stat-box strong,
  body.user-settings-page .user-dashboard-stats .mini-card strong {
    font-size: 0.8rem;
  }
  body.user-settings-page .card {
    padding: 10px !important;
  }
  body.user-settings-page .settings-form {
    gap: 10px;
  }
  body.user-settings-page .settings-avatar-shell {
    gap: 8px;
  }
  body.user-settings-page .avatar-preview-card {
    padding: 10px;
    border-radius: 16px;
  }
  body.user-settings-page .avatar-preview-media {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }
  body.user-settings-page .settings-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  body.user-settings-page .theme-swatch {
    padding: 7px;
    border-radius: 14px;
  }
  body.user-settings-page .swatch-preview {
    height: 44px;
    border-radius: 10px;
    margin-bottom: 6px;
  }
  body.user-settings-page .theme-swatch strong {
    font-size: 0.76rem;
  }
  body.user-hunt-page .hero-card {
    padding: 8px !important;
  }
  body.user-hunt-page .user-dashboard-stats {
    gap: 4px;
  }
  body.user-hunt-page .user-dashboard-stats .stat-box {
    padding: 6px !important;
    min-height: 0 !important;
    border-radius: 12px !important;
  }
  body.user-hunt-page .user-dashboard-stats .stat-box span {
    font-size: 0.58rem;
  }
  body.user-hunt-page .user-dashboard-stats .stat-box strong {
    font-size: 0.82rem;
  }
  body.user-hunt-page .hunt-bottom-sheet-head p {
    font-size: 0.68rem;
  }
  body.user-hunt-page .hunt-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px;
  }
  body.user-hunt-page .hunt-actions button,
  body.user-hunt-page .hunt-actions button.secondary {
    min-height: 38px;
    padding: 7px 4px;
    font-size: 0.76rem;
    border-radius: 10px;
  }
  .map-frame {
    min-height: min(52svh, 420px);
  }
  body.user-map-page .map-frame,
  body.user-map-page .compact-map-frame {
    min-height: 0;
    height: 100%;
  }
  .video-stage,
  .video-overlay {
    min-height: min(76svh, 720px);
  }
  .video-overlay {
    padding: 8px;
  }
  .hunt-shell {
    gap: 6px;
  }
  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .glass-badge {
    width: 100%;
    min-height: 0;
    padding: 7px 8px;
  }
  .monster-card {
    width: min(100%, 220px);
    max-width: 220px;
    padding: 8px;
    border-radius: 16px;
  }
  .monster-card img {
    width: min(40vw, 120px);
  }
  .hunt-bottom-sheet {
    padding: 8px;
  }
  .hunt-bottom-sheet-head {
    display: block;
    margin-bottom: 6px;
  }
  .hunt-bottom-sheet .hunt-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .hunt-bottom-sheet .hunt-actions button {
    min-height: 44px;
    font-size: 0.92rem;
  }
  body.user-hunt-page .hunt-bottom-sheet {
    padding: 0 !important;
  }
  body.user-hunt-page .hunt-bottom-sheet .hunt-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
  body.user-hunt-page .hunt-bottom-sheet .hunt-actions button {
    min-height: 38px !important;
    font-size: 0.76rem !important;
  }
  .app-footer { flex-direction: column; align-items: flex-start; }
  .login-shell { padding-left: 14px; padding-right: 14px; }
  .login-hero, .login-panel { padding: 24px; }
  body.section-admin .topbar h2 {
    font-size: clamp(1.08rem, 6vw, 1.4rem);
  }
  body.section-admin .brand-block h1 {
    font-size: 1.45rem;
  }
  body.section-admin .map-frame {
    min-height: min(38svh, 300px);
  }
  body.section-admin .avatar-preview-media {
    width: 72px;
    height: 72px;
  }
  .toast-stack {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }
}


@media (max-width: 980px) {
  #sidebarBackdrop {
    z-index: 1001 !important;
  }

  #sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(84vw, 300px) !important;
    max-width: 300px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom)) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    background: #fffdf9 !important;
    border-right: 1px solid rgba(15, 23, 42, 0.10) !important;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24) !important;
    backdrop-filter: none !important;
    transform: translateX(calc(-100% - 14px)) !important;
    transition: transform 0.22s ease !important;
    z-index: 1002 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #sidebar.open {
    transform: translateX(0) !important;
  }

  #sidebar .brand-block,
  #sidebar .nav-list,
  #sidebar .sidebar-meta {
    position: relative !important;
    z-index: 2 !important;
  }

  #sidebar .brand-block {
    margin-bottom: 2px !important;
  }

  #sidebar .brand-block h1 {
    font-size: 1.45rem !important;
  }

  #sidebar .nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  #sidebar .nav-link {
    display: flex !important;
    align-items: center !important;
    min-height: 48px !important;
    padding: 12px 13px !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    color: #1f2937 !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06) !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #sidebar .nav-link.active {
    background: color-mix(in srgb, var(--accent-soft) 42%, white) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, white) !important;
    color: var(--accent-strong) !important;
  }

  #sidebar .sidebar-meta {
    margin-top: auto !important;
    padding: 12px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
  }

  [data-menu-toggle] {
    display: inline-grid !important;
    place-items: center !important;
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    z-index: 1003 !important;
  }

  body.section-admin .content,
  body.section-user .content {
    padding: 10px 10px 8px !important;
    gap: 10px !important;
  }

  body.section-admin .card,
  body.section-admin .hero-card,
  body.section-admin .table-card,
  body.section-admin .map-card,
  body.section-user .card,
  body.section-user .hero-card,
  body.section-user .table-card,
  body.section-user .map-card {
    padding: 10px !important;
    border-radius: 16px !important;
  }

  body.section-admin .stat-box,
  body.section-admin .mini-card,
  body.section-user .stat-box,
  body.section-user .mini-card {
    padding: 10px !important;
    border-radius: 14px !important;
  }

  body.section-admin h3,
  body.section-user h3 {
    font-size: 0.96rem !important;
    margin-bottom: 6px !important;
  }

  body.section-admin .subtle,
  body.section-user .subtle {
    font-size: 0.86rem !important;
    line-height: 1.35 !important;
  }

  .admin-hide-map {
    min-height: 50dvh !important;
  }

  .admin-hide-sheet {
    position: relative !important;
    bottom: auto !important;
    padding: 10px !important;
    border-radius: 18px !important;
  }

  .admin-hide-sheet-head {
    align-items: flex-start !important;
  }
}

@media (max-width: 640px) {
  .monster-modal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .modal-card.monster-select-modal {
    width: calc(100vw - 14px);
    margin: max(8px, env(safe-area-inset-top)) auto;
    padding: 10px;
    border-radius: 18px;
  }

  .admin-hide-shell {
    gap: 10px;
  }

  .admin-hide-stage {
    padding: 10px !important;
  }

  .admin-hide-toolbar-actions,
  .admin-hide-audience-switch {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }

  .admin-hide-toolbar-actions button,
  .admin-hide-audience-switch .nav-link {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .admin-hide-actions {
    display: block !important;
  }

  .admin-hide-map {
    min-height: 48dvh !important;
  }

  .admin-hide-sheet {
    position: relative !important;
    bottom: auto !important;
    gap: 10px;
    border-radius: 16px !important;
  }

  .admin-hide-sheet-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-hide-sheet-head button {
    width: 100%;
  }

  .admin-hide-chip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-hide-chip-grid .mini-card {
    padding: 10px !important;
  }

  .admin-hide-chip-grid .mini-card strong {
    font-size: 0.9rem;
  }

  .admin-hide-spacer {
    display: none;
  }
}

body.user-hunt-page .monster-card {
  padding: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.user-hunt-page .monster-card img {
  display: block;
  margin: 0 auto;
  background: transparent !important;
}

body.user-hunt-page .monster-card h3,
body.user-hunt-page .monster-card p {
  text-shadow: 0 2px 12px rgba(12, 20, 36, 0.24);
}

body.hide-map-page,
body.hide-map-page .content-shell,
body.hide-map-page .content-area {
  overscroll-behavior-y: contain;
}

body.hide-map-page {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior-y: none;
}

body.hide-map-page .app-shell,
body.hide-map-page .page {
  min-height: 100dvh;
  height: 100dvh;
}

body.hide-map-page .page {
  display: flex;
  flex-direction: column;
}

body.hide-map-page .content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior-y: none;
}

body.hide-map-page .topbar {
  flex: 0 0 auto;
}

body.hide-map-page .admin-hide-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

body.hide-map-page .admin-hide-stage,
body.hide-map-page .map-card,
body.hide-map-page .map-frame,
body.hide-map-page .compact-map-frame {
  min-height: 0;
}

body.hide-map-page .admin-hide-map {
  min-height: 0 !important;
  height: 100% !important;
}

body.user-map-page .admin-hide-map {
  height: 100% !important;
}

body.hide-map-page .hero-card {
  flex: 0 0 auto;
}

body.hide-map-page .app-footer {
  display: none !important;
}

body.hide-map-page .admin-hide-spacer {
  display: none !important;
}

body.hide-map-page .topbar {
  padding-bottom: 10px;
}

body.hide-map-page .content {
  padding-top: 0;
}

.immersive-map-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.immersive-map-screen {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.immersive-map-canvas {
  position: absolute;
  inset: 0;
}

.immersive-map-canvas .leaflet-container {
  width: 100%;
  height: 100%;
}

.immersive-map-top,
.immersive-map-bottom {
  position: absolute;
  left: 10px;
  right: 10px;
  z-index: 500;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.immersive-map-top {
  top: 10px;
}

.immersive-map-bottom {
  bottom: 10px;
}

.immersive-map-top > *,
.immersive-map-bottom > * {
  pointer-events: auto;
}

.immersive-map-chiprow {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.immersive-map-chip {
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.10);
  text-align: center;
}

.immersive-map-chip span {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.immersive-map-chip strong {
  display: block;
  margin-top: 4px;
  font-size: 0.96rem;
  line-height: 1.1;
}

.immersive-map-panel {
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.immersive-map-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.immersive-map-actions.single {
  grid-template-columns: 1fr;
}

.immersive-map-actions button,
.immersive-map-actions .nav-link {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.immersive-map-stack {
  display: grid;
  gap: 8px;
}

.immersive-map-panel summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
}

.immersive-map-panel summary::-webkit-details-marker {
  display: none;
}

body.hide-map-page .map-reload-btn {
  top: 10px !important;
  right: 10px !important;
}

body.hide-place-page .map-reload-btn {
  top: 10px !important;
  right: 10px !important;
}

.admin-hide-map,
.admin-hide-map .leaflet-container {
  touch-action: pan-x pan-y pinch-zoom;
  overscroll-behavior: none;
}

.map-reload-btn {
  position: absolute !important;
  top: max(10px, env(safe-area-inset-top)) !important;
  right: max(10px, env(safe-area-inset-right)) !important;
  z-index: 1200 !important;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  display: inline-grid !important;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  padding: 0;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.admin-address-search-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.admin-address-accordion {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0;
  overflow: hidden;
}

.admin-address-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-address-accordion summary::-webkit-details-marker {
  display: none;
}

.admin-address-summary-copy {
  display: grid;
  gap: 2px;
}

.admin-address-summary-copy strong {
  font-size: 0.95rem;
}

.admin-address-summary-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
}

.admin-address-search-shell {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.admin-address-results {
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
}

.admin-address-hint {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.address-result-btn {
  width: 100%;
  display: grid;
  gap: 3px;
  justify-items: start;
  text-align: left;
  padding: 10px 12px !important;
  border-radius: 14px !important;
}

.address-result-btn strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.address-result-btn small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

@media (max-width: 640px) {
  .admin-address-search-grid {
    grid-template-columns: 1fr;
  }
}

body.hide-map-page .admin-hide-shell:not(.immersive-map-layout) {
  display: grid !important;
  grid-template-rows: none !important;
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
}

body.hide-map-page .admin-hide-shell:not(.immersive-map-layout) .admin-hide-stage,
body.hide-map-page .admin-hide-shell:not(.immersive-map-layout) .map-card,
body.hide-map-page .admin-hide-shell:not(.immersive-map-layout) .map-frame,
body.hide-map-page .admin-hide-shell:not(.immersive-map-layout) .compact-map-frame {
  min-height: 0;
  height: auto !important;
}

body.hide-map-page .admin-hide-shell:not(.immersive-map-layout) .admin-hide-map {
  min-height: 56dvh !important;
  height: auto !important;
}

body.hide-map-page .admin-hide-shell:not(.immersive-map-layout) + .app-footer,
body.hide-map-page .admin-hide-shell:not(.immersive-map-layout) ~ .admin-hide-spacer {
  display: none !important;
}
