/* ========== BASE ========== */
@font-face {
    font-family: "Druk Wide Cyr";
    src: url("../fonts/drukwidecyr-bold.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --page: #151515;
    --page-deep: #0f0f10;
    --surface: rgba(255, 255, 255, 0.07);
    --surface-strong: rgba(255, 255, 255, 0.11);
    --surface-soft: rgba(255, 255, 255, 0.045);
    --text: #f7efed;
    --muted: #b8aca9;
    --muted-2: #827775;
    --line: rgba(255, 228, 224, 0.14);
    --accent: #ffd2d2;
    --accent-strong: #ff9fa8;
    --ink: #161111;
    --success: #b8f3cf;
    --danger: #ff6b6b;
    --warning: #ffd36e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --radius: 8px;
    --font-ui: "Montserrat", "SF Pro Display", "Segoe UI", sans-serif;
    --font-display: "Druk Wide Cyr", "Arial Black", "Montserrat", "SF Pro Display", sans-serif;
}

html {
    scroll-behavior: smooth;
    background: var(--page-deep);
}

body {
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-ui);
    line-height: 1.5;
    background:
        radial-gradient(circle at 16% -8%, rgba(255, 210, 210, 0.16), transparent 28rem),
        radial-gradient(circle at 88% 12%, rgba(184, 243, 207, 0.09), transparent 22rem),
        linear-gradient(135deg, var(--page), var(--page-deep));
    overflow-x: hidden;
    background-color: var(--page-deep);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 3px 3px;
    mix-blend-mode: overlay;
}

img {
    display: block;
    max-width: 100%;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.container,
.webapp-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.webapp-container {
    padding: 18px 0 96px;
}

/* ========== CATALOG ========== */
.catalog-header {
    min-height: min(610px, calc(100vh - 64px));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 0 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
}

.brand-mark {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.4vw, 1.55rem);
    font-weight: 900;
    line-height: 0.84;
    letter-spacing: 0;
    text-transform: lowercase;
}

.account-link {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    align-items: end;
    gap: clamp(28px, 6vw, 72px);
    padding: clamp(30px, 5vw, 58px) 0 18px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1;
    letter-spacing: 0;
}

h1 {
    margin-top: 18px;
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6.6rem);
    font-weight: 900;
    max-width: 950px;
    text-transform: uppercase;
}

h2 {
    margin-top: 8px;
    font-size: 2.5rem;
    font-weight: 850;
}

.subtitle {
    width: min(640px, 100%);
    margin-top: 22px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.btn-hero,
.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius);
    min-height: 48px;
    padding: 14px 18px;
    color: var(--ink);
    background: var(--accent);
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.btn-hero:hover,
.btn-buy:hover {
    background: #ffe2e2;
    transform: translateY(-1px);
}

.catalog-count,
.toolbar-note {
    color: var(--muted-2);
    font-size: 0.92rem;
}

.banner-container {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    box-shadow: var(--shadow);
}

.hero .banner-container {
    width: min(100%, 360px);
    justify-self: end;
}

.banner-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 36px 0 20px;
    border-top: 1px solid var(--line);
}

.catalog-toolbar h2 {
    max-width: 620px;
    font-size: 2.15rem;
    line-height: 1.08;
}

.catalog-controls {
    display: grid;
    justify-items: end;
    gap: 12px;
}

.catalog-filter {
    display: flex;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
}

.filter-button {
    border: 0;
    border-radius: 6px;
    padding: 9px 12px;
    color: var(--muted);
    background: transparent;
    font-weight: 850;
    cursor: pointer;
}

.filter-button.is-active {
    color: var(--ink);
    background: var(--accent);
}

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

.pack-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.pack-card[hidden] {
    display: none;
}

.pack-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 210, 210, 0.36);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
}

.pack-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.pack-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.58));
}

.pack-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

.pack-card:hover .pack-cover img {
    transform: scale(1.035);
}

.collection-badge {
    position: absolute;
    bottom: 12px;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--text);
    background: rgba(15, 15, 16, 0.66);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.collection-badge {
    left: 12px;
    color: var(--ink);
    background: var(--accent);
}

.pack-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
}

.pack-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.pack-title {
    min-width: 0;
    font-size: clamp(1.08rem, 1.8vw, 1.34rem);
    font-weight: 850;
    overflow-wrap: anywhere;
}

.pack-price {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 1.08rem;
    font-weight: 900;
}

.audio-preview,
.audio-placeholder {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.audio-preview audio {
    display: none;
}

.preview-toggle,
.sticky-toggle,
.sticky-close {
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius);
    color: var(--ink);
    background: var(--accent);
    cursor: pointer;
}

.preview-toggle {
    width: 42px;
    height: 42px;
}

.play-icon,
.pause-icon {
    display: block;
    width: 0;
    height: 0;
}

