/* ============================================
   LYSEKILS GUIDE — DESIGN SYSTEM
   "Bohuslänsk minimalism"
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Färgpalett — förankrad i Bohuslän */
    --gullmarn: #1F4E5F;
    --gullmarn-deep: #0F2E3A;
    --gullmarn-soft: #E8EFF2;
    --granit: #A85D4A;
    --granit-soft: #F4E4DD;
    --skum: #F5F1EA;
    --snacka: #FFFFFF;
    --sand: #E8E0D2;
    --sand-mjuk: #F0EBE0;
    --tang: #3F5E3B;
    --tang-soft: #E4EAE2;
    --barnsten: #C68A2E;
    --korall: #B33A2E;

    --text-mork: #1A1A1A;
    --text-mjuk: #4A4A4A;
    --text-dim: #6B6B6B;
    --text-pa-mork: #FAFAFA;

    --linje: #E5DFD2;
    --linje-mjuk: #F0EBE0;

    /* Typografi */
    --font-display: 'Fraunces', Georgia, serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Skala */
    --t-xs: 13px;
    --t-sm: 15px;
    --t-md: 18px;
    --t-lg: 22px;
    --t-xl: 28px;
    --t-2xl: 36px;
    --t-3xl: 48px;

    /* Skuggor */
    --skugga-vila: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(15,46,58,0.06);
    --skugga-svav: 0 4px 8px rgba(0,0,0,0.06), 0 16px 40px rgba(15,46,58,0.10);
    --skugga-djup: 0 24px 60px rgba(15,46,58,0.18);

    /* Radie */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-pill: 999px;

    --in: cubic-bezier(.2,.7,.3,1);

    /* Layout-höjder */
    --header-h: 73px;
    --tabbar-h: 77px;
}

[data-text-size="stor"] {
    --t-xs: 14px; --t-sm: 17px; --t-md: 20px;
    --t-lg: 24px; --t-xl: 32px; --t-2xl: 40px; --t-3xl: 54px;
}
[data-text-size="extra-stor"] {
    --t-xs: 15px; --t-sm: 18px; --t-md: 22px;
    --t-lg: 26px; --t-xl: 36px; --t-2xl: 44px; --t-3xl: 60px;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-ui);
    font-size: var(--t-md);
    color: var(--text-mork);
    background: #1a1a1a;
    line-height: 1.55;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}
button {
    font-family: inherit; font-size: inherit; color: inherit;
    background: none; border: none; cursor: pointer; padding: 0;
}
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--gullmarn);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobil-frame */
.mobile-frame {
    width: 100vw; height: 100vh; height: 100dvh;
    background: var(--snacka);
    overflow: hidden; position: relative;
}
@media (min-width: 480px) {
    body { display: flex; align-items: center; justify-content: center; padding: 24px; }
    .mobile-frame {
        width: 420px; height: 880px;
        max-height: calc(100vh - 48px);
        border-radius: 36px;
        box-shadow: var(--skugga-djup);
    }
}

/* SPLASH */
.splash-screen {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #2A6175 0%, var(--gullmarn) 60%, var(--gullmarn-deep) 100%);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    transition: opacity 480ms var(--in);
}
.splash-screen.hidden { opacity: 0; pointer-events: none; }
.splash-content { text-align: center; color: var(--snacka); padding: 0 32px; }
.splash-logo {
    width: 220px; height: auto;
    margin-bottom: 32px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}
.splash-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: 36px;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}
.splash-subtitle {
    font-size: var(--t-md);
    opacity: 0.8; max-width: 280px;
    margin: 0 auto; line-height: 1.5;
}

/* APP */
.app-container {
    position: relative;
    width: 100%; height: 100%;
    max-height: 100%;
    display: flex; flex-direction: column;
    background: var(--snacka);
    overflow: hidden;
}
.app-container.hidden { display: none; }

