:root {
  --page: #f7f8f5;
  --paper: #ffffff;
  --soft: #f0f3ef;
  --ink: #27312e;
  --muted: #7a8982;
  --line: #e8ede8;
  --sage: #4a8d80;
  --sage-soft: #e1f0e9;
  --coral: #e97668;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

body { background: var(--page); }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
button:active:not(:disabled) { transform: scale(.985); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
a { color: var(--sage); }

.topbar {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  padding-inline: max(20px, calc((100vw - 1040px)/2));
}
.brand { color: var(--ink); font-weight: 750; letter-spacing: -.035em; }
.brand-mark { background: var(--sage-soft); color: var(--sage); font-weight: 850; border-radius: 10px; }
.version-badge { color: var(--muted); border-color: var(--line); font-weight: 600; }
.save-status { color: var(--muted); }
.icon-button { color: var(--sage); background: var(--sage-soft); border: 0; font-size: 1.25rem; }
.icon-button:hover { background: #d2e9dd; }
.desktop-nav-button { border: 0; background: transparent; color: var(--ink); padding: 8px 9px; font-size: .87rem; font-weight: 650; }
.desktop-nav-button:hover { color: var(--sage); }
.back-button { display: none; }
.main-content { width: min(100%, 1040px); padding-top: 30px; }

h1, h2, h3 { color: var(--ink); }
h1 { letter-spacing: -.045em; font-weight: 780; }
h2 { letter-spacing: -.025em; }
.eyebrow { color: var(--sage); font-size: .72rem; letter-spacing: .07em; font-weight: 750; }
.page-subtitle, .muted, small { color: var(--muted); }
.page-heading { margin-bottom: 22px; }
.section-title { margin-top: 30px; }
.section-title h2 { font-size: 1.05rem; font-weight: 720; }
.count { background: var(--sage-soft); color: var(--sage); }

.card, .empty-state, .settings-card {
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 20px;
  box-shadow: 0 6px 24px #566e6010;
}
.empty-state { border: 1px dashed #cbdcd1; }
.empty-symbol { background: var(--sage-soft); color: var(--sage); }
.event-card { padding: 18px 20px; }
.event-card-button { width: 100%; text-align: left; color: var(--ink); cursor: pointer; }
.event-card-button:hover, .route-hall:hover { border-color: #b8d3c5; background: #fbfdfb; }
.event-card-main { display: grid; gap: 7px; min-width: 0; }
.event-card-title { font-size: 1.1rem; line-height: 1.35; }
.event-card-chevron { justify-self: end; color: var(--sage); font-size: 1.6rem; }
.event-card-button .event-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.route-group .section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.route-date { color: var(--muted); font-size: .8rem; }
.route-hall { width: 100%; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; text-align: left; color: var(--ink); cursor: pointer; }
.route-hall strong, .route-hall small { display: block; }
.route-hall small { margin-top: 5px; }
.route-hall > span:last-child { color: var(--sage); font-size: 1.5rem; }
.event-meta, .hall-card p { color: var(--muted); }
.date-badge { background: var(--sage-soft); color: var(--sage); border-radius: 13px; }
.date-badge span { color: var(--sage); }
.event-card h3 button, .hall-card h3 button { color: var(--ink); }
.hall-card { padding: 20px; }
.hall-card-button { width: 100%; text-align: left; color: var(--ink); cursor: pointer; }
.hall-card-button:hover { border-color: #b8d3c5; background: #fbfdfb; }
.hall-card-title { display: block; font-size: 1.08rem; line-height: 1.35; }
.hall-card-meta { display: block; margin-top: 5px; color: var(--muted); font-size: .86rem; }
.reorder-hint { color: #a2b0a8; font-size: 1.3rem; line-height: 1; }
.booth-reorder-handle { display: flex; align-items: center; gap: 5px; margin: 0 0 7px auto; padding: 3px 9px; border: 0; border-radius: 8px; background: var(--sage-soft); color: var(--sage); font-size: .8rem; font-weight: 700; touch-action: none; }
.booth-reorder-handle:first-letter { font-size: 1.1rem; }
.is-reordering { border-color: var(--sage) !important; box-shadow: 0 10px 28px #4a8d8038; transform: scale(1.015); z-index: 2; }
.reorder-target { outline: 2px dashed var(--sage); outline-offset: 3px; }
.route-sort-mode .bottom-nav { display: none; }
.route-sort-mode .main-content { padding-top: 0; padding-bottom: calc(25px + env(safe-area-inset-bottom)); }
.route-sort-top { position: sticky; top: 66px; z-index: 18; display: grid; grid-template-columns: 62px 1fr 62px; align-items: center; gap: 8px; min-height: 56px; margin: 0 -20px; padding: 6px 20px; background: var(--page); border-bottom: 1px solid var(--line); }
.route-sort-top strong { text-align: center; font-size: 1rem; white-space: nowrap; }
.route-sort-top button { border: 0; background: transparent; color: var(--sage); font-weight: 750; min-height: 42px; padding: 6px 0; }
.route-sort-top .route-sort-cancel { text-align: left; color: var(--muted); }
.route-sort-top .route-sort-done { text-align: right; }
.route-sort-caption { margin: 14px 0 12px; color: var(--muted); font-size: .82rem; }
.route-sort-list { display: grid; gap: 5px; }
.route-sort-row { display: grid; grid-template-columns: 38px 32px minmax(0, 1fr) auto 38px; align-items: center; gap: 6px; min-height: 56px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 2px 8px #566e6009; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.route-sort-row.is-reordering { background: var(--sage-soft); opacity: .9; }
.route-grip { display: grid; place-items: center; height: 42px; color: var(--sage); font-size: 1.15rem; }
.route-index { color: var(--muted); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.route-identity { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.route-identity strong { flex: none; color: var(--ink); font-size: .88rem; }
.route-identity small { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .8rem; }
.route-priority { white-space: nowrap; color: var(--sage); background: var(--sage-soft); border-radius: 6px; padding: 3px 5px; font-size: .7rem; font-weight: 700; }
.route-more { display: grid; place-items: center; width: 38px; height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.4rem; }
.route-more:active { background: var(--soft); }
.route-menu-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.route-position-field { margin-top: 18px; }
@media (max-width: 700px) {
  .route-sort-mode .topbar { height: calc(62px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .route-sort-top { top: calc(62px + env(safe-area-inset-top)); margin: 0 -15px; padding: 6px 15px; }
  .route-sort-row { grid-template-columns: 32px 28px minmax(0, 1fr) auto 36px; gap: 4px; }
  .route-identity { display: block; }
  .route-identity strong, .route-identity small { display: block; }
}

.button {
  border-color: var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 650;
}
.button:hover { border-color: #b8d3c5; background: #f9fcfa; }
.button.primary { background: var(--sage); color: white; border-color: var(--sage); }
.button.primary:hover { background: #39796c; border-color: #39796c; }
.button.accent { background: var(--sage-soft); border-color: var(--sage-soft); color: var(--sage); }
.button.danger { color: #b65f55; border-color: #f1ddda; }
.button.small { font-weight: 650; }
.breadcrumb { color: var(--muted); }
.breadcrumb button { color: var(--sage); }

.stat { box-shadow: none; background: var(--paper); padding: 17px 18px; }
.stat-label { color: var(--muted); font-weight: 600; }
.stat-value { color: var(--ink); font-size: 1.35rem; font-weight: 780; }
.stat.highlight { background: var(--sage-soft); border-color: transparent; }
.stats { gap: 9px; }
.hall-stats-section { margin-top: 36px; }

.search, .select, .field input, .field textarea, .field select {
  border-color: #dce7df;
  background: var(--paper);
  border-radius: 11px;
  color: var(--ink);
}
.search:focus, input:focus, textarea:focus, select:focus { outline-color: #a8d0ba; }
.filter-chip { border-color: var(--line); color: #65786f; background: var(--paper); }
.filter-chip.active { background: var(--sage-soft); color: #39796c; border-color: var(--sage-soft); }
.filter-row { gap: 7px; }
.booth-list { gap: 14px; }
.booth-card { border: 1px solid var(--line); box-shadow: 0 5px 18px #566e600a; }
.booth-card-openable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.booth-card-openable.is-pressed { transform: scale(.992); box-shadow: 0 3px 12px #566e6014; }
.booth-card-openable:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.booth-card-openable .promo-frame[data-action="view-image"] { cursor: zoom-in; }
.booth-section-title { flex-wrap: wrap; }
.booth-section-title h2 { flex: 1 1 auto; }
.booth-card-openable .booth-top { border-bottom: 0; padding-bottom: 6px; }
.booth-top-actions { display: flex; align-items: flex-start; gap: 8px; }
.booth-collapse-button { flex: none; display: grid; place-items: center; width: 42px; height: 42px; margin-top: -3px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--sage); font-size: 1.15rem; font-weight: 750; line-height: 1; }
.booth-card.is-collapsed .booth-collapse-button { transform: rotate(180deg); }
.booth-collapse-summary { padding: 0 17px 13px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; line-height: 1.4; }
.booth-card.is-collapsed .booth-collapse-summary { border-bottom: 0; }
.booth-collapsible-content[hidden] { display: none; }
.booth-top { border-bottom-color: var(--line); }
.booth-number { color: var(--ink); }
.booth-circle { color: #586961; }
.booth-author { color: var(--muted); }
.status-pill { background: var(--sage-soft); color: #39796c; }
.status-pill.pending { background: var(--sage-soft); color: #39796c; }
.status-pill.partial { background: #e9f2ed; color: #45856d; }
.status-pill.later { background: #fbf1e5; color: #9c7154; }
.status-pill.complete { background: var(--soft); color: var(--muted); }
.booth-links a, .booth-links button { background: var(--soft); color: var(--sage); }
.promo-frame { background: var(--soft); }
.promo-empty { color: #9aa8a0; }
.promo-add-empty { width: calc(100% - 34px); min-height: 118px; border: 1px dashed #b8d3c5; color: var(--sage); flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 700; }
.promo-add-empty:hover { background: var(--sage-soft); }
.promo-add-symbol { font-size: 1.8rem; line-height: 1; }
.promo-add-overlay { position: absolute; top: 8px; right: 8px; z-index: 2; border: 0; border-radius: 9px; padding: 6px 9px; background: #ffffffed; color: var(--sage); font-size: .78rem; font-weight: 750; box-shadow: 0 2px 8px #27312e28; }
.promo-controls button, .promo-count { background: #354b42d9; }
.product-row { border-top-color: var(--line); }
.compact-page-actions { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.layout-switch { display: flex; justify-content: flex-end; gap: 5px; margin: 0 0 12px; }
.layout-option { border: 1px solid var(--line); background: var(--paper); color: var(--muted); border-radius: 9px; padding: 7px 12px; font-size: .82rem; font-weight: 700; }
.layout-option.active { background: var(--sage-soft); border-color: var(--sage-soft); color: var(--sage); }
.product-row.has-image { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: 12px; align-items: start; }
.product-body { min-width: 0; }
.product-main { min-width: 0; }
.product-name { min-width: 0; overflow-wrap: anywhere; }
.product-controls { display: grid; justify-items: start; }
.product-status-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.product-image-button { width: 100%; margin: 0; }
.product-image-button .product-image { width: 100%; max-height: 160px; aspect-ratio: 1; object-fit: contain; background: var(--soft); }
.later-active, .later-tag { background: #fbf1e5; border-color: #e8d6bd; color: #9c7154; }
.later-short { display: none; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-bottom: 12px; }
.product-grid .product-row { display: block; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; }
.product-grid .product-image-button { width: 100%; margin-bottom: 7px; }
.product-grid .product-image { max-height: 125px; }
.product-grid .product-main { display: block; }
.product-grid .product-price { margin-top: 2px; }
.product-grid .stepper { max-width: 100%; }
.product-grid .stepper button { width: 29px; min-width: 29px; }
.product-grid .stepper span { padding: 0 5px; font-size: .76rem; }
.product-grid .mini-action { min-height: 30px; padding: 3px 6px; font-size: .73rem; }
.product-grid .later-full { display: none; }
.product-grid .later-short { display: inline; }
@media (max-width: 380px) { .product-row.has-image { column-gap: 8px; } .product-status-actions { gap: 4px; } .product-row.has-image .mini-action { padding: 3px 6px; } }
.product-image-button { display: block; width: fit-content; max-width: 100%; padding: 0; margin: 8px 0; border: 0; border-radius: 8px; background: transparent; cursor: zoom-in; }
.product-image-button:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.product-image-button .product-image { margin: 0; }
@media (min-width: 800px) { .booth-list .booth-card { height: auto; } }
.product-price { color: var(--ink); }
.priority-dot.must { background: var(--coral); }
.priority-dot.want { background: #7dad98; }
.priority-dot.casual { background: #b4c0b6; }
.tag { background: var(--soft); color: #60746a; }
.priority-tag { background: var(--sage-soft); color: #39796c; }
.stepper { border-color: #d4e2d8; }
.stepper button { background: var(--soft); color: var(--sage); }
.mini-action { border-color: var(--line); color: #667b70; }
.booth-footer { background: #fcfdfa; border-top-color: var(--line); }
.booth-total { color: var(--muted); }
.booth-total strong { color: var(--ink); }

.sheet-dialog, .confirm-dialog { border-radius: 21px; box-shadow: 0 24px 80px #263b2d30; }
.sheet-dialog::backdrop, .confirm-dialog::backdrop, .map-dialog::backdrop { background: #27382f99; }
.dialog-head { border-bottom-color: var(--line); }
.close-button { background: var(--soft); color: var(--ink); }
.field label, .field-label { color: #4e6255; }
.tag-choice span { background: var(--soft); color: #557165; border-color: var(--line); }
.tag-choice input:checked + span { background: var(--sage); border-color: var(--sage); color: white; }
.optional-fields { border-top-color: var(--line); }
.optional-fields summary { color: var(--sage); }
.toast { background: #30483b; box-shadow: 0 8px 28px #1f352a30; }
.toast button { color: #c6e8d3; }

.hall-map-preview { border-color: var(--line); box-shadow: 0 6px 24px #566e6010; }
.hall-map-preview-media { background: var(--soft); }
.hall-map-preview-caption { color: var(--sage); }
.hall-map-placeholder { background: var(--paper); color: var(--muted); border-color: #cbdcd1; }
.map-dialog { background: var(--page); overflow: hidden; }
#map-content { height: 100%; min-height: 0; }
.map-shell { height: 100%; min-height: 0; position: relative; }
.map-stage-wrap { position: relative; display: flex; flex: 1 1 0; min-height: 0; }
.map-stage { flex: 1 1 0; min-height: 0; }
.map-toolbar { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
.map-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.map-title strong { font-size: .97rem; }
.map-title span { margin-top: 3px; color: var(--muted); font-size: .72rem; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-toolbar .button { background: var(--soft); border: 0; color: var(--ink); }
.map-toolbar .button:hover { background: var(--sage-soft); }
.map-stage { background: #e8ede8; touch-action: pan-x pan-y; }
.map-world { box-sizing: border-box; position: relative; }
.map-page { margin: 0; box-shadow: 0 6px 22px #53695a32; touch-action: pan-x pan-y; }
.map-marker {
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  transform: translate(-50%, -50%);
  rotate: none;
  animation: none;
  overflow: visible;
}
.map-marker span { rotate: none; writing-mode: horizontal-tb; }
.map-marker::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: auto;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 1px 5px #29433766;
}
.map-marker.current { background: transparent; box-shadow: none; animation: none; }
.map-marker.current::before { width: 11px; height: 11px; background: var(--coral); }
.map-marker.is-complete::before { background: #b9d8c8; box-shadow: 0 1px 3px #29433735; }
.map-marker.is-later::before { background: #bf9670; }
.map-marker.is-inactive::before { background: #aeb9b1; box-shadow: 0 1px 3px #29433725; }
.map-marker .map-marker-label { display: none; position: absolute; left: calc(50% + var(--label-x, 13px)); top: calc(50% + var(--label-y, -12px)); width: max-content; max-width: min(var(--label-width, 150px), 40vw); min-height: 23px; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; padding: 3px 6px; border: 1px solid #c6ddd0; border-radius: 6px; background: #fffffff0; color: var(--ink); font-size: 10px; font-weight: 750; box-shadow: 0 1px 4px #29433733; align-items: center; gap: 4px; }
.markers-expanded .map-marker .map-marker-label { display: flex; }
.markers-expanded .map-point.is-row-label .map-marker-label { width: var(--label-width); justify-content: center; }
.markers-expanded .map-point.is-row-label::after { content: ''; position: absolute; left: 50%; top: calc(50% + 5px); width: 1px; height: calc(var(--label-y) - 5px); background: #8ab9a4; pointer-events: none; }
.map-marker-name { display: block; min-width: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; writing-mode: horizontal-tb; }
.map-marker-count { flex: none; font-weight: 900; color: var(--sage); }
.map-marker.is-complete .map-marker-label { color: #7a9887; border-color: #d9e9de; background: #f5faf6f2; }
.map-marker.is-complete .map-marker-count { color: #8cb9a0; }
.map-marker.is-later .map-marker-label { border-color: #ead9c6; background: #fff8eff0; }
.map-marker.is-later .map-marker-count { color: #ad805f; }
.map-marker.is-inactive .map-marker-label { border-color: #e0e5e0; background: #f5f6f3f0; color: #8e9991; }
.map-marker.is-inactive .map-marker-count { color: #8e9991; }
.map-marker-info[hidden] { display: none; }
.map-marker-info { position: absolute; left: 12px; right: 12px; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 12; max-width: 420px; margin: 0 auto; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 10px 36px #253c2c3d; }
.map-marker-info > strong { display: block; padding-right: 30px; overflow-wrap: anywhere; font-size: .98rem; }
.map-info-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 6px 0 12px; color: var(--muted); font-size: .82rem; }
.map-info-meta .is-complete { color: #8cb9a0; }
.map-info-meta .is-later { color: #9c7154; }
.map-info-meta .is-inactive { color: #8e9991; }
.map-info-close { position: absolute; right: 9px; top: 8px; width: 29px; height: 29px; border: 0; border-radius: 8px; background: var(--soft); color: var(--ink); font-size: 1.2rem; }
.map-booth-jump { display: flex; gap: 7px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); overflow-x: auto; background: var(--paper); border-top: 1px solid var(--line); scrollbar-width: thin; }
.map-jump { flex: none; display: flex; align-items: center; gap: 7px; max-width: 155px; min-height: 43px; border: 1px solid #c6ddd0; border-radius: 9px; padding: 5px 8px; background: #f3faf5; color: var(--ink); text-align: left; }
.map-jump-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.map-jump-main { display: block; min-width: 0; }
.map-jump-main strong { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.map-jump-main em { color: var(--sage); font-style: normal; }
.map-jump-main small { display: block; color: var(--muted); font-size: .67rem; }
.map-jump.is-complete { background: #f5faf6; border-color: #d9e9de; color: #7a9887; }
.map-jump.is-complete .map-jump-dot, .map-jump.is-complete em { background: #b9d8c8; color: #7a9887; }
.map-jump.is-later { background: #fff8ef; border-color: #ead9c6; }
.map-jump.is-later .map-jump-dot, .map-jump.is-later em { background: #bf9670; color: #9c7154; }
.map-jump.is-inactive { background: #f5f6f3; border-color: #e0e5e0; color: #8e9991; }
.map-jump.is-inactive .map-jump-dot, .map-jump.is-inactive em { background: #aeb9b1; color: #8e9991; }
.map-cluster { display: grid; place-items: center; width: 31px; height: 31px; background: var(--sage); color: white; border: 2px solid white; border-radius: 50%; box-shadow: 0 2px 7px #29433766; font-size: .71rem; font-weight: 800; }
.map-cluster::before { display: none; }
.map-range { width: max-content; min-width: 88px; height: 28px; padding: 0 8px; transform: translate(-50%, -135%); border: 1px solid #a8cdb8; border-radius: 8px; background: #f0f8f1ed; color: #366f5a; box-shadow: 0 2px 7px #29433733; white-space: nowrap; font-size: .75rem; font-weight: 800; }
.map-range::before { position: absolute; left: 50%; top: 100%; width: 7px; height: 7px; margin: 0; transform: translate(-50%, 4px); }
.map-range span { display: inline; margin-left: 5px; color: var(--sage); font-weight: 900; }
.map-range-highlight { position: absolute; z-index: 2; pointer-events: none; border: 1px solid #8aba9760; border-radius: 6px; background: #b6d7bd18; }
.map-cluster-item { display: flex; align-items: center; gap: 7px; min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #f8fbf8; padding: 4px 7px; color: var(--ink); }
.map-cluster-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; }
.map-cluster-item em { color: var(--sage); font-style: normal; }
.map-cluster-item.is-complete { color: #8eaa98; }
.map-cluster-item.is-later em { color: #9c7154; }
.map-marker:focus-visible { outline: 2px solid var(--sage); outline-offset: 1px; }
.map-stage.is-marking .map-marker { pointer-events: none; opacity: .5; }
.map-crosshair { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); z-index: 8; pointer-events: none; filter: drop-shadow(0 1px 2px #fff); }
.map-crosshair::before, .map-crosshair::after { content: ''; position: absolute; background: var(--coral); border-radius: 3px; }
.map-crosshair::before { width: 2px; height: 40px; left: 19px; top: 0; }
.map-crosshair::after { height: 2px; width: 40px; left: 0; top: 19px; }
.map-mark-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.map-mark-actions { margin-left: auto; }
.map-mark-actions .button { min-width: 110px; }
.map-mark-confirm { width: 100%; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.map-mark-confirm[hidden], .map-cluster-list[hidden] { display: none; }
.map-mark-confirm span { margin-right: auto; color: var(--ink); }
.map-cluster-list { position: relative; padding: 12px 48px 12px 16px; background: var(--paper); border-top: 1px solid var(--line); }
.map-cluster-list strong { display: block; margin-bottom: 8px; font-size: .84rem; }
.map-cluster-list > div { display: flex; flex-wrap: wrap; gap: 6px; max-height: 110px; overflow: auto; }
.map-cluster-dismiss { position: absolute; right: 12px; top: 8px; border: 0; background: var(--soft); border-radius: 7px; width: 28px; height: 28px; }
.map-touch-hint { background: #30483bd9; }
.map-stage.is-marking .map-touch-hint { bottom: 54px; }

.bottom-nav { background: var(--paper); border-top-color: var(--line); box-shadow: 0 -4px 18px #566e6010; }
.nav-item { color: #9aa8a0; }
.nav-item.active { color: var(--sage); }
.nav-icon { font-weight: 750; }

.notes-list { display: grid; gap: 10px; }
.note-search { width: 100%; margin: 0 0 14px; }
.note-search-empty { color: var(--muted); text-align: center; padding: 30px 0; }
.note-card { width: 100%; padding: 18px 20px; display: grid; gap: 7px; text-align: left; color: var(--ink); }
.note-card[hidden] { display: none; }
.note-card:hover { border-color: #b8d3c5; background: #fbfdfb; }
.note-card strong { font-size: 1.03rem; }
.note-card-preview { color: #64766c; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card small { font-size: .74rem; }
.note-editor { max-width: 760px; margin: 0 auto; }
.note-editor-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.note-back { background: none; border: 0; color: var(--sage); padding: 8px 0; font-weight: 700; }
.note-paper { min-height: 65vh; padding: 26px 30px; }
.note-paper input, .note-paper textarea { display: block; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.note-paper input { font-size: 1.45rem; font-weight: 750; line-height: 1.4; }
.note-paper input::placeholder, .note-paper textarea::placeholder { color: #a4b1a8; }
.note-paper textarea { min-height: 50vh; resize: vertical; line-height: 1.75; font-size: 1rem; }
.note-paper input:focus, .note-paper textarea:focus { outline: 0; }
.note-date { margin: 12px 0 16px; color: var(--muted); font-size: .76rem; }

@media (max-width: 700px) {
  .topbar { height: 62px; padding: 0 15px; justify-content: space-between; }
  .brand { position: absolute; left: 50%; transform: translateX(-50%); font-size: 1.01rem; white-space: nowrap; }
  .brand:active:not(:disabled) { transform: translateX(-50%) scale(.985); }
  .brand-mark, .version-badge { display: none; }
  .topbar-actions { width: 100%; justify-content: space-between; flex-direction: row-reverse; }
  .desktop-nav-button { display: none; }
  .backup-button { display: none; }
  .back-button:not([hidden]) { display: grid; place-items: center; }
  .save-status { font-size: .66rem; max-width: 85px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .icon-button { width: 36px; height: 36px; border-radius: 11px; }
  .main-content { padding: 22px 15px calc(100px + env(safe-area-inset-bottom)); }
  .note-paper { padding: 20px 19px; min-height: 60vh; }
  .note-paper textarea { min-height: 48vh; }
  .page-heading h1 { font-size: 1.85rem; }
  .page-heading { gap: 14px; }
  .event-card { padding: 16px; }
  .event-card-button { grid-template-columns: 51px minmax(0, 1fr) 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 77px; padding: 12px 13px; }
  .stat-value { font-size: 1.22rem; }
  .map-toolbar { gap: 7px; padding-bottom: 8px; }
  .map-toolbar .page-actions { width: 100%; justify-content: space-between; }
  .map-toolbar .button { min-width: 31px; }
  .map-title span { max-width: 70vw; }
  .map-stage { min-height: 0; }
}
