/* ───────── Couplr · Design-Tokens ───────── */
:root {
  --bg: #FBF7F2; --surface: #FFFFFF; --surface-2: #F4EDE5; --line: #E8DFD5;
  --ink: #1F1B18; --ink-2: #4A433D; --muted: #7A7067; --faint: #A69B90;
  --accent: #D9634A; --accent-ink: #FFF7F3; --accent-soft: #F9E4DD;
  --teal: #3B7D8C; --teal-soft: #DFEDF0; --amber: #C48A1B; --amber-soft: #F7EAD0; --green: #2F8F5B; --green-soft: #DDEFE4;
  --f-abend: #D9634A; --f-tag: #C48A1B; --f-wochenende: #3B7D8C;
  --glut: #8E2F2F; --glut-soft: #F3DEDB;
  --radius: 18px; --radius-s: 12px; --shadow: 0 1px 2px rgba(31,27,24,.06), 0 8px 24px -12px rgba(31,27,24,.18);
  --nav-h: 64px; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130F; --surface: #221E19; --surface-2: #2C2620; --line: #3A322B;
    --ink: #F3ECE4; --ink-2: #D9CFC5; --muted: #A79C91; --faint: #7A7067;
    --accent: #E4715A; --accent-ink: #1F1B18; --accent-soft: #3D2620;
    --teal: #63A6B5; --teal-soft: #1F343A; --amber: #D9A23A; --amber-soft: #3A2E17; --green: #55B07F; --green-soft: #1E3529;
    --f-abend: #E4715A; --f-tag: #D9A23A; --f-wochenende: #63A6B5;
    --glut: #D9634A; --glut-soft: #3A2222;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0; }
small, .small { font-size: .85rem; } .muted { color: var(--muted); } .faint { color: var(--faint); }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───────── Layout ───────── */
.app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--sat)) 18px 10px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.brand-name { font-weight: 700; letter-spacing: -0.02em; font-size: 1.15rem; }
.logo { position: relative; width: 30px; height: 30px; display: inline-block; transition: filter .3s; }
.logo i { position: absolute; top: 5px; width: 18px; height: 18px; border: 3.5px solid var(--accent); border-radius: 50%; }
.logo i:first-child { left: 0; } .logo i:last-child { left: 9px; }
.logo.warm-1 i { border-color: color-mix(in srgb, var(--accent) 80%, var(--glut)); }
.logo.warm-2 i { border-color: color-mix(in srgb, var(--accent) 55%, var(--glut)); }
.logo.warm-3 i { border-color: var(--glut); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--glut) 60%, transparent)); }
.view { flex: 1; padding: 6px 18px calc(var(--nav-h) + var(--sab) + 24px); outline: none; }
.view > * + * { margin-top: 14px; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(var(--nav-h) + var(--sab)); padding-bottom: var(--sab); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); max-width: 720px; margin: 0 auto; }
.bottomnav a { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .72rem; font-weight: 600; text-decoration: none; position: relative; }
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.active { color: var(--accent); }
.bottomnav a .dot { position: absolute; top: 9px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.bottomnav.hidden { display: none; }

/* ───────── Bausteine ───────── */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.tone-abend { border-left: 5px solid var(--f-abend); }
.card.tone-tag { border-left: 5px solid var(--f-tag); }
.card.tone-wochenende { border-left: 5px solid var(--f-wochenende); }
.card.glut { background: linear-gradient(160deg, var(--surface), var(--glut-soft)); }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 8px; }
.section-title h2 { font-size: 1.05rem; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow.abend { color: var(--f-abend); } .eyebrow.tag { color: var(--f-tag); } .eyebrow.wochenende { color: var(--f-wochenende); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .8rem; font-weight: 600; border: 1px solid transparent; }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.chip.teal { background: var(--teal-soft); color: var(--teal); } .chip.amber { background: var(--amber-soft); color: var(--amber); } .chip.green { background: var(--green-soft); color: var(--green); }
.chip.glut { background: var(--glut-soft); color: var(--glut); }
button.chip { cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 14px; border: 1px solid transparent; background: var(--surface-2); color: var(--ink); font-weight: 650; text-decoration: none; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.teal { background: var(--teal); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.btn.glut { background: var(--glut); color: #fff; }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 11px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 22px; height: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: 650; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 44px; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.field .hint { font-size: .8rem; color: var(--muted); }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; background: var(--surface-2); border-radius: 13px; padding: 3px; }
.seg button { border: none; background: transparent; padding: 8px 6px; border-radius: 10px; font-weight: 650; color: var(--muted); font-size: .9rem; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg button.on.abend { color: var(--f-abend); } .seg button.on.tag { color: var(--f-tag); } .seg button.on.wochenende { color: var(--f-wochenende); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .95rem; flex: none; }
.avatar.small { width: 24px; height: 24px; font-size: .7rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pill.open { background: var(--surface-2); color: var(--muted); }
.pill.proposed { background: var(--amber-soft); color: var(--amber); }
.pill.confirmed { background: var(--green-soft); color: var(--green); }
.pill.done { background: var(--teal-soft); color: var(--teal); }
.pill.skipped { background: var(--surface-2); color: var(--faint); text-decoration: line-through; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.big { font-size: 2.2rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.countdown { display: flex; gap: 14px; align-items: baseline; }
.countdown .n { font-size: 2rem; font-weight: 750; letter-spacing: -0.03em; }
.countdown .u { font-size: .8rem; color: var(--muted); font-weight: 600; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.notice { padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); font-size: .9rem; color: var(--ink-2); }
.notice.warn { background: var(--amber-soft); color: var(--amber); }
.notice.ok { background: var(--green-soft); color: var(--green); }
.notice.glut { background: var(--glut-soft); color: var(--glut); }
kbd { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.mono { font-family: ui-monospace, Menlo, monospace; word-break: break-all; font-size: .85rem; }
.code-big { font-family: ui-monospace, Menlo, monospace; font-size: 2rem; letter-spacing: .3em; font-weight: 700; text-align: center; padding: 10px 0; }
.qr { display: flex; justify-content: center; }
.qr svg { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 8px; }

/* Ideen-Deck */
.deck-card { position: relative; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 22px 20px 18px; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; animation: deck-in .25s ease-out; }
@keyframes deck-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.deck-card.out-left { animation: out-left .22s ease-in forwards; } .deck-card.out-right { animation: out-right .22s ease-in forwards; } .deck-card.out-down { animation: out-down .22s ease-in forwards; }
@keyframes out-left { to { opacity: 0; transform: translateX(-60px) rotate(-4deg); } }
@keyframes out-right { to { opacity: 0; transform: translateX(60px) rotate(4deg); } }
@keyframes out-down { to { opacity: 0; transform: translateY(40px); } }
.deck-card h2 { font-size: 1.45rem; margin: 8px 0 6px; }
.deck-card .desc { color: var(--ink-2); font-size: 1rem; }
.deck-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.vote-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 12px; }
.vote-row .btn { min-height: 52px; font-size: 1rem; }
.vote-row .btn.on { outline: 2px solid var(--ink); outline-offset: -2px; }
.vote-row .no { background: var(--surface-2); } .vote-row .maybe { background: var(--amber-soft); color: var(--amber); } .vote-row .yes { background: var(--green-soft); color: var(--green); }
.deck-progress { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 8px; }

/* Listen */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--surface); border-radius: var(--radius-s); padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); }
.item.flat { box-shadow: none; border: 1px solid var(--line); }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 650; }
.item .sub { font-size: .82rem; color: var(--muted); }
.item .lead { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; }
.lead.abend { background: color-mix(in srgb, var(--f-abend) 15%, transparent); color: var(--f-abend); }
.lead.tag { background: color-mix(in srgb, var(--f-tag) 18%, transparent); color: var(--f-tag); }
.lead.wochenende { background: color-mix(in srgb, var(--f-wochenende) 15%, transparent); color: var(--f-wochenende); }
.date-badge { width: 48px; flex: none; text-align: center; border-radius: 12px; padding: 4px 0; background: var(--surface-2); }
.date-badge b { display: block; font-size: 1.15rem; line-height: 1.1; } .date-badge span { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }

/* Jahres-Raster */
.pixels { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px; }
.pixels i { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); }
.pixels i.l1 { background: var(--f-abend); } .pixels i.l2 { background: var(--f-tag); } .pixels i.l3 { background: var(--f-wochenende); }
.pixels i.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.stars { display: inline-flex; gap: 4px; }
.stars button { border: none; background: transparent; font-size: 1.6rem; line-height: 1; padding: 2px; color: var(--line); }
.stars button.on { color: var(--amber); }

/* Sheet (Bottom-Modal) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(20,15,10,.45); z-index: 40; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 720px; margin: 0 auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 12px 18px calc(18px + var(--sab)); max-height: 92dvh; overflow: auto; animation: up .25s ease-out; box-shadow: 0 -8px 40px rgba(0,0,0,.2); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { margin-bottom: 12px; }
.sheet .stack > * + * { margin-top: 12px; }
.sheet .actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet .actions .btn { flex: 1; }
.fab { position: fixed; right: max(18px, calc(50% - 360px + 18px)); bottom: calc(var(--nav-h) + var(--sab) + 16px); z-index: 25; width: 56px; height: 56px; border-radius: 18px; border: none; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent) 60%, transparent); display: flex; align-items: center; justify-content: center; }
.fab svg { width: 26px; height: 26px; }

/* Toast */
.toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--sab) + 12px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow); animation: up .2s ease-out; max-width: 90%; }
.toast.err { background: var(--accent); color: #fff; }

/* Onboarding */
.hero { padding: 40px 6px 20px; text-align: center; }
.hero .logo { width: 64px; height: 64px; margin: 0 auto 16px; }
.hero .logo i { width: 40px; height: 40px; border-width: 6px; top: 12px; }
.hero .logo i:first-child { left: 0; } .hero .logo i:last-child { left: 20px; }
.hero h1 { font-size: 2rem; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 34ch; margin: 0 auto; }
.rhythm-lines { display: grid; gap: 8px; margin: 22px 0; }
.rhythm-lines div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.rhythm-lines b { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 11px; color: #fff; font-size: .8rem; }

/* Sichtschutz (Spicy) */
.privacy-shield { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; }
.pin-input { display: flex; justify-content: center; gap: 10px; }
.pin-input input { width: 100%; max-width: 220px; text-align: center; font-size: 1.6rem; letter-spacing: .4em; font-family: ui-monospace, Menlo, monospace; }
.level-tabs .on.mild { color: var(--green); } .level-tabs .on.warm { color: var(--amber); } .level-tabs .on.heiss { color: var(--glut); }
.lvl { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lvl.mild { color: var(--green); } .lvl.warm { color: var(--amber); } .lvl.heiss { color: var(--glut); }

@media (min-width: 720px) {
  .view { padding-left: 24px; padding-right: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* SVG-Icons in Textkontext */
.btn svg, .chip svg, .eyebrow svg, .notice svg, .pill svg, .lead svg { width: 1.2em; height: 1.2em; flex: none; }
.lead svg { width: 22px; height: 22px; }
.grid2 > .card, .grid3 > .card, .list .card { margin-top: 0; }
.grid3 .card { min-width: 0; font-size: .92rem; }
a.item, a.item .title { color: inherit; }
.lead { flex: none; }
.item .title svg { width: 1em; height: 1em; vertical-align: -2px; }

.memo-thumb { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: cover; background: var(--surface-2); }

/* Kleinigkeiten */
.week-ring { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wr { aspect-ratio: 1; border-radius: 10px; background: var(--surface-2); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; font-size: .62rem; font-weight: 700; color: var(--faint); }
.wr.on { background: var(--accent); color: var(--accent-ink); }
.wr.rep { background: var(--teal); color: #fff; }
.wr.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.wr.fut { opacity: .45; }
.dotmark { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); display: inline-block; }
.dotmark.on { background: var(--accent); }

/* Spiel */
.run-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.run-card + .run-card { margin-top: 12px; }
.facets { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.facet { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; text-align: center; }
.facet b { display: block; font-size: .95rem; }
.facet span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.blind { background: linear-gradient(150deg, var(--surface), var(--surface-2)); border: 1px dashed var(--line); }
.bingo { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.bingo button { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: .85rem; line-height: 1.3; color: var(--ink); }
.bingo button.on { background: var(--green-soft); border-color: var(--green); color: var(--green); text-decoration: line-through; }
.bottomnav a span:not(.dot) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Paar-Profil im Rückblick */
.profil { border-radius: var(--radius); padding: 18px; margin-top: 6px; background: var(--surface); box-shadow: var(--shadow); background-size: cover; background-position: center; }
.profil.mit-bild { color: #fff; min-height: 190px; display: flex; align-items: flex-end; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.profil.mit-bild .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.profil.mit-bild > .row { width: 100%; }
.profil .iconbtn:hover { background: rgba(255,255,255,.15); }
