body.app-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.lunch { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.field { display: flex; align-items: center; gap: 6px; }
.field.grow { flex: 1 1 280px; }
.field .lbl { color: var(--muted); font-size: 13px; }
.toolbar input[type=search], .field select {
  height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 0 12px; outline: none; }
.toolbar input[type=search] { width: 100%; }
.toolbar input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.sm select { height: 32px; padding: 0 8px; font-size: 14px; }
.btn { height: 38px; border-radius: 8px; padding: 0 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .6; cursor: progress; }

.body { flex: 1; display: grid; grid-template-columns: minmax(340px, 440px) 1fr; min-height: 0; }
.list-pane { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.map-pane { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--surface-2); }

.status { padding: 12px 20px 10px; border-bottom: 1px solid var(--line); }
.status-text { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.status-text b { color: var(--text); font-weight: 600; }
.bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.status.done .bar { display: none; }
.controls { display: flex; gap: 12px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 14px; }
.grow-l { margin-right: auto; }

.results { overflow-y: auto; flex: 1; padding: 12px 12px 24px; }
.empty { padding: 24px 12px; color: var(--muted); }
.empty h1 { color: var(--text); font-size: 22px; letter-spacing: -.01em; margin: 0 0 8px; }
.empty .show-all { margin-top: 10px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--shadow); cursor: pointer; transition: border-color .15s; }
.card:hover, .card.hl { border-color: var(--accent); }
.card.hl { box-shadow: 0 0 0 3px var(--accent-soft); }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.meta span + span::before { content: "·"; margin: 0 6px; }
.items { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; }
.items li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px dashed var(--line); }
.items li:first-child { border-top: 0; }
.items li .p { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px;
  border-radius: 4px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: 2px; }
.tag.muted { background: var(--surface-2); color: var(--muted); }
.links { margin-top: 10px; font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.note { color: var(--muted); font-size: 13px; margin-top: 6px; }
.note.pending::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-right: 6px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.leaflet-popup-content { font: 13px/1.45 var(--font); margin: 10px 14px; }
.leaflet-popup-content b { font-size: 14px; }
.popup-items { margin: 6px 0 0; padding-left: 16px; }
@media (prefers-color-scheme: dark) {
  .leaflet-tile-pane { filter: brightness(.75) contrast(1.1) saturate(.8); }
  .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); }
  .leaflet-control-attribution { background: rgba(30,30,28,.8) !important; color: var(--muted); }
}

@media (max-width: 800px) {
  body.app-page { height: auto; overflow: visible; }
  .toolbar { padding: 10px 16px; }
  .toolbar .btn.ghost span { display: none; }
  .body { grid-template-columns: 1fr; grid-template-rows: 42vh auto; }
  .map-pane { order: -1; position: sticky; top: 0; z-index: 1; border-bottom: 1px solid var(--line); }
  .list-pane { border-right: 0; }
  .results { overflow: visible; }
  .status, .controls { padding-left: 16px; padding-right: 16px; }
}

#radius { width: 92px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 0 10px; outline: none; }
#radius:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seg { display: inline-flex; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.wday { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 10px; }
.wday.is-today { color: var(--accent); }
.wday + .items { margin-top: 2px; }
