/* ---------- Palette: Latex-Schwarz, Gold, Elfenbein ---------- */
:root {
  /* sorgt dafür, dass native Browser-UI (z.B. das Select-Dropdown) dunkel
     gerendert wird statt weiß */
  color-scheme: dark;
  --black: #08080a;
  --latex-hi: rgba(255, 255, 255, 0.09);
  --gold: #d4af37;
  --gold-dim: rgba(212, 175, 55, 0.35);
  --gold-faint: rgba(212, 175, 55, 0.14);
  --ivory: #f4efe4;
  --ivory-dim: rgba(244, 239, 228, 0.62);
  --gold-gradient: linear-gradient(105deg, #8a6d1f 0%, #f6dc8a 38%, #d4af37 62%, #fff3c4 100%);
  --card-gradient: linear-gradient(165deg, #1b1b20 0%, #0d0d10 45%, #131317 100%);
}

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

/* Textmarkierung in Gold statt Browser-Blau */
::selection { background: rgba(212, 175, 55, 0.35); color: #fff8e7; }

/* schmale, dunkle Scrollbar im Stil der Seite */
html { scrollbar-width: thin; scrollbar-color: rgba(212, 175, 55, 0.35) #0c0c0f; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0c0c0f; }
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 5px;
  border: 2px solid #0c0c0f;
}
::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.5); }

/* goldener Fokus-Rahmen für Tastaturbedienung */
:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 3px; }

/* Warnung fuer file://-Zugriff: sobald dieses Stylesheet laedt, verschwindet sie */
.serve-hint { display: none; }

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 120% 60% at 50% -15%, rgba(255, 255, 255, 0.07), transparent 60%),
    radial-gradient(ellipse 70% 45% at 85% 110%, rgba(212, 175, 55, 0.05), transparent 65%),
    var(--black);
  color: var(--ivory);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; /* echte Ligaturen + Kerning der Serifenschrift */
}

/* schmaler, wandernder Glanzstreifen wie auf poliertem Latex */
.sheen {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 42%, rgba(255, 255, 255, 0.025) 49%,
    rgba(255, 255, 255, 0.045) 50%, rgba(255, 255, 255, 0.025) 51%,
    transparent 58%);
  animation: sheen-drift 14s ease-in-out infinite alternate;
}
@keyframes sheen-drift {
  from { transform: translateX(-6%); }
  to   { transform: translateX(6%); }
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 120px;
  position: relative;
}

/* ---------- Kopf ---------- */
header { text-align: center; margin-bottom: 44px; }

h1 {
  font-family: Cinzel, "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 44px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(212, 175, 55, 0.22));
}

/* durchgezogene Goldlinie unter dem Titel (bewusst ohne Ornament,
   damit der wandernde Sheen nicht von einem opaken Hintergrund
   unterbrochen wird) */
.rule {
  margin: 18px auto 0;
  max-width: 340px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim) 20%, var(--gold) 50%, var(--gold-dim) 80%, transparent);
}

