/* =====================================================================
   Gårdbutikken — designsystem (september 2026)
   Lys "gårdbutik" som standard (logoets farver: cremepapir, olivengrøn,
   laderød). Følger telefonens mørke tilstand automatisk, og brugeren kan
   låse lys/mørk under Min profil (data-theme på <html>).
   ===================================================================== */

:root {
  color-scheme: light;

  /* --- Semantiske farver (lys) --- */
  --page: #f6f1e3;
  --surface: #fffdf7;
  --surface-2: #f3ecdb;
  --line: #e6dec9;
  --line-strong: #d3c8ab;
  --text: #2b2a22;
  --text-2: #5c5748;
  --text-3: #736d5e;
  --accent: #5d6f32;
  --accent-strong: #4a5926;
  --on-accent: #fffdf7;
  --accent-soft: #e8edd8;
  --gold: #c8901a;
  --gold-soft: #f8edcc;
  --barn: #bc4632;
  --ok: #3b7531;
  --ok-soft: #e1edd5;
  --bad: #ad3d2a;
  --bad-soft: #f7e2dc;
  --scrim: rgba(33, 30, 20, 0.45);
  --glass: rgba(255, 253, 247, 0.9);
  --shadow-1: 0 1px 2px rgba(60, 50, 20, 0.06);
  --shadow-2: 0 1px 2px rgba(60, 50, 20, 0.05), 0 12px 28px -10px rgba(60, 50, 20, 0.18);
  --shadow-3: 0 24px 60px -12px rgba(40, 32, 10, 0.35);
  --art-filter: none;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: var(--font-body);
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* --- Gamle navne (bruges i inline-styles i app.js) peger på de nye --- */
  --bg: var(--page);
  --bg-raised: var(--surface);
  --bg-card: var(--surface);
  --stroke: var(--line);
  --cream: var(--text);
  --cream-dim: var(--text-2);
  --stone: var(--text-3);
  --mustard: var(--accent);
  --mustard-dark: var(--accent-strong);
  --open: var(--ok);
  --closed: var(--bad);
  --radius-old: 14px;
}

/* --- Mørk "skov om aftenen" --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #18231b;
    --surface: #213026;
    --surface-2: #2a3c2f;
    --line: rgba(244, 239, 224, 0.1);
    --line-strong: rgba(244, 239, 224, 0.2);
    --text: #f4efe0;
    --text-2: #cbc6b5;
    --text-3: #a2a797;
    --accent: #e0b041;
    --accent-strong: #eec25c;
    --on-accent: #241c06;
    --accent-soft: rgba(224, 176, 65, 0.14);
    --gold: #e6b843;
    --gold-soft: rgba(230, 184, 67, 0.14);
    --barn: #d8664f;
    --ok: #93c97f;
    --ok-soft: rgba(147, 201, 127, 0.14);
    --bad: #ec8c70;
    --bad-soft: rgba(236, 140, 112, 0.14);
    --scrim: rgba(5, 10, 6, 0.6);
    --glass: rgba(33, 48, 38, 0.88);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 28px -10px rgba(0, 0, 0, 0.55);
    --shadow-3: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
    --art-filter: brightness(0.78) saturate(0.85);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #18231b;
  --surface: #213026;
  --surface-2: #2a3c2f;
  --line: rgba(244, 239, 224, 0.1);
  --line-strong: rgba(244, 239, 224, 0.2);
  --text: #f4efe0;
  --text-2: #cbc6b5;
  --text-3: #a2a797;
  --accent: #e0b041;
  --accent-strong: #eec25c;
  --on-accent: #241c06;
  --accent-soft: rgba(224, 176, 65, 0.14);
  --gold: #e6b843;
  --gold-soft: rgba(230, 184, 67, 0.14);
  --barn: #d8664f;
  --ok: #93c97f;
  --ok-soft: rgba(147, 201, 127, 0.14);
  --bad: #ec8c70;
  --bad-soft: rgba(236, 140, 112, 0.14);
  --scrim: rgba(5, 10, 6, 0.6);
  --glass: rgba(33, 48, 38, 0.88);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 28px -10px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
  --art-filter: brightness(0.78) saturate(0.85);
}

/* ============================ Grundlag ============================ */
* { box-sizing: border-box; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--accent); }
img { max-width: 100%; }
::selection { background: var(--accent-soft); }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

#gb-root {
  max-width: 1120px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  padding: 0 0 32px 0;
  position: relative;
}

h1, h2, h3, .gb-h1, .gb-detail-title, .gb-card-title { text-wrap: balance; }
p, .gb-sub, .gb-card-desc { text-wrap: pretty; }

/* ============================ Top-bar ============================ */
.gb-header {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 24px;
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.gb-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; background: none; border: none; padding: 0; color: var(--text); }
.gb-brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1);
  object-fit: cover;
}
.gb-brand-name { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.015em; }
.gb-header-right { display: flex; align-items: center; gap: 10px; }

