:root {
  --bg: #e8eef2;
  --bg-deep: #d5e0e8;
  --panel: rgba(255, 252, 248, 0.92);
  --ink: #1c2b33;
  --muted: #5d6f7a;
  --line: rgba(28, 43, 51, 0.12);
  --accent: #0f7a6c;
  --accent-2: #c45c26;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(28, 43, 51, 0.12);
  --radius: 18px;
  --font: "DM Sans", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #c8dde8 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #f0d6c4 0%, transparent 50%),
    linear-gradient(160deg, var(--bg), var(--bg-deep));
}

a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0c6559; }
.btn-ghost { background: rgba(255,255,255,0.7); border: 1px solid var(--line); }
.btn-ghost:hover { background: #fff; border-color: rgba(15,122,108,0.28); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-compact { padding: 0.4rem 0.85rem; font-size: 0.9rem; white-space: nowrap; }
.icon-btn, .text-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}
.text-btn { color: var(--accent); font-weight: 500; }
.icon-btn { font-size: 1.1rem; padding: 0.25rem 0.4rem; }

.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: grid;
  gap: 0.5rem;
}
dialog[open] > .toast-stack {
  position: fixed;
  z-index: 10001;
}
.toast {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.toast-error { border-left: 4px solid var(--danger); }
.toast-success { border-left: 4px solid var(--accent); }
.toast-warning { border-left: 4px solid var(--accent-2); }

/* Auth */
.auth-page { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; }
.auth-shell { width: min(420px, 100%); }
.auth-panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: var(--shadow);
}
.brand {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.auth-panel h1 { margin: 0.4rem 0 0.2rem; font-size: 2rem; }
.auth-sub { margin: 0 0 1.5rem; color: var(--muted); }
.auth-form { display: grid; gap: 1rem; }
.auth-form label, .sheet-body label { display: grid; gap: 0.35rem; }
.auth-form span, .sheet-body label > span { font-size: 0.9rem; color: var(--muted); }
.auth-form input,
.sheet-body input,
.sheet-body textarea,
.sheet-body select,
.sidebar input,
.amap-search input,
.profile-form input,
.profile-form textarea,
.toolbar input,
.toolbar select,
.page-panel input[type="search"],
.page-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: rgba(255,255,255,0.85);
}
.auth-form input:focus,
.sheet-body input:focus,
.sheet-body textarea:focus,
.sheet-body select:focus,
.profile-form input:focus,
.profile-form textarea:focus,
.toolbar input:focus,
.toolbar select:focus {
  outline: none;
  border-color: rgba(15,122,108,0.45);
  box-shadow: 0 0 0 3px rgba(15,122,108,0.12);
}
.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  grid-template-columns: none !important;
  width: fit-content;
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
}
.checkbox-row span {
  white-space: nowrap;
  line-height: 1.2;
}
.folder-field {
  display: grid;
  gap: 0.45rem;
}
.folder-field .field-label {
  font-size: 0.9rem;
  color: var(--muted);
}
.folder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.folder-chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.folder-chip:hover {
  border-color: rgba(15,122,108,0.35);
  background: rgba(15,122,108,0.06);
}
.folder-chip.active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 2px rgba(15,122,108,0.25);
}
.folder-chip-empty {
  color: var(--muted);
  font-size: 0.86rem;
}
.auth-switch { margin-top: 1.25rem; color: var(--muted); }

/* Map layout */
.map-page { height: 100%; overflow: hidden; }
.app-frame {
  height: 100%;
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar map";
}
.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.9rem;
  background: rgba(255,252,248,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 5;
  flex-wrap: nowrap;
  min-height: 56px;
}
.brand-inline {
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--accent);
  font-size: 0.95rem;
}
.amap-search {
  position: relative;
  flex: 1 1 220px;
  max-width: 420px;
  min-width: 160px;
  z-index: 30;
}
.amap-search-box {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.amap-search:focus-within .amap-search-box {
  border-color: rgba(15,122,108,0.45);
  box-shadow: 0 0 0 3px rgba(15,122,108,0.12);
}
.amap-search input {
  width: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0.45rem 0.85rem !important;
  outline: none;
  box-shadow: none;
}
.amap-search .search-submit {
  flex-shrink: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}
.amap-search .search-submit:hover {
  background: rgba(15,122,108,0.08);
}
.suggest-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow: auto;
  z-index: 40;
}
.suggest-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.suggest-list button:last-child { border-bottom: 0; }
.suggest-list button:hover,
.suggest-list button:focus {
  background: #f4f8fa;
  outline: none;
}
.suggest-list button:disabled {
  color: var(--muted);
  cursor: default;
}
.suggest-list strong { font-weight: 600; }
.suggest-list small { color: var(--muted); }

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-link, .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover, .nav-btn:hover {
  color: var(--accent);
  background: rgba(15,122,108,0.08);
}
.nav-link.active {
  color: var(--accent);
  font-weight: 700;
  background: rgba(15,122,108,0.1);
}
.user-chip {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: 0.25rem;
  padding: 0.15rem 0.25rem 0.15rem 0.7rem;
  border-radius: 999px;
  background: rgba(15,122,108,0.08);
  font-size: 0.88rem;
  color: var(--ink);
}
.user-chip .nav-link {
  color: var(--accent);
  font-weight: 600;
  padding: 0.3rem 0.55rem;
}

