/* Bean There — styles shared by the public site and the admin page */

:root {
  --bg: #F8F1E7;
  --surface: #FFFBF6;
  --surface-2: #F3E8DA;
  --ink: #3A281E;
  --ink-soft: #7B6455;
  --mocha: #6F4532;
  --espresso: #3A241A;
  --line: #E8D9C6;
  --star: #C27C1E;
  --focus: #6F4532;

  --strawberry: #F6B3C2; --strawberry-ink: #7E2A40;
  --matcha: #B5CF92;     --matcha-ink: #34501C;
  --butter: #F7D983;     --butter-ink: #6E5000;
  --ube: #CDBDEA;        --ube-ink: #463271;
  --blueberry: #B2CAEE;  --blueberry-ink: #244573;
  --mango: #F8C08E;      --mango-ink: #7D3F0B;
  --mint: #A9DCCB;       --mint-ink: #1F5A48;

  --awning-a: #6F4532;
  --awning-b: #F6E7D3;
  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D1510;
    --surface: #281D16;
    --surface-2: #33261D;
    --ink: #F3E6D8;
    --ink-soft: #C4AC98;
    --mocha: #E2B48D;
    --espresso: #120C08;
    --line: #42322A;
    --star: #F0B35A;
    --focus: #F0C9A6;
    --awning-a: #4A2E20;
    --awning-b: #D8BFA3;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- awning + sign ---------- */
.awning {
  position: relative;
  height: 70px;
  background: repeating-linear-gradient(90deg, var(--awning-a) 0 46px, var(--awning-b) 46px 92px);
}
.awning::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -22px; height: 23px;
  background:
    radial-gradient(circle at 23px 0, var(--awning-a) 22px, transparent 23px) 0 0 / 92px 23px repeat-x,
    radial-gradient(circle at 69px 0, var(--awning-b) 22px, transparent 23px) 0 0 / 92px 23px repeat-x;
  filter: drop-shadow(0 4px 3px rgba(40, 20, 10, .16));
}
.sign {
  max-width: 1240px; margin: 0 auto; padding: 48px 24px 10px;
  display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-end; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.cup { width: 60px; height: 60px; flex: none; color: var(--mocha); }
.cup .steam { stroke: var(--strawberry); animation: steam 3.4s ease-in-out infinite; }
.cup .steam + .steam { animation-delay: .7s; stroke: var(--matcha); }
@keyframes steam { 0%,100% { opacity: .3; transform: translateY(2px); } 50% { opacity: 1; transform: translateY(-2px); } }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 7vw, 66px); line-height: .95; margin: 0; letter-spacing: -.01em; }
.tagline { margin: 6px 0 0; color: var(--ink-soft); max-width: 46ch; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
}
.nav a:hover { background: var(--surface-2); }

main { max-width: 1240px; margin: 0 auto; padding: 8px 24px 72px; }
section.block { margin-top: 56px; }
.block-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; margin: 0; }
.block-head p { margin: 0; color: var(--ink-soft); max-width: 60ch; }
h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.2; margin: 0; }