.gb-nav { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.gb-tab {
  font-size: 14px; font-weight: 600; color: var(--text-2);
  background: transparent; border: none;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.gb-tab:hover { color: var(--text); }
.gb-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

.gb-roundbtn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
  cursor: pointer; position: relative; flex-shrink: 0;
}
.gb-roundbtn:hover { border-color: var(--line-strong); }
.gb-roundbtn svg { width: 20px; height: 20px; }
.gb-dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--barn); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}

.gb-authbtn {
  font-size: 14px; font-weight: 700;
  background: var(--accent); color: var(--on-accent);
  border: none; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.gb-authbtn:hover { filter: brightness(1.06); }
.gb-authbtn:active { transform: scale(0.98); }
.gb-authbtn.ghost { background: transparent; color: var(--text-2); border: 1px solid var(--line); }

/* Konto-menu (computer) */
.gb-account-wrap { position: relative; }
.gb-account-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-size: 14px; font-weight: 600;
  padding: 5px 14px 5px 5px; border-radius: 999px; cursor: pointer; box-shadow: var(--shadow-1);
}
.gb-account-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.gb-account-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 6px; min-width: 230px; z-index: 70;
  box-shadow: var(--shadow-3);
}
.gb-account-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; color: var(--text);
  font-size: 14px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.gb-account-menu button:hover { background: var(--surface-2); }
.gb-account-menu .gb-menu-divider { height: 1px; background: var(--line); margin: 6px 6px; }
.gb-account-menu button.danger { color: var(--bad); }
.gb-badge-count {
  margin-left: auto; background: var(--barn); color: #fff; border-radius: 999px;
  padding: 1px 7px; font-size: 11px; font-weight: 700;
}

/* ============================ Bundmenu (telefon) ============================ */
.gb-tabbar { display: none; }
@media (max-width: 720px) {
  .gb-tabbar {
    display: flex; justify-content: space-around; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding: 6px 4px var(--safe-b) 4px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(1.4) blur(16px);
    backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
  }
  .gb-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: none; color: var(--text-3);
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; position: relative;
    border-radius: 12px;
  }
  .gb-tabbar button svg { width: 24px; height: 24px; transition: transform .15s ease; }
  .gb-tabbar button.on { color: var(--accent); }
  .gb-tabbar button.on svg { transform: translateY(-1px); }
  .gb-tabbar .gb-dot { top: 2px; right: calc(50% - 20px); }
  #gb-root { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); }
  .gb-header .gb-nav, .gb-header .gb-account-wrap { display: none; }
}

/* ============================ Indhold ============================ */
.gb-main { padding: 22px 24px 8px; position: relative; }

.gb-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.gb-h1 {
  font-family: var(--font-display); font-size: 32px; font-weight: 600;
  line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 6px 0;
}
.gb-sub { color: var(--text-2); font-size: 15px; margin: 0 0 20px 0; line-height: 1.5; }

/* Forside-hero */
.gb-hero { margin: 4px 0 18px; }
.gb-hero-greet { font-size: 14px; color: var(--text-2); font-weight: 500; }
.gb-hero .gb-h1 { font-size: 34px; margin: 4px 0 0 0; }
.gb-hero .gb-h1 em { font-style: italic; color: var(--accent); font-weight: 600; }

/* Søgefelt */
.gb-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 4px 6px 4px 14px;
  box-shadow: var(--shadow-2);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gb-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-2); }
.gb-search svg { width: 20px; height: 20px; color: var(--text-3); flex-shrink: 0; }
.gb-search input {
  flex: 1; min-width: 0; border: none; background: transparent; color: var(--text);
  font-size: 16px; padding: 12px 0; outline: none;
}
.gb-search input::placeholder { color: var(--text-3); }
.gb-search-clear {
  background: var(--surface-2); border: none; color: var(--text-2);
  font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 12px; cursor: pointer;
}