.app-header {
    position: relative; z-index: 35;
    background: var(--snacka);
    border-bottom: 1px solid var(--linje-mjuk);
    padding: 14px 20px;
    flex-shrink: 0;
}
.header-content { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.back-btn {
    width: 44px; height: 44px;
    margin-left: -8px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-pill);
    color: var(--gullmarn-deep);
    transition: background 140ms var(--in);
}
.back-btn:hover { background: var(--skum); }
.back-btn:active { background: var(--sand); }
.back-btn.hidden { display: none; }
.home-btn {
    width: 40px; height: 40px;
    margin-left: auto;
    margin-right: -6px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-pill);
    color: var(--gullmarn);
    flex-shrink: 0;
    transition: background 140ms var(--in), color 140ms var(--in);
}
.home-btn:hover { background: var(--skum); color: var(--gullmarn-deep); }
.home-btn:active { background: var(--sand); }
.home-btn.hidden { display: none; }
.home-btn svg { width: 20px; height: 20px; stroke-width: 2; }

/* HAMBURGER-MENY */
.nav-menu-btn {
    width: 40px; height: 40px;
    margin-left: 0;
    margin-right: -6px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-pill);
    color: var(--gullmarn-deep);
    flex-shrink: 0;
    transition: background 140ms var(--in);
}
.nav-menu-btn:hover { background: var(--skum); }
.nav-menu-btn:active { background: var(--sand); }
.nav-menu-btn svg { width: 22px; height: 22px; stroke-width: 2; }

.nav-drawer {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    right: 12px;
    background: var(--snacka);
    border: 1px solid var(--linje-mjuk);
    border-radius: var(--r-lg);
    box-shadow: var(--skugga-svav);
    z-index: 50;
    min-width: 200px;
    overflow: hidden;
    transform: scale(0.92) translateY(-8px);
    transform-origin: top right;
    opacity: 0;
    pointer-events: none;
    transition: transform 200ms var(--in), opacity 200ms var(--in);
}
.nav-drawer.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.nav-drawer-item {
    display: flex; align-items: center; gap: 14px;
    width: 100%;
    padding: 14px 18px;
    color: var(--text-main);
    font-size: var(--t-sm);
    font-weight: 500;
    border-bottom: 1px solid var(--linje-mjuk);
    transition: background 120ms var(--in);
}
.nav-drawer-item:last-child { border-bottom: none; }
.nav-drawer-item:hover { background: var(--skum); }
.nav-drawer-item:active { background: var(--sand); }
.nav-drawer-item svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--gullmarn); stroke-width: 2; }
.nav-drawer-item.active { color: var(--gullmarn); }
.nav-drawer-item.active svg { color: var(--gullmarn); }
.header-logo { height: 26px; width: auto; }
.header-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: 20px;
    color: var(--gullmarn-deep);
    letter-spacing: -0.01em;
    flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.content-area {
    flex: 1;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--snacka);
    position: relative;
}
.tab-content { display: none; min-height: 100%; }
.tab-content.active { display: block; }

/* HERO (Upptäck) */
.hero {
    position: relative;
    height: 320px;
    background-size: cover; background-position: center;
    background-color: var(--gullmarn-deep);
    color: var(--snacka);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 24px 24px 28px;
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,46,58,0.0) 35%, rgba(15,46,58,0.55) 80%, rgba(15,46,58,0.85) 100%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-crest {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.22);
    color: var(--snacka);
    padding: 6px 12px;
    border-radius: var(--r-pill);
    font-size: var(--t-xs); font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
    margin-bottom: 12px;
}
.hero-crest::before {
    content: ''; display: inline-block;
    width: 10px; height: 10px;
    background: var(--granit); border-radius: 50%;
}
.hero-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-2xl);
    line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.hero-date { font-size: var(--t-md); opacity: 0.92; }

/* LIVE-RAD */
.live-row {
    display: flex; gap: 10px;
    overflow-x: auto;
    padding: 16px 20px 4px;
    scrollbar-width: none;
    margin-top: -20px;
    position: relative; z-index: 2;
}
.live-row::-webkit-scrollbar { display: none; }
.live-chip {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--snacka);
    border: 1px solid var(--linje);
    border-radius: var(--r-pill);
    padding: 12px 18px;
    font-size: var(--t-md); font-weight: 500;
    color: var(--text-mork);
    box-shadow: var(--skugga-vila);
    min-height: 48px;
    transition: transform 160ms var(--in);
}
.live-chip:hover { transform: translateY(-1px); }
.live-chip-icon { font-size: 18px; line-height: 1; }
.live-chip-value { font-weight: 600; color: var(--gullmarn-deep); }