/* ---------- buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--mocha); background: var(--mocha); color: var(--surface);
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; transition: transform .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.ghost { background: transparent; color: var(--mocha); }
.btn.small { padding: 6px 13px; font-size: 13px; }
.btn.soft { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.btn.danger { background: transparent; border-color: var(--strawberry); color: var(--strawberry-ink); }
@media (prefers-color-scheme: dark) { .btn.danger { color: var(--strawberry); } }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--ink);
}
.chip.plain { background: var(--surface-2); color: var(--ink-soft); font-weight: 500; }
.toggle {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 13px; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.toggle:hover { border-color: var(--ink-soft); }
.toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.toggle .count { font-weight: 500; opacity: .65; margin-left: 2px; }
.input, select.input, textarea.input {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 9px 15px; min-width: 0;
}
textarea.input { border-radius: var(--radius-sm); min-height: 90px; resize: vertical; width: 100%; }
.input:focus { border-color: var(--mocha); outline: none; }
.stars { color: var(--star); letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: var(--line); }
.trend { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.trend.up { background: var(--matcha); color: var(--matcha-ink); }
.trend.down { background: var(--strawberry); color: var(--strawberry-ink); }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 1.6fr; gap: 14px; margin-top: 26px; }
.tile { border-radius: var(--radius-lg); padding: 18px 20px 20px; min-width: 0; position: relative; overflow: hidden; }
.tile .label { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.tile .big { font-family: var(--serif); font-size: 46px; line-height: 1; }
.tile .sub { font-size: 13.5px; margin-top: 8px; font-weight: 500; }
.tile .name { font-family: var(--serif); font-size: 23px; line-height: 1.15; overflow-wrap: anywhere; }
.tile .summary { font-size: 15px; line-height: 1.55; margin: 0; }
.tile.butter { background: var(--butter); color: var(--butter-ink); }
.tile.strawberry { background: var(--strawberry); color: var(--strawberry-ink); }
.tile.ube { background: var(--ube); color: var(--ube-ink); }
.tile.matcha { background: var(--matcha); color: var(--matcha-ink); }
.tile.blueberry { background: var(--blueberry); color: var(--blueberry-ink); }
.tile.mango { background: var(--mango); color: var(--mango-ink); }
.tile.mint { background: var(--mint); color: var(--mint-ink); }
.tile .stars { color: inherit; }
.tile .stars .off { color: currentColor; opacity: .3; }
.tile-deco { position: absolute; right: -14px; top: -14px; width: 84px; height: 84px; opacity: .22; pointer-events: none; }

/* ---------- filters ---------- */
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-row + .filter-row { margin-top: 10px; }
.filter-row .input[type="search"] { flex: 1 1 220px; }
.scroll-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; min-width: 0; max-width: 100%; }
.filter-row > .scroll-chips { flex: 1 1 100%; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(60, 30, 10, .15); }
.feature-btn[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.feature-panel { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 14px; display: grid; gap: 14px; }
.feature-panel h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.feature-panel .wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.presets .toggle { background: var(--butter); color: var(--butter-ink); border-color: transparent; }
.presets .toggle:nth-child(2) { background: var(--mint); color: var(--mint-ink); }
.presets .toggle:nth-child(3) { background: var(--strawberry); color: var(--strawberry-ink); }
.presets .toggle:nth-child(4) { background: var(--ube); color: var(--ube-ink); }
.presets .toggle[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); }
.active-filters .x { border: none; background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.linkish { border: none; background: none; text-decoration: underline; cursor: pointer; color: var(--mocha); font-weight: 600; padding: 0; }

/* ---------- café cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; margin-top: 18px; }
.card {
  display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(58, 36, 26, .55); }
.card .photo { aspect-ratio: 4 / 3; position: relative; background: var(--surface-2); overflow: hidden; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; }
.card .photo .chip { position: absolute; left: 10px; top: 10px; }
.card .photo .chip.count { position: absolute; left: auto; right: 10px; top: 10px; background: rgba(30, 18, 10, .62); color: #fff; }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; position: relative; }
.placeholder .letter { font-family: var(--serif); font-size: 76px; line-height: 1; opacity: .9; }
.placeholder svg { position: absolute; right: 12px; bottom: 10px; width: 40px; height: 40px; opacity: .45; }
.card .body { padding: 14px 16px 16px; display: grid; gap: 7px; flex: 1; }
.card .title { font-family: var(--serif); font-size: 21px; line-height: 1.15; margin: 0; }
.card .where { font-size: 13.5px; color: var(--ink-soft); }
.card .row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.card .foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-soft); margin-top: auto; padding-top: 6px; }
.empty {
  border: 2px dashed var(--line); border-radius: var(--radius-lg); padding: 40px 24px; text-align: center; color: var(--ink-soft);
}
.empty strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ink); margin-bottom: 4px; }

/* ---------- map gallery ---------- */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.map-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; }
.gallery-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gallery-bar .scroll-chips { flex: 1; min-width: 0; }
.arrow {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: 18px; display: grid; place-items: center;
}
.arrow:hover { background: var(--surface-2); }
.city-tab { border: none; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; opacity: .62; }
.city-tab[aria-selected="true"] { opacity: 1; box-shadow: inset 0 0 0 2px currentColor; }
#map, .map-el { height: 470px; border-radius: 18px; overflow: hidden; z-index: 0; }
.leaflet-tile-pane { filter: sepia(.35) saturate(.7) brightness(1.04); }
@media (prefers-color-scheme: dark) { .leaflet-tile-pane { filter: sepia(.25) brightness(.82) saturate(.85); } }
.leaflet-container { font-family: var(--sans); background: var(--surface-2); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; }
.bt-pin { background: none; border: none; }
.bt-pin-body {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: var(--pin); border: 2.5px solid #fff; box-shadow: 0 4px 10px rgba(40, 20, 10, .35);
  display: grid; place-items: center;
}
.bt-pin-body span { transform: rotate(45deg); color: var(--pin-ink); font-weight: 800; font-size: 13px; }
.pop-title { font-family: var(--serif); font-size: 17px; margin: 0 0 2px; }
.pop-btn { margin-top: 8px; }
.map-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.map-side .big { font-family: var(--serif); font-size: 44px; line-height: 1; }
.map-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; overflow: auto; max-height: 330px; }
.map-list button { width: 100%; text-align: left; border: none; background: var(--surface-2); border-radius: 12px; padding: 9px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.map-list button:hover { background: var(--line); }
.map-note { font-size: 13px; color: var(--ink-soft); margin: 0; }

/* ---------- wishlist ---------- */
.next-pick {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: var(--espresso); color: #FFF3E6; border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 18px;
}
.next-pick h3 { color: #FFF3E6; }
.next-pick .result { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 34px); color: var(--strawberry); line-height: 1.1; }
.next-pick .btn { background: var(--strawberry); border-color: var(--strawberry); color: var(--strawberry-ink); }
.next-pick .muted { color: #D9C3B0; font-size: 14px; margin: 4px 0 0; }
.spin { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.85); opacity: .3; } to { transform: scale(1); opacity: 1; } }
.wish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.wish {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px 20px; position: relative; display: grid; gap: 6px; overflow: hidden;
}
.wish::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--wcolor, var(--line)); }
.wish.picked { box-shadow: 0 0 0 3px var(--strawberry); }
.wish .notes { font-size: 14px; color: var(--ink-soft); margin: 0; }
.wish a { font-weight: 700; font-size: 14px; color: var(--mocha); }