/* Filter-chips */
.gb-chips {
  display: flex; gap: 8px; margin: 12px -24px 4px; padding: 2px 24px 6px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; scroll-padding-inline: 24px;
}
.gb-chips::-webkit-scrollbar { display: none; }
.gb-chip {
  flex-shrink: 0; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.gb-chip:hover { border-color: var(--line-strong); }
.gb-chip.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.gb-chip.on.season { background: var(--ok); color: #fff; }
.gb-chip select {
  appearance: none; -webkit-appearance: none; border: none; background: transparent;
  color: inherit; font: inherit; padding: 0 16px 0 0; cursor: pointer; outline: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 6px) 55%, calc(100% - 1px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.gb-chip select option { color: #2b2a22; }

.gb-inline-panel {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 8px 0 4px; box-shadow: var(--shadow-1); font-size: 14px;
}
.gb-inline-panel form { display: flex; gap: 8px; }
.gb-loc-credit { font-size: 11.5px; color: var(--text-3); }
.gb-loc-credit a { color: inherit; }
.gb-inline-panel input {
  flex: 1; min-width: 0; background: var(--page); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 10px 12px; font-size: 16px;
}

.gb-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 22px 0 12px;
}
.gb-section-head h2 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.gb-section-head span { font-size: 13px; color: var(--text-3); }

/* Velkomst */
.gb-welcome {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px 16px 16px 18px; margin: 16px 0 4px; font-size: 14.5px; line-height: 1.5;
}
.gb-welcome strong { font-family: var(--font-display); font-size: 17px; font-weight: 600; display: block; margin-bottom: 2px; }
.gb-welcome button.x { background: none; border: none; color: var(--text-3); font-size: 18px; cursor: pointer; padding: 0 4px; }

/* Gammel "locbar" bruges stadig som blødt panel i flere visninger */
.gb-locbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; font-size: 14px; box-shadow: var(--shadow-1);
}
.gb-locbar button {
  font-size: 13.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); padding: 8px 13px; border-radius: 999px; cursor: pointer;
}
.gb-locbar button:hover { border-color: var(--accent); }
.gb-locbar select, .gb-locbar input[type="text"] {
  background: var(--page) !important; color: var(--text) !important; border: 1px solid var(--line) !important;
  border-radius: 10px !important; padding: 8px 10px !important;
}

/* ============================ Kort (butik/vejbod) ============================ */
.gb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.gb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-2);
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}
@media (hover: hover) {
  .gb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
}
.gb-card.season { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok), var(--shadow-2); }
.gb-card-cover {
  height: 138px; position: relative; cursor: pointer;
  background: var(--surface-2) center/cover no-repeat;
  overflow: hidden;
}
.gb-card-cover > svg, .gb-detail-cover > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: var(--art-filter); }
.gb-card-cover.photo, .gb-detail-cover.photo { background-size: cover; background-position: center; }

