:root {
    --bg: #E9E4DA;
    --paper: rgba(250, 248, 244, 0.96);
    --paper-strong: #fdfbf8;
    --surface: rgba(240, 236, 230, 0.9);
    --text: #3C3E40;
    --muted: #666b69;
    --line: rgba(103, 138, 144, 0.18);
    --accent: #D8C1AE;
    --accent-dark: #967361;
    --accent-soft: #eee2d8;
    --pink: #d56f8d;
    --pink-soft: #f9d9e3;
    --pink-soft-strong: #f4c1d0;
    --pink-line: rgba(222, 138, 168, 0.32);
    --sage: #A7BBB3;
    --sage-dark: #6f8e87;
    --sage-soft: #e8efec;
    --danger: #b3654d;
    --danger-dark: #8f4a38;
    --shadow: 0 24px 60px rgba(89, 101, 108, 0.1);
    --shadow-soft: 0 12px 28px rgba(89, 101, 108, 0.06);
    --radius: 26px;
    --radius-sm: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background:
        radial-gradient(circle at top left, rgba(167, 187, 179, 0.17), transparent 24%),
        radial-gradient(circle at top right, rgba(118, 152, 160, 0.16), transparent 22%),
        linear-gradient(180deg, #f4f0ea 0%, #E9E4DA 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.page-shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 52px;
}

.site-header,
.section-head,
.site-footer,
.course-card__top,
.course-list-item__head,
.admin-page-head {
    display: flex;
    gap: 18px;
}

.site-header,
.section-head,
.site-footer,
.admin-page-head {
    align-items: center;
    justify-content: space-between;
}

.site-header {
    margin-bottom: 26px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 24px;
    background: rgba(255, 250, 245, 0.78);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft);
    align-items: center;
    justify-content: center;
}

.site-header__brand {
    min-width: 0;
    display: block;
    width: min(100%, 1480px);
    margin: 0 auto;
}

.site-header__brand picture {
    display: block;
}

.site-header__logo {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(92, 68, 59, 0.08);
    box-shadow: var(--shadow-soft);
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--pink);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 700;
}

.main-content,
.feature-strip,
.course-grid,
.meta-list,
.form,
.stats-grid,
.admin-dashboard-grid,
.admin-stack,
.series-list,
.hero-badges,
.hero-facts,
.hero-actions,
.hero-panel,
.detail-grid {
    display: grid;
}

.main-content { gap: 26px; }

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.hero {
    display: grid;
    align-items: stretch;
}

.hero-home {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
}

.hero-copy {
    display: grid;
    align-content: center;
    gap: 18px;
    min-width: 0;
}

.hero-panel {
    align-content: stretch;
}

.hero-panel__card {
    height: 100%;
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(252, 247, 240, 0.76), rgba(252, 247, 240, 0.94)),
        radial-gradient(circle at top right, rgba(166, 173, 139, 0.18), transparent 38%),
        radial-gradient(circle at bottom left, rgba(182, 134, 88, 0.16), transparent 34%);
    border: 1px solid rgba(255,255,255,0.6);
}

.hero-panel__card--empty {
    justify-content: center;
}

.course-detail {
    display: grid;
    gap: 24px;
}

.course-detail__intro {
    display: grid;
    gap: 18px;
}

.course-detail__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.course-detail__title-block {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.course-detail__availability {
    align-self: start;
}

.course-detail__description {
    margin: 0;
    max-width: none;
    width: 100%;
    font-size: 1.05rem;
    line-height: 1.72;
}

.course-detail__section-head {
    display: grid;
    gap: 6px;
}

.course-detail__grid {
    align-items: start;
}

.course-detail__panel {
    align-content: start;
}

.detail-panel {
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255,255,255,0.48);
    border: 1px solid rgba(96, 69, 58, 0.08);
}

.hero h1,
.course-detail h1,
.section-head h1,
.section-head h2,
.card h2,
.card h3,
.hero-panel h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.4vw, 4.2rem);
    line-height: 1.02;
    max-width: 13ch;
}

.hero-home .hero-home__title {
    max-width: 28ch;
    text-wrap: balance;
}

.hero-home .lead {
    max-width: 112ch;
}

.hero .lead {
    margin: 0;
    font-size: 1.08rem;
    max-width: 72ch;
}

.lead,
.muted,
.course-card__summary,
.table-subline,
.table-note {
    color: var(--muted);
}

