:root {
  --page: #f6f7f4; --surface: #fff; --ink: #22332d; --muted: #68766e;
  --green: #2a5846; --green-hover: #1f4435; --pale: #eef4ed;
  --line: #e0e5de; --red: #a23d37; --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--page); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: inherit; }
button, a, input { outline-offset: 4px; }
:focus-visible { outline: 3px solid #82a88d; }
[hidden], [v-cloak] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.app-shell { position: relative; height: 100vh; height: 100dvh; overflow: hidden; }
.app-header { position: absolute; z-index: 4; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 2px 10px #22332d14; text-decoration: none; font-size: 18px; font-weight: 650; letter-spacing: -.6px; pointer-events: auto; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--green); color: white; }
.brand-icon .icon { width: 20px; height: 20px; }
.header-actions { display: flex; align-items: center; gap: 8px; padding: 0 5px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 2px 10px #22332d14; pointer-events: auto; }
.connection { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #97a298; display: inline-block; }
.ready .status-dot { background: #497e50; box-shadow: 0 0 0 3px #edf5e9; }
.error .status-dot { background: var(--red); }
.loading .status-dot { background: #a57b2d; }
.header-divider { width: 1px; height: 22px; background: var(--line); }
.icon-button { background: transparent; color: var(--muted); width: 44px; height: 44px; border: 0; border-radius: 10px; display: inline-grid; place-items: center; }
.icon-button:hover { background: var(--pale); color: var(--green); }
.workspace { position: absolute; inset: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; font-weight: 650; letter-spacing: -.8px; }
.button { min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 500; transition: background .15s; }
.button:hover:not(:disabled) { background: var(--pale); }
.button .icon { width: 17px; height: 17px; }
.home-button { min-height: 44px; padding: 0 8px; border: 0; background: transparent; }
.primary { background: var(--green); border-color: var(--green); color: white; }
.primary:hover:not(:disabled) { background: var(--green-hover); }
.map-panel { position: absolute; inset: 0; overflow: hidden; background: #e9eee6; }
.map-canvas { position: absolute; inset: 0; }
.map-canvas.mapboxgl-map { font: inherit; }
.map-hint { position: absolute; top: 76px; left: 16px; display: flex; align-items: center; gap: 9px; padding: 7px 13px 7px 7px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.97); font-size: 12px; pointer-events: none; }
.hint-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--pale); display: grid; place-items: center; color: var(--green); }
.hint-icon .icon { width: 16px; height: 16px; }
.map-overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 20px; overflow: auto; background: rgba(233,238,230,.93); }
.setup-card { position: relative; width: 100%; max-width: 398px; padding: 26px 30px 24px; border-radius: 16px; border: 1px solid #d8e0d5; background: var(--surface); }
.setup-icon { width: 42px; height: 42px; display: grid; place-items: center; background: var(--pale); color: var(--green); border-radius: 12px; margin-bottom: 17px; }
.setup-icon .icon { width: 24px; height: 24px; }
.setup-card h2 { font-size: 22px; font-weight: 600; margin-bottom: 12px; letter-spacing: -.5px; }
.setup-card label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.setup-card input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #cbd5c9; border-radius: 8px; background: #fcfdfa; color: var(--ink); font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.setup-card input[aria-invalid="true"] { border-color: var(--red); }
.connect-button { width: 100%; height: 44px; margin-top: 12px; font-size: 13px; }
.connect-button .icon { margin-left: auto; }
.token-help { margin-top: 12px; font-size: 10px; line-height: 1.7; color: var(--muted); }
.token-help a { color: var(--green); text-underline-offset: 3px; white-space: nowrap; }
.error-message { padding: 10px 12px; border-radius: 7px; background: #fbefed; color: var(--red); font-size: 12px; line-height: 1.6; margin-bottom: 16px; }
.field-error { margin-top: 7px; color: var(--red); font-size: 11px; line-height: 1.6; }
.close-settings { position: absolute; right: 10px; top: 10px; }
.loading-card { text-align: center; padding: 30px; }
.loading-card h2 { font-size: 20px; font-weight: 550; margin: 20px 0 10px; }
.spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid #d0dccd; border-top-color: var(--green); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.markers-panel { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 32px; max-height: calc(100% - 150px); display: flex; flex-direction: column; padding: 4px 12px 8px; background: var(--page); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 20px #22332d1a; }
.markers-heading { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.markers-title { display: flex; flex-shrink: 0; align-items: center; gap: 9px; }
.markers-title h2 { font-size: 16px; font-weight: 600; }
.markers-actions { display: flex; flex-shrink: 0; align-items: center; gap: 8px; margin-left: auto; }
.delete-all-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--red); font-size: 12px; white-space: nowrap; transition: background .15s; }
.delete-all-button .icon { width: 15px; height: 15px; }
.delete-all-button:hover:not(:disabled) { background: #fbefed; }
.panel-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 70px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--green); font-size: 12px; transition: background .15s; }
.panel-toggle:hover { background: #e7ece3; }
.panel-toggle .icon { width: 16px; height: 16px; transition: transform 320ms cubic-bezier(.22, 1, .36, 1); }
.panel-toggle.is-collapsed .icon { transform: rotate(180deg); }
.markers-content { display: grid; min-height: 0; grid-template-rows: 1fr; transition: grid-template-rows 320ms cubic-bezier(.22, 1, .36, 1); }
.markers-content.is-collapsed { grid-template-rows: 0fr; pointer-events: none; }
.markers-content-clip { min-height: 0; overflow: hidden auto; scrollbar-width: thin; }
.markers-content-inner { padding-top: 4px; opacity: 1; transform: translateY(0); transition: opacity 200ms ease, transform 320ms cubic-bezier(.22, 1, .36, 1); }
.markers-content.is-collapsed .markers-content-inner { opacity: 0; transform: translateY(8px); }
.count-badge { min-width: 25px; height: 22px; padding: 0 7px; border-radius: 6px; background: #e7ece3; display: inline-grid; place-items: center; color: #4e634f; font-size: 11px; font-variant-numeric: tabular-nums; }
.empty-list { height: 151px; border: 1px dashed #cfd8cc; border-radius: 11px; display: flex; align-items: center; gap: 22px; padding: 24px 32px; background: #f9faf7; }
.empty-icon { position: relative; width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; color: #718771; background: #ecf0e6; }
.empty-icon .icon { width: 25px; height: 25px; }
.empty-plus { position: absolute; right: -4px; bottom: -4px; background: var(--surface); width: 19px; height: 19px; border-radius: 50%; text-align: center; border: 1px solid var(--line); }
.empty-list h3 { font-size: 14px; font-weight: 550; }
.marker-list { position: relative; display: flex; gap: 10px; padding: 2px 2px 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #b9c6b5 transparent; }
.marker-card { flex: 0 0 244px; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; scroll-snap-align: start; transition: border-color .15s, background .15s; }
.marker-card:hover { border-color: #9fb09b; }
.marker-card.selected { border-color: #6a8868; background: #fcfef9; box-shadow: 0 0 0 1px #6a8868; }
.card-locate { display: block; width: 100%; text-align: left; border: 0; padding: 8px 10px; background: transparent; color: var(--ink); border-radius: 9px 9px 0 0; }
.card-locate:focus-visible { outline-offset: -3px; }
.card-heading { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.marker-number { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; border-radius: 5px; background: var(--pale); color: var(--green); font-family: ui-monospace, Consolas, monospace; font-size: 10px; }
.selected .marker-number { background: var(--green); color: white; }
.card-name { min-width: 0; font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-arrow { margin-left: auto; flex-shrink: 0; width: 14px; height: 14px; color: var(--muted); transform: rotate(-45deg); }
.category-badge { display: inline-block; min-width: 0; padding: 2px 6px; border-radius: 5px; background: var(--pale); color: var(--green); font-size: 10px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-media { position: relative; height: 104px; flex-shrink: 0; overflow: hidden; background: #e9eee5; }
.card-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-image.is-map { object-fit: contain; }
.media-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 11px; }
.photo-control { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #ffffffeb; color: var(--ink); box-shadow: 0 1px 5px #0002; }
.photo-control:hover { background: white; }
.photo-control.previous { left: 6px; }
.photo-control.next { right: 6px; }
.photo-control.previous .icon { transform: rotate(90deg); }
.photo-control.next .icon { transform: rotate(-90deg); }
.photo-count, .photo-source { position: absolute; padding: 3px 6px; border-radius: 4px; background: #183d2cdb; color: white; font-size: 10px; line-height: 1.4; }
.photo-count { top: 7px; right: 7px; }
.photo-source { bottom: 6px; left: 6px; text-decoration: none; }
.photo-fade-enter-active, .photo-fade-leave-active { transition: opacity 140ms ease; }
.photo-fade-enter, .photo-fade-leave-to { opacity: 0; }
.card-address { display: block; margin-bottom: 6px; }
.address-value { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-height: 32px; overflow: hidden; color: #3d4e42; font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.card-coordinates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.coordinate-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 10px; line-height: 18px; gap: 4px; }
.coordinate-row strong { font-size: 10px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-weight: 500; font-variant-numeric: tabular-nums; color: #3d4e42; }
.card-footer { margin-top: auto; border-top: 1px solid #edf0e8; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 0 10px; min-height: 32px; }
.delete-button { height: 32px; flex-shrink: 0; display: flex; align-items: center; gap: 5px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; font-size: 11px; }
.delete-button .icon { width: 13px; height: 13px; }
.delete-button:hover { background: #fbefed; color: var(--red); }
.storage-notice { position: absolute; z-index: 5; top: 76px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 14px; border: 1px solid #ebcdc7; border-radius: 8px; background: #fff8f6; color: var(--red); font-size: 12px; }
.marker-pin { width: 34px; height: 40px; border: 2px solid white; border-radius: 17px 17px 17px 4px; background: var(--green); color: white; font-size: 12px; font-weight: 650; box-shadow: 0 2px 5px #233a3b38; padding: 0 0 3px; }
.marker-pin:hover, .marker-pin.is-selected { background: #183d2c; border-color: #d7e9b9; box-shadow: 0 0 0 3px #2a584627; }
.mapboxgl-popup-content { white-space: pre-line; font-family: inherit; font-size: 12px; line-height: 1.9; padding: 16px 30px 14px 16px; border-radius: 10px; color: var(--ink); }
.mapboxgl-popup-close-button { width: 28px; height: 28px; font-size: 20px; color: var(--muted); }
.mapboxgl-ctrl-top-right { top: 76px; right: 16px; }
.mapboxgl-ctrl-top-right .mapboxgl-ctrl { margin: 0; }
.mapboxgl-ctrl-group { border-radius: 9px; overflow: hidden; }
.mapboxgl-ctrl-group button { width: 36px; height: 36px; }
.mapboxgl-canvas { cursor: crosshair; }
.mapboxgl-canvas:active { cursor: grabbing; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.boot-error { max-width: 500px; margin: 15vh auto; padding: 28px; line-height: 1.8; }
.boot-error p { margin: 15px 0; }
@media (max-height: 800px) and (min-width: 701px) {
  .setup-card { padding: 20px 26px; }
  .setup-icon { display: none; }
  .empty-list { height: 138px; }
}
@media (max-width: 700px) {
  .app-header { top: 12px; left: 12px; right: 12px; gap: 8px; }
  .brand { font-size: 16px; gap: 7px; padding-right: 9px; }
  .brand-icon { width: 30px; height: 30px; }
  .header-actions { gap: 2px; padding-left: 10px; }
  .header-divider { display: none; }
  .connection-label { display: none; }
  .connection { margin-right: 4px; }
  h1 { font-size: 22px; }
  .home-button { width: 40px; padding: 0; }
  .home-button span { display: none; }
  .map-overlay { padding: 12px; }
  .setup-card { padding: 22px; }
  .setup-icon { display: none; }
  .setup-card h2 { font-size: 21px; }
  .map-hint { top: 70px; left: 12px; max-width: calc(100% - 84px); font-size: 11px; line-height: 1.4; padding-right: 10px; }
  .mapboxgl-ctrl-top-right { top: 70px; right: 12px; }
  .markers-panel { left: 8px; right: 8px; padding: 4px 8px 6px; border-radius: 10px; }
  .empty-list { height: 147px; padding: 16px; gap: 15px; }
  .empty-list h3 { font-size: 13px; }
  .marker-card { flex-basis: 236px; }
  .card-media { height: 100px; }
  .delete-button { min-height: 44px; }
  .mapboxgl-ctrl-group button { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
