/* Lernkompass – gemeinsames Erscheinungsbild (für das iPad optimiert) */

:root {
    /* Schulfarben: Blau als Akzent, Rot nur als Detail (Kompassnadel) */
    --lk-school-blue: #004A7B;
    --lk-school-red: #E52A31;

    --lk-accent: var(--lk-school-blue);
    --lk-accent-pressed: #003A61;
    --lk-accent-soft: #E3EDF5;
    --lk-bg: #F2F2F7;
    --lk-surface: #FFFFFF;
    --lk-label: #1C1C1E;
    --lk-secondary: #6C6C70;
    --lk-tertiary: #AEAEB2;
    --lk-separator: rgba(60, 60, 67, .14);
    --lk-radius: 14px;
    --lk-radius-lg: 20px;
    --lk-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .06);
    --lk-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;

    /* Rückmeldungsfarben */
    --lk-strike: #DC2626;
    --lk-repeat: #2563EB;
    --lk-ok: #16A34A;
    --lk-provisional: #4ADE80;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--lk-bg);
    color: var(--lk-label);
    font-family: var(--lk-font);
    font-size: 17px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--lk-accent); text-decoration: none; }

/* Kopfleiste */
.lk-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 6px max(20px, env(safe-area-inset-left));
    background: rgba(242, 242, 247, .82);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--lk-separator);
}

.lk-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--lk-label);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -.01em;
}

.lk-brand svg { width: 32px; height: 32px; }

.lk-nav-links {
    display: flex;
    gap: 4px;
    margin-left: 16px;
}

.lk-nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--lk-secondary);
    font-weight: 600;
    font-size: 16px;
}

.lk-nav-links a[aria-current="page"] {
    color: var(--lk-accent);
    background: var(--lk-accent-soft);
}

.lk-navbar-end {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.lk-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    font-weight: 500;
}

.lk-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lk-topline .lk-back { min-width: 0; }

.lk-jump {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
}

/* Material-Karte: Haken „Musterlösung“ statt Überschrift */
/* Gleiche Schrift wie die Überschrift „Aufgabenblatt“, nur mit Haken davor */
.material-column .material-toggle { min-height: 0; margin: 0; gap: 8px; color: var(--lk-secondary); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.material-card .material-column .material-toggle input[type="checkbox"] { width: 18px; height: 18px; }
.material-toggle[hidden], .solution-body[hidden], .material-none[hidden], .solution-plain-title[hidden] { display: none; }
.material-none { margin: 4px 0 0; color: var(--lk-secondary); font-size: 15px; }

/* Aufgabenformular: „Aktiv“ und Gewicht in einer Zeile */
.path-row-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.path-switch { display: flex; align-items: center; gap: 10px; }
.path-switch-label { font-weight: 600; }

/* Seitenaufbau */
.lk-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px max(20px, env(safe-area-inset-left)) 48px;
}

