/* ---------- Farben / Themes (Karten) ---------- */
:root {
  --bg: #eef0f6;
  --card: #ffffff;
  --text: #1d2129;
  --muted: #6b7280;
  --line: rgba(20, 25, 50, .10);
  --accent: #4f6df5;
  --accent-text: #ffffff;
  --hover: rgba(20, 25, 50, .06);
  --danger: #d8434f;
  --ok: #2a9d5c;
  --glass-border: rgba(255, 255, 255, .55);
  --shadow: 0 1px 2px rgba(20, 25, 50, .08), 0 6px 20px rgba(20, 25, 50, .10);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12141b; --card: #1c1f2a; --text: #e8eaf1; --muted: #9098ad; --line: rgba(255, 255, 255, .09);
  --accent: #7189ff; --accent-text: #0e1020; --hover: rgba(255, 255, 255, .07); --danger: #ff6b76; --ok: #4cc38a;
  --glass-border: rgba(255, 255, 255, .10);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .30);
  color-scheme: dark;
}
:root[data-theme="midnight"] {
  --bg: #070b1a; --card: #0e1530; --text: #dfe7ff; --muted: #8391bc; --line: rgba(120, 150, 255, .14);
  --accent: #5b9dff; --accent-text: #06112b; --hover: rgba(120, 150, 255, .10); --danger: #ff6b7d; --ok: #4cc38a;
  --glass-border: rgba(120, 150, 255, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="forest"] {
  --bg: #eef3ec; --card: #fbfdfa; --text: #1d2a1f; --muted: #66786a; --line: rgba(30, 60, 35, .12);
  --accent: #2f8a4f; --accent-text: #ffffff; --hover: rgba(30, 60, 35, .07); --danger: #c8434b; --ok: #2f8a4f;
  color-scheme: light;
}
:root[data-theme="sunset"] {
  --bg: #fbf1e9; --card: #fffaf6; --text: #33231c; --muted: #8a6f61; --line: rgba(90, 50, 30, .12);
  --accent: #e2643b; --accent-text: #ffffff; --hover: rgba(90, 50, 30, .07); --danger: #c8434b; --ok: #2a9d5c;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #12141b; --card: #1c1f2a; --text: #e8eaf1; --muted: #9098ad; --line: rgba(255, 255, 255, .09);
    --accent: #7189ff; --accent-text: #0e1020; --hover: rgba(255, 255, 255, .07); --danger: #ff6b76; --ok: #4cc38a;
    --glass-border: rgba(255, 255, 255, .10);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .30);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-gutter: stable; }
body {
  background: var(--wall, var(--bg));
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  min-height: 100vh;
}

