/* KUMOMAKI – gemeinsames Design aller Apps */
@font-face{font-family:"Mochiy Pop One";font-weight:400;font-display:swap;src:url(schriften/mochiy-pop-one-400.woff2) format("woff2")}
@font-face{font-family:"Zen Maru Gothic";font-weight:400;font-display:swap;src:url(schriften/zen-maru-gothic-400.woff2) format("woff2")}
@font-face{font-family:"Zen Maru Gothic";font-weight:500;font-display:swap;src:url(schriften/zen-maru-gothic-500.woff2) format("woff2")}
@font-face{font-family:"Zen Maru Gothic";font-weight:700;font-display:swap;src:url(schriften/zen-maru-gothic-700.woff2) format("woff2")}
@font-face{font-family:"KM Ziffern";font-weight:400;font-display:swap;src:url(schriften/km-ziffern-400.woff2) format("woff2");unicode-range:U+0030-0039}
@font-face{font-family:"KM Ziffern";font-weight:700;font-display:swap;src:url(schriften/km-ziffern-700.woff2) format("woff2");unicode-range:U+0030-0039}
:root {
  --sakura: #F4A9BB; --sakura-hell: #FCE4EA; --sakura-zart: #FEF2F5; --sakura-tief: #B53A60; --sakura-dunkel: #8E2447;
  --matcha: #9DB86A; --matcha-hell: #E6EFD6; --matcha-tief: #55722A;
  --reis: #FFF7EC; --papier: #FFFDF9; --anko: #3A2326;
  --anko-80: rgba(58, 35, 38, .82); --anko-60: rgba(58, 35, 38, .70); --anko-40: rgba(58, 35, 38, .52);
  --linie: rgba(58, 35, 38, .12); --linie-stark: rgba(58, 35, 38, .24);
  --yuzu: #E3A92B; --yuzu-hell: #FBEFCD; --yuzu-tief: #7A5500;
  --ume: #C0392B; --ume-hell: #F9DEDA; --ume-tief: #9B2A1F;
  --r-klein: 10px; --r-mittel: 16px; --r-gross: 22px;
  --schrift-kopf: "Mochiy Pop One", "Zen Maru Gothic", system-ui, sans-serif;
  --schrift-text: "Zen Maru Gothic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift-zahl: "KM Ziffern", var(--schrift-text);
  --breite: 1180px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
/* Wie im Hub: kein Zoom, Finger bewegt die Seite nur senkrecht – Kaesten mit eigenem Querlauf scrollen weiter */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: pan-y; }
body { margin: 0; min-height: 100vh; background: var(--reis); color: var(--anko); font: 400 15px/1.55 var(--schrift-text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.2; }
h2 { font-family: var(--schrift-kopf); font-size: 21px; }
h3 { font-weight: 700; font-size: 16px; }
p { margin: 0; }
b, strong { font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--sakura-tief); }
:focus-visible { outline: 2.5px solid var(--sakura-tief); outline-offset: 2px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { text-align: right; font-family: var(--schrift-zahl); white-space: nowrap; }

/* Kopf mit Wolkenkante */
.kopf { background: var(--sakura); position: relative; padding: 18px 0 16px; margin-bottom: 34px; z-index: 2; }
.kopf::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background: radial-gradient(circle at 50% 0, var(--sakura) 15px, transparent 15.6px) 0 0 / 38px 16px repeat-x,
              radial-gradient(circle at 50% 0, var(--sakura) 9px, transparent 9.6px) 19px 0 / 38px 16px repeat-x;
}
.kopf-innen { max-width: var(--breite); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.wortmarke { font-family: var(--schrift-kopf); font-size: clamp(34px, 5.4vw, 50px); line-height: 1; letter-spacing: .03em; color: var(--anko); text-shadow: 3px 3px 0 var(--reis); }
.wortmarke.klein { font-size: clamp(21px, 3vw, 27px); text-shadow: 2px 2px 0 var(--reis); }
.untertitel { margin-top: 8px; font-weight: 500; color: var(--anko-80); }
.appkopf { display: flex; align-items: center; gap: 14px; min-width: 0; }
.apptitel { font-family: var(--schrift-text); font-weight: 700; font-size: 15px; color: var(--anko-80); margin-top: 4px; }
.zurueck { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--reis); color: var(--anko); font-weight: 700; font-size: 14px; text-decoration: none; flex: 0 0 auto; }
.zurueck:hover { background: #fff; }
.konto-knopf { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--reis); border-radius: 999px; padding: 4px 14px 4px 4px; font-weight: 700; font-size: 14px; cursor: pointer; max-width: 230px; }
.konto-knopf:hover { background: #fff; }
.konto-knopf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--farbe, var(--sakura)); color: var(--anko); font-weight: 700; font-size: 13px; font-style: normal; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .65); }
.avatar.gross { width: 48px; height: 48px; flex-basis: 48px; font-size: 16px; }

