/* Gruppenkalender Familie & Freunde – hochskaliertes Design für große Bildschirme (passt sich auch an Handys an) */

*, *::before, *::after { box-sizing: border-box; }
html {
  /* wächst mit der Bildschirmbreite: Handy ~16px, Full-HD ~20px, 4K/TV ~28px */
  font-size: clamp(16px, 0.42vw + 11.5px, 30px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); line-height: 1.5;
  background-image: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--primary) 12%, transparent) 0, transparent 40%),
                    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent) 0, transparent 35%);
  background-attachment: fixed;
}
h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 .8em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Kopf */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem;
  padding: .6rem clamp(1rem, 3vw, 3rem); background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 800; font-size: 1.25rem; margin-right: auto; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__logo { height: 2.6rem; width: auto; display: block; }
.brand__icon { height: 2.6rem; width: 2.6rem; flex: none; display: block; border-radius: 22%; }
.brand__text { display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 1.05; }
.brand__l1 { font-size: 1.3rem; font-weight: 800; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__l2 { font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: .1rem; }
.brand__l1, .brand__l2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon { width: 1.35em; height: 1.35em; flex: none; vertical-align: -.28em; }
.nav { display: flex; gap: .25rem; flex-wrap: nowrap; }
.nav__a { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: 2.6rem; height: 2.6rem; padding: 0 .55rem;
  border-radius: var(--radius); color: var(--text); font-weight: 600; }
.nav__a:hover { background: var(--surface2); text-decoration: none; color: var(--text); }
.nav__a.is-on { background: var(--primary); color: var(--primary-text); }
.nav__label { display: none; }
@media (min-width: 1200px) { .nav__a { padding: 0 .85rem; } .nav__label { display: inline; } }
@media (max-width: 520px) {
  .top { gap: .4rem; padding: .45rem .6rem; }
  .brand { font-size: 1rem; min-width: 0; }
  .brand { gap: .45rem; }
  .brand__logo, .brand__icon { height: 2.2rem; }
  .brand__icon { width: 2.2rem; }
  .brand__l1 { font-size: 1.05rem; }
  .brand__l2 { font-size: .7rem; }
  .nav__a { min-width: 2.35rem; height: 2.35rem; padding: 0 .4rem; }
}

.main { flex: 1; width: 100%; max-width: 1900px; margin: 0 auto; padding: 1.2rem clamp(.8rem, 3vw, 3rem) 5rem; }
.main--narrow { max-width: 900px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1rem; }

/* Karten, Buttons, Formulare */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.2rem; box-shadow: 0 .4rem 1.6rem color-mix(in srgb, var(--text) 6%, transparent); }
.card--pad { padding: clamp(1rem, 2vw, 2rem); }
.center { text-align: center; }
.pad { padding: 2rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; word-break: break-all; }
.err { color: var(--danger); }
.pre { white-space: pre-wrap; }
.plain { list-style: none; padding: 0; margin: 0 0 1rem; }
.inline { display: inline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 650;
  padding: .55rem 1.05rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .15s, background .15s; min-height: 2.6rem;
}
.btn:hover { text-decoration: none; box-shadow: 0 .2rem .8rem color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--accent))); border-color: transparent; color: var(--primary-text); }
.btn--primary:hover { color: var(--primary-text); }
.btn--ghost { background: transparent; }
.btn--danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn--danger:hover { color: #fff; }
.btn--small { padding: .3rem .7rem; font-size: .85rem; min-height: 2rem; }
.btn--big { padding: .8rem 1.6rem; font-size: 1.1rem; }
.btn--icon { width: 2.6rem; padding: 0; font-size: 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }

.form .field, .field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .9rem; min-width: 0; }
.field__label { font-weight: 650; font-size: .85rem; color: var(--muted); display: block; margin: .3rem 0 .35rem; }
.field--grow { flex: 1; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface2); border: 1px solid var(--border);
  border-radius: calc(var(--radius) * .75); padding: .55rem .75rem; min-height: 2.6rem; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