/* ---------- badges ---------- */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.badge { text-align: center; display: grid; justify-items: center; gap: 6px; padding: 16px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stamp {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 30px;
  border: 3px dashed var(--line); color: var(--ink-soft);
}
.badge.done .stamp { border: 3px solid currentColor; box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 6px currentColor; transform: rotate(-8deg); }
.badge .bname { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.badge .bdesc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; }
.progress { width: 80%; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--mocha); border-radius: 99px; }

/* ---------- wrapped ---------- */
.wrapped { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); gap: 12px; }
.wtile { border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.wtile .k { font-size: 14px; font-weight: 700; }
.wtile .v { font-family: var(--serif); font-size: 40px; line-height: 1; overflow-wrap: anywhere; }
.wtile .v.small { font-size: 24px; line-height: 1.15; }
.wtile.span2 { grid-column: span 2; }
.wtile.span3 { grid-column: span 3; }
.wtile.span4 { grid-column: span 4; }
.wtile.tall { grid-row: span 2; }
.wtile.espresso { background: var(--espresso); color: #FFF3E6; }

/* ---------- dialogs ---------- */
dialog {
  border: none; padding: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
  width: min(820px, calc(100vw - 20px)); max-height: calc(100dvh - 20px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
}
dialog::backdrop { background: rgba(30, 16, 8, .5); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px dashed var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.dlg-head h2 { font-size: 28px; }
.x-btn { border: none; background: var(--surface-2); width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; flex: none; }
.dlg-body { padding: 18px 22px 22px; overflow: auto; }
.photo-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: -4px 0 16px; padding-bottom: 4px; }
.photo-strip img { height: 260px; width: auto; max-width: none; border-radius: 16px; scroll-snap-align: start; object-fit: cover; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 12px; }
.detail-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.visit { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 12px; }
.visit-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.orders { list-style: none; margin: 10px 0 0; padding: 0; }
.orders li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dotted var(--line); font-size: 15px; }
.orders li:last-child { border-bottom: none; }
.orders .price { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.verdict { font-family: var(--serif); font-size: 17px; line-height: 1.55; margin: 10px 0 0; }
.spark { display: block; margin-top: 6px; }

/* ---------- footer ---------- */
footer { text-align: center; color: var(--ink-soft); font-size: 13.5px; padding: 30px 20px 50px; }
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1000;
}
.toast.show { opacity: 1; }
.loading { color: var(--ink-soft); padding: 30px 0; }

/* ---------- admin ---------- */
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 26px 0 18px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.list { display: grid; gap: 10px; }
.list-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.list-row .thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.list-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > .lbl { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--ink-soft); }
.field .input { width: 100%; border-radius: var(--radius-sm); }
.form-section { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 4px; }
.form-section h3 { font-size: 20px; }
.star-pick { display: inline-flex; gap: 2px; }
.star-pick button { border: none; background: none; font-size: 26px; line-height: 1; color: var(--line); cursor: pointer; padding: 0 2px; }
.star-pick button.on { color: var(--star); }
.star-pick.sm button { font-size: 18px; }
.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.visit-edit { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; margin-bottom: 12px; background: var(--bg); }
.visit-edit .top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.order-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.order-row .input { border-radius: 10px; padding: 8px 11px; }
.rm { border: none; background: none; color: var(--ink-soft); font-size: 20px; cursor: pointer; line-height: 1; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb-edit { width: 104px; position: relative; }
.thumb-edit img { width: 104px; height: 104px; object-fit: cover; border-radius: 12px; }
.thumb-edit .cover { position: absolute; left: 6px; top: 6px; }
.thumb-edit .tools { display: flex; justify-content: space-between; margin-top: 4px; }
.thumb-edit .tools button { border: none; background: none; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--mocha); padding: 2px; }
.upload { width: 104px; height: 104px; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; padding: 8px; }
.upload:hover { border-color: var(--ink-soft); }
.pick-map { height: 300px; border-radius: 14px; overflow: hidden; }
.search-results { display: grid; gap: 4px; margin-top: 6px; }
.search-results button { text-align: left; border: none; background: var(--surface-2); border-radius: 10px; padding: 8px 11px; font-size: 13.5px; cursor: pointer; }
.dlg-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 22px 18px; border-top: 1px dashed var(--line); position: sticky; bottom: 0; background: var(--surface); z-index: 2; }
.notice { background: var(--butter); color: var(--butter-ink); border-radius: var(--radius); padding: 14px 18px; font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .tile.wide { grid-column: 1 / -1; }
  .map-wrap { grid-template-columns: minmax(0, 1fr); }
  .map-list { max-height: none; }
  .wrapped { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wtile.span2, .wtile.span3, .wtile.span4 { grid-column: 1 / -1; }
  .wtile.tall { grid-row: auto; }
}
@media (max-width: 640px) {
  .sign { padding: 42px 16px 6px; }
  main { padding: 6px 16px 56px; }
  .tile .big { font-size: 38px; }
  #map, .map-el { height: 360px; }
  .form { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: minmax(0, 1fr) 84px; }
  .list-row { grid-template-columns: 52px minmax(0, 1fr); }
  .list-row .thumb { width: 52px; height: 52px; }
  .list-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .photo-strip img { height: 200px; }
}