.play-icon {
    margin-left: 3px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid var(--ink);
}

.pause-icon {
    width: 14px;
    height: 16px;
    border-left: 5px solid var(--ink);
    border-right: 5px solid var(--ink);
}

.audio-preview.is-playing .play-icon {
    width: 14px;
    height: 16px;
    margin-left: 0;
    border-top: 0;
    border-bottom: 0;
    border-left: 5px solid var(--ink);
    border-right: 5px solid var(--ink);
}

.preview-meta {
    min-width: 0;
}

.preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.preview-time {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.preview-progress {
    position: relative;
    overflow: hidden;
    height: 6px;
    margin-top: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.preview-progress span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.audio-placeholder {
    display: flex;
    color: var(--muted-2);
    font-size: 0.9rem;
}

.pack-description {
    display: none;
    border-left: 2px solid var(--accent);
    padding: 2px 0 2px 12px;
    color: var(--muted);
    font-size: 0.92rem;
    white-space: pre-line;
}

.pack-card .pack-actions {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 10px;
    margin-top: auto;
}

.btn-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 48px;
    padding: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 800;
    cursor: pointer;
}

.empty-state {
    grid-column: 1 / -1;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 48px 24px;
    color: var(--muted);
    text-align: center;
    background: var(--surface-soft);
}

.catalog-more {
    display: grid;
    place-items: center;
    gap: 12px;
    margin-top: 24px;
}

.btn-load-more {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 48px;
    padding: 13px 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    font-weight: 850;
    cursor: pointer;
}

.btn-load-more:hover {
    transform: translateY(-1px);
}

.catalog-empty-filter {
    color: var(--muted);
    text-align: center;
}

.materials-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
    margin-top: 64px;
    padding: 32px 0 8px;
    border-top: 1px solid var(--line);
}

.materials-lead {
    max-width: 420px;
    margin-top: 16px;
    color: var(--muted);
}

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

.material-card,
.material-empty {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.material-card {
    overflow: hidden;
}

.material-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.material-card div {
    padding: 16px;
}

.material-card h3 {
    font-size: 1.1rem;
    font-weight: 850;
}

.material-card p,
.material-empty p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.material-card a {
    display: inline-flex;
    margin-top: 18px;
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--ink);
    background: var(--accent);
    font-size: 0.9rem;
    font-weight: 850;
}

.material-empty {
    grid-column: 1 / -1;
    padding: 18px;
}

.material-empty span {
    color: var(--accent);
    font-weight: 900;
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
    padding: 24px 0 8px;
    border-top: 1px solid var(--line);
}

.footer-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 850;
}

.footer-icon-link img {
    width: 28px;
    height: 28px;
}

.sticky-player {
    position: fixed;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 16px;
    z-index: 10;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    width: min(390px, calc(100% - 32px));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(21, 21, 21, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.sticky-player[hidden] {
    display: none;
}

.sticky-close {
    width: 34px;
    height: 34px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.35rem;
    line-height: 1;
}

.sticky-info {
    min-width: 0;
}

.sticky-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticky-label {
    display: block;
    color: var(--muted-2);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sticky-toggle {
    width: 42px;
    height: 42px;
}

/* ========== BUTTONS AND ADMIN SHARED ========== */
.btn-primary,
.btn-secondary,
.btn-edit,
.btn-delete,
.btn-move {
    border: none;
    border-radius: var(--radius);
    padding: 12px 18px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    color: var(--ink);
    background: var(--accent);
    transition: transform 0.18s ease, background 0.18s ease;
}

.btn-secondary {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-edit:hover,
.btn-delete:hover,
.btn-move:hover {
    transform: translateY(-1px);
}

.btn-edit {
    color: var(--ink);
    background: var(--warning);
}

.btn-delete {
    color: #fff;
    background: var(--danger);
}

.btn-move {
    width: 40px;
    height: 40px;
    padding: 8px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
}

/* ========== ADMIN ========== */
.admin-page {
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 210, 210, 0.14), transparent 28rem),
        linear-gradient(135deg, var(--page), var(--page-deep));
}

.admin-shell {
    padding: 22px 0 72px;
}

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 0 30px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
}

.admin-header h1,
.login-header h1 {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
}

.admin-subtitle,
.admin-muted,
.login-header p {
    color: var(--muted);
}

.admin-subtitle {
    max-width: 560px;
    margin-top: 12px;
    font-size: 1rem;
}

.admin-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    width: min(100%, 920px);
    margin-inline: auto;
}

.admin-layout .admin-panel {
    margin-bottom: 0;
}

.admin-form,
.admin-list {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 32px;
    background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.admin-list {
    width: min(100%, 920px);
    margin-inline: auto;
}

.admin-panel-head {
    margin-bottom: 22px;
}

.admin-panel-head h2 {
    margin-top: 8px;
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
    font-weight: 850;
}

.admin-list-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.banner-admin-preview {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.materials-admin-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.material-admin-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 228, 224, 0.08);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.material-admin-row img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    object-fit: cover;
}

