/* Fintur — fintur.css — Mobil-first */

/* Global box-sizing: border-box — padding/border trekk aldri utover width */
*, *::before, *::after { box-sizing: border-box; }

/* Global: alle grid-barn får min-width: 0 så innhald ikkje overflower kolonnar */
[class*="ft-"][style*="grid"] > *,
.ft-admin-columns > *, .ft-form-grid > *, .ft-stat-cols > *,
.ft-stat-grid > *, .ft-tips-row > *, .ft-trip-grid > *,
.ft-pk-fields > * { min-width: 0; }

/* Lys modus (standard) */
:root, [data-theme="light"] {
  --ft-orange: #F5A623;
  --ft-brown: #3C1518;
  --ft-green: #16a34a;
  --ft-bg: #e6e3dc;
  --ft-surface: #fff;
  --ft-text: #1a1a1a;
  --ft-muted: #6b7280;
  --ft-border: #d5d0c8;
  --ft-radius: 10px;
  --ft-mountain-opacity: 1;
  /* Aliasvar — brukt breitt i admin og nyhetsbrev */
  --ft-accent: var(--ft-orange);
  --ft-accent-green: #2d6a4f;
  --ft-danger: #ef4444;
  --ft-warning: #f59e0b;
  --ft-info: #3b82f6;
}

/* Mørk modus */
[data-theme="dark"] {
  --ft-bg: #335066;
  --ft-surface: #2a4458;
  --ft-text: #e5e5e3;
  --ft-muted: #9cb0bf;
  --ft-border: #3d5a70;
  --ft-mountain-opacity: 0.5;
  --ft-accent: #F5A623;
  --ft-green: #4ade80;
  --ft-accent-green: #4ade80;
  --ft-danger: #f87171;
  --ft-warning: #fbbf24;
  --ft-info: #60a5fa;
}
}
*, *::before, *::after { box-sizing: border-box; margin: 0; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--ft-bg);
  background-image: url('../img/mountains-bg.svg');
  background-repeat: repeat-x;
  background-position: bottom center;
  background-attachment: fixed;
  background-size: 1200px 300px;
  color: var(--ft-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}

/* Header */
.ft-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ft-surface);
  border-bottom: 1px solid var(--ft-border);
}
.ft-header-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; max-width: 1200px; margin: 0 auto;
  flex-wrap: wrap; position: relative;
}
.ft-nearby-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: none; border: 1.5px solid var(--ft-border); border-radius: 50%;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ft-orange); transition: all .2s; padding: 0;
  z-index: 5;
}
.ft-nearby-btn:hover { background: var(--ft-orange); color: #fff; border-color: var(--ft-orange); transform: translate(-50%, -50%) scale(1.05); }
.ft-nearby-btn.loading { animation: ftNearbyPulse 1s ease-in-out infinite; }
@keyframes ftNearbyPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.ft-dist-badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 12px; backdrop-filter: blur(4px); pointer-events: none; display: inline-flex; align-items: center; gap: 4px; }
.ft-dist-badge svg { flex-shrink: 0; }

/* Statistikk-side */
.ft-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.ft-stat-box { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 10px; padding: 16px 18px; text-align: center; }
.ft-stat-num { font-size: 28px; font-weight: 800; color: var(--ft-orange); line-height: 1.1; }
.ft-stat-lbl { font-size: 11px; color: var(--ft-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 4px; }
.ft-stat-sparkline { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding: 10px; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 8px; margin-bottom: 24px; }
.ft-spark-bar { flex: 1; min-height: 4px; background: var(--ft-orange); border-radius: 3px 3px 0 0; transition: opacity .2s; }
.ft-spark-bar:hover { opacity: 0.7; }
.ft-stat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ft-stat-cols > * { min-width: 0; }
@media (max-width: 768px) { .ft-stat-cols { grid-template-columns: 1fr; } }
.ft-stat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ft-stat-table th, .ft-stat-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--ft-border); }
.ft-stat-table th { font-size: 11px; text-transform: uppercase; color: var(--ft-muted); font-weight: 600; }
.ft-stat-table td a { color: var(--ft-text); text-decoration: none; }
.ft-stat-table td a:hover { color: var(--ft-orange); }
.ft-stat-table td:nth-child(2), .ft-stat-table td:nth-child(3) { text-align: right; font-weight: 600; }

/* Forsida modus-toggle */
.ft-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; }
.ft-mode-row .ft-mode-toggle { margin: 0; }
.ft-fintur-stats { font-size: 12px; color: var(--ft-muted); white-space: nowrap; }
.ft-fintur-stats strong { color: var(--ft-text); font-weight: 700; }
.ft-fintur-stats a { text-decoration: none; color: inherit; }
@media (max-width: 539px) {
  .ft-mode-row { gap: 8px; }
  .ft-fintur-stats { font-size: 11px; width: 100%; text-align: left; }
}
.ft-mode-toggle { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; }
.ft-mode-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 16px;
  background: var(--ft-surface); border: 1px solid var(--ft-border);
  color: var(--ft-text); text-decoration: none; font-size: 12px; font-weight: 500;
  transition: all .15s;
}
.ft-mode-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.ft-mode-lbl-short { display: none; }
.ft-mode-btn:hover { border-color: var(--ft-orange); color: var(--ft-orange); }
.ft-mode-btn.active { background: var(--ft-orange); color: #fff; border-color: var(--ft-orange); }
.ft-mode-btn.active:hover { background: #d97706; color: #fff; }

/* Aktiv tur-knapp — blå puls-stil + badge */
.ft-mode-btn--live {
  position: relative;
  border-color: #3b82f6;
  color: #3b82f6;
  cursor: pointer; background: none;
}
.ft-mode-btn--live:hover { background: rgba(59,130,246,.08); border-color: #2563eb; color: #2563eb; }
.ft-mode-live-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  background: #3b82f6; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  margin-left: 2px;
}

/* Like-knapp — kun ikon, ingen tekst */
.ft-mode-btn--icon-only { padding: 6px 10px; }
.ft-mode-btn--icon-only .ft-mode-lbl-full,
.ft-mode-btn--icon-only .ft-mode-lbl-short { display: none !important; }
@media (max-width: 539px) {
  .ft-mode-btn { padding: 5px 10px; font-size: 11px; }
  .ft-mode-btn svg { width: 14px; height: 14px; }
  .ft-mode-lbl-full,
  .ft-mode-lbl-short { display: none; }
}
/* Hjarte-knapp: berre tekst på desktop, berre ikon på mobil */
@media (min-width: 540px) {
  .ft-mode-btn--desktop-text svg { display: none; }
}
@media (max-width: 539px) {
  .ft-nearby-btn { width: 36px; height: 36px; }
  .ft-nearby-btn svg { width: 20px; height: 20px; }
}
.ft-nav-weather { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--ft-muted); margin-left: auto; }
.ft-nav-weather img { display: block; }
.ft-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ft-text);
  font-weight: 700; font-size: 18px; letter-spacing: 0.5px; text-transform: uppercase;
}
.ft-nav { display: flex; gap: 16px; align-items: center; flex-shrink: 0; }
.ft-nav a {
  color: var(--ft-muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color .2s;
}
.ft-nav a:hover { color: var(--ft-text); }
.ft-search-toggle {
  background: none; border: none; color: var(--ft-muted);
  cursor: pointer; padding: 4px;
}

/* Hero (bilete med crossfade) */
.ft-hero-wrap { max-width: 1200px; margin: 8px auto 0; padding: 0 16px; }
.ft-hero-img {
  position: relative; width: 100%; height: 50vh; min-height: 300px; max-height: 500px;
  background: #2d3436 no-repeat center / cover; overflow: hidden;
  border-radius: var(--ft-radius);
}
.ft-hero-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 2s ease-in-out;
}
.ft-hero-bg.ft-hero-bg-active { opacity: 1; }
.ft-hero-img .ft-hero-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.2) 50%, rgba(0,0,0,.3) 100%);
  color: #fff; z-index: 2;
}
.ft-hero-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; width: 100%; padding: 0 20px; box-sizing: border-box;
}
.ft-hero-logo { display: block; margin: 0 auto 12px; width: 144px; height: 144px; filter: drop-shadow(0 2px 12px rgba(0,0,0,.5)); }
.ft-hero-logo-link { display: block; text-align: center; line-height: 0; }
.ft-hero-img h1, .ft-hero-title { font-size: 42px; font-weight: 800; margin: 0; line-height: 1; text-shadow: 0 2px 12px rgba(0,0,0,.5); letter-spacing: 1px; text-transform: uppercase; }
.ft-hero-tagline { font-size: 18px; opacity: .9; margin: 2px 0 0; font-style: italic; }
.ft-hero-count { font-size: 15px; opacity: .8; margin: 4px 0 8px; }
.ft-btn-hero { background: var(--ft-orange); color: #fff; padding: 10px 28px; font-size: 16px; font-weight: 600; border-radius: 24px; text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.ft-btn-hero:hover { transform: scale(1.05); }
.ft-btn {
  display: inline-block; padding: 10px 20px;
  background: var(--ft-orange); color: #fff;
  border-radius: var(--ft-radius); text-decoration: none;
  font-weight: 600; font-size: 14px; transition: opacity .2s;
}
.ft-btn:hover { opacity: .9; }

/* Sections */
.ft-section { padding: 24px 16px; max-width: 1200px; margin: 0 auto; }
.ft-section h2 { font-size: 20px; margin-bottom: 16px; }

/* Trip card grid */
.ft-trip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 540px) { .ft-trip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .ft-trip-grid { grid-template-columns: repeat(3, 1fr); } }

/* Trip card */
.ft-trip-card {
  display: block; text-decoration: none; color: var(--ft-text);
  background: var(--ft-surface);
  border-radius: var(--ft-radius);
  overflow: hidden;
  border: 1px solid var(--ft-border);
  transition: transform .15s, box-shadow .15s;
}
.ft-trip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.ft-card-img {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
}
.ft-card-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.ft-dnt-badge {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: #c41e1e; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.ft-card-body { padding: 12px; }
.ft-card-body h3 { font-size: 22px; line-height: 1.25; margin-bottom: 6px; font-weight: 700; }
.ft-card-meta {
  display: flex; gap: 12px; font-size: 13px; color: var(--ft-muted);
  margin-bottom: 4px;
}
.ft-card-loc { font-size: 12px; color: var(--ft-muted); }

/* Difficulty dots */
.ft-diff { display: inline-flex; gap: 2px; }
.ft-diff span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ft-border);
}
.ft-diff span.active { background: var(--ft-orange); }

