/* Verdal Frisbeeklubb – stil. Fonter ligger lokalt (ingen Google Fonts → ingen IP-lekkasje til tredjepart). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../vendor/fonts/inter-latin-wght-normal.woff2') format('woff2-variations'), url('../vendor/fonts/inter-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../vendor/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations'), url('../vendor/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); }

:root {
  --navy: #12385C; --blue: #1F5E8E; --sky: #9CC0DD; --pale: #E1ECF5; --bg: #F2F5F8; --card: #FFFFFF;
  --ink: #14202B; --ink2: #36424E; --muted: #566270; --line: #DCE3EA; --line2: #C3CDD8;
  --accent: #C2410C; --ok: #1F7A5C; --okbg: #E3F3EC; --warn: #9A3412; --warnbg: #FDEBDD; --err: #B42318; --errbg: #FDECEA;
  --r: 16px; --head: 'Space Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #E4EAF0; color: var(--ink); font: 400 16px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--blue); } a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; line-height: 1.2; }
h2 { font-size: 18px; } h3 { font-size: 16px; } h4 { font-size: 14px; margin: 10px 0 4px; }
p { margin: 0 0 10px; } ul { margin: 0 0 10px; padding-left: 20px; } li { margin: 3px 0; }
ul.plain { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; } .skip:focus { left: 8px; top: 8px; }

/* ---------- ramme ---------- */
.app { max-width: 640px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); box-shadow: 0 0 40px rgba(18, 56, 92, .12); }
.demo-banner { background: #FEF3C7; color: #7C2D12; font-size: 13px; text-align: center; padding: 6px 12px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); background: var(--navy); color: #fff; }
.logo { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--navy); display: grid; place-items: center; flex: none; }
.brand { min-width: 0; text-decoration: none; color: #fff; display: block; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 13px; color: #CFE0EE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--pale); color: var(--navy); padding: 6px 10px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.role-badge:hover { color: var(--navy); background: #fff; }
main { flex: 1; padding: 18px 16px 24px; outline: none; }
.view { display: flex; flex-direction: column; gap: 14px; }
.bottom-nav { position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 56px; }
.bottom-nav a[aria-current] { color: var(--navy); } .bottom-nav a[aria-current] .ico { stroke-width: 2.3; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: min(92vw, 520px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.err { background: var(--err); }

/* ---------- tekst ---------- */
.page-h { font-size: 24px; } .sec-h { font-size: 18px; margin: 6px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .xs { font-size: 12px; } .b { font-weight: 600; } .center { text-align: center; } .mt4 { margin-top: 4px; } .grow { flex: 1; min-width: 0; }
.back { align-self: flex-start; text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 0; }
.link-btn { border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px 0; text-decoration: none; }
.prose h3 { margin-top: 14px; }

/* ---------- knapper ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 11px 16px; min-height: 46px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: var(--navy); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; } .btn-accent:hover { background: #9A3412; color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--blue); } .btn-ghost:hover { background: var(--pale); }
.btn-light { background: #fff; color: var(--navy); } .btn-light:hover { background: var(--pale); color: var(--navy); }
.btn-outline-light { background: transparent; color: #fff; border-color: var(--sky); } .btn-outline-light:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.btn-danger { background: var(--err); color: #fff; }
.btn-block { display: flex; width: 100%; } .btn-block.left { justify-content: flex-start; text-align: left; }
.btn-sm { min-height: 38px; padding: 7px 12px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 10px; border-radius: 10px; min-width: 44px; min-height: 44px; display: grid; place-items: center; } .icon-btn:hover { background: var(--pale); color: var(--err); }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- kort ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.card > * { margin-top: 0; margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.card-dark { background: var(--navy); color: #fff; border-color: var(--navy); } .card-dark a:not(.btn) { color: #fff; }
.hero { background: var(--blue); color: #fff; border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.hero h1 { font-size: 26px; } .hero p { color: var(--pale); margin: 0; }
.banner { display: flex; align-items: center; gap: 14px; background: var(--pale); color: var(--navy); border-radius: var(--r); padding: 16px; text-decoration: none; } .banner:hover { color: var(--navy); background: #D3E4F2; }
.banner-hide { text-align: right; margin-top: 2px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--ink); min-height: 104px; } .tile .ico { color: var(--blue); } .tile:hover { border-color: var(--blue); color: var(--ink); }
.row-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; color: var(--ink); text-decoration: none; }
.row-card.col { flex-direction: column; align-items: stretch; gap: 6px; }
.row-card.link:hover { border-color: var(--blue); color: var(--ink); }
.row-title { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.datebox { flex: none; width: 56px; text-align: center; background: var(--pale); color: var(--navy); border-radius: 12px; padding: 8px 0; }
.datebox-t { font-family: var(--head); font-weight: 700; font-size: 18px; }
.empty { background: #fff; border: 1px dashed var(--line2); border-radius: var(--r); padding: 18px; text-align: center; color: var(--muted); margin-bottom: 10px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 1.5; vertical-align: middle; white-space: nowrap; }
.pill-dark { background: var(--navy); color: #fff; } .pill-soft { background: var(--pale); color: var(--navy); } .pill-ok { background: var(--okbg); color: var(--ok); } .pill-warn { background: var(--warnbg); color: var(--warn); }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; background: #fff; border: 1px solid var(--line); }
.notice-info { background: var(--pale); border-color: #C9DDEE; color: var(--navy); } .notice-ok { background: var(--okbg); border-color: #BFE3D3; color: #14573F; } .notice-err { background: var(--errbg); border-color: #F5C6C1; color: #7A1A12; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid #E8EDF2; } .kv:first-of-type { border-top: 0; }
.inset { background: var(--bg); border-radius: 12px; padding: 12px 14px; } .inset-dark { background: var(--blue); border-radius: 12px; padding: 14px; line-height: 1.6; }
.sponsor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sponsor { height: 60px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: #47525E; font-weight: 600; font-size: 14px; text-decoration: none; text-align: center; padding: 4px 8px; }
a.sponsor:hover { border-color: var(--blue); color: var(--navy); }

/* ---------- vær ---------- */
.wx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wx { background: var(--bg); border-radius: 12px; padding: 10px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--blue); } .wx .small, .wx .xs { color: var(--muted); }
.wx-t { font-family: var(--head); font-weight: 700; font-size: 17px; color: var(--ink); }

/* ---------- banen ---------- */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line2); border-radius: 12px; padding: 3px; gap: 3px; align-self: flex-start; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 600; cursor: pointer; min-height: 40px; color: var(--ink2); } .seg button.on { background: var(--navy); color: #fff; }
.hole-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.hole { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; min-height: 60px; } .hole.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.hole-n { font-family: var(--head); font-size: 20px; font-weight: 700; line-height: 1.1; }
.hole-img { border-radius: 12px; width: 100%; height: auto; }
.facts { display: flex; gap: 12px; margin: 0; } .facts div { background: var(--bg); border-radius: 12px; padding: 8px 14px; } .facts dt { font-size: 12px; color: var(--muted); } .facts dd { margin: 0; font-family: var(--head); font-weight: 700; font-size: 20px; }

/* ---------- trekkspill ---------- */
.acc { background: #fff; border: 1px solid var(--line); border-radius: 14px; } .acc > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; min-height: 52px; list-style: none; display: flex; justify-content: space-between; align-items: center; } .acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: '+'; color: var(--blue); font-weight: 700; font-size: 20px; } .acc[open] > summary::after { content: '−'; }
.acc-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.terms { margin: 0; } .terms div { padding: 8px 0; border-bottom: 1px solid #E8EDF2; } .terms dt { font-weight: 600; } .terms dd { margin: 2px 0 0; color: var(--ink2); font-size: 14px; }
.disc { display: flex; gap: 12px; margin: 8px 0; } .disc-dot { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.item { padding: 8px 0; border-top: 1px solid #E8EDF2; } .item p { margin: 4px 0 0; }

/* ---------- skjema ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 14px; padding: 0; }
.field input, .field select, .field textarea, .search { width: 100%; padding: 11px 12px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; min-height: 46px; }
.field textarea { resize: vertical; } .hint { font-size: 12.5px; color: var(--muted); }
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; } .radio input, .check input { width: 20px; height: 20px; flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form.compact { gap: 8px; padding: 12px; }
.search { flex: 1; min-width: 180px; }

/* ---------- medlem / styre ---------- */
.subtabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.subtabs a { flex: none; padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line2); color: var(--navy); font-weight: 600; font-size: 14px; text-decoration: none; min-height: 40px; display: grid; place-items: center; }
.subtabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); } .subtabs a.board { background: var(--pale); } .subtabs a.back-m { background: transparent; border-color: transparent; color: var(--muted); }
.bar { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg); overflow: hidden; margin: 6px 0; z-index: 0; } .bar span { position: relative; z-index: 1; } .bar-fill { position: absolute; inset: 0 auto 0 0; background: #CFE0EE; z-index: 0; }
.chat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; height: 52vh; min-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.msg { position: relative; align-self: flex-start; max-width: 85%; background: var(--bg); border-radius: 14px; padding: 8px 12px; word-wrap: anywhere; } .msg.mine { align-self: flex-end; background: var(--pale); }
.msg-meta { font-size: 12px; color: var(--muted); } .msg-del { position: absolute; top: 2px; right: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; } .chat-form textarea { flex: 1; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; resize: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; } .stats strong { font-family: var(--head); font-size: 24px; } .stats span { font-size: 12px; color: var(--muted); }
.person { align-items: stretch; gap: 10px; } .person .small, .person .muted { word-break: break-all; }
.person-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; } .person-actions select { padding: 8px; border: 1px solid var(--line2); border-radius: 10px; min-height: 38px; background: #fff; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; align-self: flex-start; }
code { background: var(--bg); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 380px) { .tiles { grid-template-columns: 1fr; } .two { grid-template-columns: 1fr; } }
@media print { .topbar, .bottom-nav, .demo-banner { display: none; } body { background: #fff; } .app { box-shadow: none; } }