.gb-pill {
  position: absolute; left: 10px; bottom: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 5px 10px 5px 9px; border-radius: 999px;
  background: rgba(255, 253, 247, 0.94); color: #4a4638;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.gb-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a39d8a; }
.gb-pill.open { color: #2c6425; }
.gb-pill.open::before { background: #3c9a31; box-shadow: 0 0 0 3px rgba(60, 154, 49, 0.22); animation: gb-pulse 2.4s ease-in-out infinite; }
.gb-pill.closed { color: #9a3624; }
.gb-pill.closed::before { background: #c1502e; }
@keyframes gb-pulse { 50% { box-shadow: 0 0 0 6px rgba(60, 154, 49, 0); } }

.gb-heart-btn {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 253, 247, 0.94); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #bc4632; font-size: 17px; line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  transition: transform .12s ease;
}
.gb-heart-btn:active { transform: scale(0.88); }
.gb-heart-btn.active { background: #bc4632; color: #fff; }
.gb-season-leaf {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px;
}

.gb-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gb-card-title {
  font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; line-height: 1.2;
}
.gb-verified {
  font-family: var(--font-body); font-size: 11.5px; font-weight: 700;
  color: var(--ok); background: var(--ok-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.gb-card-meta { font-size: 13.5px; color: var(--text-2); margin-bottom: 4px; }
.gb-card-meta .dot { color: var(--line-strong); margin: 0 5px; }
.gb-card-desc {
  font-size: 14px; color: var(--text-2); line-height: 1.45; margin: 4px 0 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gb-card-rating { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.gb-card-rating .gb-stars { font-size: 13px; }

.gb-prodchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gb-prodchip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; padding: 5px 10px; border-radius: 10px;
  background: var(--surface-2); color: var(--text); cursor: pointer; border: none; text-align: left;
}
.gb-prodchip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.gb-prodchip.season { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.gb-prodchip.soldout { color: var(--text-3); text-decoration: line-through; }
.gb-card-foot {
  margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px;
}
.gb-card-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--accent);
}
.gb-claim-hint { font-size: 12.5px; color: var(--text-3); }
.gb-claim-hint a { color: var(--accent); cursor: pointer; font-weight: 600; }

/* Gammel knap, beholdt til enkelte visninger */
.gb-toggle-products {
  font-size: 13.5px; font-weight: 700; color: var(--accent);
  background: none; border: none; cursor: pointer; padding: 0; text-align: left; margin-top: auto;
}

/* ============================ Varerækker ============================ */
.gb-product-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.gb-product-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
}
.gb-card .gb-product-row { background: var(--surface-2); border-color: transparent; padding: 8px 10px; }
.gb-product-thumb {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--surface-2) center/cover no-repeat;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.gb-card .gb-product-thumb { width: 38px; height: 38px; font-size: 20px; background-color: var(--surface); }
.gb-product-name { font-size: 14.5px; font-weight: 600; }
.gb-product-qty { font-size: 12.5px; color: var(--text-3); }
.gb-product-price {
  margin-left: auto; font-size: 14.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.gb-empty { text-align: center; padding: 48px 20px; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.gb-empty-mark { font-size: 40px; margin-bottom: 10px; }
.gb-loading { text-align: center; padding: 40px; color: var(--text-3); font-size: 14px; }

/* Skelet mens der hentes */
.gb-skel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.gb-skel-cover { height: 138px; }
.gb-skel-line { height: 12px; border-radius: 6px; margin: 12px 16px 0; }
.gb-skel-line.w60 { width: 60%; height: 16px; margin-top: 16px; }
.gb-skel-line.w40 { width: 40%; margin-bottom: 18px; }
.gb-skel-cover, .gb-skel-line {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--page) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: gb-shimmer 1.3s ease-in-out infinite;
}
@keyframes gb-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ============================ Modaler ============================ */
.gb-modal-overlay {
  position: fixed; inset: 0;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1200;
  animation: gb-fade .18s ease both;
}
.gb-modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 24px 22px;
  width: min(400px, 100%); max-height: calc(100dvh - 40px); overflow: auto;
  position: relative; box-shadow: var(--shadow-3);
  animation: gb-rise .22s cubic-bezier(.2, .8, .2, 1) both;
}
.gb-modal h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin: 0 0 4px 0; letter-spacing: -0.01em; }
.gb-modal p.gb-modal-sub { color: var(--text-2); font-size: 14px; margin: 0 0 18px 0; }
@media (max-width: 720px) {
  .gb-modal-overlay { align-items: flex-end; padding: 0; }
  .gb-modal {
    width: 100%; border-radius: 24px 24px 0 0; border-bottom: none;
    padding-bottom: calc(22px + var(--safe-b));
    max-height: 92vh; max-height: 92svh;
    animation-name: gb-sheet;
  }
}
@keyframes gb-fade { from { opacity: 0; } }
@keyframes gb-rise { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes gb-sheet { from { transform: translateY(100%); } }

.gb-close-x {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); border: none; color: var(--text-2);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ============================ Formularer ============================ */
.gb-field { margin-bottom: 14px; }
.gb-field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.gb-field input, .gb-field textarea, .gb-field select {
  width: 100%;
  background: var(--page); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 11px 13px; font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gb-field input:focus, .gb-field textarea:focus, .gb-field select:focus,
#gb-root select:focus, #gb-root input:focus, #gb-root textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.gb-field input[type="file"] { padding: 9px; font-size: 13.5px; }
.gb-field textarea { resize: vertical; min-height: 72px; }
.gb-row { display: flex; gap: 10px; }
.gb-row > * { flex: 1; min-width: 0; }

.gb-btn-primary {
  width: 100%;
  background: var(--accent); color: var(--on-accent);
  border: none; font-weight: 700; font-size: 15px;
  padding: 13px 16px; border-radius: 14px; cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.gb-btn-primary:hover { filter: brightness(1.06); }
.gb-btn-primary:active { transform: scale(0.99); }
.gb-btn-primary:disabled { opacity: 0.5; cursor: default; }
.gb-btn-secondary {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  font-weight: 700; font-size: 15px; padding: 12px 16px; border-radius: 14px; cursor: pointer;
}

.gb-switchmode { text-align: center; margin-top: 14px; font-size: 14px; color: var(--text-2); }
.gb-switchmode a { color: var(--accent); cursor: pointer; font-weight: 600; text-decoration: none; }

.gb-error {
  background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent);
  color: var(--bad); font-size: 14px; padding: 10px 13px; border-radius: 12px; margin-bottom: 14px;
}
.gb-success {
  background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  color: var(--ok); font-size: 14px; padding: 10px 13px; border-radius: 12px; margin-bottom: 14px;
}
.gb-note {
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  color: var(--text); font-size: 14px; padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; line-height: 1.5;
}

/* ============================ Ejer-visning ============================ */
.gb-store-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-2);
}
.gb-store-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.gb-openswitch {
  display: flex; align-items: center; gap: 10px;
  background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
  border-radius: 999px; padding: 6px 6px 6px 14px;
}
.gb-openswitch span { font-size: 14px; font-weight: 700; color: var(--ok); }
.gb-switch { width: 44px; height: 26px; border-radius: 999px; position: relative; cursor: pointer; border: none; transition: background .2s; }
.gb-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.gb-switch.on { background: var(--ok); }
.gb-switch.on::after { left: 21px; }
.gb-switch.off { background: var(--line-strong); }

.gb-section-label {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3); margin: 26px 0 12px 0;
}

.gb-owner-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 13.5px; margin: 0 6px 6px 0;
}
.gb-owner-chip button { background: none; border: none; color: var(--bad); cursor: pointer; font-size: 13px; padding: 0; }

.gb-productmgr-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--page); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px; margin-bottom: 8px;
}
.gb-productmgr-thumb {
  width: 50px; height: 50px; border-radius: 12px;
  background: var(--surface-2) center/cover no-repeat;
  flex-shrink: 0; position: relative; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--text-2); text-align: center; overflow: hidden;
}
.gb-productmgr-info { flex: 1; min-width: 160px; }
.gb-productmgr-name { font-weight: 700; font-size: 15px; }
.gb-productmgr-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gb-iconbtn {
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-2); border-radius: 10px; padding: 8px 11px;
  font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.2;
}
.gb-iconbtn:hover { color: var(--text); border-color: var(--accent); }
.gb-iconbtn.danger:hover { color: var(--bad); border-color: var(--bad); }
.gb-iconbtn.solid { background: var(--accent); color: var(--on-accent); border-color: transparent; }

