/* =========================================================================
   calendar_engelchen — design system
   Dark, premium, romantic. Soft glow, glass cards, warm accents.
   ========================================================================= */

:root {
  /* ---- palette ---- */
  --bg-0: #0a0712;          /* deepest */
  --bg-1: #120c1f;          /* app background */
  --bg-2: #1a1228;          /* raised surface */
  --bg-3: #241934;          /* card */
  --bg-4: #2f2243;          /* hover / input */
  --line: #3a2c52;          /* hairline border */
  --line-soft: #2a1f3d;

  --text-0: #f4eeff;        /* primary text */
  --text-1: #c9bce0;        /* secondary */
  --text-2: #8f82a8;        /* muted */
  --text-3: #6a5d80;        /* faint */

  /* ---- brand accents (romantic) ---- */
  --rose: #ff5c8a;
  --rose-soft: #ff8fb0;
  --gold: #ffcf8b;
  --lilac: #b98cff;
  --sky: #6fd6ff;
  --mint: #74e6c0;

  --accent: var(--rose);
  --accent-2: var(--lilac);

  /* gradients */
  --grad-brand: linear-gradient(135deg, #ff5c8a 0%, #b98cff 55%, #6fd6ff 100%);
  --grad-warm: linear-gradient(135deg, #ff5c8a 0%, #ffcf8b 100%);
  --grad-glow: radial-gradient(circle at 50% 0%, rgba(185,140,255,.20), transparent 60%);

  /* ---- shape ---- */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---- shadow ---- */
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 8px 24px rgba(0,0,0,.45);
  --sh-3: 0 18px 50px rgba(0,0,0,.55);
  --glow-rose: 0 0 0 1px rgba(255,92,138,.35), 0 8px 30px rgba(255,92,138,.25);

  /* ---- type ---- */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  --font-display: "SF Pro Display", var(--font);

  --ease: cubic-bezier(.16,.84,.34,1);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-0);
  background:
    var(--grad-glow),
    radial-gradient(900px 600px at 100% -10%, rgba(111,214,255,.08), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(255,92,138,.10), transparent 55%),
    var(--bg-1);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(255,92,138,.35); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }

/* ----------------------------------------------------------------- layout */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(180deg, rgba(26,18,40,.9), rgba(18,12,31,.92));
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
}
.main { min-width: 0; padding: 26px 30px 80px; }
.container { max-width: 1180px; margin: 0 auto; }

/* brand */
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad-warm);
  display: grid; place-items: center; font-size: 20px;
  box-shadow: var(--glow-rose);
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; }
.brand-name span { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* nav */
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: var(--r-md);
  color: var(--text-1); font-weight: 550; font-size: .95rem;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.nav-link .ic { width: 20px; text-align: center; font-size: 1.05rem; opacity: .92; }
.nav-link:hover { background: var(--bg-3); color: var(--text-0); }
.nav-link.active { background: linear-gradient(135deg, rgba(255,92,138,.18), rgba(185,140,255,.16)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,140,180,.25); }
.nav-link .badge { margin-left: auto; }
.nav-spacer { flex: 1; }

.who {
  margin-top: 8px; padding: 12px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px;
}
.who small { color: var(--text-2); display: block; }

/* ----------------------------------------------------------------- header */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.5rem, 2.4vw, 2.05rem); }
.page-head .sub { color: var(--text-2); margin-top: 4px; }
.page-head .spacer { flex: 1; }

/* ----------------------------------------------------------------- avatar */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .82rem; color: #1a1228;
  background: var(--grad-warm); box-shadow: var(--sh-1); flex: none;
}
.avatar.sm { width: 26px; height: 26px; font-size: .7rem; }
.avatar.lilac { background: linear-gradient(135deg, var(--lilac), var(--sky)); }

