@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk/SpaceGrotesk-Light.woff2') format('woff2'),
         url('fonts/SpaceGrotesk/SpaceGrotesk-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk/SpaceGrotesk-Regular.woff2') format('woff2'),
         url('fonts/SpaceGrotesk/SpaceGrotesk-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk/SpaceGrotesk-Medium.woff2') format('woff2'),
         url('fonts/SpaceGrotesk/SpaceGrotesk-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk/SpaceGrotesk-SemiBold.woff2') format('woff2'),
         url('fonts/SpaceGrotesk/SpaceGrotesk-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('fonts/SpaceGrotesk/SpaceGrotesk-Bold.woff2') format('woff2'),
         url('fonts/SpaceGrotesk/SpaceGrotesk-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #05060a;
    --card: rgba(16, 18, 27, 0.85);
    --glass: rgba(255, 255, 255, 0.05);
    --primary: #2ee2a6;
    --primary-strong: #12b07e;
    --text: #f9fbff;
    --muted: rgba(249, 251, 255, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --success: #2ee2a6;
    --error: #ff7c7c;
    --info: #7cd2ff;
    font-size: 16px;
}

body.theme-light {
    --bg: #f6f7fb;
    --card: rgba(255, 255, 255, 0.96);
    --glass: rgba(255, 255, 255, 0.75);
    --primary: #1fc589;
    --primary-strong: #129c6c;
    --text: #0d0f17;
    --muted: rgba(13, 15, 23, 0.65);
    --border: rgba(13, 15, 23, 0.08);
    --success: #1fc589;
    --error: #d64545;
    --info: #3457c5;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    padding-bottom: 4rem;
}

body.profile-panel-open {
    overflow: hidden;
}

input,
textarea,
select {
    font-size: 1rem;
}

.auth-gate {
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.8rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stacked-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.stacked-form input {
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--glass);
    padding: 0.65rem 0.9rem;
    color: var(--text);
}

.auth-card small {
    color: var(--muted);
}

.background-grid {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(46, 226, 166, 0.18), transparent 45%), radial-gradient(circle at center, rgba(18, 176, 126, 0.16), transparent 40%), linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent);
    pointer-events: none;
    z-index: -1;
}

body.theme-light .background-grid {
    background: radial-gradient(circle at top, rgba(31, 197, 137, 0.24), transparent 45%), radial-gradient(circle at center, rgba(18, 156, 108, 0.2), transparent 40%), linear-gradient(135deg, rgba(0, 0, 0, 0.02), transparent);
}

body.theme-dark .background-grid {
    background: radial-gradient(circle at 30% 20%, rgba(13, 189, 122, 0.06), transparent 40%), radial-gradient(circle at 70% 70%, rgba(12, 160, 110, 0.05), transparent 45%), linear-gradient(135deg, rgba(255, 255, 255, 0.01), transparent);
}

.hero {
    padding: 2.5rem clamp(1.5rem, 4vw, 5rem) 3rem;
}

.hero__top {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid transparent;
}

nav a.active {
    color: var(--text);
    border-color: var(--primary);
}

.auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.inline-form input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    color: var(--text);
}

