/* Sukker.nu – mobile-first grundstil (specifikation 12) */
:root {
  --bg: #faf7f5;
  --surface: #ffffff;
  --text: #2b2230;
  --muted: #6f6475;
  --accent: #a8325a;
  --accent-ink: #ffffff;
  --border: #e6dfe3;
  --error: #b42318;
  --success: #1f7a4d;
  --info-bg: #f3eef6;
  --radius: 14px;
  --badge: #d92d20;  /* røde bobler med nye beskeder og matches */
  --app-width: 1100px;  /* indholdsbredden på desktop for indloggede og administrationen */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17131a;
    --surface: #221c26;
    --text: #f1ecf3;
    --muted: #b3a9b8;
    --accent: #e0658f;
    --accent-ink: #17131a;
    --border: #3a3140;
    --error: #ff8a80;
    --success: #6fd3a0;
    --info-bg: #2c2431;
  }
}

* { box-sizing: border-box; }
/* hidden skal altid skjule, også elementer med display i en klasse (fx .button). */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--text); }
.brand img { display: block; }
.brand-name span { color: var(--accent); }
.topnav { display: flex; align-items: center; gap: 14px; }
.topnav a { text-decoration: none; }

.page { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; }

.notice {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: center;
  padding: 10px 16px; background: var(--info-bg); font-size: 0.92rem; text-align: center;
}

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}

.hero { text-align: center; padding: 32px 0; }
.hero h1 { font-size: 2rem; }

.muted { color: var(--muted); font-size: 0.92rem; }
.center { text-align: center; }

