/* Gemeinsam – Logik in web/src/gemeinsam/ */
.gm-main { max-width: 760px; }
#gm { margin-bottom: var(--sp-7); display: flex; flex-direction: column; gap: var(--sp-4); }
.gm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tg-noscroll { overflow: hidden; }
.tg-modal { position: fixed; inset: 0; background: rgba(10, 12, 25, .55); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .tg-modal { align-items: center; } }
.tg-sheet { background: var(--surface); width: 100%; max-width: 520px; max-height: 94vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 16px 18px 22px; animation: gmUp .28s cubic-bezier(.2, .9, .3, 1); }
@media (min-width: 700px) { .tg-sheet { border-radius: var(--r-l); } }
.tg-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.tg-x { border: 0; background: none; font-size: 1.2rem; padding: 4px 8px; color: var(--text); cursor: pointer; }
.tg-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #111827; color: #fff; padding: 10px 16px; border-radius: var(--r-m); opacity: 0; pointer-events: none; transition: .2s; z-index: 1100; max-width: calc(100% - 32px); text-align: center; }
.tg-toast.on { opacity: 1; transform: translate(-50%, 0); }
@keyframes gmUp { from { transform: translateY(24px); opacity: 0; } }
@keyframes gmPop { from { transform: scale(.85); opacity: 0; } }
@keyframes gmIn { from { opacity: 0; transform: translateY(6px); } }