/* SEKTIONER */
.section { padding: 28px 20px 8px; }
.section-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-xl);
    color: var(--gullmarn-deep);
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.section-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 16px; gap: 12px;
}
.section-header .section-title { margin-bottom: 0; }
.cta-link {
    font-size: var(--t-sm); font-weight: 600;
    color: var(--gullmarn);
    white-space: nowrap;
    padding: 8px; margin: -8px;
    border-radius: var(--r-sm);
    min-height: 44px;
    display: inline-flex; align-items: center;
}
.cta-link:hover { background: var(--gullmarn-soft); }

/* HITTA SNABBT */
.quick-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.quick-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
    padding: 20px;
    height: 124px;
    border-radius: var(--r-md);
    background: var(--skum);
    color: var(--gullmarn-deep);
    text-align: left;
    transition: transform 180ms var(--in), box-shadow 180ms var(--in);
}
.quick-tile.alt { background: var(--sand-mjuk); }
.quick-tile:hover { transform: translateY(-2px); box-shadow: var(--skugga-vila); }
.quick-tile-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--snacka);
    border-radius: var(--r-sm);
    color: var(--gullmarn);
}
.quick-tile-icon svg { width: 24px; height: 24px; stroke-width: 2; }
.quick-tile-label { font-size: var(--t-md); font-weight: 600; line-height: 1.25; }

/* SCROLL-RAD (events) */
.scroll-area .section-header { padding: 28px 20px 0; margin-bottom: 16px; }
.scroll-row {
    display: flex; gap: 14px;
    overflow-x: auto;
    padding: 0 20px 8px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}
.scroll-row::-webkit-scrollbar { display: none; }
.event-card {
    flex-shrink: 0; width: 280px;
    background: var(--snacka);
    border: 1px solid var(--linje-mjuk);
    border-radius: var(--r-md);
    overflow: hidden;
    text-align: left;
    scroll-snap-align: start;
    transition: transform 180ms var(--in), box-shadow 180ms var(--in);
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--skugga-vila); }
.event-card:active { transform: translateY(1px) scale(0.99); box-shadow: none; }
.event-card-image {
    height: 160px;
    background-size: cover; background-position: center;
    background-color: var(--sand);
    position: relative;
}
.event-card-tag {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--gullmarn-deep);
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: var(--t-xs); font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.event-card-body { padding: 14px 16px 18px; }
.event-card-date {
    font-size: var(--t-xs); font-weight: 600;
    color: var(--granit);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.event-card-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-lg);
    line-height: 1.2;
    color: var(--gullmarn-deep);
    margin-bottom: 6px;
}
.event-card-desc { font-size: var(--t-sm); color: var(--text-mjuk); line-height: 1.5; }

/* TIPS */
.tip-stack { display: flex; flex-direction: column; gap: 14px; }
.tip-card {
    display: grid; grid-template-columns: 110px 1fr; gap: 16px;
    background: var(--snacka);
    border: 1px solid var(--linje-mjuk);
    border-radius: var(--r-md);
    overflow: hidden;
    text-align: left;
    transition: transform 180ms var(--in), box-shadow 180ms var(--in);
}
.tip-card:hover { transform: translateY(-2px); box-shadow: var(--skugga-vila); }
.tip-card:active { transform: translateY(1px) scale(0.99); box-shadow: none; }
.tip-card-image {
    background-size: cover; background-position: center;
    background-color: var(--sand);
    min-height: 120px;
}
.tip-card-body {
    padding: 14px 16px 14px 0;
    display: flex; flex-direction: column; justify-content: center;
}
.tip-card-tag {
    font-size: var(--t-xs); font-weight: 600;
    color: var(--gullmarn);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.tip-card-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-lg);
    line-height: 1.2; color: var(--gullmarn-deep);
    margin-bottom: 4px;
}
.tip-card-meta { font-size: var(--t-sm); color: var(--text-mjuk); }