.inline-form button,
button,
.ghost,
.primary,
.ghost-btn,
a.primary,
a.ghost {
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.3rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    background: var(--primary);
    transition: transform 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ghost,
.ghost-btn,
a.ghost {
    background: transparent;
    border: 1px solid var(--border);
}

.ghost.danger {
    border-color: rgba(255, 124, 124, 0.4);
    color: var(--error);
}

.primary:hover,
button:hover {
    transform: translateY(-1px);
    background: linear-gradient(90deg, var(--primary), var(--primary-strong));
}

.hero__content {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: center;
}

.hero__content--editor {
    align-items: flex-start;
}

.hero__intro {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.hero__editor {
    padding: 2rem;
}

.hero__editor form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.hero__editor label {
    font-size: 0.9rem;
}

.tagline {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: var(--muted);
    font-size: 0.8rem;
}

.hero__content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 1rem 0;
}

.hero__content h1 span {
    color: var(--primary);
}

.lead {
    color: var(--muted);
    max-width: 35rem;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.hero__actions--sub {
    margin-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.search-bar {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}
.search-bar input[type="search"] {
    width: min(520px, 100%);
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

.hero__data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.stat {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.2rem;
    border-radius: 1.2rem;
    text-align: center;
}

.stat h3 {
    font-size: 2rem;
    margin: 0;
}

.stat--wide {
    grid-column: span 2;
}
.stat__meta {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
}
.stat--image {
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 0;
    overflow: hidden;
    min-height: 180px;
    border: none;
}
.stat--image .stat__overlay {
    position: relative;
    z-index: 1;
    padding: 1.2rem;
    background: linear-gradient(90deg, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    gap: 0.35rem;
}
.stat--image h3,
.stat--image p,
.stat--image .stat__meta {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.stat--image button {
    margin-top: 0.25rem;
    background: #fff;
    color: #0d0f17;
    border: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}
.stat--image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
}

.recipe-filter-row {
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section {
    padding: 1rem clamp(1.5rem, 4vw, 5rem);
    margin-bottom: 2rem;
}

.section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    color: var(--muted);
}

.course-grid,
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.download-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem;
    background: var(--card);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.download-card__icon {
    font-size: 1.6rem;
}
.download-card__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.download-card__name {
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.download-card__info {
    color: var(--muted);
    font-size: 0.9rem;
}
.download-card__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.download-card__actions .ghost,
.download-card__actions .primary {
    padding: 0.35rem 0.7rem;
}
.download-card--folder {
    cursor: pointer;
}
.download-card--folder:hover {
    border-color: var(--primary);
}
.downloads-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.downloads-toolbar {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}
.downloads-toolbar input[type="search"] {
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.06);
    color: var(--text);
}
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}
.breadcrumb-current {
    font-weight: 700;
}
.breadcrumb-sep {
    color: var(--muted);
}
.downloads-upload {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.downloads-upload .upload-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.downloads-upload .upload-btn input[type="file"] {
    display: none;
}
.downloads-upload button {
    padding: 0.45rem 0.8rem;
}

.course-card--hidden {
    display: none;
}

.course-grid__actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.course-grid__actions .load-more-courses {
    min-width: 220px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 1.4rem;
    border: 1px solid transparent;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent);
    z-index: 0;
}

.card > * {
    position: relative;
    z-index: 1;
}

.course-card .badge {
    display: inline-flex;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
}

.course-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.step-pill {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 0.2rem 0.8rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.status {
    border-radius: 999px;
    padding: 0.25rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status--done {
    background: rgba(65, 255, 161, 0.15);
    color: var(--success);
}

.status--open {
    background: rgba(177, 107, 255, 0.15);
    color: var(--primary);
}

.status--locked {
    background: rgba(255, 124, 124, 0.15);
    color: var(--error);
}

.course-card h3 {
    margin: 0 0 0.8rem;
}

.course-card p {
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--muted);
    gap: 0.6rem;
}

.course-card__body h4 {
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.course-card__body p {
    color: var(--muted);
}

.resource-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.pill {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 0.35rem 0.9rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
}

.course-actions {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.locked-note,
.done-label {
    color: var(--muted);
    font-size: 0.85rem;
}

.course-card--locked {
    position: relative;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(5, 6, 10, 0.92), rgba(5, 6, 10, 0.82));
    backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem;
    color: #f5f6f9;
    z-index: 3;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.lock-overlay::before {
    content: '🔒';
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}

.lock-overlay__inner {
    max-width: 80%;
}

.lock-overlay__title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 0.35rem;
    opacity: 0.9;
}

.lock-overlay__inner p {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

body.theme-light .lock-overlay {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(240, 243, 246, 0.92));
    color: #0d0f17;
    border: 1px solid rgba(13, 15, 23, 0.06);
    backdrop-filter: blur(8px);
}

body.theme-light .lock-overlay::before {
    color: rgba(13, 15, 23, 0.7);
}

.course-card--locked > *:not(.lock-overlay) {
    opacity: 0.28;
}

.course-media {
    border-radius: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 140px;
    background-size: cover;
    background-position: center;
    margin: 0.8rem 0;
}

/* Recipes */
.recipe-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.recipe-grid__actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.recipe-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.recipe-card__meta .muted {
    display: inline-block;
    max-width: 60%;
}

.recipe-card__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.recipe-card__image {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    border-radius: 1rem;
    border: none;
    margin-bottom: 0.5rem;
}

.recipe-filter.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-strong));
    color: var(--text);
    border-color: transparent;
}
.meal-filter.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-strong));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
    outline: 2px solid rgba(255,255,255,0.16);
    outline-offset: 1px;
}
.meal-filter {
    border: 1px solid var(--border);
    border-radius: 999px;
}
.recipe-daily {
    background: radial-gradient(circle at 10% 10%, rgba(89, 214, 170, 0.18), transparent 55%), var(--card);
    border: 1px solid var(--border);
}