input[type=checkbox], input[type=radio] { min-height: 0; width: 1.15rem; height: 1.15rem; accent-color: var(--primary); }
input[type=color] { padding: .15rem; width: 3rem; min-height: 2.4rem; cursor: pointer; }
input[type=range] { padding: 0; accent-color: var(--primary); }
textarea { width: 100%; }
input[type=file] { width: 100%; background: none; border: 0; padding-left: 0; }
.input--num { width: 5.5rem; }
.input--wide { flex: 1; min-width: 12rem; }
.input--title { font-size: 1.2rem; font-weight: 700; flex: 1; }
.input--icon { width: 6rem; font-size: 1.4rem; text-align: center; }
.cols { display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: flex-end; }
.cols > .field { flex: 1 1 14rem; }
.cols--2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); gap: 1.2rem; align-items: start; }
.cols--title { align-items: flex-start; }
.form__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.radio { display: inline-flex; align-items: center; gap: .45rem; margin: .25rem 1rem .25rem 0; cursor: pointer; flex-wrap: wrap; }
.radio--block { display: flex; align-items: flex-start; margin: .5rem 0; }
.radio--block input { margin-top: .3rem; }
.fs { border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem 1.2rem 1.1rem; margin: 0 0 1.1rem; }
.fs legend { font-weight: 800; padding: 0 .5rem; font-size: 1.05rem; }
.rec { margin: .5rem 0; }
.remrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .4rem 0; }
.remlist:empty { display: none; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: .8rem 0; margin-bottom: -.5rem; border-top: 1px solid var(--border); }

.notice { padding: .8rem 1.1rem; border-radius: var(--radius); margin-bottom: 1rem; font-weight: 600; }
.notice--ok { background: color-mix(in srgb, var(--holiday) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--holiday) 45%, transparent); }
.notice--err { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--accent); color: #fff; vertical-align: middle; }
.badge--ok { background: var(--holiday); }
.badge--err { background: var(--danger); }