.lk-large-title {
    margin: 12px 0 4px;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.lk-subtitle {
    margin: 0 0 20px;
    color: var(--lk-secondary);
    font-size: 17px;
}

.lk-section-title {
    margin: 28px 4px 8px;
    color: var(--lk-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Schaltflächen */
.lk-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: var(--lk-accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.lk-button:active { transform: scale(.98); background: var(--lk-accent-pressed); }
.lk-button.is-large { min-height: 54px; padding: 0 28px; font-size: 18px; border-radius: 14px; }
.lk-button.is-secondary { background: var(--lk-accent-soft); color: var(--lk-accent); }
.lk-button.is-plain { background: transparent; color: var(--lk-accent); padding: 0 10px; }
.lk-button[aria-pressed="true"] { background: var(--lk-accent); color: #fff; }
.lk-button svg { width: 20px; height: 20px; }

.lk-icon-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--lk-accent-soft);
    color: var(--lk-accent);
    font-size: 24px;
    cursor: pointer;
}

/* Segment-Umschalter */
.lk-segmented {
    display: inline-flex;
    padding: 3px;
    border-radius: 11px;
    background: rgba(118, 118, 128, .12);
}

.lk-segmented button {
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--lk-label);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.lk-segmented .segment {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 9px;
    color: var(--lk-label);
    font-size: 15px;
    font-weight: 500;
}

/* Umschalter als Auswahl im Formular (Radio-Knöpfe): gleiche Optik wie die Modus-Umschalter */
.lk-segmented.is-choice .segment { padding: 0 14px; cursor: pointer; }
.lk-segmented.is-choice input { position: absolute; opacity: 0; pointer-events: none; }
.lk-segmented.is-choice .segment:has(input:focus-visible) { outline: 2px solid var(--lk-accent); outline-offset: 1px; }
.lk-segmented.is-choice .segment:has(input:checked),
.lk-segmented .segment[aria-selected="true"],
.lk-segmented button[aria-selected="true"] {
    background: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

/* Karten und gruppierte Listen */
.lk-card {
    padding: 20px;
    border-radius: var(--lk-radius-lg);
    background: var(--lk-surface);
    box-shadow: var(--lk-shadow);
}

.lk-list {
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    border-radius: var(--lk-radius);
    background: var(--lk-surface);
}

.lk-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 8px 16px;
    color: var(--lk-label);
}

.lk-row + .lk-row { box-shadow: inset 58px 1px 0 -57px var(--lk-separator); }
.lk-list > li + li .lk-row { border-top: 1px solid var(--lk-separator); }

.lk-row-icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #fff;
}

.lk-row-icon svg { width: 20px; height: 20px; }
.lk-row-text { flex: 1; min-width: 0; }
.lk-row-title { font-weight: 500; }
.lk-row-detail { color: var(--lk-secondary); font-size: 15px; }
.lk-chevron { color: var(--lk-tertiary); font-size: 22px; }

/* Statuskennzeichen */
.lk-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.lk-pill.is-ok { background: #DCFCE7; color: #166534; }
.lk-pill.is-provisional { background: #F0FDF4; color: #15803D; }
.lk-pill.is-repeat { background: #DBEAFE; color: #1D4ED8; }
.lk-pill.is-strike { background: #FEE2E2; color: #B91C1C; }
.lk-pill.is-gold { background: #FEF3C7; color: #92400E; }
.lk-pill.is-locked { background: #F2F2F7; color: var(--lk-secondary); }
.lk-pill.grade-platinum { background: #EDE9FE; color: #6D28D9; }
.lk-pill.grade-gold { background: #FEF3C7; color: #92400E; }
.lk-pill.grade-silver { background: #E5E7EB; color: #374151; }
.lk-pill.grade-bronze { background: #F3E3D3; color: #784421; }
.lk-pill.grade-failed { background: #F3F4F6; color: #374151; }
.lk-pill.has-strike { background: #FEE2E2; color: #B91C1C; }
.lk-pill.needs-repeat { background: #DBEAFE; color: #1D4ED8; }
.lk-pill.submission-confirmed { background: #DCFCE7; color: #166534; }

/* Blatt, das von unten hereinfährt */
.lk-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.lk-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 100;
    width: min(640px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 8px 24px calc(24px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: var(--lk-surface);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
    transform: translate(-50%, 105%);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}

.lk-sheet.is-open { transform: translate(-50%, 0); }
.lk-sheet.is-open + .lk-sheet-backdrop,
.lk-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.lk-sheet-grabber {
    width: 40px;
    height: 5px;
    margin: 4px auto 14px;
    border-radius: 3px;
    background: rgba(60, 60, 67, .25);
}

/* Schritte einer Aufgabe */
.lk-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.lk-step {
    padding: 12px;
    border-radius: 12px;
    background: var(--lk-bg);
    color: var(--lk-secondary);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.lk-step.is-done { background: #DCFCE7; color: #166534; }
.lk-step.is-current { background: var(--lk-accent-soft); color: var(--lk-accent); box-shadow: inset 0 0 0 2px var(--lk-accent); }

/* Lernlandkarte im Lernkompass-Rahmen */
.lk-map-frame {
    padding: 10px;
    border-radius: var(--lk-radius-lg);
    background: var(--lk-surface);
    box-shadow: var(--lk-shadow);
}

.lk-map-frame .map-canvas {
    border-radius: 14px;
    box-shadow: none;
}

.lk-strikes {
    color: var(--lk-strike);
    font-weight: 800;
    letter-spacing: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Kopfleiste: Nutzer */
.lk-user {
    max-width: 260px;
    overflow: hidden;
    color: var(--lk-secondary);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lk-navbar form { margin: 0; }

/* Meldungen */
.lk-messages { margin: 8px 0 16px; padding: 0; list-style: none; }

.lk-message {
    margin-bottom: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--lk-accent-soft);
    color: var(--lk-accent);
    font-weight: 500;
}

.lk-message.success { background: #DCFCE7; color: #166534; }
.lk-message.error { background: #FEE2E2; color: #991B1B; }
.lk-message.warning { background: #FEF3C7; color: #92400E; }

/* Kopf einer Seite mit Titel links und Aktionen rechts */
.lk-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.lk-page-header .lk-subtitle { margin-bottom: 0; }
.lk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Kachelraster */
.lk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.lk-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 120px;
    padding: 20px;
    border-radius: var(--lk-radius-lg);
    background: var(--lk-surface);
    box-shadow: var(--lk-shadow);
    color: var(--lk-label);
    transition: transform .15s, box-shadow .15s;
}

a.lk-tile:active { transform: scale(.985); }
.lk-tile-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.lk-tile-detail { color: var(--lk-secondary); font-size: 15px; }
.lk-tile-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }

.lk-tile-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
    border-radius: 12px;
    background: var(--lk-accent-soft);
    color: var(--lk-accent);
    font-size: 22px;
    font-weight: 700;
}

/* Leerer Zustand */
.lk-empty {
    padding: 40px 24px;
    border-radius: var(--lk-radius-lg);
    background: var(--lk-surface);
    color: var(--lk-secondary);
    text-align: center;
}

.lk-empty h2 { margin: 0 0 6px; color: var(--lk-label); font-size: 20px; }
.lk-empty p { margin: 0 0 16px; }

/* Korrigieren: neue Abgaben oben, Trennstrich zu den übrigen */
.submission-group { margin: 0 0 12px; font-size: 18px; }
.submission-group.is-rest { margin-top: 32px; padding-top: 20px; border-top: 2px solid var(--lk-separator); color: var(--lk-secondary); }

.review-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.review-tabs button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--lk-bg); color: var(--lk-accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.review-tabs button[aria-selected="true"] { background: var(--lk-accent); color: #fff; }
.review-file[hidden] { display: none; }
.review-file-open { display: block; padding: 4px 8px 0; color: var(--lk-accent); font-size: 13px; font-weight: 600; text-align: right; }

.upload-note { margin: 0 0 10px; color: var(--lk-strike); font-size: 15px; font-weight: 600; }
.upload-collector { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.upload-collector input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-collector label { cursor: pointer; }
.upload-collector label:has(input:focus-visible) { outline: 2px solid var(--lk-accent); outline-offset: 2px; }
.upload-camera { width: 100%; }
.upload-picker { padding: 4px; color: var(--lk-accent); font-size: 15px; font-weight: 600; text-align: center; }
.upload-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.upload-list[hidden] { display: none; }
.upload-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 10px; background: var(--lk-bg); overflow-wrap: anywhere; }
.upload-list button { flex-shrink: 0; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--lk-secondary); font: inherit; cursor: pointer; }

/* Lernlandkarten einer Input-Zeit zum Ankreuzen */
.slot-landscapes .lk-check { display: flex; align-items: center; gap: 8px; min-height: 36px; margin: 0; padding: 0; }
.slot-landscapes summary { margin-top: 8px; color: var(--lk-accent); font-weight: 600; cursor: pointer; }

/* Karte „Material“ einer Aufgabe */
.material-card h2 { margin: 0 0 12px; font-size: 20px; }
.material-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.material-column { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.material-column h3 { margin: 0; color: var(--lk-secondary); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.material-files { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.material-file { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--lk-bg); }
.material-kind { padding: 3px 7px; border-radius: 6px; background: var(--lk-accent-soft); color: var(--lk-accent); font-size: 11px; font-weight: 800; }
.material-name { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.material-links { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 2px 14px; align-items: center; }
.material-links a,
.material-links button { min-height: 32px; padding: 0; border: 0; background: none; color: var(--lk-accent); font: inherit; font-size: 15px; font-weight: 600; line-height: 32px; cursor: pointer; }
.material-links button.is-danger { margin-left: auto; color: var(--lk-strike); }
.material-empty { margin: 0; color: var(--lk-secondary); font-size: 15px; }
.material-add { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 2px dashed var(--lk-separator); border-radius: 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.material-add:hover { border-color: var(--lk-accent); background: var(--lk-accent-soft); }
.material-add:has(input:focus-visible) { border-color: var(--lk-accent); outline: 2px solid var(--lk-accent); outline-offset: 2px; }
.material-add input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.material-add-title { color: var(--lk-accent); font-weight: 700; }
.material-add-hint { color: var(--lk-secondary); font-size: 13px; }
.material-chosen { margin: 8px 0 0; padding: 0; color: var(--lk-label); font-size: 14px; font-weight: 600; list-style: none; overflow-wrap: anywhere; }

/* Fachfarben (logbook.subject_color). Schulfarben: Deutsch rot, Englisch grün, Mathe blau,
   Religion gelb, Gesellschaftslehre orange, Musik schwarz */
.subject-red { --subject: #E52A31; --subject-soft: #FDEDEE; }
.subject-green { --subject: #16A34A; --subject-soft: #EDFBF1; }
.subject-blue { --subject: #2563EB; --subject-soft: #EFF4FF; }
.subject-yellow { --subject: #EAB308; --subject-soft: #FEF9E3; }
.subject-orange { --subject: #EA580C; --subject-soft: #FFF3EB; }
.subject-black { --subject: #1C1C1E; --subject-soft: #EDEDEF; }
.subject-purple { --subject: #9333EA; --subject-soft: #F6EEFF; }
.subject-pink { --subject: #DB2777; --subject-soft: #FDEEF6; }
.subject-teal { --subject: #0891B2; --subject-soft: #EAF8FB; }
.subject-brown { --subject: #92400E; --subject-soft: #F7EEE6; }

/* Startseite der Schüler */
@property --ring { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes dash-ring-fill { from { --ring: 0; } }
@keyframes dash-dot-pop { 0% { transform: scale(.3); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes dash-hero-in { from { opacity: 0; transform: translateY(8px); } }

.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-head .lk-large-title { margin: 0; }
/* Serien-Ring oben rechts */
.dash-meters { display: flex; flex-shrink: 0; align-items: flex-end; gap: 18px; }
.dash-meter { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dash-meter-label { color: var(--lk-secondary); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Zeiger rechts neben „Dein nächster Schritt“: Viertelkreis von 12 bis 3 Uhr, ohne Skala und Beschriftung */
.dash-step-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: stretch; }
.dash-gauge-card { display: grid; place-items: center; width: 190px; padding: 14px; border-radius: var(--lk-radius-lg); background: var(--lk-surface); box-shadow: var(--lk-shadow); }
.dash-gauge { display: block; width: 100%; max-width: 160px; height: auto; overflow: visible; }
.dash-zone { fill: none; stroke-width: 14; opacity: .3; }
.dash-zone.is-active { opacity: 1; }
.dash-zone.is-low { stroke: #E9A79F; stroke-dasharray: 32.3 200; }
.dash-zone.is-medium { stroke: #F5B342; stroke-dasharray: 31.4 200; stroke-dashoffset: -34.3; }
.dash-zone.is-good { stroke: var(--lk-ok); stroke-dasharray: 32.3 200; stroke-dashoffset: -67.7; }
.dash-needle { stroke: var(--lk-label); stroke-width: 5; stroke-linecap: round; transform-box: view-box; transform-origin: 20px 110px; transform: rotate(var(--angle)); animation: dash-needle-in .9s ease-out; }
.dash-hub { fill: var(--lk-label); }
@keyframes dash-needle-in { from { transform: rotate(90deg); } }
.dash-streak-ring { position: relative; display: block; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(#F59E0B calc(var(--percent) * 1%), #FEF3C7 0); }
.dash-streak-ring > span { position: absolute; inset: 6px; display: grid; grid-auto-flow: column; place-content: center; align-items: center; gap: 1px; border-radius: 50%; background: var(--lk-surface); color: #92400E; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-streak-ring small { font-size: 12px; }
.dash-streak-ring.is-empty > span { color: var(--lk-tertiary); }

.dash-hero { position: relative; display: flex; flex-direction: column; gap: 14px; overflow: hidden; padding: 22px 24px; border-left: 8px solid var(--subject, #fff); border-radius: var(--lk-radius-lg); background: linear-gradient(135deg, #004A7B, #0B6FAB); box-shadow: 0 10px 28px rgba(0, 74, 123, .3); color: #fff; animation: dash-hero-in .4s ease-out; transition: transform .15s; }
a.dash-hero:active { transform: scale(.985); }
.dash-hero.is-finished { border-left-color: var(--lk-ok); }
.dash-hero-compass { position: absolute; top: -28px; right: -28px; width: 190px; height: 190px; opacity: .12; pointer-events: none; }
.dash-hero-label { font-size: 13px; font-weight: 700; letter-spacing: .06em; opacity: .85; text-transform: uppercase; }
.dash-hero-main { display: flex; align-items: center; gap: 16px; }
.dash-hero-icon { display: grid; flex-shrink: 0; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: rgba(255, 255, 255, .18); }
.dash-hero-icon svg { width: 36px; height: 36px; }
.dash-hero-text { display: flex; flex-direction: column; min-width: 0; }
.dash-hero-title { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.dash-hero-detail { margin-top: 2px; font-size: 16px; opacity: .9; }
.dash-hero-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.dash-hero-reason { font-size: 15px; opacity: .9; }
.dash-hero-button { padding: 12px 24px; border-radius: 999px; background: #fff; color: #004A7B; font-size: 17px; font-weight: 800; }

.dash-section { margin-top: 28px; }
.dash-today-icon { background: var(--lk-accent); font-size: 17px; }
.dash-today-icon.is-done { background: var(--lk-ok); }

.dash-subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.dash-subject { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 12px 16px; border-top: 5px solid var(--subject); border-radius: var(--lk-radius-lg); background: var(--lk-surface); box-shadow: var(--lk-shadow); color: var(--lk-label); text-align: center; transition: transform .15s; }
.dash-subject:active { transform: scale(.97); }
/* Kartenbild der Lernlandkarte ganz leicht im Hintergrund */
.dash-subject { position: relative; overflow: hidden; isolation: isolate; }
.dash-subject::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--map, none) center / cover no-repeat; opacity: .14; pointer-events: none; }
.dash-ring { --ring: var(--percent); position: relative; display: block; width: 88px; height: 88px; margin-bottom: 8px; border-radius: 50%; background: conic-gradient(var(--subject) calc(var(--ring) * 1%), var(--subject-soft) 0); animation: dash-ring-fill 1s ease-out; }
.dash-ring > span { position: absolute; inset: 10px; display: grid; grid-auto-flow: column; place-content: center; align-items: baseline; border-radius: 50%; background: var(--lk-surface); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-ring small { font-size: 12px; font-weight: 700; }
.dash-subject-name { font-size: 17px; font-weight: 700; }
.dash-subject-detail { color: var(--lk-secondary); font-size: 14px; }
.dash-subject-week { margin-top: 4px; color: #15803D; font-size: 13px; font-weight: 700; }

.dash-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dash-day { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border-radius: 12px; }
.dash-day.is-today { background: var(--lk-accent-soft); }
.dash-day.is-quiet { opacity: .45; }
.dash-day-name { color: var(--lk-secondary); font-size: 14px; font-weight: 700; }
.dash-day.is-today .dash-day-name { color: var(--lk-accent); }
.dash-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.dash-dots i { display: block; width: 10px; height: 10px; margin: 8px; border-radius: 50%; background: #E5E5EA; }
.dash-token { display: grid; flex-shrink: 0; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 800; line-height: 1; }
a.dash-token { animation: dash-dot-pop .35s ease-out both; }
.dash-token.is-provisional { background: #BBF7D0; color: #15803D; }
.dash-token.submission-confirmed { background: #15803D; }
.dash-token.grade-platinum { background: linear-gradient(135deg, #A78BFA, #6D28D9); }
.dash-token.grade-gold { background: linear-gradient(135deg, #FCD34D, #B45309); }
.dash-token.grade-silver { background: linear-gradient(135deg, #D1D5DB, #6B7280); }
.dash-token.grade-bronze { background: linear-gradient(135deg, #D6A06B, #784421); }
.dash-token.grade-failed { background: #6B7280; }
.dash-token.has-strike { background: #DC2626; }
.dash-week-message { margin: 14px 0 0; font-weight: 600; text-align: center; }
.dash-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 12px 0 0; padding: 0; color: var(--lk-secondary); font-size: 13px; list-style: none; }
.dash-legend li { display: flex; align-items: center; gap: 4px; }
.dash-legend .dash-token { width: 20px; height: 20px; font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
    .dash-hero, .dash-ring, a.dash-token, .dash-needle { animation: none; }
}

/* Entwicklungsziele (Meine Ziele und Lehrkraft-Seite) */
.dev-goals { margin-top: 24px; }
.dev-goals > .muted { margin: 0 0 14px; color: var(--lk-secondary); }
.dev-goal { margin-top: 14px; scroll-margin-top: 16px; }
.dev-goal.is-closed { opacity: .75; }
.dev-goal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.dev-goal-head h3 { margin: 0; font-size: 18px; }
.dev-goal-meta { margin: 4px 0 0; color: var(--lk-secondary); font-size: 14px; }
.dev-goal-description { margin: 10px 0 0; white-space: pre-line; }
.dev-comments { margin: 12px 0 0; padding: 0; list-style: none; }
.dev-comments li { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--lk-bg); }
.dev-comments li.from-student { background: var(--lk-accent-soft); }
.dev-comment-meta { color: var(--lk-secondary); font-size: 13px; font-weight: 600; }
.dev-comment-text { margin: 2px 0 0; white-space: pre-line; }
.dev-goal textarea,
.dev-goal-new textarea,
.dev-goal-new input[type="text"] { width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--lk-separator); border-radius: 10px; font: inherit; }
.dev-goal textarea,
.dev-goal-new textarea { min-height: 64px; resize: vertical; }
.dev-goal .lk-button,
.dev-goal-new .lk-button { margin-top: 8px; }
.dev-goal-new h2 { margin: 0; font-size: 20px; }
.dev-goal-new summary { color: var(--lk-accent); font-weight: 600; cursor: pointer; }

/* Formulare */
.lk-form {
    max-width: 720px;
}

.lk-form .lk-card + .lk-card { margin-top: 16px; }
.lk-form h2 { margin: 0 0 12px; font-size: 20px; }

.lk-field { margin-bottom: 18px; }
.lk-field:last-child { margin-bottom: 0; }

.lk-field > label,
.lk-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

.lk-field .helptext,
.lk-help {
    display: block;
    margin-top: 6px;
    color: var(--lk-secondary);
    font-size: 14px;
}

.lk-field input[type="text"],
.lk-field input[type="number"],
.lk-field input[type="email"],
.lk-field input[type="url"],
.lk-field input[type="search"],
.lk-field input[type="time"],
.lk-field input:not([type]),
.lk-field select,
.lk-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid rgba(60, 60, 67, .22);
    border-radius: 12px;
    background: #fff;
    color: var(--lk-label);
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.lk-field select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C6C70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 18px;
}

.lk-field textarea { min-height: 120px; resize: vertical; }

.lk-field input:focus,
.lk-field select:focus,
.lk-field textarea:focus {
    outline: none;
    border-color: var(--lk-accent);
    box-shadow: 0 0 0 4px rgba(0, 74, 123, .15);
}

.lk-field input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1.5px dashed rgba(60, 60, 67, .3);
    border-radius: 12px;
    background: var(--lk-bg);
    font: inherit;
    font-size: 15px;
}

/* Kontrollkästchen als Liste mit großen Tippflächen */
.lk-field ul { margin: 0; padding: 0; list-style: none; }

.lk-field ul label,
.lk-field div > div > label,
.lk-check {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 4px;
    font-weight: 500;
    cursor: pointer;
}

.lk-field input[type="checkbox"],
.lk-check input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: var(--lk-accent);
}

.lk-field .errorlist {
    margin: 6px 0 0;
    padding: 0;
    color: #B91C1C;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
}

/* Merkbox und Wissensschatz */
.merkbox {
    border-left: 5px solid #E0A82E;
    background: linear-gradient(160deg, #FFFBF0, #fff 60%);
}

.merkbox h2 { display: flex; align-items: center; gap: 8px; }
.merkbox ul { margin: 0; padding-left: 20px; }
.merkbox li { padding: 3px 0; overflow-wrap: anywhere; }

.treasure {
    margin-top: 28px;
    padding: 20px 22px;
    border-radius: var(--lk-radius-lg);
    background: linear-gradient(160deg, #FFF8E6, #fff 55%);
    box-shadow: var(--lk-shadow);
}

.treasure-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.treasure-head h2 { margin: 0; font-size: 22px; }
.treasure-head p { margin: 2px 0 0; color: var(--lk-secondary); font-size: 15px; }

.treasure-icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(150deg, #F2B544, #C98A12);
    color: #fff;
}

.treasure-icon svg { width: 28px; height: 28px; }

.treasure-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.treasure-group { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .85); border: 1px solid rgba(201, 138, 18, .18); }
.treasure-group h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 15px; }
.treasure-group ul { margin: 0; padding-left: 18px; font-size: 15px; }
.treasure-group li { padding: 2px 0; overflow-wrap: anywhere; }
.treasure-group.is-collected { border-color: rgba(22, 163, 74, .35); }
.treasure-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #16A34A; color: #fff; font-size: 12px; }

/* Termine */
.appointments { margin-top: 32px; }
.appointments-empty { color: var(--lk-secondary); }

.appointment-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--lk-accent-soft);
    color: var(--lk-accent);
    line-height: 1.1;
}

.appointment-day { font-size: 13px; font-weight: 700; text-transform: uppercase; }
.appointment-number { font-size: 15px; font-weight: 700; }

/* Klassenauswahl mit aufklappbaren weiteren Klassen */
.class-choices { margin-bottom: 8px; background: var(--lk-bg); }
.class-choices:not(:has(li)) { display: none; }
.class-choices .lk-check { padding: 0 14px; }
.class-choices li + li .lk-check { border-top: 1px solid var(--lk-separator); }

.more-classes summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--lk-accent);
    font-weight: 600;
    cursor: pointer;
}

.lk-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.lk-button.is-danger { background: #FEE2E2; color: #B91C1C; }
.lk-button.is-danger-solid { background: #DC2626; color: #fff; }

/* Startseite */
.lk-welcome {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 60px);
    padding: 32px 0 48px;
    text-align: center;
}

.lk-welcome-logo {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    margin: 0 auto 20px;
    border-radius: 26px;
    background: linear-gradient(160deg, #ffffff, #EAF1F7);
    box-shadow: var(--lk-shadow), inset 0 0 0 1px var(--lk-separator);
}

.lk-welcome-logo svg {
    width: 88px;
    height: 88px;
    filter: drop-shadow(0 3px 6px rgba(0, 58, 97, .3));
}

.lk-welcome h1 { margin: 0; font-size: 44px; font-weight: 700; letter-spacing: -.025em; }
.lk-tagline { margin: 6px 0 32px; color: var(--lk-secondary); font-size: 21px; }
.lk-hint { margin-top: 14px; color: var(--lk-secondary); font-size: 15px; }

.lk-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 56px auto 0;
    text-align: left;
}

.lk-benefits h3 { margin: 12px 0 4px; font-size: 17px; }
.lk-benefits p { margin: 0; color: var(--lk-secondary); font-size: 15px; }

.lk-benefit-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--lk-accent-soft);
    color: var(--lk-accent);
}

.lk-benefit-icon svg { width: 24px; height: 24px; }

.lk-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 760px) {
    .lk-benefits, .lk-two-columns { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .lk-large-title { font-size: 28px; }
    .lk-nav-links { display: none; }
    .lk-steps { grid-template-columns: 1fr; }
    .lk-user { display: none; }
}