/* STORY */
.story-card {
    background: var(--gullmarn-deep);
    color: var(--snacka);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 14px;
    display: block;
    text-align: left;
    width: 100%;
}
.story-card:last-child { margin-bottom: 0; }
.story-card-image { height: 180px; background-size: cover; background-position: center; }
.story-card-body { padding: 18px 20px 22px; }
.story-card-kicker {
    font-size: var(--t-xs); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em;
    opacity: 0.7; margin-bottom: 8px;
}
.story-card-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-xl);
    line-height: 1.2; margin-bottom: 8px;
}
.story-card-excerpt { font-size: var(--t-md); line-height: 1.5; opacity: 0.9; }

.wave-divider { display: block; width: 100%; height: 24px; margin: 16px 0 0; color: var(--sand); }
.bottom-pad { height: 100px; }

/* KARTA */
#tab-map.active { display: flex; flex-direction: column; height: 100%; }
.map-toolbar {
    background: var(--snacka);
    border-bottom: 1px solid var(--linje-mjuk);
    padding: 12px 16px;
    flex-shrink: 0;
}
.filter-row {
    display: flex; gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 16px;
    border-radius: var(--r-pill);
    background: var(--skum);
    color: var(--gullmarn-deep);
    font-size: var(--t-sm); font-weight: 600;
    border: 1px solid transparent;
    transition: all 160ms var(--in);
}
.filter-chip svg { width: 18px; height: 18px; }
.filter-chip:hover { background: var(--gullmarn-soft); }
.filter-chip.active { background: var(--gullmarn); color: var(--snacka); }
.map-stage { flex: 1; position: relative; background: var(--skum); }
#map { width: 100%; height: 100%; }
.map-fab {
    position: absolute;
    right: 16px; bottom: 24px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--snacka);
    color: var(--gullmarn-deep);
    box-shadow: var(--skugga-svav);
    display: flex; align-items: center; justify-content: center;
    z-index: 400;
}
.map-fab svg { width: 24px; height: 24px; }
.map-fab:hover { background: var(--gullmarn-soft); }

.custom-marker {
    width: 36px; height: 36px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(15,46,58,0.30);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px;
}
.custom-marker > * { transform: rotate(45deg); }

.poi-sheet {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: var(--snacka);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(15,46,58,0.18);
    z-index: 500;
    transform: translateY(100%);
    transition: transform 280ms var(--in);
    padding-bottom: 20px;
    max-height: 75%;
    overflow-y: auto;
}
.poi-sheet.open { transform: translateY(0); }
.poi-handle {
    width: 44px; height: 5px;
    background: var(--linje);
    border-radius: var(--r-pill);
    margin: 10px auto 0;
}
.poi-close {
    position: absolute;
    top: 12px; right: 14px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--skum);
    color: var(--text-dim);
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.poi-close:hover { background: var(--sand); }
.poi-close svg { width: 18px; height: 18px; }
.poi-image {
    width: 100%; height: 200px;
    background-size: cover; background-position: center;
    background-color: var(--sand);
    margin-top: 12px;
}
.poi-body { padding: 18px 20px 4px; }
.poi-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--gullmarn-soft); color: var(--gullmarn-deep);
    padding: 4px 10px; border-radius: var(--r-pill);
    font-size: var(--t-xs); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 10px;
}
.poi-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-xl);
    color: var(--gullmarn-deep); line-height: 1.2;
    margin-bottom: 8px;
}
.poi-desc {
    font-size: var(--t-md); color: var(--text-mjuk);
    line-height: 1.55; margin-bottom: 14px;
}
.poi-meta {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    margin-bottom: 18px;
}
.poi-meta-item {
    background: var(--skum);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    font-size: var(--t-sm);
}
.poi-meta-label {
    font-size: var(--t-xs);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}
.poi-meta-value { font-weight: 600; color: var(--gullmarn-deep); }
.poi-actions {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    padding: 0 20px;
}
.poi-action-btn {
    height: 56px;
    border-radius: var(--r-md);
    background: var(--gullmarn);
    color: var(--snacka);
    font-size: var(--t-sm); font-weight: 600;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
}
.poi-action-btn.secondary { background: var(--skum); color: var(--gullmarn-deep); }
.poi-action-btn svg { width: 20px; height: 20px; margin-bottom: 2px; }