/* Segment-Auswahl, Chips */
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: .2rem; gap: .2rem; margin-bottom: .8rem; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg--links a { display: block; padding: .45rem .95rem; border-radius: calc(var(--radius) * .8); font-weight: 650; color: var(--text); }
.seg input:checked + span, .seg--links a.is-on { background: var(--primary); color: var(--primary-text); }
.seg input:disabled + span { opacity: .45; }
.seg--links a:hover { text-decoration: none; background: color-mix(in srgb, var(--primary) 15%, transparent); }
.seg--links a.is-on:hover { background: var(--primary); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 .8rem; list-style: none; }
.chip { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border); font-size: .85rem; font-weight: 600; }
.pick { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-block; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); font-weight: 600; }
.pick input:checked + span { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.pick--neg input:checked + span { background: var(--danger); border-color: var(--danger); color: #fff; text-decoration: line-through; }
.pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.kind { cursor: pointer; }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind span { display: flex; align-items: center; gap: .4rem; padding: .55rem .8rem; border-radius: var(--radius); border: 2px solid var(--border); background: var(--surface2); font-weight: 650; }
.kind b { font-size: 1.3rem; }
.kind input:checked + span { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.swatches { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.swatch { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); background: var(--c); cursor: pointer; }
.swatch.is-on { box-shadow: 0 0 0 3px var(--text); }

/* Kalender-Kopf */
.caltop { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; margin-bottom: .8rem; }
.caltop__nav { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.views { display: flex; gap: .3rem; flex-wrap: nowrap; }
.views__a { display: inline-flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.views__a:hover { text-decoration: none; color: var(--text); background: var(--surface2); }
.views__a.is-on { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.vicon { width: 2rem; height: 2rem; }
@media (max-width: 520px) { .views { justify-content: space-between; } .views__a { width: 3rem; height: 3rem; } .vicon { width: 2.1rem; height: 2.1rem; } }
.caltop__title { margin: 0; font-size: clamp(1.4rem, 2.2vw, 2.4rem); text-align: center; }
.jump input { min-height: 2.6rem; }
@media (max-width: 1100px) { .caltop { grid-template-columns: 1fr; } .caltop__title { text-align: left; order: -1; } }
.filters summary, .exports summary { display: flex; align-items: center; gap: .5rem; padding: .75rem 1.1rem; cursor: pointer; font-weight: 700; list-style: none; }
.filters summary::-webkit-details-marker, .exports summary::-webkit-details-marker { display: none; }
.filters__form { padding: 0 1.3rem 1rem; }
.kindfilter { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .4rem 1rem; }
.kindfilter__row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; background: var(--surface2); border-radius: var(--radius); padding: .25rem .3rem .25rem .8rem; }
.kindfilter__row select { min-height: 2.1rem; padding: .2rem .5rem; }
.exports__grid { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; padding: 0 1.1rem .4rem; }
.exports__group { display: flex; align-items: center; gap: .35rem; }
.exports__label { font-weight: 700; font-size: .85rem; color: var(--muted); min-width: 3.6rem; }
.exports__legend { padding: 0 1.1rem .9rem; margin: .3rem 0 0; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface2); color: var(--text); cursor: pointer; padding: 0; font: inherit; }
.ibtn:hover { text-decoration: none; color: var(--text); box-shadow: 0 .2rem .8rem color-mix(in srgb, var(--text) 12%, transparent); }
.ibtn--color { color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.ibtn--color:hover { color: var(--primary); }
.ibtn--bw { color: var(--muted); }
.legend-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.legend-dot--color { background: var(--primary); }

/* Termin-Chip */
.ev {
  display: flex; align-items: center; gap: .3rem; min-width: 0; padding: .2rem .5rem; margin: .15rem 0; border-radius: calc(var(--radius) * .5);
  background: color-mix(in srgb, var(--ev) 18%, var(--surface)); border-left: .28rem solid var(--ev); color: var(--text); font-size: .85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden;
}
.ev:hover { text-decoration: none; background: color-mix(in srgb, var(--ev) 30%, var(--surface)); color: var(--text); }
.ev__title { overflow: hidden; text-overflow: ellipsis; }
.ev__time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.ev__icon { flex: none; }
.ev--priv { border-left-style: dotted; }
.ev--hl { box-shadow: 0 0 0 2px var(--ev), 0 0 .8rem color-mix(in srgb, var(--ev) 60%, transparent); font-weight: 800; }
.ev--hol { --ev: var(--holiday); background: color-mix(in srgb, var(--holiday) 14%, var(--surface)); border-left: .28rem solid var(--holiday); color: var(--holiday); font-weight: 700; }

/* Monat */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.month__wd { text-align: center; font-weight: 800; color: var(--muted); padding: .2rem 0; font-size: .85rem; }
.month__cell { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * .6); min-height: clamp(5rem, 10vh, 9rem); padding: .25rem .35rem; min-width: 0; }
.month__cell.is-out { opacity: .5; }
.month__cell.is-we { background: color-mix(in srgb, var(--surface2) 60%, var(--surface)); }
.month__cell.is-hol { background: color-mix(in srgb, var(--holiday) 7%, var(--surface)); }
.month__cell.is-today { background: color-mix(in srgb, var(--today) 26%, var(--surface)); border-color: color-mix(in srgb, var(--today) 70%, var(--border)); }
.month__top { position: relative; display: flex; justify-content: center; align-items: center; }
.month__num { font-weight: 700; font-size: 1rem; color: var(--text); line-height: 1.6; }
.is-today .month__num { font-weight: 900; }
.month__add { position: absolute; right: 0; top: 0; opacity: 0; color: var(--muted); font-weight: 800; padding: 0 .2rem; }
.month__cell:hover .month__add { opacity: 1; }
.month__more { font-size: .8rem; color: var(--muted); font-weight: 700; }
@media (max-width: 700px) {
  .month { gap: .12rem; }
  .month__wd { font-size: .75rem; }
  .month__cell { padding: .1rem .12rem; min-height: 3.4rem; border-radius: calc(var(--radius) * .4); }
  .month__num { font-size: .9rem; line-height: 1.4; }
  .month__cell .ev { font-size: .7rem; padding: .05rem .2rem; }
  .month__cell .ev__time, .month__cell .ev__icon { display: none; }
  .month__add { display: none; }
}

/* Zeitraster Tag/Woche */
.tg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; --hour: clamp(2.2rem, 4.5vh, 3.6rem); --tgcol: 3.8rem; }
.tg__head, .tg__allday { display: grid; grid-template-columns: var(--tgcol) repeat(var(--days), minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.tg__day { display: flex; flex-direction: column; align-items: center; padding: .3rem 0; color: var(--text); font-weight: 700; border-left: 1px solid var(--border); line-height: 1.2; min-width: 0; }
.tg__day span { font-size: .8rem; color: var(--muted); }
.tg__day b { font-size: 1.15rem; }
.tg__day:hover { text-decoration: none; color: var(--text); background: var(--surface2); }
.tg__day.is-today { background: color-mix(in srgb, var(--today) 30%, var(--surface)); }
.tg__day.is-today b { font-weight: 900; }
.tg__adcell { padding: .25rem; border-left: 1px solid var(--border); min-height: 2.4rem; min-width: 0; }
.tg__corner { display: flex; align-items: center; justify-content: center; }
.tg__body { display: grid; grid-template-columns: var(--tgcol) repeat(var(--days), minmax(0, 1fr)); max-height: 72vh; overflow-y: auto; position: relative; }
.tg__hour { height: var(--hour); font-size: .72rem; color: var(--muted); text-align: right; padding: 0 .4rem; transform: translateY(-.55em); }
.tg__hour:first-child { transform: none; }
.tg__col { position: relative; border-left: 1px solid var(--border); }
.tg__col.is-today { background: color-mix(in srgb, var(--today) 10%, transparent); }
@media (max-width: 700px) {
  .tg { --tgcol: 2.7rem; --hour: 2.2rem; }
  .tg__corner { font-size: .55rem; text-align: center; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; line-height: 1.1; padding: 0 .1rem; }
  .tg__hour { font-size: .62rem; padding: 0 .2rem; }
  .tg--week .tg__day span { font-size: .7rem; }
  .tg--week .tg__day b { font-size: .95rem; }
  .tg--week .ev { font-size: .66rem; padding: .05rem .15rem; }
  .tg--week .ev__icon, .tg--week .ev__time { display: none; }
}
.tg__slot { height: var(--hour); border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.tg__slot a { display: block; height: 100%; }
.tg__slot a:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.tg__ev { position: absolute; padding: 1px 2px; }
.tg__ev .ev { height: 100%; align-items: flex-start; white-space: normal; margin: 0; box-shadow: 0 .15rem .5rem color-mix(in srgb, var(--text) 10%, transparent); }
.tg__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.tg__now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.tg--week .tg__adcell .ev { font-size: .78rem; }

/* Jahr */
.year { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .7rem; }
.ymonth { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; }
.ymonth__title { display: block; font-weight: 800; font-size: 1rem; color: var(--text); margin-bottom: .3rem; text-align: center; }
.ymonth__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .12rem; }
.ymonth__grid > * { display: flex; align-items: center; justify-content: center; }
.ymonth__wd { font-size: .7rem; color: var(--muted); font-weight: 700; height: 1.4rem; }
.yday { position: relative; height: 1.8rem; border-radius: calc(var(--radius) * .35); color: var(--text); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.yday:hover { background: var(--surface2); text-decoration: none; color: var(--text); }
.yday.has-ev { background: color-mix(in srgb, var(--ev) 22%, var(--surface)); box-shadow: inset 0 -3px 0 var(--ev); }
.yday.is-hol { color: var(--holiday); font-weight: 800; }
.yday.is-hl { box-shadow: inset 0 0 0 2px var(--ev); }
.yday.is-today { background: color-mix(in srgb, var(--today) 45%, var(--surface)); font-weight: 900; }
.yday i { position: absolute; top: -.25rem; right: -.1rem; font-style: normal; font-size: .55rem; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 .22rem; line-height: 1.3; }
@media (max-width: 520px) { .year { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; } .ymonth { padding: .4rem; } .yday { height: 1.45rem; font-size: .7rem; } .ymonth__wd { font-size: .62rem; } }

/* Liste */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem 1.2rem 1rem; }
.card .list { border: 0; padding: 0; background: none; }
.list__day { margin: 1rem 0 .4rem; padding-bottom: .3rem; border-bottom: 2px solid var(--border); font-size: 1.05rem; }
.list__day.is-today { color: var(--primary); }
.list__row { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .15rem 0; }
.list__row .ev { font-size: .95rem; padding: .35rem .7rem; }
.list__time { color: var(--muted); font-weight: 650; font-size: .9rem; font-variant-numeric: tabular-nums; }
.list__meta { font-size: .8rem; }
@media (max-width: 700px) { .list__row { grid-template-columns: 1fr; gap: 0; padding: .4rem 0; } }

/* Termin-Ansicht */
.evview { overflow: hidden; }
.evview__bar { height: .6rem; background: linear-gradient(90deg, var(--ev), color-mix(in srgb, var(--ev) 40%, var(--accent))); }
.evview__kind { font-weight: 700; color: var(--muted); margin: 0 0 .3rem; }
.kindicon { font-size: 1.5rem; }
.evview__when { font-size: 1.2rem; font-weight: 700; }
.evimg { display: block; max-height: 60vh; border-radius: var(--radius); margin: 1rem 0; }
.evimg--small { max-height: 10rem; }
.prose { overflow-x: auto; }
.prose table { border-collapse: collapse; margin: .6rem 0; }
.prose td, .prose th { border: 1px solid var(--border); padding: .3rem .6rem; }

/* Verwaltung */
.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .1rem; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__a { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .65rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); color: var(--text); font-weight: 650; font-size: .85rem; white-space: nowrap; }
.tabs__a:hover { text-decoration: none; color: var(--text); background: var(--surface2); }
.tabs__a.is-on { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
@media (max-width: 700px) {
  .tabs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); overflow: visible; }
  .tabs__a { justify-content: center; padding: .45rem 0; }
  .tabs__a span { display: none; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.stat { background: var(--surface2); border-radius: var(--radius); padding: 1rem; text-align: center; }
.stat b { display: block; font-size: 2.2rem; color: var(--primary); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; margin: 0 0 1rem; }
.dl dt { font-weight: 700; color: var(--muted); }
.dl dd { margin: 0; }
@media (max-width: 600px) { .dl { grid-template-columns: 1fr; } }
.colorsets { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.colorset { background: var(--surface2); border-radius: var(--radius); padding: 1rem; }
.colorrow { display: flex; align-items: center; gap: .6rem; margin: .3rem 0; cursor: pointer; }
.tagtable { display: grid; gap: .4rem; }
.tagtable__head, .tagtable__row { display: grid; grid-template-columns: 13rem minmax(10rem, 1fr) 7rem 10rem 7rem 7rem; gap: .5rem; align-items: center; }
.tagtable__head { font-weight: 700; color: var(--muted); font-size: .85rem; }
.tagtable__row { background: var(--surface2); border-radius: var(--radius); padding: .35rem .5rem; }
.tagtable__tag { font-weight: 700; }
.colorpick { display: flex; align-items: center; gap: .3rem; }
@media (max-width: 1000px) { .tagtable__head { display: none; } .tagtable__row { grid-template-columns: 1fr 1fr; } .tagtable__tag { grid-column: 1 / -1; } }
.logo-preview { max-height: 4rem; vertical-align: middle; background: var(--surface2); border-radius: .5rem; padding: .3rem; }
.copy { display: flex; gap: .4rem; flex-wrap: wrap; margin: .4rem 0; }
.copy input { flex: 1; min-width: 12rem; }
.invite { border-bottom: 1px solid var(--border); padding: .8rem 0; }
.invite.is-new { background: color-mix(in srgb, var(--primary) 8%, transparent); border-radius: var(--radius); padding: .8rem; }
.invite.is-used { opacity: .6; }
.auth { max-width: 36rem; margin: 2rem auto; }

.fab {
  position: fixed; right: clamp(1rem, 3vw, 3rem); bottom: clamp(1rem, 3vw, 3rem); width: 4rem; height: 4rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 .6rem 1.8rem color-mix(in srgb, var(--primary) 45%, transparent); z-index: 20;
}
.fab:hover { text-decoration: none; color: #fff; transform: scale(1.05); }

/* Jodit-Editor an das Theme anpassen */
.jodit-container:not(.jodit_inline) { border-radius: calc(var(--radius) * .75) !important; border-color: var(--border) !important; }

/* Druck */
.print-only { display: none; }
@media print {
  @page { size: auto; margin: 10mm; }
  html { font-size: 11px; }
  body { background: #fff !important; color: #000; }
  .no-print, .top, .foot, .fab, .tabs { display: none !important; }
  .print-only { display: block; }
  .main { padding: 0; max-width: none; }
  .card, .month__cell, .ymonth, .list, .tg { box-shadow: none !important; break-inside: avoid; }
  .tg__body { max-height: none; overflow: visible; }
  .calview--week .tg, .calview--day .tg { --hour: 1.7rem; }
  .month__cell { min-height: 6.5rem; }
  .ev { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .yday, .month__cell, .ev--hol, .tg__col { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-bw { filter: grayscale(1); }
  body.print-bw .ev { border-left-color: #000; background: #eee; }
}

/* Demo-Modus */
.demo-bar { background: linear-gradient(90deg, var(--accent), var(--primary)); color: #fff; text-align: center; font-weight: 700; font-size: .9rem; padding: .45rem 1rem; }
.demo-start { border: 2px dashed var(--primary); }
