/* Dagenslunch.net – layout och komponenter.
   Färger och ytor kommer från variablerna nedan (standardvärden = temat "Klassisk").
   Publika teman i /assets/themes/*.css laddas efter den här filen och skriver över variablerna –
   se app/src/Theme.php. Hårdkoda inga färger för publika sidor här; lägg till en variabel i stället. */
:root {
  --on-accent: #FFFFFF;
  --page-bg: var(--paper);
  --header-bg: rgba(251, 246, 238, .92);
  --toolbar-bg: rgba(251, 246, 238, .96);
  --hero-bg: radial-gradient(circle at 92% 8%, rgba(242, 179, 61, .28), transparent 34%), radial-gradient(circle at 4% 100%, rgba(226, 73, 47, .10), transparent 40%);
  --cta-glow: radial-gradient(circle at 90% 20%, rgba(242, 179, 61, .5), transparent 40%);
  --focus-ring: rgba(226, 73, 47, .15);
  --accent-tint: #FFF7F3;
  /* Scrollbar i kort: tunn, neutral, följer temats textfärg */
  --scroll-thumb: color-mix(in srgb, var(--ink) 20%, transparent);
  --scroll-thumb-hover: color-mix(in srgb, var(--ink) 40%, transparent);
  --paper: #FBF6EE;
  --paper-2: #F4ECDF;
  --card: #FFFFFF;
  --ink: #1C2A22;
  --ink-2: #4A5A50;
  --muted: #7B857D;
  --line: #E7DCCB;
  --tomato: #E2492F;
  --tomato-dark: #C23A22;
  --mustard: #F2B33D;
  --forest: #1F4D36;
  --meat: #B23A48;
  --fish: #2F6FA8;
  --veg: #2F8A4F;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28, 42, 34, .06), 0 6px 22px rgba(28, 42, 34, .07);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page-bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; }
a { color: var(--tomato-dark); text-underline-offset: 2px; }
a:hover { color: var(--tomato); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.section { padding: 28px 20px 36px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.danger { color: var(--meat); }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

/* ---------- Knappar & fält ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font: 600 15px/1 var(--sans); cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--tomato); color: var(--on-accent); box-shadow: 0 2px 0 var(--tomato-dark); }
.btn-primary:hover { background: var(--tomato-dark); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); color: var(--ink); }
.btn-light { background: #fff; color: var(--forest); }
.btn-light:hover { background: var(--paper); color: var(--forest); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--tomato-dark); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: 16px var(--sans); color: var(--ink); }
.input:focus { outline: none; border-color: var(--tomato); box-shadow: 0 0 0 3px var(--focus-ring); }
.input-sm { padding: 6px 10px; font-size: 13px; width: auto; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.field span { color: var(--ink-2); }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -5000px; }
.form-error { color: var(--meat); font-size: .9rem; margin-top: 10px; }
.form-errors { background: #FDECEA; border: 1px solid #F5C2BA; color: #8A2317; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.form-errors p { margin: 0; }
.success { background: #EAF6EE; border: 1px solid #BFE3CB; border-radius: var(--radius); padding: 22px 24px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; -webkit-backdrop-filter: saturate(1.2) blur(6px); backdrop-filter: saturate(1.2) blur(6px); background: var(--header-bg); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font: 700 1.3rem/1 var(--serif); letter-spacing: -.01em; color: var(--ink); }
.brand-name b { color: var(--tomato); font-weight: 800; }
.brand-name span { color: var(--muted); font-weight: 500; font-size: .85em; }
.main-nav { display: flex; gap: 20px; margin-left: auto; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: var(--tomato); }
.loc-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 600 14px var(--sans); cursor: pointer; max-width: 190px; }
.loc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-chip svg { color: var(--tomato); flex: none; }
.loc-chip:hover { border-color: var(--tomato); }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 0; margin: 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--tomato); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: 54px 0 40px; background: var(--hero-bg); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.eyebrow { font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tomato-dark); margin-bottom: 12px; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.hero h1 { position: relative; isolation: isolate; }
.hero h1 em { font-style: italic; color: var(--tomato); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: .04em; height: .18em; background: var(--mustard); opacity: .55; z-index: -1; border-radius: 4px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 40em; }
.searchbar { display: flex; gap: 8px; background: #fff; padding: 7px; border-radius: 999px; box-shadow: var(--shadow); border: 1.5px solid var(--line); max-width: 560px; margin: 22px 0 14px; }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 16px; font: 17px var(--sans); color: var(--ink); }
.searchbar input:focus { outline: none; }
.searchbar:focus-within { border-color: var(--tomato); }
.hero-loc { color: var(--ink-2); min-height: 1.6em; }

.ticket { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); position: relative; transform: rotate(1.6deg); padding: 0 0 6px; overflow: hidden;
  -webkit-mask: radial-gradient(circle 9px at 0 64px, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 64px, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 9px at 0 64px, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 64px, transparent 98%, #000) right / 51% 100% no-repeat; }
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 24px; height: 64px; border-bottom: 2px dashed var(--line); }
.ticket-head span { font: 800 1.5rem var(--serif); color: var(--tomato); }
.ticket-head b { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ticket ul { list-style: none; margin: 0; padding: 6px 24px; }
.ticket li { border-bottom: 1px dotted var(--line); }
.ticket li:last-child { border-bottom: 0; }
.ticket li a { display: block; padding: 12px 0; text-decoration: none; color: var(--ink); }
.ticket li strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.ticket li small { color: var(--muted); }
.ticket li a:hover strong { color: var(--tomato); }
.ticket-foot { text-align: center; font: italic 500 .95rem var(--serif); color: var(--muted); padding: 6px 0 14px; }

/* ---------- Sidhuvud för undersidor ---------- */
.page-head { padding: 26px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.page-head .searchbar { margin-top: 10px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.more { font-weight: 600; text-decoration: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.chip small { color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--tomato); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active small { color: rgba(255,255,255,.7); }

/* ---------- Dagväljare & filter ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; position: sticky; top: 66px; z-index: 20; background: var(--toolbar-bg); padding: 12px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px; max-width: 100%; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); line-height: 1.15; }
.day-label { font-weight: 700; font-size: .92rem; }
.day-date { font-size: .74rem; color: var(--muted); text-transform: capitalize; }
.day:hover { border-color: var(--tomato); color: var(--ink); }
.day.is-empty { opacity: .55; }
.day.is-active { background: var(--tomato); border-color: var(--tomato); color: var(--on-accent); opacity: 1; box-shadow: 0 2px 0 var(--tomato-dark); }
.day.is-active .day-date { color: rgba(255,255,255,.85); }
.filters { display: flex; gap: 6px; }
.filters.standalone { margin: 4px 0 14px; }
.filter { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--muted); font: 600 14px var(--sans); cursor: pointer; text-decoration: line-through; }
.filter i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.filter.is-on { color: var(--ink); text-decoration: none; }
.filter-meat.is-on { border-color: rgba(178, 58, 72, .45); } .filter-meat.is-on i { background: var(--meat); }
.filter-fish.is-on { border-color: rgba(47, 111, 168, .45); } .filter-fish.is-on i { background: var(--fish); }
.filter-veg.is-on { border-color: rgba(47, 138, 79, .45); } .filter-veg.is-on i { background: var(--veg); }

.notice { background: #FFF6E0; border: 1px solid #F4DDA4; color: #6B4F0E; border-radius: 12px; padding: 10px 14px; font-size: .95rem; }

/* ---------- Kort ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 18px; transition: opacity .2s; }
.cards > * { min-width: 0; } /* annars kan ett långt restaurangnamn på en rad göra kortet bredare än skärmen */
.cards.is-loading { opacity: .45; pointer-events: none; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px 12px; display: flex; flex-direction: column; }
.card-head { min-width: 0; }
/* Restaurangnamnet tar max en rad – längre namn kapas med … (hela namnet finns i title) */
.card-head h3 { margin: 0 0 2px; font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-head h3 a { color: var(--ink); text-decoration: none; }
.card-head h3 a:hover { color: var(--tomato); }
.card-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .85rem; margin: 0 0 8px; }
.card-meta b { color: var(--forest); font-weight: 700; white-space: nowrap; }
.card-foot { font-size: .8rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: auto; }
.dishes { list-style: none; margin: 0; padding: 0; }
/* Restaurangkort i ortens lunchlista: högst ca 450 px, rätterna scrollar inuti kortet */
.cards .card { max-height: 450px; }
.cards .card .dishes { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; margin-right: -10px; padding-right: 10px; }

/* Tunn, modern scrollbar i kort och rutor som scrollar inuti (overflow: auto) – syns bara när innehållet scrollar */
.cards .card .dishes, .modal-card, .sub-content, .admin-modal, .admin-modal-wide {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
.cards .card .dishes:hover, .modal-card:hover, .sub-content:hover, .admin-modal:hover { scrollbar-color: var(--scroll-thumb-hover) transparent; }
.cards .card .dishes::-webkit-scrollbar, .modal-card::-webkit-scrollbar, .sub-content::-webkit-scrollbar, .admin-modal::-webkit-scrollbar { width: 6px; height: 6px; }
.cards .card .dishes::-webkit-scrollbar-track, .modal-card::-webkit-scrollbar-track, .sub-content::-webkit-scrollbar-track, .admin-modal::-webkit-scrollbar-track { background: transparent; }
.cards .card .dishes::-webkit-scrollbar-thumb, .modal-card::-webkit-scrollbar-thumb, .sub-content::-webkit-scrollbar-thumb, .admin-modal::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; }
.cards .card .dishes::-webkit-scrollbar-thumb:hover, .modal-card::-webkit-scrollbar-thumb:hover, .sub-content::-webkit-scrollbar-thumb:hover, .admin-modal::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
.dish { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start; padding: 10px 0; border-top: 1px dashed var(--line); }
.dish:first-child { border-top: 0; }
.cat { margin-top: 2px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; min-width: 44px; text-align: center; background: var(--paper-2); color: var(--muted); }
.cat:empty { background: transparent; min-width: 44px; }
.cat:empty::before { content: "•"; color: var(--line); font-size: 1rem; line-height: 1; }
.cat-meat .cat { background: rgba(178, 58, 72, .1); color: var(--meat); }
.cat-fish .cat { background: rgba(47, 111, 168, .1); color: var(--fish); }
.cat-veg .cat { background: rgba(47, 138, 79, .12); color: var(--veg); }
.dish-text strong { display: block; font-weight: 600; line-height: 1.35; }
.dish-text span { display: block; color: var(--ink-2); font-size: .9rem; line-height: 1.4; margin-top: 2px; }
.price { font-weight: 700; font-size: .9rem; color: var(--forest); white-space: nowrap; }
.empty { background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--ink-2); grid-column: 1 / -1; }
.subhead { grid-column: 1 / -1; font-size: 1rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 0; }
.nomenu { grid-column: 1 / -1; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nomenu li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; }
.nomenu a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nomenu small { color: var(--muted); }

/* ---------- Startsidan ---------- */
.locate-box { background: var(--forest); color: #fff; border-radius: var(--radius); padding: 24px 26px; display: grid; gap: 4px; }
.locate-box .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.locate-box .form-error { color: #FFD9D2; }
.city-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.city-grid a { display: flex; flex-direction: column; padding: 14px 16px; background: #fff; border-radius: 14px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.city-grid a:hover { border-color: var(--tomato); transform: translateY(-2px); }
.city-grid span { font: 700 1.1rem var(--serif); }
.city-grid small { color: var(--muted); }
.city-grid a:has(.count) { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
/* Platta med antal restauranger som har kommande lunch */
.count { display: inline-block; flex: none; min-width: 1.9em; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--tomato); color: #fff; font-weight: 700; font-size: .78rem; line-height: 1.6; text-align: center; vertical-align: 1px; }
.city-grid .count { min-width: 2em; margin-left: 0; padding: 2px 9px; font-size: .9rem; line-height: 1.5; }
.chip.is-active .count { background: #fff; color: var(--tomato); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { background: var(--paper-2); border-radius: var(--radius); padding: 22px; }
.steps b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mustard); font: 800 1rem var(--serif); margin-bottom: 10px; }
.steps p { color: var(--ink-2); margin: 0; }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--tomato); color: #fff; border-radius: var(--radius); padding: 30px 32px; background-image: var(--cta-glow); }
.cta h2 { margin: 0 0 4px; }
.cta p { margin: 0; opacity: .92; }

/* ---------- Ortsida ---------- */
.prose-block { color: var(--ink-2); }
.prose-block h2, .prose-block h3 { color: var(--ink); }
.link-columns { columns: 3 220px; padding: 0; list-style: none; margin: 0 0 20px; }
.link-columns li { padding: 3px 0; break-inside: avoid; }
.chips.plain { margin-bottom: 18px; }
.town-links .subhead small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.town-links .chip { font-size: .85rem; padding: 6px 12px; }
.veg-link { margin: 0 0 8px; }
.badge-weekly { display: inline-block; padding: 0 7px; border-radius: 999px; background: #EEF2FF; color: #3B4A8C; font-size: .72rem; font-weight: 600; }
.az { columns: 4 200px; gap: 28px; }
.az section { break-inside: avoid; margin-bottom: 18px; }
.az h2 { color: var(--tomato); font-size: 1.5rem; margin-bottom: 4px; }
.az ul { list-style: none; padding: 0; margin: 0; }
.az li { padding: 3px 0; }
.az small { color: var(--muted); }

/* ---------- Restaurangsida ---------- */
.rest-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 36px; align-items: start; }
.facts { margin: 6px 0 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 22px; }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.rest-body { display: grid; grid-template-columns: 1.3fr .9fr; gap: 36px; align-items: start; }
.menu-day { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 22px 8px; margin-bottom: 14px; }
.menu-day h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.menu-day h3 small { font: 500 .85rem var(--sans); color: var(--muted); }
.menu-day.is-today { background: var(--accent-tint); }
.map { height: 300px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--paper-2); margin-bottom: 22px; z-index: 0; }
.map-pin span { display: block; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: var(--tomato); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.side-title { font-size: 1.2rem; }
.near-list { list-style: none; padding: 0; margin: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.near-list a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px dashed var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.near-list li:last-child a { border-bottom: 0; }
.near-list small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.near-list a:hover span { color: var(--tomato); }

/* ---------- Textsidor ---------- */
.prose h2 { margin-top: 1.4em; }
.prose li { margin-bottom: 6px; }

/* ---------- Modal & samtycke ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(28, 42, 34, .45); }
.modal-card { position: relative; background: var(--paper); border-radius: 22px; padding: 28px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: 90vh; overflow: auto; }
.modal-close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 18px 0 10px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.place-results { list-style: none; padding: 0; margin: 10px 0 0; }
.place-results button { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 12px 4px; font: 600 1rem var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
.place-results button:hover { color: var(--tomato); }
.place-results small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 18px; padding: 18px 20px; display: flex; gap: 16px; align-items: center; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.consent p { margin: 0; font-size: .9rem; }
.consent a { color: var(--mustard); }
.consent-actions { display: flex; gap: 8px; flex: none; }
.consent .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: rgba(255,255,255,.82); margin-top: 40px; padding: 44px 0 0; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--mustard); }
.site-footer h2 { font: 700 .8rem var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--mustard); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand { font: 700 1.4rem var(--serif); color: #fff; }
.footer-brand b { color: var(--mustard); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 3px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding: 16px 20px 24px; font-size: .8rem; color: rgba(255,255,255,.6); }

/* ---------- Responsivt ---------- */
@media (max-width: 900px) {
  .hero-grid, .rest-grid, .rest-body { grid-template-columns: 1fr; gap: 28px; }
  .ticket { transform: none; max-width: 520px; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding: 22px 16px 28px; }
  .main-nav { display: none; }
  .loc-chip { margin-left: auto; max-width: 150px; }
  .brand-name { font-size: 1.12rem; }
  .brand-mark { width: 32px; height: 32px; }
  .hero { padding: 32px 0 24px; }
  .cards { grid-template-columns: 1fr; }
  .toolbar { top: 66px; }
  .filters { width: 100%; }
  .filter { flex: 1; justify-content: center; padding: 8px 6px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 24px; }
  .consent { flex-direction: column; align-items: stretch; left: 10px; right: 10px; bottom: 10px; padding: 14px; gap: 10px; border-radius: 14px; }
  .consent p { font-size: .8rem; line-height: 1.45; }
  .consent-actions { justify-content: stretch; flex-wrap: wrap; } .consent-actions .btn { flex: 1 1 120px; padding: 9px 10px; font-size: .85rem; white-space: normal; }
  .facts div { grid-template-columns: 100px 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .searchbar input { font-size: 16px; padding: 10px 12px; }
}

/* ---------- Admin ---------- */
body.admin { background: #F6F3EE; }
.admin-header { background: var(--forest); }
.admin-header .brand-name, .admin-header .brand-name span { color: #fff; }
.admin-header .brand-name b { color: var(--mustard); }
.admin-badge { background: var(--mustard); color: var(--ink); font: 700 .7rem var(--sans); text-transform: uppercase; letter-spacing: .1em; padding: 3px 8px; border-radius: 6px; }
.admin-nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.admin-nav a, .admin-nav .link { color: #fff; font-size: .9rem; }
.admin-nav form { margin: 0; }
.admin-main { padding-top: 24px; padding-bottom: 60px; }
.admin h1 { font-size: 2rem; }
.admin h2 { font-size: 1.2rem; margin-top: 1em; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--tomato); }
.tabs .tab-add { margin-left: auto; color: var(--tomato-dark); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpis div { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.kpis b { display: block; font: 800 2rem var(--serif); color: var(--forest); }
.kpis span { color: var(--muted); font-size: .85rem; }
.admin-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); font-size: .9rem; }
.tbl th { text-align: left; background: var(--paper-2); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); padding: 10px 12px; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr.is-done { opacity: .6; }
.tbl .actions { white-space: nowrap; text-align: right; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.status { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); }
.st-ok { background: #E3F4E8; color: #1E6B3A; }
.st-error { background: #FBE4E1; color: #9A2C1C; }
.st-nomenu, .st-unchanged { background: #FFF2D6; color: #7A5A0B; }
.st-new { background: #E2EEFA; color: #1F5A93; }
.st-cat-meat { background: rgba(178,58,72,.12); color: var(--meat); } .st-cat-fish { background: rgba(47,111,168,.12); color: var(--fish); } .st-cat-veg { background: rgba(47,138,79,.14); color: var(--veg); }
.cover { font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #FBE4E1; color: #9A2C1C; }
.cover-3 { background: #E3F4E8; color: #1E6B3A; } .cover-1, .cover-2 { background: #FFF2D6; color: #7A5A0B; }
.flash { background: #EAF6EE; border: 1px solid #BFE3CB; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.warn { background: #FFF6E0; border: 1px solid #F4DDA4; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.log { background: var(--ink); color: #DDE6DF; padding: 12px; border-radius: 10px; font-size: .75rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.plain-list { list-style: none; padding: 0; margin: 0 0 10px; }
.plain-list li { padding: 4px 0; }
.small-h { font-size: .95rem; margin: 12px 0 4px; font-family: var(--sans); }
.edit-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.edit-head h1 { margin: 0; }
.login-card { max-width: 420px; margin: 40px auto; background: #fff; padding: 30px; border-radius: 20px; box-shadow: var(--shadow); }
.magic { margin-top: 20px; font-size: .9rem; }
.magic summary { cursor: pointer; color: var(--ink-2); margin-bottom: 12px; }
.admin-cols > * { min-width: 0; }
.admin code { overflow-wrap: anywhere; }
.robot-form .check { align-items: flex-start; margin-bottom: 10px; line-height: 1.4; }
.robot-form .check input { margin-top: 3px; flex: none; }
.robot-form .btn { margin-top: 6px; }
.kpis b small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.check-detail { margin-top: 6px; }
.check-detail summary { cursor: pointer; color: var(--tomato-dark); font-size: .8rem; font-weight: 600; }
.check-detail p { margin: 6px 0; overflow-wrap: anywhere; }
.danger { color: #9A2C1C; }
@media (max-width: 900px) { .admin-cols { grid-template-columns: 1fr; } .tbl { display: block; overflow-x: auto; } }
@media (max-width: 640px) {
  .admin-header .header-inner { flex-wrap: wrap; gap: 8px; }
  .admin-nav { gap: 12px; }
  .admin h1 { font-size: 1.5rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs a { padding: 10px 12px; white-space: nowrap; }
  .tabs .tab-add { margin-left: 0; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpis div { padding: 12px; }
  .kpis b { font-size: 1.5rem; }
  .tbl td, .tbl th { padding: 8px; }
  /* Körningstabeller som staplade kort */
  .run-tbl { display: block; overflow: visible; }
  .run-tbl thead { display: none; }
  .run-tbl tbody, .run-tbl tr, .run-tbl td { display: block; }
  .run-tbl tr { border-top: 1px solid var(--line); padding: 8px 4px; }
  .run-tbl tr:first-child { border-top: 0; }
  .run-tbl td { border: 0; padding: 3px 8px; }
}

/* Kontroll av webbplats/menysida (tipsformulär + admin) */
.url-wrap { position: relative; }
.url-wrap .input { width: 100%; padding-right: 44px; }
.url-wrap .input.is-ok { border-color: #2f8f4e; }
.url-ok { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: #2f8f4e; font-size: 0; }
.url-ok::after { content: ''; position: absolute; left: 9px; top: 5px; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.url-ok[hidden] { display: none; }

/* Tipsformuläret: "Vi har inte veckans lunch på hemsidan" */
.help-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin: 6px 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.help-check:has(input:checked) { border-color: var(--tomato); background: var(--accent-tint); }
/* Banner när ett utseende förhandsvisas (?tema=slug) */
.theme-preview { background: var(--ink); color: #fff; font-size: .85rem; text-align: center; padding: 7px 16px; position: relative; z-index: 40; }
.theme-preview a { color: #fff; font-weight: 600; margin-left: 6px; }
.help-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--tomato); flex: none; }

/* Captcha på tipsformuläret */
.captcha { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; margin: 4px 0 16px; border: 1px solid var(--line, #ddd); border-radius: 12px; background: #fff; max-width: 360px; }
.captcha label { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.captcha input[type=checkbox] { width: 22px; height: 22px; accent-color: #2f8f4e; }
.captcha-status { font-size: .88rem; color: var(--muted); }
.captcha.is-ok { border-color: #2f8f4e; }
.captcha.is-ok .captcha-status { color: #2f8f4e; }
.captcha.is-error { border-color: var(--tomato); }
.captcha.is-error .captcha-status { color: var(--tomato); }

/* Admin: inställningar (kugghjulet) */
.gear-link { display: inline-flex; align-items: center; padding: 4px; border-radius: 8px; }
.gear-link:hover { background: rgba(255,255,255,.15); }
/* Admin → Utseende */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 12px; }
.theme-card { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.theme-card.is-active { border-color: #2f8f4e; }
.theme-card h3 { font-size: 1.05rem; margin: 4px 0 0; }
.theme-card p { margin: 0; flex: 1; }
.theme-card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.theme-swatches { display: flex; gap: 4px; }
.theme-swatches span { flex: 1; height: 34px; border-radius: 8px; border: 1px solid rgba(0,0,0,.06); }
.gear-icon { vertical-align: -3px; }
.settings-head { margin: 0 0 10px; }
.settings-head h1 { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.admin-modal { position: fixed; inset: 0; margin: auto; height: -webkit-fit-content; height: fit-content; max-height: calc(100vh - 32px); overflow: auto; width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.admin-modal::backdrop { background: rgba(20, 30, 25, .45); }
.admin-modal form { padding: 20px 22px 18px; margin: 0; }
.admin-modal .modal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.admin-modal .modal-top h2 { margin: 0; font-size: 1.25rem; }
.admin-modal .modal-x { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 4px 8px; }
.admin-modal .check { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.admin-modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 18px -22px -18px; padding: 12px 22px; background: #fff; border-top: 1px solid var(--line); position: sticky; bottom: -18px; }

/* Admin: gemensam CRUD-layout – sökning till vänster, skapa till höger, modaler med fast sidfot */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px; }
.list-toolbar .admin-search { margin: 0; flex: 1 1 340px; }
.list-toolbar > .btn { margin-left: auto; flex: none; }
.toolbar-title { margin: 0; }
.btn-danger { background: #B3261E; color: #fff; }
.btn-danger:hover { background: #8f1d17; color: #fff; }
.btn-danger-text { color: #B3261E; }
.btn-danger-text:hover { box-shadow: inset 0 0 0 1.5px #B3261E; color: #B3261E; }
.admin-modal .modal-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 22px; background: #fff; border-top: 1px solid var(--line); z-index: 2; }
.admin-modal .modal-foot form { padding: 0; margin: 0; display: inline-block; }
.admin-modal .foot-left, .admin-modal .foot-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-modal .foot-right { margin-left: auto; }
.confirm-body { padding: 22px 22px 8px; }
.confirm-body h2 { margin: 0 0 8px; font-size: 1.25rem; }
.confirm-body p { margin: 0 0 12px; color: var(--ink-2); }
.confirm-body .input { width: 100%; margin-bottom: 8px; }
/* Breda modalen: vanlig block-layout (Safari ger en flex-dialog med height:fit-content höjden 0) */
.admin-modal-wide { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; }
.modal-loading { padding: 40px; text-align: center; color: var(--muted); min-height: 60px; }
.rm { display: block; }
.rm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 22px 8px; }
.rm-head h2 { margin: 0 0 6px; font-size: 1.35rem; }
.rm-head .status { margin-right: 4px; }
.modal-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 2px solid var(--line); }
.modal-tabs button { border: 0; background: none; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.modal-tabs button.is-active { color: var(--ink); border-bottom-color: var(--tomato); }
.rm-body { padding: 16px 22px 20px; }
.admin-modal .rm-body form { padding: 0; }
.mode-choice { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-choice legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--tomato); background: #fff7f3; }
.radio-card input { margin-top: 3px; accent-color: var(--tomato); }
.radio-card b { display: block; }
.radio-card small { color: var(--ink-2); font-size: .82rem; }
/* Restaurangmodalen: fliken Aktuell meny */
.mt-summary { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.mt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; }
.mt-facts div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mt-facts span { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.mt-facts b { font-size: .95rem; font-weight: 600; }
.mt-msg { margin: 10px 0 0; }
.mt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mt-actions form { margin: 0; }
.mt-empty { padding: 26px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 14px; }
.mt-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.mt-day { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mt-day.is-today { border-color: var(--tomato); box-shadow: 0 0 0 1px var(--tomato); }
.mt-day.is-past { opacity: .6; }
.mt-day header { display: flex; align-items: baseline; gap: 8px; padding: 9px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.mt-day header b { font-family: var(--serif); font-size: 1.02rem; }
.mt-day header span { color: var(--ink-2); font-size: .9rem; }
.mt-day header small { margin-left: auto; color: var(--muted); }
.mt-badge { font-style: normal; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--tomato); color: #fff; }
.mt-badge.is-muted { background: var(--line); color: var(--ink-2); }
.mt-day ul { list-style: none; margin: 0; padding: 4px 14px 8px; }
.mt-day li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #f1ebe0; }
.mt-day li:last-child { border-bottom: 0; }
.mt-day li div { min-width: 0; }
.mt-day li b { display: block; font-weight: 600; font-size: .95rem; }
.mt-day li div span { display: block; color: var(--ink-2); font-size: .86rem; margin-top: 1px; }
.mt-cat { flex: none; width: 52px; text-align: center; font-size: .7rem; font-weight: 700; padding: 3px 0; border-radius: 6px; color: #fff; background: var(--muted); margin-top: 1px; }
.mt-cat.cat-meat { background: var(--meat); }
.mt-cat.cat-fish { background: var(--fish); }
.mt-cat.cat-veg { background: var(--veg); }
.mt-shot { margin-top: 16px; }
.mt-shot summary { cursor: pointer; font-weight: 600; }
@media (max-width: 620px) { .mt-facts { grid-template-columns: 1fr 1fr; } }
.manual-link-create { display: flex; gap: 8px; align-items: center; }

.more-fields { margin-top: 10px; }
.more-fields summary { cursor: pointer; font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
@media (max-width: 620px) { .mode-choice { grid-template-columns: 1fr; } }

/* Admin: underflikar (Aktiva → Automatiska / Manuella) */
.subtabs { display: flex; gap: 6px; margin: -8px 0 14px; flex-wrap: wrap; }
.subtabs a { padding: 6px 14px; border-radius: 99px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; background: #fff; border: 1px solid var(--line); }
.subtabs a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.manual-link { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.manual-link .input { flex: 1 1 320px; font-family: ui-monospace, monospace; font-size: .82rem; }
.sub-content { white-space: pre-wrap; max-height: 260px; overflow: auto; background: #faf7f0; padding: 8px 10px; border-radius: 8px; font-size: .82rem; }

/* Manuell meny (/meny/…) */
.manual-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 22px; }
.manual-box h2 { margin-top: 0; }
.manual textarea.input { width: 100%; font-family: inherit; line-height: 1.45; }
.m-day { margin: 16px 0 6px; font-size: 1rem; }
.m-row { display: grid; grid-template-columns: 150px minmax(0, 1.3fr) minmax(0, 1.5fr) 120px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.m-row .input { width: 100%; min-width: 0; padding: 7px 9px; }
.m-row.has-error .input { border-color: var(--tomato); }
.m-row.is-new { background: #fbf6e9; border-radius: 8px; padding: 4px; }
.m-del { display: flex; align-items: center; gap: 4px; font-size: .85rem; white-space: nowrap; }
.m-err { grid-column: 1 / -1; margin: 0 0 4px; }
.m-add { display: flex; gap: 8px; align-items: center; margin: 12px 0 16px; flex-wrap: wrap; }
.m-add .input { width: auto; }
@media (max-width: 720px) {
  .m-row { grid-template-columns: 1fr 1fr; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .m-row .m-title, .m-row .m-desc { grid-column: 1 / -1; }
}

/* Admin: trafik in/ut */
.traffic { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 22px; }
.traffic-kpis { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 4px 0 8px; }
.traffic-kpis div { display: flex; align-items: baseline; gap: 8px; }
.traffic-kpis b { font-size: 1.6rem; font-family: Fraunces, serif; }
.traffic-kpis span:last-child { color: var(--ink-2); font-size: .9rem; }
.tr-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.tr-key.tr-in { background: #2f6db5; }
.tr-key.tr-out { background: #e2492f; }
.tr-chart .tr-in path { fill: #2f6db5; }
.tr-chart .tr-out path { fill: #e2492f; }
.tr-chart .ai-hit { fill: transparent; }
.tr-chart svg:hover .tr-day path { opacity: .55; }
.tr-chart svg:hover .tr-day:hover path { opacity: 1; }
.tr-legend { display: flex; gap: 18px; margin: 2px 0 6px; color: var(--ink-2); }
.tr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.traffic .admin-cols { margin-top: 8px; }
.ai-badge { display: inline-block; padding: 1px 6px; border-radius: 6px; background: #ede7fb; color: #4b2a9a; font-size: .72rem; font-weight: 700; letter-spacing: .04em; vertical-align: 2px; }
.h1-date { display: block; font-size: .55em; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.day-links { margin-bottom: 18px; }

/* Admin: MFA */
.mfa-card { max-width: 460px; }
.mfa-steps { margin: 6px 0 12px 20px; padding: 0; list-style: decimal; }
.mfa-steps li { margin: 3px 0; padding: 0; background: none; }
.qr { display: flex; justify-content: center; padding: 14px; margin: 8px auto; width: fit-content; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr img, .qr canvas { display: block; }
.mfa-secret { font-size: .95rem; letter-spacing: .06em; word-break: break-all; }
.code-input { font-size: 1.4rem; letter-spacing: .2em; text-align: center; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; padding: 0; margin: 12px 0; }
.recovery-codes li { padding: 0; margin: 0; background: none; }
.recovery-codes code { display: block; padding: 8px 10px; text-align: center; font-size: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }

/* Admin: ortsökning */
.town-search { max-width: 760px; margin-bottom: 18px; }
.town-search .admin-search .input { font-size: 1.05rem; }
.ts-steps { margin: 10px 0 8px 20px; padding: 0; color: var(--ink-2); list-style: decimal; }
.ts-steps li { margin: 4px 0; padding: 0; background: none; }
.ts-steps b { font-weight: 700; color: var(--ink); }
.progress-cell { min-width: 120px; }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 3px; }
.progress i { display: block; height: 100%; background: #2f8f4e; border-radius: 99px; transition: width .4s; }
.live-dot::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; animation: dl-pulse 1.2s infinite; vertical-align: 1px; }
@keyframes dl-pulse { 50% { opacity: .2; } }

/* Admin: sökfält över listor */
.admin-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.admin-search .input { flex: 1 1 280px; max-width: 460px; }

/* Admin: öppna adress i ny flik */
.open-url-wrap { display: flex; gap: 6px; align-items: center; }
.open-url-wrap > :first-child { flex: 1; min-width: 0; }
.open-url { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border: 1px solid var(--line, #ddd); border-radius: 8px; color: var(--ink); background: #fff; vertical-align: middle; }
.open-url:hover { border-color: var(--tomato); color: var(--tomato); }
.open-url.is-off { opacity: .35; pointer-events: none; }
td .open-url { width: 24px; height: 24px; border-radius: 6px; }
.url-status { margin: 6px 0 0; font-size: .88rem; color: var(--muted); min-height: 1.2em; }
.url-status.is-busy::before { content: ''; display: inline-block; width: .9em; height: .9em; margin-right: 6px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: uc-spin .8s linear infinite; }
.url-status.is-ok { color: #2f8f4e; font-weight: 600; }
.url-status.is-error { color: #b3261e; font-weight: 600; }
.menu-field[hidden], [data-submit][hidden] { display: none !important; }
@keyframes uc-spin { to { transform: rotate(360deg); } }
.shot { display: block; max-width: 100%; max-height: 520px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 10px; }
.shot-thumb { display: block; width: 120px; height: 90px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 6px; }
/* Admin: AI-kostnad per dag + saldo */
.ai-spend { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 22px; }
.ai-spend-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }
.ai-spend-head h2 { margin: 0; }
.ai-spend-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.ai-chart { margin: 0; min-width: 0; }
.ai-chart svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.ai-chart .ai-grid { stroke: var(--line); stroke-width: 1; }
.ai-chart .ai-base { stroke: var(--ink-2); stroke-width: 1; }
.ai-chart .ai-ax { fill: var(--muted); font-size: 12px; }
.ai-chart .ai-ax.is-today { fill: var(--ink); font-weight: 700; }
.ai-chart .ai-ax.ai-sub { font-size: 11px; }
.ai-chart .ai-val { fill: var(--ink); font-size: 12px; font-weight: 700; }
.ai-chart .ai-bar path { fill: var(--forest); transition: opacity .15s; }
.ai-chart .ai-bar .ai-hit { fill: transparent; }
.ai-chart svg:hover .ai-bar path { opacity: .55; }
.ai-chart svg:hover .ai-bar:hover path { opacity: 1; }
.ai-chart details { margin-top: 6px; }
.ai-budget .ai-label { margin: 0; color: var(--muted); font-size: .85rem; }
.ai-budget .ai-hero { margin: 2px 0 8px; font: 800 2.4rem/1.1 var(--serif); color: var(--forest); }
.ai-budget .ai-meter { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.ai-budget .ai-meter span { display: block; height: 100%; border-radius: 999px; background: var(--forest); }
.budget-state { margin: 10px 0 4px; padding: 8px 10px; border-radius: 10px; font-size: .9rem; }
.budget-state.st-good { background: #EAF5EE; color: #1F5A35; }
.budget-state.st-warning { background: #FFF6E0; color: #7A5300; }
.budget-state.st-critical { background: #FDECEA; color: #8E1F14; }
.budget-form { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.budget-form .btn-row { display: flex; gap: 8px; margin-top: 4px; }
.budget-form .input { max-width: 140px; }
@media (max-width: 900px) { .ai-spend-grid { grid-template-columns: 1fr; } }
/* Knapp till admin för inloggad administratör */
.admin-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; padding: 10px 16px; border-radius: 999px; background: var(--forest); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.admin-fab:hover { background: var(--ink); }
/* Rapportera fel */
.report { margin-top: 24px; border-top: 1px dashed var(--line); padding-top: 12px; }
.report summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.report[open] summary { margin-bottom: 8px; }
.report .form { max-width: 520px; }
.success-msg { color: #2f8f4e; font-weight: 600; }
/* Fler restauranger (utan varierande dagsmeny) */
.nomenu-head small { color: var(--muted); font-weight: 400; }