.sidebar {
  grid-area: sidebar;
  background: rgba(255,252,248,0.96);
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 0.95rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 4;
}
.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-head h2 { margin: 0; font-size: 1.1rem; letter-spacing: -0.01em; }
.side-block { display: grid; gap: 0.55rem; }
.side-block-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.sidebar input[type="search"] {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
}
.folder-list, .point-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.folder-item, .point-item {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  background: rgba(255,255,255,0.55);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.folder-item:hover, .point-item:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(28,43,51,0.08);
}
.folder-item.active, .point-item.active {
  border-color: rgba(15,122,108,0.35);
  background: rgba(15,122,108,0.08);
}
.folder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.folder-item .meta { color: var(--muted); font-size: 0.8rem; }
.folder-actions { display: flex; gap: 0.25rem; }
.point-item h4 { margin: 0 0 0.2rem; font-size: 0.95rem; }
.point-item p { margin: 0; color: var(--muted); font-size: 0.8rem; }
.empty-state {
  list-style: none;
  text-align: center;
  padding: 1.4rem 0.9rem;
  border-radius: 14px;
  border: 1px dashed rgba(28,43,51,0.14);
  background: rgba(255,255,255,0.45);
  color: var(--muted);
}
.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.empty-state p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.map-stage { grid-area: map; position: relative; min-height: 0; }
#map-container { width: 100%; height: 100%; }

.sheet {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(520px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgba(20, 30, 36, 0.45); }

.app-modal {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(400px, calc(100vw - 1.5rem));
  box-shadow: var(--shadow);
  background: var(--panel);
}
.app-modal::backdrop { background: rgba(20, 30, 36, 0.45); }
.app-modal-body {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.3rem 1.2rem;
}
.app-modal-body h3 {
  margin: 0;
  font-size: 1.15rem;
}
.app-modal-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.app-modal-field {
  display: grid;
  gap: 0.35rem;
}
.app-modal-field span {
  font-size: 0.9rem;
  color: var(--muted);
}
.app-modal-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: rgba(255,255,255,0.85);
}
.app-modal-field input:focus {
  outline: none;
  border-color: rgba(15,122,108,0.45);
  box-shadow: 0 0 0 3px rgba(15,122,108,0.12);
}
.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.sheet-body {
  display: grid;
  gap: 0.85rem;
  padding: 1.1rem 1.2rem 1.2rem;
  overflow: auto;
  max-height: calc(100vh - 2rem);
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet-head h3 { margin: 0; }
.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.extra-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.image-preview .thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview .remove-img {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 0;
  border-radius: 999px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.only-mobile { display: none; }
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 3;
}

.layer-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem;
  gap: 0.1rem;
  border-radius: 999px;
  background: rgba(28,43,51,0.06);
  border: 1px solid var(--line);
}
.layer-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.layer-switch button:hover { color: var(--ink); }
.layer-switch button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15,122,108,0.25);
}

.notify-wrap { position: relative; }
.notify-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.notify-btn:hover,
.notify-btn[aria-expanded="true"] {
  color: var(--accent);
  background: rgba(15,122,108,0.08);
}
.notify-icon { display: block; flex-shrink: 0; }
.notify-label { line-height: 1; }
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.05rem;
  height: 1.05rem;
  margin-left: 0.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}
.notify-btn .badge {
  position: absolute;
  top: 0.05rem;
  right: 0.05rem;
  margin: 0;
  box-shadow: 0 0 0 2px #fff;
}
.notify-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 36, 0.4);
  z-index: 80;
}
.notify-panel {
  position: fixed;
  right: 12px;
  top: 64px;
  width: min(360px, 86vw);
  max-height: 420px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 90;
  overflow: hidden;
}
.notify-panel.hidden,
.notify-backdrop.hidden { display: none !important; }
.notify-sheet-handle { display: none; }
.notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.95rem 0.7rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.notify-head h3 {
  margin: 0;
  font-size: 1rem;
}
.notify-head-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.notify-list {
  overflow: auto;
  max-height: 360px;
  overscroll-behavior: contain;
}
.notify-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: start;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.notify-item:last-child { border-bottom: 0; }
.notify-item:hover { background: #f7fafb; }
.notify-item.unread { background: rgba(15,122,108,0.06); }
.notify-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15,122,108,0.12);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.notify-content { display: grid; gap: 0.25rem; min-width: 0; }
.notify-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}
.notify-time {
  font-size: 0.78rem;
  color: var(--muted);
}
.notify-dot {
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--accent-2);
  flex-shrink: 0;
}
.notify-empty {
  padding: 2rem 1.2rem;
  text-align: center;
  color: var(--muted);
}
.notify-empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.notify-empty p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

