/* Gewand „Maestro“ (Tobi 10.11.2026, Weg 2): die Optik von /neu über allen bisherigen Seiten.
   Wirkt nur mit data-accent="maestro" (Einstellungen → Darstellung → Farbthema), immer dunkel.
   Nur Farben, Flächen und Bewegung – Aufbau und Stufenfarben (--d1…--d10) bleiben. */
:root[data-accent="maestro"], :root[data-dark][data-accent="maestro"] {
  --bg: #171b22; --surface: #232936; --surface2: #2d3443; --text: #f2f5f9; --muted: #a3adbd;
  --line: rgba(255,255,255,.09); --line-strong: rgba(255,255,255,.18); --ink-bar: #12151b;
  --accent: #fbbf24; --accent-soft: rgba(251,191,36,.14); --accent-text: #1b1403;
  --radius: 16px; --r-s: 10px; --ctl-r: 10px;
  --lift: 0 1px 2px rgba(0,0,0,.4), 0 18px 44px -12px rgba(0,0,0,.6);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
html[data-accent="maestro"] body {
  background: radial-gradient(1200px 700px at 12% -10%, #2a3346 0%, transparent 60%), radial-gradient(900px 600px at 105% 110%, #2b2a3d 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
}
html[data-accent="maestro"] ::-webkit-scrollbar { width: 9px; height: 9px; }
html[data-accent="maestro"] ::-webkit-scrollbar-thumb { background: rgba(148,163,184,.25); border-radius: 99px; }
html[data-accent="maestro"] ::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.45); }