.gb-new-product-form, .gb-new-store-form {
  background: var(--page); border: 1px dashed var(--line-strong);
  border-radius: 16px; padding: 16px; margin-top: 10px;
}
.gb-use-loc-btn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font-weight: 600; font-size: 14px; padding: 10px 14px; border-radius: 12px; cursor: pointer;
}

/* Kom-godt-i-gang */
.gb-checklist {
  background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 10px; margin-bottom: 18px;
}
.gb-checklist-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.gb-ring { width: 54px; height: 54px; flex-shrink: 0; }
.gb-ring circle { fill: none; stroke-width: 6; }
.gb-ring .bg { stroke: var(--line); }
.gb-ring .fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.gb-ring text { font: 700 14px var(--font-body); fill: var(--text); }
.gb-checklist-head h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 0; }
.gb-checklist-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--text-2); }
.gb-check {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; border-top: 1px solid var(--line);
  padding: 11px 2px; font-size: 14.5px; color: var(--text); cursor: pointer;
}
.gb-check .box {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line-strong); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
}
.gb-check.done { color: var(--text-3); cursor: default; }
.gb-check.done .box { background: var(--ok); border-color: var(--ok); }
.gb-check.done .label { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.gb-check .go { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 13.5px; white-space: nowrap; padding-left: 8px; }

/* Hurtig-tilføj varer */
.gb-quickadd { background: var(--page); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 10px; }
.gb-quickadd-row { display: grid; grid-template-columns: 1fr 96px 92px auto; gap: 8px; align-items: end; }
.gb-quickadd-row .gb-field { margin: 0; }
.gb-quickadd-row input, .gb-quickadd-row select { padding: 11px 10px; }
.gb-quickadd-added { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gb-quickadd-added span { font-size: 13px; background: var(--ok-soft); color: var(--ok); padding: 4px 10px; border-radius: 999px; font-weight: 600; animation: gb-rise .25s ease both; }
@media (max-width: 560px) {
  .gb-quickadd-row { grid-template-columns: 1fr 1fr; }
  .gb-quickadd-row .gb-qa-type { grid-column: 1 / -1; }
  .gb-quickadd-row .gb-qa-add { grid-column: 1 / -1; }
}

/* Billed-upload */
.gb-cover-upload {
  position: relative; height: 150px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2) center/cover no-repeat; margin-bottom: 8px; border: 1px solid var(--line);
}
.gb-cover-upload > svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: var(--art-filter); }
.gb-cover-upload label {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(255, 253, 247, 0.95); color: #2b2a22;
  font-size: 13.5px; font-weight: 700; padding: 8px 13px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.gb-cover-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gb-cover-upload.busy::after {
  content: "Uploader …"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.35); color: #fff; font-weight: 700;
}

/* ============================ Profil-hub ("Mig") ============================ */
.gb-menu-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1); margin-bottom: 16px; }
.gb-menu-list button {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 15px 16px; font-size: 15.5px; color: var(--text); cursor: pointer; text-align: left;
}
.gb-menu-list button:last-child { border-bottom: none; }
.gb-menu-list button .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.gb-menu-list button .chev { margin-left: auto; color: var(--text-3); }
.gb-menu-list button.danger { color: var(--bad); }
.gb-me-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 20px; }
.gb-me-head .gb-account-avatar { width: 56px; height: 56px; font-size: 24px; }

