@charset "UTF-8";
/* Kalenderzwerg – 3D-Comic-Look (gleiche Basis wie der Ratenzwerg) */
@font-face { font-family: Bangers; src: url(fonts/bangers-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "KG Luckiest"; src: url(fonts/luckiest-guy-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Nunito; src: url(fonts/nunito-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Nunito; src: url(fonts/nunito-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(fonts/nunito-latin-900-normal.woff2) format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --ink: #17130f;
  --paper: #fff8e7;
  --bg1: #f6e7c1;
  --bg2: #eed9a4;
  --moss: #2b5a3a;
  --red: #e0352b;
  --blue: #2f5fd6;
  --teal: #1fa598;
  --gold: #f4a100;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --r: 18px;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(circle, rgba(23,19,15,.09) 1.4px, transparent 1.6px) 0 0 / 14px 14px,
    radial-gradient(ellipse at 20% 0%, #fff6d8 0%, transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  background-color: var(--bg2);
  min-height: 100%;
}
body { margin: 0; font: 16px/1.45 Nunito, system-ui, sans-serif; color: var(--ink); min-height: 100vh; overflow-x: hidden; }
a { color: inherit; }
[hidden] { display: none !important; }
.gnome { display: block; height: auto; filter: drop-shadow(5px 4px 0 rgba(23,19,15,.3)); user-select: none; -webkit-user-drag: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 99%); mask-image: linear-gradient(to bottom, #000 78%, transparent 99%); }
.corner-gnome, .foot-gnome { -webkit-mask-image: none; mask-image: none; }

.comic-title {
  font-family: Bangers, Impact, sans-serif; font-weight: 400; letter-spacing: .04em;
  font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; margin: 0 0 .4em; color: #fff;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink);
}
.comic-title span { color: var(--gold); }
.comic-title.xl { font-family: "KG Luckiest", Bangers, sans-serif; color: #ffd23f; -webkit-text-stroke: .06em #111;
  text-shadow: 1px 1px 0 #d9480f, 2px 2px 0 #d9480f, 3px 3px 0 #d9480f, 4px 4px 0 #d9480f, 5px 5px 0 #111, 6px 7px 0 #111; letter-spacing: .02em; }
.comic-title.xl span { color: #5ee7ff; text-shadow: 1px 1px 0 #1864ab, 2px 2px 0 #1864ab, 3px 3px 0 #1864ab, 4px 4px 0 #1864ab, 5px 5px 0 #111, 6px 7px 0 #111; }
.comic-title.sm { font-size: 1.6rem; color: var(--red); text-shadow: 2px 2px 0 var(--ink); -webkit-text-stroke: 1.5px var(--ink); }
.comic-title small { font-family: Nunito, sans-serif; font-size: .55em; letter-spacing: 0; -webkit-text-stroke: 0; text-shadow: none; color: #6b5b45; font-weight: 700; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 3vw, 2rem);
  background: var(--moss); border-bottom: 4px solid var(--ink); box-shadow: 0 4px 0 rgba(23,19,15,.25);
}
.brand { text-decoration: none; font-family: Bangers, Impact, sans-serif; font-size: 2rem; letter-spacing: .05em; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
.brand span { color: var(--gold); }
.brand-hat { color: var(--red); font-size: 1.5rem; transform: rotate(-12deg); display: inline-block; }
.topbar nav { display: flex; gap: .5rem; }
.topbar nav a, .topbar nav button {
  text-decoration: none; font-weight: 900; padding: .45rem .85rem; cursor: pointer;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .35rem;
}
.topbar nav a:hover, .topbar nav button:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); }
.topbar nav a.on { background: var(--gold); }
.topbar nav a.new { background: var(--red); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.topbar nav form { margin: 0; display: contents; }
.nav-ico { font-size: 1.1rem; line-height: 1; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; position: relative; z-index: 1; }

/* ---------- Cards ---------- */
.card { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.3rem 1.4rem; margin-bottom: 1.6rem; position: relative; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-head .comic-title { margin: 0; }

/* ---------- Hero ---------- */
.hero { display: flex; align-items: center; gap: 1rem; margin: .3rem 0 1.4rem; }
.hero-gnome-wrap { flex: 0 0 auto; }
.hero-gnome { width: 170px; cursor: pointer; transform-origin: 50% 100%; animation: wobble 5s ease-in-out infinite; }
.hero-gnome.hop { animation: hop .45s ease; }
@keyframes wobble { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes hop { 0% { transform: translateY(0) } 40% { transform: translateY(-22px) rotate(-6deg) } 100% { transform: translateY(0) } }

.bubble {
  position: relative; --rot: -1.5deg; padding: .7em 1em .6em;
  font-family: Bangers, "Comic Sans MS", sans-serif; font-weight: 400; font-size: 1.4rem; line-height: 1.15; letter-spacing: .035em;
  color: #1a1410; background: #fffbea radial-gradient(circle at 30% 20%, #fff 0%, #fffbea 45%, #ffeeb8 100%);
  border: 3px solid #111; border-radius: 22px;
  box-shadow: 0 0 0 3px #ffd23f, 6px 7px 0 3px #d9480f, 9px 11px 0 3px rgba(23,19,15,.25);
  transform: rotate(var(--rot)); animation: bubbleIn .45s cubic-bezier(.2,1.7,.4,1) both;
}
.bubble b, .bubble strong { color: #d9480f; font-weight: 400; }
@keyframes bubbleIn { from { opacity: 0; transform: scale(.3) rotate(var(--rot)); } to { opacity: 1; transform: scale(1) rotate(var(--rot)); } }
.bubble::before, .bubble::after { content: ""; position: absolute; border-style: solid; }
.bubble-hero { flex: 1; font-size: clamp(1.35rem, 2.8vw, 2rem); cursor: pointer; --rot: -1.2deg; }
.bubble-hero::before { left: -26px; top: 42%; border-width: 12px 26px 12px 0; border-color: transparent #ffd23f transparent transparent; }
.bubble-hero::after { left: -17px; top: calc(42% + 5px); border-width: 7px 18px 7px 0; border-color: transparent #fffbea transparent transparent; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 1.6rem; }
.kpi { border: 4px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem 1.1rem; color: #fff; position: relative; overflow: hidden; background: var(--k); text-decoration: none; display: block; min-width: 0; }
a.kpi { transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translate(-2px, -4px) rotate(-.6deg); box-shadow: 9px 10px 0 var(--ink); }
.kpi::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,255,255,.22) 1.5px, transparent 1.8px) 0 0 / 9px 9px;
  mask-image: linear-gradient(135deg, #000 0%, transparent 60%); -webkit-mask-image: linear-gradient(135deg, #000 0%, transparent 60%); pointer-events: none; }
.kpi-red { --k: linear-gradient(160deg, #ff6b5b, #c62a21); }
.kpi-blue { --k: linear-gradient(160deg, #5b8dff, #2045b0); }
.kpi-teal { --k: linear-gradient(160deg, #3fd1c1, #12857a); }
.kpi-gold { --k: linear-gradient(160deg, #ffcc4d, #d98a00); }
.kpi small { display: block; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; opacity: .95; }
.kpi b { display: block; font-family: Bangers, Impact, sans-serif; font-weight: 400; letter-spacing: .03em; font-size: clamp(1.5rem, 2.6vw, 2.1rem); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); margin: .15rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-size: .85rem; font-weight: 700; font-style: normal; opacity: .95; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Buttons & Forms ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: .7rem .85rem; background: #fff; border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: inset 3px 3px 0 rgba(23,19,15,.08); font-weight: 700; min-height: 48px;
}
input[type=file] { width: 100%; font-weight: 700; }
textarea { min-height: 110px; resize: vertical; }
textarea.mono { font: 600 .8rem/1.35 ui-monospace, Consolas, monospace; min-height: 130px; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--gold); }
label { display: block; font-weight: 900; font-size: .92rem; }
label small { font-weight: 700; color: #7a6a52; }
label > input, label > textarea, label > select { margin-top: .3rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 900; font-size: .92rem; margin-bottom: .35rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem 1.3rem; min-height: 48px;
  background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px;
  font-weight: 900; font-size: 1rem; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .1s, box-shadow .1s; white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-big { font-family: Bangers, Impact, sans-serif; font-weight: 400; font-size: 1.5rem; letter-spacing: .05em; width: 100%; background: var(--red); color: #fff; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); }
.btn.sm { min-height: 40px; padding: .4rem .8rem; font-size: .9rem; }
.btn.ghost { background: #fff; }
.btn.blue { background: #cfe0ff; }
.danger-btn { background: #ffd6d2; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

.stack-form { display: grid; gap: .95rem; }
.stack-form .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.stack-form .row.row-2 { grid-template-columns: 1fr 1fr; }
.pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-color span { display: grid; place-items: center; width: 42px; height: 42px; border: 3px solid var(--ink); border-radius: 50%; cursor: pointer; transition: transform .1s; font-size: .75rem; font-weight: 900; }
.pick input:checked + span { transform: translate(-2px, -3px) scale(1.08); box-shadow: 4px 4px 0 var(--ink); outline: 4px solid var(--gold); outline-offset: 2px; }
.pick input:focus-visible + span { outline: 4px solid var(--blue); }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 900; cursor: pointer; }
label.check input { width: 22px; height: 22px; accent-color: var(--red); margin: 0; }

/* ---------- Monat ---------- */
.month-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.month-nav .comic-title { min-width: 0; }
.arrow { display: inline-grid; place-items: center; width: 46px; height: 46px; font: 900 1.4rem/1 Nunito, sans-serif; text-decoration: none; background: #fff; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); transition: transform .1s; }
.arrow:hover { transform: translate(-1px, -2px); background: var(--gold); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45rem; }
.cal-dow { text-align: center; font-family: Bangers, Impact, sans-serif; letter-spacing: .06em; font-size: 1.15rem; color: var(--moss); padding-bottom: .1rem; }
.cal-dow.we { color: var(--red); }
.day {
  position: relative; display: flex; flex-direction: column; gap: .2rem; min-height: 112px; padding: .35rem .4rem .45rem;
  background: #fff; border: 3px solid var(--ink); border-radius: 12px; text-decoration: none; overflow: hidden;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.day:hover { transform: translate(-1px, -3px) rotate(-.5deg); box-shadow: 5px 6px 0 var(--ink); z-index: 2; }
.day.we { background: #fff3ea; }
.day.out { opacity: .45; background: #f7eedb; box-shadow: none; border-style: dashed; }
.day.past:not(.today) .num { color: #9a8a70; }
.day .num { font-family: Bangers, Impact, sans-serif; font-size: 1.45rem; line-height: 1; letter-spacing: .03em; }
.day.today { background: #fff2b8; box-shadow: 0 0 0 3px var(--gold), 5px 5px 0 3px var(--ink); }
.day.today .num { color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--red); }
.day .today-tag { position: absolute; top: .3rem; right: .35rem; font-family: Bangers, Impact, sans-serif; font-size: .85rem; letter-spacing: .05em; color: #fff; background: var(--red); border: 2px solid var(--ink); border-radius: 6px; padding: 0 .3rem; transform: rotate(6deg); }
.chipev { display: block; font-size: .74rem; font-weight: 900; line-height: 1.2; padding: .12rem .35rem; border: 2px solid var(--ink); border-radius: 7px; background: color-mix(in srgb, var(--c) 30%, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chipev.allday { background: var(--c); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.chipev i { font-style: normal; opacity: .75; margin-right: .2rem; }
.more { font-size: .72rem; font-weight: 900; color: #6b5b45; }
.dots { display: none; gap: 3px; flex-wrap: wrap; margin-top: auto; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); border: 1.5px solid var(--ink); }

/* ---------- Termin-Karten ---------- */
.ev-list { display: grid; gap: .9rem; }
.ev {
  display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center;
  background: #fff; border: 3px solid var(--ink); border-left: 14px solid var(--c); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink);
  padding: .7rem .9rem; text-decoration: none; transition: transform .12s, box-shadow .12s;
}
a.ev:hover { transform: translate(-2px, -3px) rotate(-.4deg); box-shadow: 6px 7px 0 var(--ink); }
.ev-face { width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--ink); background: color-mix(in srgb, var(--c) 35%, #fff8e7); overflow: hidden; box-shadow: 2px 2px 0 var(--ink); flex: none; }
.ev-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.25); transform-origin: 50% 20%; }
.ev-main { min-width: 0; }
.ev-time { font-family: Bangers, Impact, sans-serif; font-size: 1.25rem; letter-spacing: .04em; line-height: 1.05; }
.ev-time small { font-family: Nunito, sans-serif; font-size: .8rem; font-weight: 700; color: #6b5b45; letter-spacing: 0; margin-left: .3rem; }
.ev h3 { margin: .1rem 0 0; font-size: 1.1rem; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.ev .meta { margin: .15rem 0 0; font-size: .88rem; font-weight: 700; color: #6b5b45; overflow-wrap: anywhere; }
.ev .desc { margin: .35rem 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.ev .tag { display: inline-block; font-size: .72rem; font-weight: 900; padding: 0 .4rem; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); margin-left: .3rem; vertical-align: 2px; }
.ev.now { box-shadow: 0 0 0 3px var(--gold), 5px 5px 0 3px var(--ink); }
.ev.done { opacity: .6; }
.ev-go { font: 900 1.4rem/1 Nunito, sans-serif; }

.daygroup { margin-bottom: 1.3rem; }
.daygroup h3.dayhead { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .55rem; font-family: Bangers, Impact, sans-serif; font-weight: 400; font-size: 1.5rem; letter-spacing: .04em; }
.daygroup h3.dayhead a { text-decoration: none; }
.daygroup h3.dayhead small { font-family: Nunito, sans-serif; font-size: .85rem; font-weight: 900; color: #6b5b45; letter-spacing: 0; }
.daygroup h3.dayhead .rel { font-family: Bangers, sans-serif; font-size: .95rem; color: #fff; background: var(--moss); border: 2px solid var(--ink); border-radius: 7px; padding: 0 .4rem; letter-spacing: .05em; }
.daygroup h3.dayhead .rel.today { background: var(--red); }

.two-col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.4rem; align-items: start; }
.muted { color: #6b5b45; }
.empty { text-align: center; font-weight: 900; font-size: 1.1rem; padding: 1rem; }
.empty-gnome { width: 130px; margin: 0 auto .6rem; }

/* ---------- Tag ---------- */
.back { display: inline-block; font-weight: 900; text-decoration: none; margin-bottom: 1rem; padding: .3rem .7rem; background: var(--paper); border: 3px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.day-quip-row { display: flex; align-items: center; gap: 1.4rem; margin: .4rem 0 1.4rem; }
.quip-gnome { width: 120px; flex: 0 0 auto; cursor: pointer; transform-origin: 50% 100%; animation: wobble 5s ease-in-out infinite; }
.day-quip { flex: 1; font-size: 1.5rem; --rot: 1deg; cursor: pointer; }
.day-quip::before { left: -26px; top: 40%; border-width: 12px 26px 12px 0; border-color: transparent #ffd23f transparent transparent; }
.day-quip::after { left: -17px; top: calc(40% + 5px); border-width: 7px 18px 7px 0; border-color: transparent #fffbea transparent transparent; }

/* ---------- Neu / Bearbeiten ---------- */
.new-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
.new-gnome { position: sticky; top: 100px; text-align: center; }
.side-gnome { width: 220px; margin: 0 auto; animation: wobble 5s ease-in-out infinite; transform-origin: 50% 100%; }
.new-gnome .bubble { font-size: 1.25rem; margin-top: .9rem; --rot: 2deg; }
.new-gnome .bubble::before { left: 50%; top: -24px; transform: translateX(-50%); border-width: 0 12px 24px 12px; border-color: transparent transparent #ffd23f transparent; }
.new-gnome .bubble::after { left: 50%; top: -15px; transform: translateX(-50%); border-width: 0 7px 16px 7px; border-color: transparent transparent #fffbea transparent; }
.danger { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 3px dashed rgba(23,19,15,.25); }
.danger form { margin: 0; }
.confirm summary { list-style: none; cursor: pointer; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm[open] summary { margin-bottom: .6rem; }
.confirm .box { background: #ffd6d2; border: 3px solid var(--ink); border-radius: 12px; padding: .7rem .9rem; display: grid; gap: .6rem; font-weight: 700; }
.note { background: #e7f0ff; border: 3px solid var(--ink); border-radius: 12px; padding: .55rem .8rem; font-weight: 700; font-size: .9rem; margin: 0; }

/* ---------- Einstellungen ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
.settings-grid .card { margin: 0; }
.status { display: inline-flex; align-items: center; gap: .4rem; font-weight: 900; padding: .25rem .7rem; border: 3px solid var(--ink); border-radius: 99px; }
.status.ok { background: #c9f2c7; }
.status.bad { background: #ffd6d2; }
.status.warn { background: #fff0b3; }
.copy-line { display: flex; gap: .5rem; align-items: stretch; }
.copy-line code { flex: 1; min-width: 0; display: block; padding: .55rem .7rem; background: #fff; border: 3px dashed var(--ink); border-radius: 10px; font-size: .88rem; font-weight: 700; word-break: break-all; user-select: all; }
.steps { margin: 0; padding-left: 1.3rem; font-weight: 700; font-size: .93rem; }
.steps li { margin-bottom: .35rem; }
.steps a { color: var(--blue); }
details.howto summary { cursor: pointer; font-weight: 900; color: var(--blue); }
details.howto[open] summary { margin-bottom: .6rem; }
h3.sub { margin: 1rem 0 .3rem; font-size: 1rem; font-weight: 900; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 2rem; padding: 2rem 1rem; flex-wrap: wrap; }
.auth-stage { display: flex; flex-direction: column; align-items: center; max-width: 320px; }
.auth-gnome { width: 240px; animation: wobble 5s ease-in-out infinite; transform-origin: 50% 100%; order: 2; }
.bubble-auth { order: 1; margin-bottom: 1.6rem; --rot: -2.5deg; }
.bubble-auth::before { left: 50%; bottom: -24px; transform: translateX(-50%); border-width: 24px 12px 0 12px; border-color: #ffd23f transparent transparent transparent; }
.bubble-auth::after { left: 50%; bottom: -15px; transform: translateX(-50%); border-width: 16px 7px 0 7px; border-color: #fffbea transparent transparent transparent; }
.auth-card { width: min(400px, 100%); display: grid; gap: 1rem; margin: 0; }
.auth-card .comic-title { text-align: center; color: #fff; }
.err { background: #ffd6d2; border: 3px solid var(--ink); border-radius: 12px; padding: .6rem .8rem; font-weight: 900; margin: 0; }
.ok-box { background: #e3f6d8; border: 3px solid var(--ink); border-radius: 12px; padding: .6rem .8rem; font-weight: 700; margin: 0; }
.hint { margin: -.4rem 0 0; font-size: .85rem; font-weight: 700; color: #6b5b45; }
.code-input { font-family: Bangers, Impact, sans-serif !important; font-size: 2rem !important; letter-spacing: .35em; text-align: center; padding: .4rem .6rem !important; }
.code-input::placeholder { color: #c9b994; }
.qr { background: #fff; border: 4px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-sm); padding: .5rem; width: min(250px, 100%); margin: .2rem auto; aspect-ratio: 1; }
.qr svg { display: block; width: 100%; height: 100%; }
.manual { font-size: .9rem; font-weight: 700; }
.manual summary { cursor: pointer; color: var(--blue); }
.secret { display: block; margin-top: .5rem; padding: .6rem; background: #fff; border: 3px dashed var(--ink); border-radius: 10px; font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; user-select: all; }
.link-btn { background: none; border: 0; padding: .3rem; font: 700 .92rem Nunito, sans-serif; color: var(--blue); text-decoration: underline; cursor: pointer; justify-self: center; }
.link-btn:hover { color: var(--red); }
.cancel { text-align: center; font-weight: 700; font-size: .9rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: .6rem; max-width: min(560px, calc(100% - 2rem));
  background: #fffbea radial-gradient(circle at 30% 20%, #fff 0%, #fffbea 45%, #ffeeb8 100%);
  border: 3px solid #111; border-radius: 20px; box-shadow: 0 0 0 3px #ffd23f, 6px 7px 0 3px #d9480f;
  padding: .55rem 1.1rem .5rem .6rem; font-family: Bangers, "Comic Sans MS", sans-serif; font-size: 1.25rem; letter-spacing: .035em; line-height: 1.15;
  animation: toastIn .4s cubic-bezier(.2,1.4,.4,1) both, toastOut .4s ease 6s forwards;
}
.toast.bad { box-shadow: 0 0 0 3px #ff8a80, 6px 7px 0 3px #b3261e; }
.toast-gnome { width: 52px; flex: 0 0 auto; margin: -22px 0 -6px; filter: drop-shadow(3px 3px 0 rgba(23,19,15,.3)); }
@keyframes toastIn { from { transform: translate(-50%, 140%); } }
@keyframes toastOut { to { transform: translate(-50%, 160%); opacity: 0; visibility: hidden; } }

/* ---------- Deko ---------- */
.corner-gnome { position: fixed; right: 0; bottom: 0; width: 150px; z-index: 0; pointer-events: none; }
.foot { position: relative; text-align: center; padding: 0 1rem 2rem; font-size: .85rem; font-weight: 700; color: #6b5b45; }
.foot-peek { width: 120px; height: 92px; overflow: hidden; margin: 0 auto; }
.foot-gnome { width: 120px; }
.foot p { margin: 0 auto; border-top: 4px solid var(--ink); padding: .8rem 120px 0; max-width: 700px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two-col, .settings-grid { grid-template-columns: 1fr; }
  .new-wrap { grid-template-columns: 1fr; }
  .new-gnome { position: static; display: flex; align-items: center; gap: 1rem; text-align: left; }
  .side-gnome { width: 110px; flex: 0 0 auto; margin: 0; }
  .new-gnome .bubble::before { left: -24px; top: 40%; transform: none; border-width: 12px 24px 12px 0; border-color: transparent #ffd23f transparent transparent; }
  .new-gnome .bubble::after { left: -15px; top: calc(40% + 5px); transform: none; border-width: 7px 16px 7px 0; border-color: transparent #fffbea transparent transparent; }
  .corner-gnome { width: 100px; }
  .foot p { padding-left: 1rem; padding-right: 1rem; }
  .nav-lbl { display: none; }
}
@media (max-width: 700px) {
  body { font-size: 15px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .brand { font-size: 1.6rem; }
  .topbar { padding: .6rem .8rem; justify-content: center; }
  /* App-Navigation unten wie bei einer echten App */
  .topbar nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around; gap: .2rem;
    padding: .45rem .4rem calc(.45rem + env(safe-area-inset-bottom)); background: var(--moss); border-top: 4px solid var(--ink);
  }
  .topbar nav a, .topbar nav button { flex-direction: column; gap: .05rem; padding: .3rem .2rem; min-width: 54px; font-size: .68rem; box-shadow: 2px 2px 0 var(--ink); border-radius: 10px; }
  .nav-lbl { display: block; }
  .nav-ico { font-size: 1.25rem; }
  .hero-gnome { width: 100px; }
  .bubble-hero { font-size: 1.2rem; padding: .65rem .85rem .55rem; }
  .bubble { font-size: 1.2rem; }
  .quip-gnome { width: 84px; }
  .day-quip { font-size: 1.2rem; }
  .kpis { gap: .7rem; }
  .kpi { padding: .8rem; }
  .kpi em { font-size: .75rem; }
  .card { padding: 1rem .8rem; }
  .stack-form .row, .stack-form .row.row-2 { grid-template-columns: 1fr; }
  .cal { gap: .25rem; }
  .cal-dow { font-size: .95rem; }
  .day { min-height: 62px; padding: .25rem; border-width: 2px; border-radius: 9px; box-shadow: 2px 2px 0 var(--ink); }
  .day .num { font-size: 1.15rem; }
  .day .today-tag { display: none; }
  .chipev, .more { display: none; }
  .dots { display: flex; }
  .ev { grid-template-columns: auto 1fr; gap: .7rem; padding: .6rem .7rem; }
  .ev-face { width: 46px; height: 46px; }
  .ev-go { display: none; }
  .corner-gnome { display: none; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .foot p { padding-left: 1rem; padding-right: 1rem; }
}
@media (display-mode: standalone) {
  .topbar { padding-top: max(.7rem, env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