/* ---------- Hintergründe (Verläufe) ---------- */
body[data-wall="aurora"] { background-image: linear-gradient(135deg, #f0abfc 0%, #c084fc 22%, #818cf8 50%, #38bdf8 78%, #2dd4bf 100%); }
body[data-wall="sunset"] { background-image: linear-gradient(135deg, #fde68a 0%, #fb923c 28%, #f43f5e 58%, #a855f7 100%); }
body[data-wall="ocean"] { background-image: linear-gradient(135deg, #a5f3fc 0%, #38bdf8 32%, #3b82f6 62%, #1e3a8a 100%); }
body[data-wall="forest"] { background-image: linear-gradient(135deg, #d9f99d 0%, #4ade80 30%, #059669 62%, #064e3b 100%); }
body[data-wall="dusk"] { background-image: linear-gradient(135deg, #312e81 0%, #6d28d9 45%, #be185d 100%); }
body[data-wall="graphite"] { background-image: linear-gradient(135deg, #4b5563 0%, #1f2937 55%, #0b0f19 100%); }
body[data-wall="none"] { background-image: none; }
body.has-bg { background: var(--bg-image) center / cover no-repeat fixed; }
body.has-bg::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #000; opacity: var(--bg-dim, .3); }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
body:not(.edit) .edit-only { display: none !important; }

/* ---------- Obere Leiste (dunkles Milchglas) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; padding-top: max(7px, env(safe-area-inset-top));
  background: rgba(16, 18, 27, .58); backdrop-filter: blur(14px) saturate(1.4);
  color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand { font-weight: 700; letter-spacing: .2px; margin-right: 4px; }
.spacer { flex: 1; }
#status { font-size: 12px; color: rgba(255, 255, 255, .65); white-space: nowrap; }
#status.err { color: #ff9aa2; }

.pill, .topbar .menu summary.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px; border: 0; border-radius: 999px; list-style: none;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pill.icon { width: 30px; padding: 0; font-size: 16px; }
.pill:hover, .topbar .menu summary.pill:hover, .menu[open] > summary.pill { background: rgba(255, 255, 255, .26); }
.pill.active { background: #fff; color: #1d2129; }
.avatar {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; list-style: none; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 13px; user-select: none;
}
.menu { position: relative; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; max-height: 80vh; overflow: auto; z-index: 30;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px;
}
#pagesMenu .menu-list { left: 0; right: auto; }
.menu-list button {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px;
}
.menu-list button:hover { background: var(--hover); }
.menu-list button.cur { font-weight: 700; }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

#tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
#tabs button {
  border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 999px; color: rgba(255, 255, 255, .8);
  white-space: nowrap; font-size: 13px;
}
#tabs button:hover { background: rgba(255, 255, 255, .14); color: #fff; }
#tabs button.active { background: #fff; color: #1d2129; font-weight: 700; }

.searchbox { position: relative; }
.searchbox input {
  width: 190px; height: 30px; background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid transparent;
  border-radius: 999px; padding: 0 14px; outline: none;
}
.searchbox input::placeholder { color: rgba(255, 255, 255, .65); }
.searchbox input:focus { width: 270px; background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .5); }
#results {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(420px, 92vw); max-height: 60vh; overflow: auto;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px;
}
#results .res {
  display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; background: none;
  padding: 7px 10px; border-radius: 6px; overflow: hidden;
}
#results .res:hover, #results .res.sel { background: var(--hover); }
#results .res b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#results .res small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#results .none { padding: 10px; color: var(--muted); }

#banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 20px;
  background: color-mix(in srgb, var(--danger) 16%, var(--card)); color: var(--text); border-bottom: 1px solid var(--line);
}
#banner button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 4px 12px; }

/* ---------- Seite ---------- */
main { max-width: var(--page-w, 1800px); margin: 0 auto; padding: 0 20px 40px; }
.websearch {
  display: flex; align-items: center; max-width: 640px; margin: 26px auto 6px; height: 46px; padding: 0 6px 0 22px;
  background: rgba(255, 255, 255, .96); color: #1d2129; border-radius: 999px; box-shadow: var(--shadow);
}
.websearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 15px; color: #1d2129; }
.websearch input::placeholder { color: #8a90a0; }
.websearch button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; font-size: 15px; }
.websearch button:hover { background: rgba(0, 0, 0, .07); }

#board {
  --cols: 4;
  display: grid; grid-template-columns: var(--tpl, repeat(var(--cols), minmax(0, 1fr)));
  gap: 14px; padding: 18px 0; align-items: start;
}
@media (max-width: 1000px) { #board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  main { padding: 0 10px 30px; }
  #board { grid-template-columns: minmax(0, 1fr); }
  .topbar { flex-wrap: wrap; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .searchbox { order: 5; flex: 1 1 100%; }
  .searchbox input, .searchbox input:focus { width: 100%; }
  #tabs { order: 4; flex: 1 1 100%; }
  .spacer { display: none; }
  .brand { flex: 1; }
  .hide-sm { display: none; }
  .websearch { margin-top: 16px; }
}

.col { display: flex; flex-direction: column; gap: 14px; min-height: 80px; border-radius: 12px; }
.col.over { outline: 2px dashed #fff; outline-offset: 4px; }
.empty { grid-column: 1 / -1; text-align: center; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); padding: 60px 0; }

/* ---------- Widgets (Milchglas-Karten) ---------- */
.widget {
  --wc: transparent;
  background: color-mix(in srgb, var(--card) calc(var(--wa, 90) * 1%), transparent); backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid var(--glass-border); border-top: 3px solid var(--wc);
  border-radius: 10px; box-shadow: var(--shadow); overflow: hidden;
}
body[data-wall="none"] .widget { background: var(--card); backdrop-filter: none; }
.edit .widget { outline: 1px dashed rgba(255, 255, 255, .7); outline-offset: 2px; }
.widget[data-color="blue"] { --wc: #4f6df5; }
.widget[data-color="green"] { --wc: #2fa866; }
.widget[data-color="red"] { --wc: #e0525c; }
.widget[data-color="orange"] { --wc: #f08a2c; }
.widget[data-color="purple"] { --wc: #9a63e6; }
.widget[data-color="teal"] { --wc: #1fb0b0; }
.widget[data-color="pink"] { --wc: #e561a8; }
.widget[data-color="gray"] { --wc: #8b92a8; }
/* Haftnotizen */
.widget[data-color^="note-"] { --text: #3a3200; --muted: #7a6d1a; --line: rgba(0, 0, 0, .12); --hover: rgba(0, 0, 0, .06); --bg: rgba(255, 255, 255, .4); border-top-color: transparent; }
.widget[data-color="note-yellow"] { --card: #fff3a0; }
.widget[data-color="note-green"] { --card: #c9f2c7; --text: #123d16; --muted: #3f6f45; }
.widget[data-color="note-blue"] { --card: #cfe6ff; --text: #0f2d52; --muted: #46688f; }
.widget[data-color="note-pink"] { --card: #ffd3e4; --text: #4f1230; --muted: #8c4a68; }
.widget[data-color^="note-"] { background: var(--card); backdrop-filter: none; color: var(--text); }
.widget.dragging { opacity: .4; }
.widget.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow); } }

.widget-head { display: flex; align-items: center; gap: 4px; padding: 10px 12px 4px; }
.edit .widget-head { cursor: grab; }
.widget-head h2 {
  flex: 1; margin: 0; font-size: 13px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; user-select: none;
}
.widget-head button {
  border: 0; background: none; color: var(--muted); border-radius: 6px; padding: 2px 7px;
}
.widget-head button:hover { background: var(--hover); color: var(--text); }
.widget-head .wpublic { font-size: 11px; color: var(--muted); padding: 0 2px; }
.widget-body { padding: 4px 12px 12px; }
.widget[data-h="s"] .widget-body { max-height: 200px; overflow: auto; }
.widget[data-h="m"] .widget-body { max-height: 320px; overflow: auto; }
.widget[data-h="l"] .widget-body { max-height: 480px; overflow: auto; }
.widget.collapsed .widget-body { display: none; }
.muted { color: var(--muted); font-size: 12.5px; }
.err-text { color: var(--danger); font-size: 13px; }

/* Lesezeichen */
ul.links, ul.feed, ul.todo, ul.upcoming { list-style: none; margin: 0; padding: 0; }
ul.links ul.links { margin-left: 14px; border-left: 1px solid var(--line); padding-left: 6px; }
.links li { border-radius: 6px; }
.links li > .row { display: flex; align-items: center; border-radius: 6px; }
.links li > .row:hover { background: var(--hover); }
.links li.dragging { opacity: .35; }
.links li.drop-before { box-shadow: 0 -2px 0 var(--accent); }
.links li.drop-after { box-shadow: 0 2px 0 var(--accent); }
.links li.drop-into > .row { outline: 2px solid var(--accent); }
.links a, .links .folder-btn { flex: 1; display: flex; align-items: center; gap: 10px; padding: 5px 6px; min-width: 0; }
.links .folder-btn { border: 0; background: none; text-align: left; font-weight: 600; }
.links .lt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.links .lt-title, .links .folder-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links .lt-url { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links .caret { width: 16px; text-align: center; color: var(--muted); flex: none; }
.fav { width: 18px; height: 18px; flex: none; border-radius: 4px; }

/* Lesezeichen: Kachelansicht (Ordner als Abschnitte, Links als Symbol-Kacheln) */
.link-sections { display: flex; flex-direction: column; gap: 16px; }
.link-section { display: flex; flex-direction: column; gap: 8px; }
.link-sec-head { display: flex; align-items: center; gap: 4px; }
.link-sec-toggle { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; font-weight: 600; padding: 3px 4px; border-radius: 6px; min-width: 0; cursor: pointer; }
.link-sec-toggle:hover { background: var(--hover); }
.link-sec-toggle span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-sec-openall { border: 0; background: none; color: var(--muted); padding: 2px 7px; border-radius: 6px; font-size: 13px; flex: none; cursor: pointer; }
.link-sec-openall:hover { color: var(--text); background: var(--hover); }
.link-sec-head.drop-into { outline: 2px solid var(--accent); border-radius: 6px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.link-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; background: var(--hover); color: inherit; text-decoration: none; text-align: center; }
.link-tile:hover { background: color-mix(in srgb, var(--accent) 14%, var(--hover)); }
.link-tile .fav-lg { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; flex: none; }
.link-tile .link-tile-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.link-tile .lt-title { font-size: 12px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.link-tile .tile-actions { position: absolute; top: 2px; right: 2px; display: flex; }
.link-tile.dragging, .link-sec-toggle.dragging { opacity: .35; }
.link-tile.drop-before { box-shadow: -2px 0 0 var(--accent); }
.link-tile.drop-after { box-shadow: 2px 0 0 var(--accent); }
.link-tile.drop-into { outline: 2px solid var(--accent); }
button.x {
  border: 0; background: none; color: var(--muted); padding: 2px 7px; border-radius: 6px; font-size: 14px; line-height: 1;
}
button.x:hover { color: var(--text); background: var(--hover); }
button.x.del:hover { color: var(--danger); }
.adders { display: flex; gap: 4px; margin-top: 6px; }
button.add {
  margin-top: 6px; border: 0; background: none; color: var(--muted); padding: 4px 6px; border-radius: 6px; font-size: 13px;
}
.adders button.add { margin-top: 0; }
button.add:hover { background: var(--hover); color: var(--text); }

/* Aufgaben */
.todo li { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 6px; }
.todo li:hover { background: var(--hover); }
.todo li.done span { text-decoration: line-through; color: var(--muted); }
.todo li span { flex: 1; overflow-wrap: anywhere; }
.todo input[type=checkbox] { accent-color: var(--accent); }
.inline-input, .widget textarea, .form input, .form select, .form textarea {
  width: 100%; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; outline: none;
}
.inline-input:focus, .widget textarea:focus, .form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
.widget textarea { min-height: 160px; resize: vertical; background: transparent; border-color: transparent; padding: 4px 2px; }
.widget textarea:focus { border-color: var(--line); }
.todo-add { margin-top: 8px; }

/* Feed */
.tabs { display: flex; gap: 2px; margin: 0 -4px 6px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs button {
  border: 0; background: none; color: var(--muted); padding: 5px 9px; font-size: 12px; font-weight: 600;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.feed li { padding: 6px; border-radius: 6px; }
.feed li:hover { background: var(--hover); }
.feed a { display: block; line-height: 1.3; }
.feed li.read a { color: var(--muted); }
.feed .when { display: block; font-size: 11.5px; color: var(--muted); }
.feed-tools { display: flex; justify-content: flex-end; margin-top: 4px; }

/* Uhr / Wetter / Suche */
.clock-time { font-size: 38px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.clock-date { color: var(--muted); }
.greeting-text { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; }
.greeting-icon { font-size: 28px; }
.wx-now { display: flex; align-items: center; gap: 12px; }
.wx-icon { font-size: 40px; line-height: 1; }
.wx-temp { font-size: 30px; font-weight: 700; }
.wx-days, .wx-hours { display: grid; gap: 6px; margin-top: 10px; text-align: center; }
.wx-days { grid-template-columns: repeat(3, 1fr); }
.wx-hours { grid-template-columns: repeat(6, 1fr); }
.wx-days div, .wx-hours div { background: var(--hover); border-radius: 8px; padding: 6px 4px; font-size: 13px; }
.search-form { display: flex; gap: 6px; }

/* Kalender */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head b { font-weight: 600; cursor: pointer; }
.cal-head button { border: 0; background: none; border-radius: 6px; padding: 2px 10px; font-size: 16px; }
.cal-head button:hover { background: var(--hover); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal-grid .dow { color: var(--muted); font-size: 11px; padding: 2px 0; }
.cal-grid button { border: 0; background: none; border-radius: 6px; padding: 5px 0; position: relative; }
.cal-grid button:hover { background: var(--hover); }
.cal-grid button:disabled { cursor: default; }
.cal-grid button.other { color: var(--muted); opacity: .5; }
.cal-grid button.today { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.cal-grid button.has::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent);
}
.cal-grid button.today.has::after { background: var(--accent-text); }
ul.upcoming { margin-top: 8px; font-size: 13px; }
ul.upcoming li { padding: 2px 0; }
ul.upcoming .d { color: var(--muted); margin-right: 6px; }

/* Countdown / Zähler / Bild / Embed / Kurse */
.big { font-size: 40px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.counter { display: flex; align-items: center; justify-content: center; gap: 16px; }
.counter button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--hover); font-size: 20px; line-height: 1; }
.counter button:hover:not(:disabled) { background: var(--line); }
.widget-img { display: block; width: 100%; border-radius: 8px; }
.widget-img.contain { object-fit: contain; }
.widget-img.cover { object-fit: cover; height: 200px; }
.widget iframe { width: 100%; border: 0; border-radius: 8px; background: var(--hover); }
.stocks { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
.stocks td { padding: 4px 4px; border-bottom: 1px solid var(--line); }
.stocks tr:last-child td { border-bottom: 0; }
.stocks td:not(:first-child) { text-align: right; }
.up { color: var(--ok); }
.down { color: var(--danger); }

/* Rechner */
.calc-hist { min-height: 1.3em; text-align: right; }
.calc-in { text-align: right; font-size: 20px; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.calc-in.bad { border-color: var(--danger); }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-keys button { border: 1px solid var(--line); background: var(--hover); border-radius: 8px; padding: 9px 0; font-size: 16px; }
.calc-keys button:hover { background: var(--line); }
.calc-keys button.op { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.calc-keys button.clr { color: var(--danger); }
.qr-svg { display: block; width: 100%; max-width: 240px; margin: 0 auto; border-radius: 6px; shape-rendering: crispEdges; }
.qr-box { margin-bottom: 10px; }
.qr-input { width: 100%; min-height: 44px; resize: vertical; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: none; font: inherit; }
.qr-input:focus { border-color: var(--accent); }
.discord-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
.up-dot.discord-online { background: #23a55a; }
.up-dot.discord-idle { background: #f0b232; }
.up-dot.discord-dnd { background: #f23f43; }
.up-dot.discord-offline { background: var(--muted); }
.immich-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin-top: 10px; }
.immich-item { position: relative; }
.immich-thumb { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: var(--hover); }
.immich-play { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; line-height: 1; padding: 3px 4px; border-radius: 50%; }
.dc-members summary { cursor: pointer; font-weight: 600; margin-bottom: 4px; }
.dc-members .gh-row { gap: 8px; }
.pw-value { font: 16px ui-monospace, monospace; letter-spacing: .5px; word-break: break-all; background: var(--hover); padding: 12px 14px; border-radius: 10px; text-align: center; }
.pw-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.pw-opts label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.pw-opts input[type=number] { width: 56px; padding: 4px 6px; }

/* Währung */
.fx-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; margin: 6px 0; }
.fx-out { margin: 6px 0 2px; font-size: 26px; }

/* Timer / Stoppuhr / Pomodoro */
.timer { text-align: center; }
.timer .adders { justify-content: center; align-items: center; margin-top: 10px; }
.timer button.primary { padding: 6px 18px; }
ol.laps { margin: 8px 0 0; padding-left: 26px; text-align: left; max-height: 110px; overflow: auto; font-variant-numeric: tabular-nums; font-size: 13px; }

/* Weltuhr */
ul.worldclock { list-style: none; margin: 0; padding: 0; }
.worldclock li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 5px 4px; border-bottom: 1px solid var(--line); }
.worldclock li:last-child { border-bottom: 0; }
.wc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-time { font-variant-numeric: tabular-nums; font-size: 18px; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery button { border: 0; padding: 0; background: var(--hover); border-radius: 6px; overflow: hidden; cursor: zoom-in; }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
dialog:has(.lightbox) { width: min(920px, 96vw); }
.lightbox img { max-width: 100%; max-height: 72vh; object-fit: contain; align-self: center; border-radius: 8px; }
.lightbox .actions { align-items: center; justify-content: center; }

/* Diagramm */
.chart { width: 100%; height: auto; color: var(--muted); }
.chart-t { font-size: 9px; fill: currentColor; }
.chart-t.mid { text-anchor: middle; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-bar { fill: var(--accent); }
.chart-line { stroke: var(--accent); stroke-width: 2; }
.chart-dot { fill: var(--accent); }
.pie-edge { stroke: var(--card); stroke-width: 1; }

/* Profil */
.profile { text-align: center; padding: 4px 0; }
.avatar-img, .profile .avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 8px; }
.profile .avatar.ph { display: grid; place-items: center; font-size: 26px; }
.p-name { font-size: 18px; font-weight: 700; }
.p-bio { color: var(--muted); margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.p-link { display: inline-block; margin-top: 8px; color: var(--accent); }

/* ---------- Widget-Katalog (Seitenleiste) ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0); transition: background .2s; }
.drawer-backdrop.open { background: rgba(0, 0, 0, .42); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(420px, 100vw);
  display: flex; flex-direction: column; padding: 18px 16px 12px;
  background: #15171c; color: #e9ebf0; box-shadow: -12px 0 40px rgba(0, 0, 0, .4);
  transform: translateX(100%); transition: transform .22s ease;
}
.drawer.open { transform: none; }
.dhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dhead h3 { flex: 1; margin: 0; font-size: 18px; }
.dhead button { border: 0; background: none; color: #a7adba; font-size: 18px; border-radius: 8px; padding: 4px 10px; }
.dhead button:hover { background: #262a33; color: #fff; }
.dsearch {
  width: 100%; height: 42px; margin-bottom: 8px; padding: 0 14px; background: transparent; color: #e9ebf0;
  border: 1px solid #3a3f4b; border-radius: 8px; outline: none;
}
.dsearch:focus { border-color: #8a93a8; }
.dlist { flex: 1; overflow: auto; }
.dfoot { border-top: 1px solid #2a2e37; padding-top: 8px; margin-top: 6px; }
.drow {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 8px 10px; border: 0; background: none;
  color: inherit; text-align: left; border-radius: 8px; font-size: 15px;
}
.drow:hover { background: #22252d; }
.dic { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: #2a2d36; font-size: 19px; }
.dlbl { flex: 1; }
.dchev { color: #7c8391; font-size: 20px; }
.dnone { padding: 14px 10px; }

/* Widget-Kacheln: Symbol in farbiger Fläche + Beschriftung darunter, mehrspaltig statt einer langen Liste */
.dsub { color: #7c8391; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 16px 4px 8px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 4px; }
.dtile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 0; background: none; color: inherit; text-align: center; border-radius: 12px; }
.dtile:hover { background: #22252d; }
.dtile .dtic {
  width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 21px; background: #2a2d36; flex: none;
}
.dtile .dtic.c0 { background: #4f6df5; }
.dtile .dtic.c1 { background: #2fa866; }
.dtile .dtic.c2 { background: #b4700f; }
.dtile .dtic.c3 { background: #9a63e6; }
.dtile .dtic.c4 { background: #e0525c; }
.dtile .dtic.c5 { background: #1a8f8f; }
.dtile .dtic.c6 { background: #e561a8; }
.dtile .dtic.c7 { background: #656b7a; }
.dtile .dtlbl {
  font-size: 11.5px; line-height: 1.25; color: #e9ebf0; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}
.dtile .dtcount { font-size: 10px; color: #7c8391; margin-top: -4px; }

/* ---------- Dialog ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text);
  padding: 0; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
dialog::backdrop { background: rgba(10, 12, 20, .5); }
.form { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.form h3 { margin: 0 0 4px; }
.form h4 { margin: 8px 0 0; }
.form label { display: flex; flex-direction: column; gap: 4px; }
.form label span { font-size: 13px; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: 8px; }
.form label.check input { width: auto; }
.form textarea { min-height: 110px; resize: vertical; }
.form input[type=color] { padding: 2px; height: 36px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.actions button:not(.primary), .inline-btn {
  border: 1px solid var(--line); background: none; border-radius: 8px; padding: 7px 14px;
}
.actions button:hover:not(.primary), .inline-btn:hover { background: var(--hover); }
.form .danger { color: var(--danger); }
.form code, .form .mono { font: 12px ui-monospace, monospace; word-break: break-all; background: var(--hover); padding: 6px 8px; border-radius: 6px; display: block; }
.form ol { margin: 0; padding-left: 20px; }
.rows { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.rows .r { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.rows .r > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .r button { border: 1px solid var(--line); background: none; border-radius: 6px; padding: 3px 8px; font-size: 13px; }
.rows .r button:hover { background: var(--hover); }
.rows .r > span.badge { flex: none; }
.badge { font-size: 11px; background: var(--hover); border-radius: 10px; padding: 1px 8px; color: var(--muted); }

button.primary {
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px; padding: 7px 14px; font-weight: 600;
}
button.primary:hover { filter: brightness(1.08); }

/* ---------- Login ---------- */
.login-body { display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: var(--shadow);
}
.login-card h1 { margin: 0; font-size: 22px; }
.login-card p { margin: 0; }

/* ---------- Volle Breite, Meldung, kompakte Darstellung ---------- */
#band { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }
#band:empty { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; max-width: min(520px, 92vw);
  display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 999px;
  background: #1d2129; color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); font-size: 13.5px;
}
.toast button { border: 0; background: none; color: #9db4ff; font-weight: 700; padding: 0; }
.toast button:hover { text-decoration: underline; }
.share-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.share-sec h4 { margin: 0; }
.share-sec p { margin: 0; }
.share-sec .actions { margin-top: 0; }

body.compact { font-size: 13px; }
body.compact .widget-head { padding: 7px 10px 2px; }
body.compact .widget-body { padding: 2px 10px 8px; }
body.compact #board, body.compact .col { gap: 10px; }
body.compact .links a, body.compact .links .folder-btn { padding: 3px 6px; }
body.compact .links .lt-url { display: none; }
body.compact .websearch { height: 40px; margin-top: 16px; }

/* Text-Widget (Markdown) */
.md h3, .md h4, .md h5 { margin: .2em 0 .35em; line-height: 1.25; }
.md h3 { font-size: 18px; } .md h4 { font-size: 15.5px; } .md h5 { font-size: 13.5px; }
.md p { margin: 0 0 .6em; overflow-wrap: anywhere; }
.md ul, .md ol { margin: 0 0 .6em; padding-left: 20px; }
.md blockquote { margin: 0 0 .6em; padding: 2px 10px; border-left: 3px solid var(--accent); color: var(--muted); }
.md code { background: var(--hover); padding: 1px 5px; border-radius: 4px; font: 12.5px ui-monospace, monospace; }
.md a { color: var(--accent); text-decoration: underline; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: .7em 0; }

/* ================= Verwaltung (Seiten-Panel, Tab-Dialoge, Konto …) ================= */
dialog.wide { width: min(680px, calc(100vw - 20px)); height: min(760px, calc(100vh - 24px)); display: flex; flex-direction: column; }
dialog.wide[open] { display: flex; }
.td-box { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 18px 20px 14px; gap: 10px; }
.td-head { display: flex; align-items: center; gap: 10px; }
.td-head h3 { flex: 1; margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dclose { border: 0; background: none; color: var(--muted); font-size: 18px; border-radius: 8px; padding: 4px 10px; }
.dclose:hover { background: var(--hover); color: var(--text); }
.td-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.td-tabs button {
  border: 0; background: none; padding: 9px 12px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent;
}
.td-tabs button:hover { color: var(--text); }
.td-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.td-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px 8px; }
.td-foot { flex: none; display: flex; justify-content: flex-start; padding-top: 6px; }
.td-label { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.td-labelrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.td-count { text-align: right; font-size: 12px; color: var(--muted); margin-top: -6px; }
.td-input, .set-select {
  width: 100%; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; outline: none;
}
.td-input:focus, .set-select:focus { border-color: var(--accent); }
.td-input.cat { width: auto; }
textarea.td-input { resize: vertical; min-height: 90px; }
.td-inrow { display: flex; gap: 8px; align-items: center; }
.td-inrow .td-input { flex: 1; }
.td-btn {
  border: 1px solid var(--line); background: none; border-radius: 8px; padding: 8px 14px; color: var(--text); white-space: nowrap;
}
.td-btn:hover { background: var(--hover); }
.td-btn.danger, button.danger { color: var(--danger); }
.td-link { border: 0; background: none; color: var(--accent); padding: 4px 6px; border-radius: 6px; font-size: 13px; }
.td-link:hover { background: var(--hover); }
.td-emoji { border: 1px solid var(--line); background: none; border-radius: 8px; padding: 8px 12px; font-size: 16px; }
.td-tools { display: flex; gap: 14px; flex-wrap: wrap; }
.td-sub { display: flex; gap: 18px; border-bottom: 1px solid var(--line); }
.td-sub button { border: 0; background: none; padding: 8px 2px; font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--muted); border-bottom: 2px solid transparent; }
.td-sub button.active { color: var(--text); border-bottom-color: var(--text); }
.td-sub.seg { gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.td-sub.seg button { flex: 1; padding: 10px 14px; border: 0; font-size: 13px; letter-spacing: 0; }
.td-sub.seg button.active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border: 0; }
.td-archive { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 10px; }
.td-color { width: 100%; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: none; }
.td-color.sm { width: 46px; height: 32px; }
.td-range { width: 100%; accent-color: var(--accent); }
.emoji-box { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.emoji-box button { border: 0; background: none; font-size: 20px; border-radius: 6px; padding: 4px 0; }
.emoji-box button:hover { background: var(--hover); }
.section-select { font-weight: 700; }
.center { text-align: center; padding: 14px 0; }
.ok-text { color: var(--ok); margin: 0; }
.primary.full { width: 100%; padding: 11px; }

/* Einstellungs-Zeilen mit Schaltern */
.set-group { font-size: 11.5px; font-weight: 700; letter-spacing: .6px; color: var(--muted); margin: 12px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.set-text { display: flex; flex-direction: column; min-width: 0; }
.set-text b { font-weight: 600; }
.set-text small { color: var(--muted); font-size: 12.5px; }
.set-select { width: auto; max-width: 52%; cursor: pointer; }
.set-select.wide { width: 46%; }
.set-inline { display: flex; align-items: center; gap: 8px; }
input.switch {
  appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 26px; border-radius: 999px; position: relative;
  background: color-mix(in srgb, var(--muted) 45%, transparent); transition: background .15s; cursor: pointer; margin: 0;
}
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(20px); }
.key-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); gap: 10px; }
.keys { display: flex; align-items: center; gap: 6px; }
.keys em { font-style: normal; color: var(--muted); }
kbd { min-width: 34px; text-align: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--hover); font: 600 13px inherit; }

/* Hintergrund-Galerie */
.wall-box { background: color-mix(in srgb, var(--hover) 80%, transparent); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.wall-filter { display: flex; gap: 10px; }
.wall-filter .td-input:last-child { flex: 1; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.wall-thumb { aspect-ratio: 16 / 10; border: 2px solid transparent; border-radius: 8px; cursor: pointer; padding: 0; background-attachment: scroll; }
.wall-thumb:hover { transform: scale(1.03); }
.wall-thumb.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.swatch { aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; }
.swatch.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }

/* Spalten */
.col-cards { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--hover) 80%, transparent); }
.col-card { flex: 1 1 150px; min-width: 150px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.size-btns { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.size-btns button { border: 0; background: var(--hover); border-radius: 8px; padding: 8px 10px; text-align: left; }
.size-btns button.sel { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.size-btns button.danger { color: var(--danger); }
.col-rm { border: 0; background: none; text-align: left; padding: 4px 0; font-weight: 600; color: var(--text); }
.col-rm:hover { color: var(--danger); }

/* Konto-Bereiche */
.acct-card { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar.lg { width: 52px; height: 52px; font-size: 20px; flex: none; }
.pm-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.pm-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.pm-row.dragging { opacity: .4; }
.pm-handle { color: var(--muted); cursor: grab; user-select: none; }
.pm-title { flex: 1; text-align: left; border: 0; background: none; padding: 0; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.pm-title.static { cursor: default; }
a.pm-title:hover, button.pm-title:hover { color: var(--accent); }
.pm-stat { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pm-stat .switch { width: 40px; height: 22px; }
.pm-stat .switch::after { width: 16px; height: 16px; }
.pm-stat .switch:checked::after { transform: translateX(18px); }
.team-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--hover); border-radius: 999px; padding: 3px 6px 3px 12px; font-size: 13px; }
.chip button { border: 0; background: none; color: var(--muted); padding: 0 6px; font-size: 15px; }
.chip button:hover { color: var(--danger); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; font-size: 11px; letter-spacing: .5px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.data-table a { color: var(--accent); }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.stat-tile b { font-size: 26px; }
.stat-tile small { color: var(--muted); }
.secret { font: 15px ui-monospace, monospace; letter-spacing: 1.5px; white-space: pre-wrap; user-select: all; }
.plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: color-mix(in srgb, var(--ok) 8%, transparent); }
.plan-card ul { margin: 10px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.plan-card li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.help-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* Seiten-Panel (links) */
.pages-panel {
  position: fixed; z-index: 35; top: 46px; left: 10px; width: min(400px, calc(100vw - 20px)); max-height: calc(100vh - 62px);
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 50px rgba(0, 0, 0, .35);
}
.pp-search { width: 100%; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; outline: none; }
.pp-search:focus { border-color: var(--accent); }
.pp-list { flex: 1; min-height: 60px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.pp-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.pp-head b { flex: 1; }
.pp-av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 13px; flex: none; }
.pp-av.team { background: var(--hover); color: var(--text); font-size: 14px; }
.pp-row { display: flex; align-items: center; gap: 2px; padding-left: 38px; border-radius: 8px; }
.pp-row:hover { background: var(--hover); }
.pp-row.cur .pp-name { font-weight: 700; color: var(--accent); }
.pp-name { flex: 1; text-align: left; border: 0; background: none; padding: 8px 4px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.pp-ico { border: 0; background: none; color: var(--muted); border-radius: 6px; padding: 4px 8px; font-size: 15px; }
.pp-ico:hover { background: var(--hover); color: var(--text); }
.pp-ico.on { color: #f5b301; }
.pp-none { padding: 6px 40px; }
.pp-new { width: 100%; padding: 12px; font-size: 15px; }
.pp-btn { display: block; text-align: center; border: 1px solid var(--line); background: none; border-radius: 10px; padding: 10px; color: var(--text); text-decoration: none; }
.pp-btn:hover { background: var(--hover); }
.pp-note { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 10px; font-size: 12.5px; color: var(--muted); background: color-mix(in srgb, var(--ok) 9%, transparent); }
.pp-note b { color: var(--ok); font-size: 13.5px; }

/* Kontextmenü */
.ctx { position: fixed; z-index: 70; min-width: 210px; padding: 6px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.ctx button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 6px; color: inherit; }
.ctx button:hover { background: var(--hover); }
.ctx button.danger { color: var(--danger); }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }

/* Benutzer-Menü (Avatar) */
.user-menu { min-width: 300px; }
.profile-card { display: flex !important; align-items: center; gap: 12px; padding: 10px !important; }
.pc-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pc-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-text small { color: var(--muted); }
.pc-chev { color: var(--muted); font-size: 20px; }
.user-menu .mic { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 12px; border-radius: 50%; background: var(--hover); font-size: 15px; vertical-align: middle; }
.switch-row { display: flex; align-items: center; padding: 6px 10px; cursor: pointer; }
.switch-row .sr-label { flex: 1; }
.switch-row .mic { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 12px; border-radius: 50%; background: var(--hover); }

/* Seitenübersicht, Link-Markierungen */
.overview { max-width: 640px; margin: 14px auto 0; padding: 14px 18px; border-radius: 12px; text-align: center; background: color-mix(in srgb, var(--card) calc(var(--wa, 90) * 1%), transparent); box-shadow: var(--shadow); }
.ov-title { font-size: 20px; font-weight: 700; }
.ov-desc { color: var(--muted); margin-top: 4px; white-space: pre-wrap; }
.ov-meta { display: flex; gap: 14px; justify-content: center; margin-top: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.link-flag { flex: none; padding: 0 6px; font-size: 13px; }
.link-flag.is-broken { color: var(--danger); }
.link-flag.is-dup { color: #d97706; }
.links a.is-broken .lt-title { text-decoration: line-through; text-decoration-color: var(--danger); }

@media (max-width: 620px) {
  dialog.wide { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .pages-panel { top: 92px; left: 6px; width: calc(100vw - 12px); max-height: calc(100vh - 100px); }
  .stat-tiles { grid-template-columns: 1fr; }
  .set-select { max-width: 60%; }
}

.login-card .cred { display: flex; flex-direction: column; gap: 12px; }

/* ================= Google-Widgets und Verbindungen ================= */
.checklist { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; max-height: 190px; overflow: auto; }
.checklist .cl-title { font-size: 13px; color: var(--muted); }
.gc-agenda { display: flex; flex-direction: column; gap: 8px; }
.gc-day { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; color: var(--muted); text-transform: uppercase; margin: 6px 0 3px; }
.gc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.gc-ev { display: flex; gap: 10px; align-items: baseline; padding: 4px 6px; border-radius: 6px; border-left: 3px solid var(--accent); background: var(--hover); }
.gc-time { flex: none; min-width: 78px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gc-what { display: flex; flex-direction: column; min-width: 0; }
.gc-what a { text-decoration: none; overflow-wrap: anywhere; }
.gc-what a:hover { text-decoration: underline; }
.cal-grid button.sel:not(.today) { outline: 2px solid var(--accent); outline-offset: -2px; }
.ads-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.ads-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 10px; background: var(--hover); }
.ads-tile b { font-size: 22px; font-variant-numeric: tabular-nums; }
.g-steps { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.g-admin { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.g-admin summary { cursor: pointer; font-weight: 600; }
.google-setup { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.svc-list { display: flex; flex-direction: column; gap: 6px; }
.svc { display: flex; gap: 10px; }
.svc-pick { display: flex; flex-direction: column; gap: 6px; }
.svc-pick .check { flex-direction: row; align-items: center; gap: 8px; }
.svc-pick .check input { width: auto; }
.td-btn.primary-btn { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 600; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; height: 40px; padding: 0 12px; box-sizing: border-box;
  background: #ffffff; color: #3c4043; border: 1px solid #dadce0; border-radius: 4px;
  font: 500 14px/20px "Google Sans", Roboto, Arial, sans-serif; letter-spacing: .25px; text-decoration: none; cursor: pointer;
  transition: background-color .15s, box-shadow .15s, border-color .15s;
}
.google-btn .g-logo { flex: none; width: 18px; height: 18px; }
.google-btn:hover { background: #f8faff; border-color: #d2e3fc; box-shadow: 0 1px 2px rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15); }
.google-btn:active { background: #eef3fe; }
.google-btn:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }


.google-btn.back { max-width: 100%; }
.login-card p { line-height: 1.5; }

/* ================= Konto & Verwaltung (Seitenleiste + Inhalt) ================= */
dialog.wide.acct { width: min(900px, calc(100vw - 20px)); height: min(700px, calc(100vh - 24px)); }
.acct-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; flex: 1; min-height: 0; }
.acct-nav { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 12px; overflow: auto; }
.acct-nav button {
  display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 10px 12px;
  border-radius: 10px; color: var(--muted); font-weight: 600;
}
.acct-nav button:hover { background: var(--hover); color: var(--text); }
.acct-nav button.active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.nav-ic { width: 22px; text-align: center; font-size: 15px; }
.sec-nav-select { display: none; }
.acct-layout .td-body { padding-right: 6px; }
.avatar.xl { width: 68px; height: 68px; font-size: 26px; flex: none; }
.acct-hero { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--hover)); }
.ah-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ah-text > b { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--hover); color: var(--muted); }
.chip-pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.chip-pill.warn { background: color-mix(in srgb, #d97706 16%, transparent); color: #d97706; }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.acct-stat { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px; }
.acct-stat b { font-size: 24px; line-height: 1.1; }
.acct-stat small { color: var(--muted); }
.acct-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 11px 12px; border: 0; background: none;
  border-radius: 12px; color: var(--text);
}
.acct-row:hover { background: var(--hover); }
.ar-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--hover); font-size: 17px; }
.ar-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ar-text b { font-weight: 600; }
.ar-text small { color: var(--muted); font-size: 12.5px; }
.ar-chev { color: var(--muted); font-size: 22px; }
.acct-row.danger .ar-text b, .acct-row.danger .ar-ic { color: var(--danger); }
@media (max-width: 720px) {
  .acct-layout { grid-template-columns: 1fr; }
  .acct-nav { display: none; }
  .sec-nav-select { display: block; }
  .acct-hero { padding: 14px; }
}

.link-btn { border: 0; background: none; color: var(--accent); padding: 4px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
#hint.ok-text { color: var(--ok); }

/* Plex-Widget */
.plex-card { display: flex; gap: 14px; color: inherit; text-decoration: none; }
.plex-card .plex-poster { width: 110px; flex: none; }
.plex-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.plex-title { font-size: 17px; line-height: 1.25; }
.plex-genres { display: flex; flex-wrap: wrap; gap: 4px; }
.plex-sum { margin: 0; font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.plex-poster { display: block; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--hover); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.plex-poster.none { display: flex; align-items: center; justify-content: center; font-size: 32px; }
.plex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.plex-item { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; min-width: 0; }
.plex-item .plex-poster { width: 100%; }
.plex-t { font-size: 12.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.plex-item small { font-size: 11px; }
.plex-card:hover .plex-title, .plex-item:hover .plex-t { text-decoration: underline; }

/* Live-Anzeige und Plex-Bereiche */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: livePulse 2.4s infinite; flex: none; }
.live-dot.off { background: #f59e0b; animation: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); } 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.plex-sec + .plex-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.plex-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.plex-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.plex-dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.plex-dot.off { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.plex-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plex-tile { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--hover); }
.plex-tile b { font-size: 20px; font-variant-numeric: tabular-nums; }
.plex-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.plex-live { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: livePulse 2s infinite; }
.plex-ses { display: flex; gap: 10px; padding: 6px 0; }
.plex-ses + .plex-ses { border-top: 1px solid var(--line); }
.plex-ses.paused { opacity: .7; }
.plex-sposter { width: 40px; flex: none; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; background: var(--hover); }
.plex-sposter.none { display: flex; align-items: center; justify-content: center; }
.plex-sinfo { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.plex-suser { display: flex; align-items: center; gap: 6px; }
.plex-state { font-size: 11px; color: var(--accent); }
.plex-stitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plex-prog { display: flex; align-items: center; gap: 8px; }
.plex-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.plex-bar .fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.plex-time { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Server-Uptime */
.up-summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; margin-bottom: 10px; background: color-mix(in srgb, var(--ok) 16%, transparent); }
.up-summary.bad { background: color-mix(in srgb, var(--danger) 18%, transparent); }
.up-manage { margin-left: auto; border: 1px solid var(--line); background: none; border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.up-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.up-dot.up { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.up-dot.down { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); animation: livePulse 2s infinite; }
.up-dot.pending { background: #f59e0b; }
.up-group + .up-group { margin-top: 10px; }
.up-row { padding: 7px 0; }
.up-row + .up-row { border-top: 1px solid var(--line); }
.up-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.up-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pct { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); }
.up-row.st-down .up-pct { color: var(--danger); font-weight: 600; }
.ubars { display: flex; gap: 2px; height: 20px; }
.ub { flex: 1; min-width: 2px; border-radius: 2px; background: var(--ok); }
.ub.down { background: var(--danger); }
.ub.pending { background: #f59e0b; }
.ub.none { background: var(--hover); }
.up-row.st-paused { opacity: .55; }
.up-sub { display: block; margin-top: 4px; }

/* Uptime-Verwaltung */
.upm-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.upm-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; }
.upm-row .upm-t { flex: 1; min-width: 140px; display: flex; flex-direction: column; overflow: hidden; }
.upm-row .upm-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upm-form { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; }
.upm-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Profilbild und Backup */
.avatar.img, .pp-av.img { background-size: cover; background-position: center; color: transparent; }
.av-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.av-colors { display: flex; gap: 5px; margin-left: auto; }
.av-swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.av-swatch.sel { border-color: var(--text); }
.av-cropper { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 10px 0; }
.av-crop { border-radius: 50%; cursor: grab; touch-action: none; background: var(--hover); box-shadow: 0 0 0 3px var(--line); }
.av-crop:active { cursor: grabbing; }
.av-zoom { width: 240px; }

/* Dienste-Widgets (Synology, Pi-hole/AdGuard, Home Assistant, Downloads) */
.svc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.svc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-bottom: 10px; }
.svc-tile { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--hover); min-width: 0; }
.svc-tile b { font-size: 18px; font-variant-numeric: tabular-nums; }
.svc-tile.warn b { color: #f59e0b; }
.svc-tile.bad b { color: var(--danger); }
.svc-counts { display: block; margin-bottom: 6px; }
.svc-vol { margin: 6px 0; }
.svc-vrow { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; font-size: 13px; }
.pbar { display: block; height: 7px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.pbar .fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.pbar.warn .fill { background: #f59e0b; }
.pbar.bad .fill { background: var(--danger); }
.svc-disks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.svc-disk { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--hover); }
.svc-disk.warn { background: color-mix(in srgb, #f59e0b 25%, transparent); }
.svc-disk.bad { background: color-mix(in srgb, var(--danger) 25%, transparent); }
.svc-chart { display: flex; align-items: flex-end; gap: 2px; height: 44px; margin-bottom: 10px; }
.svc-bar { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--accent) 45%, transparent); min-width: 2px; overflow: hidden; }
.svc-barb { display: block; background: var(--danger); }
.svc-tops { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .svc-tops { grid-template-columns: 1fr; } }
.svc-top { min-width: 0; margin-top: 6px; }
.svc-toprow { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 1px 0; }
.svc-topname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ha-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px; border-radius: 12px; background: var(--hover); border: 0; text-align: left; color: inherit; min-width: 0; }
.ha-tile.act { cursor: pointer; }
.ha-tile.act:hover { filter: brightness(1.15); }
.ha-tile.on { background: color-mix(in srgb, #f59e0b 30%, transparent); }
.ha-tile.busy { opacity: .6; }
.ha-ic { font-size: 20px; }
.ha-name { font-size: 12.5px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ha-state { font-size: 14px; font-weight: 600; }
.auto-backup { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ab-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Wetterwarnungen, Regenradar, Router */
.wxw-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; margin-bottom: 8px; background: color-mix(in srgb, var(--ok) 16%, transparent); }
.wxw-head.bad { background: color-mix(in srgb, #f59e0b 20%, transparent); }
.wxw-ic { font-size: 22px; }
.wxw-head small { display: block; }
.wxw-alert { border-left: 4px solid #facc15; background: var(--hover); border-radius: 0 8px 8px 0; margin: 6px 0; overflow: hidden; }
.wxw-alert.sev-moderate { border-left-color: #f97316; }
.wxw-alert.sev-severe { border-left-color: #dc2626; }
.wxw-alert.sev-extreme { border-left-color: #a21caf; }
.wxw-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding: 7px 10px; cursor: pointer; }
.wxw-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 1px 7px; border-radius: 999px; background: #facc15; color: #1d2129; }
.sev-moderate .wxw-badge { background: #f97316; color: #fff; }
.sev-severe .wxw-badge { background: #dc2626; color: #fff; }
.sev-extreme .wxw-badge { background: #a21caf; color: #fff; }
.wxw-detail { display: none; padding: 0 10px 8px; font-size: 13px; }
.wxw-alert.open .wxw-detail { display: block; }
.wxw-headline { font-weight: 600; margin-bottom: 4px; }
.wxw-detail p { margin: 4px 0; line-height: 1.4; }
.wxw-src, .rd-src { display: block; margin-top: 6px; }
.rd-map { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; background: var(--hover); cursor: pointer; user-select: none; }
.rd-base, .rd-frame, .rd-labels { position: absolute; inset: 0; }
.rd-base img, .rd-frame img, .rd-labels img { position: absolute; width: 50%; height: 50%; display: block; pointer-events: none; }
.rd-frame { opacity: 0; transition: opacity .25s; }
.rd-frame.on { opacity: .85; }
.rd-pin { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); pointer-events: none; }
.rd-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rd-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: none; padding: 0; flex: none; }
.rd-dots { display: flex; gap: 3px; flex: 1; }
.rd-dots span { flex: 1; height: 5px; border-radius: 3px; background: var(--hover); }
.rd-dots span.on { background: var(--accent); }
.rd-time { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-down .svc-bar { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.rt-up .svc-bar { background: color-mix(in srgb, var(--ok) 70%, transparent); }
.rt-guest { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; margin-top: 6px; }
.rt-devs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Twitch & YouTube Live-Status */
.st-summary { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; margin-bottom: 6px; background: var(--hover); }
.st-summary.on { background: color-mix(in srgb, #ef4444 16%, transparent); }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.st-summary.on .st-dot { background: #ef4444; animation: livePulse 2s infinite; }
.st-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; color: inherit; text-decoration: none; border-radius: 8px; }
.st-row + .st-row { border-top: 1px solid var(--line); }
.st-row:hover { background: var(--hover); }
.st-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--hover); }
.st-av.ph { display: grid; place-items: center; font-weight: 700; }
.st-row.live .st-av { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #ef4444; }
.st-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-name { display: flex; align-items: center; gap: 6px; }
.st-plat { font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 999px; color: #fff; background: #9146ff; }
.st-plat.youtube { background: #e11d1d; }
.st-title, .st-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-title { font-size: 12.5px; }
.st-live { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff; background: #ef4444; padding: 2px 8px; border-radius: 5px; flex: none; }
.st-soon { font-size: 11.5px; color: #f59e0b; flex: none; text-align: right; }

/* Nachrichten */
.nw-item { display: flex; gap: 10px; padding: 8px 4px; color: inherit; text-decoration: none; border-radius: 8px; }
.nw-item + .nw-item { border-top: 1px solid var(--line); }
.nw-item:hover { background: var(--hover); }
.nw-item.compact { padding: 5px 4px; }
.nw-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; background: var(--hover); }
.nw-thumb.none { display: grid; place-items: center; font-size: 20px; }
.nw-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nw-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-meta { display: block; }
.nw-src { font-weight: 600; }
.nw-item.read .nw-title, .nw-hero.read b { font-weight: 400; opacity: .6; }
.nw-hero { display: block; position: relative; border-radius: 10px; overflow: hidden; margin-bottom: 6px; color: inherit; text-decoration: none; background: var(--hover); }
.nw-hero-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.nw-hero-text { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.nw-hero-text b { font-size: 16px; line-height: 1.3; }
.nw-sum { margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-ticker { display: flex; align-items: center; gap: 6px; min-height: 64px; }
.nw-tick { flex: 1; display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; min-width: 0; }
.nw-tick b { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-tick.in { animation: nwIn .45s ease; }
@keyframes nwIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.nw-nav { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: none; padding: 0; flex: none; }
.nw-count { display: block; text-align: right; }

/* Feiertage, Ferien, Geburtstage */
.hd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.hd-tile { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 10px; background: var(--hover); min-width: 0; }
.hd-tile.soon { background: color-mix(in srgb, #f59e0b 20%, transparent); }
.hd-tile.now { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.hd-big { display: flex; align-items: baseline; gap: 6px; }
.hd-big b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hd-name { font-weight: 600; line-height: 1.25; }
.hd-list, .bd-list { display: flex; flex-direction: column; }
.hd-row, .bd-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; }
.hd-row + .hd-row, .bd-row + .bd-row { border-top: 1px solid var(--line); }
.bd-row:hover { background: var(--hover); }
.bd-row.now { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.hd-ic { font-size: 18px; width: 24px; text-align: center; flex: none; }
.hd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hd-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-cd { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-cd.soon { color: #f59e0b; font-weight: 600; }
.hd-cd.now { color: var(--ok); font-weight: 700; }
.hd-src { display: block; margin-top: 8px; }
.bd-summary { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; margin-bottom: 6px; background: var(--hover); }
.bd-summary.now { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.bd-add { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bd-add .inline-input:first-child { flex: 1 1 110px; min-width: 0; }
.bd-add .bd-date { flex: 1 1 110px; min-width: 0; }
.bd-add .bd-kind { flex: 0 0 auto; width: auto; }

/* Einheitenrechner */
.un-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.un-cat { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; }
.un-cat.on { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.un-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: center; }
.un-grid .un-val { grid-column: 1; }
.un-grid .un-sel { grid-column: 2; min-width: 0; }
.un-swap { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.un-all { display: flex; flex-direction: column; margin-top: 4px; max-height: 220px; overflow: auto; }
.un-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.un-row:hover, .un-row.sel { background: var(--hover); }
.un-row b { font-variant-numeric: tabular-nums; }

/* Sonne & Mond */
.sm-arc { position: relative; height: 26px; margin: 4px 0 10px; border-radius: 13px; background: linear-gradient(90deg, #f59e0b55, #fde68a55 50%, #f59e0b55); border-bottom: 2px solid var(--line); }
.sm-arc.night { background: var(--hover); }
.sm-sun { position: absolute; top: 3px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 10px #f59e0b; }
.sm-arc.night .sm-sun { background: var(--muted); box-shadow: none; opacity: .6; }
.sm-twi { font-size: 12.5px; margin: 2px 0 8px; }
.sm-moon { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--hover); }
.sm-moon-ic { font-size: 34px; line-height: 1; }
.sm-block { display: block; }
.sm-next { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: 12.5px; }

/* Vorhersage */
.fc-svg { width: 100%; height: auto; display: block; }
.fc-grid { stroke: var(--line); stroke-width: 1; }
.fc-zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.fc-axis, .fc-day { fill: var(--muted); font-size: 9px; }
.fc-day.we { fill: var(--danger); }
.fc-band { fill: color-mix(in srgb, #f59e0b 16%, transparent); stroke: none; }
.fc-max { fill: none; stroke: #f97316; stroke-width: 2; }
.fc-min { fill: none; stroke: #38bdf8; stroke-width: 2; }
.fc-dot-max { fill: #f97316; }
.fc-rain { fill: #38bdf8; opacity: .55; }
.fc-legend { display: flex; gap: 12px; font-size: 11.5px; margin: 2px 0 8px; }
.fc-legend .lg::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.fc-legend .max::before { background: #f97316; } .fc-legend .min::before { background: #38bdf8; } .fc-legend .rain::before { background: #38bdf88c; }
.fc-list { display: flex; flex-direction: column; }
.fc-row { display: grid; grid-template-columns: 62px 22px 26px 1fr 26px auto; align-items: center; gap: 6px; padding: 3px 2px; font-size: 12.5px; }
.fc-row.we .fc-d { color: var(--danger); }
.fc-row + .fc-row { border-top: 1px solid var(--line); }
.fc-t { text-align: right; font-variant-numeric: tabular-nums; }
.fc-range { position: relative; height: 5px; border-radius: 3px; background: var(--hover); }
.fc-fill { position: absolute; top: 0; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #38bdf8, #f97316); }
.fc-p { min-width: 62px; text-align: right; font-size: 11.5px; }

/* Bild des Tages, Rezept */
.pd-img { display: block; position: relative; border-radius: 10px; overflow: hidden; background: var(--hover); margin-bottom: 8px; }
.pd-img img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.pd-img.video::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.pd-title { display: block; line-height: 1.3; }
.pd-credit { display: block; margin: 2px 0 6px; }
.pd-text { margin: 0 0 6px; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.pd-text.open { -webkit-line-clamp: unset; display: block; }
.pd-src { display: block; }
.rc-img { display: block; width: 100%; max-height: 210px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.rc-title { display: block; font-size: 16px; line-height: 1.3; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.rc-det { margin: 6px 0; }
.rc-det summary { cursor: pointer; font-weight: 600; }
.rc-det p { margin: 6px 0; font-size: 13px; line-height: 1.45; }
.rc-ing { list-style: none; margin: 6px 0 0; padding: 0; columns: 2; column-gap: 14px; font-size: 13px; }
.rc-ing li { display: flex; justify-content: space-between; gap: 6px; break-inside: avoid; padding: 1px 0; }
@media (max-width: 420px) { .rc-ing { columns: 1; } }
.rc-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }

/* Gratis-Spiele */
.fg-sec + .fg-sec { margin-top: 10px; }
.fg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 4px; }
.fg-card { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--hover); color: inherit; text-decoration: none; min-width: 0; }
.fg-card:hover { filter: brightness(1.1); }
.fg-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.fg-img.none { display: grid; place-items: center; font-size: 26px; background: var(--hover); }
.fg-info { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fg-info b { font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fg-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fg-free, .fg-later { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 5px; color: #fff; background: var(--ok); }
.fg-later { background: #f59e0b; }

/* Sendungsverfolgung */
.pc-list { display: flex; flex-direction: column; }
.pc-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 2px; }
.pc-row + .pc-row { border-top: 1px solid var(--line); }
.pc-row.done { opacity: .55; }
.pc-badge { flex: none; font-size: 10.5px; font-weight: 800; color: #fff; padding: 2px 7px; border-radius: 5px; margin-top: 2px; }
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-status { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.pc-state { font-size: 11.5px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, #f59e0b 30%, transparent); }
.pc-state.ok { background: color-mix(in srgb, var(--ok) 30%, transparent); }
.pc-state.bad { background: color-mix(in srgb, var(--danger) 30%, transparent); }
.pc-eta { color: var(--accent); }
.pc-open { flex: none; padding: 0 6px; color: inherit; font-size: 16px; text-decoration: none; opacity: .7; }
.pc-open:hover { opacity: 1; }

/* Kino */
.ci-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px 8px; }
.ci-card { position: relative; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }
.ci-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--hover); display: block; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.ci-poster.none { display: grid; place-items: center; font-size: 26px; }
.ci-poster.sm { width: 56px; flex: none; }
.ci-rate { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .72); color: #fff; }
.ci-rate.hi { color: #4ade80; } .ci-rate.lo { color: #f87171; }
.ci-card .ci-rate { position: absolute; left: 4px; top: 4px; }
.ci-t { font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ci-card:hover .ci-t, .ci-row:hover b { text-decoration: underline; }
.ci-list { display: flex; flex-direction: column; }
.ci-row { display: flex; gap: 10px; padding: 8px 2px; color: inherit; text-decoration: none; }
.ci-row + .ci-row { border-top: 1px solid var(--line); }
.ci-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ci-head { display: flex; align-items: center; gap: 8px; }
.ci-ov { margin: 0; font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ci-src { display: block; margin-top: 8px; font-size: 11px; }
.pc-src { display: block; margin-top: 6px; font-size: 11px; }
.bd-add .pc-zip { flex: 0 1 92px; min-width: 0; }

/* GitHub, Proxmox, Docker */
.gh-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 2px; color: inherit; text-decoration: none; border-radius: 8px; }
.gh-row + .gh-row { border-top: 1px solid var(--line); }
.gh-row:hover { background: var(--hover); }
.gh-row .up-dot { margin-top: 5px; }
.gh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gh-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-main a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; font-weight: 600; }
.gh-main a:hover { text-decoration: underline; }
.gh-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.gh-stars { font-size: 11px; }
.rowname { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dk-actions { margin-top: 4px; }