body.notify-open { overflow: hidden; }

.page-shell { min-height: 100%; }
.page-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(255,252,248,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  flex-wrap: wrap;
  min-height: 56px;
}
.page-main { padding: 1rem; }
.page-panel {
  width: min(880px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.panel-head h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.panel-sub {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  padding: 0.45rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
}
.filter-bar input[type="search"],
.filter-bar select {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  background: rgba(255,255,255,0.9);
  box-shadow: inset 0 0 0 1px transparent;
}
.filter-bar input[type="search"]:focus,
.filter-bar select:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(15,122,108,0.35);
}
.filter-bar select {
  min-width: 108px;
  cursor: pointer;
}
.toolbar, .toolbar-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}
.toolbar h1, .page-panel h1 { margin: 0; }
.toolbar-actions input,
.toolbar-actions select {
  width: auto;
  min-width: 140px;
}
.feed-list { list-style: none; margin: 0.85rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.feed-item {
  padding: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.feed-item:hover {
  background: #fff;
  border-color: rgba(15,122,108,0.28);
  box-shadow: 0 8px 24px rgba(28,43,51,0.06);
}
.feed-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
}
.feed-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15,122,108,0.12);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}
.feed-body { min-width: 0; }
.feed-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.feed-item h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.feed-chip {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(15,122,108,0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.feed-meta {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-note {
  margin: 0.4rem 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}
.meta-row {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.muted { color: var(--muted); }
.social-actions-row .btn.is-active {
  background: rgba(15,122,108,0.12);
  border-color: rgba(15,122,108,0.28);
  color: var(--accent);
}
.comment-list { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.comment-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  background: rgba(255,255,255,0.65);
  border-radius: 10px;
}

.section-title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.profile-panel { display: grid; gap: 1.25rem; }
.profile-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.profile-meta h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}
.profile-handle {
  margin: 0.2rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.profile-bio {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  font-size: 0.95rem;
}
.avatar-lg, .avatar-sm {
  border-radius: 50%;
  overflow: hidden;
  background: rgba(15,122,108,0.15);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.avatar-lg {
  width: 80px;
  height: 80px;
  font-size: 1.7rem;
}
.avatar-sm {
  width: 52px;
  height: 52px;
  font-size: 1.15rem;
}
.avatar-lg img, .avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

.profile-form { margin: 0; }
.profile-edit {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
}
.profile-edit label { display: grid; gap: 0.4rem; }
.profile-edit label > span,
.field-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.profile-edit textarea { resize: vertical; min-height: 84px; }
.avatar-upload { display: grid; gap: 0.45rem; }
.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.avatar-upload-actions { display: grid; gap: 0.25rem; }
.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.profile-save { justify-self: start; min-width: 120px; }
.profile-save:disabled { opacity: 0.7; cursor: wait; }
.profile-points .section-title { margin-bottom: 0.2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .page-main { padding: 0.75rem; }
  .page-panel { padding: 1rem; border-radius: 18px; }
  .page-topbar { padding: 0.55rem 0.7rem; gap: 0.35rem; }
  .brand-inline { font-size: 0.88rem; }
  .panel-head h1 { font-size: 1.25rem; }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .filter-bar select { min-width: 0; }
  .profile-head { align-items: flex-start; }
  .profile-meta h1 { font-size: 1.25rem; }
  .profile-save { width: 100%; justify-self: stretch; }
}

@media (max-width: 860px) {
  .notify-label { display: none; }
  .notify-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
  }
  .notify-btn .badge {
    top: 4px;
    right: 4px;
  }
  .notify-backdrop {
    display: block;
  }
  .notify-panel {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto !important;
    width: 100% !important;
    max-width: none;
    max-height: min(78vh, 560px);
    border-radius: 22px 22px 0 0;
    border: 0;
    box-shadow: 0 -12px 40px rgba(28,43,51,0.18);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .notify-sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0.55rem auto 0.15rem;
    border-radius: 999px;
    background: rgba(28,43,51,0.18);
  }
  .notify-head {
    padding: 0.55rem 1rem 0.75rem;
  }
  .notify-list {
    max-height: none;
    flex: 1;
    overflow: auto;
  }
  .notify-item {
    padding: 0.95rem 1rem;
  }
}

@media (max-width: 1100px) {
  .user-chip span { display: none; }
  .amap-search { max-width: 300px; }
}

@media (max-width: 860px) {
  .app-frame {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "topbar"
      "map";
  }
  .topbar {
    flex-wrap: wrap;
    min-height: 0;
    padding: 0.55rem 0.75rem;
    row-gap: 0.45rem;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    top: 0;
    padding-top: calc(0.95rem + env(safe-area-inset-top, 0px));
    width: min(86vw, 340px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .only-mobile { display: inline-flex; }
  .brand-inline { display: none; }
  .amap-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }
  .topbar-tools { order: 4; }
  .topbar-actions { order: 2; margin-left: 0; }
  .layer-switch { order: 0; }
}
