/* Everöd.nu – publik stilmall. Ljust och mörkt tema styrs av variablerna under :root och html[data-theme="dark"]. */
  /* poppins-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('../images/fonts/poppins-v24-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 400;
  src: url('../images/fonts/poppins-v24-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  src: url('../images/fonts/poppins-v24-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  src: url('../images/fonts/poppins-v24-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  src: url('../images/fonts/poppins-v24-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* ═══════════════════════════════════════════════════════════════════════
   Färger och mått – ljust tema (standard) och mörkt tema
   Allt nedan använder dessa variabler, så båda temana följer med automatiskt.
   ═══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light;
  --bg:            #f3f4ef;
  --panel:         #ffffff;            /* kort och paneler */
  --surface-2:     #f6f8f2;            /* svag fyllning */
  --surface-3:     #eef1e9;            /* knappar, chips */
  --border:        #e1e5dc;
  --border-soft:   #edf0e9;
  --text:          #1b1f18;
  --text-2:        #4b5246;            /* brödtext */
  --muted:         #7b8375;
  --accent:        #679c3c;
  --accent-strong: #4f7c2b;
  --accent-soft:   #eef5e6;
  --accent-line:   #d7e8c6;
  --link:          #4f8a2a;
  --link-hover:    #3a6a1c;
  --on-accent:     #ffffff;
  --green:         #1a9e4a;
  --red:           #d63030;
  --red-soft:      #fdecec;
  --orange:        #c47a00;
  --focus:         #b9d79f;
  --placeholder:   #a7ae9f;

  --shadow-sm: 0 1px 2px rgba(28,40,16,.06), 0 1px 3px rgba(28,40,16,.04);
  --shadow:    0 1px 2px rgba(28,40,16,.05), 0 6px 18px rgba(28,40,16,.07);
  --shadow-lg: 0 4px 12px rgba(28,40,16,.08), 0 18px 40px rgba(28,40,16,.12);

  --header-bg:     rgba(255,255,255,.86);
  --img-bg:        #e6e9e1;
  --chip-dark:     rgba(20,24,18,.62);

  --weather-bg:    #dcecd0;
  --weather-hover: #d0e6bf;
  --weather-ink:   #17361c;
  --weather-ink-2: rgba(23,54,28,.55);
  --weather-panel: #e8f2df;
  --weather-tile:  rgba(255,255,255,.78);

  --police-a:      #fff8f0;
  --police-b:      #fff2e4;
  --police-line:   #e07800;
  --police-card:   rgba(255,255,255,.82);
  --police-border: #f2dcc4;
  --police-badge:  #eceff4;
  --police-badge-ink: #3a4a60;

  --board-a:       #f5f0e5;
  --board-b:       #efe8d9;
  --note-bg:       #fffdf8;
  --note-text:     #4a4a44;
  --board-ink:     #6b5f48;
  --board-line:    #d9ccb0;
  --note-dash:     #e8dec9;

  --line-train-bg: #e8f0fb; --line-train: #1a6fc4;
  --line-bus-bg:   #e6f5eb; --line-bus:   #1a7a3a;
  --line-tram-bg:  #f5eaf8; --line-tram:  #8a3aaa;
  --line-ferry-bg: #e6f3f8; --line-ferry: #1a7a9a;

  --footer-bg:     #2b4419;
  --footer-ink:    rgba(255,255,255,.88);

  --max-w:   1200px;
  --radius:  14px;
  --radius-sm: 10px;
  --gap:     16px;
  --nav-h:   56px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg:            #111411;
  --panel:         #1a1e1a;
  --surface-2:     #202520;
  --surface-3:     #272d27;
  --border:        #2e352e;
  --border-soft:   #262c26;
  --text:          #e7ebe3;
  --text-2:        #bfc6b9;
  --muted:         #8d9688;
  --accent:        #7cb24e;
  --accent-strong: #93c766;
  --accent-soft:   rgba(124,178,78,.14);
  --accent-line:   rgba(124,178,78,.32);
  --link:          #9bcc70;
  --link-hover:    #b9de97;
  --on-accent:     #0f1a08;
  --green:         #4cc97a;
  --red:           #ff7070;
  --red-soft:      rgba(255,112,112,.12);
  --orange:        #f0a640;
  --focus:         rgba(124,178,78,.45);
  --placeholder:   #6f786a;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow:    0 1px 2px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.28);
  --shadow-lg: 0 6px 16px rgba(0,0,0,.4), 0 18px 44px rgba(0,0,0,.45);

  --header-bg:     rgba(23,27,23,.86);
  --img-bg:        #262b26;
  --chip-dark:     rgba(10,12,10,.7);

  --weather-bg:    #1c2a19;
  --weather-hover: #223320;
  --weather-ink:   #d4e8cb;
  --weather-ink-2: rgba(212,232,203,.55);
  --weather-panel: #182316;
  --weather-tile:  rgba(255,255,255,.05);

  --police-a:      #1d1812;
  --police-b:      #1a1510;
  --police-line:   #c86b00;
  --police-card:   rgba(255,255,255,.04);
  --police-border: #3a2f22;
  --police-badge:  #2a2f36;
  --police-badge-ink: #c3cdda;

  --board-a:       #1c1a15;
  --board-b:       #191712;
  --note-bg:       #24221c;
  --note-text:     #cdc6b7;
  --board-ink:     #b3a78e;
  --board-line:    #4a4232;
  --note-dash:     #3b362b;

  --line-train-bg: rgba(90,160,240,.16); --line-train: #7fb6f2;
  --line-bus-bg:   rgba(70,190,110,.16); --line-bus:   #6fd396;
  --line-tram-bg:  rgba(190,110,230,.16); --line-tram: #d29ae9;
  --line-ferry-bg: rgba(70,180,220,.16); --line-ferry: #7cc9e3;

  --footer-bg:     #172213;
  --footer-ink:    rgba(231,235,227,.82);
}

/* Mjuk övergång när man byter tema (bara precis då, inte vid sidladdning) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease !important;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inner { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

/* Bilder lite dämpade i mörkt läge så att de inte bländar */
html[data-theme="dark"] .img-slider img,
html[data-theme="dark"] .event-img img,
html[data-theme="dark"] .note-img img,
html[data-theme="dark"] .cam-img-wrap img { filter: brightness(.88); }

/* ── Sidhuvud ── */
#header { background: var(--panel); }
#header .inner { padding-top: 16px; padding-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; }
#header img { width: 220px; height: auto; flex-shrink: 0; }
#header-info { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
#header-date { font-size: 0.84rem; font-weight: 600; color: var(--text); white-space: nowrap; }
#header-namesday { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 540px) {
  #header .inner { flex-direction: column; align-items: center; gap: 12px; padding-top: 18px; padding-bottom: 10px; }
  #header img { width: 180px; }
  #header-info { align-items: center; text-align: center; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0 8px; width: 100%; padding-bottom: 2px; }
  #header-date { font-size: 0.78rem; }
  #header-namesday { font-size: 0.72rem; }
  .header-dot { display: none; }
}
@media (min-width: 541px) { .header-dot { display: none; } }

#refresh-btn { background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 6px 8px; display: none; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
#refresh-btn:active { color: var(--accent); }

/* ── Snabbnavigation (följer med när man scrollar) ── */
#quick-nav {
  position: sticky; top: 0; z-index: 900;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border);
}
.qn-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 8px 0 16px; height: var(--nav-h); display: flex; align-items: center; gap: 8px; }
.qn-scroll { position: relative; flex: 1; min-width: 0; display: flex; }
.qn-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--panel); color: var(--text-2); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.7rem; padding: 0;
}
.qn-arrow:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.qn-arrow.prev { left: -4px; }
.qn-arrow.next { right: -2px; }
@media (hover: none) { .qn-arrow { display: none !important; } }
.qn-pills {
  display: flex; gap: 6px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 4px 2px; scroll-behavior: smooth;
}
.qn-pills::-webkit-scrollbar { display: none; }
.qn-pills.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.qn-pills.fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.qn-pills.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.qn-pill {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 13px 7px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 0.74rem; font-weight: 500; line-height: 1;
  color: var(--text); white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.qn-pill:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.qn-pill.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.qn-icon { font-size: 0.92rem; line-height: 1; }
.qn-label { display: none; }

/* Ankarmål hamnar under navigeringsraden, inte bakom den */
.category-title[id], #board-section, #map-section, #camera-section, #events-section, #traffic-section, .category-box-content { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ── Temaväljare ── */
.theme-switch { position: relative; flex-shrink: 0; }
.theme-switch .theme-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--border-soft); cursor: pointer; font-size: 0.95rem; padding: 0;
  transition: background .15s, color .15s;
}
.theme-switch .theme-btn:hover, .theme-switch .theme-btn[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-strong); }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1000; min-width: 210px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.theme-menu-title { font-size: 0.64rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.theme-switch .theme-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; border-radius: 9px; padding: 8px 10px; cursor: pointer;
  font: 500 0.82rem 'Poppins', system-ui, sans-serif; color: var(--text);
}
.theme-switch .theme-menu button:hover, .theme-switch .theme-menu button:focus-visible { background: var(--surface-3); outline: none; }
.theme-menu button > i:first-child { width: 18px; text-align: center; color: var(--muted); }
.theme-menu button span { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.theme-menu button small { font-size: 0.66rem; color: var(--muted); font-weight: 400; }
.theme-menu .theme-check { color: var(--accent); font-size: 0.75rem; visibility: hidden; }
.theme-menu button[aria-checked="true"] .theme-check { visibility: visible; }
.theme-menu button[aria-checked="true"] > i:first-child { color: var(--accent); }

/* ── Väderrad ── */
.weather-bar { background: var(--weather-bg); color: var(--weather-ink); padding: 0.45rem 1rem; cursor: pointer; user-select: none; transition: background 0.15s; }
.weather-bar:hover { background: var(--weather-hover); }
.wb-inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.1rem 0; max-width: var(--max-w); margin: 0 auto; }
.wb-item { display: flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.75rem; border-right: 1px solid color-mix(in srgb, var(--weather-ink) 14%, transparent); white-space: nowrap; }
.wb-item:last-of-type { border-right: none; }
.wb-label { color: var(--weather-ink-2); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; }
.wb-val { font-size: 0.8rem; font-weight: 500; color: var(--weather-ink); }
.wb-symbol { font-size: 1rem; line-height: 1; }
.wb-temp { font-size: 1rem; font-weight: 600; color: var(--weather-ink); }
.wb-city { color: var(--weather-ink-2); font-size: 0.73rem; }
.wb-toggle { margin-left: auto; color: var(--weather-ink-2); font-size: 0.68rem; display: flex; align-items: center; gap: 0.3rem; padding-left: 0.75rem; white-space: nowrap; flex-shrink: 0; }
.wb-toggle-arrow { display: inline-block; transition: transform 0.25s; font-size: 0.62rem; }
.weather-bar.open .wb-toggle-arrow { transform: rotate(180deg); }
@media (max-width: 420px) { .wb-hide-xs { display: none; } }
.wb-error { color: var(--orange); font-size: 0.75rem; text-align: center; padding: 0.3rem 0; }

