:root { --bg: #16130f; --panel: #201c17; --edge: #383128; --ink: #f2ece0; --muted: #9b9282; --accent: #e8794a; --no: #c25a5a;
        color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1 { font-size: 26px; margin: 0; }
h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 8px; }
.muted { color: var(--muted); }
.error { color: #ef8d8d; margin: 0; }

.btn { display: inline-block; text-align: center; text-decoration: none; border: 1px solid #4b4236; background: none; border-radius: 22px;
       padding: 11px 18px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1c0f07; font-weight: 600; }
.btn.small { padding: 7px 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; }

input { width: 100%; background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 11px 12px; outline: none; }
input:focus { border-color: #6a5c4a; }

/* Anmelden */
#login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 320px; display: grid; gap: 12px; }
.login h1 { text-align: center; margin-bottom: 8px; }

/* App */
#app { max-width: 560px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top .muted { margin-top: 2px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }

.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; }
.list li { padding: 11px 14px; display: flex; align-items: baseline; gap: 10px; }
.list li + li { border-top: 1px solid var(--edge); }
.list .main { flex: 1; min-width: 0; }
.list .title { font-weight: 600; overflow-wrap: anywhere; }
.list .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.list .count { color: var(--accent); font-weight: 600; min-width: 1.2em; text-align: right; }
.list li.out .title { text-decoration: line-through; color: var(--muted); }
.list li.out .count { color: var(--muted); }
.list .nein { color: var(--no); }
.list a { color: var(--accent); white-space: nowrap; font-size: 14px; }

.person .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--edge); border-radius: 14px; padding: 3px 10px; font-size: 14px; }
.tag.nein { border-color: #5a2e2e; color: #e6a0a0; }
.tag button { border: 0; background: none; padding: 0 0 0 4px; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.person .name { font-weight: 600; }
.person .prov { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 6px; }

.order { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
         background: linear-gradient(transparent, var(--bg) 35%); }
.order .btn { display: block; max-width: 528px; margin: 0 auto; }

/* Dialoge */
dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--panel); color: var(--ink);
         border: 1px solid var(--edge); border-radius: 16px; padding: 18px; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog form { display: grid; gap: 12px; }
dialog h2 { margin: 0; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.row { display: flex; justify-content: flex-end; gap: 10px; }
.hint { font-size: 14px; margin: 0; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--edge); border-radius: 10px; padding: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--edge); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--edge); background: none; border-radius: 16px; padding: 6px 12px; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #1c0f07; }
.shot { display: grid; gap: 8px; }
.shot label { cursor: pointer; }
.providers { display: grid; gap: 8px; }
.providers button { text-align: left; border: 1px solid var(--edge); background: none; border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.providers button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }
