/* Layout: en champagneflaske sett innenfra – flaskegrønt glass som bakgrunn, gullfolie som aksent,
   kremhvit etikett som tekst. Hero med flaska til høyre, deretter seksjoner i én kolonne. */
:root {
  color-scheme: dark;
  --glass: #0b1f1a;
  --glass-2: #112b25;
  --glass-3: #183a32;
  --line: #2b5549;
  --cream: #f4ecd9;
  --muted: #a5bbb0;
  --foil: #e6bd62;
  --foil-hi: #fbe7a8;
  --foil-lo: #b8892f;
  --foil-ink: #2a1f05;
  --hair: rgba(230, 189, 98, .3);
  --yes: #8fe3b6;
  --maybe: #a9cbf2;
  --no: #f4a59c;
  --pending: #7d968b;
  --display: "Bodoni Moda", "Didot", "Bodoni MT", Georgia, serif;
  --body: "Figtree", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --r: 16px;
  --surface: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 56px), var(--glass-2);
  --lift: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 32px -24px rgba(0, 0, 0, .8);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Den skråstilte flaska stikker litt utenfor høyre kant. Uten dette kan siden dras sidelengs. */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 30rem at 85% -5rem, #1d4a3d 0%, transparent 70%) no-repeat,
    radial-gradient(40rem 26rem at -10% 38rem, rgba(29, 74, 61, .45) 0%, transparent 70%) no-repeat,
    var(--glass);
  color: var(--cream);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
/* Et tynt lag korn, så de store flatene får litt stofflighet som trykt papir. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wrap {
  position: relative; z-index: 1;
  max-width: 62rem;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  padding-block: clamp(24px, 5vw, 64px) 64px;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 72px);
}
.wrap.narrow { max-width: 44rem; }
main { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); }
/* Lav optisk størrelse: ellers blir hårstrekene i Bodoni så tynne at 4-tallet ligner et 1-tall. */
h1, h2, h3, .tile b, .countdown strong, .bottle text, .who, .welcome, .avatar { font-variation-settings: "opsz" 9; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
h2 { display: flex; align-items: center; gap: 18px; font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-style: italic; font-weight: 500; }
/* En gullstrek med en liten rombe følger hver overskrift ut til kanten. */
h2::after {
  content: ""; flex: 1; min-width: 24px; height: 7px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7'%3E%3Cpath d='M3.5 0 7 3.5 3.5 7 0 3.5z' fill='%23e6bd62'/%3E%3C/svg%3E") left center / 7px 7px no-repeat,
    linear-gradient(90deg, var(--hair), transparent) 13px center / calc(100% - 13px) 1px no-repeat;
}
h3 { font-size: 1.15rem; font-style: italic; font-weight: 500; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--foil); outline-offset: 2px; }
.label { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
section { display: flex; flex-direction: column; gap: 18px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
.hero-text { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-bottom: 12px; }
.date { display: flex; align-items: center; gap: 12px; color: var(--foil); }
.date::before { content: ""; flex: none; width: 28px; height: 1px; background: var(--foil); }
h1 { font-size: clamp(2.4rem, 8vw, 5rem); line-height: .95; letter-spacing: -.01em; }
h1 em {
  font-style: italic; font-size: 1.45em; letter-spacing: -.03em; padding-right: .06em;
  color: var(--foil);
  background: linear-gradient(165deg, var(--foil-hi) 8%, var(--foil) 46%, var(--foil-lo) 92%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.greeting { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 30ch; }
.countdown { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); }
.countdown strong { font-family: var(--display); font-size: 1.6em; font-weight: 700; color: var(--foil); font-variant-numeric: tabular-nums; margin-right: .1em; }

.bottle-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* Bobler som stiger sakte bak flaska, i to lag med ulik fart. Mønsteret gjentas i høyden,
   og toner ut øverst og nederst så man ikke ser skjøten. */
.bottle-box { --bw: clamp(150px, 27vw, 240px); }
.bottle-box::before, .bottle-box::after {
  content: ""; position: absolute; z-index: -1; top: -8%; bottom: 20%; left: 50%; width: var(--bw); margin-left: calc(var(--bw) * -.56); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 300' fill='none' stroke='%23f4ecd9'%3E%3Cg stroke-opacity='.22'%3E%3Ccircle cx='34' cy='246' r='9'/%3E%3Ccircle cx='58' cy='196' r='5'/%3E%3Ccircle cx='22' cy='168' r='3.5'/%3E%3Ccircle cx='46' cy='126' r='7'/%3E%3Ccircle cx='170' cy='214' r='6'/%3E%3Ccircle cx='182' cy='150' r='3'/%3E%3Ccircle cx='160' cy='96' r='4.5'/%3E%3C/g%3E%3Cg stroke-opacity='.12'%3E%3Ccircle cx='70' cy='72' r='4'/%3E%3Ccircle cx='28' cy='84' r='2.5'/%3E%3Ccircle cx='176' cy='48' r='7'/%3E%3Ccircle cx='140' cy='20' r='3'/%3E%3Ccircle cx='60' cy='24' r='2'/%3E%3C/g%3E%3Cpath d='M30 242a6 6 0 0 1 5-3M43 123a4.5 4.5 0 0 1 4-2' stroke-opacity='.35' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / var(--bw) calc(var(--bw) * 1.5) repeat-y;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 68%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 68%, transparent);
  animation: bubbles 18s linear infinite;
}
.bottle-box::after { transform: scaleX(-1); opacity: .55; margin-left: calc(var(--bw) * -.4); animation-duration: 29s; animation-delay: -11s; }
@keyframes bubbles { to { background-position: 0 calc(var(--bw) * -1.5); } }
.bottle {
  position: relative;
  background: none; border: 0; padding: 8px 20px 0; border-radius: var(--r);
  transform: rotate(14deg); transform-origin: 50% 90%;
  transition: transform .35s var(--ease);
}
.bottle svg { display: block; width: clamp(88px, 15vw, 132px); height: auto; overflow: visible; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .45)); }
.bottle:hover { transform: rotate(10deg) scale(1.03); }
.bottle:active { transform: rotate(12deg) scale(.98); }
.bottle.shake { animation: shake .45s linear; }
@keyframes shake {
  0%, 100% { transform: rotate(14deg); }
  15% { transform: rotate(8deg) translateY(-3px); } 30% { transform: rotate(19deg) translateY(2px); }
  45% { transform: rotate(9deg) translateY(-3px); } 60% { transform: rotate(18deg) translateY(2px); }
  80% { transform: rotate(11deg) translateY(-2px); }
}
.cork { transition: opacity .5s ease; }
.bottle.popped .cork { opacity: 0; transition: none; }
/* Fast bredde og høyde, så siden ikke flytter på seg når teksten under flaska skifter. */
.bottle-hint { position: relative; font-size: .85rem; line-height: 1.3; color: var(--muted); text-align: center; width: clamp(8.5rem, 30vw, 12rem); height: 3.9em; overflow: hidden; }
.bottle-hint span { display: block; }
.bottle-hint span:first-child { color: var(--cream); font-weight: 600; }
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

/* Flater */
.panel, .card, .wall-form, .tiles, .rsvp li, .facts, .empty {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--lift);
}