.muted {
    margin: 0;
    max-width: 52ch;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.hero-badges__hint {
    gap: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.feature-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-card {
    gap: 10px;
    align-content: start;
}

.feature-card h3 {
    font-size: 1.25rem;
}

.section-head--spacious {
    margin-top: 6px;
    display: grid;
    justify-items: start;
    gap: 8px;
}

.section-head--spacious .muted {
    max-width: 68ch;
}

.pill,
.availability,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    width: fit-content;
}

.pill {
    background: var(--sage-soft);
    color: var(--sage-dark);
    border: 1px solid rgba(111, 142, 135, 0.16);
}

.pill.soft,
.status-pill--soft {
    background: var(--surface);
    color: #5e6c57;
}

.availability.free {
    background: linear-gradient(180deg, rgba(247, 216, 229, 0.88), rgba(241, 194, 215, 0.94));
    color: var(--pink);
    border: 1px solid var(--pink-line);
}

.status-pill--confirmed {
    background: rgba(221, 238, 228, 0.95);
    color: #5f7f72;
    border: 1px solid rgba(140, 174, 156, 0.35);
}

.availability.full,
.status-pill--cancelled {
    background: rgba(232, 190, 194, 0.42);
    color: #9d6671;
    border: 1px solid rgba(205, 148, 157, 0.28);
}

.course-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.course-card {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: auto;
    height: auto;
    align-self: start;
}

.course-card__header {
    display: grid;
    align-content: start;
    gap: 8px;
}

.course-card--plain .course-card__header {
    margin-bottom: 2px;
}

.course-card__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.course-card__availability {
    align-self: center;
}

.course-card__layout {
    display: grid;
    gap: 10px;
    align-content: start;
    grid-auto-rows: max-content;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "summary"
        "meta";
}

.course-card--plain .course-card__layout {
    gap: 14px;
}

.course-card__layout--with-image {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "summary"
        "meta";
    row-gap: 14px;
}

.course-card__title {
    font-size: 1.48rem;
    line-height: 1.1;
    margin: 0;
    max-width: 18ch;
    overflow-wrap: anywhere;
}

.course-card--plain .course-card__title {
    max-width: none;
}

.course-card__gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.course-card__gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(111, 142, 135, 0.42);
    background: rgba(255,255,255,0.72);
    box-shadow: var(--shadow-soft);
}

.course-card__gallery-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center 24%;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.course-card__gallery-item:nth-child(n + 2) {
    display: none;
}

.course-card:hover .course-card__gallery-item img,
.course-card:focus-within .course-card__gallery-item img {
    transform: scale(1.03);
    filter: saturate(1.04);
}

.course-card__summary {
    grid-area: summary;
    margin: 0;
    max-width: 60ch;
    line-height: 1.68;
}

.course-card__meta {
    grid-area: meta;
    align-self: start;
    margin-top: 6px;
}

.course-card--plain .course-card__meta {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(96, 69, 58, 0.08);
}

.course-card__layout--with-image .course-card__summary,
.course-card__layout--with-image .course-card__meta {
    max-width: none;
}

.course-card__layout,
.course-card__summary,
.course-card__meta {
    width: 100%;
}

.course-card__actions > .button {
    width: fit-content;
    min-width: 160px;
    align-self: start;
}

.artist-intro {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.artist-intro__photo {
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(216, 193, 174, 0.5), rgba(167, 187, 179, 0.38));
    border: 1px solid rgba(111, 142, 135, 0.22);
}

.artist-intro__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.artist-intro__content {
    min-width: 0;
}

.artist-intro__text {
    margin-bottom: 0;
}

.artist-intro__link-text {
    margin: 14px 0 0;
    color: var(--muted);
}

.artist-intro__link-text a,
.artist-intro__brand {
    color: inherit;
}

.artist-intro__brand {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.artist-intro__brand img {
    display: block;
    width: min(150px, 58%);
    height: auto;
}

.meta-list {
    gap: 10px;
    margin: 0;
}

.meta-list.big { margin-top: 10px; }

.meta-list div,
.hero-facts div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
}

.course-detail__panel .meta-list div {
    grid-template-columns: minmax(118px, 132px) minmax(0, 1fr);
}

.meta-list--compact div {
    grid-template-columns: 84px 1fr;
    gap: 10px;
    padding-bottom: 8px;
}

.meta-list--compact div:last-child,
.hero-facts div:last-child {
    padding-bottom: 0;
}

