:root {
  color-scheme: light;
  --ink: #102033;
  --muted: #667085;
  --line: #d9e2ef;
  --paper: #f7f9fc;
  --card: #ffffff;
  --blue-950: #07182d;
  --blue-900: #0b2545;
  --blue-800: #123c69;
  --blue-700: #155a9c;
  --blue-100: #dbeafe;
  --yellow: #fbbc04;
  --green: #188038;
  --red: #d93025;
  --orange: #f29900;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(7, 24, 45, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(11, 37, 69, 0.97), rgba(18, 60, 105, 0.9)),
    radial-gradient(circle at top left, rgba(251, 188, 4, 0.24), transparent 30%),
    #07182d;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.phone {
  width: min(430px, 100%);
  height: min(900px, calc(100vh - 44px));
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow);
  position: relative;
}

.screen {
  height: 100%;
  overflow-y: auto;
  padding: 18px 16px 104px;
  scrollbar-width: thin;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: -18px -16px 16px;
  padding: 14px 16px 12px;
  background: rgba(247, 249, 252, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 226, 239, 0.75);
}

.brand-mini, .brand-lockup { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-900), var(--blue-700));
  box-shadow: 0 10px 24px rgba(21, 90, 156, 0.26);
  font-weight: 900;
}

.title { margin: 0; font-size: 18px; line-height: 1.15; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.icon-btn, .chip, .btn, .tab, .seg-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 8px;
  font-weight: 750;
}

