@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/vendor/inter-400.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/vendor/inter-500.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/vendor/inter-600.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/vendor/inter-700.woff2) format("woff2"); }
@font-face { font-family: "Bricolage"; font-weight: 600; font-display: swap; src: url(/vendor/bricolage-600.woff2) format("woff2"); }
@font-face { font-family: "Bricolage"; font-weight: 800; font-display: swap; src: url(/vendor/bricolage-800.woff2) format("woff2"); }

:root {
  --paper: #eef0ea;
  --surface: #ffffff;
  --ink: #1b2433;
  --ink-2: #3d4757;
  --muted: #687284;
  --line: #dadfd5;
  --line-strong: #c3c9bd;
  --accent: #1b2433;
  --accent-soft: #e4e7ef;
  --gold: #e3b23c;
  --silver: #b7bfca;
  --bronze: #c98653;
  --yes-bg: #dcf3e2; --yes-fg: #17663a;
  --maybe-bg: #fbefc9; --maybe-fg: #8a5a0b;
  --no-bg: #fbe1df; --no-fg: #9b2620;
  --star: #d79d17;
  --danger: #b42318;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --display: "Bricolage", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
a.btn, a.li { text-decoration: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 40px 20px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Grundgerüst ---------- */
.shell { max-width: 880px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 16px calc(96px + var(--safe-b)); }
.topbar { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.topbar .grow { flex: 1; min-width: 0; }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; flex: none; }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn.ghost { background: transparent; border-color: transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 15px; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, white); }
.btn.block { width: 100%; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 18px; height: 18px; }

.fab { position: fixed; right: max(16px, calc(50% - 424px)); bottom: calc(20px + var(--safe-b)); height: 56px; padding: 0 22px 0 18px; border-radius: 28px; border: 0; background: var(--accent); color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); z-index: 20; }
.fab svg { width: 22px; height: 22px; }