/* ÄTA / LISTA */
.eat-header { padding: 20px 20px 8px; }
.list-section { padding: 4px 20px 24px; }

.list-card {
    display: flex; gap: 16px;
    background: var(--snacka);
    border: 1px solid var(--linje-mjuk);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 12px;
    text-align: left;
    width: 100%;
    transition: transform 180ms var(--in), box-shadow 180ms var(--in);
}
.list-card:hover { transform: translateY(-1px); box-shadow: var(--skugga-vila); }
.list-card:active { transform: translateY(1px) scale(0.99); box-shadow: none; }
.list-card-image {
    width: 120px; flex-shrink: 0;
    background-size: cover; background-position: center;
    background-color: var(--sand);
}
.list-card-body {
    flex: 1;
    padding: 14px 16px 14px 0;
    display: flex; flex-direction: column; justify-content: center;
}
.list-card-kicker {
    font-size: var(--t-xs); font-weight: 600;
    color: var(--granit);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.list-card-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-lg);
    line-height: 1.2;
    color: var(--gullmarn-deep);
    margin-bottom: 4px;
}
.list-card-desc {
    font-size: var(--t-sm); color: var(--text-mjuk);
    line-height: 1.5; margin-bottom: 8px;
}
.list-card-meta {
    font-size: var(--t-sm); color: var(--text-dim);
    display: flex; flex-wrap: wrap;
    gap: 4px 12px;
}
.list-card-meta strong { color: var(--gullmarn-deep); font-weight: 600; }
.access-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--tang-soft); color: var(--tang);
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-size: var(--t-xs); font-weight: 600;
}

/* RESA */
.transit-hero {
    background: linear-gradient(135deg, var(--gullmarn) 0%, var(--gullmarn-deep) 100%);
    color: var(--snacka);
    border-radius: var(--r-md);
    padding: 22px 24px 24px;
    margin: 20px 20px 8px;
    box-shadow: var(--skugga-vila);
}
.transit-hero-label {
    font-size: var(--t-xs);
    text-transform: uppercase; letter-spacing: 0.1em;
    opacity: 0.8; margin-bottom: 8px;
}
.transit-hero-name {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-lg);
    margin-bottom: 14px;
}
.transit-hero-time {
    font-family: var(--font-display);
    font-weight: 500; font-size: 56px;
    line-height: 1; letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.transit-hero-time small {
    font-family: var(--font-ui);
    font-weight: 500; font-size: var(--t-md);
    opacity: 0.85; margin-left: 4px;
}
.transit-hero-meta { font-size: var(--t-sm); opacity: 0.85; }

.transit-card {
    background: var(--snacka);
    border: 1px solid var(--linje-mjuk);
    border-radius: var(--r-md);
    padding: 18px 20px;
    margin: 10px 20px;
}
.transit-card-head {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 12px;
}
.transit-card-icon {
    width: 44px; height: 44px;
    border-radius: var(--r-sm);
    background: var(--gullmarn-soft);
    color: var(--gullmarn);
    display: flex; align-items: center; justify-content: center;
}
.transit-card-icon svg { width: 24px; height: 24px; }
.transit-card-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-lg);
    color: var(--gullmarn-deep);
    line-height: 1.2;
}
.transit-card-sub { font-size: var(--t-sm); color: var(--text-mjuk); }
.transit-times {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin-bottom: 12px;
}
.transit-time {
    background: var(--skum);
    border-radius: var(--r-sm);
    padding: 10px;
    text-align: center;
    font-size: var(--t-md); font-weight: 600;
    color: var(--gullmarn-deep);
}
.transit-time.next { background: var(--gullmarn); color: var(--snacka); }
.transit-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
    height: 48px; padding: 0 18px;
    border-radius: var(--r-md);
    background: var(--gullmarn);
    color: var(--snacka);
    font-size: var(--t-sm); font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    min-width: 0;
}
.btn.secondary { background: var(--skum); color: var(--gullmarn-deep); }
.btn.full { width: 100%; height: 56px; }
.btn svg { width: 18px; height: 18px; }
.btn.danger { background: var(--korall); }

