:root {
  --bg: #0c0e12;
  --bg-2: #12151b;
  --panel: #161a21;
  --panel-2: #1c212a;
  --border: #262b34;
  --border-2: #333a45;
  --text: #e7eaee;
  --muted: #949ba6;
  --faint: #6b7280;
  --accent: #0091ff;
  --accent-2: #33a8ff;
  --accent-soft: rgba(0, 145, 255, 0.14);
  --good: #46d19e;
  --danger: #ff5c5c;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar ---------- */
.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(180deg, #14171d, #101318);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0;
}
.brand .mark img { width: 38px; height: 38px; display: block; }
.brand h1 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.brand p { font-size: 11px; color: var(--muted); margin-top: -2px; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.select-wrap { position: relative; }
select.preset {
  appearance: none;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 9px 34px 9px 14px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: border-color .15s;
}
select.preset:hover { border-color: var(--faint); }
.select-wrap::after {
  content: ''; position: absolute; right: 13px; top: 50%;
  width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: var(--radius);
  padding: 10px 18px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: transform .08s, filter .15s, background .15s;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--faint); }
/* Ko-fi-Slot (offizielles Widget) */
.kofi-slot { display: inline-flex; align-items: center; }
.kofi-slot a { display: inline-flex !important; align-items: center; }
.kofi-slot img { vertical-align: middle; }
.kofi-slot-lg { justify-content: center; margin: 4px 0 18px; }

/* Download-Popup */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 8, 12, 0.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
  position: relative; width: 100%; max-width: 380px; text-align: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 26px 22px; box-shadow: var(--shadow);
}
.modal-cup { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.modal h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.modal p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.modal .btn-ghost { width: 100%; justify-content: center; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border: none; background: var(--panel-2); color: var(--muted); border-radius: 8px;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--text); }
@media (max-width: 920px) { #kofiTop { display: none; } }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }

/* Modus-Umschalter */
.mode-toggle { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 3px; gap: 2px; }
.mode-toggle button {
  border: none; background: transparent; color: var(--muted);
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  padding: 6px 14px; border-radius: 7px; transition: background .15s, color .15s;
}
.mode-toggle button:hover { color: var(--text); }
.mode-toggle button.active { background: var(--accent); color: #fff; }

/* Theme-Umschalter */
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: var(--radius); color: var(--text); cursor: pointer; transition: border-color .15s; }
.icon-btn:hover { border-color: var(--faint); }
.icon-btn svg { width: 18px; height: 18px; }
.ico-sun { display: none; }

/* Helles Theme */
body.theme-light {
  --bg: #eef1f5; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #f2f4f7;
  --border: #e4e8ee; --border-2: #d4dae1; --text: #1a1e24; --muted: #5b636e; --faint: #98a0ac;
  --shadow: 0 8px 30px rgba(20, 30, 50, 0.12);
}
body.theme-light .topbar { background: linear-gradient(180deg, #ffffff, #f3f6f9); }
body.theme-light .stage { background: radial-gradient(circle at 50% 40%, #ffffff, #e6ebf1 75%); }
body.theme-light .sidebar::-webkit-scrollbar-thumb { background: #d4dae1; border-color: var(--bg-2); }
body.theme-light .badge, body.theme-light .status { background: rgba(255, 255, 255, 0.9); border-color: var(--border); }
body.theme-light .hintbar { background: rgba(255, 255, 255, 0.75); }
body.theme-light .ico-sun { display: block; }
body.theme-light .ico-moon { display: none; }

/* Vorlagen-Sektion */
.sub-label { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.divider { height: 1px; background: var(--border); margin: 16px 0 14px; }
.save-row { display: flex; gap: 8px; }
.save-row input { flex: 1; }
.preset-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.preset-row { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px 6px 12px; }
.pr-name { flex: 1; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-btn { border: 1px solid var(--border-2); background: transparent; color: var(--muted); font-family: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.pr-btn:hover { color: var(--text); border-color: var(--faint); }
.pr-del { padding: 4px 8px; font-size: 15px; line-height: 1; }
.pr-del:hover { color: var(--danger); border-color: var(--danger); }

/* ---------- Layout ---------- */
.layout { display: flex; height: calc(100vh - 60px); height: calc(100dvh - 60px); }

.sidebar {
  width: 344px; flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px;
}
.sidebar::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-thumb { background: #242932; border-radius: 8px; border: 3px solid var(--bg-2); }

.stage { flex: 1; position: relative; background: radial-gradient(circle at 50% 40%, #171b22, #0c0e12 75%); }
#viewport { width: 100%; height: 100%; display: block; }

/* ---------- Sections ---------- */
.section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.section-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; cursor: pointer; user-select: none;
}
.section-head:hover { background: var(--panel-2); }
.section-head .ico { width: 18px; height: 18px; color: var(--accent); display: grid; place-items: center; }
.section-head .ico svg { width: 18px; height: 18px; }
.section-head h2 { font-size: 13px; font-weight: 600; flex: 1; letter-spacing: -0.01em; }
.section-head .chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.section.collapsed .chev { transform: rotate(-45deg); }
.section-body { padding: 4px 14px 14px; }
.section.collapsed .section-body { display: none; }

/* ---------- Controls ---------- */
.control { margin: 12px 0; }
.control:first-child { margin-top: 6px; }
.control .row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.control label { font-size: 12.5px; color: var(--muted); }
.control .val { font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.control .val .u { color: var(--faint); font-weight: 400; margin-left: 1px; }
.control .hint { font-size: 11px; color: var(--faint); margin-top: 5px; line-height: 1.4; }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 4px;
  background: var(--border-2); outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--accent); transition: transform .1s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-2); cursor: pointer;
}

select.ctl, input.ctl[type=text] {
  width: 100%; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; font-family: inherit;
}
select.ctl { appearance: none; cursor: pointer; }
input.ctl[type=text]:focus, select.ctl:focus { outline: none; border-color: var(--accent); }

.color-row { display: flex; gap: 8px; align-items: center; }
.color-row .ctl-color { flex: 1; }
.ctl-color { height: 36px; padding: 3px; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 8px; cursor: pointer; }
.ctl-color::-webkit-color-swatch-wrapper { padding: 0; }
.ctl-color::-webkit-color-swatch { border: none; border-radius: 5px; }
.ctl-color::-moz-color-swatch { border: none; border-radius: 5px; }
.hex-input { width: 96px; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 8px; color: var(--text); font-family: var(--font-mono, monospace); font-size: 12px; text-transform: uppercase; padding: 8px 10px; }
.hex-input:focus { outline: none; border-color: var(--accent); }

/* Zahleneingabe neben dem Regler */
.valedit { display: inline-flex; align-items: baseline; gap: 1px; }
.num-input {
  width: 54px; text-align: right; background: transparent; border: 1px solid transparent;
  color: var(--text); font-size: 12.5px; font-weight: 600; font-family: inherit;
  font-variant-numeric: tabular-nums; padding: 2px 4px; border-radius: 5px;
}
.num-input:hover { background: var(--panel-2); }
.num-input:focus { outline: none; background: var(--panel-2); border-color: var(--accent); }
.num-input::-webkit-outer-spin-button, .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-input { -moz-appearance: textfield; }

/* Mittelmarkierung am Regler */
.range-wrap { position: relative; display: flex; align-items: center; }
.range-wrap input[type=range] { position: relative; z-index: 1; }
.range-center { position: absolute; left: 50%; top: 50%; width: 2px; height: 11px; background: var(--faint); transform: translate(-50%, -50%); border-radius: 1px; pointer-events: none; z-index: 0; }

.filebtn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px; border: 1px dashed var(--border-2); border-radius: 8px;
  background: var(--panel-2); color: var(--muted); font-size: 12.5px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.filebtn:hover { border-color: var(--accent); color: var(--text); }
.filebtn svg { width: 16px; height: 16px; }
.filename { font-size: 11px; color: var(--accent); margin-top: 6px; word-break: break-all; }

/* ---------- Overlays ---------- */
.badge {
  position: absolute; left: 16px; top: 16px;
  display: flex; gap: 16px; align-items: center;
  background: rgba(18, 21, 27, 0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.badge b { color: var(--text); font-weight: 600; }
.badge .sep { width: 1px; height: 22px; background: var(--border-2); }

.status {
  position: absolute; right: 16px; top: 16px;
  display: none; align-items: center; gap: 8px;
  background: rgba(18, 21, 27, 0.9); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 14px; font-size: 12px; color: var(--muted);
}
.status.show { display: flex; }
.spinner {
  width: 13px; height: 13px; border: 2px solid var(--border-2);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.warn {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: none; align-items: center; gap: 8px;
  background: rgba(255, 92, 92, 0.14); border: 1px solid rgba(255, 92, 92, 0.4);
  color: #ffb3b3; border-radius: 10px; padding: 9px 16px; font-size: 12.5px;
  max-width: 80%;
}
.warn.show { display: flex; }

.hintbar {
  position: absolute; right: 16px; bottom: 16px;
  font-size: 11px; color: var(--faint);
  background: rgba(18,21,27,0.6); padding: 6px 10px; border-radius: 8px;
}

.fatal {
  position: absolute; inset: 0; display: none; place-items: center; padding: 40px;
  background: var(--bg); text-align: center;
}
.fatal.show { display: grid; }
.fatal div { max-width: 480px; }
.fatal h3 { color: var(--danger); margin-bottom: 10px; }
.fatal code { display: block; margin-top: 12px; background: var(--panel); padding: 12px; border-radius: 8px; font-size: 12px; color: var(--muted); text-align: left; white-space: pre-wrap; }

@media (max-width: 820px) {
  .layout { flex-direction: column; height: calc(100vh - 60px); height: calc(100dvh - 60px); }
  .sidebar { width: 100%; height: 46%; border-right: none; border-bottom: 1px solid var(--border); }
  .stage { height: 54%; }
  .brand p { display: none; }
  /* Top-Leiste kompakter, damit nichts überläuft */
  .topbar { padding: 0 12px; }
  .topbar-actions { gap: 8px; }
  #kofiTop { display: none; }
}
/* Schmale Handys: Platz sparen – WC-Logo bleibt (klickbar = Startseite) */
@media (max-width: 600px) {
  .brand h1 { display: none; }
  .mw-link { display: none !important; }   /* MakerWorld ist auf Startseite/Anleitung verlinkt */
}
/* Sehr schmale Handys: Download-Button als Icon, Modus-Umschalter kompakt */
@media (max-width: 480px) {
  .topbar-actions { gap: 6px; }
  .mode-toggle button { padding: 6px 9px; }
  #download { font-size: 0; padding: 10px 12px; }
  #download svg { width: 18px; height: 18px; }
}

/* ===== MakerWorld-Link (Top-Leiste) ===== */
.mw-link { display: inline-flex; align-items: center; height: 38px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--panel-2); transition: border-color .15s; }
.mw-link:hover { border-color: var(--faint); }
.mw-link img { height: 20px; width: auto; display: block; }
.mw-link .mw-fallback-text { display: none; font-size: 13px; font-weight: 700; color: #ff6a13; white-space: nowrap; letter-spacing: .01em; }
.mw-link.mw-fallback img { display: none; }
.mw-link.mw-fallback .mw-fallback-text { display: inline; }
@media (max-width: 720px) { .mw-link .mw-fallback-text { font-size: 0; } }

/* ===== Sterne-Bewertung ===== */
.stars { display: inline-flex; gap: 3px; align-items: center; }
.stars .star { width: 18px; height: 18px; cursor: pointer; color: var(--border-2); transition: color .1s, transform .1s; }
.stars .star svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.stars .star.on { color: #f5b301; }
.stars .star:hover { transform: scale(1.12); }
.stars.readonly .star { cursor: default; }
.stars.readonly .star:hover { transform: none; }
.stars-lg { gap: 6px; justify-content: center; margin: 4px 0 16px; }
.stars-lg .star { width: 30px; height: 30px; }

/* ===== Vorlagen-Bewertung ===== */
.tpl-rating { margin-top: 10px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; }
.tpl-rating .tr-head { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 7px; }
.tpl-rating .tr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tpl-rating .tr-avg { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tpl-rating .tr-avg b { color: var(--text); }
.tpl-rating .tr-thanks { color: var(--good); }

/* ===== Feedback-Dialog ===== */
.fb-text, .fb-email { width: 100%; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 8px; color: var(--text); font-family: inherit; font-size: 13px; padding: 10px 12px; }
.fb-text { resize: vertical; min-height: 76px; margin-bottom: 10px; }
.fb-email { margin-bottom: 14px; }
.fb-text:focus, .fb-email:focus { outline: none; border-color: var(--accent); }
.fb-status { font-size: 12.5px; margin-top: 10px; min-height: 16px; }
.fb-status.ok { color: var(--good); }
.fb-status.err { color: #ff6b6b; }

/* ===== Download-Bestätigung (Toast) ===== */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  z-index: 120; pointer-events: none;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-left: 3px solid var(--good);
  border-radius: 10px; box-shadow: var(--shadow);
  padding: 11px 16px; font-size: 13px; font-weight: 600; max-width: 90vw;
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Startseite (Home) ===== */
.brand#homeBtn { cursor: pointer; border-radius: 10px; padding: 4px 6px; margin: -4px -6px; transition: background .15s; }
.brand#homeBtn:hover { background: rgba(255,255,255,.05); }
body.theme-light .brand#homeBtn:hover { background: rgba(20,30,50,.05); }

.home-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: flex-start; padding: 24px;
  background:
    linear-gradient(90deg, rgba(7,9,13,0.94) 0%, rgba(7,9,13,0.72) 26%, rgba(7,9,13,0.30) 52%, rgba(7,9,13,0.10) 74%, rgba(7,9,13,0) 100%),
    url('/WCDWallpaper.webp') center center / cover no-repeat;
  overflow: hidden;
}
.home-overlay.show { display: flex; }
/* Wallpaper bleibt auch im hellen Theme dunkel (Hero) */
body.theme-light .home-overlay { }

@media (min-width: 900px) {
  .home-overlay { padding-left: clamp(40px, 7vw, 120px); }
}
/* Schmale Screens: kräftigere Abdunklung, Karte zentriert */
@media (max-width: 680px) {
  .home-overlay {
    justify-content: center;
    background:
      linear-gradient(180deg, rgba(7,9,13,0.86) 0%, rgba(7,9,13,0.66) 45%, rgba(7,9,13,0.86) 100%),
      url('/WCDWallpaper.webp') center center / cover no-repeat;
  }
}
.home-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow); padding: 30px 28px 22px; margin: auto;
}
.home-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.home-brand img { width: 52px; height: 52px; display: block; }
.home-brand h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.home-brand p { font-size: 13px; color: var(--muted); margin-top: 2px; }

.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.home-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  text-align: left; padding: 16px; border-radius: 12px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text);
  font-family: inherit; transition: border-color .15s, transform .08s, background .15s;
}
.home-tile:hover { border-color: var(--faint); }
.home-tile:active { transform: scale(.98); }
.home-tile.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.home-tile.primary:hover { filter: brightness(1.06); }
.home-tile .ht-ico { width: 26px; height: 26px; margin-bottom: 6px; }
.home-tile .ht-ico svg { width: 26px; height: 26px; }
.home-tile .ht-t { font-size: 14.5px; font-weight: 600; }
.home-tile .ht-s { font-size: 11.5px; opacity: .78; }

.home-recent-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.home-recent-head span:first-child { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.home-hint { font-size: 11px; color: var(--faint); }
.home-list { display: flex; flex-direction: column; gap: 7px; max-height: 240px; overflow-y: auto; }
.home-list .empty { font-size: 12.5px; color: var(--faint); padding: 6px 2px; }
.home-row { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px 9px 13px; }
.home-row .hr-main { flex: 1; min-width: 0; cursor: pointer; }
.home-row .hr-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row .hr-date { font-size: 11px; color: var(--faint); margin-top: 1px; }
.home-row .hr-open { border: 1px solid var(--border-2); background: transparent; color: var(--muted); font-family: inherit; font-size: 11.5px; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.home-row .hr-open:hover { color: var(--text); border-color: var(--faint); }
.home-row .hr-del { border: none; background: transparent; color: var(--faint); font-size: 17px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.home-row .hr-del:hover { color: var(--danger); }

.home-continue { display: block; width: 100%; margin-top: 18px; padding: 10px; background: transparent; border: none; color: var(--muted); font-family: inherit; font-size: 12.5px; cursor: pointer; }
.home-continue:hover { color: var(--text); }

/* ===== Projekt-Sektion (Sidebar) ===== */
.proj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.proj-actions .btn { justify-content: center; padding: 9px 10px; font-size: 12.5px; }
.proj-actions .btn svg { width: 15px; height: 15px; }
.proj-full { grid-column: 1 / -1; }
.proj-save-row { display: flex; gap: 8px; margin-top: 10px; }
.proj-save-row input { flex: 1; }
@media (max-width: 560px) { .home-actions { grid-template-columns: 1fr; } }

/* ===== Sprachwähler (Startseite) ===== */
.lang-row { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 14px; }
.lang-btn { padding: 3px; border: 1.5px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; line-height: 0; opacity: .65; transition: opacity .15s, border-color .15s, transform .08s; }
.lang-btn:hover { opacity: 1; }
.lang-btn:active { transform: scale(.92); }
.lang-btn.active { opacity: 1; border-color: var(--accent); }
.lang-btn .flag { display: block; width: 26px; height: 18px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.lang-btn .flag svg { display: block; width: 100%; height: 100%; }

/* Anleitung-Link auf der Startseite */
.home-guide { display: block; text-align: center; margin-top: 2px; color: var(--faint); font-size: 12px; text-decoration: none; }
.home-guide:hover { color: var(--muted); text-decoration: underline; }

/* Feedback-Button in der Top-Leiste (Icon + Text) */
.fb-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 13px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--radius);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.fb-btn:hover { border-color: var(--faint); }
.fb-btn:active { transform: scale(.97); }
.fb-btn svg { width: 17px; height: 17px; }
@media (max-width: 600px) {
  .fb-btn { padding: 0; width: 38px; justify-content: center; }
  .fb-btn-label { display: none; }
}