.meta-list dt,
.hero-facts dt,
.meta-list__label {
    color: var(--muted);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.meta-list dd,
.hero-facts dd,
.meta-list__value {
    margin: 0;
    font-weight: 600;
    min-width: 0;
}

.meta-list__label,
.meta-list__value {
    display: block;
}

.empty-state {
    text-align: center;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(111, 142, 135, 0.22);
    border-radius: 14px;
    background: #dfe8e4;
    color: #516762;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
    box-shadow: 0 8px 18px rgba(89, 101, 108, 0.1);
}

.button:hover,
button:hover {
    transform: translateY(-1px);
    background: #d5e1dc;
}

.button-secondary {
    background: rgba(255,255,255,0.88);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button-danger {
    background: #dba7aa;
    color: #fffaf8;
    border: 1px solid rgba(178, 111, 118, 0.26);
    box-shadow: 0 8px 18px rgba(153, 104, 110, 0.12);
}

.button-danger:hover {
    background: #d39a9e;
}

button[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.form {
    gap: 14px;
}

.form label {
    display: grid;
    gap: 7px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid rgba(96, 69, 58, 0.16);
    background: rgba(255,255,255,0.96);
    color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(127, 167, 184, 0.18);
    border-color: rgba(127, 167, 184, 0.35);
}

.checkbox-row {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: auto;
}

small {
    color: var(--accent-dark);
}

.notice {
    padding: 13px 15px;
    border-radius: 16px;
    font-weight: 600;
    border: 1px solid transparent;
}

.notice.success {
    background: var(--sage-soft);
    color: var(--sage-dark);
    border-color: rgba(147, 171, 147, 0.22);
}

.notice.error {
    background: rgba(179, 101, 77, 0.14);
    color: var(--accent-dark);
    border-color: rgba(179, 101, 77, 0.16);
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.stats-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.admin-dashboard-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
    gap: 20px;
    align-items: start;
}

.admin-stack,
.series-list,
.admin-list {
    gap: 18px;
}

.admin-head-actions {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.form-head {
    margin-bottom: 18px;
}

.admin-primary-card {
    position: sticky;
    top: 104px;
}

.series-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
}

.series-item {
    display: grid;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--line);
}

.series-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.compact-item {
    gap: 4px;
}

.course-list-item__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.course-list-item__head > div {
    display: grid;
    gap: 3px;
}

.course-list-item.card {
    gap: 12px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(255,255,255,0.7);
    box-shadow: var(--shadow-soft);
}

.course-list-item > span {
    display: block;
}

.course-list-item__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 10px;
}

.course-list-item__registrations,
.course-list-item__visibility {
    min-width: 144px;
    justify-content: center;
    white-space: nowrap;
}

.course-archive-list {
    display: grid;
    gap: 12px;
}

.course-archive-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.72);
}

.course-archive-item__meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.course-archive-item__actions {
    justify-content: flex-end;
}

.form-note {
    margin-bottom: 14px;
}

.upload-meta-note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.45;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--muted);
    font-size: 0.92rem;
}

.registration-table td:first-child {
    min-width: 210px;
}

.registration-table td:nth-child(2) {
    min-width: 220px;
}

.registration-status-cell {
    min-width: 210px;
}

.table-subline {
    font-size: 0.94rem;
}

.table-note {
    margin-top: 8px;
    font-size: 0.92rem;
}

.registration-status-note {
    display: block;
    margin-top: 12px;
    padding: 7px 9px;
    border-radius: 12px;
    background: rgba(232, 190, 194, 0.18);
    color: #9b6b74;
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: normal;
}

.course-gallery-block {
    margin: 0;
}

.course-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-gallery-editor {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
        "main main main"
        "thumb1 thumb2 thumb3";
    gap: 16px;
    align-items: start;
}

.admin-gallery-editor__slot,
.course-gallery-mobile__stage {
    position: relative;
    border-radius: 24px;
}

.admin-gallery-editor__slot--main {
    grid-area: main;
}

.admin-gallery-editor__slot:nth-of-type(2) {
    grid-area: thumb1;
}

.admin-gallery-editor__slot:nth-of-type(3) {
    grid-area: thumb2;
}

.admin-gallery-editor__slot:nth-of-type(4) {
    grid-area: thumb3;
}

.admin-gallery-editor__slot-button,
.course-gallery-mobile__stage {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(111, 142, 135, 0.42);
    box-shadow: var(--shadow-soft);
    line-height: 0;
}

.admin-gallery-editor__slot.is-empty .admin-gallery-editor__slot-button {
    box-shadow: none;
}

.admin-gallery-editor__slot-button {
    cursor: pointer;
}