/* ---------- Übersicht ---------- */
.hello { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 9vw, 52px); line-height: 1; letter-spacing: -0.02em; margin: 18px 0 6px; }
.hello-sub { color: var(--muted); margin: 0 0 22px; }
.shelf { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.listcard { position: relative; text-align: left; border: 0; padding: 0; background: var(--surface); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; min-height: 196px; }
.listcard .band { background: var(--c); color: #fff; padding: 16px 18px 14px; display: flex; gap: 12px; align-items: flex-start; }
.listcard .emoji { font-size: 30px; line-height: 1; }
.listcard h2 { font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
.listcard .desc { font-size: 13px; opacity: .85; margin-top: 4px; }
.listcard .body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.progress { height: 6px; border-radius: 3px; background: var(--paper); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--c); }
.cardstats { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.cardstats b { color: var(--ink); font-weight: 600; }
.podium { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.podium .p { display: flex; align-items: center; gap: 8px; min-width: 0; }
.podium .p span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medal { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); background: var(--paper); }
.medal.m1 { background: var(--gold); }
.medal.m2 { background: var(--silver); }
.medal.m3 { background: var(--bronze); color: #fff; }
.emptyhint { color: var(--muted); font-size: 14px; }
.newcard { border: 2px dashed var(--line-strong); background: transparent; border-radius: var(--radius-l); min-height: 196px; display: grid; place-items: center; color: var(--ink-2); font-weight: 600; gap: 6px; }
.newcard svg { width: 28px; height: 28px; }

/* ---------- Liste ---------- */
.listhead { background: var(--accent); color: #fff; border-radius: var(--radius-l); padding: 18px 18px 16px; margin: 6px 0 14px; }
.listhead h1 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 7.5vw, 40px); line-height: 1.02; letter-spacing: -0.02em; margin: 0; display: flex; gap: 10px; align-items: baseline; }
.listhead p { margin: 6px 0 0; opacity: .85; font-size: 14px; max-width: 60ch; }
.kpis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.kpi { flex: 1 1 130px; background: color-mix(in srgb, var(--accent) 82%, black); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.kpi .k { font-size: 12px; opacity: .8; }
.kpi .v { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; position: sticky; top: 0; z-index: 10; background: var(--paper); padding: 8px 0; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 44px; }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; height: 100%; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.clearsearch { flex: none; width: 30px; height: 30px; margin-right: -6px; border: 0; border-radius: 50%; background: var(--line); color: var(--ink-2); display: grid; place-items: center; padding: 0; }
.clearsearch svg { width: 16px; height: 16px; color: var(--ink-2); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.sel { padding-right: 8px; display: inline-flex; align-items: center; gap: 4px; }
.chip select { border: 0; background: transparent; font-weight: 500; font-size: 14px; outline: 0; appearance: none; padding-right: 2px; }

.grouphead { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 4px 6px; }
.grouphead h3 { font-family: var(--display); font-weight: 800; font-size: 20px; margin: 0; }
.grouphead span { color: var(--muted); font-size: 13px; }

.rows { background: var(--surface); border-radius: var(--radius-m); overflow: hidden; }
.row { cursor: pointer; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 4px 10px; padding: 12px 14px 12px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
.rank { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; text-align: center; color: var(--line-strong); font-variant-numeric: tabular-nums; }
.rank.r1, .rank.r2, .rank.r3 { width: 40px; height: 40px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--ink); }
.rank.r1 { background: var(--gold); }
.rank.r2 { background: var(--silver); }
.rank.r3 { background: var(--bronze); color: #fff; }
.rank.has { color: var(--ink-2); }
.row .main { min-width: 0; }
.row .name { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.row .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .name svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.row .meta { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .note { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: italic; }
.row .score { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.scorenum { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.scorenum small { font-size: 12px; color: var(--muted); font-weight: 600; font-family: var(--body); }
.stars { color: var(--star); letter-spacing: 1px; font-size: 13px; white-space: nowrap; }
.unrated { font-size: 13px; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; }
.pill.yes { background: var(--yes-bg); color: var(--yes-fg); }
.pill.maybe { background: var(--maybe-bg); color: var(--maybe-fg); }
.pill.no { background: var(--no-bg); color: var(--no-fg); }
.price { font-weight: 600; color: var(--ink-2); }
.emptystate { text-align: center; padding: 40px 20px; color: var(--muted); background: var(--surface); border-radius: var(--radius-m); }
.emptystate b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---------- Sheets (Dialoge von unten) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 26, 36, .45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.sheet { background: var(--surface); width: 100%; max-width: 640px; max-height: 92dvh; border-radius: var(--radius-l) var(--radius-l) 0 0; display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: var(--radius-l); max-height: 86dvh; } }
.sheethead { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.sheethead h2 { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 0; flex: 1; min-width: 0; line-height: 1.15; }
.sheetbody { padding: 16px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.sheetfoot { padding: 12px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheetfoot .btn { flex: 1; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scrim, .sheet { animation: none; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); padding: 10px 12px; min-height: 44px; outline: 0; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.textarea { min-height: 84px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.err { color: var(--danger); font-size: 14px; margin: 0; }

/* Bewertung 1–10 */
.rater { display: flex; flex-direction: column; gap: 8px; }
.rater .lbl { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.rater .lbl b { font-family: var(--display); font-weight: 800; font-size: 22px; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.scale button { height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-variant-numeric: tabular-nums; padding: 0; }
.scale button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.scale button.in { background: color-mix(in srgb, var(--accent) 18%, white); border-color: color-mix(in srgb, var(--accent) 30%, white); }
.clearlink { background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 0; align-self: flex-start; }
.verdict { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: var(--radius-m); padding: 12px 14px; }
.verdict .scorenum { font-size: 34px; }

/* Listen-Editor */
.editrow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.editrow.f { grid-template-columns: 1fr 120px auto; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; background: var(--c); }
.swatch[aria-pressed="true"] { border-color: var(--surface); box-shadow: 0 0 0 2px var(--ink); }
.emojis { display: flex; gap: 6px; flex-wrap: wrap; }
.emojis button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 20px; padding: 0; }
.emojis button[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.section-title { font-family: var(--display); font-weight: 800; font-size: 17px; margin: 6px 0 -4px; }
.templates { display: grid; gap: 8px; }
.tpl { display: flex; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-m); padding: 12px 14px; }
.tpl .e { font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--c, var(--paper)); flex: none; }
.tpl b { display: block; }
.tpl small { color: var(--muted); }

/* Menüs & Listen in Sheets */
.menu { display: flex; flex-direction: column; background: var(--surface); }
.li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; width: 100%; }
.li:last-child { border-bottom: 0; }
.li svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.li.danger, .li.danger svg { color: var(--danger); }
.li .grow { flex: 1; }
.codes { display: flex; flex-direction: column; gap: 6px; }
.code { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: var(--radius-s); background: var(--paper); font-variant-numeric: tabular-nums; }
.code b { letter-spacing: .08em; }

/* Anmeldung */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.authcard { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.logo { width: 64px; height: 64px; }
.authcard h1 { font-family: var(--display); font-weight: 800; font-size: 42px; line-height: 1; margin: 6px 0 0; letter-spacing: -0.02em; }
.authcard p { color: var(--muted); margin: 0; }
.linkbtn { background: none; border: 0; color: var(--ink-2); text-decoration: underline; padding: 6px 0; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--safe-b)); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 60; max-width: calc(100% - 32px); }

.row.haslink { grid-template-columns: 52px 1fr auto 40px; padding-right: 6px; }
.rowlink { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, white); }
.rowlink svg { width: 18px; height: 18px; }
.shoplink { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--accent) 10%, white); border: 1px solid color-mix(in srgb, var(--accent) 30%, white); text-decoration: none; color: var(--ink); }
.shoplink .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.shoplink .ic svg { width: 20px; height: 20px; }
.shoplink .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shoplink small { color: var(--muted); font-size: 13px; }
@media (min-width: 700px) {
  .row { grid-template-columns: 64px 1fr auto; padding: 12px 18px 12px 10px; }
  .row.haslink { grid-template-columns: 64px 1fr auto 40px; padding-right: 12px; }
}

/* Geteilte Listen */
.sharetag { margin-top: 8px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 10px; display: inline-block; }
.shareline { font-weight: 600; opacity: 1 !important; }
.raters { font-size: 11px; color: var(--muted); }
.groupbox { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.groupavg { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--accent) 10%, white); }
.groupavg > span:first-child { font-weight: 600; }
.groupavg b { font-family: var(--display); font-weight: 800; font-size: 26px; }
.person { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.person.me { background: var(--paper); }
.person .who { display: flex; flex-direction: column; min-width: 0; }
.person .who span { font-size: 13px; color: var(--muted); }
.person .pscore { font-family: var(--display); font-weight: 800; font-size: 22px; align-self: center; }
.person .pnote { grid-column: 1 / -1; font-size: 14px; font-style: italic; color: var(--ink-2); }
.shareuser { display: grid; grid-template-columns: 1fr 220px; align-items: center; gap: 12px; }
@media (max-width: 420px) { .shareuser { grid-template-columns: 1fr; gap: 6px; } }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
fieldset.plain:disabled .input, fieldset.plain:disabled .select { background: var(--paper); color: var(--ink-2); }
