:root {
  --bg: #000000;
  --ink: #f5f5f7;
  --ink-soft: #8a8a92;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(8, 8, 9, 0.94);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.9);
  --mint: #b5ead7;
  --lavender: #d7c9ff;
  --accent: linear-gradient(135deg, #b5ead7 0%, #d7c9ff 100%);
  --danger: #ffa3ab;
  --ok: #b5ead7;
  --radius: 24px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
.hidden { display: none !important; }
.muted { color: var(--ink-soft); margin: 0; font-size: .9rem; }

/* Sehr dunkler Hintergrund, sehr dezentes Pastelllicht */
/* Cok koyu zemin, cok hafif pastel isik */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #000; }
.blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .07; animation: float 34s ease-in-out infinite alternate; }
.b1 { width: 55vmax; height: 55vmax; background: var(--mint); top: -30%; left: -18%; }
.b2 { width: 45vmax; height: 45vmax; background: var(--lavender); bottom: -25%; right: -18%; animation-duration: 40s; }
@keyframes float {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(4vw,-3vh,0) scale(1.08); }
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
}

.screen-center { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); border-radius: 32px; padding: 34px 26px; display: grid; gap: 12px; text-align: center; }
.login-card h1 { margin: 0; font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.login-mark {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 6px; display: grid; place-items: center;
  font-size: 1.8rem; font-weight: 700; color: #000; background: var(--accent);
}
.error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: .9rem; }

input, textarea, select, button { font: inherit; color: inherit; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: 16px;
  padding: 13px 15px;
  font-size: 16px;
  outline: none;
  transition: box-shadow .2s, background .2s, border-color .2s;
}
input::placeholder, textarea::placeholder { color: #55555d; }
input:focus, textarea:focus, select:focus { background: rgba(255,255,255,.06); border-color: rgba(181,234,215,.45); box-shadow: 0 0 0 4px rgba(181,234,215,.10); }
select option { background: #0c0c0e; }

label { display: flex; flex-direction: column; gap: 6px; font-size: .78rem; color: var(--ink-soft); font-weight: 500; }

button { cursor: pointer; border: none; }
.btn-primary {
  background: var(--accent); color: #000; font-weight: 650; border-radius: 16px; padding: 14px 18px; font-size: 1rem;
  transition: transform .15s, opacity .15s;
}
.btn-primary:active { transform: scale(.97); opacity: .9; }
.btn-ghost { background: transparent; color: var(--ink-soft); padding: 12px 16px; border-radius: 16px; font-weight: 500; }
.btn-danger { background: rgba(255,163,171,.10); color: var(--danger); border-radius: 14px; padding: 10px 14px; font-weight: 600; }
.pill {
  border-radius: 999px; padding: 8px 15px; font-size: .88rem; font-weight: 600; color: var(--ink);
  transition: transform .15s;
}
.pill:active { transform: scale(.96); }
.pill.small { padding: 6px 12px; font-size: .8rem; }

.largebar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 22px) 20px 10px;
}
.largebar h1 { margin: 0; font-size: 2rem; font-weight: 750; letter-spacing: -0.03em; }
.eyebrow { margin: 0 0 2px; color: var(--ink-soft); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }

main { padding: 8px 16px 140px; max-width: 1100px; margin: 0 auto; }

.toolbar { display: grid; gap: 10px; margin-bottom: 16px; }
.search { border-radius: 18px; }
.select { border-radius: 16px; padding: 11px 14px; }