.gb-seg { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; }
.gb-seg button { border: none; background: none; color: var(--text-2); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.gb-seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* ============================ Kort (Leaflet) ============================ */
.gb-map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); isolation: isolate; box-shadow: var(--shadow-2); }
#gb-leaflet-map { height: 520px; width: 100%; background: var(--surface-2); }
.leaflet-popup-content-wrapper { background: var(--surface); color: var(--text); border-radius: 14px; box-shadow: var(--shadow-3); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-container a.leaflet-popup-close-button { color: var(--text-3); }
.gb-map-popup { font-family: var(--font-body); min-width: 160px; }
.gb-map-popup strong { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.gb-map-popup a { display: inline-block; margin-top: 8px; color: var(--accent); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.gb-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--accent); border: 3px solid #fffdf7; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.gb-pin.open { background: #3c9a31; }
.gb-pin.closed { background: #bc4632; }
.gb-pin.unknown { background: #8a8474; }
.gb-pin.stand { background: #c9a05a; }
.gb-pin span { display: block; transform: rotate(45deg); text-align: center; line-height: 24px; font-size: 13px; }
.gb-map-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin: 10px 2px 0; }
.gb-map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* ============================ Butiksside ============================ */
.gb-back-link {
  background: none; border: none; color: var(--text-2);
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 14px;
}
.gb-back-link:hover { color: var(--text); }
.gb-detail-cover {
  height: 220px; border-radius: var(--radius-lg); position: relative; margin-bottom: 18px; overflow: hidden;
  background: var(--surface-2) center/cover no-repeat; box-shadow: var(--shadow-2);
}
.gb-detail-cover .gb-pill { left: 14px; bottom: 14px; font-size: 13px; padding: 6px 12px 6px 10px; }
.gb-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gb-detail-title { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 6px 0; }

.gb-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 8px; margin: 16px 0 6px; }
.gb-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 6px; font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-1); transition: border-color .15s ease, transform .1s ease;
}
.gb-action:hover { border-color: var(--accent); }
.gb-action:active { transform: scale(0.97); }
.gb-action svg { width: 22px; height: 22px; color: var(--accent); }
.gb-action.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.gb-action.primary svg { color: var(--on-accent); }
.gb-action.active svg { color: var(--barn); }

.gb-info {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 14px 0; overflow: hidden;
}
.gb-info > div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.gb-info > div:last-child { border-bottom: none; }
.gb-info .ic { width: 20px; text-align: center; flex-shrink: 0; }
.gb-info a { color: var(--text); font-weight: 600; text-decoration: none; }
.gb-info small { color: var(--text-3); font-size: 13px; }

.gb-external-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px 0; }
.gb-external-links a {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 13px; border-radius: 999px; text-decoration: none;
}
.gb-external-links a:hover { border-color: var(--accent); }
.gb-directions-btn {
  font-weight: 700; font-size: 14px;
  background: var(--accent); color: var(--on-accent); border: none;
  padding: 10px 16px; border-radius: 999px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}

.gb-rating-summary { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px 0; }
.gb-stars { color: var(--gold); font-size: 15px; letter-spacing: 1px; }
.gb-rating-count { font-size: 13.5px; color: var(--text-3); }

.gb-review-row { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; margin-bottom: 8px; }
.gb-review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.gb-review-name { font-weight: 700; font-size: 14.5px; }
.gb-review-stars { color: var(--gold); font-size: 14px; }
.gb-review-text { font-size: 14px; color: var(--text-2); line-height: 1.45; }

.gb-star-picker { display: flex; gap: 6px; margin-bottom: 10px; }
.gb-star-picker button { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--line-strong); padding: 0; transition: transform .1s ease; }
.gb-star-picker button:active { transform: scale(0.85); }
.gb-star-picker button.filled { color: var(--gold); }

/* ============================ Fod ============================ */
.gb-footer {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  padding: 26px 16px 6px; margin-top: 18px; border-top: 1px solid var(--line);
}
.gb-footer button, .gb-footer a { background: none; border: none; color: var(--text-3); font-size: 13px; cursor: pointer; padding: 4px; text-decoration: none; }
.gb-footer button:hover, .gb-footer a:hover { color: var(--text); text-decoration: underline; }

/* Kvittering-til-kunde / toast */
.gb-toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%);
  background: #2b2a22; color: #fffdf7; font-size: 14.5px; font-weight: 600;
  padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-3); z-index: 1500;
  animation: gb-toast 2.6s ease both; pointer-events: none; max-width: calc(100vw - 32px);
}
@media (max-width: 720px) { .gb-toast { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); } }
@keyframes gb-toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ============================ Sideskift-animation ============================ */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ============================ Telefon ============================ */
@media (max-width: 720px) {
  .gb-header { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top, 0px)); }
  .gb-brand-mark { width: 34px; height: 34px; }
  .gb-brand-name { font-size: 19px; }
  .gb-main { padding: 16px 16px 8px; }
  .gb-chips { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; scroll-padding-inline: 16px; }
  .gb-h1 { font-size: 27px; }
  .gb-hero .gb-h1 { font-size: 29px; }
  .gb-detail-title { font-size: 27px; }
  .gb-detail-cover { height: 190px; margin-left: -16px; margin-right: -16px; border-radius: 0; box-shadow: none; }
  .gb-grid { grid-template-columns: 1fr; gap: 14px; }
  #gb-leaflet-map { height: calc(100vh - 320px); height: calc(100svh - 320px); min-height: 340px; }
  .gb-store-panel { padding: 16px; margin-left: -4px; margin-right: -4px; }

  /* iOS zoomer ind på felter med skrift under 16px — undgå det.
     !important fordi flere felter har inline font-size. */
  #gb-root input[type="text"],
  #gb-root input[type="email"],
  #gb-root input[type="password"],
  #gb-root input[type="number"],
  #gb-root input[type="url"],
  #gb-root input[type="tel"],
  #gb-root input[type="time"],
  #gb-root input[type="search"],
  #gb-root textarea,
  #gb-root select { font-size: 16px !important; }
}
@media (max-width: 380px) {
  .gb-hero .gb-h1 { font-size: 26px; }
  .gb-action { padding: 10px 4px; font-size: 12.5px; }
}

.gb-season-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; color: var(--ok); background: var(--ok-soft);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}

