/*
Theme Name: Lysty
Description: Ruhiges, responsives Theme für tägliche Briefe mit Audioplayer.
Version: 1.0.0
Requires PHP: 8.2
Text Domain: lysty
*/

@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/cormorant-garamond-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url(assets/fonts/cormorant-garamond-cyrillic-400-italic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/cormorant-garamond-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/lora-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/lora-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(assets/fonts/lora-cyrillic-400-italic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(assets/fonts/lora-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }

:root {
  --bg: #f4ece1;
  --bg-deep: #ead9c6;
  --paper: #fffaf3;
  --ink: #2b1d1a;
  --ink-soft: #6d5650;
  --wine: #8c2f39;
  --wine-soft: #b5525d;
  --rose: #e7c3bd;
  --gold: #b88a4a;
  --line: rgba(43, 29, 26, .12);
  --shadow: 0 1px 2px rgba(60, 30, 20, .06), 0 12px 40px -12px rgba(90, 40, 30, .25);
  --radius: 18px;
  --display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --text: "Lora", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1214;
    --bg-deep: #241619;
    --paper: #2a1b1e;
    --ink: #f3e6dc;
    --ink-soft: #c2aba2;
    --wine: #e08a93;
    --wine-soft: #f0a7ae;
    --rose: #5a3036;
    --gold: #d8b27a;
    --line: rgba(243, 230, 220, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 50px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--rose) 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--bg-deep) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 1.0625rem/1.75 var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--wine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--wine-soft); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, 720px); margin-inline: auto; }

/* Kopf */
.site-head { padding: 40px 0 8px; text-align: center; }
.site-head a { text-decoration: none; color: inherit; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.seal { width: 46px; height: 46px; color: var(--wine); }
.site-title { font: italic 400 clamp(1.9rem, 6vw, 2.6rem)/1.1 var(--display); letter-spacing: .01em; margin: 0; }
.site-sub { font: 400 .8rem/1 var(--text); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }

/* Brief */
.letter {
  position: relative;
  margin: 28px 0 40px;
  padding: clamp(28px, 6vw, 64px) clamp(22px, 6vw, 68px) clamp(32px, 6vw, 60px);
  background:
    linear-gradient(transparent 0 0),
    var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.letter::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 31px, var(--line) 31px 32px);
  opacity: .25;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 80px), transparent 100%);
}
.letter > * { position: relative; }
.letter-date { font: italic 400 1.15rem/1.3 var(--display); color: var(--ink-soft); margin: 0 0 6px; }
.letter-title { font: 600 clamp(1.8rem, 5.2vw, 2.6rem)/1.15 var(--display); margin: 0 0 26px; color: var(--ink); text-wrap: balance; }
.letter-body p { margin: 0 0 1.15em; hyphens: auto; }
.letter-body > p:first-of-type::first-letter {
  float: left;
  font: 600 4.1em/.82 var(--display);
  padding: .06em .1em 0 0;
  color: var(--wine);
}
.letter-body p:last-child { margin-bottom: 0; }
.letter-sign {
  margin: 34px 0 0;
  text-align: right;
  font: italic 400 clamp(1.6rem, 5vw, 2rem)/1.2 var(--display);
  color: var(--wine);
}
.letter-sign::before { content: ""; display: block; width: 72px; height: 1px; margin: 0 0 14px auto; background: var(--gold); opacity: .6; }