.material-admin-row h3 {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.material-admin-row p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.material-admin-row a {
    display: inline-flex;
    margin-top: 8px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
}

.banner-admin-preview img {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.admin-audio {
    width: 100%;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.2);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    transition: border-color 0.18s ease, background 0.18s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.28);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 20px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.checkbox-field span {
    font-weight: 800;
}

small {
    display: block;
    margin-top: 4px;
    color: var(--muted-2);
    font-size: 0.8rem;
}

.current-cover {
    width: min(260px, 100%);
    border-radius: var(--radius);
    margin-top: 8px;
}

.packs-table {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pack-row {
    display: grid;
    grid-template-columns: 44px 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 228, 224, 0.08);
    border-radius: var(--radius);
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.pack-move-actions {
    display: grid;
    gap: 6px;
}

.pack-row img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    object-fit: cover;
}

.pack-info {
    flex: 1;
}

.pack-info h3 {
    margin-bottom: 4px;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.pack-info p {
    color: var(--muted);
    font-size: 0.85rem;
}

.pack-row .pack-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.pack-status {
    color: var(--success) !important;
    font-size: 0.78rem !important;
    font-weight: 800;
}

.collection-status {
    color: var(--accent) !important;
}

.login-page {
    min-height: 100vh;
}

.login-shell {
    display: grid;
    place-items: center;
    width: min(100% - 32px, 460px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 0;
}

.login-card {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 6vw, 34px);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
    box-shadow: var(--shadow);
}

.login-brand {
    margin-bottom: 44px;
}

.login-header {
    margin-bottom: 26px;
}

.login-header h1 {
    font-size: clamp(2.2rem, 12vw, 4.4rem);
}

.login-header p {
    margin-top: 12px;
}

.error-message {
    border: 1px solid rgba(255, 107, 107, 0.5);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 18px;
    color: #ffd7d7;
    background: rgba(255, 107, 107, 0.14);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 980px) {
    .catalog-header {
        min-height: auto;
    }

    .hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .banner-container {
        max-width: 420px;
    }

    .hero .banner-container {
        justify-self: start;
    }

    .packs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .materials-section,
    .materials-grid {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .pack-row {
        grid-template-columns: 42px 76px minmax(0, 1fr);
    }

    .pack-row .pack-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .pack-row .pack-actions .btn-edit,
    .pack-row .pack-actions .btn-delete {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .container,
    .webapp-container {
        width: min(100% - 24px, 1180px);
    }

    .webapp-container {
        padding: 12px 0 24px;
    }

    .topbar {
        min-height: 48px;
    }

    .account-link {
        padding: 9px 12px;
        font-size: 0.82rem;
    }

    .hero {
        gap: 26px;
        padding: 34px 0 18px;
    }

    .hero-copy {
        max-width: 100%;
    }

    h1 {
        font-size: clamp(2rem, 10vw, 3.2rem);
        max-width: 7.2ch;
        line-height: 0.92;
    }

    h2 {
        font-size: 1.35rem;
    }

    .subtitle {
        max-width: 36ch;
        font-size: 0.96rem;
        margin-top: 18px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .btn-hero {
        width: 100%;
    }

    .catalog-toolbar {
        align-items: start;
        flex-direction: column;
        padding-top: 28px;
    }

    .catalog-toolbar h2 {
        max-width: none;
        font-size: 1.35rem;
        line-height: 1.02;
    }

    .catalog-controls {
        justify-items: stretch;
        width: 100%;
    }

    .catalog-filter {
        width: 100%;
    }

    .filter-button {
        flex: 1;
    }

    .packs-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pack-content {
        padding: 16px;
    }

    .pack-card .pack-actions {
        grid-template-columns: 1fr 1.2fr;
    }

    .materials-section {
        margin-top: 42px;
    }

    .sticky-player {
        right: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
    }

    .site-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
        margin-top: 14px;
        padding: 8px 0 0;
    }

    .footer-icon-link {
        justify-content: center;
        min-height: 42px;
        padding: 6px 10px;
    }

    .footer-icon-link img {
        width: 22px;
        height: 22px;
    }

    .admin-header {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-header-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .admin-header-actions .btn-secondary,
    .admin-header > .btn-secondary {
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-form,
    .admin-list {
        padding: 16px;
    }

    .admin-list-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .pack-row {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .pack-move-actions {
        grid-row: span 2;
    }

    .pack-row img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .pack-info {
        grid-column: 2;
    }

    .pack-row .pack-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .material-admin-row {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .material-admin-row .btn-delete {
        grid-column: 1 / -1;
        width: 100%;
    }
}
