/* Compact layouts share the existing NearDish palette and components. */
@media (max-width:700px) {
  :root { --gutter:16px; }
  body > header { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
  body.discovery-page header,body.account-page header,body.reservations-page header,
  body.restaurant-page header,body.admin-page header { padding:10px 16px; gap:8px; }
  body > header .brand,body > header > .brand-word { margin-right:auto; flex:none; }
  body > header .brand { gap:0; }
  body > header #city { display:none; }
  body > header .brand-word { font-size:23px; }
  body[class] > header .language,header.admin-header .language { order:0; margin-left:0; }
  body[class] > header #locale { min-height:44px; padding:8px; }
  body > header .theme-toggle { order:0; width:44px; height:44px; min-height:44px; }
  body > header .account-nav.account-nav-guest,header.admin-header .account-nav.profile { order:0; width:auto; margin:0; }
  .account-nav-guest a { width:44px; min-height:44px; justify-content:center; border:1px solid var(--line); border-radius:50%; }
  .account-entry-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  body > header .primary-nav:not(:has(a:not([hidden]))) { display:none; }
  body > header .primary-nav { order:3; margin:0; gap:8px; justify-content:flex-end; }
  header.admin-header .primary-nav { display:flex; flex-wrap:nowrap; overflow-x:auto; justify-content:flex-start; width:100%; padding:4px 0; }
  header.admin-header .primary-nav a { flex:none; min-height:44px; display:inline-flex; align-items:center; padding:8px 12px; font-size:14px; }
  body > header .account-nav:not(.account-nav-guest):not(.profile) { width:100%; order:4; flex-wrap:nowrap; overflow-x:auto; gap:14px; margin:0; }
  body > header .account-nav:not(.account-nav-guest):not(.profile) > * { flex:none; }
  body.discovery-page .discovery-intro { padding:16px 16px 10px; }
  body.discovery-page #discovery-eyebrow { display:none; }
  body.discovery-page h1 { font-size:27px; line-height:1.15; }
  body.discovery-page #discovery-subtitle { margin:6px 0 0; font-size:13px; line-height:1.45; }
  body.discovery-page .search-bar { width:calc(100% - 32px); grid-template-columns:minmax(0,1fr) auto; gap:4px; padding:4px; margin:8px auto 0; border-radius:12px; box-shadow:none; }
  body.discovery-page .search-bar input { grid-column:auto; min-height:44px; padding:10px; font-size:16px; }
  body.discovery-page .search-bar button { min-height:44px; padding:10px 14px; }
  body.discovery-page #submit-search,.restaurant-booking-bar .booking-jump,.workspace-savebar button[type=submit],.login-form button[type=submit] { background:var(--accent); color:var(--page); }
  body.discovery-page .quick-chips { width:calc(100% - 32px); margin:10px auto 0; padding-bottom:6px; }
  .quick-chip { min-height:44px; padding:9px 14px; font-size:13px; }
  .quick-chips,.admin-sidebar nav,header.admin-header .primary-nav,.import-steps,.imports-toolbar > .imports-tabs { scrollbar-width:none; }
  .quick-chips::-webkit-scrollbar,.admin-sidebar nav::-webkit-scrollbar,header.admin-header .primary-nav::-webkit-scrollbar,.import-steps::-webkit-scrollbar,.imports-toolbar > .imports-tabs::-webkit-scrollbar { display:none; }
  .active-filters,body.discovery-page .discovery-toolbar,body.discovery-page .discovery-workspace { width:calc(100% - 32px); }
  .active-filters { min-height:0; padding-top:6px; gap:6px; }
  .filter-chip { min-height:36px; padding:7px 11px; font-size:12px; }
  body.discovery-page .discovery-toolbar { margin:8px auto 0; }
  body.discovery-page .view-switch { width:100%; padding:3px; }
  body.discovery-page .view-switch button { flex:1; min-height:44px; }
  body.discovery-page .discovery-workspace { margin-top:12px; }
  body.discovery-page #status { margin:0 0 12px; }
  body.discovery-page .result-row { padding-bottom:16px; margin-bottom:16px; }
  body.discovery-page .result { grid-template-columns:96px minmax(0,1fr); }
  body.discovery-page .result-photo { width:96px; height:112px; border-radius:10px; }
  body.discovery-page .result-text { padding:0 0 0 12px; gap:6px; }
  body.discovery-page .result-text strong { font-size:18px; padding-right:0; line-height:1.25; }
  body.discovery-page .result-text .result-cuisine { font-size:10px; line-height:1.4; }
  body.discovery-page .result-text .result-dishes { font-size:12px; line-height:1.5; }
  body.discovery-page .result-text .result-match { display:block; font-size:12px; line-height:1.4; }
  body.discovery-page .favorite-toggle { left:52px; top:4px; width:44px; height:44px; min-height:44px; }
  body.discovery-page .result-no-photo { grid-template-columns:minmax(0,1fr); min-height:104px; }
  body.discovery-page .result-no-photo .photo-placeholder { display:none; }
  body.discovery-page .result-no-photo .result-text { padding:0 52px 0 0; }
  body.discovery-page .result-row:has(.result-no-photo) .favorite-toggle { left:auto; right:0; top:0; }
  .filter-drawer,body.discovery-page #filter-panel.filter-drawer { width:100%; padding:18px 16px 0; gap:16px; }
  .filters-done { margin:auto -16px 0; padding:16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .drawer-close { width:44px; height:44px; min-height:44px; }
  body.restaurant-page main { padding-top:16px; padding-bottom:104px; }
  .restaurant-back { margin-bottom:16px; min-height:32px; align-items:center; }
  .restaurant-head { margin-bottom:16px; }
  .restaurant-head .profile-name { font-size:32px; line-height:1.12; }
  .profile-section { padding:18px 0; }
  .profile-section-empty { display:none; }
  .profile-section h3 { margin-bottom:10px; }
  .restaurant-layout { margin-top:0; gap:16px; }
  #restaurant-aside .booking-section { padding:16px; box-shadow:none; scroll-margin-top:16px; }
  #restaurant-aside .booking-section:focus-within { scroll-margin-bottom:96px; }
  .booking-form { gap:12px; }
  .booking-form input { font-size:16px; width:100%; }
  .booking-form label:has(input[name=guestName]),.booking-form label:has(input[name=guestPhone]) { grid-column:1/-1; }
  .restaurant-booking-bar { display:block; position:fixed; z-index:30; bottom:0; left:0; right:0; padding:10px 16px calc(10px + env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--line); }
  .restaurant-booking-bar .booking-jump { width:100%; min-height:48px; margin:0; }
  .restaurant-booking-bar[hidden] { display:none; }
  .admin-shell { gap:16px; padding-top:16px; }
  .admin-sidebar h1 { font-size:24px; margin:8px 0 12px; }
  .admin-sidebar nav { display:flex; gap:6px; overflow-x:auto; padding-bottom:6px; }
  .admin-sidebar nav a { flex:none; min-height:44px; display:flex; align-items:center; padding:10px 14px; border:1px solid var(--line); border-radius:100px; }
  .admin-sidebar nav a[aria-current] { color:var(--page); }
  .admin-guest-links { gap:16px; margin-top:4px; padding-top:4px; }
  .admin-context { padding:14px; border-radius:12px; background:var(--surface); }
  .admin-content > #admin-intro,.admin-context > #admin-branch-hint { display:none; }
  .admin-context select { font-size:16px; color:var(--ink); }
  .admin-content h2 { font-size:23px; }
  .workspace-form { gap:12px; padding-bottom:16px; }
  .workspace-form fieldset { padding:12px; margin:12px 0; border-radius:12px; background:var(--surface); }
  .workspace-form input,.workspace-form textarea { font-size:16px; color:var(--ink); background:var(--surface); }
  .workspace-savebar { position:sticky; z-index:10; bottom:0; display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0 calc(-1 * var(--gutter)); padding:10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--surface); }
  .workspace-savebar > p { grid-column:1/-1; font-size:12px; line-height:1.4; }
  .workspace-savebar button[type=button] { background:var(--soft); color:var(--accent); }
  .account-shell { margin:16px auto; padding-bottom:24px; }
  .account-shell > h1 { font-size:28px; margin:10px 0; }
  .account-shell > p { font-size:14px; }
  .login-form { padding:18px; gap:14px; border-radius:12px; }
  .login-form input { padding:12px; font-size:16px; }
  .platform-restaurant { gap:12px; padding:16px; border-radius:12px; }
  .platform-restaurant > div { flex-basis:100%; }
  .platform-restaurant > a { display:inline-flex; align-items:center; min-height:44px; margin-right:auto; }
  .platform-restaurant > button { min-height:44px; }
  .directory-row { gap:12px; }
  #platform-directories details { padding:14px; }
  #platform-directories form > button { position:sticky; bottom:calc(10px + env(safe-area-inset-bottom)); width:100%; }
  .imports-shell { margin:16px auto; }
  .imports-shell > h1 { font-size:28px; }
  .imports-shell > p { font-size:14px; line-height:1.5; }
  .import-steps { flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; }
  .import-step { flex:none; }
  .imports-toolbar { gap:10px; }
  .imports-toolbar > .imports-tabs { flex-basis:100%; flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; }
  .imports-tab { flex:none; min-height:44px; font-size:13px; padding:8px 12px; }
  .imports-search { flex:1 1 160px; }
  .imports-search input { padding:12px; font-size:16px; }
  .imports-detail { padding:16px; scroll-margin-top:12px; }
  .imports-detail-back { display:inline-flex; align-items:center; min-height:44px; margin-bottom:12px; background:var(--soft); color:var(--accent); }
  .import-actions > button { flex:1 1 140px; min-height:44px; }
  .import-field input[type=text],.import-field input[type=tel],.import-field input[type=number],.import-section input[type=text],.import-section input[type=number] { font-size:16px; }
  .import-link { min-height:44px; }
  .collect-bar #collect-status { flex-basis:100%; font-size:13px; }
  .site-footer { padding:18px 16px; font-size:12px; }
  body.discovery-map-mode { overflow:hidden; }
  body.discovery-map-mode > header { position:fixed; z-index:35; inset:0 0 auto; }
  body.discovery-map-mode .discovery-intro,body.discovery-map-mode .favorites-intro,
  body.discovery-map-mode .active-filters,body.discovery-map-mode .discovery-toolbar,
  body.discovery-map-mode .site-footer { display:none; }
  body.discovery-map-mode .search-bar { position:fixed; z-index:35; top:calc(var(--map-header-height,76px) + 12px); left:12px; right:68px; width:auto; margin:0; background:var(--surface); }
  body.discovery-map-mode .search-bar input { padding-inline:8px; }
  body.discovery-map-mode .search-bar #submit-search { padding-inline:10px; }
  body.discovery-map-mode .quick-chips { position:fixed; z-index:35; top:calc(var(--map-header-height,76px) + 12px); right:12px; width:48px; margin:0; padding:0; overflow:visible; }
  body.discovery-map-mode .quick-chips > :not(#filters) { display:none; }
  body.discovery-map-mode #filters { width:48px; height:54px; padding:0; justify-content:center; border-radius:12px; background:var(--surface); }
  body.discovery-map-mode #filters-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  body.discovery-map-mode #filters-count { position:absolute; top:-5px; right:-4px; }
  body.discovery-map-mode .discovery-workspace { position:fixed; inset:var(--map-header-height,76px) 0 0; width:100%; margin:0; }
  body.discovery-map-mode .discovery-workspace[data-view=map] .map-shell { position:absolute; inset:0; width:100%; height:100%; min-height:0; border:0; border-radius:0; }
  body.discovery-map-mode .map-overlays { position:absolute; inset:0; display:block; max-height:none; pointer-events:none; }
  body.discovery-map-mode .discovery-workspace[data-view=map] #discovery-panel { display:contents; }
  body.discovery-map-mode #sheet-toggle,body.discovery-map-mode #catalog-tabs,
  body.discovery-map-mode #results,body.discovery-map-mode #favorites-note { display:none!important; }
  body.discovery-map-mode #locate { display:block; position:absolute; top:178px; right:12px; width:44px; height:44px; min-height:44px; padding:0; font-size:0; border:1px solid var(--line); border-radius:50%; background:var(--surface); pointer-events:auto; }
  body.discovery-map-mode #locate::after { content:'⌖'; font-size:29px; line-height:1; }
  body.discovery-map-mode #status,body.discovery-map-mode #location-status,body.discovery-map-mode #save-status { position:absolute; left:12px; right:68px; top:76px; margin:0; padding:8px 12px; border-radius:10px; background:var(--surface); font-size:12px; }
  body.discovery-map-mode #location-status { top:112px; }
  body.discovery-map-mode #save-status { top:148px; }
  body.discovery-map-mode #status:empty,body.discovery-map-mode #location-status:empty,body.discovery-map-mode #save-status:empty { display:none; }
  body.discovery-map-mode #status[data-state=ready],body.discovery-map-mode #location-status[data-state=manual],body.discovery-map-mode #location-status[data-state=selected] { display:none; }
  body.discovery-map-mode #map-preview { position:absolute; left:12px; right:12px; bottom:calc(80px + env(safe-area-inset-bottom)); width:auto; border:1px solid var(--line); border-radius:16px; display:block; background:var(--surface); pointer-events:auto; }
  body.discovery-map-mode #map-preview > .result-photo { display:none; }
  body.discovery-map-mode #map-preview .preview-text { padding:16px; }
  body.discovery-map-mode #map-preview .preview-text strong { font-size:20px; line-height:1.25; padding-right:76px; }
  body.discovery-map-mode #map-preview .preview-text p { margin:8px 0 12px; font-size:12px; line-height:1.5; padding-right:0; }
  body.discovery-map-mode #map-preview .preview-text button:not(.preview-save) { width:100%; min-height:44px; background:var(--accent); color:var(--page); border-radius:10px; }
  body.discovery-map-mode #map-preview .preview-save { right:44px; width:40px; min-height:44px; padding:0; }
  body.discovery-map-mode .map-list-return { position:absolute; z-index:3; left:50%; transform:translateX(-50%); bottom:calc(18px + env(safe-area-inset-bottom)); display:block; min-height:46px; padding:11px 22px; border:1px solid var(--line); border-radius:100px; background:var(--surface); color:var(--ink); box-shadow:0 3px 15px #0002; }
  body.discovery-map-mode .maplibregl-ctrl-top-right { top:76px; right:2px; }
  body.discovery-map-mode:has(.maplibregl-compact-show) .map-list-return { bottom:calc(58px + env(safe-area-inset-bottom)); }
  body.discovery-map-mode:has(.maplibregl-compact-show) #map-preview { bottom:calc(120px + env(safe-area-inset-bottom)); }
  body.discovery-map-mode .map-note { inset:45% 18px auto; z-index:1; }
}
@media(min-width:1100px) {
  body.discovery-page [data-view=map] #results { display:grid; }
}
@media (min-width:701px) {
  .imports-detail-back { display:none; }
}