/* ----------------------------------------------------------------- card */
.card {
  background: linear-gradient(180deg, rgba(36,25,52,.82), rgba(30,21,45,.82));
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 20px;
}
.card.glass { backdrop-filter: blur(14px); }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h3 { font-size: 1.08rem; }
.card-h .spacer { flex: 1; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.dash { grid-template-columns: 1.6fr 1fr; align-items: start; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-3); color: var(--text-0);
  font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: transform .12s var(--ease), background .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-4); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--grad-warm); border-color: transparent; color: #2a0d18; box-shadow: var(--glow-rose); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-3); }
.btn.sm { padding: 7px 11px; font-size: .85rem; border-radius: var(--r-sm); }
.btn.icon { padding: 9px; width: 38px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ----------------------------------------------------------------- chips / tags */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 600;
  background: var(--bg-3); border: 1px solid var(--line);
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.tag {
  --c: var(--lilac);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 650;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
}
.tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); font-size: .72rem; font-weight: 700;
  background: var(--accent); color: #2a0d18;
}
.badge.soft { background: var(--bg-4); color: var(--text-1); }

/* ----------------------------------------------------------------- forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .82rem; color: var(--text-1); margin-bottom: 6px; font-weight: 600; }
.input, .select, textarea.input {
  width: 100%; padding: 11px 13px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text-0);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,92,138,.18); background: var(--bg-3);
}
textarea.input { resize: vertical; min-height: 84px; }
.input::placeholder { color: var(--text-3); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.help { color: var(--text-2); font-size: .8rem; margin-top: 5px; }

/* color picker swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s var(--ease);
}
.swatch:hover { transform: scale(1.12); }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }

/* toggle */
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle .track { width: 42px; height: 24px; border-radius: 99px; background: var(--bg-4); position: relative; transition: background .18s; }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s var(--ease); }
.toggle input:checked + .track { background: var(--grad-warm); }
.toggle input:checked + .track::after { transform: translateX(18px); }

/* ----------------------------------------------------------------- calendar */
.cal-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; min-width: 210px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 3px; }
.seg button { padding: 7px 14px; border: none; background: transparent; color: var(--text-1); border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .86rem; }
.seg button.active { background: var(--bg-4); color: #fff; box-shadow: var(--sh-1); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-dow { text-align: center; font-size: .76rem; color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 4px; }
.cal-cell {
  min-height: 116px; border-radius: var(--r-md); padding: 8px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 5px; transition: background .15s, border-color .15s;
  cursor: pointer; position: relative; overflow: hidden;
}
.cal-cell:hover { background: var(--bg-3); border-color: var(--line); }
.cal-cell.dim { opacity: .4; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255,92,138,.4); }
.cal-cell.today .daynum { background: var(--grad-warm); color: #2a0d18; }
.cal-daynum, .daynum { font-size: .82rem; font-weight: 700; color: var(--text-1); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; }
.cal-ev {
  --c: var(--lilac);
  font-size: .76rem; font-weight: 600; padding: 3px 7px; border-radius: 7px;
  background: color-mix(in srgb, var(--c) 22%, var(--bg-3));
  border-left: 3px solid var(--c); color: var(--text-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-more { font-size: .72rem; color: var(--text-2); font-weight: 600; }

/* agenda list */
.agenda-day { margin-bottom: 18px; }
.agenda-date { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.agenda-date .d { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.agenda-date .m { color: var(--text-2); font-weight: 600; }
.ev-row {
  --c: var(--lilac);
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line-soft); border-left: 4px solid var(--c);
  cursor: pointer; transition: background .15s, transform .12s;
}
.ev-row:hover { background: var(--bg-3); transform: translateX(2px); }
.ev-row .time { font-variant-numeric: tabular-nums; color: var(--text-1); font-weight: 650; min-width: 96px; font-size: .88rem; }
.ev-row .ttl { font-weight: 650; }
.ev-row .meta { color: var(--text-2); font-size: .82rem; }

/* ----------------------------------------------------------------- list / checkbox items */
.list { display: flex; flex-direction: column; gap: 4px; }
.item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line-soft); transition: background .15s;
}
.item:hover { background: var(--bg-3); }
.item.done .item-text { text-decoration: line-through; color: var(--text-3); }
.check {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); cursor: pointer;
  display: grid; place-items: center; flex: none; transition: background .15s, border-color .15s; color: transparent;
}
.check.on { background: var(--grad-warm); border-color: transparent; color: #2a0d18; }
.item-text { flex: 1; }
.item-qty { color: var(--text-2); font-size: .82rem; }

/* ----------------------------------------------------------------- ranking */
.rank-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-soft); margin-bottom: 8px; position: relative; overflow: hidden; }
.rank-bar { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,92,138,.16), rgba(185,140,255,.10)); transform-origin: left; z-index: 0; transition: transform .5s var(--ease); }
.rank-opt > * { position: relative; z-index: 1; }
.rank-opt.winner { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255,207,139,.4); }
.rank-score { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; min-width: 42px; text-align: right; }
.stars { display: inline-flex; gap: 3px; cursor: pointer; }
.star { font-size: 1.15rem; color: var(--text-3); transition: transform .1s, color .15s; }
.star.on { color: var(--gold); }
.star:hover { transform: scale(1.2); }