/* minmax(0, 1fr): et langt felt, fx filvælgeren, må aldrig gøre formularen bredere end kortet. */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date] {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field.checkbox label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field.checkbox input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; }
.hint { color: var(--muted); }
.error { color: var(--error); font-weight: 600; }
.has-error input { border-color: var(--error); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.button.small { min-height: 36px; padding: 0 14px; font-size: 0.92rem; }
.button.wide { width: 100%; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.inline { display: inline; }

.actions { display: grid; gap: 10px; margin-top: 12px; }

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; background: var(--info-bg); }
.flash-error { color: var(--error); }
.flash-success { color: var(--success); }

.sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sessions li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.sessions .device { overflow-wrap: anywhere; font-size: 0.92rem; }

/* Profil (M2) */
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-heading { margin-bottom: 12px; }
.desktop-only { display: none !important; }
.notice-card { background: var(--info-bg); }
.field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input[type=number] {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-weight: 600; margin-bottom: 6px; }
.field-label { font-weight: 600; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer;
}
.hide-toggle { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; font-size: 0.88rem; font-weight: 400; color: var(--muted); }
.field .chip { font-weight: 400; }
.row > .field { margin-top: 0 !important; }
.card .field + .field, .card fieldset + .field, .card .field + fieldset { margin-top: 12px; }
.button.danger, .link.danger { color: var(--error); }

.progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.progress-bar { height: 100%; background: var(--accent); width: 0; }
.progress-bar[data-percent="10"] { width: 10%; }  .progress-bar[data-percent="20"] { width: 20%; }
.progress-bar[data-percent="30"] { width: 30%; }  .progress-bar[data-percent="40"] { width: 40%; }
.progress-bar[data-percent="50"] { width: 50%; }  .progress-bar[data-percent="60"] { width: 60%; }
.progress-bar[data-percent="70"] { width: 70%; }  .progress-bar[data-percent="80"] { width: 80%; }
.progress-bar[data-percent="90"] { width: 90%; }  .progress-bar[data-percent="100"] { width: 100%; }

.image-grid { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.image-grid li { position: relative; }
.image-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; display: block; background: var(--border); }
.badge {
  position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; font-weight: 600;
}
.badge-right { left: auto; right: 8px; }
.image-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding-top: 6px; font-size: 0.88rem; }
.upload input[type=file]:not(.visually-hidden) { font: inherit; width: 100%; max-width: 100%; min-width: 0; }
.subheading { font-size: 1rem; margin: 20px 0 8px; }
.date-selects { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.date-selects select {
  width: 100%; min-height: 48px; padding: 10px 8px; font: inherit;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.has-error .date-selects select { border-color: var(--error); }
.upload-pick { cursor: pointer; }
.upload-pick.busy { opacity: 0.6; pointer-events: none; }
.upload-input:focus-visible + .upload-pick { outline: 3px solid var(--accent); outline-offset: 2px; }
.upload-status:empty { display: none; }
.badge-private { background: var(--text); color: var(--surface); }
/* Billede fjernet af moderator: samme format som et billede, men uden billedet */
.removed-image {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px;
  aspect-ratio: 3 / 4; border-radius: 10px; text-align: center; font-size: 0.85rem; color: var(--error);
  background: repeating-linear-gradient(135deg, var(--info-bg) 0 10px, var(--surface) 10px 20px); border: 2px dashed var(--error);
}
.removed-image svg { width: 34px; height: 34px; fill: currentColor; opacity: 0.8; }
.removed-image span { color: var(--text); }
.removed-image small { color: var(--muted); }
.removed-note { margin: 0 0 12px; }
.moderate-form { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.moderate-form select { min-width: 0; flex: 1; font: inherit; font-size: 0.8rem; padding: 4px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
/* Drej billede: to runde knapper øverst til højre på billedet (animationer kan ikke drejes og har mærket der). */
.image-rotate { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; }
.icon-button {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); color: var(--text); font-size: 1.15rem; line-height: 1; opacity: 0.92;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.icon-button:hover, .icon-button:focus-visible { opacity: 1; border-color: var(--accent); }

/* Profil uden billede: en neutral silhuet i samme format som billederne (templates/_avatar.html). */
.photo-placeholder {
  display: grid; place-items: end center; width: 100%; aspect-ratio: 3 / 4; overflow: hidden;
  background: linear-gradient(160deg, var(--info-bg), var(--border)); color: var(--muted);
}
.photo-placeholder .silhouette { width: 62%; height: auto; fill: currentColor; opacity: 0.35; }
.profile-placeholder { border-radius: var(--radius); margin-bottom: 16px; max-width: 360px; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--muted); font-size: 0.88rem; }
.facts dd { margin: 0; white-space: pre-line; }

/* Navigation (M3) */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  display: flex; align-items: center; justify-content: center; min-height: 56px;
  text-decoration: none; color: var(--muted); font-size: 0.9rem; font-weight: 600;
}
.bottomnav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
body:has(.bottomnav) .page { padding-bottom: 88px; }

/* Udforsk (M3) */
.filters summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.filters[open] summary { margin-bottom: 12px; }
.badge-inline { padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; }
.cards { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.profile-card {
  display: flex; flex-direction: column; overflow: hidden; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.profile-card-link { display: block; flex: 1; text-decoration: none; color: var(--text); }
.card-actions { padding: 0 12px 12px; }

/* Likes og matches (M4) */
.like-form { margin: 0; }
.like-button {
  min-height: 40px; width: 100%; padding: 0 16px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
}
.like-button.liked { background: transparent; color: var(--accent); }
.like-state { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; width: 100%;
  border-radius: 999px; background: var(--info-bg); color: var(--accent); font-weight: 600; }
.person-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.person-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.person-list li .like-form { width: 120px; }
.small-link { font-size: 0.88rem; }
.profile-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: var(--border); }
.card-body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.card-text { margin: 4px 0 0; font-size: 0.88rem; color: var(--muted); }
.active-dot { font-size: 0.8rem; color: var(--success); }
.back-link { display: inline-block; margin-bottom: 12px; }

/* Beskeder (M5) */
.unread-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; font-weight: 700; margin-left: 4px;
}
.lock-badge { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--info-bg); color: var(--muted); font-size: 0.75rem; }
.inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inbox-item {
  display: grid; gap: 2px; padding: 12px 14px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.inbox-item.unread .inbox-name { font-weight: 700; }
.inbox-name { display: flex; align-items: center; font-weight: 600; }
.inbox-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 12px; }
.thread { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bubble {
  align-self: flex-start; max-width: 85%; padding: 10px 12px; border-radius: 16px 16px 16px 4px;
  background: var(--surface); border: 1px solid var(--border);
}
.bubble.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--info-bg); }
.bubble p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.bubble .sender { display: block; font-size: 0.8rem; color: var(--muted); }
.bubble-meta { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; font-size: 0.75rem; color: var(--muted); }
.bubble-meta .link { font-size: 0.75rem; color: var(--muted); }
.thread-marker { align-self: center; padding: 4px 12px; border-radius: 999px; background: var(--info-bg); color: var(--muted); font-size: 0.8rem; }
.composer textarea { min-height: 90px; }
.conversation-actions { margin-top: 24px; }
.button.danger { color: var(--error); border-color: var(--error); }
.safety-actions { display: flex; gap: 18px; justify-content: center; margin: 20px 0; font-size: 0.88rem; }
.safety-actions a, .safety-actions .link { color: var(--muted); }
.radio-list { display: grid; gap: 8px; }
.radio-list label { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.bubble-meta a { color: var(--muted); }

/* Pre-release indtil lanceringen (pages/prerelease.html) */
.prerelease-bar { display: block; padding: 8px 16px; text-align: center; font-size: 0.88rem; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); }
.prerelease-bar:hover { text-decoration: underline; }
.prerelease-hero { text-align: center; padding: 28px 0 12px; }
.prerelease-hero h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); margin: 6px 0 12px; }
.prerelease-hero .lead { max-width: 36rem; margin: 0 auto 24px; }
.prerelease-tag { display: inline-block; margin: 8px 0 0; padding: 4px 14px; border-radius: 999px; font-size: 0.8rem;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 96px)); justify-content: center; gap: 10px; margin: 0 auto 8px; }
.countdown > div { display: flex; flex-direction: column; align-items: center; padding: 14px 4px 10px; border-radius: var(--radius);
  background: var(--info-bg); border: 1px solid var(--border); }
