:root {
    --bg: #f7f7f6;
    --surface: #ffffff;
    --text: #151515;
    --muted: #626262;
    --line: #e7e3dd;
    --accent: #1d9bf0;
    --accent-strong: #0a6fb5;
    --shadow: 0 18px 52px rgba(21, 21, 21, 0.04);
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
}

.shell {
    width: min(1120px, calc(100% - 64px));
    margin: 0 auto;
}

.site-header {
    display: block;
    padding: 30px 0;
}

.brand {
    display: inline-block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 14px;
    background: var(--surface);
    color: var(--text);
    font-weight: 650;
    text-decoration: none;
}

.blog-hero {
    display: grid;
    place-items: center;
    min-height: 210px;
    padding: 20px 0 36px;
    text-align: center;
}

.blog-hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(43px, 6vw, 58px);
    font-weight: 400;
    letter-spacing: 0;
}

.public-feed {
    width: min(486px, 100%);
    margin: 0 auto 46px;
}

.intro-card,
.post-card {
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.intro-card {
    padding: 34px 28px;
    text-align: center;
}

.intro-card p {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-style: italic;
    line-height: 1.25;
}

.post-card {
    margin-top: 16px;
    padding: 48px 40px;
}

.embed-preview {
    border: 1px solid #cfd9de;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.embed-header {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c13131, #f6d5d5 52%, #2a5b9a);
}

.embed-header strong,
.embed-header span {
    display: block;
    font-size: 14px;
    line-height: 1.15;
}

.embed-header span {
    color: #536471;
}

.embed-mark {
    color: #0f1419;
    font-size: 24px;
}

.embed-preview p {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.25;
}

.video-placeholder {
    display: grid;
    place-items: center;
    min-height: 310px;
    border-radius: 9px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.48)),
        linear-gradient(120deg, #655444, #c5b199 48%, #2f3130);
    overflow: hidden;
}

.play-button {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    padding-left: 4px;
}

.play-button::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid #fff;
    margin-left: 4px;
}

.embed-actions {
    display: flex;
    gap: 22px;
    border-top: 1px solid #eff3f4;
    margin-top: 12px;
    padding-top: 12px;
    color: #536471;
    font-size: 13px;
    font-weight: 700;
}

.compact-post {
    padding: 26px 30px;
    text-align: center;
}

.compact-post p {
    margin: 0;
    color: var(--muted);
}

.button.primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.hero {
    display: grid;
    align-items: center;
    min-height: 360px;
    padding: 42px 0 64px;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(46px, 8vw, 88px);
    font-weight: 400;
    letter-spacing: 0;
}

.hero p {
    width: min(620px, 100%);
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

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

.panel {
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 22px;
    box-shadow: var(--shadow);
}

.panel h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.panel p,
.panel li {
    color: var(--muted);
    line-height: 1.55;
}

.panel p {
    margin: 0;
}

.panel ul {
    margin: 0;
    padding-left: 18px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    padding: 24px 0 64px;
}

.admin-nav {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 12px;
    align-self: start;
}

.admin-nav a {
    display: block;
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--muted);
    text-decoration: none;
}

.admin-nav a.active {
    background: #edf7f5;
    color: var(--accent-strong);
    font-weight: 700;
}

.admin-main {
    display: grid;
    gap: 18px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.panel-heading h1,
.panel-heading p {
    margin: 0;
}

.panel-heading p {
    margin-top: 6px;
}

.admin-kicker {
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.sites-heading {
    align-items: flex-start;
}

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

.site-summary > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 16px 18px;
}

.site-summary strong {
    display: block;
    font-size: 28px;
    line-height: 1;
}

.site-summary span {
    display: block;
    color: var(--muted);
    margin-top: 7px;
}

.empty-state {
    border: 1px dashed #d8d2c9;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.55);
    padding: 34px;
}

.empty-state h2 {
    margin: 0 0 8px;
}

.empty-state p {
    color: var(--muted);
    margin: 0;
    line-height: 1.55;
}

.table-panel {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
}

.table-toolbar h2,
.table-toolbar p {
    margin: 0;
}

.table-toolbar h2 {
    font-size: 18px;
}

.table-toolbar p {
    color: var(--muted);
    margin-top: 5px;
}

.table-controls {
    display: flex;
    align-items: end;
    gap: 10px;
}

.search-control {
    display: grid;
    gap: 6px;
}

.search-control span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.search-control input {
    width: 230px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfbfa;
    padding: 8px 10px;
    font: inherit;
}

.search-control input:focus {
    border-color: var(--accent);
    background: #fff;
    outline: 3px solid rgba(29, 155, 240, 0.14);
}

.sort-button {
    min-width: 72px;
}

.table-empty {
    margin: 18px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 840px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--line);
    padding: 16px 18px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fbfbfa;
}