/* Oversikt: fire tall på én linje, skilt med hårstreker. */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 8px 16px; text-align: center; min-width: 0; }
.tile + .tile { border-left: 1px solid var(--glass-3); }
.tile b { font-family: var(--display); font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
.tile[data-s="yes"] b { color: var(--yes); }
.tile[data-s="maybe"] b { color: var(--maybe); }
.tile[data-s="no"] b { color: var(--no); }
.tile[data-s="pending"] b { color: var(--pending); }
.tile span { font-size: .82rem; line-height: 1.25; color: var(--muted); }
.bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--glass-3); }
.bar i { display: block; height: 100%; transition: width .4s ease; }
.bar .yes { background: var(--yes); } .bar .maybe { background: var(--maybe); }
.bar .no { background: var(--no); } .bar .pending { background: var(--pending); }

/* Skjema */
.panel { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.grow { flex: 1 1 12rem; }
input[type="text"], input[type="password"], input[type="search"], textarea, select {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px; background: var(--glass); color: var(--cream);
  border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:hover, input[type="password"]:hover, input[type="search"]:hover, textarea:hover, select:hover { border-color: #3d7363; }
input[type="text"]:focus, input[type="password"]:focus, input[type="search"]:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--foil); box-shadow: 0 0 0 3px rgba(230, 189, 98, .18);
}
input::placeholder, textarea::placeholder { color: var(--pending); }
textarea { resize: vertical; min-height: 6rem; line-height: 1.5; }
.btn {
  min-height: 44px; padding: 10px 22px; border-radius: 12px; border: 1px solid var(--foil-hi);
  background: linear-gradient(180deg, #f5d98f, #deb054); color: var(--foil-ink); font-weight: 700; letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 10px 20px -12px rgba(230, 189, 98, .7);
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .88rem; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.ghost:hover { color: var(--cream); border-color: #3d7363; }
.ghost.danger { border-color: transparent; }
.ghost.danger:hover { color: var(--no); border-color: var(--line); }
.ghost.sure { color: var(--glass); background: var(--no); border-color: var(--no); font-weight: 700; }
.ghost svg, .fact svg, .foot svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border-style: dashed; box-shadow: none; background: none; }

.seg { display: flex; gap: 2px; padding: 3px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; }
.seg button {
  flex: 1; min-width: 0; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font-size: .88rem; font-weight: 600; white-space: nowrap;
  transition: background-color .18s ease, color .18s ease;
}
.seg button:hover { color: var(--cream); background: rgba(255, 255, 255, .04); }
.seg button[aria-pressed="true"] { color: var(--glass); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.seg button[data-s="yes"][aria-pressed="true"] { background: var(--yes); }
.seg button[data-s="maybe"][aria-pressed="true"] { background: var(--maybe); }
.seg button[data-s="no"][aria-pressed="true"] { background: var(--no); }
.seg button[data-s="pending"][aria-pressed="true"] { background: var(--pending); }

/* Gjestesiden */
.rsvp { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rsvp li { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; padding: 18px; }
.rsvp .who { flex: 1 1 10rem; font-family: var(--display); font-size: 1.4rem; font-weight: 500; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.rsvp .seg { flex: 1 1 18rem; max-width: 26rem; }
.rsvp .seg button { min-height: 44px; padding-block: 10px; font-size: .95rem; }
/* Det valgte svaret får en hake, så det ikke bare er fargen som forteller hva som er valgt. */
.rsvp .seg button[aria-pressed="true"]::before {
  content: ""; display: inline-block; width: .85em; height: .85em; margin-right: .4em; vertical-align: -.06em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.6 6.3 12.3 13.5 4.2' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.6 6.3 12.3 13.5 4.2' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.rsvp .who .text-btn { margin-left: 14px; font-family: var(--body); vertical-align: middle; }
.guest-form { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px dashed var(--line); border-radius: var(--r); }
.guest-form .row { display: flex; flex-wrap: wrap; gap: 10px; }
.guest-form input { flex: 1 1 14rem; }
.diet-field { flex: 1 1 100%; display: flex; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid var(--glass-3); }
.diet-field .label { flex: none; }
.diet-field input { flex: 1; font-size: .95rem; }
.welcome { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.2rem, 2.6vw, 1.4rem); line-height: 1.45; white-space: pre-line; max-width: 48ch; padding-left: 18px; border-left: 2px solid var(--foil); }
.facts { margin: 0; display: flex; flex-direction: column; }
.fact { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 15px 18px 15px 60px; }
.fact + .fact { border-top: 1px solid var(--glass-3); }
.fact svg { position: absolute; left: 18px; top: 16px; width: 24px; height: 24px; color: var(--foil); }
.fact dd { margin: 0; font-size: 1.05rem; white-space: pre-line; overflow-wrap: anywhere; }
.fact dd a { color: inherit; text-decoration-color: var(--hair); text-underline-offset: 4px; }
.fact dd a:hover { text-decoration-color: var(--foil); }
.ghost.cal { min-height: 44px; padding-inline: 16px; color: var(--foil); border-color: var(--hair); font-size: .95rem; font-weight: 600; }
.ghost.cal:hover { color: var(--foil-hi); border-color: var(--foil); background: rgba(230, 189, 98, .06); }
.ghost.cal svg { width: 18px; height: 18px; }
.names { display: flex; flex-direction: column; gap: 16px; }
.names > div { display: flex; flex-direction: column; gap: 8px; }
.names ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.names li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); font-size: .95rem; }
.names li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pending); }
.names [data-s="yes"] li::before { background: var(--yes); }
.names [data-s="maybe"] li::before { background: var(--maybe); }
.names [data-s="no"] li::before { background: var(--no); }
.names [data-s="no"] li { color: var(--muted); }
.wall-form { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.wall-form .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.wall-form .from { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wall-form select { width: auto; max-width: 100%; }
.comments, .replies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.comments > li { padding: 18px 0; border-top: 1px solid var(--glass-3); }
.comments > li:first-child { border-top: 0; padding-top: 4px; }
.thread { display: flex; flex-direction: column; gap: 14px; }
.comment { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; min-width: 0; }
.comment > * { grid-column: 2; }
.comment > .avatar { grid-column: 1; grid-row: 1 / span 4; }
.avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--glass-3); border: 1px solid var(--hair); color: var(--foil);
  font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .02em;
}
.replies .avatar { width: 30px; height: 30px; font-size: .78rem; }
.comment .meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.comment .meta b { font-weight: 600; }
.comment time { font-size: .82rem; color: var(--muted); }
.comment p { white-space: pre-line; overflow-wrap: anywhere; }
.comment .actions { display: flex; align-items: center; gap: 16px; }
.edit-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.edit-form .btn, .edit-form .ghost { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.text-btn { padding: 6px 0; border: 0; background: none; color: var(--muted); font-size: .85rem; font-weight: 600; }
.text-btn:hover { color: var(--foil); }
.comment .actions .ghost { padding: 2px 8px; font-size: .82rem; }
.replies { gap: 14px; margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--line); }
.reply-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: 50px; }
.reply-form input { flex: 1 1 12rem; }
.reply-form .btn { padding-inline: 16px; }
.reply-form .muted { font-size: .85rem; }
.emoji-bar { display: flex; flex-wrap: wrap; gap: 2px; margin-inline: -4px; }
.emoji-bar button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: none; font-size: 1.25rem; line-height: 1; transition: background-color .15s ease, transform .15s var(--ease); }
.emoji-bar button:hover { background: var(--glass-3); transform: scale(1.12); }
.reply-form .emoji-bar { flex-basis: 100%; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 8px; color: var(--muted); font-size: 1rem; text-align: center; }
.foot svg { width: 72px; height: 45px; color: var(--foil); }