.recipe-card--hidden {
    display: none;
}
.recipe-card--hidden-initial {
    display: none;
}

.recipe-viewer__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.recipe-viewer__frame {
    margin-top: 1rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
}
.recipe-viewer__image {
    width: 100%;
    height: 320px;
    background-size: cover;
    background-position: center;
    border-radius: 1.2rem;
    border: 1px solid var(--border);
    margin-top: 1rem;
}
.recipe-detail__body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.recipe-detail h4 {
    margin-bottom: 0.5rem;
}
.recipe-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.5;
}

/* Recipe modal */
.recipe-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 120;
    display: none;
}
.recipe-modal-overlay.is-visible {
    display: block;
}
.recipe-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 900px;
    width: 92vw;
    max-height: 90vh;
    overflow: auto;
    z-index: 130;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 1.25rem;
}
.recipe-modal.is-open {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}
.recipe-modal__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    position: relative;
}
.recipe-modal__head .hero__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-left: 0;
    padding-right: 0;
    width: 100%;
    justify-content: flex-start;
}
.recipe-modal__close {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}
.recipe-modal__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 240px;
    max-height: 440px;
    background-size: cover;
    background-position: center center;
    border-radius: 1rem;
    border: 1px solid var(--border);
    margin: 0.85rem 0 1rem;
    box-shadow: 0 16px 42px rgba(0,0,0,0.28);
}
.recipe-modal__body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 0.5rem;
}
.recipe-modal__actions-inline {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0 0.25rem;
    justify-content: flex-start;
}
.recipe-modal__tags {
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.recipe-modal__meta {
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.recipe-card__actions .ghost.full {
    flex: 1;
    text-align: center;
}

@media (max-width: 700px) {
    .recipe-modal {
        width: 96vw;
        max-height: 90vh;
        padding: 1rem;
    }
    .recipe-modal__head {
        flex-direction: column;
        gap: 0.5rem;
    }
    .recipe-modal__head .hero__actions {
        width: 100%;
        justify-content: flex-start;
        padding-right: 0;
    }
    .recipe-modal__close {
        top: 10px;
        right: 10px;
        transform: none;
        position: absolute;
    }
    [data-recipe-share] {
        width: auto;
    }
}

/* Contacts */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.contact-grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.contact-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    align-items: center;
}

.contact-card__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.contact-card__actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.contact-card__status {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.2rem 0 0.4rem;
}

/* Flash overlay */
.flash-overlay {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    pointer-events: none;
    width: min(480px, 90vw);
}
.flash-toast {
    pointer-events: auto;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: #0c120f;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.flash-toast--success {
    background: #a7f3d0;
}
.flash-toast--error {
    background: #fecdd3;
}
.flash-toast--info {
    background: #dbeafe;
}

.bell-button {
    position: relative;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge--pill {
    background: var(--primary);
    color: var(--text);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.contact-actions-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.contact-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.4rem;
    padding: 1.5rem;
    width: min(480px, 92vw);
    max-height: 80vh;
    overflow: auto;
    z-index: 110;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.contact-modal.is-open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.contact-modal__title {
    margin: 0 0 0.3rem;
}

.contact-modal__meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.contact-modal__message {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.contact-modal__actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-modal__actions-left,
.contact-modal__actions-right {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.contact-modal__step {
    font-size: 0.85rem;
    margin-left: 0.4rem;
    color: var(--muted);
}

.contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.contact-overlay.is-visible {
    opacity: 1;
    pointer-events: all;
}

/* Contacts page */
.contacts-page .hero--contacts {
    padding-bottom: 2.5rem;
}
.contacts-layout {
    padding: 1rem 1.25rem 3rem;
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.contact-form-card {
    max-width: 900px;
    margin: 0 auto;
}
.hero__content--split {
    display: grid;
    grid-template-columns: minmax(320px, 1.2fr) minmax(340px, 0.8fr);
    gap: 2rem;
    align-items: start;
}
.hero__content--split .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.contacts-page .hero {
    padding: 2.5rem clamp(1.5rem, 4vw, 5rem) 3rem;
}
.contacts-page .hero h1 {
    font-size: clamp(2.4rem, 4.5vw, 3.4rem);
    line-height: 1.12;
}
.contacts-page .hero .lead {
    font-size: clamp(1.05rem, 2vw + 0.2rem, 1.25rem);
    line-height: 1.55;
}
.hero__data--contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    justify-self: end;
    max-width: 480px;
}
.contacts-page .stat {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.contacts-page .stat h3 {
    font-size: 2.2rem;
    margin: 0 0 0.25rem;
}
.contacts-page .stat p {
    margin: 0;
}
.prompt-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.prompt-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.prompt-row:last-child {
    border-bottom: none;
}
.prompt-day {
    font-weight: 700;
    color: var(--text-strong);
}
.prompt-text {
    color: var(--text-muted);
    line-height: 1.4;
}

@media (max-width: 900px) {
    .hero__content--split {
        grid-template-columns: 1fr;
    }
    .hero__data--contacts {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        max-width: none;
        justify-self: start;
    }
    .prompt-row {
        grid-template-columns: 1fr;
    }
    .contacts-layout {
        padding: 1rem 1rem 2rem;
    }
    .contact-grid--wide {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    .contact-card__actions {
        flex-direction: column;
    }
    .contact-card__actions button,
    .contact-card__actions .ghost,
    .contact-card__actions .primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .contacts-page .hero {
        padding: 1.25rem 0.9rem 1rem;
    }
    .contacts-page .hero .hero__actions a,
    .contacts-page .hero .hero__actions button {
        width: 100%;
        justify-content: center;
    }
    .hero__data--contacts {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    .contacts-page .hero h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    .contacts-page .hero .lead {
        font-size: 0.95rem;
    }
    .contacts-page .hero .tagline {
        font-size: 0.8rem;
        letter-spacing: 0.1rem;
    }
    .contacts-page .hero__content {
        gap: 0.75rem;
    }
    .contact-grid--wide {
        gap: 0.75rem;
    }
    .contacts-layout {
        padding: 0.75rem 0.9rem 1.5rem;
    }
}

.contact-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .contact-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 80vh;
        transform: translateY(100%);
        border-radius: 1.5rem 1.5rem 0 0;
        padding: 1.25rem 1.25rem 1.75rem;
    }

    .contact-modal.is-open {
        transform: translateY(0);
    }

    .contact-modal__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.course-progress-mini {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.75rem;
}

.course-library-countdown {
    padding: 0 clamp(1.5rem, 4vw, 5rem);
    margin: 1rem 0;
}

.course-library {
    padding: 2rem clamp(1.5rem, 4vw, 5rem) 3rem;
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 2rem;
}

.course-library__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.course-sidebar__head h2 {
    margin: 0.3rem 0 0.6rem;
}

.course-nav-window {
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.course-nav-window .course-nav-list {
    overflow-y: auto;
    height: 100%;
    padding-right: 0.4rem;
    scroll-behavior: smooth;
}

.course-nav-window .course-nav-list::-webkit-scrollbar {
    width: 6px;
}

.course-nav-window .course-nav-list::-webkit-scrollbar-track {
    background: transparent;
}

.course-nav-window .course-nav-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

.course-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.course-nav-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.3rem 1.5rem;
    flex: 0 0 auto;
    border-radius: 1.4rem;
    background: linear-gradient(180deg, rgba(21, 23, 33, 0.95), rgba(12, 13, 21, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
    box-shadow: none;
}

body.theme-light .course-nav-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(13, 15, 23, 0.08);
    color: #0d0f17;
}

.course-nav-card--current {
    border-color: var(--primary);
    box-shadow: inset 0 0 20px rgba(177, 107, 255, 0.25);
    background: linear-gradient(180deg, rgba(58, 31, 94, 0.95), rgba(17, 8, 28, 0.95));
}

body.theme-light .course-nav-card--current {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 233, 250, 0.98));
    box-shadow: inset 0 0 25px rgba(111, 81, 255, 0.18);
}

.course-nav-card:hover {
    transform: translateY(-4px);
}

.course-nav-card--locked {
    opacity: 0.78;
}

.course-nav-card--locked::after {
    content: '🔒';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1rem;
    opacity: 0.6;
}

body.theme-light .course-nav-card--locked {
    opacity: 0.85;
}

body.theme-light .course-nav-card--locked::after {
    color: rgba(13, 15, 23, 0.7);
}

.course-nav-card h4 {
    margin: 0;
}

.course-nav-card p {
    margin: 0;
    color: var(--muted);
}

body.theme-light .course-nav-card p {
    color: rgba(13, 15, 23, 0.65);
}

.nav-step {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--muted);
}

body.theme-light .nav-step {
    color: rgba(13, 15, 23, 0.5);
}

.status-pill,
.status-pill.status--done,
.status-pill.status--open,
.status-pill.status--locked {
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.status-pill.status--done {
    background: rgba(65, 255, 161, 0.15);
    color: var(--success);
}

.status-pill.status--open {
    background: rgba(177, 107, 255, 0.15);
    color: var(--primary);
}

.status-pill.status--locked {
    background: rgba(255, 124, 124, 0.15);
    color: var(--error);
}

.course-library__content {
    min-height: 400px;
}

.course-detail__header h2 {
    margin: 0.2rem 0 0.4rem;
}

.course-detail__meta {
    margin: 1.2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.course-detail__meta span {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.course-detail__meta strong {
    font-size: 1.1rem;
}

.module-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}

.module-card {
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.module-step {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.resource-list--detail .pill {
    border-color: rgba(255, 255, 255, 0.3);
}

.course-detail__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
    align-items: center;
}

.resource-track {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-step {
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.resource-step--done {
    border-color: rgba(65, 255, 161, 0.4);
    background: rgba(65, 255, 161, 0.05);
}

.resource-step__title {
    margin: 0;
    font-weight: 600;
}

.resource-step__actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 180px;
}

.embed-video {
    position: relative;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    margin: 0.5rem 0 0.25rem;
    background: #000;
}
.embed-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.resource-step__actions form {
    margin: 0;
}

.course-admin-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.course-admin-item {
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.course-admin-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.course-admin-meta span {
    color: var(--muted);
    font-size: 0.85rem;
}

.course-admin-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.edit-section {
    padding: 2rem clamp(1.5rem, 4vw, 5rem) 3rem;
    scroll-margin-top: 4rem;
}

.intranet__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.news-item,
.event-item {
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
}

.news-date,
.event-date {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.location {
    display: inline-flex;
    margin-top: 0.2rem;
    color: var(--primary);
    font-size: 0.85rem;
}

.download-card {
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s ease;
}

.download-card span {
    color: var(--primary);
    font-weight: 600;
}

.download-card:hover {
    transform: translateY(-4px);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.form-card label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--muted);
}

.form-card input,
.form-card textarea {
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--glass);
    padding: 0.65rem 0.9rem;
    color: var(--text);
    font-family: inherit;
    resize: vertical;
}

.form-card small {
    color: var(--muted);
    display: block;
    margin-bottom: 0.8rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.recipe-viewer__frame object {
    width: 100%;
    min-height: 420px;
}

.alert {
    margin: 0 2rem 1rem;
    padding: 1rem 1.5rem;
    border-radius: 1.2rem;
    border: 1px solid var(--border);
}

.alert--first {
    margin-top: 1.5rem;
}

.alert--success {
    border-color: rgba(65, 255, 161, 0.3);
    background: rgba(65, 255, 161, 0.1);
}

.alert--error {
    border-color: rgba(255, 124, 124, 0.3);
    background: rgba(255, 124, 124, 0.1);
}

.alert--info {
    border-color: rgba(124, 210, 255, 0.3);
    background: rgba(124, 210, 255, 0.1);
}

.pwa-install-banner {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    background: rgba(14, 16, 24, 0.95);
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: min(520px, calc(100% - 2rem));
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    z-index: 50;
}

.pwa-install-banner__content {
    flex: 1 1 260px;
}

.pwa-install-banner__eyebrow {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--muted);
    margin: 0 0 0.3rem;
}

.pwa-install-banner__text {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.pwa-install-banner__actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.pwa-install-banner__actions .ghost {
    border: 1px solid var(--border);
}

.profile-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100vh;
    background: linear-gradient(180deg, rgba(12, 14, 22, 0.95), rgba(12, 14, 22, 0.85));
    border-left: 1px solid var(--border);
    box-shadow: -25px 0 45px rgba(0, 0, 0, 0.45);
    padding: 2rem 2rem 3rem;
    transform: translateX(110%);
    transition: transform 0.35s ease, opacity 0.35s ease;
    z-index: 60;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

body.theme-light .profile-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 242, 248, 0.95));
    box-shadow: 0 25px 45px rgba(16, 21, 37, 0.2);
}

.profile-panel.is-open {
    transform: translateX(0);
}

.profile-panel__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 55;
}

.profile-panel__overlay.is-visible {
    opacity: 1;
    pointer-events: all;
}

.profile-panel__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.theme-light .profile-panel__close {
    background: rgba(13, 15, 23, 0.05);
    border-color: rgba(13, 15, 23, 0.1);
    color: #0d0f17;
}

.profile-panel__head {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.profile-panel__head h3 {
    margin: 0.4rem 0 0.3rem;
    font-size: 1.8rem;
}

.profile-panel__head p {
    margin: 0;
}

.profile-panel__chip {
    display: inline-flex;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

body.theme-light .profile-panel__chip {
    color: rgba(13, 15, 23, 0.65);
    border-color: rgba(13, 15, 23, 0.12);
}

.profile-panel__stats-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
}

.profile-panel__stat {
    text-align: center;
}

.profile-panel__stat span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.profile-panel__stat strong {
    font-size: 1.3rem;
    color: var(--text);
}

body.theme-light .profile-panel__stat strong {
    color: #0d0f17;
}

body.theme-light .profile-panel__stats-card {
    background: rgba(13, 15, 23, 0.03);
}

.profile-panel__status {
    min-height: 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

.profile-panel__status--success {
    color: var(--success);
}

.profile-panel__status--error {
    color: var(--error);
}

.profile-panel__status--info {
    color: var(--info);
}

.profile-panel__cta {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.profile-panel__cta .ghost {
    border-radius: 999px;
}

body.theme-light .profile-panel__cta .ghost {
    border-color: rgba(13, 15, 23, 0.15);
    color: #0d0f17;
}

.profile-panel__form fieldset {
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1.2rem 1.2rem 1rem;
    margin: 0 0 1rem;
    background: rgba(255, 255, 255, 0.02);
}

body.theme-light .profile-panel__form fieldset {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(13, 15, 23, 0.08);
}

.profile-panel__form legend {
    padding: 0 0.5rem;
    font-weight: 600;
}

.profile-panel__form label {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.profile-panel__form label input {
    border-radius: 0.9rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.65rem 0.85rem;
    color: var(--text);
}

.profile-panel__form small {
    display: block;
    color: var(--muted);
    margin-top: 0.6rem;
}

body.theme-light .profile-panel__form label input {
    background: rgba(13, 15, 23, 0.05);
    border: 1px solid rgba(13, 15, 23, 0.1);
}

.theme-toggle {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-toggle__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border 0.2s ease, background 0.2s ease;
}

.theme-toggle__option input {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 2px solid var(--border);
    background: transparent;
}

.theme-toggle__option span {
    font-weight: 600;
    color: var(--text);
}

.theme-toggle__option input:checked + span {
    color: var(--primary);
}

.theme-toggle__option input:checked {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 3px var(--primary);
}

body.theme-light .theme-toggle__option input {
    border-color: rgba(13, 15, 23, 0.2);
}

.profile-panel__form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.profile-panel__actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.profile-panel__logout {
    margin-top: 1rem;
    text-align: center;
}

.profile-panel__logout .ghost-btn {
    width: 100%;
}

.public-recipe-bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(13, 189, 122, 0.2), transparent 40%), #0f1118;
    z-index: -1;
}
.theme-light .public-recipe-bg {
    background: radial-gradient(circle at 20% 20%, rgba(13, 189, 122, 0.2), transparent 40%), #f4f6fb;
}
.public-recipe-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(30px);
    opacity: 0.28;
    animation: floaty 16s ease-in-out infinite;
}
.orb--one {
    width: 320px; height: 320px;
    background: rgba(13, 189, 122, 0.45);
    top: 10%; left: 6%;
}
.orb--two {
    width: 280px; height: 280px;
    background: rgba(93, 180, 255, 0.35);
    bottom: 12%; right: 12%;
    animation-duration: 18s;
}
.orb--three {
    width: 200px; height: 200px;
    background: rgba(255, 255, 255, 0.2);
    top: 30%; right: 22%;
    animation-duration: 22s;
}
@keyframes floaty {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(10px, -14px, 0) scale(1.05); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}
.public-recipe {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3.5rem;
}
.public-recipe__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.public-recipe__header h1 {
    font-size: clamp(2.4rem, 3vw + 1rem, 3.3rem);
    letter-spacing: -0.02em;
    text-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
.public-recipe__header .lead {
    font-size: clamp(1.1rem, 2vw + 0.2rem, 1.5rem);
    color: rgba(13, 15, 23, 0.78);
}
.theme-dark .public-recipe__header h1,
.theme-dark .public-recipe__header .lead {
    color: #f6f7fb;
    text-shadow: 0 14px 30px rgba(0,0,0,0.35);
}
.public-recipe__card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 18px 38px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.04);
    position: relative;
    overflow: hidden;
}
.theme-light .public-recipe__card {
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.public-recipe__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}
.public-recipe__meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.25rem 0 0.75rem;
    flex-wrap: wrap;
}
.public-recipe__meta .badge {
    backdrop-filter: blur(6px);
}
.public-recipe__body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.public-recipe__cta {
    margin-top: 1.25rem;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(13,189,122,0.12), rgba(13,189,122,0.03));
    border: 1px solid rgba(13,189,122,0.18);
    box-shadow: 0 10px 24px rgba(13,189,122,0.12);
}
.badge--muted {
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.theme-light .badge--muted {
    background: rgba(0,0,0,0.04);
    color: var(--text-muted);
}
.public-recipe__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0 0.75rem;
}
.badge--tag {
    background: linear-gradient(135deg, rgba(13,189,122,0.16), rgba(93,180,255,0.12));
    color: #0b7a52;
    border: 1px solid rgba(13,189,122,0.28);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.theme-light .badge--tag {
    background: rgba(13,189,122,0.1);
}

.public-recipe .primary {
    font-size: 1.05rem;
    padding: 0.9rem 1.4rem;
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(13,189,122,0.22);
}
.public-recipe .primary:focus-visible {
    outline: 3px solid rgba(13,189,122,0.45);
    outline-offset: 2px;
}

.public-recipe__footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    display: grid;
    gap: 0.25rem;
}
.public-recipe__footer a {
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 720px) {
    .public-recipe {
        padding: 1.6rem 1rem 2.5rem;
    }
    .public-recipe__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    .public-recipe__card {
        padding: 1.1rem;
        border-radius: 14px;
    }
    .public-recipe__image {
        border-radius: 12px;
    }
}

@media (max-width: 700px) {
    .profile-panel {
        width: 100%;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        height: 90vh;
        border-left: none;
        border-top: 1px solid var(--border);
        border-radius: 1.5rem 1.5rem 0 0;
        transform: translateY(110%);
        padding: 2rem 1.5rem 2.5rem;
    }

    .profile-panel.is-open {
        transform: translateY(0);
    }
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.user-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

@media (min-width: 1200px) {
    .course-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero__top {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        flex-wrap: wrap;
    }

    .inline-form {
        flex-wrap: wrap;
    }

    .course-library {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .hero__content {
        grid-template-columns: 1fr;
    }

    .hero__data {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .section {
        padding: 1rem 1.25rem;
    }

    .course-detail__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 540px) {
    nav {
        flex-direction: column;
        gap: 0.6rem;
    }

    nav a {
        width: 100%;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__data {
        grid-template-columns: 1fr;
    }
    .stat--recipe-card.double {
        grid-column: span 1;
    }

    .alert {
        margin: 0 1rem 1rem;
    }
}

/* Dashboard: Rezept des Tages Kachel */
.stat--recipe-card {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.stat--recipe-card.double {
    grid-column: span 2;
}

.stat__overlay--recipe {
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.65) 100%);
    color: #fff;
    width: 100%;
    padding: 1.25rem;
    border-radius: 14px;
}

.stat--recipe-card h3 {
    color: #fff;
    font-size: 1.4rem;
    line-height: 1.2;
    margin: 0.4rem 0;
}

.stat--recipe-card .stat__meta,
.stat--recipe-card .stat__meal {
    color: #fff;
    margin: 0;
}

.stat--recipe-card .stat__cta {
    margin-top: 0.6rem;
    background: #fff;
    color: #0d0d0d;
    border: none;
    font-weight: 700;
}