/* Search overlay */
.ft-search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5);
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.ft-search-overlay.active {
  display: flex;
}
.ft-search-box {
  background: var(--ft-surface); border-radius: var(--ft-radius);
  width: 90%; max-width: 500px; padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.ft-search-box input {
  width: 100%; padding: 12px; border: 1px solid var(--ft-border);
  border-radius: 8px; font-size: 16px; outline: none;
  background: var(--ft-bg); color: var(--ft-text);
}
.ft-search-results { margin-top: 8px; max-height: 300px; overflow-y: auto; }
.ft-search-results a {
  display: block; padding: 10px; text-decoration: none;
  color: var(--ft-text); border-radius: 6px;
}
.ft-search-results a:hover { background: var(--ft-bg); }

/* Footer */
.ft-footer {
  text-align: center; padding: 32px 16px;
  border-top: 1px solid var(--ft-border);
  font-size: 13px; color: var(--ft-muted);
}
.ft-footer-sub { margin-top: 4px; }
.ft-footer a { color: var(--ft-orange); text-decoration: none; }

/* Leaflet overrides — tur-markørar (raud) for å skilje seg frå foto-prikkar (orange) */
.ft-marker {
  background: #E53E3E;
  border: 2px solid #fff;
  border-radius: 50%;
  width: 14px !important; height: 14px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.35), 0 0 0 1px rgba(229,62,62,0.3);
}
.ft-cluster {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.ft-cluster-small  { background: #E53E3E; width: 34px; height: 34px; }
.ft-cluster-medium { background: #DC2626; width: 42px; height: 42px; font-size: 14px; }
.ft-cluster-large  { background: #B91C1C; width: 50px; height: 50px; font-size: 15px; }
.leaflet-popup-content-wrapper {
  border-radius: var(--ft-radius) !important;
}

/* Turlista extras */
.ft-list-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.ft-count { font-weight: 400; color: var(--ft-muted); font-size: 16px; }
.ft-sort { display: flex; gap: 8px; font-size: 13px; flex-wrap: wrap; align-items: center; }
.ft-sort span { color: var(--ft-muted); }
.ft-sort a { color: var(--ft-muted); text-decoration: none; padding: 4px 10px; border-radius: 6px; }
.ft-sort a.active { background: var(--ft-orange); color: #fff; }
.ft-diff-pill { font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.ft-diff-pill.ft-diff-1,.ft-diff-pill.ft-diff-2 { background: #dcfce7; color: #166534; }
.ft-diff-pill.ft-diff-3,.ft-diff-pill.ft-diff-4 { background: #fef3c7; color: #92400e; }
.ft-diff-pill.ft-diff-5,.ft-diff-pill.ft-diff-6 { background: #fee2e2; color: #991b1b; }
.ft-diff-pill.ft-diff-7,.ft-diff-pill.ft-diff-8 { background: #991b1b; color: #fff; }

/* Turdetalj */
.ft-tur { max-width: 800px; margin: 0 auto; }
.ft-tur-body { padding: 16px; }

/* Hero-bilete */
.ft-tur-hero {
  position: relative; width: 100%;
  aspect-ratio: 16/9; max-height: 420px;
  overflow: hidden; border-radius: 0;
}
/* Badges på hero — meir luft mot kantene enn på små turkort-grid */
.ft-tur-hero .ft-alert-badge { top: 16px; left: 16px; }
.ft-tur-hero .ft-dnt-badge { top: 16px; right: 16px; }
@media (min-width: 800px) {
  .ft-tur-hero .ft-alert-badge { top: 20px; left: 20px; }
  .ft-tur-hero .ft-dnt-badge { top: 20px; right: 20px; }
}
@media (min-width: 800px) {
  .ft-tur-hero { border-radius: var(--ft-radius); margin-top: 16px; }
}
.ft-tur-hero-img {
  width: 100%; height: 100%; object-fit: cover;
}
.ft-tur-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.7));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; color: #fff; z-index: 2; pointer-events: none;
}
.ft-tur-hero-back, .ft-fav-hero, .ft-tur-hero-stats .ft-like-btn, .ft-tur-hero-stats .ft-hstat-dnt { pointer-events: auto; }
.ft-tur-hero-back {
  position: absolute; top: 12px; left: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,.4); color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 18px; backdrop-filter: blur(4px);
  transition: background .2s;
}
.ft-tur-hero-back:hover { background: rgba(0,0,0,.6); }
.ft-tur-hero-content h1 { font-size: 26px; margin: 0 0 2px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ft-tur-hero-loc { font-size: 13px; opacity: .85; margin-bottom: 8px; }
.ft-tur-hero-stats {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.ft-hstat { font-size: 13px; font-weight: 600; }
.ft-hstat-dnt .ft-hstat-val {
  background: #c41e1e; border-radius: 50%; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
@media (min-width: 800px) {
  .ft-tur-hero-content h1 { font-size: 32px; }
  .ft-tur-hero-overlay { padding: 24px; }
  .ft-hstat { font-size: 14px; }
}

.ft-back { display: none; }
.ft-tur-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.ft-stat { text-align: center; }
.ft-stat-val { display: block; font-size: 20px; font-weight: 700; }
.ft-stat-lbl { font-size: 11px; color: var(--ft-muted); text-transform: uppercase; letter-spacing: .5px; }
.ft-stat-dnt .ft-stat-val { color: #c41e1e; }
.ft-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ft-tag { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: var(--ft-bg); border: 1px solid var(--ft-border); }
.ft-tag-sm { font-size: 11px; padding: 1px 7px; font-weight: 600; border: none; }
.ft-tag-warn   { background: #fef3c7; color: #92400e; }
.ft-tag-danger { background: #fee2e2; color: #991b1b; }
.ft-tag-success{ background: #dcfce7; color: #166534; }
.ft-tag-info   { background: #dbeafe; color: #1e40af; }
[data-theme="dark"] .ft-tag-warn    { background: rgba(245,158,11,.18); color: #fcd34d; }
[data-theme="dark"] .ft-tag-danger  { background: rgba(239,68,68,.18);  color: #fca5a5; }
[data-theme="dark"] .ft-tag-success { background: rgba(34,197,94,.18);  color: #86efac; }
[data-theme="dark"] .ft-tag-info    { background: rgba(59,130,246,.18); color: #93c5fd; }

/* Turkart */
.ft-tur-map-section { margin: 0 -16px 20px; }
.ft-tur-map { height: 400px; width: 100%; }
@media (min-width: 800px) { .ft-tur-map { height: 500px; border-radius: var(--ft-radius); } .ft-tur-map-section { margin: 0 0 20px; } }

/* Seksjonar */
.ft-tur-section { margin-bottom: 28px; }
.ft-tur-section h2 { font-size: 18px; margin-bottom: 12px; border-bottom: 1px solid var(--ft-border); padding-bottom: 8px; }
.ft-tur-desc { line-height: 1.7; }
.ft-tur-desc-collapsible { transition: max-height .35s ease; overflow: hidden; }
.ft-tur-desc-collapsed { position: relative; }
.ft-tur-desc-collapsed::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 64px; background: linear-gradient(to bottom, transparent, var(--ft-bg, #fff)); pointer-events: none; }
.ft-desc-toggle { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ft-accent); background: none; border: none; cursor: pointer; padding: 0; }
.ft-desc-toggle:hover { text-decoration: underline; }
.ft-tur-notes { margin-top: 12px; padding: 12px; background: #fef3c7; border-radius: 8px; color: #92400e; font-size: 14px; }
@media (prefers-color-scheme: dark) { .ft-tur-notes { background: #422006; color: #fbbf24; } }

/* Galleri */
.ft-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ft-gallery-item { margin: 0; }
.ft-gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; cursor: pointer; }
.ft-gallery-item figcaption { font-size: 12px; color: var(--ft-muted); margin-top: 4px; }

/* Galleri — karusell / hero */
.ft-gallery-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ft-gallery-head h2 { margin-bottom: 0 !important; border-bottom: none !important; padding-bottom: 0 !important; }
.ft-gallery-hero { position: relative; border-radius: 8px; overflow: hidden; margin-bottom: 6px; background: var(--ft-surface, #eee); }
.ft-gallery-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; cursor: zoom-in; transition: opacity .2s; }

/* Galleri — visningsval-knappegruppe */
.ft-gallery-view-btns { display: flex; gap: 1px; }
.ft-gallery-view-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; padding: 4px 6px; cursor: pointer; color: var(--ft-muted); border-radius: 4px; transition: color .15s, background .15s; }
.ft-gallery-view-btn:hover { color: var(--ft-accent); }
.ft-gallery-view-btn.ft-view-active { color: var(--ft-accent); background: rgba(255,140,0,.1); }
/* 3-kolonne-knapp berre på nettbrett/skjerm */
@media (max-width: 640px) { .ft-gallery-view-btn--grid3 { display: none !important; } }

/* Galleri data-mode */
.ft-gallery-section .ft-gallery-grid-hidden { display: none !important; }
/* 2-kolonne */
.ft-gallery-section[data-mode="grid"] .ft-gallery-hero { display: none !important; }
.ft-gallery-section[data-mode="grid"] .ft-gallery-thumbstrip { display: none !important; }
.ft-gallery-section[data-mode="grid"] .ft-gallery-grid-hidden { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; }
/* 3-kolonne */
.ft-gallery-section[data-mode="grid3"] .ft-gallery-hero { display: none !important; }
.ft-gallery-section[data-mode="grid3"] .ft-gallery-thumbstrip { display: none !important; }
.ft-gallery-section[data-mode="grid3"] .ft-gallery-grid-hidden { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; }
/* Turtips-spesifikk */
.ft-gallery-section[data-mode="grid"] .ft-tip-hero { display: none !important; }
.ft-gallery-section[data-mode="grid"] .ft-tip-thumbstrip { display: none !important; }
.ft-gallery-section[data-mode="grid3"] .ft-tip-hero { display: none !important; }
.ft-gallery-section[data-mode="grid3"] .ft-tip-thumbstrip { display: none !important; }
/* Turtips topbar — tilbake-lenke + knappar på same linje */
.ft-tip-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
/* Mindre thumbnails på turtips — overskriver eldre reglar */
.ft-tip-thumbstrip { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)) !important; gap: 3px !important; margin-bottom: 10px !important; }
.ft-tip-thumbstrip .ft-tip-photo { aspect-ratio: 1; border-radius: 3px; }
.ft-tip-thumbstrip .ft-tip-photo img { width: 100%; height: 100%; object-fit: cover; }
.ft-gallery-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 3; pointer-events: auto; }
.ft-gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; transition: background .2s, transform .2s; border: none; }
.ft-gallery-dot.active { background: #fff; transform: scale(1.45); }
.ft-gallery-open-btn { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.45); color: #fff; border: none; border-radius: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; transition: background .15s; }
.ft-gallery-open-btn:hover { background: rgba(0,0,0,.7); }

/* Thumbnail-strip for offisielle bilete */
.ft-gallery-thumbstrip { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; scrollbar-color: var(--ft-border) transparent; }
.ft-gallery-thumbstrip::-webkit-scrollbar { height: 3px; }
.ft-gallery-thumbstrip::-webkit-scrollbar-thumb { background: var(--ft-border); border-radius: 2px; }
.ft-gallery-thumb { margin: 0; flex-shrink: 0; width: 54px; height: 54px; border-radius: 5px; overflow: hidden; cursor: pointer; opacity: .6; transition: opacity .15s, outline .1s; }
.ft-gallery-thumb.active { opacity: 1; outline: 2.5px solid var(--ft-orange, #f97316); outline-offset: -2px; }
.ft-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Turbilete — thumbnail-strip */
.ft-user-thumbstrip { display: flex; gap: 4px; flex-wrap: wrap; }
.ft-user-thumb { margin: 0; width: 58px; height: 58px; border-radius: 6px; overflow: hidden; cursor: zoom-in; flex-shrink: 0; transition: opacity .15s; }
.ft-user-thumb:hover { opacity: .82; }
.ft-user-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Stories */
.ft-stories { display: flex; flex-direction: column; gap: 16px; }
.ft-story { display: flex; gap: 12px; align-items: flex-start; }
.ft-story img { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.ft-story-body h3 { font-size: 15px; margin-bottom: 4px; }
.ft-story-body p { font-size: 14px; color: var(--ft-muted); }

/* Video */
.ft-videos { display: flex; flex-direction: column; gap: 16px; }
.ft-video { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--ft-radius); }
.ft-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.ft-video-title { font-size: 14px; margin-top: 4px; }

/* Info grid */
.ft-info-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.ft-info-grid dt { color: var(--ft-muted); }
.ft-btn-sm { font-size: 13px; padding: 7px 14px; }

/* Hamburger — hidden on desktop */
.ft-header-quick { display: none; }
.ft-hamburger { display: none; background: none; border: none; color: var(--ft-text); cursor: pointer; padding: 4px; flex-shrink: 0; }

/* === RESPONSIVT / MOBIL + NETTBRETT (hamburger opp til 900px) ===  */
@media (max-width: 1100px) {
  .ft-header-inner { padding: 6px 10px; gap: 6px; flex-wrap: nowrap; }
  .ft-logo span { font-size: 15px; }
  .ft-logo img { width: 24px; height: 24px; }
  .ft-nav-weather { margin-left: auto; order: 0; }
  .ft-nav-weather img { width: 18px; height: 18px; }
  .ft-nav-weather span { font-size: 12px; }
  /* Hamburger meny */
  .ft-hamburger { display: flex; align-items: center; order: 2; }
  .ft-header-quick { display: flex; align-items: center; gap: 0; order: 1; margin-left: auto; }
  .ft-hq-btn { display: flex; align-items: center; justify-content: center; padding: 7px; color: var(--ft-text); text-decoration: none; position: relative; border-radius: 6px; transition: color .15s; }
  .ft-hq-btn:hover, .ft-hq-btn:active { color: var(--ft-orange); }
  .ft-hq-fav .ft-fav-dot { position: absolute; top: 3px; right: 3px; min-width: 13px; height: 13px; font-size: 8px; }
  .ft-nav-weather { margin-left: 0; order: 0; }
  .ft-nav { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--ft-surface); z-index: 999; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; padding-top: 72px; overflow-y: auto; }
  .ft-menu-open .ft-nav { display: flex; }
  .ft-nav a, .ft-nav-btn { font-size: 20px; font-weight: 500; padding: 14px 24px 14px 28px; width: 100%; text-align: left; border-bottom: 1px solid var(--ft-border); box-sizing: border-box; }
  /* Seksjonlablar */
  .ft-nav-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ft-muted); padding: 20px 0 6px 28px; width: 100%; }
  /* Knapp i nav (tema-toggle) */
  .ft-nav-btn { background: none; border: none; border-bottom: 1px solid var(--ft-border); cursor: pointer; color: var(--ft-text); display: flex; align-items: center; gap: 14px; }
  /* Språkrad */
  .ft-nav-lang-row { display: flex; align-items: center; gap: 14px; padding: 14px 24px 14px 28px; width: 100%; border-bottom: 1px solid var(--ft-border); box-sizing: border-box; }
  .ft-nav-lang-row svg { flex-shrink: 0; color: var(--ft-muted); }
  .ft-nav-lang-row .ft-lang-btn { font-size: 20px; font-weight: 500; background: none; border: none; cursor: pointer; padding: 0; color: var(--ft-text); }
  /* mobile-only startar skjult (visast i open meny nedanfor) */
  .ft-nav-mobile-only { display: none; }
  .ft-nav a:last-child { border-bottom: none; }
  .ft-nav-search svg { width: 24px; height: 24px; }
  .ft-fav-nav { font-size: 20px; }
  .ft-menu-open .ft-hamburger svg { display: none; }
  .ft-menu-open .ft-hamburger::after { content: '✕'; font-size: 24px; font-weight: 300; position: fixed; top: 8px; right: 14px; z-index: 1000; color: var(--ft-text); }
  .ft-fav-dot { min-width: 14px; height: 14px; font-size: 9px; }
  .ft-section { padding: 12px 10px; }
  .ft-section h1 { font-size: 22px; }
  .ft-section h2 { font-size: 18px; }
  .ft-trip-grid { gap: 10px; }
  .ft-card-img { aspect-ratio: 16/9; }
  .ft-card-body { padding: 10px; }
  .ft-card-body h3 { font-size: 17px; line-height: 1.25; margin-bottom: 4px; font-weight: 700; }
  .ft-card-meta { font-size: 11px; gap: 6px; margin-bottom: 2px; }
  .ft-card-loc { font-size: 11px; }
  .ft-diff span { width: 6px; height: 6px; }
  .ft-dnt-badge { width: 22px; height: 22px; font-size: 11px; }
  .ft-fav-card { width: 24px; height: 24px; }
  .ft-fav-card svg { width: 12px; height: 12px; }
  .ft-sort { font-size: 12px; gap: 4px; }
  .ft-sort a { padding: 3px 8px; }
  .ft-filter-collapse { margin-bottom: 10px; }
  .ft-filter-toggle-bar { padding: 8px 12px; font-size: 14px; }
  .ft-inline-search { gap: 6px; }
  .ft-inline-search .ft-input { font-size: 14px; padding: 7px 10px; }
  .ft-inline-search .ft-btn { padding: 7px 10px; font-size: 12px; }
  .ft-tur-hero { height: 40vh; min-height: 220px; }
  .ft-tur-hero-content h1 { font-size: 22px; }
  .ft-hstat { font-size: 12px; }
  .ft-tur-body { padding: 10px; }
  .ft-tur-section h2 { font-size: 16px; }
  .ft-gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .ft-gallery-hero img { aspect-ratio: 4/3; }
  .ft-gallery-thumb { width: 46px; height: 46px; }
  .ft-user-thumb { width: 50px; height: 50px; }
  .ft-story { flex-direction: column; }
  .ft-story img { width: 100%; height: 160px; }
  .ft-hero-img { height: 45vh; min-height: 260px; max-height: 380px; border-radius: var(--ft-radius); }
  .ft-hero-img h1, .ft-hero-title { font-size: 28px; margin-top: 4px; line-height: 1; letter-spacing: 0.5px; }
  .ft-hero-logo { width: 90px; height: 90px; margin-bottom: 4px; }
  .ft-hero-tagline { font-size: 14px; margin: 2px 0 0; }
  .ft-hero-count { font-size: 12px; margin: 2px 0 4px; }
  .ft-btn-hero { display: none !important; }
  .ft-hero-meta { bottom: 4px; left: 6px; right: 6px; gap: 3px; }
  .ft-hero-meta-title { font-size: 10px; }
  .ft-hero-meta-loc, .ft-hero-meta-credit { font-size: 9px; }
  .ft-hero-meta-title::after { display: none; }
  .ft-fullscreen-btn { width: 28px; height: 28px; font-size: 14px; bottom: 4px; right: 6px; }
  .ft-hero-reload { font-size: 14px; top: 6px; right: 6px; width: 28px; height: 28px; }
  .ft-hero-wrap { padding: 0 8px; }
  .ft-tips-grid { grid-template-columns: 1fr; gap: 10px; }
  .ft-tip-card { flex-direction: column; }
  .ft-tip-img { max-height: none; aspect-ratio: 16/9; width: 100%; }
  .ft-tip-img img { width: 100%; height: 100%; object-fit: cover; }
  .ft-tip-body { padding: 8px; }
  .ft-tip-body h3 { font-size: 14px; }
  .ft-tips-row { grid-template-columns: 1fr; }
  .ft-footer { padding: 16px 10px 24px; }
  .ft-footer-controls { flex-wrap: wrap; }
  .ft-related-grid { grid-template-columns: 1fr; }
  .ft-weather-grid { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .ft-weather-day { min-width: 65px; flex-shrink: 0; }
  .ft-alerts { margin: 8px 0 12px; }
  .ft-alert { padding: 8px 10px; font-size: 12px; }
}

/* Nettbrett */
@media (min-width: 540px) and (max-width: 899px) {
  .ft-hero { height: 45vh; }
  .ft-trip-grid { grid-template-columns: repeat(2, 1fr); }
  .ft-gallery { grid-template-columns: repeat(3, 1fr); }
}

/* Touch-vennlege element */
@media (hover: none) {
  .ft-trip-card:hover { transform: none; box-shadow: none; }
  .ft-trip-card:active { transform: scale(0.98); }
}


/* === ADMIN === */
.ft-admin-form input, .ft-admin-form textarea, .ft-admin-form select {
  width: 100%; padding: 10px; border: 1.5px solid var(--ft-border);
  border-radius: 8px; font-size: 14px; background: #fff; color: var(--ft-text);
  box-sizing: border-box;
}
.ft-admin-form input:focus, .ft-admin-form textarea:focus, .ft-admin-form select:focus {
  outline: none; border-color: var(--ft-orange); box-shadow: 0 0 0 3px rgba(245,158,11,.1);
}
.ft-admin-form textarea { resize: vertical; }
.ft-admin-form label { display: block; font-size: 13px; font-weight: 600; color: var(--ft-muted); margin-bottom: 4px; }
.ft-form-row { margin-bottom: 14px; }
.ft-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ft-form-grid > * { min-width: 0; }
@media (min-width: 600px) { .ft-form-grid { grid-template-columns: repeat(4, 1fr); } }
.ft-checkbox-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-checkbox { font-size: 13px; display: flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--ft-border); border-radius: 6px; cursor: pointer; }
.ft-checkbox input:checked + * { color: var(--ft-orange); }
.ft-toggle-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.ft-toggle { font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ft-form-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.ft-btn-danger { background: #dc2626; }
.ft-admin-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.ft-admin-table th { text-align: left; padding: 8px; border-bottom: 2px solid var(--ft-border); color: var(--ft-muted); font-size: 12px; text-transform: uppercase; }
.ft-admin-table td { padding: 8px; border-bottom: 1px solid var(--ft-border); }
.ft-admin-table a { color: var(--ft-orange); text-decoration: none; }
.ft-row-inactive { opacity: .5; }

/* Auth */
.ft-auth-tab { background: none; border: none; padding: 10px 20px; font-size: 15px; font-weight: 600; color: var(--ft-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.ft-auth-tab.active { color: var(--ft-orange); border-bottom-color: var(--ft-orange); }
.ft-input { padding: 12px; border: 1px solid var(--ft-border); border-radius: 8px; font-size: 16px; background: var(--ft-surface); color: var(--ft-text); width: 100%; box-sizing: border-box; }

/* Tur-navigasjon (forrige/neste) */
.ft-tur-nav {
  display: flex; justify-content: space-between; align-items: stretch;
  max-width: 800px; margin: 0 auto; padding: 16px;
  border-top: 1px solid var(--ft-border);
}
.ft-tur-nav-link {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ft-text);
  padding: 12px 16px; border-radius: var(--ft-radius);
  transition: background .2s; max-width: 45%;
}
.ft-tur-nav-link:hover { background: var(--ft-bg); }
.ft-tur-nav-arrow { font-size: 20px; color: var(--ft-orange); flex-shrink: 0; }
.ft-tur-nav-label { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-tur-next { margin-left: auto; text-align: right; }
@media (max-width: 539px) {
  .ft-tur-nav-label { font-size: 13px; max-width: 120px; }
}

/* Språk-veljar (dropdown) */
/* Sortering + Sesong på same linje */
.ft-filter-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ft-sort-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ft-sort-label { font-size: 13px; color: var(--ft-muted); font-weight: 600; }
.ft-sort-btn { font-size: 13px; padding: 5px 14px; border-radius: 20px; background: var(--ft-bg); border: 1px solid var(--ft-border); color: var(--ft-muted); text-decoration: none; transition: all .2s; }
.ft-sort-btn:hover { border-color: var(--ft-orange); color: var(--ft-text); }
.ft-sort-btn.active { background: var(--ft-orange); color: #fff; border-color: var(--ft-orange); }
.ft-sub-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; padding-left: 2px; }
.ft-pill { font-size: 12px; padding: 4px 12px; border-radius: 16px; background: var(--ft-surface); border: 1px solid var(--ft-border); color: var(--ft-muted); text-decoration: none; transition: all .2s; }
.ft-pill:hover { border-color: var(--ft-orange); color: var(--ft-text); }
.ft-pill.active { background: var(--ft-text); color: var(--ft-bg); border-color: var(--ft-text); }

/* Stad-labels */
.ft-loc-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.ft-loc-label { font-size: 13px; padding: 5px 12px; border-radius: 20px; background: var(--ft-bg); border: 1px solid var(--ft-border); color: var(--ft-muted); text-decoration: none; white-space: nowrap; transition: all .2s; }
.ft-loc-label:hover { border-color: var(--ft-orange); color: var(--ft-text); }
.ft-loc-label.active { background: var(--ft-orange); color: #fff; border-color: var(--ft-orange); }
.ft-loc-label small { font-size: 11px; opacity: .7; }
.ft-loc-back { background: none; border-color: var(--ft-orange); color: var(--ft-orange); font-weight: 600; }
.ft-loc-back:hover { background: var(--ft-orange); color: #fff; }
@media (max-width: 539px) {
  .ft-filter-line { flex-direction: column; align-items: stretch; gap: 6px; }
  .ft-sort-row { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; gap: 4px; }
  .ft-sub-filter { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .ft-loc-labels { flex-wrap: wrap; gap: 4px; }
  .ft-sort-btn, .ft-pill { font-size: 11px; padding: 4px 8px; white-space: nowrap; }
  .ft-sort-label { font-size: 11px; white-space: nowrap; }
  .ft-sort-text { display: none; }
  .ft-sort-icon { font-size: 13px; }
  .ft-season-text { display: none; }
  .ft-season-hint { display: none; }
  .ft-loc-label { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
  .ft-loc-label { font-size: 12px; padding: 4px 10px; }
}

/* Kommentarar */
.ft-comments { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ft-comment { padding: 12px; background: var(--ft-bg); border-radius: 8px; }
.ft-comment-tip { border-left: 3px solid var(--ft-orange); }
.ft-comment-head { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.ft-comment-head span { color: var(--ft-muted); }
.ft-tip-badge { background: #fef3c7; color: #92400e; padding: 1px 6px; border-radius: 4px; font-size: 11px; }
.ft-comment p { font-size: 14px; margin: 0; }
.ft-comment-form { display: flex; flex-direction: column; gap: 8px; }
.ft-comment-form .ft-input { font-size: 14px; padding: 10px; }

@media (max-width: 539px) {
  .ft-filter-menu { position: fixed; left: 8px; right: 8px; min-width: auto; max-height: 60vh; }
}


/* Admin kolonne-layout */
.ft-admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ft-admin-columns > * { min-width: 0; }
.ft-admin-col { display: flex; flex-direction: column; gap: 0; }
.ft-fieldset { border: 1px solid var(--ft-border); border-radius: var(--ft-radius); padding: 16px 16px 18px; margin-bottom: 14px; background: #f4f4f2; }
.ft-fieldset legend { font-size: 13px; font-weight: 700; color: var(--ft-orange); padding: 0 6px; text-transform: uppercase; letter-spacing: .3px; }
@media (max-width: 768px) {
  .ft-admin-columns { grid-template-columns: 1fr; }
}

/* Kollaps (details/summary) */
.ft-collapse { border: 1px solid var(--ft-border); border-radius: var(--ft-radius); overflow: hidden; }
.ft-collapse-header { padding: 12px 16px; font-size: 16px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.ft-collapse-header::-webkit-details-marker { display: none; }
.ft-collapse-header::before { content: '▸'; transition: transform .2s; font-size: 14px; color: var(--ft-orange); }
.ft-collapse[open] .ft-collapse-header::before { transform: rotate(90deg); }
.ft-collapse-count { background: var(--ft-orange); color: #fff; font-size: 12px; padding: 1px 7px; border-radius: 10px; font-weight: 400; }
.ft-collapse-body { padding: 0 16px 16px; }

/* Admin lock i footer */
.ft-admin-lock { text-decoration: none; opacity: .3; font-size: 12px; transition: opacity .2s; }
.ft-admin-lock:hover { opacity: .8; }

/* Admin hero-kontroll */
.ft-hero-reload { position: absolute; top: 12px; right: 12px; font-size: 20px; text-decoration: none; background: rgba(0,0,0,.5); border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background .2s; }
.ft-hero-reload:hover { background: rgba(0,0,0,.8); }

/* Hero turdata (turnamn + stad + fotograf) */
.ft-hero-meta { position: absolute; bottom: 12px; left: 16px; z-index: 10; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: rgba(0,0,0,.5); padding: 6px 12px; border-radius: 6px; text-decoration: none; color: #fff; transition: background .2s; }
.ft-hero-meta:hover { background: rgba(0,0,0,.7); }
.ft-hero-meta-title { color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ft-hero-meta-loc { color: rgba(255,255,255,.7); font-size: 12px; }
.ft-hero-meta-credit { color: rgba(255,255,255,.5); font-size: 11px; }
.ft-hero-meta-title::after { content: '·'; margin-left: 8px; opacity: .5; }
.ft-hero-meta-credit::before { content: ''; }
@media (max-width: 539px) {
  .ft-hero-meta { bottom: 8px; left: 10px; gap: 4px; }
  .ft-hero-meta-title, .ft-hero-meta-loc { font-size: 11px; }
  .ft-hero-meta-credit { display: none; }
}

/* Sesong-hint */
.ft-season-hint { font-size: 12px; color: var(--ft-muted); font-style: italic; margin-left: 4px; }
/* season/sort mobile: sjå hovud mobilblokk */

/* Filter-kollaps på tursida */
.ft-filter-collapse { border: 1px solid var(--ft-border); border-radius: var(--ft-radius); margin-bottom: 16px; background: var(--ft-surface); }
.ft-filter-toggle-bar { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; list-style: none; color: var(--ft-muted); }
.ft-filter-toggle-bar::-webkit-details-marker { display: none; }
.ft-filter-toggle-icon { font-size: 16px; }
.ft-filter-toggle-bar:hover { color: var(--ft-text); }
.ft-filter-collapse[open] .ft-filter-toggle-bar { color: var(--ft-text); border-bottom: 1px solid var(--ft-border); }
.ft-filter-badge { background: var(--ft-orange); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.ft-filter-body { padding: 12px 16px; }
.ft-inline-search { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.ft-inline-search .ft-input { flex: 1; padding: 8px 12px; background: var(--ft-surface); border-radius: 24px; }

/* Rolle-badges */
.ft-role-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.ft-role-admin { background: #dc2626; color: #fff; }
.ft-role-editor { background: var(--ft-orange); color: #fff; }
.ft-role-contributor { background: #2563eb; color: #fff; }
.ft-role-viewer { background: var(--ft-border); color: var(--ft-muted); }

/* Admin faner */
.ft-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--ft-border); margin-bottom: 20px; overflow-x: auto; }
.ft-tab { padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--ft-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; }
.ft-tab:hover { color: var(--ft-text); }
.ft-tab.active { color: var(--ft-orange); border-bottom-color: var(--ft-orange); font-weight: 600; }
.ft-admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.ft-admin-header h1 { margin: 0; font-size: 24px; }
.ft-admin-user { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--ft-muted); }
.ft-admin-user small { opacity: .7; }
.ft-link-muted { color: var(--ft-muted); text-decoration: none; font-size: 13px; }
.ft-link-muted:hover { color: var(--ft-text); }
.ft-error { padding: 10px; background: #fee2e2; color: #991b1b; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.ft-role-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.ft-role-admin { background: #fef3c7; color: #92400e; }
.ft-role-editor { background: #dbeafe; color: #1e40af; }
.ft-role-contributor { background: #d1fae5; color: #065f46; }
.ft-role-viewer { background: #f3f4f6; color: #6b7280; }
.ft-compact td, .ft-compact th { padding: 6px 10px; font-size: 13px; }
.ft-progress { width: 100%; height: 8px; background: var(--ft-border); border-radius: 4px; overflow: hidden; }
.ft-progress div { height: 100%; background: var(--ft-orange); border-radius: 4px; transition: width .3s; }
.ft-muted { color: var(--ft-muted); }

/* Språkveljar — flagg med nedtrekk */
.ft-lang-wrap { position: relative; }
.ft-lang-btn { background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px; line-height: 1; }
.ft-lang-dropdown { display: none; position: absolute; right: 0; top: 100%; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius); box-shadow: 0 8px 24px rgba(0,0,0,.15); min-width: 160px; z-index: 200; overflow: hidden; }
.ft-lang-wrap.open .ft-lang-dropdown { display: block; }
.ft-lang-dropdown a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 14px; color: var(--ft-text); text-decoration: none; transition: background .15s; }
.ft-lang-dropdown a:hover { background: var(--ft-bg); }
.ft-lang-dropdown a.active { font-weight: 600; color: var(--ft-orange); }
/* Footer: dropp-UP */
.ft-footer .ft-lang-dropdown { top: auto; bottom: 100%; margin-bottom: 4px; }

/* Fullskjerm-knapp */
.ft-fullscreen-btn { position: absolute; bottom: 16px; right: 16px; background: rgba(0,0,0,.5); color: #fff; border: none; font-size: 22px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.ft-fullscreen-btn:hover { background: rgba(0,0,0,.8); }

/* Slideshow overlay — rotasjon-safe for mobil/nettbrett */
.ft-slideshow {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  z-index: 9999; background: #000; overflow: hidden;
  /* iOS Safari safe area */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
/* dvh/dvw for dynamic viewport (rotasjon) */
@supports (height: 100dvh) { .ft-slideshow { height: 100dvh; width: 100dvw; } }
.ft-slideshow:fullscreen, .ft-slideshow:-webkit-full-screen { width: 100vw; height: 100vh; padding: 0; }
.ft-slide-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.5s ease-in-out;
}
.ft-slide-bg.ft-slide-active { opacity: 1; }
.ft-slide-bg::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 40%, rgba(0,0,0,.2) 100%); }
.ft-slide-info { position: absolute; bottom: 60px; left: 40px; right: 40px; color: #fff; z-index: 2; opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.ft-slide-info.ft-slide-info-in { opacity: 1; transform: translateY(0); }
.ft-slide-info h2 { font-size: 56px; font-weight: 800; margin: 0 0 8px; text-shadow: 0 3px 16px rgba(0,0,0,.7); line-height: 1.1; max-width: 70%; }
.ft-slide-info p { font-size: 20px; opacity: .9; margin: 0 0 6px; }
.ft-slide-info small { font-size: 14px; opacity: .6; }
.ft-slide-close { position: absolute; top: 20px; right: 24px; background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; z-index: 3; opacity: .7; }
.ft-slide-close:hover { opacity: 1; }
.ft-slide-prev, .ft-slide-next { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: #fff; font-size: 48px; cursor: pointer; z-index: 3; opacity: .5; padding: 20px; }
.ft-slide-prev { left: 10px; } .ft-slide-next { right: 10px; }
.ft-slide-prev:hover, .ft-slide-next:hover { opacity: 1; }
.ft-slide-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.ft-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: background .2s; }
.ft-dot.active { background: var(--ft-orange); }
@media (max-width: 539px) {
  .ft-slide-info h2 { font-size: 36px; max-width: 90%; }
  .ft-slide-info p { font-size: 16px; }
  .ft-slide-info { bottom: 50px; left: 20px; right: 20px; }
  .ft-slide-prev, .ft-slide-next { font-size: 32px; padding: 10px; }
  .ft-slide-close { top: 12px; right: 16px; font-size: 28px; }
}
/* Landskap-modus (mobil rotert) */
@media (max-height: 500px) and (orientation: landscape) {
  .ft-slide-info { bottom: 16px; left: 20px; right: 20px; }
  .ft-slide-info h2 { font-size: 32px; margin-bottom: 2px; max-width: 60%; }
  .ft-slide-info p { font-size: 15px; }
  .ft-slide-dots { bottom: 8px; }
  .ft-slide-prev, .ft-slide-next { font-size: 28px; padding: 8px; }
  .ft-slide-close { top: 8px; right: 12px; font-size: 24px; }
}
/* Nettbrett */
@media (min-width: 540px) and (max-width: 1024px) {
  .ft-slide-info h2 { font-size: 48px; max-width: 75%; }
}

/* Favoritt (strek-ikon) */
.ft-fav-nav { text-decoration: none; position: relative; display: inline-flex; align-items: center; }
.ft-fav-nav > svg { display: none; }
.ft-fav-dot { background: #ef4444; color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: none; align-items: center; justify-content: center; font-weight: 700; padding: 0 4px; }
.ft-fav-btn { background: none; border: none; cursor: pointer; color: rgba(255,255,255,.8); transition: all .2s; padding: 2px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.ft-fav-btn:hover { transform: scale(1.15); }
.ft-fav-btn.active { color: var(--ft-orange); }
.ft-fav-btn svg { display: block; }
.ft-fav-hero { display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; color: rgba(255,255,255,0.7); border: none; cursor: pointer; flex-shrink: 0; transition: color .15s, transform .15s; }
.ft-fav-hero svg { stroke: currentColor; }
.ft-fav-hero:hover { color: #fff; transform: scale(1.1); }
.ft-fav-hero.active { color: var(--ft-orange); }
.ft-fav-hero.active svg { fill: var(--ft-orange); }

/* Tittel + favorittknapp på rad i hero (stjerna sit rett etter tittelen) */
.ft-tur-hero-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ft-tur-hero-title-row h1 { margin: 0; }
.ft-fav-card { position: absolute; top: 6px; left: 6px; z-index: 5; background: rgba(0,0,0,.35); border-radius: 50%; width: 28px; height: 28px; }
.ft-card-img { position: relative; }

/* Turtips */
.ft-tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.ft-tip-card { background: var(--ft-surface); border-radius: var(--ft-radius); overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s; border: 1px solid var(--ft-border); display: flex; flex-direction: column; position: relative; }
.ft-tip-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.ft-tip-img { position: relative; aspect-ratio: 3/2; overflow: hidden; flex-shrink: 0; }
.ft-tip-img img { width: 100%; height: 100%; object-fit: cover; }
.ft-tip-count { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 12px; }
.ft-tip-body { padding: 10px 12px; flex: 1; }
.ft-tip-body h3 { font-size: 14px; margin: 2px 0 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ft-tip-body p { font-size: 12px; color: var(--ft-muted); margin: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ft-tip-date { font-size: 12px; color: var(--ft-orange); font-weight: 600; }
.ft-back-link { color: var(--ft-orange); text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 16px; }
.ft-back-link:hover { text-decoration: underline; }
.ft-back-wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 0; }
@media (max-width: 539px) { .ft-back-wrap { padding: 12px 10px 0; } }

/* Turtips detalj */
.ft-tip-detail h1 { font-size: 28px; margin: 6px 0 16px; }
.ft-tip-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ft-tip-photo { margin: 0; cursor: pointer; border-radius: var(--ft-radius); overflow: hidden; }
.ft-tip-photo img { width: 100%; display: block; transition: transform .3s; }
.ft-tip-photo:hover img { transform: scale(1.03); }
.ft-tip-photo figcaption { font-size: 12px; color: var(--ft-muted); padding: 6px 8px; }
.ft-tip-text { font-size: 16px; line-height: 1.7; white-space: pre-line; margin-bottom: 20px; }
.ft-tip-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ft-muted); padding-top: 12px; border-top: 1px solid var(--ft-border); }
.ft-pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 24px; font-size: 14px; }
.ft-pagination a { color: var(--ft-orange); text-decoration: none; font-weight: 600; }
.ft-pagination a:hover { text-decoration: underline; }

/* Lightbox */
.ft-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; }
.ft-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.ft-lightbox-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; opacity: .7; }
.ft-lightbox-close:hover { opacity: 1; }

/* Admin knappar */
.ft-btn-xs { font-size: 11px; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--ft-border); background: transparent; color: var(--ft-text); cursor: pointer; }
.ft-btn-xs:hover { background: var(--ft-border); }
.ft-btn-xs.ft-btn-danger { color: #dc2626; border-color: #dc2626; }
.ft-btn-xs.ft-btn-danger:hover { background: #dc2626; color: #fff; }
.ft-btn-outline { background: transparent !important; border: 1px solid var(--ft-border); color: var(--ft-text) !important; }
.ft-btn-outline:hover { background: var(--ft-border) !important; color: var(--ft-text) !important; }

/* Loader / spinner */
.ft-loader { display: flex; justify-content: center; padding: 24px 0; }
.ft-spinner { width: 32px; height: 32px; border: 3px solid var(--ft-border); border-top-color: var(--ft-orange); border-radius: 50%; animation: ft-spin .8s linear infinite; }
@keyframes ft-spin { to { transform: rotate(360deg); } }

/* Turtips hero */
.ft-tip-hero { position: relative; border-radius: var(--ft-radius); overflow: hidden; margin-bottom: 20px; }
.ft-tip-hero img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.ft-tip-hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; background: linear-gradient(to top, rgba(0,0,0,.7), transparent); color: #fff; }
.ft-tip-hero-overlay time { font-size: 13px; color: var(--ft-orange); font-weight: 600; }
.ft-tip-hero-overlay h1 { font-size: 28px; font-weight: 800; margin: 4px 0 0; text-shadow: 0 2px 8px rgba(0,0,0,.5); }

/* Turtips rad på forsida */
.ft-tips-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ft-tip-card-sm { display: flex; gap: 12px; background: var(--ft-surface); border-radius: var(--ft-radius); overflow: hidden; text-decoration: none; color: var(--ft-text); border: 1px solid var(--ft-border); transition: transform .2s, box-shadow .2s; }
.ft-tip-card-sm:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.ft-tip-card-sm img { width: 100px; height: 80px; object-fit: cover; flex-shrink: 0; }
.ft-tip-card-sm-body { padding: 10px 12px 10px 0; display: flex; flex-direction: column; justify-content: center; }
.ft-tip-card-sm-body time { font-size: 11px; color: var(--ft-orange); font-weight: 600; }
.ft-tip-card-sm-body h3 { font-size: 13px; margin: 2px 0 0; line-height: 1.3; font-weight: 600; }
@media (max-width: 768px) { .ft-tips-row { grid-template-columns: 1fr; } }

/* Like-knapp (strek thumbs-up) */
.ft-like-btn { background: none; border: 1px solid var(--ft-border); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ft-muted); padding: 5px 12px; border-radius: 20px; transition: all .2s; }
.ft-like-btn:hover { border-color: var(--ft-orange); color: var(--ft-orange); }
.ft-like-btn.liked { color: var(--ft-orange); border-color: var(--ft-orange); background: rgba(245,166,35,.06); }
.ft-like-btn .like-icon { width: 16px; height: 16px; transition: transform .2s; }
.ft-like-btn:active .like-icon { transform: scale(1.3); }
.ft-like-btn .like-label { font-size: 12px; font-weight: 500; }
.ft-like-btn .like-count { font-size: 12px; font-weight: 600; }

/* Like-knapp i hero-overlay — kvit */
.ft-tur-hero-overlay .ft-like-btn { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(0,0,0,.2); }
.ft-tur-hero-overlay .ft-like-btn:hover { border-color: var(--ft-orange); color: var(--ft-orange); }
.ft-tur-hero-overlay .ft-like-btn.liked { color: var(--ft-orange); border-color: var(--ft-orange); background: rgba(245,166,35,.15); }

/* Relaterte turar/turtips */
.ft-related h3 { font-size: 16px; margin: 0 0 10px; }
.ft-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ft-related-card { display: flex; gap: 10px; padding: 10px; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius); text-decoration: none; color: var(--ft-text); transition: transform .2s, box-shadow .2s; }
.ft-related-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.ft-related-card img { width: 70px; height: 50px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.ft-related-card strong { font-size: 13px; line-height: 1.3; }
.ft-related-card small { color: var(--ft-muted); font-size: 12px; }

/* Turtips navigering (prev/next + swipe) */
.ft-tip-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--ft-border); }
.ft-tip-nav a { color: var(--ft-orange); text-decoration: none; font-size: 14px; font-weight: 500; max-width: 45%; }
.ft-tip-nav a:hover { text-decoration: underline; }
.ft-tip-nav-next { text-align: right; }

/* Turtips hero responsiv */
@media (max-width: 539px) {
  .ft-tip-hero img { max-height: 260px; }
  .ft-tip-hero-overlay { padding: 14px 16px; }
  .ft-tip-hero-overlay h1 { font-size: 20px; }
  .ft-tip-hero-overlay time { font-size: 11px; }
  .ft-tip-gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ft-tip-nav a { font-size: 13px; }
}

/* Søkeknapp i nav */
.ft-nav-search { color: var(--ft-muted); text-decoration: none; opacity: .6; transition: opacity .2s; display: inline-flex; align-items: center; }
.ft-nav-search:hover { opacity: 1; }

/* Alerts (varslar) */
.ft-alerts { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.ft-alert { display: flex; gap: 10px; padding: 10px 14px; border-radius: var(--ft-radius); border-left: 3px solid var(--ft-orange); background: rgba(245,158,11,.06); font-size: 13px; align-items: flex-start; }
.ft-alert-icon { flex-shrink: 0; line-height: 1; color: var(--ft-orange); display: flex; align-items: center; }
.ft-alert strong { font-size: 13px; display: block; }
.ft-alert p { margin: 2px 0 0; color: var(--ft-muted); font-size: 12px; line-height: 1.4; }
.ft-alert-jakt { border-color: #ef4444; background: rgba(239,68,68,.05); }
.ft-alert-stengt { border-color: #ef4444; background: rgba(239,68,68,.05); }
.ft-alert-bom { border-color: #6b7280; background: rgba(107,114,128,.05); }

/* Tema toggle */
.ft-theme-toggle { background: none; border: none; cursor: pointer; color: var(--ft-muted); padding: 4px; display: inline-flex; align-items: center; opacity: .6; transition: opacity .2s, color .3s; }
.ft-theme-toggle:hover { opacity: 1; }
[data-theme="dark"] .ft-theme-toggle { color: var(--ft-orange); opacity: .8; }

/* Mørk modus overgangar */
[data-theme="dark"] .ft-surface, [data-theme="dark"] .ft-tip-card, [data-theme="dark"] .ft-trip-card { transition: background-color .3s; }
[data-theme="dark"] .ft-header { background: var(--ft-surface); border-color: var(--ft-border); }
[data-theme="dark"] .ft-hero-overlay { background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,.4) 100%); }
[data-theme="dark"] body { background-image: url('../img/mountains-bg-dark.svg'); }

/* Vêr (Yr.no) */
.ft-weather-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.ft-weather-day { flex: 1; min-width: 80px; text-align: center; padding: 10px 6px; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius); }
.ft-weather-day-name { font-weight: 600; font-size: 13px; text-transform: capitalize; }
.ft-weather-day-date { font-size: 11px; color: var(--ft-muted); margin-bottom: 4px; }
.ft-weather-day img { display: block; margin: 0 auto; }
.ft-weather-temp { font-size: 18px; font-weight: 700; margin-top: 4px; }
.ft-weather-wind { font-size: 11px; color: var(--ft-muted); }
.ft-weather-precip { font-size: 11px; color: #3b82f6; }
.ft-weather-credit { font-size: 11px; color: var(--ft-muted); margin-top: 6px; }
.ft-weather-credit a { color: var(--ft-orange); }

/* Hero vêr-ikon (venstre side) */
.ft-hero-weather { position: absolute; top: 14px; left: 14px; z-index: 10; display: flex; align-items: center; gap: 6px; color: #fff; font-size: 15px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); background: rgba(0,0,0,.25); border-radius: 20px; padding: 4px 10px 4px 4px; backdrop-filter: blur(4px); }
.ft-hero-weather img { filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }

/* Footer (oppdatert) */
.ft-footer { text-align: center; padding: 24px 16px 32px; color: var(--ft-muted); font-size: 13px; }
.ft-footer p { margin: 0 0 6px; }
.ft-footer-row { display: flex; justify-content: center; gap: 8px; align-items: center; margin-bottom: 10px; }
.ft-footer-row a { color: var(--ft-orange); text-decoration: none; font-size: 13px; }
.ft-footer-controls { display: flex; justify-content: center; gap: 12px; align-items: center; }
.ft-theme-footer { padding: 4px; }

/* Print-knapp (outline ikon) */
.ft-print-btn { background: none; border: 1px solid var(--ft-border); cursor: pointer; display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 20px; color: var(--ft-muted); transition: all .2s; }
.ft-print-btn:hover { border-color: var(--ft-orange); color: var(--ft-orange); }
.ft-drive-btn { background: none; border: 1px solid var(--ft-border); cursor: pointer; display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 20px; color: var(--ft-muted); transition: all .2s; text-decoration: none; margin-right: 6px; }
.ft-drive-btn:hover { border-color: var(--ft-orange); color: var(--ft-orange); }

/* ============ PRINT ============ */
/* Old print block removed — sjå A4 print-blokk under */

/* Nav vêr-ikon */
/* nav-weather mobil: sjå hovud-mediablokk */

/* ============ PRINT A4 — TITTEL + KART ============ */
@media print {
  @page { size: A4 portrait; margin: 8mm; }

  /* Skjul ALT unntatt print-header, kart og overviewmap */
  .ft-header, .ft-footer,
  .ft-tur-hero, .ft-tags, .ft-alerts,
  .ft-fav-btn, .ft-like-btn, .ft-nav-weather, .ft-nav-search,
  .ft-fullscreen-btn, .ft-hero-reload, .ft-hero-weather, .ft-hero-wrap,
  .ft-hero-meta, .ft-back-link, .ft-slideshow, .ft-lightbox,
  .ft-theme-toggle, .ft-lang-wrap, .ft-filter-collapse,
  .ft-alert-badge, .ft-dnt-badge, .ft-tur-hero-back,
  .ft-weather-section,
  .ft-tur-section:has(.ft-gallery),
  .ft-tur-section:has(.ft-videos),
  .ft-tur-section:has(.ft-story),
  .ft-tur-section:has(.ft-collapse),
  .ft-tur-section:has(.ft-user-photo-grid),
  .ft-tur-info, .ft-related, .ft-tip-nav, .ft-comments, .ft-tur-nav,
  .ft-print-btn, .ft-print-footer,
  .ft-kompass-standalone, #ftKompassOverlay, .ft-nav-kompass,
  .ft-liveloc-panel, .ft-liveloc-floating, .ft-live-section,
  .ft-related, .ft-tips-row, .ft-tips-grid,
  .ft-rel-turtips, .ft-rel-nearby,
  .ft-map-legend, .ft-drive-btn,
  button:not(.ft-tag), [onclick]:not(.ft-tag) { display: none !important; }

  .ft-tur-section { display: none !important; }
  .ft-tur-section:has(#turMap) { display: block !important; }

  html, body { background: #fff !important; color: #000 !important; font-size: 10pt; line-height: 1.3; }
  * { box-shadow: none !important; text-shadow: none !important; }
  a { color: #000 !important; text-decoration: none !important; }
  a::after { content: none !important; }
  .ft-section, .ft-tur-body { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }

  /* Print-header: Tittel venstre, Logo+FINTUR høgre */
  .ft-print-header { display: flex !important; justify-content: space-between; align-items: flex-start; margin-bottom: 6pt; border-bottom: 2pt solid #F59E0B; padding-bottom: 5pt; }
  .ft-print-header h1 { font-size: 20pt !important; font-weight: 800 !important; margin: 0 0 1pt !important; color: #000 !important; }
  .ft-print-meta { font-size: 9pt !important; color: #555 !important; }
  .ft-print-logo-wrap { display: flex !important; flex-direction: column; align-items: center; flex-shrink: 0; }
  .ft-print-logo { display: block !important; width: 32pt !important; height: 32pt !important; }
  .ft-print-logo-text { display: block !important; font-size: 7pt !important; font-weight: 800 !important; letter-spacing: 1pt; color: #F59E0B !important; margin-top: 2pt; }

  /* Hovudkart */
  .ft-tur-section:has(#turMap) { padding: 0 !important; margin: 0 !important; }
  .ft-tur-section:has(#turMap) h2 { display: none !important; }
  .ft-tur-section:has(#turMap) .ft-btn { display: none !important; }
  #turMap, .leaflet-container {
    height: 580pt !important; width: 100% !important;
    border: 0.5pt solid #ccc !important;
    -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
  }
}
/* Legg på print-dimensjonar før window.print() så Leaflet lastar riktige fliser */
body.ft-printing #turMap,
body.ft-printing .leaflet-container {
  height: 580pt !important; width: 100% !important;
  -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
}
@media print {
  .leaflet-control-zoom, .leaflet-control-layers,
  .ft-map-fullscreen-btn, .ft-map-live-btn,
  .ft-3d-btn, .ft-3d-overlay,
  .leaflet-marker-icon.ft-hiker-icon { display: none !important; }
  .leaflet-control-attribution { font-size: 5pt !important; }

  /* Landskart (oversiktskart under hovudkart) */
  .ft-print-overview { display: none !important; }

  .ft-tur-body ~ * { display: none !important; }
}

/* Print-element (skjult på skjerm) */
.ft-print-header, .ft-print-footer { display: none; }
.ft-print-btn { display: inline-flex; align-items: center; gap: 4px; }

/* Kompakt turdetalj — vêr inline */
.ft-weather-section h2 { font-size: 15px; margin-bottom: 6px; }
.ft-weather-grid { gap: 6px; }
.ft-weather-day { padding: 8px 4px; min-width: 70px; }
.ft-weather-temp { font-size: 16px; }

/* Print: sjå hovud print-blokk */

/* Admin knappar */
.ft-btn-active { background: var(--ft-orange) !important; color: #fff !important; }

/* Alert-badge på turkort (outline-ikon, diskré) */
.ft-alert-badge {
  position: absolute; top: 8px; left: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  color: #dc2626;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.ft-alert-badge svg { width: 14px; height: 14px; }
@media (max-width: 539px) {
  .ft-alert-badge { width: 20px; height: 20px; top: 6px; left: 6px; }
  .ft-alert-badge svg { width: 12px; height: 12px; }
}

/* "Sjå alle"-pil — diskré outline, ingen ramme */
.ft-see-all {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: var(--ft-muted);
  transition: color .15s, transform .15s;
}
.ft-see-all svg { width: 18px; height: 18px; }
.ft-see-all:hover { color: var(--ft-orange); transform: translateX(2px); }

/* Print-knapp (outline) */
.ft-print-btn { background: none; border: 1px solid var(--ft-border); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border-radius: var(--ft-radius); color: var(--ft-muted); transition: all .2s; }
.ft-print-btn:hover { border-color: var(--ft-orange); color: var(--ft-orange); }

/* ── Kart: Fullskjerm ── */
.ft-map-fs {
  position: fixed !important;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff;
}
.ft-map-fs #turMap, .ft-map-fs .leaflet-container {
  height: 100vh !important;
  width: 100% !important;
  border-radius: 0 !important;
}
.ft-map-fs h2, .ft-map-fs .ft-btn, .ft-map-fs .ft-print-btn { display: none !important; }
body.ft-map-fs-active { overflow: hidden !important; }

/* Hiker-ikon — fjern standard Leaflet-ikon bakgrunn */
.ft-hiker-icon { background: none !important; border: none !important; }

/* GDPR lokasjon-banner */
#ftGdpr { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: rgba(10,15,28,.95); backdrop-filter: blur(8px); border-top: 2px solid var(--ft-orange); padding: 0; }
/* ft-gdpr banner */
#ftGdpr { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(18,22,20,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 -4px 24px rgba(0,0,0,.35); }
.ft-gdpr-inner { max-width: 860px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ft-gdpr-icon { flex-shrink: 0; color: var(--ft-orange); opacity: .85; }
.ft-gdpr-body { flex: 1; min-width: 220px; }
.ft-gdpr-body strong { color: #fff; font-size: 13px; display: block; margin-bottom: 5px; }
.ft-gdpr-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ft-gdpr-list li { font-size: 12px; color: #bbb; display: flex; align-items: center; gap: 5px; }
.ft-gdpr-list li svg { opacity: .6; flex-shrink: 0; }
.ft-gdpr-btns { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.ft-gdpr-btns button { padding: 9px 22px; border: none; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; }
.ft-gdpr-btns button:first-child { background: var(--ft-orange); color: #fff; }
.ft-gdpr-btns button:first-child:hover { background: #d97706; transform: translateY(-1px); }
.ft-gdpr-decline { background: transparent !important; color: #999; border: 1px solid #555 !important; }
.ft-gdpr-decline:hover { color: #fff !important; border-color: #888 !important; }
@media (max-width: 539px) {
  .ft-gdpr-inner { padding: 12px 14px; gap: 10px; }
  .ft-gdpr-body strong { font-size: 12px; }
  .ft-gdpr-list { gap: 3px 12px; }
  .ft-gdpr-list li { font-size: 11px; }
  .ft-gdpr-btns { width: 100%; justify-content: flex-end; }
  .ft-gdpr-btns button { padding: 7px 16px; font-size: 12px; }
}
@media print { #ftGdpr { display: none !important; } }

/* Print-only element */
.ft-print-logo { display: none; }
.ft-print-logo-wrap { display: none; }
.ft-print-logo-text { display: none; }
.ft-print-overview { display: none; }

/* GPX download-knapp på kart */
.ft-map-gpx-btn a:hover { background: #f0f0f0 !important; }

/* Kart-labels */
.ft-coord-label { font-size: 8px; color: #fff; font-family: monospace; white-space: nowrap; line-height: 1; padding: 0; border: none; background: none; text-shadow: 0 1px 3px rgba(0,0,0,.8), 0 0 6px rgba(0,0,0,.5); pointer-events: none; text-align: right; }
.ft-label-start, .ft-label-end { background: none; }
.ft-dist-label { font-size: 9px; font-weight: 700; color: #fff; white-space: nowrap; background: #E53E3E; padding: 2px 6px; border-radius: 8px; border: 1.5px solid #fff; line-height: 1.2; text-align: center; pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.4); width: auto !important; height: auto !important; display: inline-block; }
.ft-dist-label-alt { background: #2929f2; }
.ft-peak-marker { font-size: 16px; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 3px #000; cursor: help; line-height: 1; text-align: center; width: auto !important; height: auto !important; }
.ft-peak-marker-low { color: #cce6ff; }
.ft-elev-label { font-size: 9px; font-weight: 700; color: #fff; white-space: nowrap; background: #16a34a; padding: 2px 6px; border-radius: 8px; border: 1.5px solid #fff; line-height: 1.2; text-align: center; pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.4); width: auto !important; height: auto !important; display: inline-block; }
.ft-elev-chart { width: 100%; min-height: 120px; margin-top: 12px; position: relative; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 8px; overflow: hidden; }
.ft-elev-stats { display: flex; gap: 16px; padding: 8px 12px 4px; font-size: 12px; font-weight: 600; color: var(--ft-text); border-bottom: 1px solid var(--ft-border); }
.ft-elev-stats svg.ft-elev-stat-pin { width: 11px !important; height: 11px !important; vertical-align: -1px; color: var(--ft-orange); display: inline-block; flex-shrink: 0; }
.ft-elev-stat-up { color: #16a34a; font-weight: 700; }
.ft-elev-stat-dn { color: #dc2626; font-weight: 700; }
.ft-elev-stat-muted { margin-left: auto; color: var(--ft-muted); font-weight: 500; }
.ft-elev-chart svg { width: 100%; height: 100%; display: block; }
.ft-elev-chart .ft-elev-fill { fill: rgba(245, 158, 11, 0.2); }
.ft-elev-chart .ft-elev-line { fill: none; stroke: #F59E0B; stroke-width: 2; }
.ft-elev-chart .ft-elev-grid { stroke: var(--ft-border); stroke-width: 1; }
.ft-elev-chart .ft-elev-axis-text { font-size: 10px; fill: var(--ft-muted); }
.ft-elev-chart .ft-elev-cursor { stroke: #E53E3E; stroke-width: 1.5; opacity: 0; pointer-events: none; vector-effect: non-scaling-stroke; }
.ft-elev-chart .ft-elev-cursor-dot { fill: #E53E3E; opacity: 0; pointer-events: none; vector-effect: non-scaling-stroke; }
.ft-elev-chart .ft-elev-tooltip { position: absolute; background: rgba(0,0,0,.8); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 4px; pointer-events: none; opacity: 0; transition: opacity .15s; white-space: nowrap; transform: translate(-50%, -100%); }
/* Lås sidelengs scroll på heile sida (særleg viktig for tur-detalj med slidere) */
html, body { overflow-x: hidden; max-width: 100%; }
/* Høgdegrafen får eige touch-handling — touch-action panY tillet vertikal scroll, men x-bevegelse går til slideren */
.ft-elev-chart { touch-action: pan-y; }
.ft-map-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 10px; padding: 10px 14px; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 8px; font-size: 12px; color: var(--ft-text); }
.ft-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.ft-legend-dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 10px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ft-legend-tri { font-size: 14px; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.ft-legend-tri-low { color: #cce6ff; }
.ft-legend-pill { display: inline-block; color: #fff; font-weight: 700; font-size: 9px; padding: 2px 6px; border-radius: 8px; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); white-space: nowrap; }

/* Live location (Fase 1: admin) */
.ft-liveloc-icon { background: none !important; border: none !important; }
.ft-liveloc-dot { width: 14px; height: 14px; border-radius: 50%; background: #2563eb; border: 2.5px solid #fff; box-shadow: 0 0 0 2px rgba(37,99,235,.3), 0 2px 6px rgba(0,0,0,.4); animation: ftLivePulse 2s ease-in-out infinite; }
@keyframes ftLivePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(37,99,235,.3), 0 2px 6px rgba(0,0,0,.4); }
  50% { box-shadow: 0 0 0 6px rgba(37,99,235,.15), 0 2px 6px rgba(0,0,0,.4); }
}
.ft-liveloc-panel { margin-top: 12px; padding: 10px 14px; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.ft-liveloc-btn { background: #2563eb; color: #fff; border: none; padding: 6px 14px; border-radius: 18px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.ft-liveloc-btn:hover { background: #1d4ed8; }
.ft-liveloc-btn.stop { background: #dc2626; }
.ft-liveloc-btn.stop:hover { background: #b91c1c; }
.ft-liveloc-btn.pause { background: #f59e0b; }
.ft-liveloc-btn.pause:hover { background: #d97706; }

/* Live location: "deg sjølv"-markør i grønn for å skilje frå andre */
.ft-liveloc-me { background: #16a34a !important; box-shadow: 0 0 0 2px rgba(22,163,74,.3), 0 2px 6px rgba(0,0,0,.4) !important; }
@keyframes ftLiveMePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(22,163,74,.3), 0 2px 6px rgba(0,0,0,.4); }
  50% { box-shadow: 0 0 0 6px rgba(22,163,74,.15), 0 2px 6px rgba(0,0,0,.4); }
}
.ft-liveloc-me { animation: ftLiveMePulse 2s ease-in-out infinite !important; }

/* Samtykke-modal */
.ft-consent-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ft-consent-box { background: var(--ft-surface); border-radius: 12px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 24px 28px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.ft-consent-box h2 { margin: 0 0 12px; font-size: 20px; color: var(--ft-text); }
.ft-consent-box h3 { margin: 18px 0 8px; font-size: 14px; color: var(--ft-orange); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.ft-consent-box p { margin: 0 0 12px; line-height: 1.5; color: var(--ft-text); font-size: 14px; }
.ft-consent-box ul { margin: 0 0 16px; padding-left: 20px; line-height: 1.6; font-size: 13px; color: var(--ft-text); }
.ft-consent-radio { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.ft-consent-radio label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--ft-text); padding: 6px 10px; border-radius: 6px; transition: background .15s; }
.ft-consent-radio label:hover { background: var(--ft-bg); }
.ft-consent-radio input[type="radio"] { accent-color: var(--ft-orange); }
.ft-consent-legal { font-size: 11px; color: var(--ft-muted); font-style: italic; margin-top: 16px; line-height: 1.4; }
.ft-consent-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ft-border); }
.ft-consent-cancel { background: var(--ft-muted) !important; }
.ft-consent-cancel:hover { background: #6b7280 !important; }
.ft-consent-ok { background: #16a34a !important; }
.ft-consent-ok:hover { background: #15803d !important; }
.ft-liveloc-status { color: var(--ft-muted); font-size: 11px; }
.ft-liveloc-status.err { color: #dc2626; }
.ft-liveloc-delete { background: none; border: none; color: var(--ft-muted); font-size: 11px; cursor: pointer; text-decoration: underline; padding: 0; margin-left: auto; }
.ft-liveloc-floating { position: fixed; top: 70px; right: 14px; z-index: 500; background: var(--ft-surface); padding: 8px 12px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.2); display: flex; align-items: center; gap: 8px; font-size: 12px; }

/* Brukarveiledning */
.ft-help-intro { font-size: 16px; color: var(--ft-muted); margin: 0 0 24px; line-height: 1.5; }
.ft-help-section { margin-bottom: 22px; }
.ft-help-section h2 { font-size: 17px; margin: 0 0 6px; color: var(--ft-orange); font-weight: 700; }
.ft-help-section p { margin: 0; line-height: 1.55; color: var(--ft-text); }
.ft-help-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--ft-border); color: var(--ft-muted); font-size: 14px; }
.ft-help-footer a { color: var(--ft-orange); text-decoration: none; font-weight: 600; }
.ft-help-footer a:hover { text-decoration: underline; }

/* Live tracking-rad på forsida */
.ft-live-section { max-width: 1200px; margin: 24px auto 0; padding: 0 16px; }
.ft-live-title { font-size: 16px; font-weight: 700; color: var(--ft-text); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.ft-live-pulse { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 0 rgba(220,38,38,.6); animation: ftLiveTitlePulse 1.8s ease-out infinite; }
@keyframes ftLiveTitlePulse {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,.6); }
  70% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}
.ft-live-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.ft-live-row::-webkit-scrollbar { height: 4px; }
.ft-live-row::-webkit-scrollbar-thumb { background: var(--ft-border); border-radius: 2px; }
.ft-live-card { flex: 0 0 auto; width: 130px; text-decoration: none; color: var(--ft-text); scroll-snap-align: start; transition: transform .2s; }
.ft-live-card:hover { transform: translateY(-2px); }
.ft-live-card-img { width: 130px; height: 130px; border-radius: 12px; background-size: cover; background-position: center; background-color: #e5e5e5; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,.1); overflow: hidden; }
.ft-live-badge { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; background: rgba(220,38,38,.95); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.ft-live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.8); animation: ftLiveDotPulse 1.5s ease-out infinite; }
@keyframes ftLiveDotPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); }
  70% { box-shadow: 0 0 0 5px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.ft-live-count { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.ft-live-card-title { font-size: 12px; font-weight: 600; margin-top: 8px; line-height: 1.3; color: var(--ft-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 539px) {
  .ft-live-card { width: 110px; }
  .ft-live-card-img { width: 110px; height: 110px; }
}

/* Hjelp-lenke i hamburger-meny (kun mobil, plassert nedst utanfor nav-rekka) */
.ft-nav-help { display: none; }
@media (max-width: 539px) {
  .ft-nav-help {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 20px;
    padding: 16px 20px;
    border-top: 1px solid var(--ft-border);
    color: var(--ft-muted) !important;
    font-size: 14px;
    align-self: stretch;
    width: 100%;
  }
  .ft-nav-help svg { width: 20px; height: 20px; }
  .ft-nav-help .ft-nav-label { display: inline !important; font-weight: 500; }
}
.ft-print-coords { display: none; }
@media print {
  .ft-coord-label { font-size: 7pt; }
  .ft-dist-label { font-size: 8pt; }
  .ft-map-gpx-btn { display: none !important; }
  .ft-print-coords { display: inline !important; font-family: monospace; font-size: 8pt; }
}

/* Admin turtips 2-kolonne */
/* ===== ADMIN TURTIPS — Split Layout ===== */
.ft-tips-wrap { display: flex; gap: 0; min-height: calc(100vh - 200px); }
.ft-tips-col1 { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; border-right: 1px solid var(--ft-border); overflow: hidden; }
.ft-tips-col2 { flex: 1; min-width: 300px; overflow-y: auto; max-height: calc(100vh - 200px); }
.ft-tips-resizer { width: 5px; cursor: col-resize; background: transparent; flex-shrink: 0; transition: background .2s; position: relative; }
.ft-tips-resizer:hover, .ft-tips-resizer.active { background: var(--ft-orange); }
.ft-tips-resizer::after { content: ''; position: absolute; top: 50%; left: -4px; right: -4px; height: 40px; transform: translateY(-50%); }

/* Filters */
.ft-tips-filters { display: flex; gap: 4px; padding: 8px; align-items: center; border-bottom: 1px solid var(--ft-border); flex-wrap: wrap; }
.ft-fbtn { font-size: 11px; padding: 3px 10px; border-radius: 12px; background: var(--ft-surface); color: var(--ft-muted); text-decoration: none; border: 1px solid var(--ft-border); white-space: nowrap; }
.ft-fbtn.active { background: var(--ft-orange); color: #fff; border-color: var(--ft-orange); }
.ft-tips-sort { margin-left: auto; display: flex; gap: 2px; font-size: 10px; }
.ft-tips-sort a { padding: 2px 6px; border-radius: 4px; color: var(--ft-muted); text-decoration: none; }
.ft-tips-sort a.active { background: var(--ft-text); color: var(--ft-bg); font-weight: 600; }

/* Table */
.ft-tips-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ft-tips-table thead { position: sticky; top: 0; background: var(--ft-bg); z-index: 2; }
.ft-tips-table th { text-align: left; padding: 6px 8px; font-size: 10px; font-weight: 600; color: var(--ft-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--ft-border); }
.ft-tips-table tbody { overflow-y: auto; }
.ft-trow { cursor: pointer; transition: background .1s; }
.ft-trow:hover { background: color-mix(in srgb, var(--ft-orange) 8%, transparent); }
.ft-trow-sel { background: color-mix(in srgb, var(--ft-orange) 15%, transparent) !important; }
.ft-trow-dim { opacity: .55; }
.ft-trow td { padding: 6px 8px; border-bottom: 1px solid color-mix(in srgb, var(--ft-border) 50%, transparent); vertical-align: middle; }
.ft-tcol-s { width: 20px; text-align: center; }
.ft-tcol-t { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ft-tcol-d { width: 65px; color: var(--ft-muted); font-size: 11px; white-space: nowrap; }
.ft-tcol-p { width: 28px; text-align: center; color: var(--ft-muted); font-size: 11px; }
.ft-dot-g { color: #16a34a; }
.ft-dot-o { color: #ccc; }
.ft-tips-pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 8px; font-size: 12px; border-top: 1px solid var(--ft-border); }
.ft-tips-pager a { color: var(--ft-orange); text-decoration: none; font-weight: 600; }
.ft-tips-table-wrap { flex: 1; overflow-y: auto; }

/* Col2: Detail */
.ft-tip-detail { padding: 16px 20px; }
.ft-tip-nav-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; }
.ft-tip-nav-btn { color: var(--ft-orange); text-decoration: none; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.ft-tip-nav-btn:hover { background: color-mix(in srgb, var(--ft-orange) 10%, transparent); }
.ft-tip-id { color: var(--ft-muted); font-size: 11px; }
.ft-tip-title-input { width: 100%; font-size: 18px; font-weight: 700; border: 1px solid transparent; background: transparent; color: var(--ft-text); padding: 6px 8px; border-radius: 6px; margin-bottom: 10px; }
.ft-tip-title-input:focus { border-color: var(--ft-orange); outline: none; background: var(--ft-surface); }
.ft-tip-cover { margin-bottom: 12px; border-radius: 8px; overflow: hidden; }
.ft-tip-cover img { width: 100%; max-height: 300px; object-fit: cover; display: block; }
.ft-tip-detail .ft-tip-body { font-size: 13px; line-height: 1.6; color: var(--ft-text); margin-bottom: 12px; max-height: 200px; overflow-y: auto; padding: 10px; background: var(--ft-surface); border-radius: 6px; border: 1px solid var(--ft-border); }
.ft-tip-meta-bar { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--ft-muted); margin-bottom: 12px; padding: 8px 0; border-bottom: 1px solid var(--ft-border); }
.ft-tip-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 4px; margin-bottom: 14px; }
.ft-tip-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }

/* Links */
.ft-tip-links-section { margin-bottom: 14px; }
.ft-tip-links-section h4 { font-size: 12px; font-weight: 600; color: var(--ft-muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.ft-tip-linked-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.ft-linked-tag { font-size: 11px; background: color-mix(in srgb, var(--ft-orange) 12%, transparent); color: var(--ft-text); padding: 3px 8px; border-radius: 12px; display: inline-flex; align-items: center; gap: 4px; }
.ft-linked-tag a { color: var(--ft-muted); font-weight: 700; text-decoration: none; }
.ft-linked-tag a:hover { color: #dc2626; }
.ft-no-links { font-size: 11px; color: var(--ft-muted); font-style: italic; }
.ft-tip-suggestions { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0; }
.ft-sug-label { font-size: 10px; color: var(--ft-muted); align-self: center; }
.ft-sug-btn { font-size: 10px; padding: 2px 8px; background: var(--ft-surface); border: 1px dashed var(--ft-border); border-radius: 10px; cursor: pointer; color: var(--ft-text); }
.ft-sug-btn:hover { border-color: var(--ft-orange); background: color-mix(in srgb, var(--ft-orange) 8%, transparent); }
.ft-link-select { font-size: 12px; padding: 4px 8px; border: 1px solid var(--ft-border); border-radius: 6px; background: var(--ft-surface); color: var(--ft-text); width: 100%; margin-top: 4px; }

/* Actions */
.ft-tip-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--ft-border); }
.ft-btn-save { background: #16a34a !important; color: #fff !important; }
.ft-tip-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--ft-muted); }
.ft-tip-empty p { margin: 0; font-size: 16px; }
.ft-tip-empty-sub { font-size: 12px !important; margin-top: 6px !important; }

@media (max-width: 899px) {
  .ft-tips-wrap { flex-direction: column; }
  .ft-tips-col1 { width: 100% !important; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--ft-border); }
  .ft-tips-resizer { display: none; }
  .ft-tips-col2 { max-height: none; }
}
 .ft-tip-preview { position: static; } }

/* Slideshow cover */
.ft-tip-cover { position: relative; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.ft-cover-nav { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.6); border-radius: 16px; padding: 2px 10px; }
.ft-cover-btn { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1; }
.ft-cover-btn:hover { color: var(--ft-orange); }
#slideCounter { color: #fff; font-size: 11px; font-weight: 600; }

/* Editable body */
.ft-tip-body-edit { width: 100%; min-height: 100px; max-height: 200px; font-size: 13px; line-height: 1.6; color: var(--ft-text); padding: 10px; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 6px; resize: vertical; font-family: inherit; margin-bottom: 12px; }
.ft-tip-body-edit:focus { border-color: var(--ft-orange); outline: none; }

/* Meta edit inline */
.ft-meta-edit { display: inline-flex; align-items: center; gap: 2px; }
.ft-meta-input { font-size: 11px; padding: 1px 4px; border: 1px solid transparent; background: transparent; color: var(--ft-text); width: 80px; border-radius: 3px; }
.ft-meta-input:focus { border-color: var(--ft-orange); outline: none; background: var(--ft-surface); }

/* Gallery items with delete + active highlight */
.ft-gal-item { position: relative; }
.ft-gal-item img { cursor: pointer; transition: opacity .15s; }
.ft-gal-item img:hover { opacity: .8; }
.ft-gal-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(220,38,38,.85); color: #fff; border: none; font-size: 12px; line-height: 1; cursor: pointer; display: none; align-items: center; justify-content: center; }
.ft-gal-item:hover .ft-gal-del { display: flex; }
.ft-gal-cover-btn { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 11px; line-height: 1; cursor: pointer; display: none; align-items: center; justify-content: center; padding: 0; }
.ft-gal-item:hover .ft-gal-cover-btn { display: flex; }
.ft-gal-cover-btn:hover { background: rgba(234,179,8,.95); }
.ft-gal-item.ft-gal-cover { outline: 2px solid #eab308; outline-offset: 1px; border-radius: 4px; }
.ft-gal-item.ft-gal-cover .ft-gal-cover-btn { display: flex; background: rgba(234,179,8,.95); }
.ft-gal-active { outline: 2px solid var(--ft-orange); outline-offset: -2px; border-radius: 4px; }

/* Turtips søk */
.ft-tips-search { margin-bottom: 16px; }
.ft-search-wrap { position: relative; max-width: 500px; }
.ft-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ft-muted); pointer-events: none; }
.ft-search-input { width: 100%; padding: 10px 36px 10px 38px; font-size: 14px; border: 1px solid var(--ft-border); border-radius: 24px; background: var(--ft-surface); color: var(--ft-text); font-family: inherit; transition: border-color .2s; box-sizing: border-box; }
.ft-search-input:focus { border-color: var(--ft-orange); outline: none; }
.ft-search-input::placeholder { color: var(--ft-muted); }
.ft-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: var(--ft-muted); color: var(--ft-bg); border-radius: 50%; text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1; }
.ft-search-clear:hover { background: #dc2626; color: #fff; }
.ft-no-results { text-align: center; padding: 40px 20px; color: var(--ft-muted); }
.ft-no-results a { color: var(--ft-orange); }
.ft-count { font-weight: 400; color: var(--ft-muted); font-size: 18px; }

/* Turtips hero slideshow */
.ft-tip-hero { position: relative; }
.ft-hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.45); color: #fff; border: none; font-size: 28px; width: 40px; height: 60px; cursor: pointer; z-index: 3; transition: background .2s; display: flex; align-items: center; justify-content: center; }
.ft-hero-arrow:hover { background: rgba(0,0,0,.7); }
.ft-hero-prev { left: 0; border-radius: 0 6px 6px 0; }
.ft-hero-next { right: 0; border-radius: 6px 0 0 6px; }
.ft-hero-counter { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; z-index: 3; }
.ft-thumb-active { outline: 3px solid var(--ft-orange); outline-offset: -3px; border-radius: 6px; }
.ft-tip-photo { cursor: pointer; }
@media (max-width: 539px) {
  .ft-hero-arrow { width: 32px; height: 48px; font-size: 22px; }
  .ft-hero-counter { font-size: 11px; padding: 2px 8px; }
}

/* Turtips favoritt + like i meta */
.ft-tip-fav { background: none; border: none; cursor: pointer; color: var(--ft-muted); padding: 4px; transition: color .2s; }
.ft-tip-fav:hover, .ft-tip-fav.active { color: #F59E0B; }
.ft-tip-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ft-muted); margin: 16px 0; padding: 12px 0; border-top: 1px solid var(--ft-border); border-bottom: 1px solid var(--ft-border); }
/* Turtips gallery — compact grid with all photos including cover */
.ft-tip-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); gap: 4px; margin: 12px 0; }
.ft-tip-photo { margin: 0; cursor: pointer; border-radius: 4px; overflow: hidden; aspect-ratio: 1; }
.ft-tip-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s; }
.ft-tip-photo:hover img { opacity: .8; }
.ft-thumb-active { outline: 3px solid var(--ft-orange); outline-offset: -3px; }
/* Relaterte turar med × fjern-knapp */
.ft-related-card { position: relative; }
.ft-related-remove { display: none; }

/* Relaterte turar med × fjerning */
.ft-related-card-wrap { position: relative; }
.ft-related-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(220,38,38,.85); color: #fff; border: none; font-size: 14px; font-weight: 700; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 2; line-height: 1; }
.ft-related-card-wrap:hover .ft-related-x { display: flex; }
.ft-related-x:hover { background: #dc2626; transform: scale(1.1); }

/* Turtips sort bar */
.ft-tips-sort-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.ft-sort-link { font-size: 12px; padding: 4px 12px; border-radius: 14px; text-decoration: none; color: var(--ft-muted); border: 1px solid var(--ft-border); background: var(--ft-surface); transition: all .2s; }
.ft-sort-link.active { background: var(--ft-orange); color: #fff; border-color: var(--ft-orange); }
.ft-sort-link:hover:not(.active) { border-color: var(--ft-orange); color: var(--ft-orange); }

/* Favorittar-sida */
.ft-fav-heading { font-size: 16px; font-weight: 600; color: var(--ft-muted); margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--ft-border); }
/* Turtips fav-knapp på kort */
.ft-tip-fav-card { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.4); border: none; color: #F59E0B; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.ft-tip-fav-card:hover { background: rgba(0,0,0,.6); }

/* ===== Kort-ramme for detalj-sider ===== */
.ft-detail-card { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 12px; overflow: hidden; margin: 0 auto; max-width: 860px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.ft-detail-card .ft-tur-hero,
.ft-detail-card .ft-tip-hero { border-radius: 0; margin: -1px -1px 0; width: calc(100% + 2px); }
.ft-detail-card .ft-tur-body,
.ft-detail-card .ft-tip-detail { padding: 20px 24px; }

/* Turtips prev/next innanfor kortet */
.ft-detail-card .ft-tip-nav { margin: 0; padding: 14px 24px 18px; border-top: 1px solid var(--ft-border); }
.ft-detail-card .ft-related { margin: 0 0 8px; }

/* Tur-detalj seksjonar innanfor kortet */
.ft-detail-card .ft-tur-section { padding: 0 24px 16px; }
.ft-detail-card .ft-tags { padding: 8px 24px 0; }
.ft-detail-card .ft-weather-section { padding: 0 24px 12px; }

@media (max-width: 539px) {
  .ft-detail-card { margin: 0 10px; }
  .ft-detail-card .ft-tur-body,
  .ft-detail-card .ft-tip-detail { padding: 14px 12px; }
  .ft-detail-card .ft-tur-section { padding: 0 12px 12px; }
  .ft-detail-card .ft-tags { padding: 6px 12px 0; }
  .ft-detail-card .ft-tip-nav { padding: 12px 12px 14px; }
}

/* SVG inline ikon */
.ft-ico { display: inline-block; vertical-align: -2px; margin-right: 2px; flex-shrink: 0; }

/* Favoritt-stjerne på turtips kort */
.ft-card-fav { position: absolute; top: 8px; left: 8px; z-index: 3; background: rgba(0,0,0,.4); border: none; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; transition: all .2s; padding: 0; }
.ft-card-fav:hover { background: rgba(0,0,0,.6); }
.ft-card-fav.active { color: #F59E0B; background: rgba(0,0,0,.5); }
.ft-card-fav.active svg { fill: #F59E0B; }

/* Footer sosiale lenker */
.ft-footer-social { display: flex; justify-content: center; gap: 16px; margin: 8px 0 10px; }
.ft-footer-social a { color: var(--ft-muted); transition: color .2s; }
.ft-footer-social a:hover { color: var(--ft-orange); }
.ft-footer-copy { font-size: 11px; color: var(--ft-muted); margin-top: 8px !important; opacity: .7; }

/* Nyhetsbrev-påmelding i footer */
.ft-footer-nl { margin: 16px auto 6px; max-width: 360px; }
.ft-footer-nl-title { font-size: 14px; font-weight: 600; color: var(--ft-text); margin: 0 0 10px; line-height: 1.45; }
.ft-footer-nl-title span { font-size: 12px; font-weight: 400; color: var(--ft-muted); }
.ft-footer-nl-form { display: flex; gap: 6px; justify-content: center; }
.ft-footer-nl-input { flex: 1; min-width: 0; padding: 7px 12px; border: 1px solid var(--ft-border); border-radius: 8px; font-size: 13px; background: var(--ft-card); color: var(--ft-text); outline: none; transition: border-color .2s; }
.ft-footer-nl-input:focus { border-color: var(--ft-accent-green); }
.ft-footer-nl-msg { font-size: 12px; margin: 8px 0 0; }
.ft-footer-nl-ok { color: var(--ft-accent-green); }
.ft-footer-nl-err { color: var(--ft-danger); }

/* Om-sida sosiale lenker */
.ft-om-social { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.ft-om-social a { display: flex; align-items: center; gap: 8px; color: var(--ft-text); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 16px; border: 1px solid var(--ft-border); border-radius: 8px; transition: all .2s; }
.ft-om-social a:hover { border-color: var(--ft-orange); color: var(--ft-orange); background: color-mix(in srgb, var(--ft-orange) 5%, transparent); }

/* Tilbakemelding-skjema */
.ft-feedback-form { display: flex; flex-direction: column; gap: 16px; }
.ft-fb-label { display: flex; flex-direction: column; gap: 4px; }
.ft-fb-label span { font-size: 13px; font-weight: 600; color: var(--ft-text); }
.ft-req { color: #dc2626; }
.ft-fb-input, .ft-fb-textarea { padding: 10px 14px; border: 1px solid var(--ft-border); border-radius: 8px; font-size: 15px; background: var(--ft-surface); color: var(--ft-text); font-family: inherit; transition: border-color .2s; }
.ft-fb-input:focus, .ft-fb-textarea:focus { border-color: var(--ft-orange); outline: none; }
.ft-fb-textarea { resize: vertical; min-height: 100px; }
.ft-fb-submit { align-self: flex-start; padding: 10px 28px; }
.ft-feedback-ok { text-align: center; padding: 40px 20px; }
.ft-feedback-ok h2 { margin: 12px 0 6px; color: #16a34a; }
.ft-feedback-ok p { color: var(--ft-muted); }
.ft-feedback-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }

/* Nav labels — ikon + namn alltid synleg */
.ft-nav-label { display: inline; font-size: .78rem; }
.ft-nav a {
  display: flex; align-items: center; gap: 5px;
  color: var(--ft-muted); font-size: .8rem;
}
.ft-nav a svg { flex-shrink: 0; }

@media (max-width: 1100px) {
  .ft-nav a, .ft-nav-btn { flex-direction: row; gap: 14px; font-size: 20px; justify-content: flex-start; align-items: center; }
  .ft-nav a svg, .ft-nav-btn svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--ft-muted); }
  .ft-nav-mobile-only { display: flex !important; }
  .ft-nav .ft-nav-search { opacity: 1; color: var(--ft-text); }
  .ft-nav .ft-fav-nav { color: var(--ft-text); }
  .ft-nav .ft-fav-nav > svg { display: block !important; }
  .ft-nav .ft-fav-dot { position: static; margin-left: 2px; }
}
/* Desktop — skjul mobile-only-element (Lys/mørk, Språk, Hjelp) i desktop-nav */
@media (min-width: 1101px) {
  .ft-nav-mobile-only { display: none !important; }
}


/* === Admin: Innstillingar (vintersesong m.m.) === */
.ft-settings-card { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 12px; padding: 24px; max-width: 680px; }
.ft-settings-card h2 { font-size: 18px; margin: 0 0 8px; }
.ft-settings-help { color: var(--ft-muted); font-size: 13px; line-height: 1.5; margin-bottom: 16px; }
.ft-settings-form .ft-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.ft-settings-form label { display: block; font-size: 12px; font-weight: 600; color: var(--ft-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 6px; }
.ft-settings-form input[type=text] { width: 100%; padding: 10px 12px; border: 1px solid var(--ft-border); border-radius: 8px; background: var(--ft-bg); color: var(--ft-text); font-size: 14px; font-family: monospace; }
.ft-settings-form small { display: block; margin-top: 4px; color: var(--ft-muted); font-size: 11px; }
.ft-settings-form code { background: var(--ft-bg); padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.ft-current-status { padding: 12px 16px; background: var(--ft-bg); border-radius: 8px; margin-bottom: 18px; font-size: 13px; }
.ft-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.ft-badge-winter { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.ft-badge-summer { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.ft-msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.ft-msg.ok { background: rgba(22, 163, 74, 0.1); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.3); }
.ft-msg.err { background: rgba(220, 38, 38, 0.1); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.3); }
@media (max-width: 539px) {
  .ft-settings-form .ft-form-row { grid-template-columns: 1fr; }
}

/* === ADMIN: polish & nye komponentar (lagt til 2026-04-07) === */

/* Tabs — betre responsiv + fokus + scroll-skuggar */
.ft-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--ft-border);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.ft-tabs { scrollbar-width: none; }
.ft-tabs::-webkit-scrollbar { display: none; }
.ft-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ft-muted);
  text-decoration: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  transition: color .15s, border-color .15s, background .15s;
  scroll-snap-align: start;
}
.ft-tab:hover { color: var(--ft-text); background: rgba(245, 158, 11, 0.05); }
.ft-tab:focus-visible { outline: 2px solid var(--ft-orange); outline-offset: -2px; border-radius: 4px 4px 0 0; }
.ft-tab.active { color: var(--ft-orange); border-bottom-color: var(--ft-orange); font-weight: 600; }
.ft-tab .ft-ico { flex-shrink: 0; }

/* Admin-card — felles container for innhald i kvar fane */
.ft-admin-card {
  background: var(--ft-surface);
  border: 1px solid var(--ft-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  max-width: 920px;
}
.ft-admin-card h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ft-text);
}
.ft-admin-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 10px;
  color: var(--ft-text);
}
.ft-settings-help {
  color: var(--ft-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px;
}
.ft-settings-help code {
  background: var(--ft-bg);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-family: ui-monospace, monospace;
}

/* Stat-grid og stat-bokser */
.ft-admin-card .ft-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}
.ft-admin-card .ft-stat-box {
  background: var(--ft-bg);
  border: 1px solid var(--ft-border);
  border-radius: 10px;
  padding: 16px 18px;
  text-align: left;
}
.ft-admin-card .ft-stat-box.ft-stat-sub { padding: 12px 14px; }
.ft-admin-card .ft-stat-box.ft-stat-warn { border-color: rgba(220, 38, 38, 0.4); background: rgba(220, 38, 38, 0.05); }
.ft-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--ft-orange);
  line-height: 1.1;
  margin-bottom: 4px;
}
.ft-stat-num-sm {
  font-size: 18px;
  font-weight: 700;
  color: var(--ft-text);
  line-height: 1.2;
  margin-bottom: 2px;
}
.ft-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ft-muted);
}

/* Forelda bilete-seksjon */
.ft-orphan-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 14px 18px;
  background: var(--ft-bg);
  border: 1px solid var(--ft-border);
  border-radius: 10px;
  margin-top: 8px;
}
.ft-orphan-stat { font-size: 13px; color: var(--ft-text); }
.ft-orphan-stat strong { color: var(--ft-orange); font-size: 18px; font-weight: 700; }
.ft-orphan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

/* Manglande bilete-listene */
.ft-missing-section { margin-top: 18px; }
.ft-missing-section h3 { margin-bottom: 8px; }
.ft-missing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 6px 16px;
}
.ft-missing-list li {
  font-size: 13px;
  padding: 6px 10px;
  background: var(--ft-bg);
  border-radius: 6px;
  border: 1px solid var(--ft-border);
}
.ft-missing-list a {
  color: var(--ft-text);
  text-decoration: none;
  font-weight: 500;
}
.ft-missing-list a:hover { color: var(--ft-orange); }
.ft-muted { color: var(--ft-muted); font-size: 12px; }

.ft-empty-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: 10px;
  color: #16a34a;
  font-size: 14px;
  font-weight: 500;
}

/* Knappar — sekundær variant og polish av primær */
.ft-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  font-family: inherit;
  line-height: 1.2;
}
.ft-btn:active { transform: translateY(1px); }
.ft-btn:focus-visible { outline: 2px solid var(--ft-orange); outline-offset: 2px; }
.ft-btn-primary {
  background: var(--ft-orange);
  color: #fff;
  border-color: var(--ft-orange);
}
.ft-btn-primary:hover { background: #d97706; border-color: #d97706; }
.ft-btn-secondary {
  background: var(--ft-bg);
  color: var(--ft-text);
  border-color: var(--ft-border);
}
.ft-btn-secondary:hover { background: var(--ft-surface); border-color: var(--ft-orange); color: var(--ft-orange); }

/* Tilgjengelegheit: skip-link og fokus-stilar */
.ft-tab[role="tab"] { /* Plassholdar for ARIA-roller */ }

/* Mobil-tilpassing */
@media (max-width: 767px) {
  .ft-admin-card { padding: 18px 16px; margin-bottom: 14px; }
  .ft-admin-card h2 { font-size: 16px; }
  .ft-tab { padding: 10px 14px; font-size: 13px; }
  .ft-stat-num { font-size: 24px; }
  .ft-orphan-info { flex-direction: column; align-items: flex-start; }
  .ft-orphan-actions { margin-left: 0; width: 100%; }
  .ft-orphan-actions .ft-btn { flex: 1; justify-content: center; }
  .ft-missing-list { grid-template-columns: 1fr; }
}
@media (max-width: 539px) {
  .ft-admin-card { padding: 16px 14px; border-radius: 10px; }
  .ft-tab { padding: 9px 12px; font-size: 12px; gap: 5px; }
  .ft-tab .ft-ico { width: 12px; height: 12px; }
}

/* === ADMIN MEDIA GALLERY === */
.ft-media-gallery {
  background: var(--ft-surface);
  border: 1px solid var(--ft-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.ft-media-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ft-text);
}
.ft-media-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--ft-muted);
  background: var(--ft-bg);
  padding: 2px 10px;
  border-radius: 12px;
}

/* Drop-zone */
.ft-media-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  background: var(--ft-bg);
  border: 2px dashed var(--ft-border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s;
  color: var(--ft-muted);
}
.ft-media-dropzone:hover, .ft-media-dropzone:focus-visible {
  border-color: var(--ft-orange);
  color: var(--ft-orange);
  outline: none;
}
.ft-media-dropzone.drag-over {
  border-color: var(--ft-orange);
  background: rgba(245, 158, 11, 0.08);
  color: var(--ft-orange);
}
.ft-media-dz-text { font-size: 13px; line-height: 1.5; }
/* Visuelt skjult men ikkje pointer-events:none — iOS Safari krev at
   fila-input ikkje er "ekte usynleg" for at .click() skal fungere */
.ft-media-file-input { position: absolute; opacity: 0; top: 0; left: 0; width: 0.1px; height: 0.1px; overflow: hidden; }
.ft-media-dz-text strong { color: var(--ft-text); font-size: 14px; }
.ft-media-dropzone.drag-over .ft-media-dz-text strong { color: var(--ft-orange); }

/* Progress-rader under opplasting */
.ft-media-progress {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ft-media-prog-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--ft-bg);
  border-radius: 6px;
  font-size: 12px;
}
.ft-media-prog-name { color: var(--ft-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-media-prog-bar { background: rgba(0,0,0,0.06); border-radius: 4px; height: 6px; overflow: hidden; }
.ft-media-prog-fill { height: 100%; background: var(--ft-orange); transition: width .25s ease-out; }
.ft-media-prog-fill.err { background: #dc2626; }
.ft-media-prog-status { font-size: 11px; color: var(--ft-muted); min-width: 60px; text-align: right; }
.ft-media-prog-status.ok { color: #16a34a; font-weight: 700; }
.ft-media-prog-status.err { color: #dc2626; }

/* Galleri-grid */
.ft-media-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.ft-media-empty {
  grid-column: 1 / -1;
  padding: 20px;
  text-align: center;
  color: var(--ft-muted);
  font-size: 13px;
  background: var(--ft-bg);
  border-radius: 8px;
}
.ft-media-empty.ft-media-error { color: #dc2626; background: rgba(220, 38, 38, 0.05); }

.ft-media-item {
  position: relative;
  margin: 0;
  background: var(--ft-bg);
  border: 1px solid var(--ft-border);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: border-color .15s, transform .1s;
}
.ft-media-item:hover { border-color: var(--ft-orange); }
.ft-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ft-media-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px 5px;
  background: linear-gradient(to top, rgba(0,0,0,.78), transparent);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ft-media-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0;
  transition: opacity .15s;
}
.ft-media-item:hover .ft-media-actions,
.ft-media-item:focus-within .ft-media-actions { opacity: 1; }
.ft-media-btn-del {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: background .15s, transform .1s;
}
.ft-media-btn-del:hover { background: #dc2626; transform: scale(1.08); }
.ft-media-btn-del:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 539px) {
  .ft-media-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
  .ft-media-actions { opacity: 1; } /* Alltid synleg på touch */
  .ft-media-prog-row { grid-template-columns: 1fr; gap: 4px; }
}

/* === MEDIA CROPPER MODAL === */
.ft-cropper-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ft-cropper-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.ft-cropper-dialog {
  position: relative;
  background: var(--ft-surface);
  border: 1px solid var(--ft-border);
  border-radius: 14px;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.ft-cropper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ft-border);
}
.ft-cropper-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.ft-cropper-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--ft-muted);
  cursor: pointer;
}
.ft-cropper-close:hover { background: var(--ft-bg); color: var(--ft-text); }

.ft-cropper-body {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 16px;
  background: var(--ft-bg);
  min-height: 300px;
  overflow: hidden;
  gap: 16px;
}
.ft-cropper-canvas {
  flex: 1;
  max-width: 100%;
  max-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ft-cropper-canvas img {
  max-width: 100%;
  max-height: 60vh;
  display: block;
}
.ft-cropper-meta {
  width: 240px;
  flex-shrink: 0;
  background: var(--ft-surface);
  border: 1px solid var(--ft-border);
  border-radius: 10px;
  padding: 16px;
  overflow-y: auto;
  max-height: 60vh;
}
.ft-cropper-meta h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ft-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ft-cropper-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ft-border);
  font-size: 12px;
}
.ft-cropper-meta-row:last-child { border-bottom: none; }
.ft-cropper-meta-row span { color: var(--ft-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.ft-cropper-meta-row strong { color: var(--ft-text); font-weight: 600; word-break: break-word; }
@media (max-width: 767px) {
  .ft-cropper-body { flex-direction: column; }
  .ft-cropper-meta { width: auto; max-height: 200px; }
}
.ft-cropper-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--ft-border);
  background: var(--ft-surface);
}
.ft-cropper-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ft-cropper-actions { margin-left: auto; gap: 8px; }
.ft-cropper-toolbar button[data-action] {
  background: var(--ft-bg);
  border: 1px solid var(--ft-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ft-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, border-color .15s;
}
.ft-cropper-toolbar button[data-action]:hover {
  border-color: var(--ft-orange);
  color: var(--ft-orange);
}
.ft-cropper-toolbar button.ft-btn { padding: 9px 18px; }

.ft-cropper-aspect-lbl { font-size: 12px; color: var(--ft-muted); margin-right: 4px; }
.ft-cropper-toolbar select {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--ft-border);
  background: var(--ft-bg);
  color: var(--ft-text);
  font-size: 13px;
  font-family: inherit;
}
.ft-cropper-status {
  padding: 10px 20px;
  font-size: 13px;
  background: var(--ft-bg);
  border-top: 1px solid var(--ft-border);
}
.ft-cropper-status.busy { color: var(--ft-orange); }
.ft-cropper-status.ok { color: #16a34a; font-weight: 600; }
.ft-cropper-status.err { color: #dc2626; font-weight: 600; }

/* Visuell antydning på galleri-bilete: peikar = klikkbart for redigering */
.ft-media-item { cursor: pointer; }
.ft-media-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245, 158, 11, 0);
  transition: background .15s;
  pointer-events: none;
}
.ft-media-item:hover::after { background: rgba(245, 158, 11, 0.08); }

@media (max-width: 767px) {
  .ft-cropper-modal { padding: 8px; }
  .ft-cropper-dialog { max-height: 95vh; }
  .ft-cropper-toolbar { padding: 12px; gap: 8px; }
  .ft-cropper-actions { width: 100%; justify-content: space-between; margin-top: 4px; }
  .ft-cropper-group { flex-wrap: wrap; }
}

/* === FASE 3: GALLERI-UTVIDING (cover, transform, caption, drag) === */

/* Bilet-wrapper for badges */
.ft-media-item .ft-media-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}
.ft-media-item .ft-media-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badges (cover, transform-indikator) */
.ft-media-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
  pointer-events: none;
  z-index: 2;
}
.ft-media-badge-cover {
  background: var(--ft-orange);
  font-size: 13px;
}
.ft-media-badge-xform {
  background: #3b82f6;
  top: 6px;
  left: auto;
  right: 6px;
  width: 12px;
  height: 12px;
  font-size: 0;
}

/* Cover-rad markering */
.ft-media-item.is-cover {
  border-color: var(--ft-orange);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* Action-knappar — utvida frå berre slett til 3 knappar */
.ft-media-item .ft-media-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s;
  z-index: 3;
}
.ft-media-item:hover .ft-media-actions,
.ft-media-item:focus-within .ft-media-actions { opacity: 1; }
.ft-media-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: background .15s, transform .1s, color .15s;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
}
.ft-media-btn:hover { transform: scale(1.1); }
.ft-media-btn-cover { background: rgba(15, 23, 42, 0.85); }
.ft-media-btn-cover.active, .ft-media-btn-cover:hover { background: var(--ft-orange); color: #fff; }
.ft-media-btn-edit:hover { background: #3b82f6; }
.ft-media-btn-del { background: rgba(220, 38, 38, 0.92); }
.ft-media-btn-del:hover { background: #dc2626; }
.ft-media-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Caption — klikkbar, redigerbar */
.ft-media-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px 6px;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.4) 70%, transparent);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
  z-index: 2;
  border-top: 1px solid transparent;
}
.ft-media-cap:hover { border-top-color: var(--ft-orange); }
.ft-media-cap em { color: rgba(255,255,255,0.55); font-style: italic; font-size: 10px; }
.ft-media-cap-input {
  width: 100%;
  border: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: inherit;
}
.ft-media-cap-input:focus { outline: 1px solid var(--ft-orange); }

/* Drag-states */
.ft-media-item[draggable="true"] { cursor: grab; }
.ft-media-item[draggable="true"]:active { cursor: grabbing; }
.ft-media-item.dragging {
  opacity: 0.4;
  transform: scale(0.95);
}
.ft-media-item.drag-over {
  outline: 3px dashed var(--ft-orange);
  outline-offset: -2px;
}

/* Mobil: alltid synlege actions, deaktiver drag (touch er for usikkert) */
@media (max-width: 539px) {
  .ft-media-item .ft-media-actions { opacity: 1; }
  .ft-media-item[draggable="true"] { cursor: default; }
  .ft-media-cap { font-size: 10px; padding: 6px 8px 4px; }
}

/* Den gamle ::after-overlayen frå Fase 2 må fjernast for den interfererte med actions */
.ft-media-item::after { content: none; }

/* === TUR PREVIEW MODAL (admin) === */
.ft-tur-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ft-tur-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 28, 0.88);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.ft-tur-preview-frame {
  position: relative;
  background: var(--ft-surface);
  border: 1px solid var(--ft-border);
  border-radius: 14px;
  width: 100%;
  max-width: 1280px;
  height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.ft-tur-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ft-border);
  background: var(--ft-surface);
  flex-shrink: 0;
}
.ft-tur-preview-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ft-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-tur-preview-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.ft-tur-preview-tools button,
.ft-tur-preview-tools a {
  background: var(--ft-bg);
  border: 1px solid var(--ft-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ft-text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  transition: background .15s, border-color .15s;
}
.ft-tur-preview-tools button:hover,
.ft-tur-preview-tools a:hover {
  border-color: var(--ft-orange);
  color: var(--ft-orange);
}
.ft-tur-preview-vp.active {
  background: var(--ft-orange);
  border-color: var(--ft-orange);
  color: #fff;
}
.ft-tur-preview-close {
  font-size: 22px !important;
  line-height: 1 !important;
  padding: 0 12px !important;
}

.ft-tur-preview-stage {
  flex: 1;
  background: #f3f4f6;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 0;
  min-height: 0;
}
.ft-tur-preview-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .ft-tur-preview-modal { padding: 0; }
  .ft-tur-preview-frame { height: 100vh; max-width: 100vw; border-radius: 0; }
  .ft-tur-preview-header h3 { font-size: 12px; }
  .ft-tur-preview-tools button,
  .ft-tur-preview-tools a { min-width: 28px; height: 28px; padding: 4px 6px; font-size: 11px; }
}

/* ── PWA install-knapp + modal ─────────────────────────────────── */
.ft-pwa-install {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ft-pwa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #F59E0B, #F97316);
  color: #0A0F1C;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ft-pwa-btn:hover,
.ft-pwa-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  outline: none;
}
.ft-pwa-btn:active { transform: translateY(0); }

.ft-pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ft-pwa-modal[hidden] { display: none; }
.ft-pwa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 28, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ft-pwa-modal-box {
  position: relative;
  max-width: 420px;
  width: 100%;
  background: #111827;
  color: #F3F4F6;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 24px 24px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: ftPwaIn 0.2s ease-out;
}
@keyframes ftPwaIn {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.ft-pwa-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #9CA3AF;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.ft-pwa-modal-close:hover { color: #F59E0B; }
.ft-pwa-modal-box h3 {
  margin: 0 0 14px;
  font-size: 17px;
  color: #F59E0B;
}
.ft-pwa-steps {
  margin: 0 0 12px;
  padding-left: 20px;
  line-height: 1.55;
  font-size: 14px;
}
.ft-pwa-steps li { margin-bottom: 8px; }
.ft-pwa-note {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #9CA3AF;
}
body.ft-pwa-modal-open { overflow: hidden; }

/* ── 3D-knapp på turdetalj ──────────────────────────────────── */
.ft-3d-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #F59E0B, #F97316);
  color: #0A0F1C;
  border: none;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ft-3d-btn:hover,
.ft-3d-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
  outline: none;
  color: #0A0F1C;
}

/* 3D-knapp plassert nede i høgre hjørne på kartet */
.ft-tur-map-wrap {
  position: relative;
}
.ft-3d-overlay {
  position: absolute;
  right: 12px;
  bottom: 36px;
  z-index: 500;
  padding: 8px 14px;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.9);
}
.ft-3d-overlay:hover,
.ft-3d-overlay:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.55);
}
@media (max-width: 600px) {
  .ft-3d-overlay {
    right: 8px;
    bottom: 30px;
    padding: 7px 12px;
    font-size: 12px;
  }
}


/* ============================================================
   Foto-lag + modal på kart.html
   ============================================================ */
/* Togglebar — absolutt plassert rett til venstre for Leaflet kart-velgaren */
.ft-map-togglebar{
  position:absolute;top:10px;left:50%;transform:translateX(-50%);
  z-index:1000;
  display:flex;gap:6px;flex-wrap:wrap;justify-content:center;
  pointer-events:auto;
}
.ft-photo-toggle{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 12px;background:#fff;color:#0A0F1C;
  border:2px solid rgba(0,0,0,0.2);border-radius:8px;
  font-size:12px;font-weight:600;cursor:pointer;
  box-shadow:0 1px 5px rgba(0,0,0,0.25);
  transition:all .2s;font-family:inherit;line-height:1;
}
.ft-photo-toggle:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,0.22)}
.ft-photo-toggle[aria-pressed="true"]{
  background:linear-gradient(135deg,#F59E0B,#F97316);color:#0A0F1C;border-color:#F59E0B;
  box-shadow:0 4px 14px rgba(245,158,11,0.4);
}
.ft-photo-toggle-count{
  display:inline-block;padding:1px 7px;background:rgba(0,0,0,0.08);
  border-radius:999px;font-size:11px;font-weight:700;
}
.ft-photo-toggle[aria-pressed="true"] .ft-photo-toggle-count{
  background:rgba(10,15,28,0.18);
}
/* Heatmap-toggle brukar raud-gradient når aktiv for å skilje seg frå foto-toggle */
.ft-heat-toggle[aria-pressed="true"]{
  background:linear-gradient(135deg,#EF4444,#B91C1C);color:#fff;border-color:#EF4444;
  box-shadow:0 4px 14px rgba(239,68,68,0.4);
}
@media (max-width:600px){
  .ft-map-togglebar{top:8px;left:50%;transform:translateX(-50%);gap:6px}
  .ft-photo-toggle{padding:6px 10px;font-size:12px}
  .ft-photo-toggle-label{display:none}
}

/* Foto-prikk-markør på kartet */
.ft-photo-dot{
  width:12px;height:12px;border-radius:50%;
  background:#F59E0B;border:2px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.4),0 0 0 1px rgba(245,158,11,0.3);
  cursor:pointer;transition:transform .15s;
}
.ft-photo-dot.src-user{background:#22c55e}
.ft-photo-dot.src-media{background:#3b82f6}
.ft-photo-dot.src-photo{background:#F59E0B}
.leaflet-marker-icon:hover .ft-photo-dot{transform:scale(1.35)}

/* Modal */
.ft-photo-modal{
  position:fixed;inset:0;z-index:10000;
  background:rgba(0,0,0,0.78);backdrop-filter:blur(6px);
  display:flex;align-items:center;justify-content:center;
  padding:20px;animation:ftPmFade .18s ease-out;
}
.ft-photo-modal[hidden]{display:none}
@keyframes ftPmFade{from{opacity:0}to{opacity:1}}
.ft-photo-modal-inner{
  background:#0A0F1C;color:#e5e7eb;border-radius:14px;
  max-width:min(960px,100%);width:100%;max-height:90vh;
  display:flex;flex-direction:column;overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);position:relative;
}
@media (min-width:760px){
  .ft-photo-modal-inner{flex-direction:row}
}
.ft-photo-modal-close{
  position:absolute;top:10px;right:12px;z-index:2;
  width:34px;height:34px;border-radius:50%;
  background:rgba(0,0,0,0.55);border:none;color:#fff;
  font-size:26px;line-height:1;cursor:pointer;
}
.ft-photo-modal-close:hover{background:#F59E0B;color:#0A0F1C}
.ft-photo-modal-imgwrap{
  flex:2;background:#000;display:flex;align-items:center;justify-content:center;
  min-height:260px;max-height:60vh;
}
@media (min-width:760px){
  .ft-photo-modal-imgwrap{max-height:90vh}
}
.ft-photo-modal-imgwrap img{
  max-width:100%;max-height:100%;display:block;object-fit:contain;
}
.ft-photo-modal-meta{
  flex:1;padding:18px 20px;min-width:0;overflow:auto;
}
@media (min-width:760px){.ft-photo-modal-meta{max-width:320px}}
.ft-photo-modal-meta h3{
  margin:0 0 4px;font-size:18px;color:#F59E0B;font-weight:700;line-height:1.3;
}
.ft-photo-modal-sub{font-size:12px;color:#9ca3af;margin-bottom:14px}
.ft-photo-modal-grid{
  display:grid;grid-template-columns:1fr;gap:10px 0;margin-bottom:16px;
}
.ft-photo-modal-grid > div{
  display:flex;flex-direction:column;padding:8px 10px;
  background:rgba(255,255,255,0.04);border-radius:8px;
}
.ft-pm-l{font-size:9px;text-transform:uppercase;letter-spacing:.6px;color:#6b7280;margin-bottom:2px}
.ft-pm-v{font-size:13px;color:#e5e7eb;word-break:break-word}
.ft-photo-modal-link{
  display:inline-block;padding:10px 16px;background:#F59E0B;color:#0A0F1C;
  text-decoration:none;border-radius:999px;font-weight:700;font-size:13px;
  transition:transform .15s;
}
.ft-photo-modal-link:hover{transform:translateY(-1px);color:#0A0F1C}

/* ── View-toggle button ─────────────────────────────────────── */
.ft-view-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--ft-surface); border: 1px solid var(--ft-border);
  color: var(--ft-muted); cursor: pointer; transition: background .15s, color .15s;
  flex-shrink: 0;
}
.ft-view-toggle:hover { background: var(--ft-accent); color: #fff; border-color: var(--ft-accent); }
.ft-view-toggle.active { background: var(--ft-accent); color: #fff; border-color: var(--ft-accent); }
.ft-view-toggle .ft-icon-grid { display: block; }
.ft-view-toggle .ft-icon-list { display: none; }
.ft-view-toggle.active .ft-icon-grid { display: none; }
.ft-view-toggle.active .ft-icon-list { display: block; }

/* ── Compact list view ──────────────────────────────────────── */
#ft-trip-grid.ft-view-compact {
  display: flex; flex-direction: column; gap: 2px;
  grid-template-columns: unset;
}
#ft-trip-grid.ft-view-compact .ft-trip-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 0 10px;
  padding: 6px 12px;
  border-radius: 8px;
  overflow: visible;
  transform: none !important;
  box-shadow: none !important;
}
#ft-trip-grid.ft-view-compact .ft-card-img {
  display: block;
  width: 52px; height: 40px;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: unset;
  grid-column: 1; grid-row: 1 / span 2;
  align-self: center;
  flex-shrink: 0;
}
#ft-trip-grid.ft-view-compact .ft-card-img img {
  width: 100%; height: 100%; object-fit: cover;
}
#ft-trip-grid.ft-view-compact .ft-card-img .ft-dnt-badge,
#ft-trip-grid.ft-view-compact .ft-card-img .ft-alert-badge,
#ft-trip-grid.ft-view-compact .ft-card-img .ft-fav-btn { display: none; }
#ft-trip-grid.ft-view-compact .ft-card-body {
  padding: 0; display: contents;
}
#ft-trip-grid.ft-view-compact .ft-card-body h3 {
  font-size: 14px; font-weight: 600; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  grid-column: 2; grid-row: 1; align-self: end;
}
#ft-trip-grid.ft-view-compact .ft-card-loc {
  display: block;
  font-size: 11px; color: var(--ft-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  grid-column: 2; grid-row: 2; align-self: start;
  margin-top: 1px;
}
#ft-trip-grid.ft-view-compact .ft-card-meta {
  font-size: 12px; gap: 10px; margin: 0;
  grid-column: 3; grid-row: 1 / span 2; justify-content: flex-end; align-self: center;
  flex-wrap: nowrap; white-space: nowrap;
}
#ft-trip-grid.ft-view-compact .ft-card-meta .ft-diff-pill { display: none; }
#ft-trip-grid.ft-view-compact .ft-card-meta .ft-meta-dist {
  font-size: 14px; font-weight: 700; color: var(--ft-text);
  order: 3;
}
#ft-trip-grid.ft-view-compact .ft-card-meta .ft-meta-elev { order: 1; }
#ft-trip-grid.ft-view-compact .ft-card-meta .ft-meta-dur  { order: 2; }

/* ── Meta icons (mask) ─────────────────────────────────────── */
.ft-meta-dist::before,
.ft-meta-elev::before,
.ft-meta-dur::before {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  margin-right: 3px;
  vertical-align: -2px;
  background-color: currentColor;
  opacity: 0.65;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.ft-meta-dist::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cline%20x1%3D%273%27%20y1%3D%2712%27%20x2%3D%2721%27%20y2%3D%2712%27/%3E%3Cpolyline%20points%3D%2715%206%2021%2012%2015%2018%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cline%20x1%3D%273%27%20y1%3D%2712%27%20x2%3D%2721%27%20y2%3D%2712%27/%3E%3Cpolyline%20points%3D%2715%206%2021%2012%2015%2018%27/%3E%3C/svg%3E"); }
.ft-meta-elev::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpolyline%20points%3D%273%2017%209%2011%2013%2015%2021%207%27/%3E%3Cpolyline%20points%3D%2715%207%2021%207%2021%2013%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpolyline%20points%3D%273%2017%209%2011%2013%2015%2021%207%27/%3E%3Cpolyline%20points%3D%2715%207%2021%207%2021%2013%27/%3E%3C/svg%3E"); }
.ft-meta-dur::before  { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27/%3E%3Cpolyline%20points%3D%2712%207%2012%2012%2015%2015%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27/%3E%3Cpolyline%20points%3D%2712%207%2012%2012%2015%2015%27/%3E%3C/svg%3E"); }

/* ── Turtips 2-column toggle ────────────────────────────────── */
#tipsGrid.ft-tips-2col {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
#tipsGrid.ft-tips-2col .ft-tip-img {
  aspect-ratio: 4/3;
}
#tipsGrid.ft-tips-2col .ft-tip-body {
  padding: 8px 10px;
}
#tipsGrid.ft-tips-2col .ft-tip-body time {
  font-size: 10px;
}
#tipsGrid.ft-tips-2col .ft-tip-body h3 {
  font-size: 12px;
  margin: 2px 0 3px;
}
#tipsGrid.ft-tips-2col .ft-tip-body p {
  display: none;
}


/* === Kompass — CSS-variablar (mørk standard) === */
.ft-kompass-standalone {
  background: var(--ko-bg, #0d1117);
  min-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  transition: background-color .25s;
}
#ftKompassOverlay, .ft-kompass-standalone {
  --ko-bg:      #0d1117;
  --ko-surface: #161b22;
  --ko-border:  #30363d;
  --ko-text:    #e6edf3;
  --ko-muted:   #8b949e;
  --ko-dim:     #484f58;
  --ko-ring:    rgba(255,255,255,.06);
}
#ftKompassOverlay.ft-ko-light, .ft-kompass-standalone.ft-ko-light {
  --ko-bg:      #f0f4f8;
  --ko-surface: #ffffff;
  --ko-border:  #d0d7de;
  --ko-text:    #1c2128;
  --ko-muted:   #57606a;
  --ko-dim:     #9ba4ae;
  --ko-ring:    rgba(0,0,0,.06);
}

/* === Delte kompass-stiler (kompass.php + tur-overlay) === */
.ft-kompass-bearing {
  display: flex; align-items: baseline; gap: 12px; margin-top: 0;
  font-family: 'SF Mono','Fira Code',monospace;
}
/* Kompass-grader: dei to stadane har ulik kontekst og storleik
   - kompass.php: standalone-sida, kompakt visning (36px)
   - #ftKompassDeg: AR-overlay på tur-detalj-sida, stor og prominent (52px) */
#kompassDeg {
  font-size: 36px; font-weight: 800; color: var(--ft-orange,#ff8c00);
  line-height: 1; min-width: 80px; text-align: right;
  letter-spacing: -0.5px;
}
#kompassDir {
  font-size: 20px; font-weight: 700; min-width: 50px;
  color: var(--ko-text, #e6edf3);
}
#ftKompassDeg {
  font-size: 52px; font-weight: 800; color: var(--ft-orange,#ff8c00);
  line-height: 1; min-width: 110px; text-align: right;
  letter-spacing: -1px;
}
#ftKompassDir {
  font-size: 26px; font-weight: 700; min-width: 65px;
  color: var(--ko-text, #e6edf3);
}
.ft-kompass-status {
  font-size: 12px; color: var(--ko-muted,#8b949e);
  text-align: center; margin-top: 6px; min-height: 18px;
  letter-spacing: .3px;
}
.ft-kompass-panels {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 12px 16px 24px; width: 100%; max-width: 700px; box-sizing: border-box;
}
@media (max-width: 480px) { .ft-kompass-panels { grid-template-columns: 1fr; } }
.ft-kompass-panel {
  background: var(--ko-surface,#161b22);
  border: 1px solid var(--ko-border,#30363d);
  border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.ft-kompass-panel h3 {
  margin: 0 0 10px; font-size: 11px; font-weight: 700;
  color: var(--ko-muted,#8b949e); text-transform: uppercase; letter-spacing: .8px;
}
.ft-kompass-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ft-kompass-table td { padding: 5px 0; color: var(--ko-muted,#8b949e); border-bottom: 1px solid var(--ko-ring,rgba(255,255,255,.04)); }
.ft-kompass-table tr:last-child td { border-bottom: none; }
.ft-kompass-table td:last-child {
  text-align: right; color: var(--ko-text,#e6edf3);
  font-weight: 600; font-family: 'SF Mono',monospace; font-size: 13px;
}
.ft-kompass-gps-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ko-muted,#8b949e); margin-bottom: 8px; }
.ft-gps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ko-dim,#30363d); flex-shrink: 0; }
.ft-gps-dot.active { background: #3fb950; }
.ft-gps-dot.search { background: #d29922; animation: gpspulse 1.2s infinite; }
.ft-gps-dot.error  { background: #f85149; }
@keyframes gpspulse { 0%,100%{opacity:1} 50%{opacity:.3} }
#solArcCanvas, #ftKompassSolArc { display: block; margin-top: 10px; width: 100%; height: 60px; }

/* === Kompass-overlay på tursida === */
#ftKompassOverlay {
  position: fixed; inset: 0;
  background: var(--ko-bg,#0d1117);
  z-index: 1100;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1), background-color .25s;
  overflow-y: auto;
}
#ftKompassOverlay.ft-ko-open { transform: translateY(0); }

/* Header */
.ft-ko-header {
  display: flex; align-items: center;
  padding: 10px 14px;
  background: var(--ko-surface,#161b22);
  border-bottom: 1px solid var(--ko-border,#30363d);
  flex-shrink: 0; gap: 8px;
  transition: background-color .25s, border-color .25s;
}
.ft-ko-back {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  color: var(--ft-orange,#ff8c00); font-size: 15px; font-weight: 600;
  padding: 4px 0; flex-shrink: 0;
}
.ft-ko-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ft-ko-title > span:first-child { font-weight: 700; font-size: 15px; color: var(--ko-text,#e6edf3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-ko-badge { font-size: 11px; color: var(--ft-orange,#ff8c00); text-transform: uppercase; letter-spacing: .5px; }

/* Lys/mørk-toggle-knapp i header */
.ft-ko-theme-btn {
  background: var(--ko-bg,#0d1117);
  border: 1px solid var(--ko-border,#30363d);
  border-radius: 50px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  transition: background .2s, border-color .2s, transform .15s;
  font-size: 17px; line-height: 1;
}
.ft-ko-theme-btn:hover { transform: scale(1.1); }
.ft-ko-theme-btn:active { transform: scale(.93); }

/* Body */
.ft-ko-body {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 14px 16px;
  flex: 1;
}

/* Tilt-indikator (vaterpas) — kompakt */
.ft-ko-tilt-row {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 8px; padding: 4px 10px;
  background: var(--ko-surface,#161b22);
  border: 1px solid var(--ko-border,#30363d);
  border-radius: 50px; width: fit-content;
  transition: background .25s, border-color .25s;
}
.ft-ko-tilt-canvas { display: block; flex-shrink: 0; }
.ft-ko-wakelock {
  color: var(--ko-dim, #484f58); flex-shrink: 0;
  display: flex; align-items: center;
}
.ft-ko-wakelock.active { color: #3fb950; }

/* ── Aktiv tur-stripe (banner over hovudheader) — KUN MOBIL ──────── */
.ft-active-trip-strip {
  display: none;
  background: #fde047;
  color: #1f2937;
  font-size: 13px; font-weight: 600;
  position: sticky; top: 0; z-index: 999;
  border-bottom: 1px solid #facc15;
  border-radius: 0;
  width: 100%;
  margin: 0;
  /* Strekk fargen opp i iOS safe-area (notch/dynamic island) i PWA-modus,
     slik at den smeltar saman med iOS status bar over */
  padding-top: env(safe-area-inset-top, 0);
  margin-top: calc(env(safe-area-inset-top, 0) * -1);
  animation: ftActiveTripSlide .25s ease-out;
  flex-direction: column;
}
/* Når JS legg til .is-active = aktiv tur finst */
.ft-active-trip-strip.is-active { display: flex; }
/* Skjul heilt på desktop/tablet — turapp skal berre brukast på mobil */
@media (min-width: 540px) {
  .ft-active-trip-strip,
  .ft-active-trip-strip.is-active { display: none !important; }
}
/* Normal-modus = horisontal flex-rad med chevron, lenke, knappar */
.ft-active-trip-normal {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
}
@keyframes ftActiveTripSlide {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
.ft-active-trip-title {
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
/* Pokalar-menypunkt: skjult på desktop, "(beta)"-merka på mobil – under utvikling */
.ft-nav-pokalar-mobile {
  display: none;
}
@media (max-width: 539px) {
  .ft-nav-pokalar-mobile { display: inline-flex; }
}
.ft-nav-beta {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #f59e0b;
  color: #fff;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.3;
}

/* Pulserande grønt punkt på stripa — er no eit STANDALONE-element (utan tekst) */
.ft-active-trip-pulse {
  width: 9px; height: 9px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.7);
  animation: ftActivePulse 1.6s ease-out infinite;
  flex-shrink: 0;
  display: inline-block;
}
.ft-active-trip-pulse.paused {
  background: #f59e0b;
  animation: none;
  box-shadow: none;
}
.ft-gps-gap-warn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(234,88,12,0.15);
  color: #ea580c;
  flex-shrink: 0;
  animation: ftGpsGapBlink 1.8s ease-in-out infinite;
}
@keyframes ftGpsGapBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
@keyframes ftActivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Live-statpillar i stripa (Lengde gått + Tid til mål) — kompakte med ikon */
.ft-active-trip-stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.ft-active-trip-done {
  color: #166534;
  background: rgba(34,197,94,0.16);
}
.ft-active-trip-eta {
  color: #1e40af;
  background: rgba(59,130,246,0.15);
}
.ft-active-trip-eta.near {
  color: #fff;
  background: #ef4444;
  animation: ftTargetNear 1.2s ease-in-out infinite;
}
@keyframes ftTargetNear {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(239,68,68,0.7); }
  50%      { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(239,68,68,0);   }
}



/* ── Garmin-style ekspandert panel ────────────────────────────────── */
.ft-active-trip-panel {
  background: linear-gradient(to bottom, #fef3c7, #fef9c3);
  border-bottom: 2px solid #f59e0b;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  animation: ftPanelSlideDown .2s ease-out;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@keyframes ftPanelSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stat-rad (4 kolonner med store tal) */
.ft-panel-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(146,64,14,0.15);
  padding: 1px;
}
.ft-panel-stat {
  background: #fef3c7;
  padding: 10px 4px;
  text-align: center;
}
.ft-panel-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #92400e;
  opacity: 0.7;
  margin-bottom: 2px;
}
.ft-panel-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #422006;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* Tab-knappar */
.ft-panel-tabs {
  display: flex;
  background: rgba(146,64,14,0.08);
  border-top: 1px solid rgba(146,64,14,0.15);
}
.ft-panel-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.ft-panel-tab:hover { background: rgba(146,64,14,0.05); }
.ft-panel-tab.active {
  background: #fef9c3;
  border-bottom-color: #f59e0b;
  color: #422006;
}
.ft-panel-tab svg { flex-shrink: 0; }

/* Tab-innhald */
.ft-panel-content { padding: 14px 16px 8px; }
.ft-panel-pane { display: none; }
.ft-panel-pane.active { display: block; }

.ft-panel-loading,
.ft-panel-error {
  padding: 24px 12px;
  text-align: center;
  color: #92400e;
  font-size: 14px;
}
.ft-panel-error { color: #dc2626; }

/* Detaljar */
.ft-panel-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #422006;
  line-height: 1.25;
}

/* Kart */
.ft-panel-map {
  width: 100%;
  height: 360px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}

/* «Plukk pokal»-knapp på kart-tab */
.ft-map-grab-btn {
  position: relative;
  margin-top: 10px;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(146,64,14,0.5);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.ft-map-grab-btn:not(:disabled) { cursor: pointer; }
.ft-map-grab-btn:disabled { cursor: not-allowed; opacity: 0.7; }
.ft-map-grab-btn.within-range {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #422006;
  box-shadow: 0 4px 14px rgba(245,158,11,0.5);
  animation: ftGrabPulse 1.6s ease-in-out infinite;
}
@keyframes ftGrabPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}

/* ── AR-grab overlay (full skjerm) ────────────────────────────────── */
.ft-ar-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #000;
  overflow: hidden;
}
.ft-ar-overlay video,
.ft-ar-overlay canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ft-ar-overlay video { z-index: 1; }
.ft-ar-overlay canvas { z-index: 2; pointer-events: none; }
.ft-ar-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: flex-start; gap: 10px;
  padding: max(env(safe-area-inset-top), 14px) 14px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
}
.ft-ar-close {
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.ft-ar-close:hover { background: rgba(0,0,0,0.7); }
.ft-ar-hud {
  flex: 1;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ft-ar-hud strong { font-size: 15px; }
.ft-ar-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  padding: 14px 14px max(env(safe-area-inset-bottom), 20px);
  display: flex; justify-content: center;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
}
.ft-ar-grab-btn {
  background: rgba(146,64,14,0.85);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  transition: all .2s;
  min-width: 220px;
}
.ft-ar-grab-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
  background: rgba(80,80,80,0.7);
}
.ft-ar-grab-btn.ready {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #422006;
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 0 30px rgba(251,191,36,0.6);
  animation: ftGrabPulse 1.4s ease-in-out infinite;
}
.ft-ar-grab-btn.done {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  animation: none;
}

/* Kompass-iframe (peiker mot kompass.php med mål-modus) */
.ft-panel-compass-frame {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
}

@media (max-width: 539px) {
  .ft-panel-stat-value { font-size: 16px; }
  .ft-panel-tab span { font-size: 12px; }
  .ft-panel-map { height: 320px; }
  .ft-panel-compass-frame { height: 340px; }
  .ft-panel-cover { height: 120px; }
}

/* Normal-modus inneheldar (lenke + knappar). Reglane på .ft-active-trip-strip
   handterer flexen, så denne wrappa berre held barna */
.ft-active-trip-normal {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
}

/* Slide-to-confirm – konteinar */
.ft-active-trip-confirm {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
}
.ft-confirm-track {
  position: relative;
  flex: 1; min-width: 0;
  height: 30px;
  background: rgba(146,64,14,0.12);
  border: 1px solid rgba(146,64,14,0.25);
  border-radius: 16px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.ft-confirm-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  transition: none;
  pointer-events: none;
}
.ft-confirm-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: #92400e;
  pointer-events: none;
  transition: opacity .1s linear;
  white-space: nowrap;
  padding-left: 36px;  /* gi plass til handle på venstre side */
}
.ft-confirm-handle {
  position: absolute; top: 2px; left: 2px;
  width: 26px; height: 26px;
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #92400e;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 2;
  transform: translateX(0);
  touch-action: none;
}
.ft-confirm-handle:hover { background: #fef3c7; }
.ft-confirm-handle.grabbing { cursor: grabbing; transition: none !important; }
.ft-confirm-handle.done { background: #dc2626; color: #fff; }
.ft-confirm-cancel {
  background: transparent;
  border: 1px solid rgba(146,64,14,0.4);
  color: #92400e;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.ft-confirm-cancel:hover { background: rgba(146,64,14,0.1); }

/* Fjell-toggle på tur-detalj ved sida av "← Turar" */
.ft-back-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ft-pin-trip-btn {
  background: transparent; border: 1px solid var(--ft-border, #e5e7eb);
  border-radius: 8px; padding: 5px 9px; cursor: pointer;
  color: var(--ft-muted, #6b7280);
  display: inline-flex; align-items: center;
  transition: all .15s;
}
.ft-pin-trip-btn:hover { color: var(--ft-orange, #ff8c00); border-color: var(--ft-orange, #ff8c00); }
.ft-pin-trip-btn.active {
  color: #92400e; background: #fde047; border-color: #facc15;
}
.ft-pin-trip-btn.active:hover { background: #facc15; color: #78350f; }

/* Canvas-ring i lys modus */
.ft-ko-canvas-wrap {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.ft-ko-canvas-wrap::after {
  content: ''; pointer-events: none;
  position: absolute; inset: -8px;
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--ko-ring,rgba(255,255,255,.06));
  transition: box-shadow .25s;
}


/* ── AR pokal-overlay (tur-detalj) ──────────────────────────────────── */
#ftArOverlay {
  position: fixed; inset: 0; background: #000; z-index: 1100;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
#ftArOverlay.ft-ar-open { transform: translateY(0); }

#ftArBack {
  position: fixed;
  top: max(env(safe-area-inset-top, 0px), 16px);
  left: 16px; z-index: 1115;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.18); border-radius: 50px;
  color: #fff; font: 600 14px system-ui;
  padding: 10px 18px; display: flex; align-items: center; gap: 8px;
  text-decoration: none; cursor: pointer;
}
#ftArCam {
  position: fixed; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1101;
}
#ftArTrophyWrap {
  position: fixed; inset: 0; z-index: 1110; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
#ftArTrophy {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: opacity .18s; will-change: transform, opacity;
}
.ft-ar-trophy-icon {
  width: 110px; height: 110px;
  background: rgba(10,10,15,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,215,0,.6); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(255,215,0,.35), 0 4px 20px rgba(0,0,0,.7);
  animation: ftArBob 2.4s ease-in-out infinite;
}
@keyframes ftArBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.ft-ar-trophy-card {
  background: rgba(10,10,15,.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,215,0,.35); border-radius: 14px;
  padding: 10px 20px; text-align: center;
}
.ft-ar-trophy-card h3 { font: 700 15px system-ui; color: #FFD700; margin-bottom: 3px; }
.ft-ar-trophy-card p  { font: 400 12px system-ui; color: rgba(255,255,255,.65); }
#ftArAimArrow {
  position: fixed; top: 50%; z-index: 1120; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,215,0,.5); border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  color: #FFD700; font-size: 20px;
  transition: left .1s, right .1s;
}
#ftArDist {
  position: fixed;
  bottom: calc(max(env(safe-area-inset-bottom, 0px), 0px) + 28px);
  left: 50%; transform: translateX(-50%); z-index: 1120;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,215,0,.4); border-radius: 50px;
  color: #fff; font: 600 15px system-ui; padding: 10px 22px;
  white-space: nowrap; pointer-events: none; display: none;
}
#ftArSplash {
  position: fixed; inset: 0; z-index: 1130; background: #0a0a0f;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; color: #fff; text-align: center; padding: 32px;
}
.ft-ar-big { font-size: 72px; line-height: 1; }
#ftArSplash h2 { font: 700 22px system-ui; color: #FFD700; }
.ft-ar-meta { font: 400 14px system-ui; color: rgba(255,255,255,.5); }
.ft-ar-hint {
  font: 400 13px system-ui; color: rgba(255,255,255,.38);
  max-width: 250px; line-height: 1.6; margin-top: -4px;
}
#ftArStartBtn {
  background: #FFD700; color: #0a0a0f; border: none; border-radius: 50px;
  font: 700 16px system-ui; padding: 16px 44px; cursor: pointer;
  box-shadow: 0 0 36px rgba(255,215,0,.45);
}
#ftArStartBtn:active { opacity: .85; }
#ftArErr { font: 500 13px system-ui; color: #f87171; display: none; max-width: 240px; }


/* ── Mobil-eksklusivt — skjult på desktop ─────────────────────────────
   .ft-no-mobile blir sett på <html> av layout.php sitt deteksjonsskript
   dersom eininga manglar touch + DeviceOrientationEvent               */
.ft-no-mobile .ft-nav-kompass  { display: none !important; }
.ft-no-mobile .ft-ko-tilt-row  { display: none !important; }
.ft-no-mobile .ft-ko-wakelock  { display: none !important; }
.ft-no-mobile #ftArOverlay     { display: none !important; }

/* ── Pakkliste ────────────────────────────────────────────────────────── */
.ft-pk-page { max-width: 680px; margin: 0 auto; padding: 16px 16px 80px; }

.ft-pk-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ft-muted, #6b7280); font-size: 14px; text-decoration: none;
  margin-bottom: 20px;
}
.ft-pk-back:hover { color: var(--ft-text, #111); }

.ft-pk-header { margin-bottom: 24px; }
.ft-pk-title  { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.ft-pk-meta   { display: flex; gap: 16px; color: var(--ft-muted, #6b7280); font-size: 14px; }
.ft-pk-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Form-kort: lys grå bakgrunn, kvite inputs får god kontrast */
.ft-pk-form-card {
  background: #f4f4f2;
  border: 1px solid var(--ft-border, #e5e7eb);
  border-radius: 16px; padding: 32px; margin-bottom: 28px;
}
.ft-pk-form-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.ft-pk-form-title { font-size: 16px; font-weight: 700; margin: 0; }

/* Felt: to kolonnar med klare linjer */
.ft-pk-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-bottom: 0;
}
.ft-pk-label  { display: flex; flex-direction: column; gap: 6px; font-size: 12px; min-width: 0;
                color: var(--ft-muted,#6b7280); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ft-pk-input  {
  padding: 11px 14px; border: 1.5px solid var(--ft-border,#e5e7eb);
  border-radius: 9px; font-size: 15px; background: #fff;
  color: var(--ft-text,#111); outline: none; width: 100%;
  transition: border-color .15s;
}
.ft-pk-input:focus { border-color: var(--ft-orange,#f59e0b); box-shadow: 0 0 0 3px rgba(245,158,11,.1); }
.ft-pk-hint   { font-size: 12px; color: var(--ft-muted,#9ca3af); margin: 8px 0 0; }

/* Skiljelinje + detaljnivå */
.ft-pk-divider    { border: none; border-top: 1px solid var(--ft-border,#e5e7eb); margin: 24px 0; }
.ft-pk-detail-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.ft-pk-label-inline { font-size: 13px; color: var(--ft-text,#111); font-weight: 600; }

/* Segmentknapp */
.ft-pk-detail-seg  { display: inline-flex; background: var(--ft-bg-soft,#f3f4f6); border-radius: 10px; padding: 3px; gap: 2px; }
.ft-pk-seg-btn     { display: flex; align-items: center; gap: 7px; padding: 8px 18px; font-size: 13px; font-weight: 600;
                     background: transparent; border: none; border-radius: 8px;
                     color: var(--ft-muted,#6b7280); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; line-height: 1; }
.ft-pk-seg-btn:hover  { color: var(--ft-text,#111827); background: rgba(255,255,255,.6); }
.ft-pk-seg-btn.active { background: #fff; color: var(--ft-text,#111827);
                         box-shadow: 0 1px 4px rgba(0,0,0,.12); }
/* Prikkindikatorar */
.ft-pk-seg-dots   { display: flex; gap: 3px; align-items: center; }
.ft-pk-seg-dots i { display: block; width: 5px; height: 5px; border-radius: 50%;
                     background: currentColor; opacity: .5; flex-shrink: 0; }
.ft-pk-seg-btn.active .ft-pk-seg-dots i { opacity: .8; }

.ft-pk-btn-generate {
  width: 100%; justify-content: center;
  display: flex; align-items: center; gap: 8px;
  background: var(--ft-orange,#f59e0b); color: #fff;
  border: none; border-radius: 12px; padding: 14px 28px;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: opacity .15s;
}
.ft-pk-btn-generate:hover { opacity: .9; }

.ft-pk-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 0; color: var(--ft-muted,#6b7280); }
.ft-pk-spinner {
  width: 32px; height: 32px; border: 3px solid var(--ft-border,#e5e7eb);
  border-top-color: var(--ft-orange,#f59e0b); border-radius: 50%;
  animation: pkSpin .7s linear infinite;
}
@keyframes pkSpin { to { transform: rotate(360deg); } }

.ft-pk-error { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 14px 16px; color: #b91c1c; font-size: 14px; margin-bottom: 16px; }

.ft-pk-result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ft-pk-result-meta   { font-size: 13px; color: var(--ft-muted,#6b7280); }
.ft-pk-save-indicator { font-size: 12px; color: var(--ft-muted,#6b7280); opacity: 0; transition: opacity .3s; }

/* Utstyrspickar */
.ft-pk-picker          { margin: 28px 0 8px; }
.ft-pk-picker-row      { margin: 10px 0 12px; }
.ft-pk-picker-select   { max-width: 260px; }
.ft-pk-picker-items    { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; }
.ft-pk-picker-chip     { display: inline-flex; align-items: center; gap: 6px;
                         padding: 7px 13px; border-radius: 20px; font-size: 13px; font-weight: 500;
                         border: 1.5px solid var(--ft-border,#e5e7eb);
                         background: #fff; color: var(--ft-text,#111); cursor: pointer;
                         transition: border-color .15s, background .15s; }
.ft-pk-picker-chip:hover        { border-color: var(--ft-orange,#f59e0b); background: #fff8ed; }
.ft-pk-picker-chip.added        { background: var(--ft-bg-soft,#f3f4f6); color: var(--ft-muted,#9ca3af);
                                   border-color: transparent; cursor: default; }
.ft-pk-picker-chip svg          { flex-shrink: 0; }
.ft-pk-btn-regen {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--ft-border,#e5e7eb);
  border-radius: 50px; padding: 6px 14px; font-size: 13px;
  color: var(--ft-muted,#6b7280); cursor: pointer;
}
.ft-pk-btn-regen:hover { border-color: var(--ft-orange,#f59e0b); color: var(--ft-orange,#f59e0b); }

.ft-pk-category  { margin-bottom: 24px; }
.ft-pk-cat-title { font-size: 14px; font-weight: 600; color: var(--ft-muted,#6b7280); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 10px; }
.ft-pk-list      { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.ft-pk-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--ft-surface,#f9fafb);
  border: 1px solid var(--ft-border,#e5e7eb); border-radius: 9px;
  transition: opacity .15s;
}
.ft-pk-item.ft-pk-checked .ft-pk-item-text { opacity: .6; }
.ft-pk-item.ft-pk-checked .ft-pk-check     { background: var(--ft-orange,#f59e0b); border-color: var(--ft-orange,#f59e0b); color: #fff; }

.ft-pk-check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--ft-border,#d1d5db); background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: transparent; transition: all .12s;
}
.ft-pk-check:hover { border-color: var(--ft-orange,#f59e0b); }
.ft-pk-item-text { flex: 1; font-size: 14px; }
.ft-pk-delete {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--ft-muted,#9ca3af); padding: 2px; display: flex;
  align-items: center; opacity: 0; transition: opacity .15s;
}
.ft-pk-item:hover .ft-pk-delete { opacity: 1; }
.ft-pk-delete:hover { color: #ef4444; }

.ft-pk-add-custom  { margin-top: 32px; }
.ft-pk-add-row     { display: flex; gap: 8px; margin: 10px 0 12px; }
.ft-pk-btn-add {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  background: var(--ft-orange,#f59e0b); color: #fff; border: none;
  border-radius: 8px; padding: 9px 14px; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.ft-pk-btn-add:hover { opacity: .9; }

@media (max-width: 480px) {
  .ft-pk-fields { grid-template-columns: 1fr; }
}

.ft-pk-form-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.ft-pk-form-title-row .ft-pk-form-title { margin-bottom: 0; }
.ft-pk-saved-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #16a34a;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 50px; padding: 3px 10px;
}

.ft-pk-summary {
  background: var(--ft-surface, #f9fafb);
  border-left: 3px solid var(--ft-orange, #f59e0b);
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ft-text, #374151);
  margin-bottom: 24px;
}

.ft-pk-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media print {
  /* Skjul alt unntatt pakkliste-innhaldet */
  .ft-header, .ft-footer, .ft-pk-back, .ft-pk-form-card,
  .ft-pk-result-actions, .ft-pk-add-custom, .ft-pk-loading,
  .ft-pk-delete, .ft-pk-check { display: none !important; }

  .ft-pk-page { max-width: 100%; padding: 0; }
  .ft-pk-title { font-size: 20px; margin-bottom: 4px; }
  .ft-pk-meta  { margin-bottom: 12px; }

  .ft-pk-summary {
    border-left: 2px solid #999;
    background: none;
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 12px;
  }
  .ft-pk-result-header { margin-bottom: 12px; }
  .ft-pk-result-meta   { font-size: 12px; }
  .ft-pk-cat-title     { font-size: 11px; margin-bottom: 6px; }

  /* Skjul uavkryssa punkt ved utskrift */
  .ft-pk-item:not(.ft-pk-checked) { display: none !important; }

  /* Skjul tomme kategoriar */
  .ft-pk-category:not(:has(.ft-pk-checked)) { display: none !important; }

  .ft-pk-item {
    border: none;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    padding: 5px 0;
    background: none;
  }
  .ft-pk-item::before {
    content: '☑';
    margin-right: 8px;
    font-size: 14px;
    color: #333;
  }
  .ft-pk-item-text { font-size: 13px; }
  .ft-pk-category  { margin-bottom: 16px; page-break-inside: avoid; }

  /* Skjul nedlasting/skriv ut-knappane */
  .ft-pk-bottom-actions { display: none !important; }
  .ft-pk-weather-strip  { display: none !important; }
}

.ft-pk-weather-strip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px;
}
.ft-pk-wchip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; font-weight: 500; color: var(--ft-text-muted, #6b7280);
  background: var(--ft-bg-soft, #f3f4f6); border-radius: 20px;
  padding: 3px 10px; border: 1px solid var(--ft-border, #e5e7eb);
}
.ft-pk-wchip--rain { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.ft-pk-wchip--label {
  font-size: .72rem; color: var(--ft-muted, #9ca3af);
  background: transparent; border-color: transparent; margin-left: auto;
}

.ft-pk-bottom-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--ft-border, #e5e7eb);
}

/* ── Pakkliste admin-editor ─────────────────────────────────────── */
.pk-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: var(--ft-bg, #fff); border: 1px solid var(--ft-border, #e5e7eb);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
}
.pk-cat-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.pk-cat-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; font-weight: 500; padding: 5px 11px;
  border-radius: 20px; border: 1px solid var(--ft-border, #e5e7eb);
  background: var(--ft-bg-soft, #f9fafb); color: var(--ft-text-muted, #6b7280);
  cursor: pointer; transition: all .15s;
}
.pk-cat-btn:hover { border-color: var(--ft-orange, #f97316); color: var(--ft-orange, #f97316); }
.pk-cat-btn.active { background: var(--ft-orange, #f97316); border-color: var(--ft-orange, #f97316); color: #fff; }
.pk-cat-n { font-size: .72rem; opacity: .75; }
.pk-count { font-size: .82rem; color: var(--ft-text-muted, #6b7280); white-space: nowrap; }

.pk-cat-section { margin-bottom: 20px; }
.pk-cat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--ft-bg-soft, #f3f4f6);
  border-radius: 8px 8px 0 0; border: 1px solid var(--ft-border, #e5e7eb);
  border-bottom: none;
}
.pk-cat-name { font-weight: 600; font-size: .88rem; }
.pk-cat-count { font-size: .78rem; color: var(--ft-text-muted, #6b7280); }
.pk-add-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: .78rem; font-weight: 500; padding: 4px 10px;
  border-radius: 6px; border: 1px solid var(--ft-border, #e5e7eb);
  background: #fff; color: var(--ft-orange, #f97316); cursor: pointer;
  transition: all .15s;
}
.pk-add-btn:hover { background: var(--ft-orange, #f97316); color: #fff; border-color: var(--ft-orange, #f97316); }

.pk-item-list {
  border: 1px solid var(--ft-border, #e5e7eb);
  border-radius: 0 0 8px 8px; overflow: hidden;
}
.pk-empty {
  padding: 14px 16px; font-size: .84rem;
  color: var(--ft-text-muted, #9ca3af); font-style: italic;
}
.pk-item-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-bottom: 1px solid var(--ft-border, #f3f4f6);
  background: var(--ft-bg, #fff); transition: background .1s;
}
.pk-item-row:last-child { border-bottom: none; }
.pk-item-row:hover { background: var(--ft-bg-soft, #f9fafb); }
.pk-item-row.inactive { opacity: .45; }
.pk-item-row.inactive .pk-item-input { text-decoration: line-through; color: var(--ft-text-muted, #9ca3af); }

.pk-item-input {
  flex: 1; min-width: 160px; font-size: .84rem; padding: 4px 8px;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
  color: var(--ft-text, #111); transition: border-color .15s;
}
.pk-item-input:focus { outline: none; border-color: var(--ft-orange, #f97316); background: #fff; }

.pk-tags-group { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; }
.pk-tags-divider { width: 1px; background: var(--ft-border, #e5e7eb); align-self: stretch; flex-shrink: 0; margin: 0 2px; }

.pk-tag {
  font-size: .72rem; font-weight: 400; padding: 3px 8px;
  border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: #d1d5db;
  cursor: pointer; transition: all .12s; white-space: nowrap;
}
.pk-tag.on {
  font-weight: 600;
  background: color-mix(in srgb, var(--tc, #f97316) 15%, transparent);
  border-color: color-mix(in srgb, var(--tc, #f97316) 50%, transparent);
  color: var(--tc, #f97316);
}
.pk-tag:hover:not(.on) { border-color: #e5e7eb; color: #9ca3af; }

.pk-inactive-btn {
  flex-shrink: 0; padding: 4px 7px; border-radius: 6px;
  border: 1px solid var(--ft-border, #e5e7eb);
  background: transparent; cursor: pointer; color: var(--ft-text-muted, #9ca3af);
  transition: all .15s; display: flex; align-items: center;
}
.pk-inactive-btn:hover { border-color: #d1d5db; color: #374151; }
.pk-inactive-btn.is-inactive { background: #fef3c7; border-color: #fcd34d; color: #92400e; }

.pk-delete-btn {
  flex-shrink: 0; padding: 4px 6px; border-radius: 6px;
  border: 1px solid transparent; background: transparent;
  cursor: pointer; color: var(--ft-text-muted, #cbd5e1);
  transition: all .15s; display: flex; align-items: center;
}
.pk-delete-btn:hover { color: #ef4444; border-color: #fecaca; background: #fff1f2; }

/* ── Pakkliste sub-faner ────────────────────────────────────────── */
.pk-subtabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--ft-border, #e5e7eb);
  margin: -4px 0 20px;
}
.pk-subtab {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 500; padding: 8px 16px;
  border: none; background: none; cursor: pointer;
  color: var(--ft-text-muted, #6b7280);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.pk-subtab:hover { color: var(--ft-text, #111); }
.pk-subtab.active {
  color: var(--ft-orange, #f97316);
  border-bottom-color: var(--ft-orange, #f97316);
}

/* ── Utstyr-forslag frå brukarar ────────────────────────────────── */
.pk-suggestions-wrap {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--ft-border, #e5e7eb);
}
.pk-suggestions-title {
  display: flex; align-items: center; gap: 7px;
  font-size: .9rem; font-weight: 600; margin: 0 0 6px;
  color: var(--ft-text, #111);
}
.pk-suggestion-list { display: flex; flex-direction: column; gap: 6px; }
.pk-suggestion-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 8px;
  background: var(--ft-bg-soft, #f9fafb);
  border: 1px solid var(--ft-border, #e5e7eb);
}
.pk-suggestion-item { flex: 1; font-size: .85rem; min-width: 120px; }
.pk-suggestion-count {
  font-size: .75rem; font-weight: 600; color: var(--ft-orange, #f97316);
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 10px; padding: 1px 7px;
}
.pk-suggestion-actions { margin-left: auto; }

/* Skjul søk- og favoritt-label på desktop — vis berre på mobil i hamburgermeny */
@media (min-width: 540px) {
  .ft-nav-search .ft-nav-label,
  .ft-fav-nav .ft-nav-label { display: none !important; }
}

/* ── ftLightbox ─────────────────────────────────────────────────────── */
.ft-lb-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.93);
  display: flex; align-items: center; justify-content: center;
}
.ft-lb-overlay[hidden] { display: none !important; }
.ft-lb-fig { display: flex; flex-direction: column; align-items: center; max-width: 94vw; max-height: 90vh; }
.ft-lb-img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 4px; display: block; }
.ft-lb-cap { color: rgba(255,255,255,0.75); font-size: .85rem; margin-top: 8px; text-align: center; }
.ft-lb-close {
  position: absolute; top: 14px; right: 18px;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  border-radius: 50%; width: 36px; height: 36px;
}
.ft-lb-prev, .ft-lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.45); border: none; color: #fff;
  font-size: 2.4rem; line-height: 1; cursor: pointer;
  border-radius: 6px; padding: 6px 14px;
  transition: background .15s;
}
.ft-lb-prev:hover, .ft-lb-next:hover { background: rgba(0,0,0,0.75); }
.ft-lb-prev { left: 10px; }
.ft-lb-next { right: 10px; }
.ft-lb-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.6); font-size: .8rem; pointer-events: none;
}
@media (max-width: 540px) {
  .ft-lb-prev { left: 4px; padding: 4px 10px; }
  .ft-lb-next { right: 4px; padding: 4px 10px; }
}
/* Galleribiblete: zoom-cursor */
.ft-gallery-item img, .ft-tip-gallery .ft-tip-photo img { cursor: zoom-in; }
.ft-gdpr-disclaimer { font-size: .78rem; color: rgba(255,255,255,0.65); margin: 8px 0 0; line-height: 1.4; }
.ft-gdpr-browser-note { font-size: .78rem; color: rgba(255,255,255,0.80); margin: 10px 0 0; line-height: 1.4; font-style: italic; }

/* GDPR banner: flagg-rad for språkval */
.ft-gdpr-langs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.ft-gdpr-lang-flag {
  font-size: 1.4rem; text-decoration: none; line-height: 1;
  opacity: 0.5; transition: opacity .15s, transform .15s;
  border-radius: 4px; padding: 2px 3px;
}
.ft-gdpr-lang-flag:hover { opacity: 1; transform: scale(1.15); }
.ft-gdpr-lang-active { opacity: 1; outline: 2px solid rgba(255,255,255,0.6); }

/* ── View-toggle knapper (framsida tur-grid) ─────────────────── */
.ft-view-toggle { display:flex; gap:3px; }
.ft-vtbtn {
  background:none; border:none;
  padding:4px 5px; cursor:pointer; color:var(--ft-muted);
  display:flex; align-items:center; justify-content:center;
  transition:color .15s;
  line-height:1;
}
.ft-vtbtn:hover { color:var(--ft-text); }
.ft-vtbtn.active { color:var(--ft-orange); }

/* Grid-visningar — gjeld både Turar-griden (#ft-home-grid) og Turtips-griden (#ft-tips-grid) */
#ft-home-grid.ft-view-1, #ft-tips-grid.ft-view-1 { grid-template-columns:1fr !important; }
#ft-home-grid.ft-view-2, #ft-tips-grid.ft-view-2 { grid-template-columns:repeat(2,1fr) !important; }
#ft-home-grid.ft-view-3, #ft-tips-grid.ft-view-3 { grid-template-columns:repeat(3,1fr) !important; }
#ft-home-grid.ft-view-4, #ft-tips-grid.ft-view-4 { grid-template-columns:repeat(4,1fr) !important; }
@media (max-width:540px) {
  #ft-home-grid.ft-view-4, #ft-tips-grid.ft-view-4 { grid-template-columns:repeat(2,1fr) !important; }
}

/* Liste-visning */
#ft-home-grid.ft-view-list, #ft-tips-grid.ft-view-list {
  display:flex; flex-direction:column; gap:2px;
  grid-template-columns:unset !important;
}
#ft-home-grid.ft-view-list .ft-trip-card, #ft-tips-grid.ft-view-list .ft-trip-card {
  display:grid; grid-template-columns:60px 1fr auto;
  align-items:center; gap:0 12px;
  padding:8px 12px; border-radius:8px; overflow:visible;
  transform:none !important; box-shadow:none !important;
}
#ft-home-grid.ft-view-list .ft-card-img, #ft-tips-grid.ft-view-list .ft-card-img {
  width:60px; height:46px; border-radius:6px; overflow:hidden;
  aspect-ratio:unset; grid-column:1; grid-row:1/span 2; align-self:center;
}
#ft-home-grid.ft-view-list .ft-card-img img, #ft-tips-grid.ft-view-list .ft-card-img img { width:100%; height:100%; object-fit:cover; }
#ft-home-grid.ft-view-list .ft-card-img .ft-dnt-badge,
#ft-home-grid.ft-view-list .ft-card-img .ft-alert-badge,
#ft-home-grid.ft-view-list .ft-card-img .ft-fav-btn { display:none; }
#ft-home-grid.ft-view-list .ft-card-body, #ft-tips-grid.ft-view-list .ft-card-body { padding:0; display:contents; }
#ft-home-grid.ft-view-list .ft-card-body h3, #ft-tips-grid.ft-view-list .ft-card-body h3 {
  font-size:14px; font-weight:600; margin:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  grid-column:2; grid-row:1; align-self:end;
}
#ft-home-grid.ft-view-list .ft-card-loc, #ft-tips-grid.ft-view-list .ft-card-loc {
  display:block; font-size:11px; color:var(--ft-muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  grid-column:2; grid-row:2; align-self:start; margin-top:1px;
}
#ft-home-grid.ft-view-list .ft-card-meta, #ft-tips-grid.ft-view-list .ft-card-meta {
  font-size:12px; gap:8px; margin:0;
  grid-column:3; grid-row:1/span 2; align-self:center;
  flex-wrap:nowrap; white-space:nowrap;
}
#ft-home-grid.ft-view-list .ft-diff-pill { display:none; }
#ft-home-grid.ft-view-list .ft-dist-badge { display:none; }

/* ── Framsidevarsel — kvadratiske boksar med outline-ikon ──── */
.ft-alerts-row { display:flex; flex-wrap:wrap; gap:8px; }
.ft-alert-chip {
  flex:0 0 96px;
  height:96px;
  border:1.5px solid; border-radius:10px;
  overflow:hidden; font-size:12px;
  transition:flex-basis .25s ease, height .25s ease, border-radius .2s;
  cursor:pointer;
}
.ft-alert-chip[open] {
  flex:1 1 100%;
  height:auto;
  border-radius:12px;
}
.ft-alert-summary {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; padding:10px 6px;
  cursor:pointer; list-style:none; user-select:none;
  font-weight:600; text-align:center;
  width:100%; height:100%;
  box-sizing:border-box;
}
.ft-alert-summary::-webkit-details-marker { display:none; }
.ft-alert-icon {
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; flex-shrink:0;
}
.ft-alert-icon svg { width:24px; height:24px; }
.ft-alert-label {
  font-size:12px; line-height:1.2;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; word-break:break-word;
}
/* Open-state: horisontal layout med ikon + tittel øvst */
.ft-alert-chip[open] .ft-alert-summary {
  flex-direction:row; justify-content:flex-start;
  height:auto; padding:10px 14px; gap:10px;
  text-align:left;
  border-bottom:1px solid rgba(0,0,0,.07);
}
.ft-alert-chip[open] .ft-alert-icon { width:22px; height:22px; }
.ft-alert-chip[open] .ft-alert-icon svg { width:20px; height:20px; }
.ft-alert-chip[open] .ft-alert-label {
  -webkit-line-clamp:unset; line-clamp:unset; overflow:visible;
  font-size:14px;
}
.ft-alert-body {
  padding:10px 14px 12px;
  font-size:13px; line-height:1.5; color:var(--ft-muted);
}
.ft-alert-body p { margin:0 0 6px; }
.ft-alert-body a {
  font-size:12px; font-weight:600; text-decoration:none;
  display:inline-flex; align-items:center; gap:4px;
}

/* ── Detaljar-fane (kompakt, live-fokus) ───────────────────────── */
.ft-detaljar-head {
  margin-bottom: 12px;
}
.ft-detaljar-titlerow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ft-detaljar-titlewrap {
  flex: 1; min-width: 0;
}
.ft-detaljar-title {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
  color: #422006;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ft-detaljar-loc {
  margin: 0;
  font-size: 11px;
  color: #92400e;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ft-detaljar-info {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.6);
  color: #1e40af;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid rgba(30,64,175,0.2);
}
.ft-detaljar-info:hover { background: #fff; }
.ft-detaljar-static {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 6px;
  font-size: 11px;
  color: #78350f;
}
.ft-detaljar-static span {
  font-weight: 600;
  white-space: nowrap;
}

/* Live-stats grid: 3 kolonner × 2 rader = 6 store talverdiar */
.ft-livestats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(146,64,14,0.18);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.ft-livestat {
  background: #fff;
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ft-livestat span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #92400e;
  opacity: 0.7;
}
.ft-livestat strong {
  font-size: 16px;
  font-weight: 700;
  color: #422006;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ft-livestat-near {
  color: #16a34a !important;
  animation: ftLsNearPulse 1.4s ease-in-out infinite;
}
@keyframes ftLsNearPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

/* Vêr-rad: aktuell + neste 3 dagar */
.ft-wxrow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 12px;
  padding: 6px;
  background: rgba(186,230,253,0.35);
  border-radius: 8px;
}
.ft-wxrow-loading {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  color: #92400e;
  padding: 14px 0;
}
.ft-wx-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 2px;
  background: rgba(255,255,255,0.55);
  border-radius: 6px;
  text-align: center;
}
.ft-wx-cell.ft-wx-now {
  background: rgba(255,255,255,0.85);
  box-shadow: inset 0 0 0 1px rgba(245,158,11,0.4);
}
.ft-wx-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #92400e;
  opacity: 0.75;
}
.ft-wx-icon {
  width: 32px; height: 32px;
  display: block;
}
.ft-wx-temp {
  font-size: 13px;
  font-weight: 700;
  color: #422006;
  font-variant-numeric: tabular-nums;
}
.ft-wx-wind, .ft-wx-precip {
  font-size: 9px;
  font-weight: 600;
  color: #1e40af;
  opacity: 0.85;
}
.ft-wx-precip { color: #0284c7; }

/* Skildring som collapsed details */
/* Kompakt pause-knapp på Detaljar */
/* ── Aktiver-tur "for langt unna"-modal ───────────────────────────── */
.ft-modal {
  position: fixed; inset: 0; z-index: 10001;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.ft-modal[hidden] { display: none; }
.ft-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: ftModalFade .2s ease-out;
}
.ft-modal-card {
  position: relative;
  background: #fef9c3;
  border-radius: 14px;
  padding: 22px 20px 18px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  animation: ftModalSlide .25s cubic-bezier(.2,.9,.3,1.2);
  border: 1px solid rgba(245,158,11,0.4);
}
@keyframes ftModalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ftModalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ft-modal-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #422006;
  display: flex; align-items: center; gap: 8px;
}
.ft-modal-card h3::before {
  content: '📍';
  font-size: 22px;
}
.ft-modal-card p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #422006;
}
.ft-modal-helper {
  background: rgba(255,255,255,0.6);
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  border-left: 3px solid #f59e0b;
}
.ft-modal-actions {
  display: flex; gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.ft-modal-btn {
  flex: 1; min-width: 110px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 14px;
  font-size: 14px; font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.ft-modal-btn-secondary {
  background: rgba(255,255,255,0.7);
  border-color: rgba(146,64,14,0.3);
  color: #92400e;
}
.ft-modal-btn-secondary:hover { background: #fff; border-color: #92400e; }
.ft-modal-btn-primary {
  background: linear-gradient(135deg, #4285f4, #1e40af);  /* Google-blå */
  color: #fff;
  border-color: #1e40af;
  box-shadow: 0 2px 6px rgba(30,64,175,0.3);
}
.ft-modal-btn-primary:hover {
  background: linear-gradient(135deg, #3367d6, #1e3a8a);
  box-shadow: 0 4px 10px rgba(30,64,175,0.4);
}

/* ── Bypass-lenke i for-langt-unna-modal ─────────────────────────── */
.ft-modal-bypass {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(146,64,14,0.25);
  text-align: center;
}
.ft-modal-link {
  background: none;
  border: none;
  color: #92400e;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.75;
  transition: opacity .15s;
}
.ft-modal-link:hover {
  opacity: 1;
}

/* ── Botn-toolbar i ekspandert panel: pause-knapp + slide-to-fjern ─ */
.ft-panel-bottom {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0;                         /* ingen ekstra luft — padding-bottom på .ft-panel-content gir nok */
  padding: 12px 16px 16px;           /* horisontal padding mot panel-kantane + balansert vertikal luft */
  border-top: 1px solid rgba(146,64,14,0.18);
}
.ft-panel-pause-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(146,64,14,0.3);
  color: #92400e;
  padding: 11px 18px;                /* var 9px 14px – meir tap-area */
  border-radius: 24px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 46px;                  /* match slider-høgda for visuell balanse */
  transition: all .15s;
}
.ft-panel-pause-btn:hover {
  background: #fff;
  border-color: #92400e;
}
.ft-panel-pause-btn:active {
  transform: scale(0.96);
}

/* Slide-to-fjern: alltid synleg i panel-botn */
.ft-panel-slider {
  position: relative;
  flex: 1;
  height: 46px;                      /* var 44px – match med pause-knappen */
  background: rgba(185,28,28,0.10);
  border: 1px solid rgba(185,28,28,0.25);
  border-radius: 22px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.ft-panel-slider-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(185,28,28,0.25), rgba(185,28,28,0.45));
  border-radius: 22px;
  pointer-events: none;
}
.ft-panel-slider-text {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: #b91c1c;
  letter-spacing: 0.3px;
  pointer-events: none;
  white-space: nowrap;
}
.ft-panel-slider-handle {
  position: absolute;
  top: 4px; left: 4px;
  width: 38px; height: 38px;
  background: #b91c1c;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 2;
  touch-action: none;
}
.ft-panel-slider-handle.grabbing { cursor: grabbing; }
.ft-panel-slider-handle.done {
  background: #16a34a;
}
.ft-panel-slider-handle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Heile aktiv-tur-stripa er ein toggle-knapp som opnar/lukker det utvida panelet */
.ft-active-trip-toggle {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  cursor: pointer;
  padding: 4px 6px;
  margin: 0;
  border-radius: 6px;
  min-width: 0;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.ft-active-trip-toggle:hover {
  background: rgba(146,64,14,0.08);
}
.ft-active-trip-toggle:active {
  background: rgba(146,64,14,0.14);
}
.ft-active-trip-toggle:focus-visible {
  outline: 2px solid rgba(146,64,14,0.5);
  outline-offset: 1px;
}
.ft-active-trip-toggle[aria-expanded="true"] {
  background: rgba(146,64,14,0.10);
}
.ft-active-trip-chevron {
  flex-shrink: 0;
  color: #92400e;
  transition: transform .2s ease;
}
.ft-active-trip-toggle[aria-current="page"] {
  /* Når brukar er på sida til aktiv tur: tonet litt ned (men framleis klikkbart for å opne panel) */
  opacity: 0.92;
}

/* ── Foto-prikkar på kartet ──────────────────────────────────── */
.ft-photo-popup-wrap .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
  border: none;
}
.ft-photo-popup-wrap .leaflet-popup-content { margin: 0; line-height: 0; }
.ft-photo-popup-wrap .leaflet-popup-tip-container { margin-top: -1px; }
.ft-photo-popup { display: flex; flex-direction: column; }
.ft-photo-popup img {
  display: block;
  width: 160px;
  height: 120px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity .15s;
}
.ft-photo-popup img:hover { opacity: .88; }
.ft-photo-popup-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  background: var(--ft-bg, #fff);
  border-top: 1px solid var(--ft-border, #e5e7eb);
  line-height: 1.3;
}
.ft-photo-popup-cap {
  font-size: 11px;
  color: var(--ft-muted, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}


/* Foto-lag toggle-knapp på kartet */
.ft-photo-toggle-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #fff;
  border: none;
  cursor: pointer;
  color: #3b82f6;
  transition: opacity .2s, color .2s;
  padding: 0;
}
.ft-photo-toggle-ctrl:hover { color: #1d4ed8; }
.ft-photo-toggle-ctrl[aria-pressed="false"] { color: #9ca3af; }


/* ══════════════════════════════════════════════════════
   ADMIN — Konsistente hjelpe-klassar (alle faner)
   ══════════════════════════════════════════════════════ */

/* Sidetoppar i kvar fane */
.admin-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ft-border);
}
.admin-page-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  flex: 1;
}
.admin-page-header .admin-ph-meta {
  font-size: 12px;
  color: var(--ft-muted);
}

/* Toolbar-rad (knapp + filter-gruppe) */
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Tom-tilstand */
.admin-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ft-muted);
}
.admin-empty svg {
  width: 40px;
  height: 40px;
  opacity: .25;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.admin-empty p { font-size: 14px; margin: 0; }

/* Liste-rad (generell) */
.admin-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--ft-border);
  border-radius: 10px;
  background: var(--ft-surface);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.admin-list-row:hover { border-color: color-mix(in srgb, var(--ft-accent) 40%, transparent); }
.admin-list-row-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.admin-list-row-meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--ft-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-list-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Status-prikk */
.admin-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.admin-status-dot.draft    { background: var(--ft-warning); }
.admin-status-dot.published{ background: var(--ft-green); }
.admin-status-dot.active   { background: var(--ft-green); }
.admin-status-dot.inactive { background: var(--ft-border); }

/* Seksjon-tittel inne i admin-content */
.admin-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ft-muted);
  margin: 24px 0 8px;
}
.admin-section-title:first-child { margin-top: 0; }

/* Liten teljartekst ved sida av h2 i admin-page-header */
.admin-section-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--ft-muted);
  margin-left: 6px;
}

/* Grøn aksentknapp (nyhetsbrev/natur) */
.ft-btn-green {
  background: var(--ft-accent-green) !important;
  color: #fff !important;
  border-color: var(--ft-accent-green) !important;
}
.ft-btn-green:hover { opacity: .88; }

/* Inline-ikontekst */
.admin-icon-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

/* GPX multi-alt repeater */
.ft-gpx-alt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--ft-bg-card, #f9f9f9);
  border: 1px solid var(--ft-border);
  border-radius: 6px;
}
.ft-gpx-alt-row .ft-drag-handle {
  cursor: grab;
  color: var(--ft-muted);
  font-size: 16px;
  user-select: none;
  padding: 0 2px;
}

/* Overskrift + ruteveljar på same linje */
.ft-section-heading-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.ft-section-heading-row h2 {
  margin: 0;
}

/* Ruteveljar ved sidan av overskrifta */
.ft-route-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ft-route-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  border: 2px solid var(--rc, #888);
  background: var(--ft-bg, #fff);
  color: var(--ft-text, #1a1a1a);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  opacity: 0.65;
}
.ft-route-btn::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rc, #888);
  flex-shrink: 0;
}
.ft-route-btn-active {
  background: var(--rc, #888);
  color: #fff;
  opacity: 1;
}
.ft-route-btn-active::before {
  background: rgba(255,255,255,0.75);
}
.ft-route-btn:hover:not(.ft-route-btn-active) {
  opacity: 1;
}