/* ============================ Sideskift (View Transitions) ============================ */
/* Top-bar og bundmenu står stille; kun indholdet glider. Kortbilledet "vokser"
   op til butikssidens topbillede via navnet cover-hero (sættes i app.js). */
.gb-header { view-transition-name: gb-header; }
.gb-tabbar { view-transition-name: gb-tabbar; }
.gb-main { view-transition-name: gb-main; }
::view-transition-group(cover-hero) { animation-duration: .32s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(cover-hero), ::view-transition-new(cover-hero) { height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  :root:active-view-transition-type(forward)::view-transition-old(gb-main) { animation: .2s ease-in both gb-vt-out-left; }
  :root:active-view-transition-type(forward)::view-transition-new(gb-main) { animation: .26s cubic-bezier(.2, .8, .2, 1) both gb-vt-in-right; }
  :root:active-view-transition-type(back)::view-transition-old(gb-main) { animation: .2s ease-in both gb-vt-out-right; }
  :root:active-view-transition-type(back)::view-transition-new(gb-main) { animation: .26s cubic-bezier(.2, .8, .2, 1) both gb-vt-in-left; }
}
@keyframes gb-vt-out-left { to { opacity: 0; transform: translateX(-28px); } }
@keyframes gb-vt-in-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes gb-vt-out-right { to { opacity: 0; transform: translateX(28px); } }
@keyframes gb-vt-in-left { from { opacity: 0; transform: translateX(-28px); } }

/* Kort glider blidt ind, når man scroller (kun hvor browseren kan det, iOS 26+). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .gb-grid > .gb-card {
      animation: gb-card-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
  }
}
@keyframes gb-card-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }

/* Lås baggrunden, mens en dialog er åben (ingen JavaScript nødvendig). */
body:has(.gb-modal-overlay) { overflow: hidden; }

/* Tekstfelter vokser med indholdet (iOS 26.2+, ellers fast højde som før). */
#gb-root textarea { field-sizing: content; min-height: 3lh; max-height: 14lh; }

/* Vandret sikker-zone (iPhone på tværs). */
.gb-header, .gb-tabbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 721px) { .gb-header { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }

/* Læsbar bredde på computer for sider med én kolonne (butiksside, profil, tekster). */
@media (min-width: 721px) {
  .gb-main.narrow { max-width: 780px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 720px) {
  /* Log ind ligger i bundmenuen på telefon — undgå to ens knapper. */
  .gb-header .gb-authbtn { display: none; }
}

/* ============================ Kort 2.0 (sep. 2026) ============================ */
/* Roligt "papirkort": farvestøj og vejnavne dæmpes, så gårdene står frem —
   inspireret af dingårdbutik.dk's rolige Danmarkskort, men med rigtige veje. */
/* Vores eget Danmarkskort (oversigten): hav, land, kyst og stednavne. Havets farve
   = kortbilledernes hav efter filteret, så overgangen ved zoom er blød. */
:root {
  --map-tiles: saturate(.5) sepia(.22) hue-rotate(18deg) brightness(1.02) contrast(.96);
  --map-sea: #ccd7d2; --map-land: #f8f5e8; --map-coast: #a3b4ac; --map-inset: #d9e2dd;
  --map-label: #4a4538; --map-region: #8a846f;
}
:root[data-theme="dark"] {
  --map-tiles: invert(1) hue-rotate(180deg) grayscale(.75) brightness(.78) contrast(.9);
  --map-sea: #2b3234; --map-land: #1c201d; --map-coast: #4b5853; --map-inset: #333c3e;
  --map-label: #dcd6c4; --map-region: #98a08b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --map-tiles: invert(1) hue-rotate(180deg) grayscale(.75) brightness(.78) contrast(.9);
    --map-sea: #2b3234; --map-land: #1c201d; --map-coast: #4b5853; --map-inset: #333c3e;
    --map-label: #dcd6c4; --map-region: #98a08b;
  }
}
.gb-map-wrap .leaflet-tile-pane, .gb-minimap .leaflet-tile-pane { filter: var(--map-tiles); }
.gb-map-wrap .leaflet-container, .gb-minimap.leaflet-container { background: var(--surface-2); font-family: var(--font-body); }

/* Kun Danmark: på oversigten ser man vores eget kort (land + stednavne fra danmark.json).
   Over zoom 8,5 toner det rigtige kort med veje frem ovenpå (.show-tiles). */
#gb-leaflet-map.has-base { background: var(--map-sea); }
#gb-leaflet-map.has-base .leaflet-tile-pane { opacity: 0; transition: opacity .45s ease; }
#gb-leaflet-map.has-base.show-tiles .leaflet-tile-pane { opacity: 1; }
.gb-land { fill: var(--map-land); fill-opacity: 1; stroke: var(--map-coast); stroke-width: .9px; stroke-opacity: 1; stroke-linejoin: round; transition: opacity .35s ease; }
#gb-leaflet-map.is-overview .gb-land-bh { opacity: 0; }   /* Bornholm står i boksen på oversigten */

/* Bornholm-boksen øverst til højre (kun på oversigten) */
.leaflet-gbInset-pane { transition: opacity .35s ease, visibility 0s; }
#gb-leaflet-map:not(.is-overview) .leaflet-gbInset-pane { opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.gb-inset-box { fill: var(--map-inset); fill-opacity: 1; stroke: var(--map-coast); stroke-width: 1.25px; stroke-opacity: 1; }
.gb-inset-box:hover { stroke: var(--accent); }

/* Stednavne: byer (tre størrelser), egne og øer i kursiv som i et atlas */
.gb-lbl-icon { width: 0 !important; height: 0 !important; }
.gb-lbl {
  position: absolute; left: 0; top: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)));
  white-space: nowrap; pointer-events: none;
  font: 600 11px/1.15 var(--font-body); color: var(--map-label); letter-spacing: .01em;
  text-shadow: 0 0 2px var(--map-land), 0 0 3px var(--map-land), 0 0 6px var(--map-land);
  transition: opacity .25s ease;
}
.gb-lbl.by1 { font-size: 12.5px; font-weight: 700; }
.gb-lbl.by3 { font-size: 10.5px; font-weight: 500; }
.gb-lbl.egn { font: italic 500 15px/1.15 var(--font-display); color: var(--map-region); letter-spacing: .04em; }
.gb-lbl.oe { font: italic 500 12px/1.15 var(--font-display); color: var(--map-region); }
.gb-lbl.inset { transform: translate(-50%, 5px); pointer-events: auto; cursor: pointer; font-size: 13px; text-shadow: none; }
.gb-lbl-icon.off .gb-lbl { opacity: 0; }
#gb-leaflet-map.is-overview .gb-lbl-icon.bh .gb-lbl { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  #gb-leaflet-map .leaflet-tile-pane, .leaflet-gbInset-pane, .gb-land, .gb-lbl { transition: none !important; }
}