/* ----------------------------------------------------------------- countdown */
.countdown { display: flex; gap: 10px; }
.cd-unit { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px 14px; text-align: center; min-width: 62px; }
.cd-unit .n { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-unit .l { font-size: .68rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }

/* ----------------------------------------------------------------- activity feed */
.feed { display: flex; flex-direction: column; gap: 2px; }
.feed-item { display: flex; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--line-soft); font-size: .88rem; }
.feed-item:last-child { border-bottom: none; }
.feed-item .t { color: var(--text-3); font-size: .76rem; margin-left: auto; white-space: nowrap; }
.feed-item .who-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }

/* ----------------------------------------------------------------- modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(6,4,12,.6); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-back.open { display: flex; animation: fade .2s var(--ease); }
.modal {
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--sh-3); padding: 24px; animation: pop .25s var(--ease);
}
.modal-h { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.modal-h h2 { font-size: 1.3rem; }
.modal-h .x { margin-left: auto; cursor: pointer; color: var(--text-2); font-size: 1.4rem; line-height: 1; padding: 4px; }
.modal-h .x:hover { color: var(--text-0); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ----------------------------------------------------------------- toast */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  background: var(--bg-3); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--r-md); padding: 12px 16px; box-shadow: var(--sh-3); min-width: 220px;
  animation: slidein .3s var(--ease); font-size: .9rem;
}
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } }

/* ----------------------------------------------------------------- misc */
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .n { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; }
.kpi .l { color: var(--text-2); font-size: .82rem; }
.muted { color: var(--text-2); }
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty .big { font-size: 2.4rem; margin-bottom: 8px; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; border: none; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.right { margin-left: auto; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(116,230,192,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(116,230,192,.5); } 70% { box-shadow: 0 0 0 8px rgba(116,230,192,0); } 100% { box-shadow: 0 0 0 0 rgba(116,230,192,0); } }

/* ----------------------------------------------------------------- auth screen */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; text-align: center; }
.auth-card .brand { justify-content: center; padding-top: 0; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; z-index: 50;
    flex-direction: row; padding: 8px; gap: 2px; border-right: none; border-top: 1px solid var(--line);
    justify-content: space-around;
  }
  .brand, .who, .nav-spacer { display: none; }
  .nav { flex-direction: row; gap: 2px; width: 100%; justify-content: space-around; }
  .nav-link { flex-direction: column; gap: 3px; padding: 7px 8px; font-size: .66rem; flex: 1; }
  .nav-link span:not(.ic):not(.badge) { font-size: .64rem; }
  .main { padding: 18px 16px 90px; }
  .grid.dash, .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .cal-cell { min-height: 78px; }
  .cal-ev { font-size: 0; padding: 4px; } /* dots-only on small screens */
  .cal-ev::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ----------------------------------------------------------------- memories */