/* HAV & BAD */
.sea-hero {
    background: linear-gradient(160deg, #2A6175 0%, var(--gullmarn) 100%);
    color: var(--snacka);
    padding: 24px 24px 28px;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    margin-bottom: 16px;
}
.sea-hero-kicker {
    font-size: var(--t-xs);
    text-transform: uppercase; letter-spacing: 0.1em;
    opacity: 0.8; margin-bottom: 8px;
}
.sea-hero-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-2xl);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.sea-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sea-stat-label {
    font-size: var(--t-xs);
    text-transform: uppercase; letter-spacing: 0.06em;
    opacity: 0.75; margin-bottom: 2px;
}
.sea-stat-value {
    font-family: var(--font-display);
    font-weight: 500; font-size: 28px;
    line-height: 1;
}
.sea-stat-value small {
    font-family: var(--font-ui);
    font-size: var(--t-sm);
    margin-left: 4px; opacity: 0.85;
}

.alg-flag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: var(--t-xs); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.alg-flag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.alg-flag.gron { background: var(--tang-soft); color: var(--tang); }
.alg-flag.gron::before { background: var(--tang); }
.alg-flag.gul { background: #F7EAD0; color: #8C6614; }
.alg-flag.gul::before { background: var(--barnsten); }
.alg-flag.rod { background: #F4D9D5; color: #882C22; }
.alg-flag.rod::before { background: var(--korall); }

.beach-temp {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-2xl);
    color: var(--gullmarn-deep);
    line-height: 1;
}
.beach-temp small {
    font-family: var(--font-ui);
    font-size: var(--t-md); color: var(--text-mjuk);
    font-weight: 400;
}

.harbor-card {
    margin: 10px 20px;
    background: var(--gullmarn-deep);
    color: var(--snacka);
    border-radius: var(--r-md);
    padding: 22px 24px;
}
.harbor-status-row {
    display: flex; align-items: baseline; gap: 14px;
    margin: 14px 0 18px;
}
.harbor-big {
    font-family: var(--font-display);
    font-weight: 500; font-size: 48px;
    line-height: 1; letter-spacing: -0.02em;
}
.harbor-sub { opacity: 0.85; font-size: var(--t-md); }
.harbor-services {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 18px;
}
.harbor-services span {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: var(--t-xs); font-weight: 500;
}

/* MER */
.more-group { padding: 16px 20px 8px; }
.more-group-label {
    font-size: var(--t-xs); font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 10px;
    padding: 0 4px;
}
.more-list {
    background: var(--snacka);
    border: 1px solid var(--linje-mjuk);
    border-radius: var(--r-md);
    overflow: hidden;
}
.more-item {
    display: flex; align-items: center; gap: 14px;
    width: 100%;
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid var(--linje-mjuk);
    min-height: 60px;
    font-size: var(--t-md);
    color: var(--text-mork);
}
.more-item:last-child { border-bottom: none; }
.more-item:hover { background: var(--skum); }
.more-item-icon {
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    background: var(--gullmarn-soft);
    color: var(--gullmarn);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.more-item-icon svg { width: 20px; height: 20px; }
.more-item-text { flex: 1; font-weight: 500; }
.more-item-chevron { color: var(--text-dim); flex-shrink: 0; }

/* SUB-PAGE */
.sub-page {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    bottom: var(--tabbar-h);
    background: var(--snacka);
    z-index: 30;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(.25,.8,.25,1);
    will-change: transform;
    display: flex;
    flex-direction: column;
}
.sub-page.open { transform: translateX(0); }
.sub-page-header-img {
    height: 240px;
    background-size: cover; background-position: center;
    background-color: var(--gullmarn-deep);
    position: relative;
    flex-shrink: 0;
}
.sub-page-header-img::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,46,58,0.5) 0%, rgba(15,46,58,0.0) 35%, rgba(15,46,58,0.0) 55%, rgba(15,46,58,0.65) 100%);
}
.sub-back {
    position: absolute; top: 16px; left: 16px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    color: var(--gullmarn-deep);
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.sub-page-title-wrap {
    position: absolute; bottom: 16px; left: 20px; right: 20px;
    color: var(--snacka); z-index: 1;
}
.sub-kicker {
    font-size: var(--t-xs);
    text-transform: uppercase; letter-spacing: 0.1em;
    opacity: 0.85; margin-bottom: 4px;
}
.sub-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-2xl);
    letter-spacing: -0.02em; line-height: 1.1;
}
.sub-page-body { padding: 20px 20px 40px; flex: 1; }
.sub-meta-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-bottom: 20px;
}
.sub-meta-card {
    background: var(--skum);
    border-radius: var(--r-md);
    padding: 14px;
}
.sub-meta-card-label {
    font-size: var(--t-xs);
    color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.sub-meta-card-value {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-lg);
    color: var(--gullmarn-deep);
}
.sub-paragraph {
    font-size: var(--t-md);
    color: var(--text-mork);
    line-height: 1.6;
    margin-bottom: 16px;
}
.sub-h3 {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-xl);
    color: var(--gullmarn-deep);
    margin: 24px 0 12px;
}
.info-row {
    display: flex; gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--linje-mjuk);
}
.info-row:last-child { border-bottom: none; }
.info-row-icon {
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    background: var(--gullmarn-soft);
    color: var(--gullmarn);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.info-row-icon svg { width: 20px; height: 20px; }
.info-row-text { flex: 1; }
.info-row-label {
    font-size: var(--t-xs);
    color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 2px;
}
.info-row-value {
    font-size: var(--t-md);
    color: var(--text-mork);
    font-weight: 500;
}
.cta-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* FELANMÄLAN */
.report-step { padding: 16px 20px 32px; }
.report-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.report-dot {
    flex: 1; height: 4px;
    background: var(--linje);
    border-radius: var(--r-pill);
}
.report-dot.done, .report-dot.active { background: var(--gullmarn); }
.report-h {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-xl);
    color: var(--gullmarn-deep);
    margin-bottom: 8px;
}
.report-sub {
    font-size: var(--t-md);
    color: var(--text-mjuk);
    margin-bottom: 20px;
    line-height: 1.5;
}
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice-tile {
    display: flex; align-items: center; gap: 14px;
    width: 100%;
    padding: 16px 18px;
    background: var(--snacka);
    border: 1px solid var(--linje);
    border-radius: var(--r-md);
    text-align: left;
    min-height: 64px;
    font-size: var(--t-md); font-weight: 500;
    color: var(--text-mork);
    transition: all 160ms var(--in);
}
.choice-tile:hover, .choice-tile.selected {
    border-color: var(--gullmarn);
    background: var(--gullmarn-soft);
}
.choice-tile-icon {
    width: 40px; height: 40px;
    border-radius: var(--r-sm);
    background: var(--gullmarn-soft);
    color: var(--gullmarn);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.choice-tile.selected .choice-tile-icon { background: var(--gullmarn); color: var(--snacka); }
.choice-tile-icon svg { width: 22px; height: 22px; }

.report-input, .report-textarea {
    width: 100%;
    border: 1px solid var(--linje);
    border-radius: var(--r-md);
    padding: 14px 16px;
    font-size: var(--t-md);
    font-family: var(--font-ui);
    color: var(--text-mork);
    background: var(--snacka);
    margin-bottom: 12px;
    min-height: 56px;
}
.report-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.report-input:focus, .report-textarea:focus {
    outline: none;
    border-color: var(--gullmarn);
    box-shadow: 0 0 0 3px var(--gullmarn-soft);
}
.report-actions { margin-top: 20px; display: flex; gap: 10px; }
.report-photo-drop {
    border: 2px dashed var(--linje);
    border-radius: var(--r-md);
    padding: 32px 20px;
    text-align: center;
    color: var(--text-mjuk);
    background: var(--skum);
    margin-bottom: 12px;
}
.report-photo-drop svg {
    width: 32px; height: 32px;
    color: var(--gullmarn);
    margin-bottom: 8px;
}
.report-photo-drop-title {
    font-size: var(--t-md); font-weight: 600;
    color: var(--gullmarn-deep);
    margin-bottom: 4px;
}
.report-success { text-align: center; padding: 60px 32px; }
.report-success-mark {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--tang-soft); color: var(--tang);
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
}
.report-success-mark svg { width: 40px; height: 40px; stroke-width: 2.5; }
.report-success-title {
    font-family: var(--font-display);
    font-weight: 500; font-size: var(--t-2xl);
    color: var(--gullmarn-deep);
    margin-bottom: 12px;
}
.report-success-id {
    background: var(--skum);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    font-family: ui-monospace, monospace;
    font-size: var(--t-md);
    color: var(--gullmarn-deep);
    display: inline-block;
    margin: 8px 0 16px;
}
.report-success-text {
    font-size: var(--t-md);
    color: var(--text-mjuk);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* INSTÄLLNINGAR */
.setting-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--linje-mjuk);
    min-height: 60px;
    gap: 16px;
}
.setting-row:last-child { border-bottom: none; }
.setting-label {
    font-size: var(--t-md);
    color: var(--text-mork);
    font-weight: 500;
}
.setting-sub {
    font-size: var(--t-sm);
    color: var(--text-dim);
    margin-top: 2px;
}
.choice-pills {
    display: inline-flex;
    background: var(--skum);
    border-radius: var(--r-pill);
    padding: 4px;
    gap: 2px;
}
.choice-pill {
    padding: 8px 14px;
    border-radius: var(--r-pill);
    font-size: var(--t-sm); font-weight: 600;
    color: var(--text-mjuk);
    min-height: 36px;
    display: inline-flex; align-items: center;
}
.choice-pill.active { background: var(--gullmarn); color: var(--snacka); }