/* Inhalt */
.inhalt { max-width: var(--breite); margin: 0 auto; padding: 0 20px 80px; }
.inhalt.schmal { max-width: 460px; }
.karte { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 20px; }
.meldung { display: flex; flex-direction: column; gap: 14px; }
.meldung h1 { font-family: var(--schrift-kopf); font-size: 22px; }
.abschnitt { margin: 0 0 30px; }
.abschnitt > h2 { margin-bottom: 16px; }
.hinweis { color: var(--anko-60); font-size: 14px; }
.leer { color: var(--anko-60); padding: 30px 0; text-align: center; }
.leer-text { color: var(--anko-60); }
.warn { color: var(--ume-tief); font-size: 13.5px; font-weight: 500; }
.werkzeug { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 18px; }
.grow { flex: 1 1 auto; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.knopfreihe.rechts { justify-content: flex-end; }
.knopfreihe.spalte { flex-direction: column; align-items: stretch; }
.marke { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--matcha-hell); color: var(--matcha-tief); font-size: 12px; font-weight: 700; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Ein Rasterfeld ist sonst nie schmaler als sein laengstes Wort */
.zwei > *, .app-raster > * { min-width: 0; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--linie-stark); background: var(--papier); color: var(--anko); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.knopf:hover { border-color: var(--anko-60); }
.knopf:disabled { opacity: .55; cursor: wait; }
.knopf.primaer { background: var(--sakura-tief); border-color: var(--sakura-tief); color: #fff; }
.knopf.primaer:hover { background: var(--sakura-dunkel); border-color: var(--sakura-dunkel); }
.knopf.gefahr { background: var(--ume); border-color: var(--ume); color: #fff; }
.knopf.gefahr-rand { color: var(--ume-tief); border-color: rgba(192, 57, 43, .45); }
.knopf.klein { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.knopf.gross { min-height: 48px; font-size: 15.5px; }
.icon-knopf { width: 36px; height: 36px; flex: 0 0 36px; display: inline-grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--anko-60); cursor: pointer; font-size: 18px; }
.icon-knopf:hover { background: var(--sakura-hell); color: var(--anko); }
.icon-knopf:disabled { opacity: .3; cursor: default; background: none; }
.chip { border: 1.5px solid var(--linie-stark); background: var(--papier); padding: 5px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--anko-60); }
.chip.aktiv { background: var(--anko); color: var(--reis); border-color: var(--anko); }
.filter { display: flex; flex-wrap: wrap; gap: 6px; }

/* Eingaben */
.eingabe { width: 100%; min-width: 0; height: 40px; padding: 6px 11px; border-radius: var(--r-klein); border: 1.5px solid var(--linie-stark); background: #fff; color: var(--anko); font-size: 15px; }
.eingabe:hover { border-color: var(--anko-40); }
.eingabe:focus { border-color: var(--sakura-tief); outline: none; box-shadow: 0 0 0 3px rgba(181, 58, 96, .18); }
.eingabe::placeholder { color: var(--anko-40); }
.eingabe.ungueltig { border-color: var(--ume); background: var(--ume-hell); }
textarea.eingabe { height: auto; min-height: 44px; resize: vertical; line-height: 1.45; padding: 8px 11px; }
select.eingabe { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233A2326' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center; }
input[type="search"].eingabe { -webkit-appearance: none; appearance: none; }
.zahl { text-align: right; font-family: var(--schrift-zahl); }
.zahlfeld { position: relative; display: block; }
.zahlfeld .eingabe { padding-right: 28px; text-align: right; font-family: var(--schrift-zahl); }
.zahlfeld i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--anko-60); font-size: 13.5px; pointer-events: none; }
.feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.feld-name { font-size: 13.5px; font-weight: 700; color: var(--anko-80); }
.feld small { color: var(--anko-60); font-size: 12.5px; line-height: 1.35; }
fieldset.feld { border: 0; padding: 0; margin: 0; }
legend.feld-name { padding: 0; margin-bottom: 6px; }
.haken { display: inline-flex; gap: 9px; align-items: center; cursor: pointer; font-size: 14.5px; }
.haken input { width: 18px; height: 18px; accent-color: var(--sakura-tief); flex: 0 0 auto; }

/* Allergene */
.acode { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px; background: var(--sakura-hell); color: var(--sakura-dunkel); font-size: 12.5px; font-weight: 700; }
.acode.jn { background: transparent; border: 1.5px dashed var(--sakura-tief); }
.keine { font-size: 12.5px; color: var(--anko-40); }

/* Kalenderblatt */
.kal { width: 58px; flex: 0 0 58px; border-radius: 14px; background: var(--sakura-hell); display: flex; flex-direction: column; align-items: center; padding: 6px 0 7px; line-height: 1.1; }
.kal small { font-size: 11.5px; font-weight: 700; color: var(--sakura-dunkel); }
.kal b { font-family: var(--schrift-kopf); font-weight: 400; font-size: 24px; margin: 1px 0; }

/* App-Kacheln */
.app-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 20px 14px; }
.app-kachel { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--anko); padding: 16px 10px 14px; border-radius: var(--r-gross); text-align: center; }
a.app-kachel:hover { background: var(--papier); }
a.app-kachel:hover .app-symbol { transform: translateY(-2px); }
.app-symbol { position: relative; width: 86px; height: 86px; border-radius: 30px; display: grid; place-items: center; background: var(--f); color: var(--anko); box-shadow: 0 5px 0 rgba(58, 35, 38, .13), inset 0 -5px 0 rgba(0, 0, 0, .05); transition: transform .15s; margin-bottom: 6px; }
.app-zahl { position: absolute; top: -9px; right: -11px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: #fff; border: 2.5px solid var(--f); font-family: var(--schrift-zahl); font-weight: 700; font-size: 13.5px; display: grid; place-items: center; }
.app-name { font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.app-info { font-size: 12.5px; color: var(--anko-60); line-height: 1.35; }
.app-kachel.bald { opacity: .6; }
.app-kachel.bald .app-symbol { box-shadow: none; background: repeating-linear-gradient(135deg, var(--f) 0 10px, color-mix(in srgb, var(--f) 70%, white) 10px 20px); }

/* Dialoge, Meldungen */
.dlg { border: 0; padding: 0; border-radius: var(--r-gross); background: var(--reis); color: var(--anko); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 70px rgba(58, 35, 38, .32); }
.dlg.klein { width: min(440px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(58, 35, 38, .38); }
.dlg-inhalt { padding: 22px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); overflow-y: auto; }
.dlg-inhalt h2 { font-size: 20px; }
.dlg-kopf { display: flex; align-items: center; gap: 14px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 20; background: var(--anko); color: var(--reis); padding: 11px 20px; border-radius: 999px; font-weight: 500; box-shadow: 0 8px 26px rgba(58, 35, 38, .3); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.zeigen { opacity: 1; transform: translate(-50%, 0); }
.toast.fehler { background: var(--ume-tief); }

@media (max-width: 720px) {
  .kopf { padding: 14px 0 12px; margin-bottom: 28px; }
  .kopf-innen { padding: 0 14px; flex-wrap: nowrap; }
  .inhalt { padding: 0 14px 70px; }
  .konto-knopf { padding: 4px; }
  .konto-knopf span { display: none; }
  .zurueck span { display: none; }
  .zurueck { padding: 0 10px 0 8px; }
  .eingabe { height: 44px; font-size: 16px; }
  .app-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 6px; }
  .app-kachel { padding: 8px 2px; }
  .app-symbol { width: 72px; height: 72px; border-radius: 26px; }
  .app-symbol svg { width: 32px; height: 32px; }
  .app-info { display: none; }
  .app-name { font-size: 13.5px; }
  .zwei { grid-template-columns: 1fr; }
  .dlg-inhalt { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .kopf, .toast { display: none !important; } body { background: #fff; } }

/* Zwei-Faktor-Anmeldung */
.zf-qr { display: flex; justify-content: center; }
.zf-qr svg { width: min(232px, 64vw); height: auto; display: block; border-radius: 10px; box-shadow: 0 0 0 1px var(--linie); }
.zf-schritte { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 3px; }
.zf-manuell summary, .ersatz-hilfe summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.zf-manuell > * + *, .ersatz-hilfe > * + * { margin-top: 8px; }
.zf-geheim { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .05em; background: #fff; border: 1px dashed var(--linie-stark); border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; user-select: all; }
.zf-code, .code-feld { font-family: var(--schrift-zahl); font-size: 22px; letter-spacing: .16em; text-align: center; }
.zf-ersatz { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.zf-ersatz code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: 8px 4px; text-align: center; }
.marke.zf { background: var(--matcha-hell); color: var(--matcha-tief); }
.zf-tipp { margin-bottom: 14px; background: var(--yuzu-hell); border-color: transparent; }
