/* =====================================================================
 * Webfire Reservierungs-App – Handy-Layout (seit 04.10.2026)
 * Greift nur, wenn resapp-mobile.js body.rm setzt (Bildschirm bis 760 px).
 * ===================================================================== */
body.rm{background:#f3f5f8;overflow-x:hidden;-webkit-tap-highlight-color:transparent}
body.rm .rm-svg{width:22px;height:22px;display:block}

/* Kopfzeile: schmal, Titel + Tag */
body.rm .rm-top{padding:8px 12px 8px 16px;padding-top:max(8px,env(safe-area-inset-top));gap:8px;min-height:52px}
.rm-tt{display:flex;flex-direction:column;line-height:1.15;min-width:0}
.rm-tt b{font-family:var(--head);font-size:18px;font-weight:700}
.rm-tt small{font-size:12.5px;opacity:.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rm-pill{border:0;background:#FFC24B;color:#3b2600;font-weight:800;font-size:13px;border-radius:999px;padding:7px 12px;font-family:inherit}
.rm-ib{width:40px;height:40px;border-radius:12px;border:0;background:rgba(255,255,255,.1);color:#fff;display:grid;place-items:center;flex:0 0 auto;font-size:16px;font-family:inherit}
.rm-ib.dark{background:#eef1f6;color:var(--ink)}

/* Inhalt: Platz für die untere Leiste */
body.rm .rm-main{padding:12px 12px calc(96px + env(safe-area-inset-bottom));max-width:none}

/* Untere Leiste mit großem Plus */
.rm-nav{position:fixed;left:0;right:0;bottom:0;z-index:60;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--line);padding:6px 6px calc(6px + env(safe-area-inset-bottom))}
.rm-nav button{border:0;background:none;color:#7A8597;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;font-weight:600;padding:6px 0;font-family:inherit;min-height:52px;justify-content:center}
.rm-nav button.on{color:var(--fire)}
.rm-nav .rm-fab{width:60px;height:60px;border-radius:20px;background:var(--fire);color:#fff;margin:-22px auto 2px;box-shadow:0 10px 24px rgba(255,122,0,.42);justify-self:center;min-height:0}
.rm-nav .rm-fab .rm-svg{width:28px;height:28px;stroke-width:2.4}
body.rm .modal-bg{z-index:120}

/* Aktions-Sheets (Plus, Mehr) */
.rm-sheet .mb{padding:10px 14px calc(16px + env(safe-area-inset-bottom))!important;display:flex;flex-direction:column;gap:8px}
.rm-act{display:flex;align-items:center;gap:14px;width:100%;border:1px solid var(--line);background:#fff;border-radius:16px;padding:14px 16px;text-align:left;font-family:inherit;color:var(--ink)}
.rm-act .rm-svg{width:26px;height:26px;color:var(--fire);flex:0 0 auto}
.rm-act span{display:flex;flex-direction:column}.rm-act b{font-size:16px}.rm-act small{color:var(--muted);font-size:13px;margin-top:1px}
.rm-act:active{background:#fff6ee}

/* Heute: Datumsleiste */
.rm-days{display:flex;gap:7px;overflow-x:auto;margin:0 -12px 12px;padding:2px 12px 4px;scrollbar-width:none;scroll-snap-type:x proximity}
.rm-days::-webkit-scrollbar{display:none}
.rm-d{flex:0 0 auto;min-width:62px;border:1.5px solid var(--line);background:#fff;border-radius:14px;padding:7px 8px;display:flex;flex-direction:column;align-items:center;font-family:inherit;color:var(--ink);scroll-snap-align:center;position:relative}
.rm-d small{font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:700}
.rm-d b{font-size:16px}
.rm-d.mo{opacity:.75}
.rm-d.on{background:var(--ink);border-color:var(--ink);color:#fff}.rm-d.on small{color:rgba(255,255,255,.75)}
.rm-dcal input,.rm-ccal input,.rm-other input{position:absolute;inset:0;opacity:0;width:100%;height:100%;border:0;padding:0}
.rm-banner{background:#FFF1E2;color:#8a4500;border-radius:12px;padding:10px 14px;font-weight:700;font-size:14px;margin-bottom:10px}
.rm-kpi{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
.rm-kpi div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 12px}
.rm-kpi b{display:block;font-size:22px;font-family:var(--head)}.rm-kpi small{color:var(--muted);font-size:12px}

/* Abschnitte + Karten */
.rm-sec{margin-bottom:14px}
.rm-sec h3{font-size:15px;margin:4px 2px 8px;display:flex;align-items:center;gap:8px}
.rm-sec summary{list-style:none;cursor:pointer}.rm-sec summary::-webkit-details-marker{display:none}
.rm-sec summary h3::after{content:"▾";margin-left:auto;color:var(--muted);font-size:13px}
.rm-sec[open] summary h3::after{content:"▴"}
.rm-card{display:flex;gap:10px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px 12px 12px 14px;margin-bottom:8px;border-left:4px solid #c9d1dc}
.rm-card:active{background:#fafbfd}
.rm-card.s-bestaetigt{border-left-color:#1FA971}.rm-card.s-angekommen{border-left-color:#2D7FF9;background:#F3F8FF}
.rm-card.s-angefragt{border-left-color:#F0B400}.rm-card.s-warteliste{border-left-color:#ff8a3d}
.rm-card.s-erledigt,.rm-card.s-noshow,.rm-card.s-abgesagt{opacity:.6}
.rm-c1{flex:1;min-width:0}
.rm-n{font-weight:700;font-size:16px;line-height:1.25;overflow-wrap:anywhere}
.rm-p{color:var(--muted);font-weight:600;font-size:14px;white-space:nowrap}
.rm-t{display:inline-block;background:var(--ink);color:#fff;border-radius:7px;padding:1px 7px;font-size:13px;margin-right:4px;vertical-align:1px}
.rm-m{color:var(--ink-2);font-size:13.5px;margin-top:3px}
.rm-tags{margin-top:5px;display:flex;flex-wrap:wrap;gap:4px}
.rm-note{font-size:13px;color:#6b4500;background:#FFF8E6;border-radius:8px;padding:4px 8px;margin-top:6px}
.rm-note.g{color:var(--ink-2);background:#F1F4F8}
.rm-c2{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:0 0 auto}
.rm-call{width:42px;height:42px;border-radius:12px;background:#EAF7F0;color:#13804f;display:grid;place-items:center}
.rm-q{border:0;border-radius:12px;background:#eef1f6;color:var(--ink);font-weight:800;font-size:14px;padding:0 14px;height:42px;font-family:inherit;white-space:nowrap}
.rm-q.ok{background:#1FA971;color:#fff}
.rm-st .chip{white-space:nowrap}
.rm-2b{display:flex;gap:8px;margin:-2px 0 12px}
.rm-2b .btn{flex:1;min-height:46px;font-size:15px}
.rm-2b .rm-sq{flex:0 0 52px;display:grid;place-items:center;padding:0}
.rm-th{display:flex;align-items:baseline;gap:8px;margin:14px 2px 6px}
.rm-th b{font-size:17px;font-family:var(--head)}.rm-th small{color:var(--muted);font-size:12.5px}
.rm-now{position:relative;height:22px;margin:10px 0 4px;display:flex;align-items:center}
.rm-now::before{content:"";position:absolute;left:0;right:0;top:50%;border-top:2px solid #ef4444}
.rm-now span{position:relative;background:#ef4444;color:#fff;font-size:12px;font-weight:800;border-radius:999px;padding:2px 10px;margin-left:8px}
.rm-empty{background:#fff;border:1px dashed var(--line);border-radius:16px;padding:26px 18px;text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:14px;align-items:center}
.rm-hint{display:flex;gap:10px;align-items:flex-start;background:#EEF4FF;color:#23406e;border-radius:12px;padding:10px 12px;font-size:13.5px;margin-bottom:12px}
.rm-hint .rm-svg{flex:0 0 auto;width:20px;height:20px}

/* Service am Handy: Karten passen in die Breite, Plan auf Wunsch */
body.rm .rx-svchead{flex-wrap:wrap;gap:8px}
body.rm .rx-svchead .res-date{display:none}
body.rm .rx-svchead .rx-seg{width:100%;display:flex}
body.rm .rx-svchead .rx-seg button{flex:1;padding:9px 4px}
body.rm .rx-svchead .res-kpis{width:100%}
body.rm .rx-svc{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"t m a" "b m a";align-items:center;gap:2px 10px;padding:12px;min-width:0}
body.rm .rx-svc-t{grid-area:t;width:auto}
body.rm .rx-svc-tbl{grid-area:b;font-size:12px;padding:2px 6px;max-width:84px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.rm .rx-svc-m{grid-area:m;min-width:0}
body.rm .rx-svc-n{white-space:normal;overflow-wrap:anywhere;font-size:15.5px}
body.rm .rx-svc-d{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.rm .rx-svc-a{grid-area:a}
body.rm .rx-big{min-width:78px;min-height:48px}
body.rm .rx-svcgrid{display:block}
body.rm .rx-svcplan.rm-hide{display:none}
body.rm .rm-plantog{margin:0 0 10px}

/* Formular: Vollbild, Tippen statt Schreiben */
.rm-fbg{align-items:stretch!important}
body.rm .modal.rm-form{max-height:none;height:100%;border-radius:0;display:flex;flex-direction:column;animation:none;background:#f3f5f8}
body.rm .modal.rm-form::before{display:none}
.rm-fh{display:flex;align-items:center;gap:10px;padding:10px 12px;padding-top:max(10px,env(safe-area-inset-top));background:#fff;border-bottom:1px solid var(--line)}
.rm-fh b{flex:1;text-align:center;font-size:16px}
.rm-save{border:0;background:none;color:var(--fire);font-weight:800;font-size:15px;font-family:inherit;padding:8px 4px}
.rm-fb{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 14px 20px}
.rm-ff{padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line)}
.rm-ff .btn{min-height:52px;font-size:16px}
.rm-seg{display:flex;margin-bottom:12px}.rm-seg button{flex:1;padding:10px 4px}
.rm-fsec{background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px;margin-bottom:10px}
.rm-fl{display:block;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:0 0 8px}
.rm-fl small{text-transform:none;letter-spacing:0;font-weight:600}
.rm-step{display:flex;align-items:center;gap:10px}
.rm-step button{width:56px;height:52px;border-radius:14px;border:0;background:#eef1f6;font-size:26px;font-weight:600;color:var(--ink);font-family:inherit;touch-action:manipulation}
.rm-step button:active{transform:scale(.95)}
.rm-step div{flex:1;text-align:center;color:var(--ink-2)}.rm-step b{font-size:26px;color:var(--ink);font-family:var(--head)}
.rm-chips{display:flex;gap:7px;overflow-x:auto;margin:0 -12px;padding:2px 12px 4px;scrollbar-width:none}
.rm-chips::-webkit-scrollbar{display:none}
.rm-chips.wrap{flex-wrap:wrap;overflow:visible;margin:0;padding:0}
.rm-c{position:relative;flex:0 0 auto;border:1.5px solid var(--line);background:#fff;border-radius:12px;min-height:48px;padding:6px 12px;font-family:inherit;font-weight:700;font-size:15px;color:var(--ink);display:inline-flex;flex-direction:column;align-items:center;justify-content:center;touch-action:manipulation}
.rm-c small{font-size:10.5px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.rm-c.on{background:var(--fire);border-color:var(--fire);color:#fff}.rm-c.on small{color:rgba(255,255,255,.85)}
.rm-c.tb{align-items:flex-start}
.rm-c.tb.busy{opacity:.45;text-decoration:line-through}
.rm-c.tb.small{opacity:.6;border-style:dashed}
.rm-c.tb.on{opacity:1;text-decoration:none}
.rm-tgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.rm-tgrid .rm-c{padding:6px 0}
.rm-other{color:var(--muted);font-weight:600;font-size:13px}
.rm-in{display:block;margin-bottom:10px}
.rm-in span{display:block;font-size:13px;font-weight:700;color:var(--ink-2);margin-bottom:5px}
.rm-in span small{font-weight:500;color:var(--muted)}
.rm-in input,.rm-in select{width:100%;border:1.5px solid var(--line);border-radius:12px;padding:12px 13px;font-family:inherit;color:var(--ink);background:#fff;min-height:48px}
.rm-in input:focus,.rm-in select:focus{outline:none;border-color:var(--fire)}
.rm-more summary{font-weight:700;color:var(--ink-2);cursor:pointer;padding:2px 0}
.rm-more[open] summary{margin-bottom:12px}
#rf_ghint:empty{display:none}
#rf_ghint{margin:-2px 0 10px}

/* Detail-Ansicht & Sheets: große Knöpfe */
body.rm .modal .mb{padding:14px 16px}
body.rm .rx-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.rm .rx-acts .btn{min-height:48px;font-size:15px}
body.rm .res-det{font-size:15px}
body.rm .res-det a[href^="tel"]{display:inline-flex;align-items:center;gap:6px;background:#EAF7F0;color:#13804f;border-radius:10px;padding:8px 12px;font-weight:700;text-decoration:none}
body.rm .rx-sheet{grid-template-columns:1fr 1fr}

/* Gäste, Einstellungen, Auswertung: nichts läuft über den Rand */
body.rm .res-datenav{flex-wrap:wrap;gap:8px}
body.rm .rx-search{width:100%;flex:1 1 100%}
body.rm .res-datenav .rx-seg{display:flex;overflow-x:auto;max-width:100%;scrollbar-width:none}
body.rm .res-datenav .rx-seg button{white-space:nowrap}
body.rm .rx-gstat{display:none}
body.rm .rx-gstat:first-of-type{display:flex}
body.rm .res-li{gap:10px}
body.rm .res-li-m{min-width:0}
body.rm .res-li-n,body.rm .res-li-d{white-space:normal;overflow-wrap:anywhere}
body.rm .rx-setnav{position:sticky;top:52px;z-index:5;background:#f3f5f8;margin:0 -12px;padding:6px 12px;scrollbar-width:none}
body.rm .rx-setnav::-webkit-scrollbar{display:none}
body.rm .rx-kpigrid{grid-template-columns:repeat(2,minmax(0,1fr))}
body.rm .card{max-width:100%;overflow-x:auto}
body.rm .ra-main>*{max-width:100%}
.rm-done{margin:4px 0 6px}
.rm-done summary{list-style:none;cursor:pointer;background:#e9edf2;color:var(--ink-2);border-radius:12px;padding:10px 14px;font-weight:700;font-size:13.5px}
.rm-done summary::-webkit-details-marker{display:none}
.rm-done summary::after{content:" ▾"}.rm-done[open] summary::after{content:" ▴"}
.rm-done[open] summary{margin-bottom:8px}
