/* Velferdsappen — delt designsystem. Fargar og skrifter kjem frå tema/<tema>.css (servert som /tema.css), strukturen er felles. */

/* Inter og JetBrains Mono (SIL OFL 1.1) ligg på vår eigen server som reserve: ingen forbindelse til Google,
   så besøkjande sin IP-adresse går ikkje til tredjepart (GDPR, LG München 3 O 17493/20). */
@font-face { font-family:"Inter"; src:url("./assets/fonts/inter-latin-ext.woff2") format("woff2"); font-weight:400 800; font-style:normal; font-display:swap; unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family:"Inter"; src:url("./assets/fonts/inter-latin.woff2") format("woff2"); font-weight:400 800; font-style:normal; font-display:swap; unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family:"JetBrains Mono"; src:url("./assets/fonts/jetbrainsmono-latin-ext.woff2") format("woff2"); font-weight:400 500; font-style:normal; font-display:swap; unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family:"JetBrains Mono"; src:url("./assets/fonts/jetbrainsmono-latin.woff2") format("woff2"); font-weight:400 500; font-style:normal; font-display:swap; unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

* { box-sizing: border-box; margin: 0; padding: 0; touch-action: manipulation; }
html { scroll-behavior: smooth; background: var(--bg); }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
body { font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.4; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; animation: page-in .15s ease; }
body > footer.site { margin-top: auto; }
::selection { background: var(--red); color: #fff; }
h1,h2,h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; font-weight: var(--display-weight); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* viewport-fit=cover: innhaldet held seg unna hakket i liggjande format, bakgrunnane går til kanten */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 max(32px, env(safe-area-inset-right)) 0 max(32px, env(safe-area-inset-left)); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; padding: 13px 24px; border-radius: var(--r-btn); border: var(--btn-border) solid transparent; cursor: pointer; transition: .15s; font-family: var(--body); }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-outline { background:#fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn.is-on { background: var(--ink); color:#fff; }

/* ---------- Header ---------- */
header.site { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 22px; width: auto; }
.foot-logo { height: 30px; width: auto; margin-top: 24px; opacity: .95; }
.brand-ordmerke { font-family: "Bricolage Grotesque", var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; color: var(--ink); }
/* Ordmerket tek for mykje av toppmenyen under 1180 px: då står berre klubbnamnet. */
@media (max-width: 1180px) { .brand-ordmerke, .brand-ordmerke + .brand-sep { display: none; } }
.brand-sep { width: 1px; height: 24px; background: var(--line); flex: none; }
.brand .name { font-family: var(--display); font-weight: var(--display-weight); font-size: 16px; letter-spacing: -0.01em; color: var(--ink); }
.brand .sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); display: block; margin-top: 1px; }
nav.menu { display: flex; gap: 28px; }
nav.menu a { font-size: 14px; font-weight: 500; color: var(--ink); padding: 6px 0; position: relative; transition: color .15s; }
nav.menu a:hover { color: var(--red); }
nav.menu a.active { color: var(--red); }
nav.menu a.active::after { content:""; position:absolute; left:0; right:0; bottom:-4px; height:2px; background: var(--red); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-select { font-family: var(--body); font-size: 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding-block: 7px; background-color: #fff; cursor: pointer; }
.lang-select:hover { border-color: var(--red); }

/* ---------- Profile chip + dropdown ---------- */
.profile { position: relative; }
.auth-btns { align-items:center; gap:16px; }
.auth-login { font-size:14px; font-weight:600; color:var(--ink); }
.auth-login:hover { color:var(--red); }
.auth-register { font-size:14px; padding:10px 20px; }
.chip { display:flex; align-items:center; gap:10px; font-size:13px; background:none; border:0; cursor:pointer; padding:4px; border-radius:8px; }
.chip:hover { background: var(--bg-soft); }
.avatar { width:32px; height:32px; border-radius:50%; background:var(--black); color:#fff; display:grid; place-items:center; font-weight:700; font-size:12px; flex:none; }
.chip .meta { text-align:left; }
.chip .meta b { display:block; font-weight:600; color:var(--ink); }
.chip .meta span { color:var(--grey); font-size:11px; }
.dropdown { position:absolute; right:0; top:calc(100% + 10px); width:300px; background:#fff; border:1px solid var(--line); border-radius:var(--r-panel); box-shadow:var(--shadow-pop); padding:18px; display:none; z-index:80; }
.dropdown.open { display:block; }
.dropdown .dd-head { display:flex; align-items:center; gap:12px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.dropdown .dd-tag { font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--red); }
.dropdown label { display:block; font-size:12px; color:var(--grey); margin:14px 0 6px; }
.dropdown input[type=text] { width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:6px; font-family:var(--body); font-size:16px; color:var(--ink); }
.dropdown input:focus { outline:none; border-color:var(--red); }
.dd-signups { margin-top:14px; }
.dd-signups h5 { font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--grey); margin-bottom:8px; }
.dd-signups ul { list-style:none; }
.dd-signups li { font-size:13px; padding:6px 0; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; gap:8px; }
.dd-signups li:last-child { border:0; }
.dd-empty { font-size:13px; color:var(--grey); }
.dd-reset { margin-top:14px; width:100%; font-size:13px; padding:9px; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--grey); cursor:pointer; }
.dd-reset:hover { border-color:var(--red); color:var(--red); }

/* ---------- Burger + mobile overlay ---------- */
.burger { display:none; width:44px; height:44px; border:1px solid var(--line); border-radius:8px; background:#fff; cursor:pointer; align-items:center; justify-content:center; flex-direction:column; gap:4px; }
.burger span { width:18px; height:2px; background:var(--ink); border-radius:2px; }
.overlay { position:fixed; inset:0; background:var(--black); color:#fff; z-index:200; transform:translateY(-100%); transition:transform .24s ease-out; display:flex; flex-direction:column; padding:24px 28px max(24px, env(safe-area-inset-bottom)); }
.overlay.open { transform:translateY(0); }
.overlay .ov-top { display:flex; justify-content:space-between; align-items:center; }
.overlay .ov-close { width:44px; height:44px; border:1px solid rgba(255,255,255,.3); border-radius:8px; background:none; color:#fff; font-size:22px; cursor:pointer; }
.overlay nav { margin-top:40px; display:flex; flex-direction:column; gap:4px; }
.overlay nav a { font-family:var(--display); font-size:30px; font-weight:var(--display-weight); color:#fff; padding:12px 0; display:flex; align-items:baseline; gap:14px; border-bottom:1px solid rgba(255,255,255,.1); }
.overlay nav a .num { font-family:var(--mono); font-size:12px; color:var(--red); }
.overlay nav a.active { color: var(--red); }
.overlay .ov-foot { margin-top:auto; font-size:13px; color:rgba(255,255,255,.6); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--black); color:#fff; padding:64px 0 56px; position:relative; overflow:hidden; }
.page-hero.has-img { background-size:cover; background-position:center; }
.page-hero.has-img::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,var(--herosub-a),var(--herosub-b)); z-index:0; }
.page-hero .wrap { position:relative; z-index:1; }
.page-hero h1 { font-size: clamp(34px,5vw,56px); margin-top:10px; max-width:760px; }
.page-hero p { margin-top:14px; max-width:560px; opacity:.9; font-size:17px; }
.breadcrumb { font-family:var(--mono); font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:rgba(255,255,255,.7); }
.breadcrumb a:hover { color:#fff; }

/* ---------- Front hero ---------- */
.hero { position:relative; min-height:560px; display:flex; align-items:flex-end; color:#fff;
  background:linear-gradient(180deg,var(--hero-a),var(--hero-b)), var(--black); background-size:cover; background-position:center; }
.hero .wrap { padding-top:80px; padding-bottom:56px; width:100%; }
.hero h1 { font-size: clamp(40px,6vw,76px); max-width:760px; }
.hero p { margin-top:18px; max-width:520px; font-size:18px; opacity:.92; }
.hero .cta-row { margin-top:32px; display:flex; gap:14px; flex-wrap:wrap; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { display:flex; align-items:end; justify-content:space-between; margin-bottom:40px; gap:24px; }
.section-head h2 { font-size: clamp(28px,4vw,44px); }
.section-head a.more { font-size:14px; font-weight:600; color:var(--red); white-space:nowrap; }
.bg-soft { background: var(--bg-soft); }

/* ---------- Feature ---------- */
.empty-state { grid-column:1 / -1; display:grid; place-items:center; min-height:160px; padding:32px 24px; border:1px dashed var(--line); border-radius:var(--r-card); background:var(--bg-soft); color:var(--grey); text-align:center; }
.empty-state p { margin:0; font-size:16px; }
.feature { display:grid; grid-template-columns:1.1fr 1fr; border:1px solid var(--line); border-radius:var(--r-card); overflow:hidden; background:#fff; }
.feature .img { min-height:340px; background-size:cover; background-position:center; }
.feature .body { padding:44px; display:flex; flex-direction:column; justify-content:center; }
.feature h3 { font-size:32px; margin:12px 0 8px; }
.feature .date { font-family:var(--mono); font-size:13px; color:var(--grey); }
.feature p { color:var(--grey); margin:8px 0 24px; }

/* ---------- Cards ---------- */
.grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.card { border:1px solid var(--line); border-radius:var(--r-card); overflow:hidden; background:#fff; transition:.18s; display:flex; flex-direction:column; }
.card:hover { transform:translateY(-3px); box-shadow:var(--shadow-card); border-color:#d8d8d8; }
.card .ph { height:190px; background-size:cover; background-position:center; }
.card .pad { padding:22px; flex:1; display:flex; flex-direction:column; }
.card .date { font-family:var(--mono); font-size:12px; color:var(--red); letter-spacing:.04em; }
.card h3 { font-size:20px; margin:8px 0 6px; }
.card p { color:var(--grey); font-size:14px; flex:1; }
.card .card-foot { margin-top:18px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.card .link { font-size:14px; font-weight:600; color:var(--ink); }
.card:hover .link { color:var(--red); }
.btn-sm { font-size:13px; padding:9px 16px; }

/* ---------- Offers ---------- */
.offers { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.offer { border:1px solid var(--line); border-radius:var(--r-card); padding:28px 22px; background:#fff; transition:.15s; }
.offer:hover { border-color:var(--red); }
.offer .ic { width:44px; height:44px; border-radius:8px; background:var(--bg-soft); display:grid; place-items:center; margin-bottom:16px; color:var(--black); }
.offer h3 { font-size:18px; margin-bottom:6px; }
.offer p { color:var(--grey); font-size:13px; }

/* ---------- Booking ---------- */
.booking { display:grid; grid-template-columns:280px 1fr; gap:40px; align-items:start; }
.rules { background:#fff; border:1px solid var(--line); border-radius:var(--r-card); padding:26px; }
.rules h3 { font-size:18px; margin-bottom:14px; }
.rules li { list-style:none; font-size:13px; color:var(--grey); padding:10px 0; border-bottom:1px solid var(--line); display:flex; gap:10px; }
.rules li:last-child { border:0; }
.rules li::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--red); margin-top:6px; flex:none; }
.cal { background:#fff; border:1px solid var(--line); border-radius:var(--r-card); overflow:hidden; }
.cal-head { display:flex; align-items:center; justify-content:space-between; padding:18px 24px; border-bottom:1px solid var(--line); }
.cal-head h3 { font-size:20px; }
.cal-head .navbtns button { width:34px; height:34px; border:1px solid var(--line); background:#fff; border-radius:6px; cursor:pointer; font-size:16px; }
.days { display:grid; grid-template-columns:repeat(7,1fr); }
.dow { padding:12px 8px; font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--grey); text-align:center; border-bottom:1px solid var(--line); }
.day { min-height:120px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); padding:10px; }
.day:nth-child(7n) { border-right:0; }
.day .num { font-size:13px; font-weight:600; color:var(--grey); }
.day.today { background:var(--accent-tint); }
.day.today .num { color:var(--red); }
.slot { margin-top:6px; font-size:11px; font-family:var(--mono); display:flex; justify-content:space-between; align-items:center; gap:6px; background:var(--bg-soft); border-radius:4px; padding:4px 6px; }
.slot a { color:var(--red); font-weight:600; cursor:pointer; }
.slot.booked { background:#eef0f2; color:var(--grey); }
.slot .rsv { font-family:var(--mono); font-size:10px; color:var(--grey); text-transform:uppercase; letter-spacing:.04em; }
.day.empty { background:#fafafa; }
.slot-chip { display:block; width:100%; text-align:left; margin-top:6px; font-family:var(--mono); font-size:11px; background:var(--bg-soft); border:1px solid transparent; border-radius:4px; padding:5px 7px; color:var(--ink); cursor:pointer; transition:.12s; }
button.slot-chip:hover { background:#fff; border-color:var(--red); color:var(--red); }
.slot-chip.booked { background:#eef0f2; color:var(--grey); }
button.slot-chip.booked { cursor:pointer; }
button.slot-chip.booked:hover { background:var(--accent-tint-strong); color:var(--red); }
.slot-chip.booked .chip-x { float:right; opacity:.55; }
.slot-chip.slot-locked { background:#f3f3f3; color:#c4c4c4; cursor:not-allowed; }
.slot-chip.slot-done { background:transparent; border-color:transparent; color:#c4c4c4; cursor:default; text-decoration:line-through; }
.cal-hint { font-size:12px; color:var(--grey); padding:10px 24px; border-bottom:1px solid var(--line); }
.bk-right { min-width:0; }
.res-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.res-lbl { font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--grey); margin-right:4px; }
.res-tab { display:flex; flex-direction:column; align-items:flex-start; gap:1px; background:#fff; border:1px solid var(--line); border-radius:var(--r-card); padding:9px 16px; cursor:pointer; font-family:var(--body); font-size:14px; font-weight:600; color:var(--ink); transition:.15s; }
.res-tab:hover { border-color:var(--red); }
.res-tab.active { background:var(--ink); color:#fff; border-color:var(--ink); }
.res-tab .res-cat { font-family:var(--mono); font-size:9px; font-weight:400; letter-spacing:.08em; text-transform:uppercase; opacity:.7; }
/* Booking secondary nav */
.subnav { background:#fff; border-bottom:1px solid var(--line); }
.subnav-inner { display:flex; align-items:center; gap:26px; min-height:56px; flex-wrap:wrap; }
.subnav-lbl { font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--grey); }
.subnav-tabs { display:flex; gap:4px; flex-wrap:wrap; }
.subnav-item { background:none; border:0; border-bottom:2px solid transparent; font-family:var(--body); font-weight:600; font-size:15px; color:var(--ink); padding:18px 10px 16px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:1px; line-height:1.1; }
.subnav-item:hover { color:var(--red); }
.subnav-item.active { color:var(--red); border-bottom-color:var(--red); }
.subnav-cat { font-family:var(--mono); font-size:9px; font-weight:400; letter-spacing:.08em; text-transform:uppercase; color:var(--grey); }
/* Booking — offer sidebar */
.bk-grid { display:grid; grid-template-columns:240px 1fr; gap:32px; align-items:start; }
.bk-main { min-width:0; }
.offer-side { position:sticky; top:96px; }
.offer-side-lbl { font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--grey); margin-bottom:12px; }
.offer-list { display:flex; flex-direction:column; gap:8px; max-height:72vh; overflow-y:auto; padding-right:4px; }
.offer-card { display:flex; flex-direction:column; align-items:flex-start; gap:3px; width:100%; text-align:left; background:#fff; border:1px solid var(--line); border-radius:9px; padding:13px 15px; cursor:pointer; transition:.14s; font-family:var(--body); }
.offer-card:hover { border-color:var(--red); box-shadow:var(--shadow-offer); }
.offer-card.active { background:var(--ink); border-color:var(--ink); }
.offer-card .oc-name { font-weight:600; font-size:15px; color:var(--ink); }
.offer-card .oc-cat { font-family:var(--mono); font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--grey); }
.offer-card.active .oc-name { color:#fff; }
.offer-card.active .oc-cat { color:#fff; opacity:.65; }
/* Telefon på tvers: med viewport-fit=cover ser media-spørjinga heile breidda, men innhaldet har breidda minus hakket, så telefonen får same oppsett som før (hover: none skil han frå eit lågt PC-vindauge) */
@media (max-width:820px), (hover: none) and (max-height: 500px){
  .bk-grid { grid-template-columns:minmax(0,1fr); gap:18px; }
  .offer-side { position:static; min-width:0; }
  .offer-list { flex-direction:row; overflow-x:auto; max-height:none; min-width:0; max-width:100%; padding-bottom:4px; }
  .offer-card { min-width:160px; flex:none; }
}
/* Booking layout */
.bk-wrap { max-width:1040px; margin:0 auto; }
.info-bar { background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--r-panel); padding:20px 24px; margin-bottom:26px; }
.info-bar h3 { font-size:16px; }
#bookInfo { list-style:none; display:flex; flex-wrap:wrap; gap:9px 30px; margin-top:12px; }
#bookInfo li { font-size:13px; color:var(--grey); display:flex; gap:9px; align-items:flex-start; }
#bookInfo li::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--red); margin-top:5px; flex:none; }
.cal-lg .cal-head h3 { font-size:24px; }
.cal-lg .day { min-height:132px; }
.cal-lg .dow { padding:14px 8px; }

/* ---------- Agreements ---------- */
.agreements { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.agreement { border:1px solid var(--line); border-radius:var(--r-card); padding:24px; background:#fff; overflow:hidden; }
.agreement-img { height:150px; background-size:cover; background-position:center; margin:-24px -24px 18px; }
.agreement .a-cat { font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--red); }
.agreement h3 { font-size:19px; margin:8px 0 6px; }
.agreement p { color:var(--grey); font-size:14px; }
.agreement .a-disc { margin-top:14px; font-weight:700; color:var(--ink); }

/* ---------- Committee + form ---------- */
.kontakt-grid { display:grid; grid-template-columns:1.2fr 1fr; gap:48px; align-items:start; }
.committee { width:100%; border-collapse:collapse; }
.committee tr { border-bottom:1px solid var(--line); }
.committee td { padding:14px 8px; font-size:15px; }
.committee td.role { color:var(--grey); font-size:13px; text-align:right; font-family:var(--mono); text-transform:uppercase; letter-spacing:.04em; }
.committee td.nm { font-weight:600; }
.form { background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--r-panel); padding:30px; }
.form label { display:block; font-size:13px; color:var(--ink); margin:14px 0 6px; font-weight:600; }
.form input, .form textarea { width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:6px; font-family:var(--body); font-size:16px; background:#fff; }
.form input:focus, .form textarea:focus { outline:none; border-color:var(--red); }
.form textarea { min-height:120px; resize:vertical; }
.form .form-note { font-size:12px; color:var(--grey); margin-top:14px; }

/* ---------- Footer ---------- */
footer.site { background: var(--black); color:#fff; padding:64px 0 40px; }
footer.site .cols { display:grid; grid-template-columns:2fr 1fr 1fr; gap:40px; }
footer.site h4 { font-family:var(--mono); font-size:12px; text-transform:uppercase; letter-spacing:.12em; opacity:.6; margin-bottom:14px; }
footer.site a, footer.site p { color:rgba(255,255,255,.82); font-size:14px; display:block; padding:4px 0; }
footer.site a:hover { color:#fff; }
.foot-brand { font-family:var(--display); font-weight:var(--display-weight); font-size:22px; margin-bottom:10px; }
.foot-bottom { margin-top:48px; padding-top:24px; border-top:1px solid rgba(255,255,255,.15); font-size:12px; opacity:.6; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; }

/* Faste element nedst står over hjemindikatoren på iPhone (env(safe-area-inset-bottom) krev viewport-fit=cover) */
/* ---------- Admin inline-edit FAB ---------- */

/* ---------- Toast ---------- */
.toast { position:fixed; bottom:max(24px, env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%) translateY(20px); background:var(--ink); color:#fff; padding:13px 22px; border-radius:8px; font-size:14px; opacity:0; pointer-events:none; transition:.25s; z-index:300; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ---------- Activity detail ---------- */
.page-hero #actDate, .page-hero p#actDate { font-family:var(--mono); font-size:13px; letter-spacing:.04em; opacity:.85; margin-top:8px; }
.det-back { display:inline-block; font-size:14px; font-weight:600; color:var(--red); margin-bottom:24px; }
.act-detail { display:grid; grid-template-columns:1fr 320px; gap:40px; align-items:start; }
.det-main { min-width:0; }
.det-desc-h { font-size:14px; font-family:var(--mono); text-transform:uppercase; letter-spacing:.08em; color:var(--grey); font-weight:500; margin-bottom:10px; }
.det-desc { font-size:17px; line-height:1.6; color:var(--ink); }
.det-rows { margin-top:28px; border-top:1px solid var(--line); }
.det-row { display:flex; gap:20px; padding:14px 0; border-bottom:1px solid var(--line); font-size:15px; }
.det-lbl { width:140px; flex:none; font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--grey); padding-top:2px; }
.signup-panel { background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--r-panel); padding:0; position:sticky; top:96px; overflow:hidden; }
.sp-tabs { display:flex; border-bottom:1px solid var(--line); }
.sp-tab { flex:1; background:none; border:none; border-bottom:2px solid transparent; margin-bottom:-1px; padding:14px 12px; font:inherit; font-size:13px; font-weight:500; color:var(--grey); cursor:pointer; }
.sp-tab-active { color:var(--ink); font-weight:700; border-bottom-color:var(--red); }
.sp-tab-badge { display:inline-block; background:var(--line); border-radius:10px; padding:1px 6px; font-size:11px; font-weight:600; margin-left:4px; }
.sp-pane { padding:22px 26px 26px; }
.sp-pane-hidden { display:none; }
.sp-count-row { font-size:14px; color:var(--grey); margin-bottom:16px; }
.sp-count-row b { font-family:var(--display); font-size:32px; font-weight:var(--display-weight); color:var(--ink); display:block; line-height:1.1; font-variant-numeric:tabular-nums; white-space:nowrap; }
.sp-namelist { list-style:none; padding:0; margin:0; border-top:1px solid var(--line); }
.sp-namelist li { padding:8px 0; font-size:14px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.sp-namelist li.sp-empty { color:var(--grey); font-size:13px; }
.sp-slot { font-family:var(--mono); font-size:11px; color:var(--grey); }
.leaderboard { margin-top:40px; }
.leaderboard h3 { font-size:20px; margin-bottom:16px; }
.leaderboard table { width:100%; border-collapse:collapse; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.leaderboard th { text-align:left; font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--grey); padding:12px 16px; background:var(--bg-soft); border-bottom:1px solid var(--line); }
.leaderboard th:last-child, .leaderboard td:last-child { text-align:right; width:80px; }
.leaderboard td { padding:12px 16px; border-bottom:1px solid var(--line); font-size:14px; }
.leaderboard tr:last-child td { border-bottom:0; }

/* ---------- Profile page ---------- */
.profile-page { max-width: 640px; margin: 0 auto; padding: 48px 0 80px; }
.profile-hero { display: flex; align-items: center; gap: 20px; padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.profile-avatar-lg { width: 72px; height: 72px; border-radius: 50%; background: var(--black); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 26px; flex: none; font-family: var(--display); position: relative; cursor: pointer; overflow: hidden; }
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar-upload-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; pointer-events: none; }
.profile-avatar-lg:hover .avatar-upload-overlay { opacity: 1; }
.avatar-upload-overlay span { color: #fff; font-size: 10px; font-weight: 500; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
/* ---------- Avatar crop modal ---------- */
.avatar-crop-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 16px; }
.avatar-crop-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.avatar-crop-title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0; align-self: flex-start; }
.avatar-crop-canvas { display: block; border-radius: 10px; cursor: grab; touch-action: none; }
.avatar-crop-canvas.dragging { cursor: grabbing; }
.avatar-crop-zoom { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--grey); }
.avatar-crop-zoom input[type=range] { flex: 1; accent-color: var(--red); cursor: pointer; }
.avatar-crop-actions { display: flex; gap: 10px; width: 100%; }
.avatar-crop-actions .profile-cancel-btn { flex: 1; padding: 12px; }
.avatar-crop-actions .profile-save-btn { flex: 2; padding: 12px; }
.profile-hero-info h2 { font-size: 22px; margin: 0 0 4px; }
.profile-hero-info .ph-sub { font-size: 14px; color: var(--grey); margin: 0; }
.profile-section { background: #fff; border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: 20px; overflow: hidden; }
.profile-section-title { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); font-weight: 500; margin: 0; padding: 14px 20px 10px; border-bottom: 1px solid var(--line); }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.profile-row:last-child { border-bottom: 0; }
.profile-row-label { font-size: 14px; font-weight: 500; flex: none; min-width: 120px; }
.profile-row-val { font-size: 14px; color: var(--grey); flex: 1; }
.profile-edit-input { appearance: none; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; font: inherit; font-size: 16px; color: var(--ink); outline: none; flex: 1; min-width: 0; }
.profile-edit-input:focus { border-color: var(--red); }
.profile-row-btns { display: flex; gap: 8px; align-items: center; flex: none; }
.profile-save-btn { appearance: none; border: 0; background: var(--ink); color: #fff; border-radius: 6px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.profile-save-btn:hover { background: #111; }
.profile-save-btn:disabled { opacity: .4; cursor: default; }
.profile-cancel-btn { appearance: none; background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.profile-cancel-btn:hover { border-color: var(--ink); }
.profile-signups-empty { font-size: 13px; color: var(--grey); padding: 16px 20px; }
.profile-signup-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-signup-item:last-child { border-bottom: 0; }
.profile-signup-item .ps-date { font-size: 12px; color: var(--grey); font-family: var(--mono); }
.profile-msg { font-size: 13px; margin-left: 4px; }
.profile-msg.ok { color: #21a366; }
.profile-msg.err { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .grid, .agreements { grid-template-columns:1fr 1fr; }
  .offers { grid-template-columns:1fr 1fr; }
  .kontakt-grid { grid-template-columns:1fr; gap:32px; }
}
@media (max-width: 820px), (hover: none) and (max-height: 500px){
  .feature { grid-template-columns:1fr; }
  .booking { grid-template-columns:1fr; }
  .act-detail { grid-template-columns:1fr; gap:24px; }
  .signup-panel { position:static; }
  footer.site .cols { grid-template-columns:1fr; gap:28px; }
}
@media (max-width: 640px){
  .wrap { padding:0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
  .profile-page { width:100%; min-width:0; }
  .profile-hero-info { min-width:0; overflow-wrap:anywhere; }
  .profile-row { flex-wrap:wrap; gap:8px 12px; }
  .profile-row-label { flex-basis:100%; min-width:0; }
  .profile-row-val { min-width:0; overflow-wrap:anywhere; }
  .profile-edit-input { flex-basis:100%; }
  section { padding:52px 0; }
  nav.menu, .chip .meta { display:none; }
  .burger { display:flex; }
  .auth-register { display:none; }
  .auth-btns { gap:0; }
  .grid, .agreements, .offers { grid-template-columns:1fr; }
  .nav { height:60px; }
  .days { grid-template-columns:repeat(7,1fr); font-size:10px; }
  .day { min-height:auto; padding:6px 4px; }
  .cal { overflow-x:auto; }
  .days { min-width:660px; }
  .section-head { flex-direction:column; align-items:flex-start; gap:10px; }
}

@media (pointer: coarse) {
  .brand, .chip, .burger, .overlay .ov-close, .lang-select,
  .auth-login, .btn, .card .link, .section-head a.more, .breadcrumb a, .cal-head .navbtns button,
  .slot-chip, .profile-cancel-btn, .profile-save-btn, .dd-reset { min-height:48px; }
  .chip, .burger, .overlay .ov-close, .cal-head .navbtns button { min-width:48px; }
  .auth-login, .card .link { display:inline-flex; align-items:center; }
  .det-back { display:inline-flex; align-items:center; min-height:48px; min-width:48px; }
  .sp-count-row b { font-size:min(8vw, 30px); }
  .auth-login { min-width:48px; justify-content:center; }
  .breadcrumb a { display:inline-flex; align-items:center; min-width:48px; }
  .form input, .form textarea { min-height:48px; }
  footer.site a { min-height:48px; display:flex; align-items:center; }
}

/* ---------- Nyheiter (/nyheiter og /nyheiter/<id>) ---------- */
.nh-tal { font-family:var(--mono); font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--grey); margin-bottom:20px; }
.nh-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.nh-kort { display:flex; flex-direction:column; border:1px solid var(--line); border-radius:var(--r-card); overflow:hidden; background:#fff; transition:.18s; }
.nh-kort:focus-visible { outline:2px solid var(--red); outline-offset:3px; }
@media (hover: hover) { .nh-kort:hover { transform:translateY(-3px); box-shadow:var(--shadow-card); border-color:#d8d8d8; } .nh-kort:hover h2 { color:var(--red); } }
.nh-bilde { display:block; width:100%; aspect-ratio:3/2; object-fit:cover; background:var(--bg-soft); }
.nh-utan { display:grid; place-items:center; font-family:var(--display); font-weight:var(--display-weight); font-size:22px; letter-spacing:-.02em; color:var(--grey); }
.nh-tekst { padding:20px 22px 24px; display:grid; gap:8px; }
.nh-dato { font-family:var(--mono); font-size:12px; color:var(--red); letter-spacing:.04em; text-transform:uppercase; }
.nh-kort h2 { font-size:22px; line-height:1.15; overflow-wrap:anywhere; transition:color .18s; }
.nh-skel { aspect-ratio:4/3; border-radius:8px; background:var(--bg-soft); }
.nh-skel-sak { aspect-ratio:16/9; max-width:720px; margin:0 auto; }
.nh-tom { grid-column:1/-1; text-align:center; padding:56px 16px; border:1px dashed var(--line); border-radius:8px; }
.nh-tom h2 { font-size:24px; margin-bottom:8px; }
.nh-tom p { color:var(--grey); }
.nh-sak { padding-top:8px; }
.nh-topp { display:block; width:100%; max-width:720px; aspect-ratio:16/9; object-fit:cover; border-radius:8px; margin:0 auto 40px; }
.nh-lesar { max-width:720px; margin:0 auto; }
.nh-ren { white-space:pre-wrap; }
.nh-tilbake { max-width:720px; margin:48px auto 0; font-weight:600; }
.nh-tilbake a { display:inline-flex; align-items:center; min-height:48px; }
.nh-tilbake a:hover { color:var(--red); }
/* Brødsmula er liten tekst; flata rundt lenkene er 48 px på berøring. */
@media (pointer: coarse) { body[data-page="nyheiter"] .breadcrumb a { position:relative; } body[data-page="nyheiter"] .breadcrumb a::after { content:""; position:absolute; inset:-17px -9px; } }
@media (max-width: 980px) { .nh-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) { .nh-grid { grid-template-columns:minmax(0,1fr); } .nh-topp { margin-bottom:28px; } }

/* Felles valpil: nettlesaren si pil kan ikkje flyttast med padding. */
:root { --valpil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2529' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
select:not([multiple]):not([size]),
select:not([multiple])[size="1"] {
  appearance: none !important;
  background-image: var(--valpil) !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 16px 16px !important;
  padding-inline: 12px 40px !important;
}
