:root {
  --bg: #f3ede1; --bg-2: #ebe3d3; --ink: #1f2a26; --ink-2: #5b655f; --ink-3: #8b928b;
  --line: #d8cdb8; --card: #fffcf5; --felt: #2f6a50; --felt-2: #24563f; --felt-ink: #eef6ef;
  --brass: #b07d1c; --brass-soft: #f1dfb4; --accent: #c2410c; --good: #2f7d4f;
  --shadow: 0 1px 2px rgb(40 30 10 / .08), 0 8px 24px rgb(40 30 10 / .08);
  --shadow-hi: 0 2px 4px rgb(40 30 10 / .1), 0 16px 36px rgb(40 30 10 / .14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1714; --bg-2: #10201b; --ink: #e9eee9; --ink-2: #a5b2ab; --ink-3: #6f7d76;
    --line: #23352f; --card: #13221d; --felt: #174535; --felt-2: #10352a; --felt-ink: #e9f3ec;
    --brass: #e0b04c; --brass-soft: #3a2f16; --accent: #ff8a5b; --good: #6fd39a;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35);
    --shadow-hi: 0 2px 4px rgb(0 0 0 / .45), 0 18px 40px rgb(0 0 0 / .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1714; --bg-2: #10201b; --ink: #e9eee9; --ink-2: #a5b2ab; --ink-3: #6f7d76;
  --line: #23352f; --card: #13221d; --felt: #174535; --felt-2: #10352a; --felt-ink: #e9f3ec;
  --brass: #e0b04c; --brass-soft: #3a2f16; --accent: #ff8a5b; --good: #6fd39a;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35);
  --shadow-hi: 0 2px 4px rgb(0 0 0 / .45), 0 18px 40px rgb(0 0 0 / .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }

/* Kopf */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; max-width: 1080px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; }
.brand span { font: italic 700 1.45rem/1 var(--serif); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: .92rem; }
.who a { text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.who .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: #1b1407; font-weight: 800; font-size: .85rem; }
main { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }

/* Begrüßung */
.hello { padding: clamp(18px, 5vw, 48px) 0 clamp(20px, 4vw, 36px); }
.date { margin: 0 0 6px; color: var(--ink-2); font-weight: 600; letter-spacing: .02em; }
.hello h1 { font: italic 800 clamp(2.4rem, 8vw, 4.4rem)/1 var(--serif); margin: 0; letter-spacing: -.01em; }
.hello h1 em { color: var(--brass); }

.quote {
  position: relative; margin: clamp(22px, 4vw, 34px) 0 0; padding: clamp(22px, 4vw, 34px) clamp(22px, 4.5vw, 44px) clamp(20px, 3.5vw, 28px);
  background: radial-gradient(120% 120% at 15% 0%, var(--felt) 0%, var(--felt-2) 80%);
  color: var(--felt-ink); border-radius: 22px; box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--brass) 30%, transparent); overflow: hidden;
}
.quote::after { /* feine Linie wie ein Lesezeichen */
  content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass);
}
.qmark { position: absolute; right: clamp(16px, 4vw, 34px); top: clamp(14px, 3vw, 24px); width: clamp(44px, 9vw, 72px); fill: var(--brass); opacity: .22; }
.quote blockquote {
  margin: 0; max-width: 46rem; font: italic 500 clamp(1.3rem, 3.4vw, 1.9rem)/1.35 var(--serif); text-wrap: balance;
  animation: rise .7s ease-out both;
}
.quote figcaption { margin-top: 14px; font-weight: 700; font-size: .95rem; color: color-mix(in srgb, var(--felt-ink) 92%, transparent); animation: rise .7s .15s ease-out both; }
.quote figcaption::before { content: "— "; color: var(--brass); }
.quote figcaption span { font-weight: 400; opacity: .7; margin-left: 8px; font-style: italic; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Apps */
.group { margin-top: 26px; }
.group h2 { display: flex; align-items: baseline; gap: 10px; font: italic 700 1.45rem/1 var(--serif); margin: 0 0 14px; }
.group h2 .count { font: 700 .75rem/1 ui-sans-serif, system-ui, sans-serif; color: var(--ink-3); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.tile {
  position: relative; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: 1fr auto; column-gap: 14px; row-gap: 12px;
  padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s; min-height: 132px;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); border-color: color-mix(in srgb, var(--brass) 55%, var(--line)); }
.tile:focus-visible { outline: 3px solid color-mix(in srgb, var(--brass) 60%, transparent); outline-offset: 2px; }
.tile .ic {
  grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center;
  background: var(--brass-soft); border: 1px solid color-mix(in srgb, var(--brass) 30%, transparent); overflow: hidden;
}
.tile .ic img { width: 40px; height: 40px; display: block; }
.tile .ic.emoji { font-size: 1.8rem; }
.tile .ic.letter { font: italic 800 1.6rem/1 var(--serif); color: var(--brass); }
.tile .tx { display: grid; gap: 4px; padding-right: 22px; align-content: start; }
.tile strong { font-size: 1.08rem; line-height: 1.2; }
.tile .desc { color: var(--ink-2); font-size: .9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile .badges { display: flex; flex-wrap: wrap; gap: 6px; align-self: end; }
.tile .go { position: absolute; right: 16px; top: 18px; color: var(--ink-3); transition: color .18s, transform .18s; }
.tile:hover .go { color: var(--brass); transform: translate(2px, -2px); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.badge.open { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.badge.new { background: var(--accent); color: #fff; }

.login-card {
  margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 18px; border: 1px dashed color-mix(in srgb, var(--brass) 60%, var(--line)); background: color-mix(in srgb, var(--brass-soft) 45%, transparent);
}
.login-card > div { display: grid; gap: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 22px; border-radius: 12px; font-weight: 650; text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; }

.foot { margin-top: 40px; display: flex; gap: 8px; justify-content: center; color: var(--ink-3); font-size: .85rem; }
.foot .link { color: var(--ink-2); }

@media (max-width: 520px) {
  .tile { grid-template-columns: 48px 1fr; padding: 16px; min-height: 0; }
  .tile .ic { width: 48px; height: 48px; border-radius: 13px; }
  .tile .ic img { width: 34px; height: 34px; }
  .who .nm { display: none; }
  .login-card .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
}