.btn.primary { background: var(--blue-900); color: #fff; border-color: var(--blue-900); }
.btn.accent { background: var(--yellow); border-color: #e3a700; color: #201600; }
.btn.danger { background: #fff5f3; color: var(--red); border-color: #ffc8c2; }
.btn.ghost { background: transparent; }
.btn.full { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.login {
  width: min(430px, 100%);
  min-height: min(860px, calc(100vh - 44px));
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(165deg, #061322 0%, #0b2545 38%, #124e87 72%, #197bb5 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0 32px;
  box-shadow: var(--shadow);
}

.login-hero {
  padding: 28px 24px 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login h1 { margin: 0; font-size: 42px; font-weight: 800; line-height: 1.08; letter-spacing: 0; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 24px 28px; font-size: 16px; font-weight: 750; }
.login-brand-row { display: flex; align-items: center; justify-content: center; gap: 9px; }
.login .login-edition { margin: 0; max-width: none; font-size: 10px; font-weight: 650; line-height: 1.4; color: #b9d0e8; }
.login-brand .logo-mark { width: 32px; height: 32px; border-radius: 8px; font-size: 14px; box-shadow: none; }
.login p { margin: 0; max-width: 26ch; color: #d8e4f3; font-size: 18px; line-height: 1.5; }
.login-actions { padding: 28px 24px 0; display: grid; gap: 12px; }
.login-actions .btn { min-height: 52px; border-radius: 8px; font-size: 15px; }
.login-google { background: #fff; color: #102033; border-color: #fff; }
.google-letter { color: #4285f4; font-size: 22px; font-weight: 800; }
.login-email { background: #174b7d; color: #fff; border-color: #5681aa; }
.login-contact { align-self: center; margin-top: 18px; padding: 8px; color: #e0edf9; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.login-contact:hover { color: #fff; }
.login-contact:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.login-photo-wall { display: grid; gap: 12px; width: 120%; margin-left: -10%; flex-shrink: 0; transform: rotate(9deg); padding: 12px 0; }
.login-photo-track { display: flex; width: max-content; animation: login-marquee 42s linear infinite; }
.login-photo-track.reverse { animation-direction: reverse; animation-duration: 48s; }
.login-photo-group { display: flex; gap: 12px; padding-right: 12px; }
.login-photo-group img { display: block; width: 150px; height: 145px; object-fit: cover; border-radius: 8px; }
@keyframes login-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-height: 740px) {
  .login { padding: 20px 0; }
  .login-photo-group img { width: 130px; height: 110px; }
  .login-hero { padding-top: 24px; }
  .login h1 { font-size: 36px; }
  .login-brand { margin-bottom: 18px; }
  .login-actions { padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .login-photo-track { animation: none; } }
.demo-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.text-link { border: 0; background: none; color: var(--blue-700); font-weight: 750; padding: 4px; }

.bottom-nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(217, 226, 239, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(16, 32, 51, 0.13);
}

.nav-item {
  border: 0;
  min-width: 0;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}
.nav-item.active { background: var(--blue-100); color: var(--blue-900); }
.nav-icon { position: relative; display: grid; place-items: center; width: 24px; height: 24px; }
.notification-dot { position: absolute; top: -1px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px white; }
.notification-dot[hidden], .notification-preview[hidden] { display: none; }
.moderation-shortcut { position: relative; padding-right: 48px; padding-left: 48px; }
.moderation-count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 50%; background: #102033; color: #fff; font-size: 12px; line-height: 1; font-weight: 750; }
.notification-preview { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(400px, calc(100% - 28px)); z-index: 120; display: grid; gap: 5px; padding: 14px 16px; border: 1px solid #d9e2ef; border-radius: 8px; background: #fff; color: #102033; text-align: left; box-shadow: 0 8px 28px rgba(16, 32, 51, 0.18); cursor: pointer; }
.notification-preview strong { font-size: 14px; }
.notification-preview-body { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mark-all-read { justify-self: end; padding: 8px 0; background: transparent; border: 0; color: var(--blue-900); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.mark-all-read:disabled { opacity: 0.5; cursor: wait; }
.issue-link { text-decoration: underline; justify-self: center; }
.issue-modal { max-height: calc(100dvh - 40px); overflow-y: auto; }
.nav-item i, .icon-btn i, .btn i { width: 20px; height: 20px; }

.panel, .report-card, .notice, .mod-item, .profile-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-strip {
  margin-bottom: 14px;
  padding: 18px;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--blue-950), var(--blue-700));
}
.hero-strip h2 { margin: 0 0 6px; font-size: 24px; }
.hero-strip p { margin: 0; color: rgba(255,255,255,.82); line-height: 1.45; }

.feed-search {
  position: sticky;
  top: 68px;
  z-index: 15;
  display: block;
  margin: 12px 0 14px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 22px rgba(16,32,51,.08);
  transform-origin: top center;
  transition: opacity .22s ease, transform .22s ease, filter .22s ease;
}
.scroll-screen { padding-top: 0; }
.scroll-header { position: sticky; top: 0; z-index: 25; margin: 0 -16px 14px; background: var(--paper); transition: transform 220ms ease; }
.feed-header { padding-bottom: 14px; }
.scroll-header .topbar { position: static; margin: 0; background: var(--paper); }
.feed-header .feed-search { position: static; margin: 12px 16px 0; }
.scroll-header.is-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .scroll-header { transition: none; } }
.feed-search strong,
.feed-search span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-search strong { font-size: 14px; }
.feed-search span { color: var(--muted); font-size: 12px; margin-top: 1px; }

.screen:has(.feed-refresh) { overscroll-behavior-y: contain; }
.feed-refresh { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--blue-700); font-size: 12px; font-weight: 650; transition: height 180ms ease; }
.feed-refresh.pulling { transition: none; }
.feed-update-button { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--blue-700); border-radius: 8px; background: var(--blue-700); color: white; font: inherit; font-size: 14px; font-weight: 650; white-space: nowrap; box-shadow: 0 4px 14px #0002; cursor: pointer; }
.feed-update-button[hidden] { display: none; }
.feed-update-button svg { width: 18px; height: 18px; }
.feed-update-button:disabled svg { animation: refresh-spin 700ms linear infinite; }
.feed-refresh-icon { display: flex; transition: transform 180ms ease; }
.feed-refresh-icon svg { width: 18px; height: 18px; }
.feed-refresh.ready .feed-refresh-icon { transform: rotate(180deg); }
.feed-refresh.refreshing .feed-refresh-icon { animation: refresh-spin 700ms linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.feed-list { display: grid; gap: 20px; }
.stack { display: grid; gap: 12px; }
.city-grid { display: grid; gap: 10px; }
.section-label {
  margin: 8px 2px 10px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.city-threshold-note { margin: -4px 2px 10px; }
.city-more-btn { margin-top: 10px; }
.active-city-panel { display: grid; gap: 10px; }
.active-city-panel .city-card { margin: 0; }
.city-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.city-card .btn { grid-column: 1 / -1; }
.city-card.enabled {
  border-color: rgba(21, 90, 156, 0.38);
  box-shadow: inset 4px 0 0 var(--blue-700);
}
.city-card.featured {
  border-color: rgba(21, 90, 156, 0.45);
  background: linear-gradient(180deg, #fff, #f2f7fd);
}
.city-card.locked { grid-template-columns: 42px minmax(0, 1fr); align-items: center; padding: 12px 36px 12px 12px; gap: 10px; }
.city-card.locked .city-code { width: 42px; height: 42px; border-radius: 8px; font-size: 14px; }
.city-card.locked h3 { font-size: 16px; margin-bottom: 3px; }
.city-card.locked .meta { margin: 0; font-size: 12px; line-height: 1.4; }
.city-lock { position: absolute; right: 12px; top: 12px; color: #7b8797; }
.city-lock svg { width: 16px; height: 16px; }
.city-card.enabled .city-code { background: #ffcf24; color: #161616; border: 3px solid #161616; outline: 2px solid #ffcf24; outline-offset: 1px; border-radius: 6px; }
.city-code {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--blue-900);
  font-weight: 900;
}
.city-card.locked .city-code { background: #667085; }
.city-card h3 { margin: 0 0 4px; }
.nomination-panel h3 { margin: 0 0 6px; }
.nomination-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.nomination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eef4fb;
  color: var(--ink);
  font-size: 13px;
}
.nomination-row strong { white-space: nowrap; }
.report-card { overflow: hidden; }
.compact-card {
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(15, 35, 55, .04);
}
.feed-photo {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #d8dee8;
  position: relative;
  touch-action: pan-y;
}
.feed-photo img {
  width: 100%;
  aspect-ratio: 1.55 / 1;
  object-fit: cover;
  display: block;
}
.feed-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  max-width: calc(100% - 74px);
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.badge-fresh { background: #e0f4e7; color: #17643a; }
.badge-gold { background: #fff0bd; color: #915800; }
.badge-birthday { background: #fce2ed; color: #9b315f; }
.badge-milestone { background: #e0efff; color: #245e9b; }
.badge-veteran { background: #ede6f7; color: #67448d; }
.feed-save {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.55));
}
.feed-save i { width: 28px; height: 28px; stroke-width: 2.4; }
.photo-dots {
  position: absolute;
  left: 50%;
  bottom: 13px;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}
.photo-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.photo-dots span.active { background: #fff; }
.compact-body { padding: 12px 14px 14px; }
.compact-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.compact-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  font-size: 16px;
  line-height: 1.25;
}
.compact-rating {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #111827;
  font-weight: 800;
}
.compact-rating i { width: 17px; height: 17px; fill: currentColor; }
.compact-meta {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}
.compact-link {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-top: 1px solid #e1e7ef;
  color: var(--ink);
  background: #f0f4f8;
  text-align: left;
  font-size: 14px;
  font-weight: 750;
}
.compact-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.compact-link:hover { background: #e6edf5; }
.compact-link:active { background: #dce7f2; }
.compact-link:focus-visible { outline: 2px solid var(--blue-700); outline-offset: -3px; }
.report-card img, .detail-image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: #d8dee8; }
.compact-card .feed-photo img { aspect-ratio: 1.55 / 1; }
.image-button {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  position: relative;
}
.gallery-chip {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 24, 45, 0.72);
  font-size: 12px;
  font-weight: 800;
}
.gallery-chip i { width: 16px; height: 16px; }
.photo-summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
.photo-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.photo-summary strong {
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.photo-summary i { width: 18px; height: 18px; }
.thumb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.thumb-btn {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.thumb-btn img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.thumb-btn.active { border-color: var(--yellow); }
.card-body { padding: 12px; }
.card-top, .row, .stats { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-title { margin: 0 0 6px; font-size: 17px; }
.meta { color: var(--muted); font-size: 12px; line-height: 1.35; }
.description { color: #344054; line-height: 1.5; margin: 8px 0 0; }
.badge-row, .chips, .quick-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.badge, .status-pill, .chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}
.badge { background: #fff8dc; color: #6a4700; border: 1px solid #ffe08a; }
.badge.achievement { font-size: 11px; padding: 5px 9px; border: 0; }
.badge.achievement.badge-gold { background: #fff0bd; color: #915800; }
.badge.achievement.badge-birthday { background: #fce2ed; color: #9b315f; }
.badge.achievement.badge-milestone { background: #e0efff; color: #245e9b; }
.badge.achievement.badge-veteran { background: #ede6f7; color: #67448d; }
.status-pill.active { background: #e8f0fe; color: #174ea6; }
.status-pill.repair_pending { background: #fff7e0; color: #8a5700; }
.status-pill.repaired { background: #e6f4ea; color: #137333; }
.status-pill.pending, .status-pill.edit_pending { background: #fef7e0; color: #a15c00; }
.status-pill.rejected, .status-pill.hidden { background: #fce8e6; color: #a50e0e; }
.status-pill.archived { background: #edf2f7; color: #475467; }
.chip.active { background: var(--blue-900); color: #fff; border-color: var(--blue-900); }

.map-wrap {
  height: calc(100vh - 220px);
  min-height: 520px;
  margin: 0 -16px;
  position: relative;
}
#map { height: 100%; z-index: 1; }
.map-controls {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 12px;
  right: 12px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.map-controls > * { pointer-events: auto; }
.quick-filters, .segmented, .map-toolbar {
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(16,32,51,.12);
}
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; }
.seg-btn { height: 36px; border-radius: 8px; font-weight: 750; }
.seg-btn.active { background: var(--blue-900); color: #fff; border-color: var(--blue-900); }
.map-toolbar { display: flex; justify-content: space-between; gap: 8px; }

.marker-pin {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.marker-pin span { transform: rotate(45deg); color: #fff; font-size: 15px; font-weight: 900; }
.marker-active { background: var(--blue-700); }
.marker-old { background: #7b3f00; }
.marker-repair { background: var(--orange); }
.marker-repaired { background: var(--green); }
.marker-pending { background: #6f42c1; }
.marker-archived { background: #64748b; }

.bottom-sheet {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 74%;
  overflow: auto;
  padding: 14px 16px calc(110px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 45px rgba(16,32,51,.24);
}

.form-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 4px 0 16px;
}
.step-dot {
  height: 6px;
  border-radius: 999px;
  background: #dbe3ee;
}
.step-dot.active { background: var(--blue-800); }
.field { display: grid; gap: 7px; margin-bottom: 12px; }
.field label { font-weight: 800; font-size: 13px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 110px; resize: vertical; }
.mini-map, .detail-map {
  position: relative;
  isolation: isolate;
  z-index: 0;
  height: 230px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8edf4;
}
.detail-map { height: 190px; margin-top: 10px; }
.map-wrap { isolation: isolate; }
.warning {
  padding: 11px 12px;
  border-radius: 8px;
  background: #fff8e1;
  color: #6a4700;
  border: 1px solid #ffdf7e;
  line-height: 1.4;
}
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preview-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.tab { flex: 0 0 auto; min-height: 38px; padding: 0 12px; border-radius: 999px; font-weight: 800; }
.tab.active { color: #fff; background: var(--blue-900); border-color: var(--blue-900); }

.notice, .mod-item, .profile-block { padding: 12px; }
.notice.unread { border-color: var(--blue-700); box-shadow: inset 4px 0 0 var(--blue-700); }
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue-900);
  font-weight: 900;
  font-size: 18px;
}
.stat {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  background: #eef4fb;
}
.stat strong { display: block; font-size: 22px; }

.empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #b8c5d6;
  border-radius: 12px;
  background: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 24, 45, 0.58);
}
.modal {
  width: min(390px, 100%);
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 8px; }
.modal p { color: var(--muted); line-height: 1.45; }
.gallery-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 18px;
  color: #fff;
  background: rgba(3, 10, 22, 0.94);
}
.gallery-top, .gallery-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gallery-title { min-width: 0; }
.gallery-title strong, .gallery-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-title span { color: rgba(255,255,255,.66); font-size: 12px; margin-top: 2px; }
.gallery-stage {
  min-height: 0;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 10px;
}
.gallery-image {
  max-width: 100%;
  max-height: calc(100vh - 190px);
  justify-self: center;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 18px 48px rgba(0,0,0,.38);
}
.gallery-backdrop .icon-btn {
  color: #fff;
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.1);
}
.gallery-count { color: rgba(255,255,255,.72); font-size: 13px; font-weight: 800; }
.gallery-hint { color: rgba(255,255,255,.58); font-size: 12px; }
.gallery-backdrop .thumb-row { width: min(260px, 58vw); }
.gallery-backdrop .thumb-btn { opacity: .66; border-color: transparent; }
.gallery-backdrop .thumb-btn.active { opacity: 1; border-color: var(--yellow); }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue-950);
  box-shadow: var(--shadow);
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 900px) {
  .phone {
    width: min(1120px, calc(100vw - 60px));
    border-radius: 24px;
  }
  .desktop-wide .screen { padding-left: 28px; padding-right: 28px; }
  .desktop-wide .scroll-header { margin-left: -28px; margin-right: -28px; }
  .desktop-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
  .bottom-nav { left: 50%; transform: translateX(-50%); width: 430px; }
  .map-wrap { margin-left: -28px; margin-right: -28px; }
}

@media (max-width: 600px) {
  html, body { height: 100%; min-height: 0; overflow: hidden; }
  .app-shell { height: 100vh; height: 100dvh; min-height: 0; padding: 0; overflow: hidden; }
  .phone, .login { width: 100%; min-height: 0; height: 100%; border-radius: 0; border: 0; }
  .phone { padding-top: env(safe-area-inset-top, 0px); }
  .screen { min-height: 0; padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .login { overflow-y: auto; padding-top: calc(22px + env(safe-area-inset-top, 0px)); padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}