.countdown span { font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 800; line-height: 1; color: var(--accent);
  font-variant-numeric: tabular-nums; }
.countdown small { margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
.prerelease-body { max-width: 640px; margin: 16px auto 0; }
.prerelease-body h2 { margin-top: 0; }
.prerelease-links { margin: 16px 0 0; font-size: 0.85rem; text-align: center; }

/* Verificering med selfie */
.verified-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 10px 2px 8px; border-radius: 999px;
  background: var(--info-bg); color: var(--success); font-size: 0.8rem; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.verified-badge::before { content: "✓"; font-weight: 700; }
.verified-badge.small { margin-left: 4px; padding: 0 7px 0 5px; font-size: 0.72rem; }
.card > p > .verified-badge:first-child { margin-left: 0; }
.gesture { color: var(--accent); }
.verify-compare { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.verify-compare figure { margin: 0; padding: 10px; }
.verify-compare figcaption { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.verify-compare img { width: 100%; max-height: 420px; object-fit: contain; border-radius: 8px; background: var(--info-bg); }
.sort-note { font-size: 0.85rem; }

/* Notifikationsvalg på Konto */
.notify-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; }
.notify-table th, .notify-table td { padding: 10px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.notify-table thead th { font-size: 0.82rem; font-weight: 600; color: var(--muted); text-align: center; width: 76px; }
.notify-table thead th:first-child { width: auto; }
.notify-table tbody th { text-align: left; font-weight: 600; }
.notify-table tbody th .muted { display: block; font-weight: 400; font-size: 0.85rem; }
.notify-table td { text-align: center; }
.notify-table input[type=checkbox] { width: 22px; height: 22px; }

/* Moderation (M6) */
.mod-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; font-size: 0.92rem; }
.mod-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 16px; }
.mod-table th, .mod-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.mod-table tr.high td { background: var(--info-bg); }
.history { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.evidence-text { white-space: pre-line; overflow-wrap: anywhere; }
.mod-conversation { margin-bottom: 10px; }
.mod-conversation summary { cursor: pointer; font-weight: 600; }

/* Administration (M7) */
.stats { margin: 0 0 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { display: flex; flex-direction: column; padding: 10px; border-radius: 10px; background: var(--info-bg); color: var(--text); text-decoration: none; border: 1px solid transparent; }
a.stat:hover, a.stat:focus-visible { border-color: var(--accent); }
a.stat .stat-value { color: var(--accent); }
.stat.warn { border-color: var(--error); }
.stat-label { font-size: 0.8rem; color: var(--muted); }
.stat-value { font-size: 1.3rem; font-weight: 700; }
.page.admin-wide { max-width: var(--app-width); }
.section-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; font-size: 0.92rem; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 8px; }
.admin-filter .field { margin: 0; }
.admin-filter input, .admin-filter select { min-height: 38px; padding: 4px 8px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-row .chip { text-decoration: none; color: var(--text); }
.chips-row .chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 4px; }
.tag { font-size: 0.75rem; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.tag.warn { border-color: var(--error); color: var(--error); }
.admin-users td.num, .admin-users th.num { text-align: right; white-space: nowrap; }
.admin-users td.warn { color: var(--error); font-weight: 700; }
.admin-users th.hl { color: var(--accent); }
.pager { display: flex; gap: 16px; }
.small-link { font-size: 0.9rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.inline-form select, .inline-form input {
  min-height: 36px; padding: 4px 8px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
.inline-form input[type=number] { width: 80px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.button.danger-fill { background: var(--error); color: #fff; }

/* Offentlige sider (M8) */
.page.public { max-width: 720px; }
.lead { font-size: 1.1rem; }
.hero .lead { max-width: 34rem; margin: 0 auto 20px; }
.hero-logo { display: block; max-width: 100%; height: auto; margin: 0 auto 8px; }
.public-section { padding: 24px 0; border-top: 1px solid var(--border); }
.public-section.cta { text-align: center; }
.steps { list-style: none; counter-reset: step; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px;
}
.steps li::before {
  content: counter(step); grid-row: span 2; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.steps span { color: var(--muted); }
.points { padding-left: 20px; }
.points li { margin-bottom: 8px; }
.prose h2 { margin-top: 1.75rem; }
.prose li { margin-bottom: 6px; }
.prose dt { font-weight: 600; margin-top: 10px; }
.prose dd { margin: 2px 0 0; }
.legal h2 { font-size: 1.05rem; }
.table-scroll { overflow-x: auto; margin: 16px 0; }
.prose table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.95rem; }
.prose caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
.prose th, .prose td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.compare td { text-align: center; }
.compare .yes { color: var(--success); font-weight: 700; }
.compare .no { color: var(--muted); }
.compare .small { font-size: 0.8rem; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary { cursor: pointer; list-style-position: inside; padding: 10px 0; }
.faq summary h2 { display: inline; font-size: 1.02rem; margin: 0; }
.faq details p { margin-top: 0; }
.early-bird-card { border-color: var(--accent); background: var(--info-bg); }
/* Formålssiden (pages/purpose.html) */
.purpose section { padding-top: 8px; }
.purpose-intro .lead { font-size: 1.25rem; font-weight: 600; color: var(--accent); }
.purpose-claim { margin: 18px 0; padding-left: 14px; border-left: 4px solid var(--accent); font-size: 1.12rem; font-weight: 700; }
.purpose-summary { margin: 32px 0 20px; padding: 20px 22px; border-radius: var(--radius); background: var(--info-bg);
  border: 1px solid var(--accent); }
.purpose-summary h2 { margin-top: 0; }
.purpose-summary ul { padding-left: 20px; }
.purpose-welcome { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.early-bird-card h2 { color: var(--accent); }
.removed-item { opacity: 0.85; border-style: dashed; }
.removed-item .inline { margin-top: 4px; }
.admin-item { border-color: var(--accent); }
.bubble.from-admin { border: 1px solid var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 16px; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.zodiac { margin: -0.5rem 0 0.75rem; color: var(--muted); }
.early-bird-note { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--accent); background: var(--info-bg); }
.early-bird-banner {
  display: block; margin: 0 auto 20px; max-width: 34rem; padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--info-bg); text-align: center; text-decoration: none; color: var(--text);
}
.early-bird-banner strong { color: var(--accent); }
.help-list ul { list-style: none; margin: 0; padding: 0; }
.help-list li { border-bottom: 1px solid var(--border); }
.help-list li:last-child { border-bottom: 0; }
.help-list a { display: flex; min-height: 48px; align-items: center; text-decoration: none; }
/* Profilsiden (profiles/view.html). Mobil: én kolonne i rækkefølgen hovedbillede, header, miniaturer,
   oplysninger. Desktop: billeder til venstre, header og oplysninger til højre. Billederne beskæres kun visuelt
   (object-fit: cover); filerne ændres ikke. */
.profile-view { display: flex; flex-direction: column; gap: 14px; }
.pv-media { display: contents; }
.pv-hero { order: 1; position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: var(--info-bg); aspect-ratio: 4 / 5; max-height: 72vh; width: 100%; }
/* Hovedbilledet vises helt uden beskæring (scale-down); miniaturerne beskæres (cover). */
.pv-hero img { width: 100%; height: 100%; object-fit: scale-down; display: block; }
.pv-hero-empty .photo-placeholder { height: 100%; aspect-ratio: auto; }
.pv-count { position: absolute; right: 10px; bottom: 10px; padding: 2px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.8rem; font-weight: 600; }
.pv-header { order: 2; }
.pv-thumbs { order: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.private-album { order: 4; }
.pv-about { order: 5; }
.pv-details { order: 6; }
.pv-safety { order: 7; }
.pv-thumb { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--border); }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.pv-thumb:hover img, .pv-thumb:focus-visible img { transform: scale(1.05); }
.pv-badge { position: absolute; left: 5px; bottom: 5px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px;
  border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.7rem; font-weight: 600; }
.pv-badge .lock-icon { width: 11px; height: 11px; }
.pv-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5);
  color: #fff; font-size: 1.3rem; font-weight: 700; }
.private-album { margin: 0; }
.private-album h2 { margin: 0; }
.private-album-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.private-album-head p { margin: 0; }
.private-album-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--info-bg); color: var(--accent); }
.private-album-icon .lock-icon { width: 22px; height: 22px; }
.private-album .button .lock-icon { margin-right: 8px; }
.locked-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.locked-tile {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--info-bg) 0 10px, var(--border) 10px 20px);
}
.locked-tile .lock-icon { width: 26px; height: 26px; opacity: 0.6; }
.lock-icon { width: 16px; height: 16px; fill: currentColor; flex: none; }
.pv-header h1 { display: flex; align-items: baseline; gap: 10px; font-size: 1.85rem; line-height: 1.1; margin: 0 0 6px; }
.pv-age { font-weight: 400; color: var(--muted); }
.pv-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
.pv-active { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 600; }
.pv-active::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pv-actions .like-form { width: auto; }
.pv-actions .like-button, .pv-actions .like-state, .action-button { width: auto; min-height: 42px; padding: 0 20px; font-size: 0.95rem; }
.action-button { display: inline-flex; align-items: center; gap: 6px; }
.action-note { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.action-note.muted { color: var(--muted); font-weight: 400; }
.pv-about { position: relative; margin: 4px 0 18px; padding-left: 30px; }
.pv-about::before { content: "\201C"; position: absolute; left: 0; top: -14px; font-family: Georgia, "Times New Roman", serif;
  font-size: 3.4rem; line-height: 1; color: var(--accent); opacity: 0.5; }
.pv-about p { margin: 0; font-size: 1.08rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.pv-facts { margin: 0 0 16px; }
.pv-facts h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 6px;
  padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.pv-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.pv-fact { min-width: 0; }
.pv-fact.long { grid-column: 1 / -1; }
.pv-fact dt { font-size: 0.78rem; color: var(--muted); }
.pv-fact dd { margin: 0; overflow-wrap: anywhere; }
.pv-tag { display: inline-block; margin: 2px 4px 0 0; padding: 1px 9px; border-radius: 999px; background: var(--info-bg); font-size: 0.85rem; }
.pv-safety { justify-content: flex-start; margin: 8px 0 0; }
.preview-note p { margin: 0; }
.confirm-delete-image { display: block; width: 160px; max-width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 6, 12, 0.94); color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; grid-template-rows: 1fr auto; align-items: center; }
.lightbox::backdrop { background: rgba(10, 6, 12, 0.94); }
.lightbox-image { grid-column: 2; grid-row: 1; max-width: 100%; max-height: calc(100vh - 80px); margin: auto; object-fit: contain; border-radius: 6px; }
.lightbox-prev, .lightbox-next, .lightbox-close {
  border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; justify-self: center;
}
.lightbox-prev { grid-column: 1; grid-row: 1; }
.lightbox-next { grid-column: 3; grid-row: 1; }
.lightbox-close { position: absolute; top: 12px; right: 12px; z-index: 1; }
.lightbox-caption { grid-column: 1 / -1; grid-row: 2; text-align: center; margin: 8px 0 16px; font-size: 0.9rem; opacity: 0.85; }
/* Adgang til private billeder */
.access-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.access-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.access-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick img { border: 3px solid transparent; }
.pick input:checked ~ img { border-color: var(--accent); }
.pick input:focus-visible ~ img { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick-mark {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); color: transparent; border: 2px solid var(--border); font-weight: 700;
}
.pick input:checked ~ .pick-mark { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Notifikationer, små profilbilleder og "skjul likede" */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 5px; border-radius: 999px; background: var(--badge); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1;
}
.nav-badge[hidden] { display: none; }
.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; background: var(--border);
}
.avatar-letter { display: inline-flex; align-items: center; justify-content: center; background: var(--info-bg); color: var(--accent); font-weight: 700; }
.avatar-empty { display: inline-flex; align-items: flex-end; justify-content: center; overflow: hidden;
  background: linear-gradient(160deg, var(--info-bg), var(--border)); color: var(--muted); }
.avatar-empty .silhouette { width: 78%; height: auto; fill: currentColor; opacity: 0.45; }
.avatar-admin { background: var(--accent); color: var(--accent-ink); }
.removed-item .avatar { opacity: 0.6; }
.admin-image { position: relative; display: block; }
.admin-image.is-deleted img { opacity: 0.55; outline: 2px dashed var(--error); outline-offset: -2px; }
.admin-image.is-deleted .badge { background: var(--error); color: #fff; }
.inbox-item { display: flex; align-items: center; gap: 12px; }
.inbox-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.new-badge { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--badge); color: #fff; font-size: 0.72rem; font-weight: 700; }
.explore-toggles { align-items: center; margin: -4px 0 12px; }
.explore-toggles .small-link { color: var(--muted); }
.toasts {
  position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 20;
  display: grid; gap: 8px; width: min(340px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: center; gap: 8px; padding: 12px 10px 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--accent); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  animation: toast-in 0.25s ease-out; transition: opacity 0.4s, transform 0.4s;
}
.toast a { flex: 1; color: var(--text); text-decoration: none; }
.toast a strong { color: var(--accent); }
.toast.leaving { opacity: 0; transform: translateY(8px); }
.toast-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }
.site-footer { padding: 24px 16px; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 0.88rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }
body:has(.bottomnav) .site-footer { padding-bottom: 80px; }

@media (min-width: 768px) {
  .site-footer { order: 4; }
  body:has(.bottomnav) .site-footer { padding-bottom: 24px; }
  .page { padding-top: 32px; }
  .actions { grid-template-columns: 1fr 1fr; }
  .image-grid { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .bottomnav { position: static; width: 100%; max-width: 560px; margin: 0 auto; border: 0; border-bottom: 1px solid var(--border); background: transparent; }
  body:has(.bottomnav) .page { padding-bottom: 48px; }
  body { display: flex; flex-direction: column; }
  .topbar { order: 0; }
  .bottomnav { order: 1; }
  .notice { order: 2; }
  .page { order: 3; width: 100%; }

  /* Indloggede på desktop: topbjælke, menu og indhold følger samme bredde som administrationen,
     i stedet for en forstørret mobilside. Offentlige sider og log ind beholder den smalle læsebredde. */
  .member .page { max-width: var(--app-width); }
  .member .topbar { padding-inline: max(16px, calc((100% - var(--app-width)) / 2 + 16px)); }
  .member .bottomnav { display: flex; gap: 4px; max-width: var(--app-width); padding: 0 16px; }
  .member .bottomnav a { min-height: 48px; padding: 0 18px; }
  .member .page > p, .member .page > .form:not(:has(.panels)):not(.composer), .member .page.public > * { max-width: 760px; }
  .member .page > .button.wide { max-width: 360px; }
  .form > .button { justify-self: start; width: auto; min-width: 200px; }
  .actions { display: flex; flex-wrap: wrap; }
  .panels { columns: 2; column-gap: 16px; }
  .panels > * { break-inside: avoid; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .image-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .filters .form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .filters .form > .checkbox, .filters .form > .actions { grid-column: 1 / -1; }
  /* Billeder til venstre over alle rækker; til højre header, profiltekst, oplysninger og til sidst en række,
     der tager resten af højden, så der aldrig opstår huller mellem elementerne i højre kolonne. */
  .profile-view {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 32px; row-gap: 0;
    grid-template-areas: "media header" "media about" "media details" "media safety"; grid-template-rows: auto auto auto 1fr;
  }
  .pv-media { align-self: start; }
  .pv-media { grid-area: media; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .pv-header { grid-area: header; align-self: start; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
  .pv-about { grid-area: about; align-self: start; margin-top: 20px; }
  .pv-details { grid-area: details; margin-top: 20px; }
  .pv-safety { grid-area: safety; align-self: start; }
  .pv-hero { aspect-ratio: auto; height: 450px; max-height: none; }
  .pv-thumbs { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
  .pv-header h1 { font-size: 2.2rem; }
  .bubble { max-width: min(85%, 640px); }
  .toasts { bottom: 24px; right: 24px; }
  .desktop-only { display: inline-flex !important; }
}