.admin-gallery-editor__slot--main .admin-gallery-editor__slot-button {
    aspect-ratio: 16 / 9;
}

.admin-gallery-editor__slot-image,
.course-gallery-mobile__stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-gallery-editor__slot-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 18px;
    color: var(--muted);
    text-align: center;
    line-height: 1.35;
}

.course-gallery-mobile__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.course-gallery-mobile__thumb.is-active {
    border-color: rgba(141, 75, 83, 0.32);
    box-shadow: 0 0 0 3px rgba(223, 171, 179, 0.22);
}

.admin-gallery-editor__slot-tools {
    position: absolute;
    top: 8px;
    right: 8px;
    left: 8px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
}

.admin-gallery-editor__drag-hint,
.admin-gallery-editor__trash {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 252, 249, 0.9);
    border: 1px solid rgba(111, 142, 135, 0.28);
    color: #60706b;
    box-shadow: 0 6px 16px rgba(88, 98, 95, 0.12);
    pointer-events: auto;
}

.admin-gallery-editor__drag-hint {
    display: none;
}

.admin-gallery-editor__trash {
    padding: 0;
    min-height: 0;
    font-size: 0.86rem;
}

.admin-gallery-editor__slot.is-drag-over .admin-gallery-editor__slot-button {
    box-shadow: 0 0 0 3px rgba(111, 142, 135, 0.22);
}

.admin-gallery-editor__input {
    display: none;
}

.course-gallery-grid--desktop .gallery-thumb {
    aspect-ratio: 1 / 1;
}

.course-gallery-mobile {
    display: none;
}

.course-gallery-mobile__thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.course-gallery-mobile__thumb {
    aspect-ratio: 1 / 1;
}

.course-gallery-mobile [data-gallery-slot].is-active-slot {
    display: none;
}

.form-block {
    display: grid;
    gap: 10px;
}

.form-block__label {
    font-weight: 700;
}

.compact-checkbox {
    gap: 8px;
    align-items: center;
}

.gallery-thumb {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--paper-strong);
    box-shadow: var(--shadow-soft);
    line-height: 0;
    border: 1px solid rgba(111, 142, 135, 0.42);
}

.gallery-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
    transform: scale(1.03);
}

.gallery-lightbox {
    width: min(92vw, 1100px);
    max-width: 1100px;
    border: 0;
    border-radius: 28px;
    padding: 14px;
    background: rgba(30, 20, 18, 0.94);
    color: #fff9f4;
}

.gallery-lightbox::backdrop {
    background: rgba(25, 16, 14, 0.7);
    backdrop-filter: blur(4px);
}

.gallery-lightbox__close-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
    border: 0;
    border-radius: 999px;
    background: rgba(255, 250, 245, 0.14);
    color: #fff9f4;
    cursor: pointer;
}

.gallery-lightbox__close {
    width: 42px;
    height: 42px;
    font-size: 1.8rem;
    line-height: 1;
}

.gallery-lightbox__frame {
    display: grid;
    gap: 14px;
}

.gallery-lightbox__nav-row {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.gallery-lightbox__nav-row[hidden] {
    display: none;
}

.gallery-lightbox__nav {
    min-width: 56px;
    height: 48px;
    padding: 0 18px;
    font-size: 2rem;
}

.gallery-lightbox__figure {
    margin: 0;
}

.gallery-lightbox__figure img {
    width: 100%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.gallery-lightbox__figure figcaption {
    margin-top: 12px;
    text-align: center;
    color: rgba(255, 249, 244, 0.82);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-row--compact {
    align-items: center;
}

.action-row--stack {
    flex-direction: column;
    align-items: stretch;
}

.action-row form {
    margin: 0;
}

.action-row--danger-zone {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed rgba(179, 101, 77, 0.24);
    justify-content: flex-end;
}

@media (max-width: 860px) {
    .course-archive-item {
        grid-template-columns: 1fr;
    }

    .course-archive-item__actions {
        justify-content: flex-start;
    }
}

.button-icon {
    min-width: 44px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
}

.panel-divider {
    height: 1px;
    background: var(--line);
    margin: 24px 0;
}

.subnav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 22px;
}

.admin-top-tabs {
    margin-top: -8px;
}

.settings-shell {
    display: grid;
    gap: 18px;
}

.settings-column {
    display: grid;
    gap: 18px;
}

.subnav-tabs a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 700;
}

.subnav-tabs a.active {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-color: rgba(141, 75, 83, 0.18);
}

.settings-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.inline-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.inline-fields.triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.time-range-fields {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.time-range-fields__label {
    color: var(--muted);
    font-size: 0.92rem;
}

.detail-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.96fr);
    gap: 18px;
    align-items: start;
}

