@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

@font-face {
  font-family: 'Antonio';
  src: url('fonts/Antonio-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #F7F4EE;
  --bg-card: #FFFFFF;
  --ink: #2A2620;
  --ink-dim: #837B6C;
  --accent: #B8650C;
  --accent-soft: #F0DFC6;
  --accent2: #3E6E64;
  --line: #E6E0D2;
  --holder: #4C7A52;
  --holder-ikke: #B5523F;
  --twitter: #1D9BF0;
}

/* KSDH-mode: farver og fonte inspireret af AGF, ikke andet fra klubben end det */
[data-theme="ksdh"] {
  --bg: #FFFFFF;
  --bg-card: #F3F9FD;
  --ink: #0C1316;
  --ink-dim: #56666F;
  --accent: #0E76BC;
  --accent-soft: #DCEEFA;
  --accent2: #0C1316;
  --line: #D6E4EC;
  --twitter: #0E76BC;
}
[data-theme="ksdh"] h1,
[data-theme="ksdh"] h2,
[data-theme="ksdh"] h3,
[data-theme="ksdh"] .gvfb-logo {
  font-family: 'Antonio', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 700;
}
[data-theme="ksdh"] body {
  font-family: 'Montserrat', sans-serif;
}
[data-theme="ksdh"] .gvfb-nav nav a,
[data-theme="ksdh"] .meta-line,
[data-theme="ksdh"] .barometer-meta,
[data-theme="ksdh"] .status,
[data-theme="ksdh"] .tip-btn,
[data-theme="ksdh"] .post-meta,
[data-theme="ksdh"] .reply-meta,
[data-theme="ksdh"] .error,
[data-theme="ksdh"] .success,
[data-theme="ksdh"] table.admin-table th,
[data-theme="ksdh"] .admin-tabs a,
[data-theme="ksdh"] .avatar-fallback,
[data-theme="ksdh"] .gvfb-footer {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.02em;
}
[data-theme="ksdh"] button,
[data-theme="ksdh"] .btn,
[data-theme="ksdh"] input,
[data-theme="ksdh"] textarea,
[data-theme="ksdh"] select {
  font-family: 'Montserrat', sans-serif;
}
[data-theme="ksdh"] button,
[data-theme="ksdh"] .btn {
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
[data-theme="ksdh"] .couple-card,
[data-theme="ksdh"] .person-col,
[data-theme="ksdh"] .post,
[data-theme="ksdh"] .compose {
  border-radius: 4px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  margin: 0;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 10px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.gvfb-nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg-card);
}
.gvfb-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.gvfb-logo {
  font-family: 'Fraunces', serif; font-weight: 900; font-size: 1.05rem;
  letter-spacing: 0.01em; color: var(--ink);
}
.gvfb-nav nav a {
  margin-left: 18px; font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem;
  color: var(--ink-dim); text-decoration: none;
}
.gvfb-nav nav a:first-child { margin-left: 0; }
.gvfb-nav nav a:hover { color: var(--accent); }
.nav-profile { display: inline-flex; align-items: center; gap: 6px; }

.ksdh-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 18px;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--ink-dim);
}
.ksdh-toggle:hover { color: var(--accent); }
.ksdh-track {
  width: 34px; height: 18px; border-radius: 20px; background: var(--line);
  position: relative; transition: background 0.15s ease; flex-shrink: 0;
}
.ksdh-thumb {
  position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform 0.15s ease;
}
.ksdh-toggle[aria-pressed="true"] .ksdh-track { background: #0E76BC; }
.ksdh-toggle[aria-pressed="true"] .ksdh-thumb { transform: translateX(16px); }

.gvfb-main { max-width: 960px; margin: 0 auto; padding: 34px 22px 60px; }

.gvfb-footer {
  max-width: 960px; margin: 0 auto; padding: 30px 22px 60px;
  color: var(--ink-dim); font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem;
  border-top: 1px solid var(--line);
}

/* Kort-grid til parrene */
.couple-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.couple-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.couple-card:hover { box-shadow: 0 6px 18px rgba(42,38,32,0.08); transform: translateY(-2px); text-decoration: none; }
.couple-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.couple-card .status,
.couple-card h3 { padding-left: 16px; padding-right: 16px; }
.couple-card h3 { font-size: 1rem; margin: 14px 0 6px; }
.couple-card .status {
  display: inline-block; margin-left: 16px; font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem; text-transform: uppercase; padding: 3px 9px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent);
}
.barometer-meta {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--ink-dim);
  padding: 10px 16px 16px;
}

.couple-frame-empty {
  aspect-ratio: 4/5; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ECE6D6, #DCD4BE);
  font-family: 'Fraunces', serif; font-size: 2.2rem; color: #A9895E;
}
.couple-photo-empty {
  aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ECE6D6, #DCD4BE); border-radius: 8px; margin: 16px 0;
  font-family: 'Fraunces', serif; font-size: 2.6rem; color: #A9895E;
}

