:root {
  --sea-900:#0b2b45; --sea-700:#17496b; --sea-500:#2f7ea0; --sea-100:#dcebf2;
  --cream:#f6ecd9; --cream-2:#fbf5e8; --earth:#8a5a3b; --earth-dark:#5b3920;
  --gold:#c9a24b; --gold-dark:#8a6a1f; --ink:#1d2a33; --muted:#52606a;
  --radius:18px; --shadow:0 10px 30px rgba(11,43,69,.14);
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0; background:var(--cream); color:var(--ink);
  font:18px/1.6 Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  -webkit-text-size-adjust:100%;
}
h1,h2,h3,h4 { font-weight:700; line-height:1.15; margin:0 0 .5em; }
a { color:var(--sea-700); }
.skip { position:absolute; left:-999px; top:0; background:#fff; padding:.6em 1em; z-index:10; }
.skip:focus { left:8px; top:8px; }
:focus-visible { outline:3px solid var(--gold-dark); outline-offset:2px; border-radius:6px; }

/* Hero */
.hero { position:relative; background:linear-gradient(#0b2b45,#103a5a 70%,#17496b); color:var(--cream); overflow:hidden; }
.hero-art { position:absolute; inset:auto 0 0 0; width:100%; height:62%; min-height:150px; }
.hero-text { position:relative; max-width:900px; margin:0 auto; padding:56px 20px 150px; text-align:center; }
.kicker { letter-spacing:.14em; text-transform:uppercase; font-size:.8rem; color:#e5c677; margin:0 0 14px; }
h1 { font-size:clamp(2rem,6.5vw,3.8rem); margin:0 0 18px; text-wrap:balance; }
h1 .plus,h1 .eq { color:var(--gold); font-weight:400; }
h1 em { font-style:italic; color:#f1d98c; }
.tagline { font-size:clamp(1.05rem,3vw,1.35rem); font-style:italic; max-width:34em; margin:0 auto; color:#eaf1f5; }
.wave { animation:drift 9s ease-in-out infinite alternate; }
.w2 { animation-duration:12s; animation-direction:alternate-reverse; }
.w3 { animation-duration:15s; }
@keyframes drift { from { transform:translateX(-14px); } to { transform:translateX(14px); } }
.stars { animation:twinkle 4s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity:.55; } to { opacity:1; } }

main { max-width:880px; margin:-70px auto 0; padding:0 16px 40px; position:relative; }
.card { background:var(--cream-2); border-radius:var(--radius); box-shadow:var(--shadow); padding:26px 22px; margin-bottom:26px; border:1px solid #e6d7b6; }
.card h2 { font-size:1.6rem; color:var(--sea-900); }
.predictions { list-style:none; padding:0; margin:1em 0; display:grid; gap:.6em; }
.predictions li { background:#fff8e6; border-left:4px solid var(--gold); padding:.6em .9em; border-radius:10px; }
.lead { color:var(--muted); margin-top:-.2em; }
.tiny,.tiny-note { font-size:.85rem; color:var(--muted); }
.muted { color:var(--muted); }

/* Steg */
.step { border:0; padding:0; margin:26px 0 0; min-width:0; }
.step legend,.step-h { font-size:1.2rem; font-weight:700; color:var(--sea-900); padding:0; margin:0 0 .6em; display:flex; align-items:center; gap:.6em; }
.num { display:inline-grid; place-items:center; width:1.9em; height:1.9em; border-radius:50%; background:var(--sea-900); color:var(--cream); font-size:.9rem; flex:none; }

.notice { border-radius:12px; padding:.8em 1em; margin:1em 0; border:2px solid; }
.notice.warn { background:#fff3d6; border-color:var(--gold-dark); color:#4a3608; }
.notice.error { background:#fde8e4; border-color:#a3281b; color:#5a130b; }
.notice button { margin-left:.5em; }

/* Navn */
.names { display:flex; flex-wrap:wrap; gap:12px; }
.name-opt { position:relative; flex:1 1 180px; }
.name-opt input { position:absolute; opacity:0; inset:0; width:100%; height:100%; margin:0; cursor:pointer; }
.name-opt label { display:flex; align-items:center; justify-content:center; gap:.5em; min-height:56px; padding:.6em 1em; border-radius:14px; border:2px solid var(--sea-500); background:#fff; font-weight:700; font-size:1.1rem; color:var(--sea-900); }
.name-opt input:checked + label { background:var(--sea-900); color:var(--cream); border-color:var(--sea-900); }
.name-opt input:checked + label::before { content:"✓"; color:#f1d98c; }
.name-opt input:focus-visible + label { outline:3px solid var(--gold-dark); outline-offset:2px; }

/* Kalender */
.cal { background:#fff; border-radius:16px; border:1px solid #e1d3b0; padding:14px 10px 12px; box-shadow:inset 0 0 0 4px #fbf5e8; }
.cal-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.cal-head h4 { margin:0; font-size:1.3rem; text-transform:capitalize; color:var(--sea-900); text-align:center; flex:1; }
.nav { width:52px; height:52px; border-radius:50%; border:2px solid var(--sea-700); background:#fff; color:var(--sea-900); font-size:1.8rem; line-height:1; cursor:pointer; }
.nav:hover:not(:disabled) { background:var(--sea-100); }
.nav:disabled { opacity:.35; cursor:not-allowed; }
.grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.weekdays span { text-align:center; font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); padding:4px 0; }
.day { position:relative; min-height:56px; border-radius:12px; border:2px solid #cfe0e8; background:#f4f9fb; color:var(--ink); font:inherit; font-weight:700; cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2px; }
.day:hover { border-color:var(--sea-500); background:var(--sea-100); }
.day .sym { font-size:.75rem; line-height:1; min-height:1em; }
.day.thu { background:#fff7dc; border-color:var(--gold); box-shadow:0 0 12px rgba(201,162,75,.55); }
.day.thu .sym { color:var(--gold-dark); }
.day.blocked { cursor:not-allowed; color:#5b6770; border-style:dashed; border-color:#b9c3c9;
  background:repeating-linear-gradient(135deg,#eceff1 0 6px,#e1e6e9 6px 12px); font-weight:400; }
.day.blocked:hover { background:repeating-linear-gradient(135deg,#eceff1 0 6px,#e1e6e9 6px 12px); border-color:#b9c3c9; }
.day.blocked .sym { color:#7a2f27; }
.day.blocked .n { text-decoration:line-through; }
.day.selected { background:var(--sea-900); color:var(--cream); border-color:var(--sea-900); box-shadow:0 0 0 3px var(--gold); transform:scale(1.04); }
.day.selected .sym { color:#f1d98c; font-size:.9rem; }
.day.today .n::after { content:"•"; color:var(--gold-dark); margin-left:2px; }
.day.empty { visibility:hidden; pointer-events:none; }
.cal-hint { min-height:2.6em; margin:10px 4px 6px; font-size:.95rem; color:var(--muted); }
.legend { list-style:none; padding:0; margin:6px 0 0; display:flex; flex-wrap:wrap; gap:6px 16px; font-size:.85rem; color:var(--muted); }
.k { display:inline-grid; place-items:center; width:1.6em; height:1.6em; border-radius:6px; border:2px solid #cfe0e8; font-size:.7rem; font-style:normal; vertical-align:middle; margin-right:.3em; }
.k-free { background:#f4f9fb; } .k-thu { background:#fff7dc; border-color:var(--gold); }
.k-sel { background:var(--sea-900); color:#f1d98c; border-color:var(--sea-900); }
.k-blocked { border-style:dashed; border-color:#b9c3c9; background:#e6eaec; color:#7a2f27; }

/* Sammendrag og knapp */
.summary { background:#fff8e6; border:2px dashed var(--gold); border-radius:14px; padding:.9em 1.1em; margin-bottom:14px; }
.summary strong { color:var(--sea-900); }
.send { width:100%; min-height:60px; border-radius:16px; border:0; cursor:pointer; font:inherit; font-weight:700; font-size:1.1rem; color:#fff; background:linear-gradient(135deg,var(--sea-700),var(--earth)); box-shadow:0 6px 16px rgba(11,43,69,.25); padding:.6em 1em; }
.send:hover:not(:disabled) { filter:brightness(1.1); }
.send:disabled { background:#aab5bb; box-shadow:none; cursor:not-allowed; color:#fff; }
.send-msg { min-height:1.6em; margin:.6em 0 0; }
.send-msg.error { color:#a3281b; font-weight:700; }

.done { text-align:center; background:#eef7ec; border:2px solid #4f8a4b; border-radius:16px; padding:1.2em; margin-top:22px; }
.done-art { font-size:2.4rem; animation:bob 3s ease-in-out infinite alternate; }
.done-title { font-size:1.3rem; font-weight:700; margin:.2em 0; color:#1f4d1c; }
@keyframes bob { from { transform:translateY(0); } to { transform:translateY(-6px); } }

/* Overnatting */
.stay { background:linear-gradient(135deg,#f0dcb4,#e4c78e); border-radius:var(--radius); border:2px solid var(--gold); padding:24px 20px; box-shadow:var(--shadow); position:relative; overflow:hidden; }
.stay::before { content:""; position:absolute; inset:8px; border:1px dashed rgba(138,90,59,.6); border-radius:12px; pointer-events:none; }
.stay-inner { position:relative; display:flex; gap:22px; align-items:center; flex-wrap:wrap; }
.stay h2 { color:var(--earth-dark); font-size:1.5rem; }
.stay p { margin:.2em 0; color:#3d2813; }
.stay-art { position:relative; font-size:2.6rem; display:flex; gap:6px; padding-top:20px; }
.steam { position:absolute; top:-6px; left:10px; font-size:1.2rem; color:var(--earth); opacity:0; animation:steam 3s ease-in infinite; }
.s2 { left:30px; animation-delay:1.4s; }
@keyframes steam { 0% { opacity:0; transform:translateY(10px); } 40% { opacity:.8; } 100% { opacity:0; transform:translateY(-14px); } }

footer { text-align:center; padding:10px 16px 40px; color:var(--muted); }

@media (max-width:520px) {
  body { font-size:17px; }
  .grid { gap:3px; }
  .day { min-height:52px; border-radius:10px; }
  .hero-text { padding-bottom:130px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation:none !important; transition:none !important; }
  .day.selected { transform:none; }
}
@media (forced-colors:active) {
  .day.selected { outline:3px solid Highlight; }
  .day.blocked { border-style:dashed; }
}

/* Gjesteliste-animasjon (pynt) */
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.guestlist { margin:0 0 16px; }
.gl-row { display:flex; gap:14px; align-items:flex-start; }
.gl-paper { flex:1; background:#fffdf5; border:2px solid var(--gold); border-radius:14px; padding:10px 12px; box-shadow:var(--shadow); max-height:56px; overflow:hidden; transition:max-height .7s ease; }
.gl-paper.open,.gl-paper.done { max-height:420px; }
.gl-title { font-weight:700; color:var(--earth-dark); margin-bottom:8px; }
.gl-chips { display:flex; flex-wrap:wrap; gap:6px; }
.gl-chip { display:inline-block; padding:.15em .7em; border-radius:99px; background:#eef2f4; border:1px solid #c6d1d6; font-size:.95rem; transition:transform .55s cubic-bezier(.5,-.3,.8,.6), opacity .55s; }
.gl-chip.tossed { transform:translate(var(--dx),var(--dy)) scale(.2) rotate(200deg); opacity:0; }
.gl-chip.gone { display:none; }
.gl-chip.ok { background:#fff7dc; border-color:var(--gold); font-weight:700; }
.gl-chip.approved { background:var(--sea-900); color:var(--cream); border-color:var(--sea-900); font-size:1.05rem; }
.gl-chip.approved::before { content:"✓ "; color:#f1d98c; }
.gl-bin { font-size:2.6rem; line-height:1; padding-top:6px; }
.gl-bin.wiggle { animation:wiggle .25s; }
@keyframes wiggle { 25% { transform:rotate(-10deg) scale(1.1); } 75% { transform:rotate(10deg) scale(1.1); } }
.gl-status { margin:.5em 0 0; font-size:.95rem; color:var(--muted); }
.gl-again { all:unset; cursor:pointer; color:var(--sea-700); text-decoration:underline; font-size:.9rem; padding:8px 0; }
.gl-again:focus-visible { outline:3px solid var(--gold-dark); outline-offset:2px; }

/* Tittel: to linjer */
h1 .l1,h1 .l2 { display:block; }
h1 .l2 { font-size:1.15em; margin-top:.1em; }
@media (max-width:420px) { h1 .l1 { font-size:.82em; } }

/* Overnatting: sovealternativer */
.stay-sub { margin:1em 0 .4em; font-size:1.05rem; color:var(--earth-dark); }
.beds { list-style:none; counter-reset:bed; padding:0; margin:0 0 .6em; display:grid; gap:8px; }
.beds li { counter-increment:bed; display:flex; align-items:center; gap:.7em; min-height:48px; padding:.4em .9em; background:rgba(255,255,255,.55); border:1px solid rgba(138,90,59,.45); border-radius:12px; color:#3d2813; }
.beds li::before { content:counter(bed) "."; font-weight:700; color:var(--earth-dark); min-width:1.2em; }
.bed-ico { font-size:1.3rem; }

/* Overnatting (avkryssing) og bekreftelsesdialog */
.chk { display:flex; align-items:center; gap:.7em; min-height:52px; padding:.4em .9em; margin:6px 0; background:#fff; border:2px solid var(--sea-500); border-radius:14px; cursor:pointer; }
.chk.big { font-weight:700; font-size:1.1rem; color:var(--sea-900); }
.chk input { width:1.5rem; height:1.5rem; accent-color:var(--sea-900); flex:none; }
.chk:has(input:checked) { background:#fff7dc; border-color:var(--gold-dark); }
.chk:has(input:focus-visible) { outline:3px solid var(--gold-dark); outline-offset:2px; }
.sub { border:0; padding:0; margin:12px 0 0; min-width:0; }
.sub legend { font-weight:700; color:var(--earth-dark); padding:0; margin-bottom:4px; }
dialog#ask { border:3px solid var(--gold); border-radius:18px; background:var(--cream-2); color:var(--ink); max-width:min(92vw,28em); padding:22px; box-shadow:0 20px 60px rgba(0,0,0,.4); font:inherit; }
dialog#ask::backdrop { background:rgba(11,43,69,.6); }
#ask-q { font-size:1.2rem; font-weight:700; margin:0 0 16px; color:var(--sea-900); }
.ask-btns { display:flex; gap:12px; }
.ask-btns button { flex:1; min-height:56px; border-radius:14px; font:inherit; font-weight:700; font-size:1.1rem; cursor:pointer; border:2px solid var(--sea-900); background:#fff; color:var(--sea-900); }
#ask-no { background:var(--sea-900); color:var(--cream); }
.ask-btns button:focus-visible { outline:3px solid var(--gold-dark); outline-offset:2px; }

/* Bekreftelse som pop-up */
dialog.done { max-width:min(92vw,30em); width:100%; margin:auto; padding:1.4em 1.2em; border:3px solid #4f8a4b; border-radius:20px; background:#eef7ec; text-align:center; box-shadow:0 24px 70px rgba(0,0,0,.45); color:var(--ink); font:inherit; }
dialog.done::backdrop { background:rgba(11,43,69,.65); }
dialog.done[open] { animation:pop .35s ease-out; }
@keyframes pop { from { opacity:0; transform:scale(.9) translateY(10px); } to { opacity:1; transform:none; } }
.done-btns { display:flex; flex-direction:column; align-items:center; gap:6px; margin-top:12px; }
.done-ok { min-height:52px; padding:0 2em; border-radius:14px; border:0; background:var(--sea-900); color:var(--cream); font:inherit; font-weight:700; font-size:1.1rem; cursor:pointer; }
.done-ok:focus-visible { outline:3px solid var(--gold-dark); outline-offset:2px; }

/* Nyttårsaften: blå som blinker mot gulaktig (rolig takt, under 1 blink per sekund) */
.day.invite { background:#0047d6; border:3px solid #ffe08a; color:#fff; animation:blink 1.4s steps(1,end) infinite; font-weight:800; }
.day.invite:hover { background:#0047d6; }
.day.invite .sym { font-weight:800; font-size:.68rem; color:inherit; }
@keyframes blink {
  0%   { background:#0047d6; color:#fff; border-color:#ffe08a; box-shadow:0 0 18px 2px rgba(0,71,214,.85); }
  50%  { background:#ffe9a8; color:#06214f; border-color:#0047d6; box-shadow:0 0 24px 4px rgba(255,224,138,1); }
}
@media (prefers-reduced-motion:reduce) { .day.invite { background:#0047d6; box-shadow:0 0 18px 2px rgba(0,71,214,.85); } }
.k-invite { background:#0047d6; border:2px solid #ffe08a; font-size:.5rem; }