.memory { display:block; border-radius: var(--r-md); overflow:hidden; background:var(--bg-2); border:1px solid var(--line-soft); transition: transform .12s var(--ease); }
.memory:hover { transform: translateY(-2px); border-color: var(--line); }
.memory-img { width:100%; height:84px; object-fit:cover; display:block; }
.memory-img.placeholder { display:grid; place-items:center; font-size:1.9rem; background:color-mix(in srgb, var(--c) 20%, var(--bg-3)); }
.memory-cap { padding:7px 9px 0; font-size:.78rem; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.memory .muted { padding:0 9px 8px; font-size:.72rem; }

/* ----------------------------------------------------------------- love notes */
.notes { display: flex; flex-direction: column; gap: 5px; max-height: 340px; overflow-y: auto; }
.note-item { display: flex; gap: 10px; padding: 9px 11px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-soft); }
.note-text { font-size: .92rem; line-height: 1.45; word-break: break-word; white-space: pre-wrap; }
.note-x { margin-left: 6px; background: transparent; border: none; color: var(--text-3); cursor: pointer; font-size: .8rem; padding: 2px 4px; align-self: flex-start; }
.note-x:hover { color: var(--rose); }

/* ----------------------------------------------------------------- themes */
[data-theme="rose"] {
  --bg-0: #140810; --bg-1: #1c0e18; --bg-2: #261523; --bg-3: #321a2c; --bg-4: #3e2236;
  --line: #4a2c40; --line-soft: #321d2c;
  --accent: #ff5c8a; --accent-2: #ff8fb0;
  --grad-brand: linear-gradient(135deg, #ff5c8a 0%, #ffa8c5 50%, #ffcf8b 100%);
  --grad-glow: radial-gradient(circle at 50% 0%, rgba(255,92,138,.22), transparent 60%);
}
[data-theme="aurora"] {
  --bg-0: #060d14; --bg-1: #0a1118; --bg-2: #101b25; --bg-3: #162430; --bg-4: #1e2f3e;
  --line: #294152; --line-soft: #1d2e3c;
  --accent: #74e6c0; --accent-2: #6fd6ff;
  --grad-brand: linear-gradient(135deg, #74e6c0 0%, #6fd6ff 50%, #b98cff 100%);
  --grad-warm: linear-gradient(135deg, #6fd6ff 0%, #74e6c0 100%);
  --grad-glow: radial-gradient(circle at 50% 0%, rgba(111,214,255,.20), transparent 60%);
  --glow-rose: 0 0 0 1px rgba(111,214,255,.35), 0 8px 30px rgba(111,214,255,.25);
}

/* --------------------------------------------------------- mobile "Mehr" sheet */
.nav-more { display: none; background: transparent; border: none; cursor: pointer; font: inherit; color: var(--text-1); }
.more-backdrop, .more-sheet { display: none; }
.more-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border-top: 1px solid var(--line); border-radius: 22px 22px 0 0;
  box-shadow: var(--sh-3);
  padding: 8px 14px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(115%); transition: transform .26s var(--ease);
}
.more-sheet.open { transform: translateY(0); }
.more-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(6,4,12,.55); backdrop-filter: blur(3px); }
.more-backdrop.open { display: block; animation: fade .2s var(--ease); }
.more-grabber { width: 42px; height: 4px; border-radius: 99px; background: var(--line); margin: 4px auto 12px; }
.more-who { display: flex; align-items: center; gap: 11px; padding: 2px 6px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px; }
.more-item { display: flex; align-items: center; gap: 14px; padding: 14px 10px; border-radius: var(--r-md); font-weight: 600; font-size: 1rem; color: var(--text-1); }
.more-item span { font-size: 1.2rem; width: 24px; text-align: center; }
.more-item:active, .more-item:hover, .more-item.active { background: var(--bg-4); color: #fff; }

@media (max-width: 880px) {
  .nav-secondary { display: none; }
  .nav-more { display: flex; }
  .more-sheet { display: block; }
  /* iPhone safe-area: lift the bottom bar + content above the home indicator */
  .sidebar { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  /* modals become bottom sheets — easier to reach + fill the width */
  .modal-back { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 22px 22px 0 0; max-height: 92vh;
           padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: sheetup .28s var(--ease); }
}
@keyframes sheetup { from { transform: translateY(100%); } }