/* Admin */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar h2 { flex: 1; }
.topbar input { flex: 0 1 16rem; }
.login { max-width: 24rem; }
.login form { flex-direction: column; align-items: stretch; }
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card-head .link { flex: 1 1 12rem; font-size: .88rem; color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; padding-block: 7px; }
.opened { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.opened.seen { color: var(--yes); }
.members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.members li { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem auto auto; align-items: center; gap: 8px; }
.members .seg button { flex: 1 0 auto; min-width: auto; }
.members input.tel { font-weight: 400; font-variant-numeric: tabular-nums; }
.field.tel { flex: 0 1 9rem; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
a.ghost { text-decoration: none; }
.members input { font-weight: 600; }
.card-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.card-foot input { font-size: .9rem; background: transparent; }
.ghost[aria-pressed="true"] { color: var(--foil); border-color: var(--hair); }
.compact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: .92rem; line-height: 1.3; }
.compact li { display: flex; align-items: baseline; gap: 10px; padding: 4px 0 4px 8px; border-top: 1px solid var(--glass-3); border-left: 2px solid transparent; min-width: 0; }
.compact li.joined { border-left-color: var(--foil); border-top-color: transparent; }
.compact li.joined.first { margin-top: 5px; }
.compact li.joined.last { margin-bottom: 5px; }
.compact li::before { content: ""; flex: none; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: var(--pending); }
.compact [data-s="yes"]::before { background: var(--yes); }
.compact [data-s="maybe"]::before { background: var(--maybe); }
.compact [data-s="no"]::before { background: var(--no); }
.compact li.group { padding-top: 14px; border-top: 0; }
.compact li.group:first-child { padding-top: 0; }
.compact b { flex: none; max-width: 55%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact li > span:not(.label) { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.info-grid .wide { grid-column: 1 / -1; }
.todo-add { display: flex; gap: 10px; }
.todo-add input { flex: 1; }
.todos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.todos li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--glass-3); }
.todos label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.todos input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--foil); flex: none; }
.todos li.done label { color: var(--pending); text-decoration: line-through; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 99px; z-index: 30;
  background: var(--cream); color: var(--glass); font-weight: 600; text-align: center;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .7);
  animation: toast-in .3s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Siden kommer rolig inn, seksjon for seksjon. */