/* Start */
.gm-hero { text-align: center; padding: 26px 18px; border-radius: var(--r-l); background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--c1, #fbbf24) 18%, transparent), transparent 65%), var(--surface); border: 1px solid var(--border); }
.gm-hero h2 { margin: 6px 0; font-size: 1.35rem; }
.gm-hero p { margin: 0 auto; max-width: 520px; color: var(--muted); }
.gm-hero-art { display: flex; justify-content: center; gap: 18px; font-size: 2.6rem; }
.gm-hero-art span { animation: gmBob 3s ease-in-out infinite; }
.gm-hero-art span:nth-child(2) { animation-delay: -1s; } .gm-hero-art span:nth-child(3) { animation-delay: -2s; }
@keyframes gmBob { 50% { transform: translateY(-7px) rotate(-6deg); } }
.gm-mine h2, .gm-new h2 { font-size: 1.1rem; margin: 0 0 10px; }
.gm-mine-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 8px; color: var(--text); text-decoration: none; transition: transform .2s, border-color .15s; }
.gm-mine-item:hover { transform: translateX(3px); border-color: var(--c2, #ea580c); }
.gm-mine-item b { flex: 1; }
.gm-mine-ico { font-size: 1.6rem; }
.gm-new { display: flex; flex-direction: column; gap: 14px; }
.gm-field { display: flex; flex-direction: column; gap: 6px; }
.gm-field--inline { flex-direction: row; align-items: center; justify-content: space-between; }
.gm-l { font-weight: 700; font-size: var(--fs-s); }
.gm-l small { font-weight: 400; color: var(--muted); }
.gm-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gm-kind { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: 600 var(--fs-s)/1.2 var(--font); cursor: pointer; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), border-color .15s; }
.gm-kind span { font-size: 1.6rem; }
.gm-kind:hover { transform: translateY(-2px); }
.gm-kind[aria-pressed="true"] { border-color: var(--c2, #ea580c); background: color-mix(in srgb, var(--c1, #fbbf24) 14%, var(--surface)); transform: scale(1.04); }
.gm-add-row { display: flex; gap: 8px; }
.gm-add-row .h-input { flex: 1; min-width: 0; }
.gm-names { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-name-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c2, #ea580c) 12%, var(--surface)); font-weight: 600; animation: gmPop .3s cubic-bezier(.34, 1.56, .64, 1); }
.gm-name-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 6px; }
.gm-cur { width: auto; }

/* Beitreten */
.gm-join { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.gm-join h2 { margin: 0; }
.gm-join p { margin: 0; color: var(--muted); }
.gm-join-ico { font-size: 3rem; animation: gmPop .5s cubic-bezier(.34, 1.56, .64, 1); }
.gm-join-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gm-join-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; padding: 10px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 var(--fs-s)/1.2 var(--font); cursor: pointer; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.gm-join-btn:hover { transform: translateY(-3px) scale(1.04); border-color: var(--c2, #ea580c); }
.gm-join .gm-add-row { width: 100%; max-width: 360px; }

/* Avatare */
.gm-av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--av); color: #fff; font: 800 .8rem/1 var(--font); box-shadow: 0 0 0 2px var(--surface); }
.gm-av--l { width: 46px; height: 46px; font-size: 1.15rem; }

/* Kopf + Reiter */
.gm-head { display: flex; align-items: center; gap: 10px; }
.gm-back { font-size: 1.3rem; text-decoration: none; color: var(--text); padding: 4px 8px; border-radius: 10px; }
.gm-head-ico { font-size: 2rem; }
.gm-head-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gm-head-txt b { font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-avs { display: flex; align-items: center; }
.gm-avs .gm-av { width: 22px; height: 22px; font-size: .65rem; margin-right: -5px; }
.gm-avs small { margin-left: 9px; color: var(--muted); }
.gm-icon-btn { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.1rem; cursor: pointer; }
.gm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: color-mix(in srgb, var(--text) 6%, var(--surface)); position: sticky; top: 6px; z-index: 20; }
.gm-tab { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: 700 var(--fs-s)/1 var(--font); cursor: pointer; position: relative; transition: background .2s, color .2s; }
.gm-tab-ico { font-size: 1.2rem; }
.gm-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .35); }
.gm-tab[aria-selected="true"] .gm-tab-ico { animation: gmPop .35s cubic-bezier(.34, 1.56, .64, 1); }
@media (max-width: 420px) { .gm-tab { flex-direction: column; gap: 2px; font-size: .78rem; } }
.gm-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; }

/* Kosten */
.gm-bal { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 22px 16px; border-radius: 20px; text-align: center; color: #fff; }
.gm-bal.is-plus { background: linear-gradient(135deg, #22c55e, #059669); box-shadow: 0 18px 34px -20px #059669; }
.gm-bal.is-minus { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 18px 34px -20px #e11d48; }
.gm-bal.is-zero { background: linear-gradient(135deg, var(--c1, #fbbf24), var(--c2, #ea580c)); }
.gm-bal-l { font-weight: 700; opacity: .9; }
.gm-bal-v { font-size: 2.4rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gm-bal-sub { opacity: .9; font-size: var(--fs-s); }
.gm-add-exp { position: sticky; bottom: 12px; z-index: 15; box-shadow: 0 14px 30px -14px var(--c2, #ea580c); }
.gm-settle h3 { margin: 0 0 8px; font-size: 1.05rem; }
.gm-settle h3 small { font-weight: 400; color: var(--muted); }
.gm-tr { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.gm-tr:first-of-type { border-top: 0; }
.gm-tr.is-me { background: color-mix(in srgb, var(--c1, #fbbf24) 10%, transparent); margin: 0 -10px; padding: 8px 10px; border-radius: 12px; }
.gm-tr-txt { flex: 1; min-width: 0; }
.gm-tr-a { font-variant-numeric: tabular-nums; }
.gm-exps { display: flex; flex-direction: column; gap: 6px; }
.gm-day { margin: 10px 0 2px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gm-exp { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .2s, border-color .15s; }
.gm-exp:hover { transform: translateX(3px); border-color: var(--c2, #ea580c); }
.gm-exp.is-tr { background: color-mix(in srgb, #22c55e 6%, var(--surface)); }
.gm-exp-ico { font-size: 1.5rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); flex: none; }
.gm-exp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gm-exp-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-exp-txt small, .gm-exp-a small { color: var(--muted); font-size: .78rem; }
.gm-exp-a { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.is-plus { color: #16a34a !important; } .is-minus { color: #e11d48 !important; }
.gm-stats summary { cursor: pointer; font-weight: 700; }
.gm-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.gm-table th { text-align: right; color: var(--muted); font-weight: 600; font-size: .75rem; }
.gm-table td { padding: 6px 4px; border-top: 1px solid var(--border); text-align: right; }
.gm-table td:first-child { text-align: left; display: flex; align-items: center; gap: 6px; }
.gm-table .gm-av { width: 22px; height: 22px; font-size: .65rem; }

/* Ausgabe-Formular */
.gm-sheet { display: flex; flex-direction: column; gap: 14px; }
.gm-amt-row { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.gm-amt { width: 100%; max-width: 240px; border: 0; border-bottom: 3px solid var(--c2, #ea580c); background: transparent; color: var(--text); font: 800 2.6rem/1.2 var(--font); text-align: center; outline: none; font-variant-numeric: tabular-nums; }
.gm-amt-cur { font-size: 1.6rem; font-weight: 700; color: var(--muted); }
.gm-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gm-cat { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); font-size: 1.3rem; cursor: pointer; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.gm-cat[aria-pressed="true"] { border-color: var(--c2, #ea580c); transform: scale(1.1); background: color-mix(in srgb, var(--c1, #fbbf24) 16%, var(--surface)); }
.gm-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-pick-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: 600 var(--fs-s)/1 var(--font); cursor: pointer; }
.gm-pick-btn[aria-pressed="true"] { border-color: var(--c2, #ea580c); background: color-mix(in srgb, var(--c1, #fbbf24) 14%, var(--surface)); }
.gm-for-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.gm-mode button { min-height: 32px; font-size: .8rem; padding: 0 10px; }
.gm-for { display: flex; flex-direction: column; gap: 4px; }
.gm-for-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; cursor: pointer; opacity: .55; transition: opacity .15s, background .15s; }
.gm-for-row.is-on { opacity: 1; background: color-mix(in srgb, var(--text) 4%, transparent); }
.gm-for-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--c2, #ea580c); }
.gm-for-name { flex: 1; font-weight: 600; }
.gm-for-v { font-variant-numeric: tabular-nums; color: var(--muted); }
.gm-for-in { width: 92px; text-align: right; padding: 6px 8px; min-height: 36px; }
.gm-for-unit { color: var(--muted); }
.gm-left { margin: 0; font-size: var(--fs-s); text-align: right; }
.gm-left.is-ok { color: #16a34a; } .gm-left.is-bad { color: #e11d48; }
.gm-left:empty { display: none; }
.gm-date { width: auto; }

/* Einkauf */
.gm-shop-add { display: flex; gap: 8px; position: sticky; top: 64px; z-index: 18; }
.gm-shop-add .h-input { flex: 1; min-width: 0; min-height: 50px; font-size: 1.05rem; }
.gm-shop-add .h-btn { min-width: 54px; font-size: 1.3rem; }
.gm-freq { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.gm-freq > span { color: var(--muted); font-size: var(--fs-s); flex: none; }
.gm-freq .h-chip { flex: none; }
.gm-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gm-item { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.gm-check { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c2, #ea580c) 55%, var(--border)); background: transparent; color: #fff; font-weight: 900; cursor: pointer; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .15s; }
.gm-check:hover { transform: scale(1.1); }
.gm-item.is-done .gm-check { background: #22c55e; border-color: #22c55e; }
.gm-item-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 1.05rem; }
.gm-item-t small { color: var(--muted); font-size: .72rem; }
.gm-item.is-done .gm-item-t { text-decoration: line-through; color: var(--muted); }
.gm-x { border: 0; background: none; color: var(--muted); padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.gm-x:hover { background: color-mix(in srgb, #ef4444 12%, transparent); color: #dc2626; }
.gm-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px; color: var(--muted); }
.gm-empty span { font-size: 2.4rem; }
.gm-buy, .gm-idea { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--c2, #ea580c) 50%, var(--border)); background: color-mix(in srgb, var(--c1, #fbbf24) 8%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.gm-buy > span:first-child, .gm-idea > span:first-child { font-size: 1.6rem; }
.gm-buy > span:nth-child(2), .gm-idea > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.gm-buy small, .gm-idea small { color: var(--muted); }
.gm-done summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

/* Essensplan */
.gm-week { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gm-week b { text-align: center; }
.gm-week small { font-weight: 400; color: var(--muted); }
.gm-meals { display: flex; flex-direction: column; gap: 6px; }
.gm-meal { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.gm-meal.is-today { border-color: var(--c2, #ea580c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c2, #ea580c) 15%, transparent); }
.gm-meal.is-past { opacity: .55; }
.gm-meal-day { display: flex; flex-direction: column; align-items: center; }
.gm-meal-day small { color: var(--muted); }
.gm-meal-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 480px) { .gm-meal-slots { grid-template-columns: 1fr; } }
.gm-meal-in { min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--border); background: transparent; color: var(--text); font: inherit; }
.gm-meal-in.has { border-style: solid; background: color-mix(in srgb, var(--c1, #fbbf24) 10%, var(--surface)); font-weight: 600; }
.gm-meal-in:focus { outline: 2px solid var(--c2, #ea580c); border-color: transparent; }
.gm-meal-cart { width: 36px; height: 36px; }

/* Einladen */
.gm-invite p { margin: 0; }
.gm-link { display: flex; gap: 8px; }
.gm-link .h-input { flex: 1; min-width: 0; font-size: .85rem; }
.gm-qr { align-self: center; padding: 10px; background: #fff; border-radius: 14px; line-height: 0; }
.gm-qr svg { width: 180px; height: 180px; }
.gm-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gm-members li { display: flex; align-items: center; gap: 10px; }
.gm-members li > span:nth-child(2) { flex: 1; }
.gm-loading { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 40px; color: var(--muted); }
.gm-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--c2, #ea580c); animation: gmRot .8s linear infinite; }
@keyframes gmRot { to { transform: rotate(360deg); } }
.gm-offline-note { display: none; margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #f59e0b 16%, var(--surface)); font-size: var(--fs-s); }
body.gm-offline .gm-offline-note { display: block; }
@media (prefers-reduced-motion: reduce) { .gm-hero-art span { animation: none; } }
.gm-head > * { flex-shrink: 0; }
.gm-head .gm-head-txt { flex: 1 1 auto; min-width: 0; }
@media (max-width: 480px) { .gm-inv span { display: none; } .gm-head { gap: 6px; } .gm-head-ico { font-size: 1.6rem; } .gm-back { padding: 4px; } }
.gm-item.is-new, .gm-exp.is-new { animation: gmPop .4s cubic-bezier(.34, 1.56, .64, 1); }