.compact {
    align-items: start;
}

.auth-card {
    margin: 0 auto;
}

.narrow-card {
    width: min(580px, 100%);
}

.site-footer {
    margin-top: 26px;
    padding: 0 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.site-footer__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer__meta p,
.site-footer > p {
    margin: 0;
}

.site-footer__admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(111, 142, 135, 0.18);
    background: rgba(255,255,255,0.68);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: none;
}

.site-footer__admin-link:hover {
    background: rgba(255,255,255,0.86);
    color: var(--text);
}

@media (min-width: 1101px) {
    .hero-home .hero-copy {
        max-width: min(100%, 78rem);
    }
}

@media (max-width: 1280px) {
    .hero-home,
    .admin-dashboard-grid,
    .settings-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-primary-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .page-shell {
        width: min(100%, calc(100% - 20px));
        padding: 14px 0 34px;
    }

    .site-header,
    .section-head,
    .site-footer,
    .admin-page-head,
    .course-list-item__head,
    .settings-panel-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .site-header {
        position: static;
        gap: 14px;
        padding: 14px;
    }

    .site-header__brand {
        width: min(100%, 360px);
    }

    .course-detail {
        gap: 20px;
    }

    .course-detail__header {
        gap: 12px;
    }

    .detail-panel {
        padding: 20px;
        border-radius: 20px;
    }

    .hero-badges {
        gap: 12px;
    }

    .feature-strip,
    .stats-grid,
    .stats-grid--four,
    .inline-fields,
    .inline-fields.triple {
        grid-template-columns: 1fr;
    }

    .series-list {
        grid-template-columns: 1fr;
    }

    .artist-intro {
        grid-template-columns: 1fr;
    }

    .artist-intro__photo {
        max-width: 220px;
    }

    .card {
        padding: 22px;
        border-radius: 22px;
    }

    .meta-list div,
    .hero-facts div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .course-card {
        min-height: auto;
        height: auto;
        align-self: start;
        padding-bottom: 12px;
    }

    .course-card__header {
        gap: 10px;
    }

    .course-card__title {
        max-width: none;
    }

    .course-card__gallery-item {
        border-radius: 18px;
    }

    .course-card__gallery-item img {
        min-height: 0;
        aspect-ratio: 16 / 9;
        object-position: center 18%;
    }

    .course-card__summary,
    .course-card__meta,
    .course-card__layout {
        max-width: none;
        width: 100%;
    }

    .course-card__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .course-card__actions > .button {
        width: 100%;
    }

    .course-list-item__badges {
        justify-content: start;
    }

    .course-list-item__registrations {
        min-width: 0;
    }

    .admin-head-actions {
        justify-items: start;
    }

    .site-footer {
        gap: 6px;
    }

    .site-footer__meta {
        gap: 8px;
    }
}

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

    .course-card__gallery-item:nth-child(n + 2) {
        display: block;
    }

    .course-card__gallery-item img {
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 0.98rem;
    }

    .site-header__brand {
        width: 100%;
    }

    .site-header__logo {
        border-radius: 16px;
    }

    .hero h1 {
        font-size: clamp(1.72rem, 8.2vw, 2.35rem);
        line-height: 1.06;
        max-width: none;
    }

    .card {
        padding: 18px;
    }

    .course-detail__description {
        font-size: 1rem;
        line-height: 1.66;
    }

    .detail-panel {
        padding: 18px;
    }

    .hero-panel__card {
        padding: 20px;
    }

    .pill,
    .availability,
    .status-pill {
        padding: 8px 12px;
        font-size: 0.86rem;
    }

    .hero-badges__hint {
        font-size: 0.8rem;
        gap: 8px;
    }

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

    .button,
    button {
        width: 100%;
    }

    .course-gallery-grid--desktop {
        display: none;
    }

    .course-gallery-mobile {
        display: grid;
        gap: 12px;
    }

    .action-row,
    .action-row--stack {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-gallery-editor {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "thumb1"
            "thumb2"
            "thumb3";
    }

    .gallery-lightbox {
        width: min(96vw, 1100px);
        padding: 10px;
    }

    .gallery-lightbox__nav-row {
        gap: 10px;
    }

    .gallery-lightbox__nav {
        min-width: 72px;
        height: 42px;
        font-size: 1.4rem;
    }
}