.hero, main > section, main > .foot { animation: rise .7s var(--ease) both; }
main > section:nth-of-type(2) { animation-delay: .07s; }
main > section:nth-of-type(3) { animation-delay: .14s; }
main > section:nth-of-type(n+4) { animation-delay: .21s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 760px) {
  .members li { grid-template-columns: minmax(0, 1fr) 7.5rem auto; }
  .members .seg { grid-column: 1 / -1; grid-row: 2; }
  .rsvp .who, .rsvp .seg { flex-basis: 100%; max-width: none; }
  .card-foot, .info-grid { grid-template-columns: minmax(0, 1fr); }
  .diet-field { flex-direction: column; align-items: stretch; gap: 6px; }
  .reply-form { margin-left: 0; }
  .topbar { flex-wrap: wrap; }
  .topbar input { flex-basis: 100%; }
  .compact li { flex-wrap: wrap; gap: 0 10px; }
  .compact li > span:not(.label) { flex-basis: 100%; padding-left: 17px; white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  .seg button { padding-inline: 4px; font-size: .82rem; }
  .rsvp .seg button { font-size: .9rem; }
  .date { white-space: nowrap; letter-spacing: .1em; }
  .date::before { width: 16px; }
  .tile span { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bottle, .bottle:hover, .seg button, .emoji-bar button, .btn { transition: none; }
  .bottle.shake, .toast, .hero, main > section, main > .foot { animation: none; }
  .bottle-box::before, .bottle-box::after { animation: none; }
  .bar i { transition: none; }
}

/* SMS-utsendelse */
.sms-preview { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
#smsTestPhone { width: 11rem; }
#smsSendBox:empty, #remSendBox:empty, #maySendBox:empty { display: none; }

/* Lister i admin og festmodus */
#diets li, #popList li { justify-content: space-between; gap: 16px; }
#diets span, #popList span { color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.party .countdown { font-family: var(--display); font-style: italic; font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--foil); }