/* Klynger: flere gårde tæt på hinanden = én rund plet med antal */
.gb-cluster {
  width: 40px; height: 40px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 88%, transparent);
  border: 3px solid rgba(255, 253, 247, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--on-accent); font: 800 14px var(--font-body);
  transition: transform .15s ease;
}
.gb-cluster:hover { transform: scale(1.08); }

/* Knappen "← Hele Danmark" (vises først, når man har zoomet ind) */
.gb-map-overview {
  display: none; align-items: center; gap: 4px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  font: 700 13.5px var(--font-body); padding: 9px 13px; border-radius: 999px; cursor: pointer;
  box-shadow: var(--shadow-2);
}
#gb-leaflet-map:not(.is-overview) .gb-map-overview { display: inline-flex; animation: gb-fade .2s ease both; }

/* Leaflet-knapper i appens stil */
.gb-map-wrap .leaflet-bar { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-2); }
.gb-map-wrap .leaflet-bar a { background: var(--surface); color: var(--text); border-bottom-color: var(--line); width: 34px; height: 34px; line-height: 34px; }
.gb-map-wrap .leaflet-bar a:hover { background: var(--surface-2); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--text-3); font-size: 10.5px; }
.leaflet-container .leaflet-control-attribution a { color: var(--text-2); }

/* Kort-boblen */
.gb-map-popup .meta { font-size: 13px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }
.gb-map-popup .approx { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.gb-map-popup .btns { display: flex; gap: 8px; margin-top: 10px; }
.gb-map-popup { min-width: 220px; }
.gb-map-popup .btns a { margin: 0; flex: 1 1 auto; white-space: nowrap; text-align: center; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 700; text-decoration: none; }
.gb-map-popup .btns a.open { background: var(--accent); color: var(--on-accent); }
.gb-map-popup .btns a.route { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 14px 16px; }

.gb-map-legend i.ring { background: transparent; border: 1.5px dashed #8a8474; }
.gb-map-hint { font-size: 13px; color: var(--text-3); margin: 6px 2px 0; }

/* Minikort på butiks-/vejbodssiden */
.gb-minimap-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 14px 0; background: var(--surface); box-shadow: var(--shadow-1); isolation: isolate; }
.gb-minimap { height: 170px; width: 100%; background: var(--surface-2); }
.gb-minimap-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  background: var(--surface); border: none; border-top: 1px solid var(--line);
  padding: 11px 14px; font-size: 13.5px; color: var(--text-2); cursor: pointer; text-align: left;
}
.gb-minimap-bar b { color: var(--accent); white-space: nowrap; }

/* Netlifys "Powered by Netlify"-mærke (gratis-plan) må aldrig dække bundmenuen på telefon.
   Mærket kan slås helt fra i Netlify: Project configuration → General → Powered by Netlify badge. */
@media (max-width: 720px) {
  #nl-badge-frame { bottom: calc(var(--tabbar-h) + var(--safe-b) + 6px) !important; }
}

.gb-forgot-link { font-size: 13.5px; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: none; }
.gb-forgot-link:hover { text-decoration: underline; }