/* Leiste: Glas, aktiver Punkt in Bernstein */
html[data-accent="maestro"] .top { background: rgba(35,41,54,.78); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); border-color: var(--line); }
html[data-accent="maestro"] .top .brand rect { fill: #f59e0b; }
html[data-accent="maestro"] .top nav a { transition: background .18s, color .18s; }
html[data-accent="maestro"] .top nav a:hover { background: rgba(255,255,255,.07); color: var(--text); }
html[data-accent="maestro"] .top nav a.on { background: var(--accent-soft); color: var(--accent); }
html[data-accent="maestro"] .top nav a.on .ni, html[data-accent="maestro"] .top nav a.on .i { color: var(--accent); }
html[data-accent="maestro"] .nav-add { background: rgba(251,191,36,.12); border-color: transparent; color: #fcd34d; }
html[data-accent="maestro"] .nav-add:hover { background: rgba(251,191,36,.2); color: #fde68a; }
html[data-accent="maestro"] .me-av { background: #3b4558; color: #fff; }

/* Flächen: Karten leicht durchscheinend, weiche Kanten */
html[data-accent="maestro"] .card { background: rgba(35,41,54,.72); border-color: var(--line); }
html[data-accent="maestro"] select option { background: #232936; color: var(--text); }
html[data-accent="maestro"] .today-hero { background: linear-gradient(120deg, rgba(251,191,36,.16), rgba(35,41,54,.7) 55%); border: 1px solid var(--line); }
html[data-accent="maestro"] .today-hero .btn { background: linear-gradient(140deg, #fcd34d, #f59e0b); color: var(--accent-text); }
html[data-accent="maestro"] :is(.primary, button.primary, .btn.primary) { background: linear-gradient(140deg, #fcd34d, #f59e0b); border-color: transparent; color: var(--accent-text); box-shadow: 0 8px 22px -10px rgba(245,158,11,.7); }
html[data-accent="maestro"] :is(.primary, button.primary, .btn.primary):hover { background: linear-gradient(140deg, #fde68a, #fbbf24); color: var(--accent-text); }
html[data-accent="maestro"] main a:not(.btn):not(.more-row):not(.cv-title):not(.cv-cover):not(.qs-row):hover { color: var(--accent); }
html[data-accent="maestro"] dialog, html[data-accent="maestro"] .np-dlg { background: #232936; color: var(--text); border: 1px solid var(--line-strong); }

/* Titelbilder: heben sich beim Zeigen */
html[data-accent="maestro"] .cv-cover { border-radius: 12px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
html[data-accent="maestro"] .cv-card:hover .cv-cover { transform: translateY(-4px) scale(1.015); box-shadow: 0 22px 44px -18px rgba(0,0,0,.75); }

/* Bewegung: Inhalt gleitet herein, Seitenwechsel blenden über */
@media (prefers-reduced-motion: no-preference) {
  /* @view-transition steht in base.html, nur bei diesem Thema */
  html[data-accent="maestro"]::view-transition-old(root) { animation: mz-out .16s ease both; }
  html[data-accent="maestro"]::view-transition-new(root) { animation: mz-in .32s var(--ease) both; }
  html[data-accent="maestro"]:not([data-anim="off"]) main > * { animation: mz-rise .45s var(--ease) backwards; }
  html[data-accent="maestro"]:not([data-anim="off"]) main > *:nth-child(2) { animation-delay: .04s; }
  html[data-accent="maestro"]:not([data-anim="off"]) main > *:nth-child(3) { animation-delay: .08s; }
  html[data-accent="maestro"]:not([data-anim="off"]) main > *:nth-child(n+4) { animation-delay: .12s; }
}
@keyframes mz-out { to { opacity: 0; } }
@keyframes mz-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes mz-rise { from { opacity: 0; } }  /* nur Deckkraft: transform würde fest stehende Teile (Vollbild) kurz verschieben */

/* Heute: Kacheln in den hellen Verläufen der Noten-Übersicht */
html[data-accent="maestro"] .td-tile { border: 0; color: #0f172a; }
html[data-accent="maestro"] main a.td-tile:hover { color: #0f172a; box-shadow: 0 18px 34px -14px rgba(0,0,0,.55); }
html[data-accent="maestro"] .td-now { background: linear-gradient(135deg, #e0f2fe, #b3e1fb); }
html[data-accent="maestro"] .td-check { background: linear-gradient(135deg, #fef3c7, #fcd34d); }
html[data-accent="maestro"] .td-last { background: linear-gradient(135deg, #f8fafc, #dde5ee); }
html[data-accent="maestro"] .td-tag { background: rgba(15,23,42,.08); color: #0f172a; }
html[data-accent="maestro"] .td-s { color: rgba(15,23,42,.72); }
html[data-accent="maestro"] .td-cover, html[data-accent="maestro"] .td-more span { background: #fff; }
html[data-accent="maestro"] .td-now.live { box-shadow: 0 0 0 2px #f59e0b; }
html[data-accent="maestro"] .td-now.live .td-tag { background: #0f172a; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  html[data-accent="maestro"]:not([data-anim="off"]) .td-tile { animation: mz-up .6s var(--ease) backwards; }
  html[data-accent="maestro"]:not([data-anim="off"]) .td-tile:nth-child(2) { animation-delay: 70ms; }
  html[data-accent="maestro"]:not([data-anim="off"]) .td-tile:nth-child(3) { animation-delay: 140ms; }
}
@keyframes mz-up { from { opacity: 0; transform: translateY(14px); } }

/* ---- Schmale Leiste links wie in der Noten-Übersicht (Tobi 11.11.2026): nur Symbole, klappt beim Zeigen auf ---- */
@media (min-width: 700px) {
  html[data-accent="maestro"]:not([data-nav="top"]) .top { width: 68px; padding: 14px 10px; align-items: stretch; overflow: hidden; transition: width .32s var(--ease), box-shadow .32s; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top:hover, html[data-accent="maestro"]:not([data-nav="top"]) .top:focus-within { width: 224px; box-shadow: 24px 0 60px -20px rgba(0,0,0,.6); }
  html[data-accent="maestro"]:not([data-nav="top"]) main { margin-left: 68px; }
  html[data-accent="maestro"]:not([data-nav="top"]) .lesson-bar { margin-left: 68px; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .brand { margin: 0 0 18px 2px; gap: 12px; flex-wrap: nowrap; white-space: nowrap; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .brand svg { width: 44px; height: 44px; flex: none; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .brand-t { display: inline; font-size: 1.05rem; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top nav { width: auto; gap: 4px; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top nav a { flex-direction: row; justify-content: flex-start; gap: 14px; height: 44px; padding: 0 13px; border-radius: 12px; font-size: .92rem; white-space: nowrap; overflow: hidden; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top nav a .ni { width: 22px; height: 22px; background: none; border-radius: 0; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top nav a.on .ni { background: none; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top nav .nav-badge { right: auto; left: 28px; top: 4px; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .me { padding: 10px 0 0; gap: 4px; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .nav-add { justify-content: flex-start; gap: 14px; height: 44px; min-height: 44px; padding: 0 15px; border-radius: 12px; font-size: .92rem; white-space: nowrap; overflow: hidden; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .nav-add .i { width: 18px; height: 18px; flex: none; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .qs-open { justify-content: flex-start; gap: 14px; height: 44px; padding: 0 16px; border: 0; background: none; border-radius: 12px; overflow: hidden; white-space: nowrap; color: var(--muted); }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .qs-open:hover { background: rgba(255,255,255,.07); color: var(--text); }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .qs-open .i { flex: none; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .me-name { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 8px; border-top: 1px solid var(--line); margin-top: 6px; white-space: nowrap; overflow: hidden; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .me-av { flex: none; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top .me-name .me-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top :is(.jobs-pill, .update-pill) { overflow: hidden; white-space: nowrap; justify-content: flex-start; }
  /* Beschriftung: eingeklappt unsichtbar, gleitet beim Aufklappen herein */
  html[data-accent="maestro"]:not([data-nav="top"]) .top :is(.nl, .brand-t, .na-t, .me-t, .qs-open kbd, .me-name > .i) { opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .3s var(--ease); }
  html[data-accent="maestro"]:not([data-nav="top"]) .top:is(:hover, :focus-within) :is(.nl, .brand-t, .na-t, .me-t, .qs-open kbd, .me-name > .i) { opacity: 1; transform: none; transition-delay: .06s; }
}

/* Etiketten mit eigenen Farben (Einstellungen → Etiketten): im dunklen Gewand als Tönung statt heller Fläche –
   helle Kästchen mit weißer Schrift waren nicht lesbar und schlugen sich mit den Stufenfarben (Tobi 16.11.2026) */
html[data-accent="maestro"]:not([data-meta="text"]) .b.key:not(.mod) {
  background: color-mix(in srgb, var(--m-key, var(--accent)) 17%, transparent);
  color: color-mix(in srgb, var(--m-key, var(--accent)) 42%, #fff); }
html[data-accent="maestro"]:not([data-meta="text"]) .b.key.mod { color: color-mix(in srgb, var(--warn, #f59e0b) 40%, #fff); }
html[data-accent="maestro"]:not([data-meta="text"]) .b.range {
  background: color-mix(in srgb, var(--m-range, #94a3b8) 17%, transparent);
  color: color-mix(in srgb, var(--m-range, #94a3b8) 35%, #fff); }
html[data-accent="maestro"]:not([data-meta="text"]) .b:is(.tempo, .ens, .genre, .part) {
  background: color-mix(in srgb, var(--m-other, #94a3b8) 17%, transparent) !important;
  color: color-mix(in srgb, var(--m-other, #94a3b8) 35%, #fff) !important; }
html[data-accent="maestro"][data-meta-diff="one"]:not([data-meta="text"]) .b.diff {
  background: color-mix(in srgb, var(--m-diff, #f4c0c8) 20%, transparent);
  color: color-mix(in srgb, var(--m-diff, #f4c0c8) 55%, #fff); }

/* Unterpunkte in der schmalen Leiste (Tobi 23.11.2026): kleiner, beim Aufklappen eingerückt */
@media (min-width: 700px) {
  html[data-accent="maestro"]:not([data-nav="top"]) .top nav a.nav-s { height: 34px; padding-left: 16px; font-size: .84rem; transition: background .18s, color .18s, padding .3s var(--ease); }
  html[data-accent="maestro"]:not([data-nav="top"]) .top nav a.nav-s .ni { width: 16px; height: 16px; }
  html[data-accent="maestro"]:not([data-nav="top"]) .top:is(:hover, :focus-within) nav a.nav-s { padding-left: 30px; }
}
