/* Noten-Übetool – Gestaltung angelehnt an den Stil des Arndt-Gymnasiums Dahlem (Open Sans, Grün/Weiß, blaue Links),
   moderner umgesetzt: weiche Schatten, klare Karten, ruhige Flächen. */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/open-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../vendor/fonts/open-sans-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/fonts/open-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/fonts/open-sans-700.woff2") format("woff2"); }

:root {
  --green: #709c5b;        /* AGD-Grün */
  --green-deep: #5b8547;
  --green-dark: #47703a;
  --green-soft: #eef4ea;
  --green-line: #d5e3cd;
  --blue: #1e73be;         /* AGD-Linkblau */
  --ink: #333333;
  --ink-strong: #313131;
  --muted: #6f7a72;
  --bg: #f4f6f2;
  --card: #ffffff;
  --line: #e3e7df;
  --danger: #b42318;
  --ok: #2e7d32;
  --warn: #9a6700;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30, 50, 20, .06), 0 8px 24px -12px rgba(30, 50, 20, .18);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); accent-color: var(--green-deep); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; font-weight: 600; color: var(--ink-strong); margin: 0 0 .3rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 600; color: var(--ink-strong); margin: 0 0 .9rem; padding-bottom: .45rem; position: relative; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; background: var(--green); border-radius: 2px; }
.muted { color: var(--muted); }
.error { color: var(--danger); }

/* Kopfleiste */
.top { display: flex; align-items: center; gap: 2rem; padding: .7rem 1.4rem; background: linear-gradient(180deg, #78a463, var(--green)); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(40, 70, 30, .25); }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; line-height: 1.15; }
.brand > span { display: flex; flex-direction: column; }
.brand-logo { height: 46px; width: auto; opacity: .95; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.brand:hover { text-decoration: none; }
.brand b { font-size: 1.25rem; font-weight: 600; letter-spacing: .01em; }
.brand i { font-size: .82rem; font-weight: 400; opacity: .92; }
.top nav { display: flex; gap: 1.4rem; margin-left: auto; }
.top nav a { color: #fff; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; opacity: .95; }
.top nav a:hover { text-decoration: none; opacity: 1; border-bottom: 2px solid rgba(255,255,255,.8); }

main { max-width: 1200px; margin: 0 auto; padding: 1.4rem 1.4rem 5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }

/* Buttons & Eingaben */
button, .button { font: inherit; font-size: .9rem; padding: .45rem .95rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
button:hover, .button:hover { border-color: var(--green); background: var(--green-soft); text-decoration: none; }
button.primary, .button.primary { background: var(--green-deep); color: #fff; border-color: var(--green-deep); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: .82rem; padding: .55rem 1.15rem; box-shadow: 0 2px 6px rgba(70,110,50,.25); }
button.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
button.link { border: none; background: none; color: var(--blue); padding: .2rem .3rem; box-shadow: none; }
button.link:hover { background: none; text-decoration: underline; }
button.danger { color: var(--danger); border-color: #e7b2ad; }
button.danger:hover { background: #fdf0ee; border-color: var(--danger); }
button:disabled { opacity: .55; cursor: default; }
input, select { font: inherit; font-size: .92rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 2px solid rgba(112,156,91,.35); border-color: var(--green); }
input.num { width: 4.4rem; }
input[type=range] { vertical-align: middle; }
label { white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; align-items: center; margin: .4rem 0; }
.label { font-weight: 600; color: var(--ink-strong); }

/* Bibliothek */
.upload { background: linear-gradient(135deg, #f7faf4, #ffffff); }
.dropzone { display: block; border: 2px dashed var(--green-line); border-radius: var(--radius); padding: 1.8rem; text-align: center; cursor: pointer; color: var(--muted); background: #fff; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.dropzone u { color: var(--blue); }
.status { margin-top: .7rem; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: .45rem; }
.progress > div { height: 100%; background: var(--green); width: 0; transition: width .2s; }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.score-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .45rem; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; border-top: 3px solid var(--green); }
.score-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(30,50,20,.08), 0 14px 30px -12px rgba(30,50,20,.28); }
.score-card h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.score-card h3 a { color: var(--ink-strong); }
.score-card .parts a { display: inline-block; margin: .15rem .35rem .15rem 0; padding: .2rem .65rem; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); border: 1px solid var(--green-line); font-size: .86rem; font-weight: 600; }
.score-card .parts a:hover { background: var(--green); color: #fff; border-color: var(--green); text-decoration: none; }
.badge { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .12rem .55rem; border-radius: 999px; background: var(--line); color: var(--muted); }
.badge.ok { background: #dff0dc; color: var(--ok); }
.badge.warn { background: #fdf1cf; color: var(--warn); }
.badge.err { background: #fde3e0; color: var(--danger); }
.score-card .foot { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; color: var(--muted); margin-top: .2rem; }

/* Partitur-Seite */
.titlebar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .8rem; }
[contenteditable]:hover { outline: 1px dashed var(--green-line); outline-offset: 3px; border-radius: 3px; }
[contenteditable]:focus { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }
.controls { position: sticky; top: 3.6rem; z-index: 10; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.parts { display: flex; flex-wrap: wrap; gap: .4rem; }
.parts button { border-radius: 999px; font-weight: 600; font-size: .88rem; }
.parts button.active { background: var(--green-deep); color: #fff; border-color: var(--green-deep); }
.parts button.muted-part { text-decoration: line-through; opacity: .6; }
.parts button small { opacity: .85; font-weight: 400; }
.tempo input[type=range] { width: 140px; }
.share-url { width: min(100%, 440px); font-size: .85rem; }
#sheet-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; overflow-x: auto; margin-bottom: 1.2rem; min-height: 200px; box-shadow: var(--shadow); }
#sheet svg { max-width: 100%; height: auto; }
.log { max-height: 14rem; overflow: auto; font-size: .78rem; background: #f3f5f1; padding: .6rem; border-radius: 6px; white-space: pre-wrap; }
#parts-table { border-collapse: collapse; width: 100%; margin-bottom: .7rem; }
#parts-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .3rem .5rem; border-bottom: 2px solid var(--green-line); }
#parts-table td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
#parts-table input[type=text] { width: 100%; }
.advanced { margin-top: 1rem; }
.advanced summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.recording { margin: .5rem 0 1.1rem; }
.recording .frame { aspect-ratio: 16 / 9; max-width: 640px; background: #000; border-radius: 8px; overflow: hidden; margin-top: .4rem; box-shadow: var(--shadow); }
.recording iframe { width: 100%; height: 100%; border: 0; }
.recording .head { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.share-card { max-width: 640px; margin: 2rem auto; }
.share-card audio { width: 100%; margin: .8rem 0; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--green-line); border-top-color: var(--green-deep); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
kbd { font: .85em ui-monospace, monospace; background: var(--line); padding: 0 .3em; border-radius: 4px; }
footer.foot { max-width: 1200px; margin: 0 auto; padding: 0 1.4rem 1.5rem; color: var(--muted); font-size: .82rem; }
@media (max-width: 700px) {
  main { padding: .8rem .7rem 4rem; }
  .top { padding: .55rem .9rem; gap: 1rem; }
  .controls { position: static; }
  .tempo input[type=range] { width: 100px; }
}

/* Kamera-Aufnahme (mobil) */
.camera-row { margin-top: .8rem; }
.camera-btn { cursor: pointer; }
.camera-panel { margin-top: .8rem; padding: .8rem; border: 1px solid var(--green-line); border-radius: var(--radius); background: var(--green-soft); }
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.thumb { position: relative; width: 96px; }
.thumb img { width: 96px; height: 128px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: block; }
.thumb .n { position: absolute; left: 4px; top: 4px; background: var(--green-deep); color: #fff; font-size: .72rem; font-weight: 600; padding: 0 .4rem; border-radius: 999px; }
.thumb .x { position: absolute; right: 2px; top: 2px; background: #fff; border: 1px solid var(--line); border-radius: 50%; width: 22px; height: 22px; line-height: 20px; text-align: center; padding: 0; font-size: .8rem; }
@media (max-width: 700px) { .dropzone { padding: 1.1rem; } .camera-btn { width: 100%; text-align: center; font-size: 1rem; padding: .8rem; } }

.title-hints { margin-top: .3rem; font-size: .86rem; }
.chip { border-radius: 999px; font-size: .82rem; padding: .15rem .6rem; background: var(--green-soft); border-color: var(--green-line); color: var(--green-dark); }

/* Elchchor-Grafik */
.hero { display: flex; align-items: center; gap: 1.6rem; margin: .2rem 0 1.4rem; }
.hero-img { width: min(46%, 460px); height: auto; flex: 0 0 auto; }
.hero-text h1 { font-size: 1.75rem; margin-bottom: .4rem; }
.hero-text p { font-size: 1.02rem; max-width: 34rem; margin: 0; }
.share-img { display: block; width: min(70%, 360px); margin: 0 auto .8rem; }
.hero-img { filter: drop-shadow(0 2px 2px rgba(30,50,20,.08)); }
@media (max-width: 700px) {
  .hero { flex-direction: column; text-align: center; gap: .6rem; margin-bottom: 1rem; }
  .hero-img { width: min(88%, 380px); }
  .hero-text h1 { font-size: 1.35rem; }
  .brand-logo { height: 38px; }
}

/* Markenwelt-Motive */
.job { display: flex; gap: 1.2rem; align-items: flex-start; }
.job-img { width: 130px; flex: 0 0 auto; }
.job > div { flex: 1 1 auto; min-width: 0; }
.with-motif { position: relative; }
.motif-saenger { position: absolute; right: 1.2rem; top: .6rem; height: 120px; opacity: .9; }
.library .empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.2rem; }
.library .empty img { width: 140px; }
@media (max-width: 700px) {
  .job { flex-direction: column; }
  .job-img { width: 100px; }
  .motif-saenger { height: 70px; top: .4rem; right: .6rem; }
  .library .empty { flex-direction: column; text-align: center; }
}

.small { font-size: .78rem; }

/* Recherche */
.research { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid var(--green-line); border-radius: var(--radius); background: var(--green-soft); }
.research h3 { margin: 0 0 .3rem; font-size: 1rem; }
.research h4 { margin: .7rem 0 .3rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cand { padding: .35rem 0; border-top: 1px solid var(--green-line); }
.cand .badges { margin-top: .15rem; font-size: .78rem; }
.badges .ok { color: var(--ok); } .badges .warn { color: var(--warn); } .badges .bad { color: var(--danger); }
.seal { display: inline-block; font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: #dff0dc; color: var(--ok); vertical-align: middle; }

#arranger:empty::before { content: "Arrangeur eintragen"; color: var(--muted); opacity: .7; font-style: italic; }
#composer:empty::before { content: "Komponist eintragen"; color: var(--muted); opacity: .7; font-style: italic; }

.ai-box { margin: .6rem 0; padding: .6rem .9rem; border: 1px solid var(--green-line); border-radius: 8px; background: var(--green-soft); }