/* Player */
.player {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 0 0 32px;
  padding: 14px 18px 14px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--wine) 8%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--wine) 18%, transparent);
}
.player-btn {
  width: 52px; height: 52px;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wine);
  color: var(--paper);
  cursor: pointer;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--wine) 70%, transparent);
  transition: transform .15s ease, background .2s ease;
}
.player-btn:hover { background: var(--wine-soft); }
.player-btn:active { transform: scale(.95); }
.player-btn svg { width: 22px; height: 22px; }
.player-btn .i-pause { display: none; }
.player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: block; }
.player-main { min-width: 0; }
.player-label { font: italic 400 1.05rem/1.2 var(--display); color: var(--ink-soft); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-row { display: flex; align-items: center; gap: 12px; }
.player-bar {
  position: relative;
  flex: 1;
  height: 28px;
  cursor: pointer;
  touch-action: none;
}
.player-bar::before, .player-fill {
  content: "";
  position: absolute; left: 0; top: 50%;
  height: 4px; margin-top: -2px;
  border-radius: 4px;
}
.player-bar::before { right: 0; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.player-fill { width: 0; background: var(--wine); }
.player-fill::after {
  content: "";
  position: absolute; right: -7px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%;
  background: var(--wine);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 20%, transparent);
}
.player-time { font: 400 .82rem/1 var(--text); font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; }

/* Archiv */
.section-title { font: italic 400 1.5rem/1.2 var(--display); color: var(--ink-soft); text-align: center; margin: 8px 0 18px; }
.archive { list-style: none; margin: 0 0 48px; padding: 0; display: grid; gap: 12px; }
.archive a {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.archive a:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: transparent; }
.archive .day { text-align: center; line-height: 1; }
.archive .day b { display: block; font: 600 1.9rem/1 var(--display); color: var(--wine); }
.archive .day span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.archive .t { font: 600 1.25rem/1.25 var(--display); }
.archive .ex { display: block; font-size: .9rem; line-height: 1.5; color: var(--ink-soft); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.archive .heart { width: 18px; height: 18px; color: var(--wine); opacity: .55; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin: -24px 0 48px; font: italic 400 1.15rem/1.3 var(--display); }
.pager a { text-decoration: none; }

.empty { text-align: center; padding: 60px 0; font: italic 400 1.4rem/1.4 var(--display); color: var(--ink-soft); }

/* Fuß */
.site-foot { text-align: center; padding: 8px 0 40px; font-size: .85rem; color: var(--ink-soft); }
.site-foot a { color: inherit; }
.site-foot .dot { margin: 0 .6em; opacity: .5; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: min(100%, 400px);
  text-align: center;
  padding: 44px 32px 36px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.login-card .seal { width: 60px; height: 60px; margin-bottom: 8px; }
.login-card h1 { font: italic 400 2.2rem/1.1 var(--display); margin: 0 0 6px; }
.login-card p { margin: 0 0 24px; color: var(--ink-soft); font-size: .95rem; }
.login-card input[type=password] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: 400 1.05rem/1.2 var(--text);
  text-align: center;
  letter-spacing: .08em;
}
.login-card input[type=password]:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wine) 15%, transparent); }
.login-card button {
  width: 100%;
  margin-top: 12px;
  padding: 14px 16px;
  border: 0; border-radius: 12px;
  background: var(--wine); color: var(--paper);
  font: 600 1.25rem/1 var(--display);
  letter-spacing: .03em;
  cursor: pointer;
}
.login-card button:hover { background: var(--wine-soft); }
.login-card .err { color: var(--wine); font-size: .9rem; margin: 12px 0 0; }
.login-card .remember { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: .85rem; color: var(--ink-soft); }

/* Podcast-Hinweis */
.feed-box {
  margin: 0 0 48px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--wine) 35%, transparent);
  font-size: .92rem;
  color: var(--ink-soft);
}
.feed-box summary { cursor: pointer; font: italic 400 1.2rem/1.3 var(--display); color: var(--ink); list-style: none; display: flex; align-items: center; gap: 10px; }
.feed-box summary::-webkit-details-marker { display: none; }
.feed-box summary svg { width: 20px; height: 20px; color: var(--wine); flex: none; }
.feed-box input { width: 100%; margin: 12px 0 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: .85rem/1.3 ui-monospace, monospace; }
.feed-box .row { display: flex; gap: 8px; flex-wrap: wrap; }
.feed-box .btn { display: inline-block; padding: 9px 14px; border-radius: 10px; background: var(--wine); color: var(--paper); text-decoration: none; border: 0; cursor: pointer; font: 400 .9rem/1 var(--text); }
.feed-box .btn.ghost { background: transparent; color: var(--wine); border: 1px solid currentColor; }

@media (max-width: 520px) {
  body { font-size: 1rem; line-height: 1.7; }
  .site-head { padding-top: 28px; }
  .player { border-radius: 22px; padding: 12px 14px 12px 12px; gap: 12px; }
  .player-btn { width: 46px; height: 46px; }
  .archive a { grid-template-columns: 52px 1fr; padding: 12px 14px; gap: 12px; }
  .archive .heart { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  body { background: #fff; }
  .player, .site-foot, .feed-box, .archive, .pager { display: none; }
  .letter { box-shadow: none; }
}

/* Admin-Leiste */
body.admin-bar .login-page { min-height: calc(100vh - 32px); }
@media (max-width: 782px) { body.admin-bar .login-page { min-height: calc(100vh - 46px); } }
