:root {
    --lavender: #E6E6FA;
    --blue: #018CE7;
    --blue-deep: #016db4;
    --bg: #F9F9F9;
    --ink: #102033;
    --muted: #5B6B7C;
    --line: #E3E8EE;
    --white: #ffffff;
    --ok: #0f7b4c;
    --err: #c0392b;
    --shadow: 0 18px 50px rgba(16, 32, 51, 0.08);
    --radius: 22px;
    --header: 76px;
    --font: "Manrope", "Segoe UI", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

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

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

h1, h2, h3 {
    margin: 0 0 12px;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; }
h3 { font-size: 22px; font-weight: 700; }

p { margin: 0 0 12px; }

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.narrow { width: min(640px, calc(100% - 40px)); }

.eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    color: var(--blue);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lead {
    font-size: 18px;
    color: var(--muted);
    max-width: 560px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--header);
    background: rgba(249, 249, 249, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: var(--line);
}

.header-inner {
    height: var(--header);
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand img {
    width: 168px;
    height: auto;
}

.nav {
    display: flex;
    gap: 22px;
    margin-left: auto;
    color: var(--muted);
    font-weight: 600;
}

.nav a:hover { color: var(--ink); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
}

.btn-primary:hover { background: var(--blue-deep); }

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

.btn-ghost {
    background: transparent;
    color: var(--ink);
}

.btn-lg { min-height: 54px; padding: 0 22px; }
.btn-block { width: 100%; }

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: var(--ink);
}

.hero {
    padding: 48px 0 28px;
    background:
        radial-gradient(900px 320px at 15% -10%, #ffffff 0%, transparent 60%),
        linear-gradient(180deg, var(--lavender) 0%, var(--bg) 72%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 18px;
}

.hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 0;
    margin: 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.hero-visual {
    position: relative;
    min-height: 420px;
}

.browser {
    background: var(--white);
    border: 1px solid #dce7f2;
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    background: #f3f6fb;
    border-bottom: 1px solid var(--line);
}

.browser-bar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d7dde6;
}

.browser-url {
    margin-left: 10px;
    flex: 1;
    background: var(--white);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--muted);
}

.clinic-preview {
    padding: 22px 24px 26px;
    background:
        linear-gradient(180deg, rgba(230, 230, 250, 0.65), #fff 48%);
}

.clinic-preview-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-size: 13px;
}

.clinic-preview-top span {
    background: var(--blue);
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
}

.clinic-preview h3 {
    font-size: 28px;
}

.clinic-preview p {
    color: var(--muted);
}

.clinic-preview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.clinic-preview-cards div {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}

.clinic-preview-cards small {
    display: block;
    margin-top: 4px;
    color: var(--blue);
    font-weight: 700;
}

.float-card {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
}

.float-card-ad {
    right: -8px;
    top: 72px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.float-card-seo {
    left: 18px;
    bottom: 18px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.strip {
    padding: 8px 0 28px;
}

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

.strip-row span {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.section { padding: 72px 0; }

.section-lavender {
    background: linear-gradient(180deg, #f3f3fc, var(--bg));
}

.cards-3,
.split,
.stats-grid,
.steps,
.pricing {
    display: grid;
    gap: 16px;
}

.cards-3,
.split,
.pricing { grid-template-columns: repeat(3, 1fr); }
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.steps { grid-template-columns: repeat(3, 1fr); }

.card,
.panel,
.price-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.card p,
.panel p,
.price-card p {
    color: var(--muted);
}

.badge {
    display: inline-block;
    margin-bottom: 12px;
    background: var(--lavender);
    color: var(--ink);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.badge-blue {
    background: rgba(1, 140, 231, 0.12);
    color: var(--blue);
}

.checklist {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    position: relative;
    padding: 7px 0 7px 22px;
    font-weight: 600;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
}

.stats-section { padding-top: 0; }

.stats-grid div {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--line);
}

.stats-grid strong {
    display: block;
    font-size: 36px;
    letter-spacing: -0.04em;
    color: var(--blue);
}

.stats-grid span {
    color: var(--muted);
    font-weight: 600;
}

.steps article {
    background: var(--white);
    border-radius: var(--radius);
    padding: 26px;
    border: 1px solid var(--line);
}

.steps span {
    display: block;
    margin-bottom: 18px;
    color: var(--blue);
    font-size: 28px;
    font-weight: 800;
}

.two-col {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    align-items: start;
}

.stack-cards { display: grid; gap: 12px; }

.row-card { padding: 20px 22px; }

.price-card-featured {
    border-color: var(--blue);
    box-shadow: 0 16px 40px rgba(1, 140, 231, 0.12);
}

.price {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin: 0 0 8px;
}

.price small {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
}

.pricing-note {
    margin-top: 22px;
    color: var(--muted);
}

.faq-wrap {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 40px;
}

.faq details {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 4px 18px;
    margin-bottom: 10px;
}

.faq summary {
    cursor: pointer;
    font-weight: 700;
    padding: 14px 0;
}

.faq p {
    color: var(--muted);
    padding-bottom: 12px;
}

.cta { padding: 0 0 80px; }

.cta-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: #0c1b2c;
    color: #fff;
    border-radius: 28px;
    padding: 36px 40px;
}

.cta-box p { color: #b9c5d3; max-width: 560px; }

.site-footer {
    background: #0c1b2c;
    color: #d5deea;
    padding: 56px 0 24px;
}

.site-footer .brand {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 10px 6px;
    background: #fff;
    border-radius: 12px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
}

.footer-lead { color: #9eafc2; max-width: 320px; }

.footer-grid h3 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-grid a,
.footer-grid p {
    display: block;
    color: #9eafc2;
    margin-bottom: 8px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #7e90a6;
    font-size: 13px;
}

.auth-body {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--lavender), var(--bg) 42%);
}

.auth-top {
    width: min(440px, calc(100% - 40px));
    margin: 0 auto;
    padding: 36px 0 12px;
}

.auth-main {
    width: min(440px, calc(100% - 40px));
    margin: 0 auto 60px;
}

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

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

.form {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
}

.form input,
.form select {
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    font: inherit;
    background: var(--bg);
}

.form input:focus,
.form select:focus {
    outline: 2px solid rgba(1, 140, 231, 0.25);
    border-color: var(--blue);
    background: #fff;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-weight: 700;
    color: var(--blue);
}

.alert {
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
    margin: 12px 0;
}

.alert-error { background: #fdecea; color: var(--err); }
.alert-ok { background: #e9f7ef; color: var(--ok); }

.app-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-nav { display: grid; gap: 6px; }

.sidebar-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--muted);
}

.sidebar-nav a.is-active {
    background: var(--lavender);
    color: var(--ink);
}

.sidebar-nav a.is-soon { opacity: 0.55; cursor: default; }

.sidebar-logout { margin-top: auto; }

.app-main { padding: 36px; }

.dash-head { margin-bottom: 28px; }

.form textarea,
.form select,
.form input[type="search"] {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    background: var(--bg);
}

.form textarea { min-height: 96px; resize: vertical; }

.hint {
    display: block;
    margin-top: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--muted);
}

.hint code { font-size: 12px; }

.dash-head-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tabs a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 14px;
}

.tabs a.is-active {
    background: var(--blue, #018CE7);
    color: #fff;
    border-color: transparent;
}

.profile-meter {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px 10px;
    margin: 0 0 18px;
    --meter: #c0392b;
}
.profile-meter.is-ok { --meter: #e67e22; }
.profile-meter.is-great { --meter: #0f7b4c; }
.profile-meter-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 8px;
}
.profile-meter-head span { font-weight: 800; color: var(--meter); }
.profile-meter-track {
    height: 10px;
    background: #e8edf3;
    border-radius: 999px;
    overflow: hidden;
}
.profile-meter-track i {
    display: block;
    height: 100%;
    background: var(--meter);
    border-radius: 999px;
}
.profile-meter .hint { margin: 8px 0 0; }

.case-card,
.review-card {
    position: relative;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 40px 12px 16px;
    margin-bottom: 12px;
}
.case-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}
.case-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin: 8px 0;
    background: #fff;
}

.clinic-edit.is-tabs-ready .js-panel { display: none; }
.clinic-edit.is-tabs-ready .js-panel.is-active { display: block; }

.badge-req,
.badge-opt {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}
.badge-req { background: #e8f4ff; color: #0b5cab; }
.badge-opt { background: #f1f3f6; color: #667085; }

.doctor-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    background: #f4f7fb;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
}
.doctor-picks-title {
    flex-basis: 100%;
    margin: 0;
    font-size: 13px;
    font-weight: 800;
}
.custom-service-row .doctor-picks { grid-column: 1 / -1; }
.doctor-card.is-new { border-color: #018CE7; }

.service-extra { display: grid; gap: 8px; margin: 6px 0 10px 26px; }
.service-extra[hidden] { display: none; }

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

.form-grid .wide { grid-column: 1 / -1; }

.inline-actions {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.inline-actions input { flex: 1; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; }

.clinic-map {
    height: 280px;
    border-radius: 16px;
    background: #e8eef5;
    margin: 12px 0;
}

.repeat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.sticky-save { margin: 16px 0 8px; }

.brand-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 16px;
}

.logo-preview {
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.logo-preview-empty {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 700;
}

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.swatch {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}

.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.gallery img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; }

.doctor-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px 14px 14px;
    margin: 12px 0;
    background: var(--bg);
}

.doctor-card summary { cursor: pointer; display: flex; gap: 12px; padding: 10px 0; }
.doctor-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }

.branch-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
    background: var(--bg);
}

.check-row, .check-inline { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.check-row { flex-wrap: wrap; margin: 8px 0 12px; }

.service-tree ul { list-style: none; margin: 0; padding-left: 16px; }
.service-tree > ul { padding-left: 0; }
.service-line { display: flex; gap: 8px; align-items: center; font-weight: 600; }

.feed-preview {
    overflow: auto;
    max-height: 360px;
    background: #0c1b2c;
    color: #d5deea;
    padding: 16px;
    border-radius: 12px;
    font-size: 12px;
}

.dash-head-row > a.btn + a.btn { margin-left: 0; }
.dash-head-row { gap: 10px; }
.dash-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.publish-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 16px 0;
}
.publish-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    cursor: pointer;
}
.publish-card:has(input[type=radio]:checked) {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(1, 140, 231, 0.15);
}
.publish-card.is-disabled { opacity: 0.55; cursor: not-allowed; }
.publish-card input[type=radio] { margin: 0 0 8px; }
.publish-card span { display: block; margin-top: 6px; color: var(--muted); font-weight: 500; font-size: 14px; }
.publish-card input[type=text] {
    width: 100%;
    margin-top: 10px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0 10px;
    font: inherit;
}
.publish-index { margin: 16px 0 8px; align-items: flex-start; }
.publish-index span { font-weight: 700; }
.hint-list li { margin: 8px 0; }
.disclosure-check { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.disclosure-check li {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
}
.disclosure-check .is-ok { background: #edf8f1; }
.disclosure-check .is-miss { background: #fff6f4; }

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

@media (max-width: 960px) {
    .form-grid, .brand-row, .case-photos { grid-template-columns: 1fr; }
}

.chip {
    display: inline-block;
    margin-top: 12px;
    background: var(--lavender);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 960px) {
    .hero-grid,
    .two-col,
    .faq-wrap,
    .cards-3,
    .split,
    .pricing,
    .stats-grid,
    .steps,
    .footer-grid,
    .app-body {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
        position: absolute;
        top: var(--header);
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px 20px 20px;
        border-bottom: 1px solid var(--line);
    }

    .nav.is-open { display: flex; }
    .nav-toggle { display: block; }
    .header-actions .btn-ghost { display: none; }
    .float-card { display: none; }
    .cta-box { flex-direction: column; align-items: flex-start; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
}

.repeat-row:has([data-repeat-remove]) {
    position: relative;
    padding-right: 36px;
}
.repeat-remove {
    position: absolute;
    top: 6px;
    right: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.repeat-remove:hover { color: var(--err); background: #fdecea; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }

.lib-modal {
    width: min(920px, calc(100% - 32px));
    max-height: min(86vh, 820px);
    border: 0;
    border-radius: 22px;
    padding: 0;
    color: var(--ink);
    box-shadow: var(--shadow);
}
.lib-modal::backdrop { background: rgba(16, 32, 51, 0.45); }
.lib-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 12px;
    border-bottom: 1px solid var(--line);
}
.lib-modal-head h2 { margin: 0 0 4px; font-size: 24px; }
.lib-modal-head .hint { margin: 0; }
.lib-modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--bg);
    font-size: 24px;
    cursor: pointer;
}
.lib-step { padding: 16px 22px 22px; overflow: auto; max-height: calc(86vh - 90px); }
.lib-search {
    width: 100%;
    min-height: 44px;
    margin-bottom: 12px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
}
.lib-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.lib-cat {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.lib-cat.is-on { background: var(--blue); color: #fff; border-color: var(--blue); }
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lib-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    text-align: left;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    font: inherit;
    cursor: pointer;
}
.lib-card:hover { border-color: var(--blue); }
.lib-card-cat { color: var(--blue); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.lib-card strong { font-size: 16px; line-height: 1.3; }
.lib-card-badge { font-weight: 800; color: var(--blue); }
.lib-card p { margin: 0; color: var(--muted); font-size: 13px; }
.lib-back {
    border: 0;
    background: none;
    padding: 0;
    margin-bottom: 10px;
    color: var(--blue);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.lib-params { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.lib-params:empty { display: none; margin: 0; }
.lib-params label, .lib-step > label { display: block; font-weight: 700; }
.lib-params input, .lib-step > label input {
    width: 100%;
    min-height: 42px;
    margin-top: 6px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
}
.lib-preview {
    background: var(--lavender);
    border-radius: 16px;
    padding: 14px 16px;
    margin: 14px 0;
}
.lib-preview-badge { display: inline-block; font-weight: 800; color: var(--blue); margin-bottom: 6px; }
.lib-preview strong { display: block; margin-bottom: 6px; }
.lib-preview p { margin: 0; color: var(--muted); }

@media (max-width: 720px) {
    .lib-grid, .lib-params { grid-template-columns: 1fr; }
}

.gen-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}
.gen-toolbar .hint { flex-basis: 100%; margin: 0; }
.gen-list { padding: 8px 12px 16px; }
.gen-row {
    display: grid;
    grid-template-columns: 28px minmax(160px, 1.4fr) auto 72px auto;
    gap: 10px;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
}
.gen-row.is-loading { opacity: 0.55; }
.gen-main strong { display: block; }
.gen-main .hint { margin: 4px 0 0; }
.gen-err:empty { display: none; }
.gen-err { color: var(--err); }
.gen-status { display: flex; flex-direction: column; gap: 4px; }
.gen-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    white-space: nowrap;
}
.gen-badge.is-ok { background: #e9f7ef; color: var(--ok); }
.gen-badge.is-error { background: #fdecea; color: var(--err); }
.gen-thumb img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}
.gen-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.gen-actions .btn { min-height: 38px; padding: 0 12px; }

.form label.check-row {
    display: flex;
    align-items: flex-start;
    font-weight: 600;
}

.ads-step { margin-bottom: 16px; }
.ads-step h2 { font-size: 22px; }
.ads-services {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
    padding: 4px 2px 8px;
}
.ads-budget-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 16px 0 8px;
}
.ads-budget-card {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    cursor: pointer;
}
.ads-budget-card strong { font-size: 14px; }
.ads-budget-card b { font-size: 28px; letter-spacing: -0.04em; }
.ads-budget-card span { color: var(--muted); font-weight: 500; font-size: 14px; }
.ads-budget-card:has(input:checked) {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(1, 140, 231, 0.15);
}

@media (max-width: 960px) {
    .gen-row {
        grid-template-columns: 28px 1fr;
    }
    .gen-status, .gen-thumb, .gen-actions { grid-column: 2; }
    .ads-budget-grid { grid-template-columns: 1fr; }
}