/* ---------- Menü links ---------- */
.side-menu {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}
.menu-item {
  font-family: Cinzel, serif;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  background: none;
  border: none;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  text-align: left;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.menu-item:hover { color: var(--ivory); }
.menu-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

/* ---------- XP ---------- */
.xp-panel { margin-bottom: 36px; }

.xp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.xp-level {
  font-family: Cinzel, serif;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
#level-num { font-size: 19px; font-variant-numeric: tabular-nums; }
.xp-numbers {
  font-size: 15px;
  color: var(--ivory-dim);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.xp-bar {
  height: 6px;
  border-radius: 3px;
  background: #131316;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--gold-gradient);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Karten (Latex-Oberfläche) ---------- */
.add-panel, .task, .history-item, .settings-panel {
  background: var(--card-gradient);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 var(--latex-hi),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 12px 30px rgba(0, 0, 0, 0.55);
}

/* ---------- Eingabe ---------- */
.add-panel { padding: 22px 24px 18px; margin-bottom: 40px; }

.f-name {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ivory);
  font-family: inherit;
  font-size: 24px;
  padding: 6px 2px 10px;
  outline: none;
  transition: border-color 0.3s;
}
.f-name::placeholder { color: rgba(244, 239, 228, 0.3); font-style: italic; }
.f-name:focus { border-bottom-color: var(--gold); }

.add-row {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field-grow { flex: 1; min-width: 150px; }

.field-label {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  font-family: Cinzel, serif;
}
.field-label output { color: var(--gold); font-size: 13.5px; }

.f-date, #f-custom-days, .dropdown-btn {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--ivory);
  font-family: inherit;
  font-size: 17px;
  padding: 7px 12px;
  outline: none;
  transition: border-color 0.3s;
}
.f-date { width: 138px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.f-date::placeholder { color: rgba(244, 239, 228, 0.25); }
.f-date:focus, #f-custom-days:focus, .dropdown-btn:focus { border-color: var(--gold-dim); }

#f-custom-days { width: 76px; }

/* ---------- Eigenes Dropdown (Wiederholung) ---------- */
.dropdown { position: relative; }

.dropdown-btn {
  min-width: 148px;
  text-align: left;
  cursor: pointer;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23d4af37'/></svg>");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.dropdown.open .dropdown-btn { border-color: var(--gold-dim); }

.dropdown-list {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  min-width: 100%;
  z-index: 20;
  list-style: none;
  padding: 6px;
  background: var(--card-gradient);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 var(--latex-hi),
    0 14px 34px rgba(0, 0, 0, 0.75);
  animation: dropdown-in 0.16s ease;
  outline: none;
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-list li {
  padding: 8px 12px 8px 28px;
  border-radius: 5px;
  font-size: 17px;
  color: var(--ivory);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
/* aktive Zeile (Maus oder Pfeiltasten) */
.dropdown-list li.active { background: var(--gold-faint); color: #fff3c4; }
/* kleine Goldraute markiert die gewählte Option */
.dropdown-list li[aria-selected="true"]::before {
  content: "\25C6";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  color: var(--gold);
}

/* Slider */
input[type="range"] {
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold) var(--imp-pct, 45%), rgba(255,255,255,0.12) var(--imp-pct, 45%));
  outline: none;
  margin-bottom: 9px;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold-gradient);
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--gold);
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
  cursor: pointer;
}

.btn-add {
  margin-left: auto;
  font-family: Cinzel, serif;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0a0a0c;
  background: var(--gold-gradient);
  border: none;
  border-radius: 6px;
  padding: 11px 26px;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: filter 0.25s, transform 0.15s;
}
.btn-add:hover { filter: brightness(1.12); }
.btn-add:active { transform: translateY(1px); }

.form-error {
  margin-top: 12px;
  color: #e2b45a;
  font-style: italic;
  font-size: 16px;
}

/* ---------- Aufgabenliste ---------- */
.task-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.task {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.task::after { /* Glanzkante beim Hover */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.task:hover { border-color: var(--gold-faint); }
.task:hover::after { transform: translateX(100%); }

.check {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-dim);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.check:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.45);
}
.task.completing .check {
  background: var(--gold-gradient);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.8);
}

.task-body { flex: 1; min-width: 0; }
.task-name { display: block; font-size: 21px; font-weight: 500; }

.task-meta {
  display: flex;
  gap: 14px;
  margin-top: 3px;
  font-size: 14.5px;
  color: var(--ivory-dim);
  letter-spacing: 0.04em;
  align-items: baseline;
}
.meta-overdue {
  color: var(--gold);
  font-family: Cinzel, serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 1px 7px;
}
.meta-repeat { color: rgba(212, 175, 55, 0.75); }

.task-prio {
  flex: none;
  font-family: Cinzel, serif;
  font-size: 20px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: right;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.delete {
  flex: none;
  background: none;
  border: none;
  color: rgba(244, 239, 228, 0.2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 0.25s, color 0.25s;
}
.task:hover .delete, .task:focus-within .delete { opacity: 1; }
.delete:hover { color: var(--ivory); }

.task.completing {
  animation: task-out 0.9s ease forwards 0.35s;
}
@keyframes task-out {
  to { opacity: 0; transform: translateX(26px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -14px; }
}

.empty {
  text-align: center;
  margin-top: 56px;
  font-size: 22px;
  color: var(--ivory-dim);
}
.empty em { color: var(--gold); }

/* ---------- XP-Toast ---------- */
.xp-toast {
  position: fixed;
  left: 50%;
  top: 34%;
  transform: translate(-50%, 0);
  font-family: Cinzel, serif;
  font-size: 42px;
  letter-spacing: 0.1em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.5));
  opacity: 0;
  pointer-events: none;
}
.xp-toast.show { animation: toast 2.4s ease forwards; }
@keyframes toast {
  0%   { opacity: 0; transform: translate(-50%, 24px) scale(0.85); }
  18%  { opacity: 1; transform: translate(-50%, 0) scale(1.06); }
  30%  { transform: translate(-50%, -4px) scale(1); }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(0.98); }
}

/* ---------- Level-Up ---------- */
.levelup {
  position: fixed;
  left: 50%;
  top: 28%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}
.levelup-label {
  font-family: Cinzel, serif;
  font-size: 15px;
  letter-spacing: 0.5em;
  padding-left: 0.5em; /* gleicht den Letterspacing-Überhang rechts aus */
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.levelup-num {
  font-family: Cinzel, serif;
  font-weight: 600;
  font-size: 96px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(212, 175, 55, 0.55));
}
.levelup-rule {
  width: 190px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  transform: scaleX(0);
}
.levelup-xp {
  font-size: 19px;
  font-style: italic;
  color: var(--gold);
}
.levelup.show { animation: levelup 3.4s ease forwards; }
.levelup.show .levelup-rule { animation: levelup-rule 1s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards; }
@keyframes levelup {
  0%   { opacity: 0; transform: translateX(-50%) translateY(22px) scale(0.9); }
  10%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.04); }
  20%  { transform: translateX(-50%) scale(1); }
  82%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-34px) scale(0.98); }
}
@keyframes levelup-rule { to { transform: scaleX(1); } }