/* Blå bog */
.blaa-bog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.person-col { background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.person-col dt { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; text-transform: uppercase; color: var(--accent2); margin-top: 10px; }
.person-col dt:first-child { margin-top: 0; }
.person-col dd { margin: 2px 0 0; }
.couple-photo { width: 100%; max-height: 420px; object-fit: cover; margin: 16px 0; border-radius: 8px; }

/* Barometer */
.barometer { margin: 24px 0; }
.barometer-bar { display: flex; height: 22px; border-radius: 20px; overflow: hidden; font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; background: var(--line); }
.barometer-bar .holder { background: var(--holder); display: flex; align-items: center; justify-content: center; color: #fff; }
.barometer-bar .holder-ikke { background: var(--holder-ikke); display: flex; align-items: center; justify-content: center; color: #fff; }
.barometer .barometer-meta { padding: 0; margin-top: 8px; }

/* Tip-knapper */
.tip-form { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; align-items: center; }
.tip-btn {
  font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; font-size: 0.78rem;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--ink); border-radius: 40px;
  padding: 11px 18px; cursor: pointer;
}
.tip-btn.active-holder { background: var(--holder); border-color: var(--holder); color: #fff; }
.tip-btn.active-holder-ikke { background: var(--holder-ikke); border-color: var(--holder-ikke); color: #fff; }
.tip-btn:hover { border-color: var(--accent); }

/* Avatarer */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-fallback {
  background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace; font-weight: 500;
}

/* Twiter-feed */
.compose { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-card); display: flex; gap: 12px; margin-bottom: 24px; }
.compose textarea { width: 100%; border: none; resize: none; font-family: 'Inter'; font-size: 0.95rem; padding: 6px 0 0; color: var(--ink); background: transparent; outline: none; min-height: 50px; }
.compose-actions { display: flex; justify-content: flex-end; }
.tweet-btn, .compose-actions button {
  background: var(--twitter); color: #fff; border: none; border-radius: 20px; padding: 9px 20px;
  font-weight: 700; font-size: 0.85rem; cursor: pointer; font-family: 'Inter';
}
.tweet-btn:hover { background: #1a8cd8; }

.post { border: 1px solid var(--line); background: var(--bg-card); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; display: flex; gap: 12px; }
.post-body { flex: 1; min-width: 0; }
.post-meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--ink-dim); margin-bottom: 4px; }
.post-content { white-space: pre-wrap; font-size: 0.95rem; }
.post-actions { margin-top: 10px; font-family: 'Inter', sans-serif; font-size: 0.82rem; display: flex; gap: 22px; }
.post-actions button, .post-actions span { background: none; border: none; color: var(--ink-dim); cursor: pointer; padding: 0; font-family: inherit; font-size: inherit; }
.post-actions button:hover { color: var(--twitter); }
.post-actions .liked { color: #E0245E; }
.replies { margin-top: 12px; padding-left: 4px; border-left: 2px solid var(--line); }
.reply { margin-bottom: 10px; display: flex; gap: 8px; padding-left: 12px; }
.reply-meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--ink-dim); }

/* Forms */
form.stack { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
label { font-size: 0.9rem; display: flex; flex-direction: column; gap: 5px; }
input, textarea, select {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; color: var(--ink);
  padding: 10px 12px; font-family: 'Inter', sans-serif; font-size: 0.95rem;
}
textarea { min-height: 90px; resize: vertical; }
button, .btn {
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.88rem;
  background: var(--accent); border: none; color: #fff; border-radius: 8px; padding: 12px 18px; cursor: pointer;
  width: fit-content;
}
button:hover, .btn:hover { background: #a3590a; text-decoration: none; }
.btn-secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); }

.error { color: var(--holder-ikke); font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; }
.success { color: var(--holder); font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; }
.meta-line { color: var(--ink-dim); font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; }

table.admin-table { width: 100%; border-collapse: collapse; margin-top: 16px; background: var(--bg-card); }
table.admin-table th, table.admin-table td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; font-size: 0.9rem; }
table.admin-table th { font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; font-size: 0.7rem; color: var(--accent2); background: var(--bg); }

.admin-tabs { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-tabs a { font-family: 'IBM Plex Mono', monospace; font-size: 0.76rem; text-transform: uppercase; padding: 8px 14px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-dim); }
.admin-tabs a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.recap-card { border-bottom: 1px solid var(--line); padding: 20px 0; }
.recap-card h3 { margin-bottom: 4px; }

.liga-rank { font-family: 'IBM Plex Mono', monospace; font-weight: 600; text-align: center; }
.badge-chip { display: inline-block; font-size: 1.15rem; margin-right: 4px; cursor: default; }

.avatar-anon {
  background: var(--line); color: var(--ink-dim); display: flex; align-items: center; justify-content: center;
  font-size: 0.9em; line-height: 1;
}

.thermometer { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.thermometer-shell {
  width: 30px; height: 130px; border: 2px solid var(--line); border-radius: 16px;
  position: relative; overflow: hidden; background: var(--bg-card);
}
.thermometer-fill { position: absolute; bottom: 0; left: 0; width: 100%; transition: height 0.2s ease; }
.thermometer-bulb {
  width: 42px; height: 42px; border-radius: 50%; margin-top: -18px;
  border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--line);
}
.thermometer-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; font-weight: 600; color: var(--ink); }

.temp-timeline { width: 100%; height: 140px; margin-top: 10px; }
.temp-timeline circle { cursor: default; }