.weather-panel { background: var(--weather-panel); overflow: hidden; max-height: 0; transition: max-height 0.35s ease; border-bottom: 1px solid var(--border); }
.weather-panel.open { max-height: 800px; }
.wp-inner { max-width: var(--max-w); margin: 0 auto; padding: 1.2rem 1rem 1.4rem; }
.wp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.55rem; margin-bottom: 1.1rem; }
.wp-stat { background: var(--weather-tile); border-radius: 12px; padding: 0.6rem 0.8rem; }
.wp-stat-label { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--weather-ink-2); margin-bottom: 0.2rem; }
.wp-stat-val { font-size: 1.25rem; font-weight: 600; color: var(--weather-ink); line-height: 1.1; }
.wp-stat-unit { font-size: 0.68rem; font-weight: 400; color: var(--weather-ink-2); }
.wp-section-title { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--weather-ink-2); margin-bottom: 0.55rem; }
.wp-hourly-wrap { position: relative; }
.wp-hourly { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.4rem; scrollbar-width: none; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.wp-hourly::-webkit-scrollbar { display: none; }
.wp-hourly.fade-r { -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 80px); mask-image: linear-gradient(to left, transparent 0%, #000 80px); }
.wp-hourly.fade-l { -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 80px); mask-image: linear-gradient(to right, transparent 0%, #000 80px); }
.wp-hourly.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 80px, #000 calc(100% - 80px), transparent 100%); mask-image: linear-gradient(to right, transparent 0%, #000 80px, #000 calc(100% - 80px), transparent 100%); }
.wp-arrow { position: absolute; top: calc(50% - 0.2rem); transform: translateY(-50%); z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--text); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.72rem; padding: 0; transition: background .15s, color .15s; }
.wp-arrow:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.wp-arrow.prev { left: -10px; }
.wp-arrow.next { right: -10px; }
@media (hover: none) { .wp-arrow { display: none !important; } }
.wp-hour { background: var(--weather-tile); border-radius: 12px; padding: 0.45rem 0.6rem; text-align: center; min-width: 58px; flex-shrink: 0; }
.wp-hour-time { font-size: 0.65rem; color: var(--weather-ink-2); }
.wp-hour-emoji { font-size: 1.25rem; display: block; margin: 0.25rem 0 0.15rem; line-height: 1; }
.wp-hour-temp { font-size: 0.9rem; font-weight: 600; color: var(--weather-ink); }
.wp-hour-precip { font-size: 0.62rem; color: var(--weather-ink-2); margin-top: 0.12rem; min-height: 0.85rem; }
.wp-footer { font-size: 0.62rem; color: var(--weather-ink-2); text-align: center; margin-top: 0.9rem; }
.wp-footer a { color: inherit; font-weight: 600; }

/* ── Rubriker för sektioner (samma utseende överallt) ── */
.section-title, .events-header, .board-header, .police-header, .category-title {
  font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text);
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.events-header > span, .board-header > span { display: inline-flex; align-items: center; gap: 10px; }
.section-title > i, .events-header > span > i, .board-header > span > i, .police-header > i, .cat-icon {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 0.88rem;
}
.cat-icon { font-size: 1.02rem; line-height: 1; }
.board-header > span > i { background: color-mix(in srgb, #b5651d 15%, transparent); color: #b5651d; }
.board-header > span > i::before { display: inline-block; transform: rotate(30deg); }
.police-header > i { background: color-mix(in srgb, var(--police-line) 15%, transparent); color: var(--police-line); }
.events-header, .board-header { justify-content: space-between; flex-wrap: wrap; }

.section-add {
  margin-left: auto; font-size: 0.74rem; font-weight: 600; color: var(--link);
  background: var(--panel); border: 1px solid var(--accent-line);
  padding: 7px 13px; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: background .15s, color .15s, border-color .15s;
}
.section-add:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ── Nyhetsscroller ── */
#news-section { background: var(--panel); overflow: hidden; border-bottom: 1px solid var(--border); }
#news-track-wrap { display: flex; align-items: center; }
#news-label { background: var(--accent); color: var(--on-accent); font-size: 0.68rem; font-weight: 600; white-space: nowrap; padding: 0 14px; height: 40px; display: flex; align-items: center; flex-shrink: 0; letter-spacing: 0.02em; }
#news-label .news-label-long { display: inline; }
#news-label .news-label-short { display: none; }
@media (max-width: 540px) { #news-label .news-label-long { display: none; } #news-label .news-label-short { display: inline; } }
#news-scroller { overflow: hidden; flex: 1; height: 40px; mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%); -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%); }
#news-track { display: flex; align-items: center; height: 40px; white-space: nowrap; will-change: transform; }
.news-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 32px; font-size: 0.78rem; color: var(--text); border-right: 1px solid var(--border); height: 40px; cursor: pointer; transition: color 0.12s; }
.news-item:hover { color: var(--link); }
.news-item i { color: var(--muted); font-size: 0.62rem; flex-shrink: 0; }
#news-loading { height: 40px; display: flex; align-items: center; padding: 0 16px; font-size: 0.72rem; color: var(--muted); }

/* ── Polisens händelser ── */
#police-section { border-top: 3px solid var(--police-line); background: linear-gradient(135deg, var(--police-a) 0%, var(--police-b) 100%); }
.police-inner { max-width: var(--max-w); margin: 0 auto; padding: 20px 16px 22px; }
.police-list { display: flex; flex-direction: column; gap: 8px; }
.police-card {
  background: var(--police-card); border: 1px solid var(--police-border); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 11px 15px; display: flex; flex-direction: column; gap: 4px;
}
.police-card[data-type*="Brand"]        { border-left-color: #e05c00; }
.police-card[data-type*="Trafikolycka"] { border-left-color: #c47a00; }
.police-card[data-type*="Trafikbrott"]  { border-left-color: #a06800; }
.police-card[data-type*="Misshandel"]   { border-left-color: #b02020; }
.police-card[data-type*="Mord"]         { border-left-color: #800000; }
.police-card[data-type*="Inbrott"]      { border-left-color: #6a0dad; }
.police-card[data-type*="Stöld"]        { border-left-color: #8b5e00; }
.police-card[data-type*="Rattfylleri"]  { border-left-color: #1a5c9e; }
.police-card[data-type*="Rån"]          { border-left-color: #8b0000; }
.police-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.police-type-badge { display: inline-block; font-size: 0.63rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; background: var(--police-badge); color: var(--police-badge-ink); border-radius: 6px; padding: 2px 8px; white-space: nowrap; flex-shrink: 0; }
.police-date { font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
.police-summary { font-size: 0.82rem; font-weight: 500; color: var(--text); line-height: 1.5; }
.police-link { font-size: 0.7rem; color: var(--link); display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }
.police-link:hover { color: var(--link-hover); }
.police-empty { text-align: center; color: var(--muted); font-size: 0.78rem; padding: 20px 0; }
#police-show-more { display: block; width: 100%; background: none; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font: 500 0.68rem 'Poppins', sans-serif; padding: 8px; cursor: pointer; text-align: center; margin-top: 8px; transition: background 0.15s, color 0.15s; }
#police-show-more:hover { background: var(--surface-3); color: var(--link); }

/* ── Evenemang ── */
#events-section { margin-top: 0; }
.events-inner { max-width: var(--max-w); margin: 0 auto; padding: 22px 16px 4px; }
.events-scroll-wrap { position: relative; }
.events-track {
  display: flex; gap: 14px; overflow-x: auto; align-items: stretch;
  padding: 4px 4px 14px; margin: 0 -4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; scroll-snap-type: x mandatory;
}
.events-track::-webkit-scrollbar { display: none; }
.events-fade-left { -webkit-mask-image: linear-gradient(to right, transparent 0%, black 80px); mask-image: linear-gradient(to right, transparent 0%, black 80px); }
.events-fade-right { -webkit-mask-image: linear-gradient(to left, transparent 0%, black 80px); mask-image: linear-gradient(to left, transparent 0%, black 80px); }
.events-fade-both { -webkit-mask-image: linear-gradient(to right, transparent 0%, black 80px, black calc(100% - 80px), transparent 100%); mask-image: linear-gradient(to right, transparent 0%, black 80px, black calc(100% - 80px), transparent 100%); }
.events-arrow {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  width: 36px; height: 36px; border-radius: 50%; font-size: 0.75rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: background 0.15s, color 0.15s, opacity 0.15s; z-index: 2; touch-action: manipulation;
}
.events-arrow:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.events-arrow.hidden { opacity: 0.35; pointer-events: none; box-shadow: none; }

.event-card {
  scroll-snap-align: start; flex-shrink: 0; width: 268px;
  background: var(--panel); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow); border: 1px solid var(--border-soft);
  transition: transform .18s, box-shadow .18s;
}


@media (hover: hover) { .event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
.event-img { position: relative; height: 132px; flex-shrink: 0; overflow: hidden; background: var(--img-bg); }
.event-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-img.event-noimg { height: 78px; background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface-2) 75%); display: flex; align-items: center; justify-content: flex-end; padding-right: 18px; }
.event-noimg-emoji { font-size: 2.2rem; line-height: 1; opacity: .9; }
.event-date {
  position: absolute; top: 10px; left: 10px; min-width: 46px;
  background: var(--panel); color: var(--text); border-radius: 10px; padding: 0 0 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2); display: flex; flex-direction: column; align-items: center; overflow: hidden;
}
.event-noimg .event-date { top: 50%; transform: translateY(-50%); }
.event-wd { align-self: stretch; text-align: center; background: var(--accent); color: var(--on-accent); font-size: 0.55rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px 1px; }
.event-day { font-size: 1.2rem; font-weight: 700; line-height: 1.15; margin-top: 2px; }
.event-month { font-size: 0.58rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.event-when { position: absolute; top: 10px; right: 10px; background: var(--chip-dark); color: #fff; font-size: 0.62rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.event-when.is-today { background: var(--accent); color: var(--on-accent); }
.event-noimg .event-when { top: auto; bottom: 9px; right: auto; left: 66px; background: var(--accent-soft); color: var(--accent-strong); }
.event-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 15px 13px; flex: 1; }
.event-title { font-size: 0.88rem; font-weight: 600; line-height: 1.35; color: var(--text); }
.event-desc { font-size: 0.75rem; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.event-desc.is-cut { cursor: pointer; }
.event-more { align-self: flex-start; background: none; border: none; padding: 0; margin: -1px 0 0; font: inherit; font-size: 0.71rem; font-weight: 600; color: var(--link); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.event-more i { font-size: 0.55rem; }
.event-more:hover { color: var(--link-hover); }
.event-body .event-meta { margin-top: auto; padding-top: 9px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 3px; font-size: 0.71rem; font-weight: 500; color: var(--text-2); }
.event-body .event-meta:first-child { border-top: none; }
.event-meta > span { display: flex; align-items: flex-start; gap: 6px; }
.event-meta i { color: var(--accent); font-size: 0.68rem; width: 12px; text-align: center; margin-top: 3px; flex-shrink: 0; }
.event-meta [data-map] { color: var(--text); cursor: pointer; }
.event-meta [data-map]:hover { color: var(--link); }

/* Evenemangsrutan ("Läs mer") */
.ev-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(8,10,8,.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ev-modal-box { position: relative; background: var(--panel); border-radius: 18px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.ev-modal-close { position: absolute; top: 10px; right: 10px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--panel); color: var(--text); cursor: pointer; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.ev-modal .event-img { height: 210px; }
.ev-modal .event-img.event-noimg { height: 92px; padding-right: 58px; }
.ev-modal .event-when { right: 54px; }
.ev-modal .event-noimg .event-when { right: auto; }
.ev-modal .event-body { padding: 18px 20px 20px; gap: 8px; }
.ev-modal .event-title { font-size: 1.05rem; }
.ev-modal .event-desc { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 0.84rem; color: var(--text-2); cursor: auto; }
.ev-modal .event-body .event-meta { font-size: 0.8rem; padding-top: 10px; }
body.ev-modal-open { overflow: hidden; }

/* ── Anslagstavlan ── */
#board-section { margin-top: 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--board-a) 0%, var(--board-b) 100%); }
.board-inner { max-width: var(--max-w); margin: 0 auto; padding: 22px 16px 24px; }
.board-empty { background: color-mix(in srgb, var(--note-bg) 70%, transparent); border: 1px dashed var(--board-line); border-radius: var(--radius); padding: 18px; font-size: 0.8rem; color: var(--board-ink); text-align: center; }
.board-empty a { color: var(--link); font-weight: 600; }
.board-grid { columns: 3; column-gap: 14px; }
.board-grid > .note { break-inside: avoid; margin-bottom: 14px; display: block; }
.board-grid > .note[hidden] { display: none; }
@media (max-width: 760px) { .board-grid { columns: 2; } }
@media (max-width: 500px) { .board-grid { columns: 1; } }
.note { position: relative; background: var(--note-bg); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 16px rgba(80,60,20,.08); border-top: 4px solid var(--cat, var(--accent)); overflow: hidden; }
html[data-theme="dark"] .note { box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.3); }
.note::before { content: ''; position: absolute; top: 5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--cat, var(--accent)); box-shadow: 0 2px 3px rgba(0,0,0,.25), inset -2px -2px 0 rgba(0,0,0,.15); z-index: 2; }
.note-pinned { box-shadow: 0 0 0 2px var(--cat), 0 6px 16px rgba(80,60,20,.12); }
.note-img { display: block; height: 150px; overflow: hidden; background: var(--img-bg); cursor: zoom-in; }
.note-img img { width: 100%; height: 100%; object-fit: cover; }
.note-body { padding: 20px 15px 13px; }
.note-img + .note-body { padding-top: 12px; }
.note-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.note-cat { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--cat); }
html[data-theme="dark"] .note-cat { color: color-mix(in srgb, var(--cat) 70%, #fff); }
.note-date { font-size: 0.65rem; color: var(--muted); white-space: nowrap; }
.note-title { font-size: 0.92rem; font-weight: 600; line-height: 1.35; margin-bottom: 4px; color: var(--text); }
.note-text { font-size: 0.78rem; color: var(--note-text); line-height: 1.55; overflow-wrap: anywhere; }
.note-text.clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.note-more { background: none; border: none; padding: 2px 0 0; color: var(--link); font: 600 0.72rem 'Poppins', sans-serif; cursor: pointer; }
.note-contact { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--note-dash); font-size: 0.72rem; color: var(--text-2); }
.note-contact a { color: var(--link); font-weight: 500; }
.note-contact i { font-size: 0.62rem; opacity: .8; margin-right: 2px; }
.board-showall { display: block; margin: 2px auto 0; background: var(--note-bg); border: 1px solid var(--board-line); color: var(--board-ink); border-radius: 999px; padding: 8px 20px; font: 600 0.75rem 'Poppins', sans-serif; cursor: pointer; }
.board-showall:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ── Busstider ── */
#traffic-section { max-width: var(--max-w); margin: 26px auto 0; padding: 0 16px; }
#traffic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { #traffic-grid { grid-template-columns: 1fr; } }
.station { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border-soft); overflow: hidden; }
.station-header { padding: 10px 14px 0; }
.station-name { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.tabs { display: flex; padding: 5px 12px 0; gap: 2px; }
.tab-btn { background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-family: 'Poppins', sans-serif; font-size: 0.7rem; font-weight: 500; padding: 4px 7px 5px; cursor: pointer; transition: color .15s, border-color .15s; white-space: nowrap; }
.tab-btn.active { color: var(--accent-strong); border-bottom-color: var(--accent); font-weight: 600; }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-divider { height: 1px; background: var(--border); margin: 0 14px; }
.board { width: 100%; border-collapse: collapse; }
.board th { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 4px; text-align: left; border-bottom: 1px solid var(--border); }
.board tbody tr { border-bottom: 1px solid var(--border-soft); transition: background .1s; }
.board tbody tr:last-child { border-bottom: none; }
.board tbody tr:hover { background: var(--surface-2); }
.board td { padding: 6px 8px; vertical-align: middle; }
.td-time { font-variant-numeric: tabular-nums; font-size: 0.82rem; font-weight: 600; color: var(--text); white-space: nowrap; width: 50px; }
.td-time .rt-time { color: var(--green); }
.td-time .sched { font-size: 0.6rem; font-weight: 400; color: var(--muted); text-decoration: line-through; display: block; line-height: 1.1; }
.delayed { color: var(--orange) !important; }
.line-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; padding: 2px 6px; border-radius: 5px; min-width: 28px; text-align: center; }
.cat-train, .line-badge { background: var(--line-train-bg); color: var(--line-train); }
.cat-bus { background: var(--line-bus-bg); color: var(--line-bus); }
.cat-tram { background: var(--line-tram-bg); color: var(--line-tram); }
.cat-ferry { background: var(--line-ferry-bg); color: var(--line-ferry); }
.td-direction { color: var(--text); font-size: 0.78rem; }
.td-track { font-size: 0.72rem; color: var(--muted); text-align: center; width: 28px; }
.td-countdown { font-size: 0.68rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; width: 48px; padding-right: 12px !important; }
.cd-now { color: var(--green); font-weight: 700; animation: pulse .9s ease-in-out infinite; }
.cd-soon { color: var(--red); font-weight: 600; }
.cd-close { color: var(--orange); }
.cd-far { color: var(--muted); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.cancelled-row td { color: var(--red) !important; opacity: .6; text-decoration: line-through; }
.cancelled-row .line-badge { background: var(--red-soft); color: var(--red); }
.expand-btn { display: block; width: 100%; background: none; border: none; border-top: 1px solid var(--border); color: var(--muted); font-family: 'Poppins', sans-serif; font-size: 0.66rem; padding: 7px; cursor: pointer; text-align: center; transition: background .15s, color .15s; }
.expand-btn:hover { background: var(--surface-2); color: var(--link); }
.board tbody tr.hidden-row { display: none; }
.empty-state { padding: 16px 12px; text-align: center; color: var(--muted); font-size: 0.72rem; }
#traffic-loading { padding: 16px; text-align: center; color: var(--muted); font-size: 0.72rem; }
.dot-anim::after { content: ''; animation: dots 1.5s steps(4,end) infinite; }
@keyframes dots { 0%{content:''} 25%{content:'.'} 50%{content:'..'} 75%{content:'...'} }

/* ── Platser ── */
#content { padding: 30px 0 10px; }
#content .inner { display: flex; flex-direction: column; gap: 34px; }
.category-box-area { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 720px) { .category-box-area { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .category-box-area { grid-template-columns: 1fr; } }
.category-box-content {
  background: var(--panel); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow); border: 1px solid var(--border-soft);
  transition: box-shadow .18s, transform .18s;
}
@media (hover: hover) { .category-box-content:hover { box-shadow: var(--shadow-lg); } }
.category-box-content-image { flex-shrink: 0; }
.category-box-content-image img { width: 100%; height: 150px; object-fit: cover; display: block; }
.category-box-content-title { font-size: 0.92rem; font-weight: 600; padding: 14px 15px 6px; color: var(--text); line-height: 1.35; }
.category-box-content-body { font-size: 0.78rem; color: var(--text-2); padding: 0 15px 12px; flex: 1; line-height: 1.65; }
.category-box-content-body a { color: var(--link); display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.category-box-content-body a:hover { color: var(--link-hover); }
.category-box-content-body i { color: inherit; }
.category-box-content-buttons { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 10px 15px 13px; border-top: 1px solid var(--border-soft); margin-top: auto; }
.category-box-content-buttons a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); font-size: 0.8rem; transition: background 0.15s, color 0.15s; flex-shrink: 0; }
.category-box-content-buttons a:hover { background: var(--accent); color: var(--on-accent); }
.category-box-content-buttons a[style*="--accent"] { color: var(--on-accent) !important; }
.category-box-content-buttons .sep { color: var(--border); font-size: 0.8rem; line-height: 1; }
.category-box-content-buttons .btn-contact { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Öppet nu */
.open-status { display: flex; width: fit-content; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 600; margin-bottom: 4px; }
.open-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.open-status:empty { display: none; }
.open-status.is-open { color: var(--green); }
.open-status.is-closing { color: var(--orange); }
.open-status.is-closed { color: var(--muted); }
.open-status.is-opening { color: var(--link); }
.open-status.is-inline { display: inline-flex; }
.hours-exception, .place-notice { color: var(--red); }
.place-notice { font-weight: 500; }
.place-info { color: var(--muted); }
a.menu-pdf::after { content: ' (PDF)'; font-size: 0.65rem; }

/* Bildspel */
.img-slider { position: relative; overflow: hidden; background: var(--img-bg); }
.img-slider-track { display: flex; transition: transform 0.35s ease; height: 150px; }
.img-slider-track img { min-width: 100%; width: 100%; height: 150px; object-fit: cover; flex-shrink: 0; display: block; }
.img-slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.32); color: #fff; border: none; width: 28px; height: 28px; border-radius: 50%; font-size: 0.7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; transition: background 0.15s, opacity .15s; padding: 0; line-height: 1; touch-action: manipulation; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.img-slider-btn:hover { background: rgba(0,0,0,0.6); }
@media (hover: hover) { .img-slider-btn { opacity: 0; } .img-slider:hover .img-slider-btn, .img-slider-btn:focus-visible { opacity: 1; } }
.img-slider-btn.prev { left: 8px; }
.img-slider-btn.next { right: 8px; }
.img-slider[data-count="1"] .img-slider-btn { display: none; }
.img-slider-dots { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; }
.img-slider-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.55); border: none; padding: 0; cursor: pointer; transition: background 0.15s, width 0.2s; }
.img-slider-dot.active { background: #fff; width: 16px; }
.img-slider[data-count="1"] .img-slider-dots { display: none; }
.photo-cred { position: absolute; bottom: 7px; left: 9px; background: rgba(0,0,0,0.45); color: rgba(255,255,255,0.88); font-size: 0.58rem; padding: 2px 7px; border-radius: 999px; pointer-events: none; z-index: 3; letter-spacing: 0.03em; }
.img-badge, .place-when {
  position: absolute; top: 10px; z-index: 3; color: #fff;
  font-size: 0.62rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); white-space: nowrap;
}
.img-badge { left: 10px; background: var(--chip-dark); pointer-events: auto; cursor: pointer; }
.place-when { right: 10px; pointer-events: none; }
.place-when:empty { display: none; }
.place-when.is-open { background: var(--green); }
html[data-theme="dark"] .place-when.is-open { background: #1f8a48; }
.place-when.is-closing { background: #c47a00; }
.place-when.is-closed { background: var(--chip-dark); }

/* Lightbox */
#lightbox-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 10000; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
#lightbox-overlay.open { display: flex; }
#lightbox-overlay img { max-width: min(92vw, 960px); max-height: 90vh; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.6); cursor: default; width: auto; height: auto; }
#lightbox-close { position: fixed; top: 14px; right: 18px; background: none; border: none; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; opacity: 0.7; z-index: 10001; }
#lightbox-close:hover { opacity: 1; }
#lightbox-caption { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-size: 0.78rem; white-space: nowrap; pointer-events: none; }
a[data-lightbox] { cursor: zoom-in; }
#lightbox-prev, #lightbox-next { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 1.1rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; z-index: 10001; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
#lightbox-prev:hover, #lightbox-next:hover { background: rgba(255,255,255,0.3); }
#lightbox-prev { left: 16px; }
#lightbox-next { right: 16px; }
#lightbox-prev.hidden, #lightbox-next.hidden { display: none; }

/* ── Karta ── */
#map-section { margin-top: 26px; background: var(--panel); border-top: 1px solid var(--border); }
.map-head { max-width: var(--max-w); margin: 0 auto !important; padding: 20px 16px 16px; }
#everod-map { height: 440px; width: 100%; position: relative; overflow: hidden; background: var(--img-bg); }
#everod-map:focus { outline: none; }
html[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.55); }
html[data-theme="dark"] .leaflet-container { background: #1d211d; }
.leaflet-container { font-family: 'Poppins', sans-serif; }
.leaflet-popup-content-wrapper { border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); }
.leaflet-popup-tip-container { display: none; }
.leaflet-popup-content { margin: 6px 8px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
html[data-theme="dark"] .leaflet-bar a { background: var(--panel); color: var(--text); border-bottom-color: var(--border); }
html[data-theme="dark"] .leaflet-bar { border-color: var(--border); }
html[data-theme="dark"] .leaflet-control-attribution { background: rgba(26,30,26,.8); color: var(--muted); }
html[data-theme="dark"] .leaflet-control-attribution a { color: var(--link); }
.custom-marker { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--panel); border: 2px solid var(--accent); border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.25); font-size: 14px; }
.map-popup { padding: 8px 12px; min-width: 160px; font-family: 'Poppins', sans-serif; }
.map-popup-title { font-size: 0.82rem; font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.map-popup-sub { font-size: 0.72rem; color: var(--muted); line-height: 1.5; }
.leaflet-container a.map-popup-btn, .map-popup-btn { color: var(--on-accent); text-decoration: none; }
.map-popup-btn:hover { background: var(--accent-strong); }
.map-popup-btn { margin-top: 6px; background: var(--accent); color: var(--on-accent); border: none; border-radius: 999px; padding: 4px 10px; font-family: 'Poppins', sans-serif; font-size: 0.65rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.my-pos-dot { width: 16px; height: 16px; background: #679c3c; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
#map-locate-btn { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1000; background: var(--accent); color: var(--on-accent); border: none; border-radius: 999px; padding: 9px 18px; font-family: 'Poppins', sans-serif; font-size: 0.76rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 14px rgba(0,0,0,0.25); transition: background 0.15s, transform 0.1s; white-space: nowrap; }
#map-locate-btn:hover { background: var(--accent-strong); transform: translateX(-50%) translateY(-1px); }
#map-locate-btn:active { transform: translateX(-50%) translateY(0); }
#map-locate-btn:disabled { background: var(--muted); cursor: default; transform: translateX(-50%); }
#map-recenter-btn { position: absolute; bottom: 24px; right: 12px; z-index: 1000; background: var(--panel); color: var(--accent); border: 2px solid var(--accent); border-radius: 50%; width: 40px; height: 40px; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: background 0.15s, color 0.15s; }
#map-recenter-btn:hover { background: var(--accent); color: var(--on-accent); }
@keyframes map-pulse { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(3.5); opacity: 0; } }
.map-pulse-ring { width: 32px; height: 32px; border: 3px solid var(--accent); border-radius: 50%; animation: map-pulse 1.5s ease-out infinite; }

/* Resvägar */
#time-to-nearby { background: var(--panel); text-align: center; padding: 16px; font-size: 0.95rem; color: var(--text-2); font-weight: 500; border-bottom: 1px solid var(--border); }
#time-to-nearby i { color: var(--accent); margin-right: 6px; }

/* ── Trafikkameror ── */
#camera-section { max-width: var(--max-w); margin: 28px auto 0; padding: 0 16px; }
#cam-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 500px) { #cam-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.cam-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: box-shadow .15s, transform .15s; }
@media (hover: hover) { .cam-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
.cam-img-wrap { position: relative; width: 100%; padding-top: 60%; background: #111; overflow: hidden; }
.cam-img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); display: block; transition: opacity .3s; }
.cam-img-wrap img.loading { opacity: .2; }
.cam-badge { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.62); color: #fff; font-size: 0.6rem; font-weight: 600; padding: 3px 8px; border-radius: 8px; letter-spacing: .03em; line-height: 1.45; display: flex; flex-direction: column; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cam-badge-name { font-size: 0.65rem; font-weight: 700; }
.cam-badge-dir { font-size: 0.57rem; font-weight: 500; opacity: .85; }
#cam-upd { font-size: 0.62rem; color: var(--muted); text-align: right; margin: 10px 0 24px; }

/* ── Om Everöd ── */
#about-section { position: relative; margin-top: 24px; background-image: url('../images/background.jpg'); background-size: cover; background-position: center; background-attachment: fixed; }
@media (max-width: 768px) { #about-section { background-attachment: scroll; } }
#about-section::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,8,.72) 0%, rgba(10,16,8,.6) 50%, rgba(10,16,8,.78) 100%); }
.about-inner { position: relative; max-width: var(--max-w); margin: 0 auto; padding: 48px 24px 52px; text-align: center; }
.about-icon { font-size: 2rem; margin-bottom: 10px; line-height: 1; }
.about-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 18px; letter-spacing: -0.01em; }
.about-body { max-width: 640px; margin: 0 auto; }
.about-body p { font-size: 0.86rem; color: rgba(255,255,255,.86); line-height: 1.85; margin-bottom: 14px; }
.about-tagline { font-size: 0.88rem !important; font-weight: 600; color: #a9d681 !important; font-style: italic; margin-top: 22px; margin-bottom: 0 !important; }

/* ── Sidfot ── */
#footer { background: var(--footer-bg); color: var(--footer-ink); }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 26px 16px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; font-size: 0.78rem; }
.footer-title { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 4px; display: inline-flex; align-items: center; gap: 8px; }
.footer-contact a { color: #fff; font-weight: 600; }
.footer-contact a:hover { color: #d6efbf; }
.footer-copy { font-size: 0.72rem; opacity: .8; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); width: 100%; max-width: 520px; }
.footer-copy strong { color: #fff; }

/* Till toppen */
#scroll-top-btn { position: fixed; bottom: 20px; right: 20px; width: 44px; height: 44px; background: var(--accent); color: var(--on-accent); border: none; border-radius: 50%; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.22); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 9990; }
#scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
#scroll-top-btn:hover { transform: translateY(-2px); }
#scroll-top-btn:active { transform: translateY(0); }

/* Installationspopup */
#install-popup { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 420px; background: #2d6b4b; color: #eaf6ef; border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); z-index: 9999; display: none; animation: slideUp 0.3s ease; }
#install-popup.visible { display: flex; flex-direction: column; gap: 8px; }
@keyframes slideUp { from { opacity:0; transform: translateX(-50%) translateY(20px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
#install-popup .ip-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
#install-popup .ip-title { font-size: 0.82rem; font-weight: 600; }
#install-popup .ip-body { font-size: 0.75rem; color: rgba(234,246,239,0.78); line-height: 1.55; }
#install-popup .ip-body b { color: #fff; font-weight: 600; }
#install-popup .ip-close { background: none; border: none; color: rgba(234,246,239,0.55); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 0 0 8px; flex-shrink: 0; }
#install-popup .ip-close:hover { color: #fff; }

/* ═══ Inskickssidan (skicka.php) ═══ */
.submit-page #header { border-bottom: 1px solid var(--border); }
.submit-page #header .inner { flex-direction: row; justify-content: space-between; }
.submit-head-right { display: flex; align-items: center; gap: 12px; }
.submit-back { font-size: 0.8rem; font-weight: 600; color: var(--link); display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 540px) { .submit-page #header img { width: 150px; } .submit-back { font-size: 0.74rem; } }
.submit-wrap { max-width: 680px; margin: 0 auto; padding: 28px 16px 48px; }
.submit-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.submit-lead { color: var(--text-2); font-size: 0.86rem; margin-bottom: 20px; }
.submit-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.submit-tabs a { background: var(--panel); border: 2px solid var(--border); border-radius: 14px; padding: 13px 15px; font-weight: 600; font-size: 0.92rem; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--text); transition: border-color .15s; }
.submit-tabs a:hover { border-color: var(--accent-line); }
.submit-tabs a span { font-size: 1.2rem; }
.submit-tabs a small { flex-basis: 100%; font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.submit-tabs a.active { border-color: var(--accent); background: var(--accent-soft); }
.submit-card { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border-soft); padding: 22px; }
.submit-form fieldset { border: none; margin: 0 0 18px; padding: 0; }
.submit-form legend { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; color: var(--text); }
.sf { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; font-weight: 600; margin-bottom: 12px; flex: 1; color: var(--text); }
.sf small { color: var(--muted); font-weight: 400; }
.sf input[type=text], .sf input[type=email], .sf input[type=tel], .sf input[type=date], .sf select, .sf textarea {
  font: 400 16px 'Poppins', sans-serif; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.sf input:focus, .sf select:focus, .sf textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.sf input[type=file] { font: 400 0.8rem 'Poppins', sans-serif; color: var(--text-2); }
.sf-row { display: flex; gap: 12px; }
@media (max-width: 540px) { .sf-row { flex-direction: column; gap: 0; } }
.sc { display: flex; gap: 10px; align-items: flex-start; font-size: 0.78rem; line-height: 1.5; margin-bottom: 10px; cursor: pointer; color: var(--text-2); }
.sc input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.submit-page ::placeholder { color: var(--placeholder); font-style: italic; opacity: 1; }
.submit-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--on-accent); border: none; border-radius: 999px; padding: 12px 24px; font: 600 0.9rem 'Poppins', sans-serif; cursor: pointer; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent); transition: background .15s; }
.submit-btn:hover { background: var(--accent-strong); }
.submit-btn:disabled { opacity: .6; cursor: default; }
.submit-btn-ghost { background: var(--panel); color: var(--link); border: 1px solid var(--accent); box-shadow: none; }
.submit-btn-ghost:hover { background: var(--accent-soft); }
.submit-note { font-size: 0.72rem; color: var(--muted); margin-top: 10px; }
.submit-errors { background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); color: var(--red); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 0.82rem; }
.submit-errors ul { margin: 6px 0 0 18px; }
.submit-thanks { text-align: center; padding: 38px 24px; }
.submit-thanks-icon { font-size: 2.6rem; }
.submit-thanks h1 { font-size: 1.4rem; margin: 6px 0; }
.submit-thanks p { color: var(--text-2); font-size: 0.88rem; margin-bottom: 10px; }
.submit-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Inskick: förhandsvisning av evenemangsbild */
.ev-img { display: flex; gap: 14px; align-items: center; margin-top: 2px; font-weight: 400; }
.ev-img img, .ev-img-empty { width: 180px; height: 100px; flex-shrink: 0; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.ev-img-empty { display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--placeholder); font-size: 1.8rem; }
.ev-img-empty[hidden], .ev-img img[hidden] { display: none; }
.ev-img-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ev-img-note { font-size: 0.75rem; color: var(--muted); line-height: 1.45; }
.ev-img-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--link); border-radius: 999px; padding: 6px 14px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.ev-img-btn:hover { background: var(--accent); color: var(--on-accent); }
.ev-img-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ev-img-btn:focus-within { outline: 2px solid var(--focus); }
.ev-img-clear { background: none; border: none; padding: 0; color: var(--red); font: 500 0.72rem 'Poppins', sans-serif; cursor: pointer; }
@media (max-width: 480px) { .ev-img { flex-direction: column; align-items: stretch; } .ev-img img, .ev-img-empty { width: 100%; height: 150px; } }

/* Mindre rörelse för den som vill det */
@media (max-width: 540px) {
  .section-title, .events-header, .board-header, .police-header, .category-title { font-size: 1rem; }
  .section-title > i, .events-header > span > i, .board-header > span > i, .police-header > i, .cat-icon { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═══════════════ Nytt: sidhuvud med väder, idag-rad, sök, filter, varningar ═══════════════ */

/* Sidhuvud: datum + namnsdag och en kompakt väderknapp */
#header-info { flex-direction: row; align-items: center; gap: 14px; }
.header-text { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.weather-chip {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  min-height: 44px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--weather-bg); color: var(--weather-ink); border: 1px solid color-mix(in srgb, var(--weather-ink) 10%, transparent);
  font: 500 0.8rem 'Poppins', sans-serif; cursor: pointer; transition: background .15s, box-shadow .15s;
}
.weather-chip:hover:not(:disabled), .weather-chip.open { background: var(--weather-hover); box-shadow: var(--shadow-sm); }
.weather-chip:disabled { cursor: default; }
.wc-symbol { font-size: 1.3rem; line-height: 1; }
.wc-temp { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; }
.wc-wind { font-size: 0.72rem; color: var(--weather-ink-2); }
.wc-warn { font-size: 0.85rem; }
.wc-arrow { font-size: 0.6rem; color: var(--weather-ink-2); transition: transform .25s; }
.weather-chip.open .wc-arrow { transform: rotate(180deg); }
.wc-error { font-size: 0.72rem; color: var(--weather-ink-2); }
@media (max-width: 540px) {
  #header-info { flex-direction: row; flex-wrap: nowrap; justify-content: space-between; gap: 10px; }
  .header-text { align-items: flex-start; text-align: left; }
  #header-info .header-text { flex-direction: column; gap: 0; }
  .weather-chip { min-height: 40px; padding: 4px 10px 4px 8px; }
  .wc-wind { display: none; }
}
.weather-panel { border-top: 1px solid transparent; }
.weather-panel.open { border-top-color: var(--border-soft); }
.wp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 0.9rem; }
.wp-place { font-weight: 700; font-size: 0.95rem; color: var(--weather-ink); }
.wp-now { font-size: 0.8rem; color: var(--weather-ink-2); }
.wp-close { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--weather-tile); color: var(--weather-ink); cursor: pointer; font-size: 0.9rem; }
.wp-close:hover { background: var(--panel); }

/* Runda knappar i menyraden (sök) */
.nav-round { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border-soft); cursor: pointer; font-size: 0.9rem; padding: 0; transition: background .15s, color .15s; }
.nav-round:hover, .nav-round.active { background: var(--accent-soft); color: var(--accent-strong); }

/* Sökpanelen */
.search-panel { border-top: 1px solid var(--border-soft); background: var(--panel); box-shadow: var(--shadow-lg); }
.search-inner { max-width: var(--max-w); margin: 0 auto; padding: 12px 16px 14px; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 0 6px 0 14px; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.search-box > i { color: var(--muted); }
#search-input { flex: 1; min-width: 0; border: none; background: none; outline: none; font: 400 16px 'Poppins', sans-serif; color: var(--text); padding: 12px 0; }
#search-input::placeholder { color: var(--placeholder); }
#search-input::-webkit-search-cancel-button { display: none; }
.search-close { width: 36px; height: 36px; border-radius: 50%; border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; }
.search-close:hover { background: var(--surface-3); color: var(--text); }
.search-results { list-style: none; margin-top: 8px; max-height: min(60vh, 460px); overflow-y: auto; }
.search-results li[data-i] { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.search-results li[data-i] > i:first-child { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; }
.search-results li span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-results li b { font-weight: 600; font-size: 0.86rem; color: var(--text); }
.search-results li small { font-size: 0.7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results li mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-results li.sel, .search-results li[data-i]:hover { background: var(--surface-3); }
.sr-go { color: var(--muted); font-size: 0.7rem; }
.search-hint { padding: 12px; font-size: 0.8rem; color: var(--muted); }

/* Idag i Everöd */
.today { background: var(--bg); border-bottom: 1px solid var(--border-soft); }
.today-inner { max-width: var(--max-w); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.today-label { font-size: 0.64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.today-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; }
.today-chips::-webkit-scrollbar { display: none; }
.today-chip {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  background: var(--panel); border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  border-radius: 999px; padding: 7px 13px 7px 10px; font: 400 0.75rem 'Poppins', sans-serif; color: var(--text-2);
  white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s;
}
.today-chip[hidden] { display: none; }
.today-chip b { color: var(--text); font-weight: 600; }
.today-chip:hover { border-color: var(--accent-line); }
.today-chip.is-info { cursor: default; background: color-mix(in srgb, var(--orange) 9%, var(--panel)); border-color: color-mix(in srgb, var(--orange) 25%, transparent); }
.today-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.today-chip.active b { color: var(--on-accent); }
.tc-icon { font-size: 0.95rem; line-height: 1; }
.tc-muted { color: var(--muted); }
.tc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); flex-shrink: 0; }
.today-chip.active .tc-dot { background: var(--on-accent); box-shadow: none; }
@media (max-width: 640px) {
  .today-label { display: none; }
  .today-inner { padding: 10px 0 10px 16px; }
  .today-chips { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 32px); mask-image: linear-gradient(to left, transparent 0, #000 32px); padding-right: 24px; }
}

/* Filter "Öppet nu" */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 14px; padding: 10px 14px; font-size: 0.8rem; font-weight: 500; position: sticky; top: calc(var(--nav-h) + 8px); z-index: 5; }
.filter-bar > span { display: inline-flex; align-items: center; gap: 9px; }
.filter-bar button { background: var(--panel); border: 1px solid var(--accent-line); color: var(--link); border-radius: 999px; padding: 5px 12px; font: 600 0.74rem 'Poppins', sans-serif; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.filter-bar button:hover { background: var(--accent); color: var(--on-accent); }
body.only-open .category-box-content:not([data-open="1"]) { display: none; }
.filter-empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* Laddningsytor (skelett) */
.skel { display: inline-block; height: 0.8em; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--border-soft) 40%, var(--surface-3) 80%); background-size: 200% 100%; animation: skel 1.3s ease-in-out infinite; vertical-align: middle; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-chip { width: 90px; height: 18px; border-radius: 999px; }
.skel-text { width: 180px; height: 11px; }
.skel-row { display: block; width: 100%; height: 22px; border-radius: 8px; margin-top: 10px; }
.traffic-skel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 !important; }
.skel-card { padding: 14px; }
@media (max-width: 620px) { .traffic-skel { grid-template-columns: 1fr; } }
#news-loading { gap: 30px; }

/* Platskort: dagens tider, "Alla tider" och helgdagar */
.hours-more { margin: 1px 0 2px; }
.hours-more summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hours-more summary::-webkit-details-marker { display: none; }
.hm-label { color: var(--muted); }
.hm-today { color: var(--text); font-weight: 500; }
.hm-today.is-closed { color: var(--muted); }
.hm-toggle { margin-left: auto; font-size: 0.68rem; font-weight: 600; color: var(--link); display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); }
.hm-toggle i { font-size: 0.55rem; transition: transform .2s; }
.hours-more[open] .hm-toggle i { transform: rotate(180deg); }
.hours-week { display: block; margin: 6px 0 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 0.76rem; line-height: 1.7; }
.hours-holiday { color: var(--orange); font-size: 0.74rem; }
.hours-holiday i { font-size: 0.68rem; margin-right: 2px; }

/* Evenemangskort: hela kortet är klickbart */
.event-card { cursor: pointer; }
.event-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.events-subscribe { margin: 2px 0 6px; font-size: 0.74rem; text-align: right; }
.events-subscribe a { color: var(--link); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.events-subscribe a:hover { color: var(--link-hover); }
.ev-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.ev-act { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: 600 0.75rem 'Poppins', sans-serif; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.ev-act:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.ev-act-main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ev-act-main:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }

/* Anslag: rubrik är länk, dela-knapp */
.note-title a { color: inherit; }
.note-title a:hover { color: var(--link); }
.note-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.note-share { background: none; border: none; padding: 3px 0; color: var(--muted); font: 500 0.7rem 'Poppins', sans-serif; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.note-share:hover { color: var(--link); }

/* Varningar och VMA överst */
.alert { border-bottom: 1px solid rgba(0,0,0,.08); }
.alert-inner { max-width: var(--max-w); margin: 0 auto; padding: 10px 16px; display: flex; align-items: flex-start; gap: 12px; }
.alert-badge { flex-shrink: 0; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; margin-top: 1px; white-space: nowrap; }
.alert-text { flex: 1; min-width: 0; font-size: 0.8rem; line-height: 1.5; }
.alert-text b { font-weight: 600; }
.alert-text p { margin: 3px 0 0; }
.alert-meta { display: block; font-size: 0.7rem; opacity: .85; margin-top: 2px; }
.alert-meta a { text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.alert details { margin-top: 4px; font-size: 0.74rem; }
.alert summary { cursor: pointer; font-weight: 600; }
.alert-close { background: none; border: none; color: inherit; opacity: .7; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.alert-close:hover { opacity: 1; background: rgba(0,0,0,.08); }
.alert.is-yellow { background: #fff6cc; color: #4a3b00; }
.alert.is-yellow .alert-badge { background: #f5c400; color: #3d3000; }
.alert.is-orange { background: #ffe6cf; color: #5a2a00; }
.alert.is-orange .alert-badge { background: #f07d00; color: #fff; }
.alert.is-red, .alert.is-vma { background: #fde0e0; color: #5c0b0b; }
.alert.is-red .alert-badge, .alert.is-vma .alert-badge { background: #c81e1e; color: #fff; }
.alert.is-vma { border-bottom: 3px solid #c81e1e; }
html[data-theme="dark"] .alert.is-yellow { background: #3a3207; color: #fbeaa5; }
html[data-theme="dark"] .alert.is-orange { background: #3d2408; color: #ffd2a8; }
html[data-theme="dark"] .alert.is-red, html[data-theme="dark"] .alert.is-vma { background: #3d1111; color: #ffc9c9; }

/* Litet meddelande längst ner ("Länken är kopierad") */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 10050; background: #1b1f18; color: #fff; padding: 11px 18px; border-radius: 999px; font: 500 0.8rem 'Poppins', sans-serif; box-shadow: 0 8px 28px rgba(0,0,0,.3); transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
html[data-theme="dark"] .toast { background: #e7ebe3; color: #111411; }

/* ═══════════════ Egna sidor för evenemang och anslag ═══════════════ */
.sub-page #header { border-bottom: 1px solid var(--border); }
.sub-page #header .inner { flex-direction: row; justify-content: space-between; }
@media (max-width: 540px) { .sub-page #header img { width: 150px; } }
.detail-wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.detail-card { background: var(--panel); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border-soft); }
.detail-hero { position: relative; display: block; height: 300px; background: var(--img-bg); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-noimg { height: 150px; background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface-2) 75%); display: flex; align-items: center; justify-content: flex-end; padding-right: 28px; }
.detail-hero-emoji { font-size: 3.4rem; }
.detail-date { top: 16px; left: 16px; transform: scale(1.15); transform-origin: top left; }
.detail-hero-noimg .detail-date { top: 50%; transform: translateY(-50%) scale(1.15); }
.detail-hero .event-when { top: 16px; right: 16px; font-size: 0.7rem; padding: 4px 12px; }
.event-when.is-past { background: var(--chip-dark); }
.detail-body { padding: 22px 24px 26px; }
.detail-kicker { font-size: 0.68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 4px; }
.note-detail .detail-kicker { color: var(--cat); }
html[data-theme="dark"] .note-detail .detail-kicker { color: color-mix(in srgb, var(--cat) 70%, #fff); }
.note-detail { border-top: 5px solid var(--cat); }
.detail-title { font-size: 1.6rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; margin-bottom: 14px; }
.detail-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; margin-bottom: 16px; font-size: 0.86rem; color: var(--text); }
.detail-facts li { display: inline-flex; align-items: center; gap: 8px; }
.detail-facts i { color: var(--accent); width: 14px; text-align: center; }
.detail-facts a { color: var(--link); font-weight: 500; }
.detail-text { font-size: 0.92rem; line-height: 1.75; color: var(--text-2); margin-bottom: 20px; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-actions .submit-btn { padding: 10px 18px; font-size: 0.84rem; }
.detail-note { margin-top: 14px; font-size: 0.74rem; color: var(--muted); }
.detail-contact { margin: 0 0 18px; }
.detail-more-title { font-size: 1.05rem; font-weight: 700; margin: 30px 0 12px; }
.detail-more { display: flex; flex-direction: column; gap: 8px; }
.detail-more-item { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-sm); transition: border-color .15s; }
.detail-more-item:hover { border-color: var(--accent-line); }
.detail-more-date { display: flex; flex-direction: column; align-items: center; min-width: 44px; padding: 4px 6px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.6rem; font-weight: 600; text-transform: uppercase; }
.detail-more-date b { font-size: 1.1rem; line-height: 1.1; }
.detail-more-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.detail-more-text b { font-size: 0.86rem; font-weight: 600; }
.detail-more-text small { font-size: 0.72rem; color: var(--muted); }
.detail-more-item > i { color: var(--muted); font-size: 0.7rem; }
.detail-subscribe { margin-top: 16px; font-size: 0.8rem; text-align: center; }
.detail-subscribe a { color: var(--link); font-weight: 500; }
.detail-empty { text-align: center; padding: 40px 24px; }
.detail-empty-icon { font-size: 2.6rem; }
.detail-empty h1 { font-size: 1.3rem; margin: 6px 0; }
.detail-empty p { color: var(--text-2); margin-bottom: 12px; }
.sub-page .footer-copy a { color: #fff; font-weight: 600; margin-left: 6px; }
@media (max-width: 540px) {
  .detail-wrap { padding: 16px 12px 40px; }
  .detail-hero { height: 220px; }
  .detail-body { padding: 18px 18px 22px; }
  .detail-title { font-size: 1.3rem; }
}

/* ═══════════════ Platssidor (/plats/…) ═══════════════ */

/* Kortets rubrik leder till platssidan */
a.category-box-content-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; color: var(--text); }
a.category-box-content-title .card-more { font-size: 0.62rem; color: var(--muted); margin-top: 5px; opacity: .55; transition: opacity .15s, transform .15s, color .15s; }
a.category-box-content-title:hover { color: var(--link); }
a.category-box-content-title:hover .card-more { opacity: 1; transform: translateX(2px); color: var(--link); }

.place-detail .detail-hero > a { display: block; height: 100%; cursor: zoom-in; }
.place-hero .place-hero-badge { left: 16px; top: 16px; font-size: 0.7rem; padding: 4px 12px; pointer-events: none; }
.place-hero .place-when { top: 16px; right: 16px; font-size: 0.7rem; padding: 4px 12px; }
.place-hero .photo-cred { left: 14px; bottom: 12px; }
.detail-kicker a { color: inherit; }
.detail-kicker a:hover { color: var(--link-hover); }
.place-status { margin: -6px 0 14px; }
.place-status .open-status { font-size: 0.84rem; margin: 0; }
.place-alert { background: var(--red-soft); color: var(--red); border-radius: 12px; padding: 10px 14px; font-size: 0.84rem; font-weight: 500; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; }
.place-alert i { margin-top: 4px; }
.place-actions { margin: 4px 0 20px; }
.place-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .place-grid { grid-template-columns: 1fr 1fr; } .place-grid > .place-box:only-child, .place-grid > .place-box:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.place-box { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px 18px; }
.place-box h2 { font-size: 0.92rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.place-box h2 i { color: var(--accent); font-size: 0.85rem; }
.place-box h3 { font-size: 0.78rem; font-weight: 700; margin: 12px 0 4px; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.place-box p { font-size: 0.84rem; color: var(--text-2); line-height: 1.65; margin-bottom: 6px; }
.place-box .detail-text { font-size: 0.86rem; margin-bottom: 8px; }
.place-box .detail-text:last-child { margin-bottom: 0; }
.place-info-block { padding-top: 8px; border-top: 1px dashed var(--border); }
.place-box a { color: var(--link); font-weight: 500; }
.hours-list { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.hours-list th, .hours-list td { padding: 6px 4px; border-bottom: 1px solid var(--border-soft); text-align: left; font-weight: 400; color: var(--text-2); }
.hours-list tr:last-child th, .hours-list tr:last-child td { border-bottom: none; }
.hours-list td { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.hours-list tr.is-closed td { color: var(--muted); }
.hours-list tr.is-today th, .hours-list tr.is-today td { font-weight: 600; color: var(--text); }
.hours-list tr.is-today { background: var(--accent-soft); }
.hours-list tr.is-today th { border-radius: 8px 0 0 8px; padding-left: 8px; }
.hours-list tr.is-today td { border-radius: 0 8px 8px 0; padding-right: 8px; }
.hl-today { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-strong); margin-left: 4px; }
.place-list { list-style: none; font-size: 0.82rem; line-height: 1.7; }
.place-note { font-style: italic; margin-top: 8px; }
.place-box .hours-holiday { font-size: 0.8rem; margin-top: 8px; color: var(--orange); }
.place-links { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; }
.place-links a { display: inline-flex; align-items: center; gap: 8px; }
.place-links i { width: 16px; text-align: center; }
.place-links small { color: var(--muted); font-weight: 400; }
.place-social { display: flex; flex-wrap: wrap; gap: 8px; }
.place-social a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); color: var(--text); font-size: 0.78rem; font-weight: 600; }
.place-social a:hover { border-color: var(--accent-line); color: var(--link); }
.place-aed { background: color-mix(in srgb, var(--red) 7%, var(--surface-2)); border-color: color-mix(in srgb, var(--red) 20%, transparent); }
.place-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.place-gallery a { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--img-bg); cursor: zoom-in; }
.place-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.place-gallery a:hover img { transform: scale(1.04); }
html[data-theme="dark"] .place-gallery img, html[data-theme="dark"] .place-hero img { filter: brightness(.9); }
.place-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.place-chips a { padding: 7px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); font-size: 0.78rem; font-weight: 500; color: var(--text); }
.place-chips a:hover { border-color: var(--accent-line); color: var(--link); }
.place-updated { text-align: center; margin-top: 26px; }
.place-updated a { color: var(--link); }
.place-lightbox { display: none; }
.place-lightbox.open { display: flex; }

/* ═══ Kortets kartknappar: tydligt vad som är Google Maps och vad som är kartan här ═══ */
.category-box-content-buttons { flex-wrap: wrap; row-gap: 8px; }
.cb-maprow { flex-basis: 100%; display: flex; gap: 6px; }
.cb-maprow a { flex: 1; }
/* Om det bara finns kartknappar på kortet behövs ingen andra rad */
.cb-maprow:last-child { margin-bottom: 0; }
.category-box-content-buttons a.cb-route, .category-box-content-buttons a.cb-map {
  width: auto; height: 34px; padding: 0 10px; gap: 6px; border-radius: 10px; font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.category-box-content-buttons a.cb-route { background: var(--accent); color: var(--on-accent); }
.category-box-content-buttons a.cb-route:hover { background: var(--accent-strong); color: var(--on-accent); }
.category-box-content-buttons a.cb-route .cb-ext { font-size: 0.55rem; opacity: .8; }
.category-box-content-buttons a.cb-map { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent-line); }
.category-box-content-buttons a.cb-map:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ═══ Förstora kartan ═══ */
#map-full-btn {
  position: absolute; top: 12px; right: 12px; z-index: 1000;
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,.2);
  font: 600 0.76rem 'Poppins', sans-serif; cursor: pointer; transition: background .15s, color .15s;
}
#map-full-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
#everod-map.is-full { position: fixed !important; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 10020; }
#everod-map.is-full #map-full-btn { top: max(12px, env(safe-area-inset-top)); }
body.map-full-open { overflow: hidden; }
body.map-full-open #scroll-top-btn { display: none; }
@media (max-width: 540px) { #map-full-btn span { display: none; } #map-full-btn { width: 40px; padding: 0; justify-content: center; } }
/* Leaflets zoomknappar till vänster, så att de inte krockar med förstora-knappen */
#everod-map .leaflet-top.leaflet-right { top: 56px; }
.btn-sub { font-weight: 400; opacity: .8; font-size: 0.72em; }
.detail-actions .cb-ext { font-size: 0.6em; opacity: .8; }

/* ═══ Bredare skärmar: fler kort per rad ═══ */
@media (min-width: 1140px) {
  .category-box-area { grid-template-columns: repeat(4, 1fr); }
  .board-grid { columns: 4; }
  .events-track .event-card { width: calc((100% - 3 * 14px) / 4); }
  .police-list { display: grid; grid-template-columns: 1fr 1fr; }
  .police-list:has(> :only-child) { grid-template-columns: 1fr; }
}
@media (min-width: 860px) and (max-width: 1139px) {
  .events-track .event-card { width: calc((100% - 2 * 14px) / 3); }
}
@media (min-width: 1140px) { #cam-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }

/* ═══ Rikare kartrutor för platser ═══ */
.leaflet-popup.popup-place .leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 16px; }
.leaflet-popup.popup-place .leaflet-popup-content { margin: 0; width: auto !important; }
.leaflet-popup.popup-place a.leaflet-popup-close-button { top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font: 18px/26px Tahoma, sans-serif; text-align: center; z-index: 5; }
.leaflet-popup.popup-place a.leaflet-popup-close-button:hover { background: rgba(0,0,0,.7); color: #fff; }
.map-place { padding: 0; min-width: 0; }
.mp-img { position: relative; display: block; height: 130px; background: var(--img-bg); }
.mp-img img { width: 100%; height: 100%; object-fit: cover; }
html[data-theme="dark"] .mp-img img { filter: brightness(.9); }
.mp-img .place-when { top: 10px; left: 10px; right: auto; }
.mp-img .img-badge { top: auto; bottom: 10px; left: 10px; padding: 2px 7px; pointer-events: none; }
.mp-body { padding: 11px 14px 13px; }
.mp-cat { font-size: 0.6rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 1px; }
.map-place .map-popup-title { font-size: 0.92rem; margin-bottom: 4px; padding-right: 0; }
.mp-status { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.mp-status .open-status { margin: 0; font-size: 0.7rem; }
.mp-today { font-size: 0.7rem; color: var(--text-2); }
.map-place .map-popup-sub { margin-bottom: 4px; }
.mp-actions { display: flex; gap: 6px; margin-top: 8px; }
.leaflet-container a.mp-btn, .mp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: 600 0.68rem 'Poppins', sans-serif; cursor: pointer; white-space: nowrap; text-decoration: none; }
.leaflet-container a.mp-btn.mp-main, .mp-btn.mp-main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); flex: 1; }
.leaflet-container a.mp-btn:hover, .mp-btn:hover { border-color: var(--accent); }
.mp-btn.mp-icon { width: 32px; padding: 0; color: var(--text-2); }
.mp-ext { font-size: 0.5rem; opacity: .7; }

/* ═══ Galleri på platssidan ═══ */
.title-count { font-size: 0.75rem; font-weight: 600; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 1px 9px; vertical-align: middle; margin-left: 4px; }
.place-gallery { display: grid; gap: 8px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; }
.place-gallery a { position: relative; aspect-ratio: auto; border-radius: 14px; }
.place-gallery.g-1 { grid-template-columns: 1fr; grid-auto-rows: 320px; }
.place-gallery.g-2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 240px; }
.place-gallery.g-3 { grid-template-columns: 2fr 1fr; grid-auto-rows: 150px; }
.place-gallery.g-3 a:first-child { grid-row: span 2; }
.place-gallery.g-4 { grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 150px; }
.place-gallery.g-4 a:first-child { grid-row: span 2; }
.place-gallery.g-4 a:last-child { grid-column: span 2; }
.place-gallery.g-5 a:first-child { grid-column: span 2; grid-row: span 2; }
.g-more { position: absolute; inset: 0; background: rgba(10,14,8,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; }
.g-cred { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.45); color: rgba(255,255,255,.9); font-size: 0.58rem; padding: 2px 7px; border-radius: 999px; }
@media (max-width: 540px) {
  .place-gallery, .place-gallery.g-3, .place-gallery.g-4, .place-gallery.g-5 { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }
  .place-gallery.g-1 { grid-auto-rows: 220px; }
  .place-gallery.g-2 { grid-auto-rows: 160px; }
  .place-gallery a:first-child, .place-gallery.g-3 a:first-child, .place-gallery.g-4 a:first-child, .place-gallery.g-5 a:first-child { grid-column: span 2; grid-row: span 2; }
  .place-gallery.g-4 a:last-child { grid-column: span 2; }
}
.hero-all { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: none; background: rgba(255,255,255,.92); color: #1b1f18; font: 600 0.74rem 'Poppins', sans-serif; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.hero-all:hover { background: #fff; }
.lb-caption { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.8); font-size: 0.78rem; z-index: 10001; max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
#lb-count { background: rgba(255,255,255,.15); padding: 2px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
#lb-count:empty { display: none; }

/* ═══ Sidfoten ═══ */
#footer { margin-top: 0; }
#footer .footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 32px; text-align: left; align-items: start; padding: 40px 16px 30px; font-size: 0.8rem; }
.ft-logo { display: inline-block; font-size: 1.35rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; margin-bottom: 8px; }
.ft-logo span { color: #a9d681; }
.ft-brand p, .ft-col p { color: var(--footer-ink); line-height: 1.65; margin-bottom: 10px; }
.ft-mail { color: #fff; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.ft-mail:hover, .ft-col a:hover { color: #d6efbf; }
.ft-title { font-size: 0.66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 12px; }
.ft-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.ft-col li a { color: #fff; display: inline-flex; gap: 9px; align-items: center; }
.ft-col li i { width: 14px; text-align: center; color: #a9d681; font-size: 0.75rem; }
.ft-login { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; padding: 8px 15px; border-radius: 999px; font-weight: 600; margin-bottom: 10px; }
.ft-login:hover { background: rgba(255,255,255,.2); color: #fff; }
.ft-small { font-size: 0.72rem; opacity: .85; }
.ft-small a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.fb-inner { max-width: var(--max-w); margin: 0 auto; padding: 14px 16px 18px; display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; font-size: 0.7rem; color: rgba(255,255,255,.65); }
.fb-inner strong { color: #fff; }
@media (max-width: 860px) { #footer .footer-inner { grid-template-columns: 1fr 1fr; gap: 26px 20px; } .ft-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { #footer .footer-inner { grid-template-columns: 1fr; padding-top: 30px; } .fb-inner { flex-direction: column; } }
.place-grid { align-items: start; }

.ft-logo img { width: 190px; height: auto; display: block; margin-bottom: 4px; }

/* Evenemang: pilarna ligger i rubrikraden så att de aldrig täcker korten */
.events-head-actions { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.events-nav { display: inline-flex; gap: 6px; }
.events-nav[hidden] { display: none; }
.events-nav .events-arrow { width: 34px; height: 34px; box-shadow: none; }
@media (hover: none) { .events-nav { display: none; } }

/* Evenemang: luft runt korten så att hover-skuggan inte kapas av scrollytan */
.events-track { padding: 12px 16px 30px; margin: -12px -16px -16px; scroll-padding-inline: 16px; }
@media (hover: hover) {
  .events-track .event-card:hover { transform: translateY(-3px); box-shadow: 0 2px 6px rgba(28,40,16,.07), 0 10px 22px rgba(28,40,16,.11); }
  html[data-theme="dark"] .events-track .event-card:hover { box-shadow: 0 2px 6px rgba(0,0,0,.4), 0 10px 22px rgba(0,0,0,.45); }
}

/* "Hitta hit": valmeny när platsen har både Google Maps och Apple Kartor */
.route-menu { position: fixed; z-index: 10060; min-width: 220px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: rmIn .14s ease; }
@keyframes rmIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.route-menu .rm-head { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 6px 10px 4px; }
.route-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.route-menu a > i:first-child { width: 20px; text-align: center; font-size: 1.05rem; color: var(--accent); }
.route-menu a span { flex: 1; }
.route-menu .rm-ext { font-size: .7rem; opacity: .5; }
.route-menu a:hover, .route-menu a:focus-visible { background: var(--accent-soft); outline: none; }

/* ═══ Bra att veta: elpris, vägarbeten, kommunen, nyheter ═══ */
#info-section { scroll-margin-top: calc(var(--nav-h) + 16px); }
.info-inner { max-width: var(--max-w); margin: 26px auto 0; padding: 0 16px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.info-card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 16px 16px 12px; min-width: 0; }
.ic-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.ic-head h3 { font-size: .95rem; font-weight: 700; color: var(--text); line-height: 1.25; }
.ic-sub { display: block; font-size: .7rem; color: var(--muted); margin-top: 1px; }
.ic-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.ic-empty { font-size: .8rem; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; }
.ic-empty i { color: var(--accent); }
.ic-foot { font-size: .68rem; color: var(--muted); margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border); line-height: 1.5; }
.ic-foot a { color: var(--link); }
.ic-foot i { font-size: .58rem; }
.ic-list { list-style: none; display: flex; flex-direction: column; }
.ic-list li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border-soft); font-size: .8rem; line-height: 1.45; }
.ic-list li:first-child { border-top: 0; padding-top: 2px; }
.ic-list li[hidden] { display: none; }
.ic-list li > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ic-list b, .il-title { color: var(--text); font-weight: 600; }
a.il-title:hover { color: var(--link); text-decoration: underline; }
.il-icon { font-size: 1rem; line-height: 1.3; flex-shrink: 0; width: 20px; text-align: center; }
.il-where { color: var(--text-2); }
.il-text { color: var(--text-2); overflow-wrap: anywhere; }
.il-meta { color: var(--muted); font-size: .7rem; }
.ic-list li.is-soon { opacity: .8; }
.ic-news li { padding-left: 2px; }
.ic-more { margin-top: 6px; background: none; border: 0; color: var(--link); font: 600 .75rem 'Poppins', sans-serif; cursor: pointer; padding: 4px 0; }
.today-chip.is-warn { background: color-mix(in srgb, var(--orange) 9%, var(--panel)); border-color: color-mix(in srgb, var(--orange) 25%, transparent); }

/* Elpris */
.info-el .ic-head { flex-wrap: wrap; }
.el-tabs { margin-left: auto; display: inline-flex; background: var(--surface-3); border-radius: 999px; padding: 3px; gap: 2px; }
.el-tabs[hidden] { display: none; }
.el-tabs button { border: 0; background: none; font: 600 .7rem 'Poppins', sans-serif; color: var(--text-2); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.el-tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.el-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 10px; min-height: 34px; }
.el-big { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.el-big.lv-lo { color: var(--green); } .el-big.lv-hi { color: var(--red); } .el-big.lv-mid { color: var(--orange); }
.el-unit { font-size: .78rem; color: var(--text-2); }
.el-cmp { width: 100%; font-size: .7rem; color: var(--muted); }
.el-chart { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 92px; padding: 0 1px; }
.el-bar { display: block; border-radius: 4px 4px 2px 2px; min-height: 4px; background: var(--accent-line); transition: opacity .2s; position: relative; }
.el-bar.lv-lo { background: color-mix(in srgb, var(--green) 55%, var(--panel)); }
.el-bar.lv-mid { background: color-mix(in srgb, var(--orange) 50%, var(--panel)); }
.el-bar.lv-hi { background: color-mix(in srgb, var(--red) 55%, var(--panel)); }
.el-bar.is-past { opacity: .35; }
.el-bar.is-now { outline: 2px solid var(--text); outline-offset: 1px; }
.el-bar.is-now::after { content: 'nu'; position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: .58rem; font-weight: 700; color: var(--text); }
.el-bar.is-empty { background: none; }
.el-axis { display: flex; justify-content: space-between; font-size: .6rem; color: var(--muted); margin: 4px 0 12px; }
.el-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .el-facts { grid-template-columns: repeat(4, 1fr); } }
.el-facts > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.el-facts span { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.el-facts b { font-size: .88rem; color: var(--text); }
.el-facts small { font-size: .66rem; color: var(--text-2); }
.el-facts .el-tip { background: var(--accent-soft); }
.el-facts .el-tip b { color: var(--accent-strong); }
html[data-theme="dark"] .el-facts .el-tip b { color: var(--accent); }

/* Skolmat: dagens lunch på kortet */
.lunch-box { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 12px; padding: 9px 11px; margin: 2px 0; }
.lb-head { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-strong); margin-bottom: 3px; }
html[data-theme="dark"] .lb-head { color: var(--accent); }
.lb-dishes { display: flex; flex-direction: column; color: var(--text); font-size: .82rem; line-height: 1.45; }
.lb-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .72rem; font-weight: 600; color: var(--link); }
.lb-more i { font-size: .55rem; }

/* Skolmat på platssidan */
.lunch-week { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lunch-week li { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); font-size: .84rem; }
.lunch-week li.is-today { background: var(--accent-soft); outline: 1px solid var(--accent-line); }
.lunch-week .lw-day { font-weight: 600; color: var(--text); }
.lunch-week .lw-dishes { color: var(--text-2); display: flex; flex-direction: column; }
@media (max-width: 420px) { .lunch-week li { grid-template-columns: 1fr; gap: 2px; } }
.place-box .small-link { margin-top: 10px; font-size: .74rem; }
.place-box .small-link a { color: var(--link); }
.place-box .small-link i { font-size: .6rem; }

/* ═══ Om Everöd ═══ */
.about-preview { background: color-mix(in srgb, var(--orange) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent); color: var(--text); border-radius: 12px; padding: 10px 14px; font-size: .82rem; margin-bottom: 14px; }
.about-preview a { color: var(--link); font-weight: 600; }
.about-page { overflow: hidden; }
.about-hero { position: relative; }
.about-hero-img { display: block; aspect-ratio: 16 / 7; background: var(--img-bg); }
.about-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-hero-img { position: relative; }
.about-hero-text { padding: 22px 24px 4px; }
.about-hero.no-img .about-hero-text { padding-top: 30px; background: linear-gradient(160deg, var(--accent-soft) 0%, var(--panel) 70%); padding-bottom: 18px; }
.about-hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.02em; color: var(--text); line-height: 1.15; }
.about-lead { margin-top: 10px; font-size: 1.02rem; line-height: 1.65; color: var(--text-2); max-width: 62ch; }
.about-layout { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 18px 24px 26px; }
@media (min-width: 900px) { .about-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; } .about-facts { position: sticky; top: calc(var(--nav-h, 60px) + 16px); } }
.about-text { font-size: .93rem; line-height: 1.75; color: var(--text-2); max-width: 66ch; }
.about-text h2 { font-size: 1.12rem; color: var(--text); margin: 26px 0 6px; letter-spacing: -.01em; }
.about-text h2:first-child { margin-top: 4px; }
.about-text p { margin-bottom: 12px; }
.about-text ul { margin: 0 0 14px 1.1em; }
.about-text li { margin-bottom: 6px; padding-left: 2px; }
.about-text li::marker { color: var(--accent); }
.about-text a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.about-facts { align-self: start; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 16px; padding: 16px; }
.about-facts h2 { font-size: .9rem; color: var(--text); display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.about-facts h2 i { color: var(--accent); }
.about-facts dl { display: flex; flex-direction: column; margin-bottom: 14px; }
.about-facts dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: .8rem; }
.about-facts dl > div:first-child { border-top: 0; }
.about-facts dt { color: var(--muted); }
.about-facts dd { color: var(--text); font-weight: 600; text-align: right; }
.about-facts .submit-btn { width: 100%; justify-content: center; }
.about-cta { text-align: center; color: var(--text-2); font-size: .85rem; margin: 24px auto 8px; max-width: 560px; }
.about-cta a { color: var(--link); }
.about-more { margin-top: 16px; }
.about-more .submit-btn { display: inline-flex; }
@media (max-width: 600px) { .about-hero-text, .about-layout { padding-left: 16px; padding-right: 16px; } .about-hero-img { aspect-ratio: 4 / 3; } }
/* Bra att veta: korten packas i kolumner så att olika höjder inte lämnar luckor */
.info-grid { display: block; columns: 3 330px; column-gap: 14px; }
.info-card { break-inside: avoid; margin-bottom: 14px; display: block; width: 100%; }
.el-facts { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
@media (min-width: 560px) { .el-facts { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); } }
.info-kommun .il-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.el-facts, .el-facts:is(*) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Om Everöd: bredare sida så att text och faktaruta får plats bredvid varandra */
.detail-wrap:has(.about-page) { max-width: 1000px; }

/* "Idag i Everöd": pilar och tonade kanter när knapparna inte får plats */
.today-scroll { position: relative; flex: 1; min-width: 0; display: flex; }
.today-scroll .today-chips { scroll-behavior: smooth; }
.today-chips.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.today-chips.fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.today-chips.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.today-arrow.prev { left: -4px; }
.today-arrow.next { right: -2px; }

/* Platssidan: "Mer inom …" – en rad med kort, som evenemangen på startsidan (pilar på datorn, svep och tonade kanter på mobilen) */
.more-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 4px; }
.more-head .detail-more-title { margin: 0; }
.more-nav[hidden] { display: none; }
.more-places {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding: 12px 16px 26px; margin: 0 -16px -14px; scroll-padding-inline: 16px;
}
.more-places::-webkit-scrollbar { display: none; }
.more-places.fade-r { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 64px); mask-image: linear-gradient(to left, transparent 0, #000 64px); }
.more-places.fade-l { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 64px); mask-image: linear-gradient(to right, transparent 0, #000 64px); }
.more-places.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%); }
.mp-card { flex: 0 0 calc((100% - 3 * 12px) / 4); scroll-snap-align: start; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
@media (hover: hover) { .mp-card:hover { transform: translateY(-3px); box-shadow: 0 2px 6px rgba(28,40,16,.07), 0 10px 22px rgba(28,40,16,.11); border-color: var(--accent-line); color: var(--text); } }
.mp-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--img-bg); overflow: hidden; }
.mp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.mp-card:hover .mp-thumb img { transform: scale(1.04); }
.mp-thumb.no-img { background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface-2) 80%); display: flex; align-items: center; justify-content: center; }
.mp-emoji { font-size: 2.2rem; line-height: 1; }
.mp-thumb .place-when { top: 7px; right: 7px; font-size: .58rem; padding: 2px 8px; }
.mp-name { padding: 9px 11px 11px; font-size: .8rem; font-weight: 600; line-height: 1.35; }
@media (max-width: 640px) { .mp-card { flex-basis: calc((100% - 2 * 12px) / 2.6); } .mp-thumb { aspect-ratio: 3 / 2; } }   /* smala kort på mobilen: lite högre bild */
@media (max-width: 760px) { .more-places { padding-left: 12px; padding-right: 12px; margin-left: -12px; margin-right: -12px; scroll-padding-inline: 12px; } }

/* Evenemang: på mobilen ligger "Tipsa" under korten, bredvid kalenderlänken, så att rubriken blir en rad */
.events-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 2px 0 6px; }
.events-foot .events-subscribe { margin: 0; }
.events-tip-m { display: none; }
@media (max-width: 640px) {
  .events-tip-d { display: none; }
  .events-tip-m { display: inline-flex; align-items: center; gap: 6px; margin-left: 0; }
  .events-foot { justify-content: space-between; }
  .events-foot .events-subscribe { text-align: right; }
}
@media (max-width: 459px) { .events-tip-m .tip-long { display: none; } }
.events-foot .events-subscribe a { white-space: nowrap; }

/* Aktuellt i Everöd med bara en ruta: avsnittsrubriken räcker, rutan blir bredare */
.info-single .info-grid { columns: 1; max-width: 760px; }
.info-single .ic-head h3, .info-single .ic-head .ic-icon { display: none; }
.info-single .ic-head { margin-bottom: 8px; }
.info-single .info-el .ic-head h3 { display: block; }   /* elpriset byter rubrik mellan idag och i morgon */

/* Hållplatser: nästa avgångar på kortet */
.bus-next { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 9px 11px; margin: 2px 0; }
.bus-next .lb-head { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 5px; }
.bn-rows { display: flex; flex-direction: column; gap: 5px; }
.bn-rows .skel-row { height: 18px; }
.bn-row { display: grid; grid-template-columns: 40px auto 1fr auto; gap: 8px; align-items: center; font-size: .78rem; }
.bn-time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.bn-time.delayed { color: var(--green); }
.bn-dir { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bn-in { font-size: .7rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bn-empty { font-size: .76rem; color: var(--muted); }
/* Hållplatsens egen sida: hela live-tabellen */
.place-departures { margin-bottom: 14px; }
.place-departures h2 { display: flex; align-items: center; gap: 8px; }
.live-dot { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 50% { opacity: .35; } }
.place-departures .station { box-shadow: none; border-radius: 12px; }
.dep-skel { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.line-badge { white-space: nowrap; }
.station-header { display: flex; align-items: center; gap: 8px; padding-right: 14px; }

/* Everöd i nyheterna: liten bild till vänster (artikelns delningsbild), annars källans initialer */
.ic-news li { align-items: flex-start; gap: 12px; }
.nw-thumb { flex: 0 0 64px; width: 64px; height: 48px; border-radius: 9px; overflow: hidden; background: var(--img-bg); position: relative; display: block; margin-top: 2px; }
.nw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.nw-thumb span { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; letter-spacing: .03em; color: var(--accent-strong); }
.nw-thumb.no-img { background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface-2) 90%); }
.nw-thumb.no-img span { display: flex; }
html[data-theme="dark"] .nw-thumb.no-img span { color: var(--accent); }

/* ═══ Platssidan: karta och tvåkolumnslayout på dator ═══ */
.place-side > .side-box { margin-top: 24px; }
.side-box { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 14px; }
.side-title { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--text); }
.side-title i { color: var(--accent); }
.place-map { height: 260px; border-radius: 12px; overflow: hidden; background: var(--img-bg); z-index: 0; }
.place-map .leaflet-control-attribution { font-size: .55rem; }
html[data-theme="dark"] .place-map .leaflet-control-attribution { background: rgba(20,24,18,.75); color: var(--muted); }
html[data-theme="dark"] .place-map .leaflet-bar a { background: var(--panel); color: var(--text); border-bottom-color: var(--border); }
.side-map-actions { display: flex; gap: 8px; margin-top: 10px; }
.side-map-actions .submit-btn { flex: 1; justify-content: center; font-size: .8rem; padding: 9px 12px; }
.more-all { margin: 6px 0 0; font-size: .8rem; text-align: right; }
.more-all a { color: var(--link); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.more-all i { font-size: .65rem; }

@media (min-width: 1000px) {
  .detail-wrap:has(.place-page) { max-width: 1240px; padding-left: 24px; padding-right: 24px; }
  .place-page:has(.place-side > *) { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
  .place-page .place-main > .detail-card { margin-top: 0; }
  .place-side > :first-child, .place-side > .side-box:first-child { margin-top: 0; }
  .place-map { height: 300px; }

  /* Bilder i högerkolumnen: en stor och mindre under */
  .place-side .detail-more-title { margin: 24px 0 10px; font-size: .95rem; }
  .place-side .place-gallery, .place-side .place-gallery.g-3, .place-side .place-gallery.g-4, .place-side .place-gallery.g-5 { grid-template-columns: 1fr 1fr; grid-auto-rows: 104px; gap: 6px; }
  .place-side .place-gallery.g-1 { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .place-side .place-gallery.g-2 { grid-auto-rows: 150px; }
  .place-side .place-gallery a:first-child, .place-side .place-gallery.g-3 a:first-child, .place-side .place-gallery.g-4 a:first-child, .place-side .place-gallery.g-5 a:first-child { grid-column: span 2; grid-row: span 2; }
  .place-side .place-gallery.g-2 a:first-child { grid-column: auto; grid-row: auto; }
  .place-side .place-gallery.g-4 a:last-child { grid-column: span 2; }
  .place-side .place-gallery a { border-radius: 12px; }

}
@media (min-width: 1000px) and (max-width: 1139px) { .place-page:has(.place-side > *) { grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; } }
@media (max-width: 999px) { .more-all { display: none; } }
.side-map { scroll-margin-top: 20px; }
@media (min-width: 1000px) { .place-actions .to-map { display: none; } }   /* kartan syns redan bredvid */
/* Bilder i högerkolumnen: höjden styrs av bredden (16:9 för den första, 4:3 för resten), så att breda bilder inte blir höga och beskurna */
@media (min-width: 1000px) {
  .place-side .place-gallery, .place-side .place-gallery.g-1, .place-side .place-gallery.g-2, .place-side .place-gallery.g-3, .place-side .place-gallery.g-4, .place-side .place-gallery.g-5 { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .place-side .place-gallery a, .place-side .place-gallery a:first-child, .place-side .place-gallery.g-2 a:first-child, .place-side .place-gallery.g-3 a:first-child, .place-side .place-gallery.g-4 a:first-child, .place-side .place-gallery.g-5 a:first-child { grid-row: auto; aspect-ratio: 4 / 3; grid-column: auto; }
  .place-side .place-gallery a:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .place-side .place-gallery.g-2 a:first-child { grid-column: auto; aspect-ratio: 4 / 3; }   /* två bilder: sida vid sida */
  .place-side .place-gallery.g-4 a:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
}
/* Udda antal bilder: den första går över hela bredden (16:9), resten i par – så blir det aldrig en tom ruta */
@media (min-width: 1000px) {
  .place-side .place-gallery.g-1 a:first-child, .place-side .place-gallery.g-3 a:first-child, .place-side .place-gallery.g-5 a:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .place-side .place-gallery.g-2 a:first-child, .place-side .place-gallery.g-4 a:first-child { grid-column: auto; aspect-ratio: 4 / 3; }
  .place-side .place-gallery.g-4 a:last-child { grid-column: auto; aspect-ratio: 4 / 3; }
}

/* "Mer inom" i full bredd under platssidans två kolumner – samma karusell som evenemangsraden */
@media (min-width: 1000px) {
  .place-page:has(.place-side > *) + .more-head { margin-top: 36px; }
}

/* Platssidans karta: andra platser i närheten, nedtonade */
.custom-marker.near-marker { width: 26px; height: 26px; font-size: 12px; border-width: 1.5px; border-color: var(--border); box-shadow: 0 1px 4px rgba(0,0,0,.25); opacity: .85; filter: grayscale(.3); transition: opacity .15s, filter .15s, transform .15s; cursor: pointer; }
.custom-marker.near-marker:hover { opacity: 1; filter: none; border-color: var(--accent); transform: scale(1.12); }
.leaflet-tooltip.near-tip { font: 600 .72rem/1.2 inherit; font-family: inherit; padding: 4px 8px; border-radius: 8px; border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
html[data-theme="dark"] .leaflet-tooltip.near-tip { background: var(--panel); color: var(--text); }
html[data-theme="dark"] .leaflet-tooltip-top.near-tip::before { border-top-color: var(--panel); }

/* Pris och arrangör: bara i evenemangsrutan, inte på korten */
.event-card .ev-extra { display: none; }
.event-card .event-meta.ev-extra-only { display: none; }
.ev-modal .ev-extra { display: flex; }
.ev-modal .event-meta.ev-extra-only { display: flex; }