/* die XP-Leiste glüht kurz auf, während sie beim Level-Up voll läuft */
.xp-bar.levelup-glow {
  border-color: var(--gold-dim);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 18px rgba(212, 175, 55, 0.5);
  transition: box-shadow 0.5s, border-color 0.5s;
}

/* ---------- History ---------- */
.history-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.history-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 20px;
}
.history-name { font-size: 19px; min-width: 0; overflow-wrap: anywhere; flex: 1; }
.history-date {
  flex: none;
  font-size: 14.5px;
  color: var(--ivory-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.history-xp {
  flex: none;
  font-family: Cinzel, serif;
  font-size: 16px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

/* ---------- Einstellungen ---------- */
.settings-panel { padding: 10px 24px; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.setting-row + .setting-row { border-top: 1px solid rgba(255, 255, 255, 0.07); }

.setting-text { display: flex; flex-direction: column; gap: 3px; }
.setting-name {
  font-family: Cinzel, serif;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
}
.setting-hint { font-size: 15px; color: var(--ivory-dim); font-style: italic; }

#s-volume { width: 180px; }

#s-username { color: var(--gold); font-style: normal; }

/* dezenter Zweitknopf (z.B. Abmelden): Goldrand statt Goldfläche */
.btn-outline {
  font-family: Cinzel, serif;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  padding: 9px 20px;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.btn-outline:hover {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}
a.btn-outline { text-decoration: none; display: inline-block; }

/* destruktive Aktion (Konto löschen): gedecktes Rot statt Gold */
.btn-danger { color: #c96a5a; border-color: rgba(201, 106, 90, 0.4); }
.btn-danger:hover {
  border-color: #c96a5a;
  box-shadow: 0 0 12px rgba(201, 106, 90, 0.3);
}

.settings-footer {
  text-align: center;
  padding: 16px 0 10px;
  font-size: 16px;
}

/* ---------- Rechtliches (Datenschutz) ---------- */
.legal-main { max-width: 640px; }
.legal-main h1 { font-size: 30px; }

.legal {
  background: var(--card-gradient);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 var(--latex-hi),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 12px 30px rgba(0, 0, 0, 0.55);
  padding: 30px 34px;
  font-size: 18px;
  line-height: 1.55;
}
.legal h2 {
  font-family: Cinzel, serif;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 22px;
}
.legal h3 {
  font-family: Cinzel, serif;
  font-weight: 400;
  font-size: 13.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin: 24px 0 8px;
}
.legal p { margin-bottom: 10px; }
.legal strong { color: var(--gold); font-weight: 500; }
.legal-footer { text-align: center; margin-top: 28px; }

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 15.5px;
}

/* ---------- Login-Seite ---------- */
.login-main { max-width: 420px; }

/* kleinerer Titel: bei 44px wäre der Schriftzug breiter als die schmale
   Login-Spalte, und Text außerhalb der Box verliert seinen Gradient
   (background-clip: text) - das letzte T wurde unsichtbar */
.login-main h1 { font-size: 30px; }

.login-panel {
  background: var(--card-gradient);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 var(--latex-hi),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    0 12px 30px rgba(0, 0, 0, 0.55);
  padding: 30px 32px 24px;
}

.login-title {
  font-family: Cinzel, serif;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 24px;
}

.login-field { margin-bottom: 18px; }

.login-input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--ivory);
  font-family: inherit;
  font-size: 18px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.3s;
  width: 100%;
}
.login-input:focus { border-color: var(--gold-dim); }

.btn-login { width: 100%; margin: 8px 0 0; }

.login-switch {
  margin-top: 22px;
  text-align: center;
  color: var(--ivory-dim);
  font-size: 16.5px;
}
.link-gold {
  background: none;
  border: none;
  color: var(--gold);
  font-family: inherit;
  font-size: inherit;
  font-style: italic;
  cursor: pointer;
  padding: 0 2px;
  text-decoration: underline;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s;
}
.link-gold:hover { text-decoration-color: var(--gold); }

/* Kippschalter im Gold-Look */
.switch { position: relative; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  display: block;
  width: 46px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
}
.switch-track::after { /* der Knopf */
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(244, 239, 228, 0.45);
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}
.switch input:checked + .switch-track { background: rgba(212, 175, 55, 0.25); }
.switch input:checked + .switch-track::after {
  transform: translateX(20px);
  background: var(--gold-gradient);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}
.switch input:focus-visible + .switch-track { border-color: var(--gold-dim); }

.hidden { display: none !important; }

/* Bewegung reduzieren, wenn das Betriebssystem es wünscht:
   Animationen laufen quasi sofort ab, der Dauer-Schimmer entfällt */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .sheen { display: none; }
  /* Toast + Level-Up ohne Animation einfach ein- und ausblenden
     (das Entfernen der .show-Klasse übernimmt app.js per Timeout) */
  .xp-toast.show, .levelup.show { animation: none; opacity: 1; }
}

/* Menü rutscht auf schmalen Fenstern als Leiste über den Inhalt */
@media (max-width: 1080px) {
  .side-menu {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding-top: 22px;
  }
  .menu-item {
    border-left: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
  }
  .menu-item.active { border-bottom-color: var(--gold); }
  main { padding-top: 34px; }
}

@media (max-width: 620px) {
  h1 { font-size: 30px; }
  .add-row { gap: 14px; }
  .btn-add { margin-left: 0; width: 100%; }
}