.grid { display: grid; gap: 14px; grid-template-columns: 1fr; perspective: 1200px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.contact-card {
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer;
  position: relative; overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s;
  animation: rise .55s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.contact-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(181,234,215,.10), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
@media (hover: hover) { .contact-card:hover::after { opacity: 1; } .contact-card:hover { border-color: rgba(181,234,215,.25); } }
.contact-card:active { transform: scale(.98) !important; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.contact-head { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 52px; height: 52px; border-radius: 17px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; color: #000;
  background: var(--accent);
  transform: translateZ(22px);
}
.avatar.xl { width: 80px; height: 80px; border-radius: 26px; font-size: 1.7rem; }
.contact-name { font-weight: 650; font-size: 1.04rem; }
.meta { color: var(--ink-soft); font-size: .84rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: rgba(215,201,255,.08); border: 1px solid rgba(215,201,255,.18); border-radius: 999px; padding: 3px 10px; font-size: .74rem; color: var(--lavender); }
.notes { white-space: pre-wrap; font-size: .92rem; color: #c8c8d0; margin: 0; }

.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 14px; font-size: .84rem; font-weight: 500;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.chip img, .social-links img { width: 17px; height: 17px; filter: invert(1); opacity: .85; }

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  width: min(420px, calc(100% - 28px));
  height: 68px; border-radius: 28px;
  display: grid; grid-template-columns: 1fr 72px 1fr; align-items: center; padding: 0 10px;
  z-index: 10; background: rgba(0,0,0,.75);
}
.tab {
  background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: .7rem; font-weight: 600; color: var(--ink-soft); padding: 6px 0;
}
.tab.active { color: var(--mint); }
.tab .ico { font-size: 1.2rem; line-height: 1; }
.fab {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto;
  background: var(--accent); color: #000; font-size: 2rem; line-height: 1; font-weight: 300;
  box-shadow: 0 10px 30px -10px rgba(181,234,215,.35);
  transform: translateY(-12px);
  transition: transform .15s;
}
.fab:active { transform: translateY(-12px) scale(.94); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.stat { border-radius: 22px; padding: 16px 10px; text-align: center; display: grid; gap: 4px; }
.stat b { font-size: 1.6rem; font-weight: 750; color: var(--mint); }
.stat span { font-size: .76rem; color: var(--ink-soft); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 4px 10px; }
.section-head h2 { margin: 0; font-size: 1.05rem; }
.list { display: grid; gap: 10px; }
.row-card { border-radius: 20px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-card .info-col { min-width: 0; flex: 1; }
.row-card .ip { font-weight: 650; word-break: break-all; }
.badge { display: inline-block; font-size: .7rem; padding: 3px 9px; border-radius: 999px; font-weight: 600; margin-left: 6px; vertical-align: middle; }
.badge.bad { background: rgba(255,163,171,.12); color: var(--danger); }
.badge.ok { background: rgba(181,234,215,.12); color: var(--ok); }
.badge.block { background: rgba(215,201,255,.14); color: var(--lavender); }
.fp-line { font-size: .8rem; color: var(--ink-soft); margin-top: 4px; line-height: 1.6; }
.fp-line b { color: var(--ink); font-weight: 600; }

dialog.sheet {
  border: none; padding: 0; background: transparent; color: var(--ink);
  width: 100%; max-width: 620px; margin: auto auto 0;
  max-height: 92dvh; overflow: visible;
  opacity: 0; transform: translateY(40px) scale(.98);
  transition: opacity .3s ease, transform .45s cubic-bezier(.2,.8,.2,1), overlay .45s allow-discrete, display .45s allow-discrete;
}
dialog.sheet[open] { opacity: 1; transform: none; }
@starting-style { dialog.sheet[open] { opacity: 0; transform: translateY(40px) scale(.98); } }
dialog.sheet::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (min-width: 700px) { dialog.sheet { margin: auto; } }

.sheet-body {
  background: var(--glass-strong);
  backdrop-filter: blur(30px) saturate(130%);
  -webkit-backdrop-filter: blur(30px) saturate(130%);
  border: 1px solid var(--line);
  border-radius: 32px 32px 0 0;
  padding: 14px 20px calc(env(safe-area-inset-bottom) + 22px);
  max-height: 92dvh; overflow-y: auto;
  box-shadow: 0 -10px 50px -10px rgba(0,0,0,.9);
}
@media (min-width: 700px) { .sheet-body { border-radius: 32px; max-height: 88vh; } }

.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); margin: 4px auto 14px; }
.form h2 { margin: 0 0 12px; font-size: 1.25rem; }
.form fieldset {
  border: 1px solid var(--line); border-radius: 22px; padding: 12px 14px;
  display: grid; gap: 10px; margin: 0 0 12px; background: rgba(255,255,255,.012);
}
.form legend { font-size: .8rem; color: var(--ink-soft); font-weight: 600; padding: 0 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.social-row, .extra-row { display: grid; gap: 8px; background: rgba(255,255,255,.02); padding: 10px; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 8px; }
.row-x { display: flex; gap: 8px; align-items: center; }
.row-x select { flex: 1; }
.extra-row .pair { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.pick-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pick-tools .meta { margin-right: auto; }
.pick-list { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.pick {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  flex-direction: unset; padding: 11px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--ink); font-size: .95rem;
}
.pick input { width: 18px; height: 18px; accent-color: #b5ead7; padding: 0; margin: 0; }
.pick small { color: var(--ink-soft); }
.pick:has(input:checked) { border-color: rgba(181,234,215,.4); background: rgba(181,234,215,.06); }

.view-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.view-head h2 { margin: 0; font-size: 1.35rem; }
.info { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0 0 14px; font-size: .9rem; background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px; }
.info dt { color: var(--ink-soft); }
.info dd { margin: 0; word-break: break-word; }
.info a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.section { margin-top: 16px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.section h3 { margin: 0; font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
.rel-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.rel-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.rel-role { color: var(--lavender); font-weight: 650; }
.rel-form { display: grid; gap: 8px; background: rgba(255,255,255,.02); padding: 12px; border-radius: 22px; border: 1px solid var(--line); }
.view-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 18px; }
.empty { text-align: center; color: var(--ink-soft); padding: 30px 10px; }

@media (max-width: 480px) {
  .row2, .row3 { grid-template-columns: 1fr; }
  .info { grid-template-columns: 1fr; gap: 4px; }
  .info dt { margin-top: 6px; }
  .largebar h1 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Zusammenfassungsleiste */
/* Ozet cubugu */
.head-actions { display: flex; gap: 8px; align-items: center; }
.stats-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 12px; }
.stats-bar .glass { border-radius: 20px; padding: 12px 10px; display: grid; gap: 3px; text-align: center; min-width: 0; }
.stats-bar b { font-size: 1.1rem; color: var(--mint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-bar span { font-size: .72rem; color: var(--ink-soft); }
.stats-bar .stats-latest { grid-column: 1 / -1; text-align: left; font-size: .85rem; color: var(--ink-soft); }

/* Beziehungskarte */
/* Iliski haritasi */
.graph-box { width: 100%; aspect-ratio: 1 / 1; max-height: 70vh; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.02); overflow: hidden; }
.graph-box svg { width: 100%; height: 100%; display: block; }
.graph-box .edge { stroke: var(--line-strong); stroke-width: 1.2; }
.graph-box .edge-label { fill: var(--ink-soft); font-size: 10px; }
.graph-box .node { cursor: pointer; }
.graph-box .node circle { fill: var(--glass-strong); stroke: var(--mint); stroke-width: 1.5; }
.graph-box .node text { fill: var(--ink); font-size: 11px; text-anchor: middle; pointer-events: none; }
.graph-box .node:hover circle { stroke-width: 2.5; }

/* Helles Design */
/* Acik tema */
:root[data-theme="light"] {
  --bg: #f4f4f7; --ink: #111114; --ink-soft: #5d5d66;
  --glass: rgba(255, 255, 255, 0.6); --glass-strong: rgba(255, 255, 255, 0.97);
  --line: rgba(0, 0, 0, 0.08); --line-strong: rgba(0, 0, 0, 0.18);
  --shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.25);
  --mint: #2a8a6a; --lavender: #6b4fc4; --danger: #c2334a; --ok: #2a8a6a;
  color-scheme: light;
}
:root[data-theme="light"] .bg { background: var(--bg); }
:root[data-theme="light"] .blob { opacity: .12; }

/* Menüs werden am unteren Bildschirmrand geöffnet (Bottom Sheet) */
/* Menuler ekranin alt kismindan acilir (bottom sheet) */
dialog.sheet { margin: auto auto 0 auto; width: 100%; max-width: 640px; max-height: 92dvh; border-radius: 28px 28px 0 0; }
dialog.sheet .sheet-body { border-radius: 28px 28px 0 0; max-height: 92dvh; }
@media (min-width: 700px) { dialog.sheet .sheet-body { border-radius: 28px 28px 0 0; max-height: 92dvh; } }

/* Karte: Beschriftungen werden erst beim Vergrößern sichtbar; Unterstützung für Ziehen und Mausrad */
/* Harita: etiketler yalnizca yakinlasinca gorunur, surukleme ve tekerlek destegi */
.graph-box svg { touch-action: none; cursor: grab; }
.graph-box svg .edge-label, .graph-box svg .node text { display: none; }
.graph-box svg.show-labels .edge-label, .graph-box svg.show-labels .node text { display: block; }
.graph-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }

/* IH mobil: Vollbildkarte, untere Leiste und Hamburger-Menü */
/* IH mobil: tam ekran harita, alt bar ve hamburger menu */
dialog.graph-sheet { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
dialog.graph-sheet .sheet-body { height: 100dvh; max-height: 100dvh; border-radius: 0; display: flex; flex-direction: column; gap: 12px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
@media (min-width: 700px) { dialog.graph-sheet .sheet-body { border-radius: 0; max-height: 100dvh; } }
.graph-top { display: flex; justify-content: space-between; align-items: center; }
.graph-top h2 { margin: 0; font-size: 1.05rem; }
.graph-box { width: min(100%, calc(100dvh - 210px)); aspect-ratio: 1 / 1; max-height: none; margin: 0 auto; border-radius: 22px; overflow: hidden; }
.graph-box svg { width: 100%; height: 100%; display: block; touch-action: none; overscroll-behavior: contain; }
.graph-box.locked svg { cursor: default; }
.graph-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; }
.graph-menu-list { display: grid; gap: 8px; }
.graph-menu-list button { width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; color: var(--ink); font-size: 1rem; }

/* Lesbarkeit des Textes: Durch die dunkle Kontur ist er auf den Linien gut erkennbar */
/* Yazi okunurlugu: koyu kontur ile cizgilerin ustunde net gorunur */
.graph-box svg text { paint-order: stroke fill; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.graph-box .edge-label { font-size: 10px; }

/* Untere Leiste: Nur das Hamburger-Menü und die Schaltfläche „Hinzufügen“ sind sichtbar */
/* Alt bar: sadece hamburger ve ekle dugmesi gorunur */
.tabbar { display: flex; justify-content: center; align-items: center; gap: 16px; }
.menu-open { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; padding: 0; font-size: 1.3rem; color: var(--ink); }


/* ===== Design: vollständig dunkel, pastellfarbene Cremeweiß-Akzente, auf Mobilgeräten schlicht ===== */
/* ===== Tema: tam karanlik, pastel kirik beyaz vurgular, mobilde sade ===== */
:root {
  --bg: #000000;
  --ink: #f2efe8;
  --ink-soft: #9c978c;
  --glass: #050505;
  --glass-strong: #000000;
  --line: rgba(242, 239, 232, 0.08);
  --line-strong: rgba(242, 239, 232, 0.18);
  --shadow: none;
  --mint: #e8e2d4;
  --lavender: #e8e2d4;
  --accent: #ece6d8;
  --danger: #e8b4b0;
  --ok: #d9e4d2;
  --radius: 18px;
  color-scheme: dark;
}
body { background: #000; }
.bg, .blob { display: none !important; }
.glass {
  background: #050505;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-color: var(--line);
}
.contact-card { background: #060606; border: 1px solid var(--line); }
.contact-card::after { display: none; }
@media (hover: hover) { .contact-card:hover { border-color: var(--line-strong); } }
input, textarea, select { background: #0a0a0a; border-color: var(--line); }
input:focus, textarea:focus, select:focus {
  background: #0e0e0e; border-color: rgba(236, 230, 216, 0.45); box-shadow: 0 0 0 3px rgba(236, 230, 216, 0.08);
}
input::placeholder, textarea::placeholder { color: #5a574f; }
select option { background: #000; }
.btn-primary { background: #ece6d8; color: #000; }
.btn-danger { background: rgba(232, 180, 176, 0.08); color: var(--danger); }
.tag { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.notes { color: #bdb8ac; }
.chip { background: #0a0a0a; }

/* Mobil: weniger überladen */
/* Mobil: daha az kalabalik */
@media (max-width: 640px) {
  main { padding: 6px 12px 130px; }
  .largebar h1 { font-size: 1.6rem; }
  .contact-card { padding: 12px; gap: 8px; animation: none; }
  .contact-card .tags, .contact-card .notes { display: none; }
  .avatar { width: 42px; height: 42px; font-size: 1rem; }
  .contact-name { font-size: .98rem; }
  .toolbar { gap: 8px; }
  .toolbar select, .toolbar .select { padding: 9px 12px; font-size: 14px; }
  .chip { padding: 6px 10px; font-size: .8rem; }
  .contact-card:active { transform: scale(.99) !important; }
}

/* Einstellungen: aufklappbare Gruppen */
/* Ayarlar: acilir gruplar */
.set-stack { display: flex; flex-direction: column; gap: 10px; }
.set-group { border-radius: 14px; background: rgba(127, 127, 127, 0.10); overflow: hidden; }
.set-group > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.set-group > summary::-webkit-details-marker { display: none; }
.set-group > summary::after { content: '+'; opacity: 0.6; font-size: 18px; }
.set-group[open] > summary::after { content: '\2212'; }
.set-group > .graph-menu-list { padding: 0 12px 12px; }

/* ===== Schaltflächensystem: einheitlicher, klarer und konsistenter Stil (alle Designs) ===== */
/* ===== Buton sistemi: tek stil, net ve tutarli (tum temalar) ===== */
:root {
  --btn-h: 48px;
  --btn-radius: 16px;
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-bg-hover: rgba(255, 255, 255, 0.14);
  --btn-line: rgba(255, 255, 255, 0.18);
  --btn-ink: var(--ink);
  --btn-primary-bg: var(--accent);
  --btn-primary-ink: #0a0a0b;
  --btn-danger-bg: rgba(255, 163, 171, 0.12);
  --btn-danger-line: rgba(255, 163, 171, 0.40);
}
:root[data-theme="light"] {
  --btn-bg: rgba(0, 0, 0, 0.05);
  --btn-bg-hover: rgba(0, 0, 0, 0.10);
  --btn-line: rgba(0, 0, 0, 0.18);
  --btn-ink: #111114;
  --btn-danger-bg: rgba(194, 51, 74, 0.08);
  --btn-danger-line: rgba(194, 51, 74, 0.35);
}

button { font-family: inherit; }
button:focus-visible { outline: 2px solid var(--btn-ink); outline-offset: 2px; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

/* Sekundäre Schaltflächen (glass-Klasse und Menüliste) */
/* Ikincil butonlar (glass sinifi ve menu listeleri) */
button.glass,
.graph-menu-list button {
  min-height: var(--btn-h);
  padding: 12px 18px;
  border-radius: var(--btn-radius);
  background: var(--btn-bg);
  border: 1px solid var(--btn-line);
  color: var(--btn-ink);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.15s, transform 0.12s, border-color 0.15s;
}
button.glass:hover,
.graph-menu-list button:hover { background: var(--btn-bg-hover); }
button.glass:active,
.graph-menu-list button:active { transform: scale(0.98); }
.graph-menu-list button { width: 100%; text-align: left; }

/* Hauptaktion */
/* Ana eylem */
.btn-primary {
  min-height: var(--btn-h);
  padding: 12px 18px;
  border-radius: var(--btn-radius);
  border: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 24px -12px rgba(181, 234, 215, 0.55);
  transition: transform 0.12s, opacity 0.15s;
}
.btn-primary:hover { opacity: 0.94; }
.btn-primary:active { transform: scale(0.97); }

/* Gefährliche Aktion (Abmelden, Löschen) */
/* Tehlikeli eylem (cikis, silme) */
.btn-danger {
  min-height: var(--btn-h);
  padding: 12px 18px;
  border-radius: var(--btn-radius);
  background: var(--btn-danger-bg);
  border: 1px solid var(--btn-danger-line);
  color: var(--danger);
  font-size: 0.98rem;
  font-weight: 700;
}
.btn-danger:hover { filter: brightness(1.08); }

/* Ghost: sekundärer Text-Button */
/* Hayalet: ikincil metin butonu */
.btn-ghost {
  min-height: var(--btn-h);
  padding: 12px 16px;
  border-radius: var(--btn-radius);
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Kleine pillenförmige Schaltflächen */
/* Kucuk kapsul butonlar */
.pill {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.pill.small { min-height: 32px; padding: 6px 12px; font-size: 0.82rem; }

/* Aufklappbare Gruppen: einheitlicher Überschriftenstil */
/* Acilir gruplar: ayni baslik stili */
.set-group { border: 1px solid var(--btn-line); background: var(--btn-bg); }
.set-group > summary { min-height: var(--btn-h); font-size: 0.98rem; color: var(--btn-ink); }
.set-group > .graph-menu-list { gap: 8px; }