.switch {
    position: relative;
    width: 52px; height: 30px;
    background: var(--linje);
    border-radius: var(--r-pill);
    transition: background 200ms var(--in);
    flex-shrink: 0;
}
.switch::after {
    content: '';
    position: absolute; top: 3px; left: 3px;
    width: 24px; height: 24px;
    background: var(--snacka);
    border-radius: 50%;
    transition: transform 200ms var(--in);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.switch.on { background: var(--gullmarn); }
.switch.on::after { transform: translateX(22px); }

/* BOTTEN-TABBAR */
.bottom-tabs {
    flex-shrink: 0;
    display: flex;
    background: var(--snacka);
    border-top: 1px solid var(--linje-mjuk);
    padding: 6px 4px 14px;
    box-shadow: 0 -6px 24px rgba(15,46,58,0.08);
    z-index: 40;
    position: relative;
}
.tab-btn {
    flex: 1;
    display: flex; flex-direction: column; align-items: center;
    gap: 4px;
    padding: 8px 2px;
    color: var(--text-dim);
    min-height: 56px;
    border-radius: var(--r-sm);
    transition: color 160ms var(--in);
}
.tab-btn svg {
    width: 22px; height: 22px;
    stroke-width: 2;
}
.tab-btn span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.tab-btn.active { color: var(--gullmarn); }
.tab-btn.active svg {
    fill: currentColor;
    fill-opacity: 0.18;
    stroke-width: 2.2;
}
.tab-btn:hover { color: var(--gullmarn-deep); }

/* TOAST */
.toast {
    position: absolute;
    bottom: 100px; left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--gullmarn-deep);
    color: var(--snacka);
    padding: 14px 20px;
    border-radius: var(--r-pill);
    font-size: var(--t-sm); font-weight: 500;
    box-shadow: var(--skugga-svav);
    z-index: 1000;
    transition: transform 280ms var(--in), opacity 200ms var(--in);
    max-width: calc(100% - 40px);
    white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    opacity: 0;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* HÖGKONTRAST */
[data-contrast="hog"] {
    --skum: #F0F0F0;
    --sand: #E0E0E0;
    --sand-mjuk: #EAEAEA;
    --linje: #888;
    --linje-mjuk: #BBB;
    --text-mjuk: #1A1A1A;
    --text-dim: #333;
    --gullmarn: #003A4C;
    --gullmarn-deep: #001E2A;
}

/* REDUCE-MOTION */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
[data-motion="reduced"] *,
[data-motion="reduced"] *::before,
[data-motion="reduced"] *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
}

/* Hjälp-utility */
.hidden { display: none !important; }