.admin-table td strong,
.admin-table td span {
    display: block;
}

.site-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-cell strong {
    line-height: 1.2;
}

.external-link {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
}

.external-link:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.action-row a,
.disabled-action {
    font-size: 13px;
    font-weight: 750;
}

.danger-link {
    color: #9a3412;
}

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

.status-pill,
.lock-pill {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 26px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 750;
}

.status-pill {
    background: #edf7f5;
    color: var(--accent-strong);
}

.lock-pill {
    background: #f3efe7;
    color: #6d5436;
}

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

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

.stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
}

.stat strong {
    display: block;
    font-size: 30px;
}

.site-footer {
    padding: 4px 0 58px;
    color: #111;
    font-size: 14px;
    text-align: center;
}

.footer-inner {
    width: min(520px, calc(100% - 64px));
}

.site-footer p {
    margin: 0 0 6px;
}

.site-footer a {
    text-decoration: none;
}

.site-footer .disclaimer {
    margin-top: 28px;
    text-align: left;
    font-size: 12px;
    line-height: 1.75;
}

.login-wrap {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 48px 0;
}

.login-card {
    width: min(430px, 100%);
    border: 1px solid #e4e0d9;
    border-radius: 8px;
    background: var(--surface);
    padding: 34px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.06);
}

.login-mark {
    font-weight: 800;
    margin-bottom: 38px;
}

.login-kicker {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.login-card h1 {
    margin: 0 0 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    font-weight: 400;
}

.login-card form,
.login-card label {
    display: grid;
    gap: 12px;
}

.login-card form {
    gap: 18px;
}

.login-card label span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.login-card input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfbfa;
    padding: 10px 12px;
    font: inherit;
}

.login-card input:focus {
    border-color: var(--accent);
    background: #fff;
    outline: 3px solid rgba(29, 155, 240, 0.14);
}

.login-card .button {
    width: 100%;
    min-height: 48px;
    margin-top: 2px;
}

.login-note {
    color: var(--muted);
    font-size: 13px;
    margin: 18px 0 0;
    text-align: center;
}

.form-error {
    border: 1px solid #e6b4a8;
    border-radius: 7px;
    background: #fff2ee;
    color: #8a2f1f;
    margin: 0 0 18px;
    padding: 10px 12px;
}

.form-error p {
    margin: 0;
}

.form-error p + p {
    margin-top: 6px;
}

.notice-success {
    border: 1px solid #b8dccf;
    border-radius: 8px;
    background: #effaf5;
    color: #17634f;
    padding: 12px 14px;
    font-weight: 750;
}

.admin-form {
    display: block;
}

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

.form-main,
.form-side,
.form-section {
    display: grid;
    gap: 16px;
}

.form-section {
    min-height: 0;
}

.admin-form label,
.section-label {
    display: grid;
    gap: 7px;
}

.admin-form label > span,
.section-label > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfbfa;
    padding: 10px 11px;
    font: inherit;
}

.admin-form input,
.admin-form select {
    min-height: 42px;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: var(--accent);
    background: #fff;
    outline: 3px solid rgba(29, 155, 240, 0.14);
}

.section-label {
    align-items: center;
    grid-template-columns: 1fr auto;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--accent-strong);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    padding: 0;
}

.site-picker {
    display: grid;
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.site-picker label {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid var(--line);
    padding: 10px 11px;
}

.site-picker label:last-child {
    border-bottom: 0;
}

.site-picker input {
    min-height: auto;
}

.submit-button {
    width: 100%;
    min-height: 46px;
}

@media (max-width: 760px) {
    .admin-layout,
    .panel-grid,
    .stat-row,
    .panel-heading,
    .site-summary,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .table-toolbar,
    .table-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .search-control input {
        width: 100%;
    }

    .panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .shell {
        width: min(100% - 32px, 1120px);
    }

    .site-header {
        padding-top: 22px;
    }

    .hero {
        min-height: 300px;
        text-align: left;
    }

    .hero p {
        margin-left: 0;
    }

    .blog-hero {
        min-height: 160px;
        padding-bottom: 28px;
    }

    .post-card {
        padding: 22px 14px;
    }

    .intro-card {
        padding: 28px 18px;
    }

    .intro-card p {
        font-size: 21px;
    }

    .video-placeholder {
        min-height: 230px;
    }
}
