@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&family=Open+Sans+Condensed:wght@700&display=swap');

:root {
    --bg: #f3ecdf;
    --bg-deep: #e7dcc8;
    --paper: rgba(255, 250, 242, 0.96);
    --paper-soft: rgba(255, 250, 242, 0.78);
    --line: rgba(39, 30, 18, 0.12);
    --line-strong: rgba(39, 30, 18, 0.24);
    --text: #1d1a17;
    --muted: #6f655c;
    --accent: #9f4e2e;
    --accent-strong: #7d3820;
    --accent-soft: rgba(159, 78, 46, 0.12);
    --shadow: 0 18px 50px rgba(46, 32, 17, 0.09);
    --shadow-soft: 0 10px 26px rgba(46, 32, 17, 0.06);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --max-width: 1180px;
    --content-width: 760px;
    --font-body: "Open Sans", Arial, "Helvetica Neue", Helvetica, sans-serif;
    --font-head: "Open Sans Condensed", "Arial Narrow", Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top center, rgba(159, 78, 46, 0.09), transparent 34%),
        radial-gradient(circle at bottom right, rgba(125, 56, 32, 0.07), transparent 28%),
        linear-gradient(180deg, #faf5ec 0%, var(--bg) 54%, var(--bg-deep) 100%);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.572;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.38;
    background-image:
        linear-gradient(rgba(29, 26, 23, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 26, 23, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 84%);
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.site-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 36%),
        linear-gradient(300deg, rgba(255, 255, 255, 0.18), transparent 34%);
}

.site-header {
    position: relative;
    z-index: 2;
    padding: 28px 18px 0;
}

.site-header__inner {
    width: min(calc(100% - 8px), var(--max-width));
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 38px;
    background:
        linear-gradient(180deg, rgba(255, 244, 227, 0.98), rgba(247, 212, 166, 0.92)),
        linear-gradient(90deg, rgba(188, 97, 34, 0.18), transparent 52%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.site-header__inner--stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 28px 30px 24px;
    text-align: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand--center {
    justify-content: center;
}

.brand__wordmark {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 3.6vw, 2.7rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 0.95;
    font-optical-sizing: auto;
}

.brand__lang-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.62rem, 3.12vw, 2.4rem);
    line-height: 0.95;
    transform: translateY(0.10em);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.18));
}

.lang-floating {
    width: 100%;
    max-width: 1080px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px auto 0;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 251, 245, 0.92);
    box-shadow: 0 4px 14px rgba(46, 32, 17, 0.04);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.lang-btn:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    color: var(--text);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(125, 56, 32, 0.18);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-nav--center {
    justify-content: center;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 251, 245, 0.74);
    color: var(--muted);
    font-weight: 700;
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.site-nav a:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    color: var(--text);
}

.site-main,
.studio-layout {
    width: min(calc(100% - 24px), var(--max-width));
    margin: 0 auto;
    padding: 28px 0 84px;
}

.site-footer {
    width: min(calc(100% - 24px), var(--max-width));
    margin: 0 auto 24px;
}

.site-footer__inner {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 10px 14px;
}

.site-footer__inner a {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.site-footer__inner a:hover {
    border-bottom-color: rgba(255, 255, 255, 0.85);
}

.site-main--post {
    width: min(calc(100% - 8px), var(--max-width));
}

.studio-shell .site-header__inner {
    width: calc(100% - 20px);
    max-width: none;
}

.studio-workbench {
    width: calc(100% - 20px);
    margin: 0 auto;
    padding: 18px 0 18px;
}

.studio-form {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr) 420px;
    gap: 14px;
    align-items: start;
}

.studio-column {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(223, 199, 161, 0.96);
    box-shadow: var(--shadow-soft);
    padding: 14px;
    min-width: 0;
}

.studio-column .section-head {
    padding: 0 0 10px;
}

.studio-column--meta,
.studio-column--images {
    position: sticky;
    top: 10px;
    max-height: calc(100vh - 20px);
    overflow: auto;
}

.meta-stack {
    display: grid;
    gap: 10px;
}

.meta-stack label {
    display: grid;
    gap: 6px;
}

.meta-stack input,
.meta-stack textarea,
.meta-stack select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 251, 245, 0.96);
}

.meta-stack textarea {
    min-height: 72px;
    resize: vertical;
}

.form-actions--meta {
    justify-content: stretch;
    gap: 8px;
    margin-top: 12px;
}

.form-actions--meta .primary-link,
.form-actions--meta .ghost-link {
    flex: 1 1 0;
    min-height: 42px;
}

.studio-column--editor .editor-toolbar {
    margin-top: 6px;
}

.studio-column--editor .editor-toolbar button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.88rem;
}

.studio-column--editor .editor-hint {
    margin-top: 8px;
}

.studio-column--editor .rich-editor {
    min-height: calc(100vh - 220px);
    margin-top: 10px;
    border-radius: 16px;
    padding: 18px;
}

.upload-top-btn {
    width: 100%;
    min-height: 42px;
    margin-bottom: 10px;
}

.upload-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.upload-row .upload-top-btn {
    margin-bottom: 0;
    min-height: 36px;
}

.studio-shell .upload-row #insert-unused-img-btn {
    border-color: transparent;
    background: linear-gradient(180deg, #2f84df 0%, #1b63b4 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(26, 87, 156, 0.2);
}

.studio-shell .upload-row #insert-unused-imgfull-btn {
    border-color: transparent;
    background: linear-gradient(180deg, #f08c1f 0%, #d16706 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(172, 89, 14, 0.2);
}

.studio-shell .upload-row #insert-unused-img-btn:hover,
.studio-shell .upload-row #insert-unused-imgfull-btn:hover {
    filter: brightness(1.04);
}

.studio-column--images .image-dropzone {
    min-height: 88px;
    padding: 10px;
}

.studio-column--images .image-library {
    margin-top: 10px;
    margin-bottom: 0;
    justify-content: flex-start;
    align-items: stretch;
}

.studio-column--images .image-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
    padding: 7px;
}

.studio-column--images .image-card img {
    width: 52px;
    height: 52px;
}

.studio-column--images .image-card__body {
    gap: 6px;
}

.studio-column--images .image-card code {
    flex: 1 1 100%;
    font-size: 0.78rem;
    padding: 8px 10px;
}

.studio-column--images .image-card__copy,
.studio-column--images .image-card__delete {
    min-height: 32px;
    padding-inline: 8px;
    font-size: 0.78rem;
}

.sidebar-list--compact {
    margin-top: 8px;
}

.sidebar-list--compact .sidebar-card {
    padding: 10px;
    gap: 6px;
    border-radius: 12px;
}

.sidebar-list--compact .sidebar-card h3 {
    margin-top: 4px;
    font-size: 0.95rem;
    line-height: 1.2;
}

.sidebar-list--compact .sidebar-card__actions {
    gap: 6px;
}

.sidebar-list--compact .sidebar-card__actions a {
    font-size: 0.82rem;
}

.hero,
.feed,
.story,
.empty-state,
.editor-panel,
.sidebar-panel,
.modal-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(223, 199, 161, 0.96);
    box-shadow: var(--shadow);
}

.hero {
    padding: 50px 54px;
    text-align: center;
}

.hero--compact {
    max-width: 880px;
    margin: 0 auto;
    padding: 42px 44px;
}

.hero__eyebrow,
.section-head__eyebrow,
.empty-state__eyebrow,
.post-card__meta,
.editor-hint,
.sidebar-card span {
    margin: 0;
    font-size: 0.88rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero__eyebrow {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hero h1,
.section-head h2,
.empty-state h1,
.editor-panel h1,
.modal-card h2 {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    font-optical-sizing: auto;
}

.hero h1 {
    max-width: 14ch;
    margin-inline: auto;
    font-size: clamp(1.95rem, 3.6vw, 3.1rem);
}

.hero p {
    max-width: 760px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.625;
}

.hero__actions,
.form-actions,
.modal-card__footer,
.cropper-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero__actions {
    margin-top: 28px;
}

.primary-link,
.ghost-link,
.editor-toolbar button,
.cropper-controls button,
.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.primary-link,
.primary-link--button {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 12px 24px rgba(125, 56, 32, 0.16);
}

.ghost-link,
.ghost-link--button,
.editor-toolbar button,
.cropper-controls button,
.modal-close {
    border-color: var(--line);
    background: rgba(255, 251, 245, 0.84);
    color: var(--text);
}

.ghost-link--danger {
    border-color: rgba(162, 58, 48, 0.32);
    background: rgba(255, 242, 240, 0.9);
    color: #8c332d;
}

.primary-link--danger {
    background: linear-gradient(180deg, #ca3e34 0%, #992720 100%);
    box-shadow: 0 10px 18px rgba(130, 28, 22, 0.18);
}

.primary-link:hover,
.ghost-link:hover,
.editor-toolbar button:hover,
.cropper-controls button:hover,
.modal-close:hover {
    transform: translateY(-1px);
}

.feed,
.editor-panel,
.sidebar-panel {
    margin-top: 26px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    padding: 30px 32px 0;
}

.section-head--tight {
    align-items: center;
}

.section-head--listing-spacer {
    min-height: 0;
    padding-top: 12px;
}

.section-head h2,
.editor-panel h1 {
    font-size: clamp(1.45rem, 2.2vw, 2.05rem);
}

.section-head__link {
    color: var(--accent-strong);
    font-weight: 700;
}

.section-head__link--button {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-contact-card {
    position: relative;
    width: 100%;
    margin: 26px 0 0;
    padding: 22px 24px 22px 36px;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    border: 1px solid var(--line);
    background: rgba(255, 251, 245, 0.98);
    box-shadow: var(--shadow);
}

.section-intro-card {
    margin-top: 0;
}

.home-contact-card::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    bottom: -1px;
    width: 14px;
    border-radius: 0;
    background: linear-gradient(180deg, #ffad44 0%, #ea7609 52%, #a34c00 100%);
}

.home-contact-card h2 {
    margin: 0;
    color: #9a4700;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.15;
    font-optical-sizing: auto;
}

.home-contact-card p {
    margin: 8px 0 0;
    color: #1f1710;
    font-size: 1rem;
    line-height: 1.625;
    white-space: pre-line;
}

.home-contact-card__actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.home-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.home-contact-link--telegram {
    background: linear-gradient(180deg, #2ea6f6 0%, #157fc9 100%);
    border-color: rgba(12, 83, 140, 0.55);
    box-shadow: 0 10px 20px rgba(22, 105, 170, 0.22);
}

.home-contact-link--whatsapp {
    background: linear-gradient(180deg, #39d27b 0%, #1e9f57 100%);
    border-color: rgba(19, 108, 57, 0.55);
    box-shadow: 0 10px 20px rgba(27, 126, 70, 0.22);
}

.home-contact-link--readmore {
    background: linear-gradient(180deg, #e65043 0%, #b92f25 100%);
    border-color: rgba(130, 28, 22, 0.6);
    box-shadow: 0 10px 20px rgba(156, 39, 30, 0.24);
}

.home-contact-link:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
    padding: 24px 32px 32px;
}

.post-card {
    grid-column: span 6;
    overflow: hidden;
    border: 1px solid rgba(39, 30, 18, 0.09);
    border-radius: var(--radius-lg);
    background: rgba(255, 251, 245, 0.98);
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-card__click {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.post-card__click:focus-visible {
    outline: 3px solid rgba(230, 126, 34, 0.45);
    outline-offset: -3px;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(46, 32, 17, 0.09);
}

.post-card__image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #ede2d4;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__body {
    padding: 24px;
}

.post-card__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.post-card h3 {
    margin: 12px 0 10px;
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    font-optical-sizing: auto;
}

.post-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.625;
}

.post-card__link {
    color: var(--accent-strong);
    font-weight: 700;
}

.story {
    max-width: 900px;
    margin: 26px auto 0;
    padding: 44px 48px;
}

.story--single {
    width: 100%;
    max-width: none;
    margin: 22px auto 0;
    padding: 28px 34px;
    border: 1px solid var(--line);
    border-radius: 38px;
    background:
        linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(255, 248, 238, 0.9)),
        linear-gradient(90deg, rgba(159, 78, 46, 0.05), transparent 45%);
    box-shadow: var(--shadow);
}

.story-head {
    max-width: none;
    margin: 0 0 10px;
}

.story-head h1 {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(1.75rem, 3.2vw, 2.45rem);
    font-weight: 700;
    line-height: 1.2;
    font-optical-sizing: auto;
}

.story-head__excerpt {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 1.06rem;
    line-height: 1.625;
}

.story-head__sep {
    border: 0;
    height: 1px;
    margin: 10px 0;
    background: linear-gradient(90deg, rgba(162, 96, 43, 0.35), rgba(162, 96, 43, 0.18));
}

.story-body > * {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.story-body > *:first-child {
    margin-top: 0;
}

.post-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.post-two-col .story--single {
    margin: 22px 0 0;
}

.post-side-links {
    margin-top: 22px;
}

.post-side-links__card {
    position: sticky;
    top: 16px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
    padding: 16px;
}

.post-side-links__eyebrow {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.52);
}

.post-side-links__card h2 {
    margin: 8px 0 0;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    font-optical-sizing: auto;
}

.post-side-links__list {
    display: grid;
    gap: 8px;
    margin-top: 0;
    max-height: calc(100vh - 170px);
    overflow: auto;
    padding-right: 4px;
}

.post-side-links__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 9px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: #fff;
    color: #263442;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.28;
}

.post-side-links__image {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #efe3d2;
    aspect-ratio: 16 / 9;
    margin-bottom: 2px;
}

.post-side-links__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-side-links__title {
    display: block;
    color: inherit;
}

.post-side-links__meta {
    display: block;
    font-size: 0.78rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(39, 30, 18, 0.7);
}

.post-side-links__item:hover {
    border-color: rgba(210, 123, 10, 0.24);
    background:
        linear-gradient(0deg, rgba(255, 140, 0, 0.08), rgba(255, 140, 0, 0)),
        linear-gradient(135deg, rgba(255, 197, 110, 0.22), rgba(255, 145, 32, 0.14));
    color: #2a1f14;
}

.post-side-links__item:hover .post-side-links__meta {
    color: rgba(92, 52, 12, 0.78);
}

/* Reklama.help-like public theme */
body.site-shell {
    background:
        radial-gradient(900px 620px at 0% 0%, rgba(120, 32, 0, 0.55), transparent 62%),
        radial-gradient(900px 620px at 100% 0%, rgba(120, 32, 0, 0.45), transparent 62%),
        radial-gradient(900px 620px at 0% 100%, rgba(120, 32, 0, 0.48), transparent 62%),
        radial-gradient(900px 620px at 100% 100%, rgba(120, 32, 0, 0.55), transparent 62%),
        linear-gradient(180deg, #ff9800 0%, #ff7a00 100%);
}

.site-shell .site-header__inner {
    border: 1px solid rgba(255, 255, 255, 0.34);
    background:
        radial-gradient(560px 260px at -10% -20%, rgba(255, 215, 143, 0.36), transparent 68%),
        radial-gradient(520px 260px at 110% 120%, rgba(255, 168, 74, 0.32), transparent 64%),
        linear-gradient(135deg, #a25700 0%, #ea7108 56%, #843700 100%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.site-shell .brand__wordmark {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.site-shell .story--single,
.site-shell .feed,
.site-shell .post-card,
.site-shell .empty-state {
    background: #fff;
    border: 0;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.site-shell .hero {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.site-shell .lang-btn {
    min-height: 0;
    height: auto;
    padding: 0.24rem 0.44rem;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.site-shell .lang-floating {
    gap: 0.28rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.site-shell .lang-btn:hover {
    border-color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.site-shell .lang-btn.active {
    border-color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(180deg, #ffd18c 0%, #ffb45a 100%);
    color: #4a2b08;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.site-shell .primary-link,
.site-shell .primary-link--button {
    background: linear-gradient(180deg, #ff9b2a 0%, #d85b04 100%);
    box-shadow: none;
}

.site-shell .site-nav a,
.site-shell .ghost-link,
.site-shell .ghost-link--button {
    border-color: rgba(255, 255, 255, 0.46);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    font-weight: 800;
}

.site-shell .site-nav a {
    min-height: 0;
    height: auto;
    padding: 0.34rem 0.78rem;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    line-height: 1;
}

.site-shell .site-nav a:hover,
.site-shell .ghost-link:hover,
.site-shell .ghost-link--button:hover {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.32);
    color: #5d2508;
    transform: none;
}

.site-shell .site-footer__inner a {
    color: rgba(255, 255, 255, 0.95);
}

/* Clean admin theme */
body.studio-shell {
    background:
        radial-gradient(920px 540px at 0% 0%, rgba(127, 72, 36, 0.16), transparent 64%),
        radial-gradient(900px 560px at 100% 0%, rgba(107, 64, 40, 0.14), transparent 66%),
        linear-gradient(180deg, #ecdcc6 0%, #dcc2a0 100%);
    height: 100vh;
    overflow: hidden;
}

body.studio-shell--scroll {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
}

.studio-shell .site-header__inner {
    border-color: rgba(39, 30, 18, 0.14);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(255, 246, 236, 0.92)),
        linear-gradient(90deg, rgba(159, 78, 46, 0.08), transparent 52%);
    box-shadow: 0 14px 36px rgba(45, 31, 18, 0.12);
}

.studio-shell .studio-column,
.studio-shell .editor-panel {
    border: 1px solid rgba(39, 30, 18, 0.14);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(45, 31, 18, 0.08);
}

.studio-shell .meta-stack input,
.studio-shell .meta-stack textarea,
.studio-shell .meta-stack select,
.studio-shell .rich-editor,
.studio-shell .image-card,
.studio-shell .image-dropzone {
    background: #fff;
    border-color: rgba(39, 30, 18, 0.16);
}

.studio-shell .editor-toolbar button {
    min-height: 36px;
    border-radius: 10px;
    border-color: rgba(39, 30, 18, 0.16);
    background: #fff;
}

.studio-shell .form-actions--meta .primary-link {
    background: linear-gradient(180deg, #0f5bb0 0%, #0b4b93 100%);
    box-shadow: none;
}

.studio-shell .form-actions--meta .ghost-link {
    border-color: rgba(39, 30, 18, 0.16);
    background: #fff;
}

.studio-shell .studio-workbench--admin {
    width: calc(100% - 20px);
    max-width: none;
    height: 100vh;
    margin: 0 auto;
    padding: 10px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.studio-shell--scroll .studio-workbench--admin {
    height: auto;
    min-height: 100vh;
    padding-bottom: 18px;
}

.studio-shell .admin-quick-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 2px;
}

.studio-shell .admin-quick-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(39, 30, 18, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: #3d2a18;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.studio-shell .admin-quick-nav__link--active {
    border-color: rgba(17, 11, 6, 0.16);
    background: linear-gradient(180deg, #ff9c2f 0%, #ea7609 100%);
    color: #fff;
}

.studio-shell .admin-quick-nav__link:hover {
    border-color: rgba(39, 30, 18, 0.34);
    background: rgba(255, 255, 255, 1);
}

.studio-shell .admin-quick-nav__link--active:hover {
    border-color: rgba(17, 11, 6, 0.16);
    background: linear-gradient(180deg, #ff9c2f 0%, #ea7609 100%);
    color: #fff;
}

.studio-shell .studio-form {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    align-items: stretch;
}

.studio-shell .studio-column {
    height: 100%;
    min-height: 0;
}

.studio-shell .studio-column--meta,
.studio-shell .studio-column--images {
    position: static;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.studio-shell .studio-column--editor {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.studio-shell .studio-column--editor .rich-editor,
.studio-shell .studio-column--editor .preview-pane--live {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.studio-shell .studio-column--meta .meta-stack {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}

.studio-shell .studio-column--images .image-library {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    margin-bottom: 0;
    justify-content: flex-start;
    align-items: stretch;
}

.image-dropzone.is-disabled {
    cursor: not-allowed;
    border-style: solid;
    border-color: rgba(39, 30, 18, 0.16);
    background: rgba(255, 255, 255, 0.78);
}

.upload-top-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.story-nav-block {
    margin-top: 24px;
}

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

.story-nav-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(39, 30, 18, 0.14);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.97), rgba(247, 236, 220, 0.96));
    box-shadow: 0 10px 24px rgba(46, 32, 17, 0.06);
    color: #2a1f14;
}

.story-nav-card--no-image {
    grid-template-columns: 1fr;
}

.story-nav-card__image {
    display: block;
    width: 84px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(39, 30, 18, 0.08);
}

.story-nav-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.story-nav-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.story-nav-card__eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(39, 30, 18, 0.58);
}

.story-nav-card__title {
    min-width: 0;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
}

.story-nav-card:hover {
    background:
        linear-gradient(0deg, rgba(39, 30, 18, 0.14), rgba(39, 30, 18, 0)),
        linear-gradient(180deg, rgba(255, 251, 245, 0.97), rgba(247, 236, 220, 0.96)),
        linear-gradient(90deg, rgba(247, 236, 220, 0.96), rgba(247, 236, 220, 0.96));
}

@media (max-width: 760px) {
    .story-nav-block__grid {
        grid-template-columns: 1fr;
    }
}

.story > *:first-child {
    margin-top: 0;
}

.story > *:last-child {
    margin-bottom: 0;
}

.story p,
.story li,
.story figcaption,
.rich-editor p,
.rich-editor li,
.rich-editor figcaption {
    line-height: 1.625;
}

.story p,
.story li,
.story figcaption {
    font-size: 1.12rem;
}

.story h2,
.story h3,
.rich-editor h2,
.rich-editor h3 {
    margin: 2em 0 0.7em;
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    font-optical-sizing: auto;
}

.story blockquote,
.rich-editor blockquote {
    margin: 28px 0;
    padding: 22px 24px;
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--accent-soft);
}

.story mark.hl-yellow,
.rich-editor mark.hl-yellow {
    background: #fff59d;
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
}

.story strong.text-red,
.rich-editor strong.text-red {
    color: #c92121;
    font-weight: 700;
}

.story .info-block,
.rich-editor .info-block,
.preview-pane .info-block {
    margin: 24px 0;
    padding: 14px 20px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: var(--font-head);
    font-size: 1.2rem;
    line-height: 1.2;
    font-optical-sizing: auto;
}

.story .info-block .info-block__title,
.rich-editor .info-block .info-block__title,
.preview-pane .info-block .info-block__title {
    margin: 0 0 10px;
    color: #fff;
    font-size: inherit;
    line-height: inherit;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.story .info-block p,
.story .info-block li,
.rich-editor .info-block p,
.rich-editor .info-block li,
.preview-pane .info-block p,
.preview-pane .info-block li {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.story .info-block .info-block__sep,
.story .info-block hr,
.rich-editor .info-block .info-block__sep,
.rich-editor .info-block hr,
.preview-pane .info-block .info-block__sep,
.preview-pane .info-block hr {
    border: 0;
    height: 1px;
    margin: 6px 0 10px;
    background: rgba(255, 255, 255, 0.78);
}

.story .info-block > :first-child,
.rich-editor .info-block > :first-child,
.preview-pane .info-block > :first-child {
    margin-top: 0 !important;
}

.story .info-block p:last-child,
.rich-editor .info-block p:last-child,
.preview-pane .info-block p:last-child {
    margin-bottom: 0;
}

.story .info-block.info-block-red,
.rich-editor .info-block.info-block-red,
.preview-pane .info-block.info-block-red {
    background: linear-gradient(135deg, #c93b31, #8c1f28);
}

.story .info-block.info-block-blue,
.rich-editor .info-block.info-block-blue,
.preview-pane .info-block.info-block-blue {
    background: linear-gradient(135deg, #2e7fe0, #1a4fa9);
}

.story .info-block.info-block-green,
.rich-editor .info-block.info-block-green,
.preview-pane .info-block.info-block-green {
    background: linear-gradient(135deg, #2eaa74, #1d7f54);
}

.story .post-button,
.rich-editor .post-button,
.preview-pane .post-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
}

.story .post-button.btn-size-full,
.rich-editor .post-button.btn-size-full,
.preview-pane .post-button.btn-size-full {
    display: flex;
    width: 100%;
}

.story .post-button.btn-size-small,
.rich-editor .post-button.btn-size-small,
.preview-pane .post-button.btn-size-small {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.story .post-button.btn-color-orange,
.rich-editor .post-button.btn-color-orange,
.preview-pane .post-button.btn-color-orange {
    background: linear-gradient(135deg, #c96f3d, #9f4e2e);
}

.story .post-button.btn-color-blue,
.rich-editor .post-button.btn-color-blue,
.preview-pane .post-button.btn-color-blue {
    background: linear-gradient(135deg, #2f84df, #185ab6);
}

.story .post-button.btn-color-green,
.rich-editor .post-button.btn-color-green,
.preview-pane .post-button.btn-color-green {
    background: linear-gradient(135deg, #37b078, #1f8a5b);
}

.story .post-button.btn-color-dark,
.rich-editor .post-button.btn-color-dark,
.preview-pane .post-button.btn-color-dark {
    background: linear-gradient(135deg, #2b2b2b, #161616);
}

.story .video-embed,
.rich-editor .video-embed,
.preview-pane .video-embed {
    position: relative;
    width: 100%;
    margin: 24px 0;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    padding-top: 56.25%;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.story .video-embed iframe,
.rich-editor .video-embed iframe,
.preview-pane .video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.story .image-row-zoom,
.rich-editor .image-row-zoom,
.preview-pane .image-row-zoom {
    margin: 24px 0;
}

.story .image-row-zoom__hint,
.rich-editor .image-row-zoom__hint,
.preview-pane .image-row-zoom__hint {
    margin: 0 0 8px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(61, 52, 38, 0.76);
    font-weight: 700;
}

.story .image-row-zoom__grid,
.rich-editor .image-row-zoom__grid,
.preview-pane .image-row-zoom__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.story .image-row-zoom__item,
.rich-editor .image-row-zoom__item,
.preview-pane .image-row-zoom__item {
    margin: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    background: transparent;
    display: block;
}

.story .image-row-zoom__trigger,
.rich-editor .image-row-zoom__trigger,
.preview-pane .image-row-zoom__trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 12px;
    background: #111;
    cursor: zoom-in;
    overflow: hidden;
}

.story .image-row-zoom__trigger img,
.rich-editor .image-row-zoom__trigger img,
.preview-pane .image-row-zoom__trigger img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: transform 0.18s ease;
}

.story .image-row-zoom__trigger:hover img,
.rich-editor .image-row-zoom__trigger:hover img,
.preview-pane .image-row-zoom__trigger:hover img {
    transform: scale(1.03);
}

@media (max-width: 980px) {
    .story .image-row-zoom__grid,
    .rich-editor .image-row-zoom__grid,
    .preview-pane .image-row-zoom__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .story .image-row-zoom__grid,
    .rich-editor .image-row-zoom__grid,
    .preview-pane .image-row-zoom__grid {
        grid-template-columns: 1fr;
    }
}

.zoom-image-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 20px;
}

.zoom-image-modal[hidden] {
    display: none;
}

.zoom-image-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(2px);
}

.zoom-image-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(94vw, 1420px);
    max-height: 92vh;
    background: #000;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    cursor: pointer;
}

.zoom-image-modal__picture,
.zoom-image-modal__img {
    display: block;
}

.zoom-image-modal__picture {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zoom-image-modal__img {
    width: auto;
    max-width: 100%;
    max-height: 92vh;
    object-fit: contain;
    background: transparent;
    cursor: default;
}

.zoom-image-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

body.has-zoom-modal {
    overflow: hidden;
}

.story figure,
.rich-editor figure {
    margin: 30px 0;
    display: inline-block;
    max-width: 100%;
    border: 1px solid rgba(39, 30, 18, 0.14);
    border-radius: 10px;
    overflow: hidden;
    background: #f6f0e4;
    box-shadow: 0 10px 22px rgba(46, 32, 17, 0.08);
}

.story figure img,
.rich-editor figure img {
    display: block;
    width: auto;
    max-width: 100%;
    border-radius: 10px 10px 0 0;
}

.story figure.figure-blur,
.rich-editor figure.figure-blur,
.preview-pane figure.figure-blur {
    position: relative;
    cursor: pointer;
}

.story figure.figure-blur img,
.rich-editor figure.figure-blur img,
.preview-pane figure.figure-blur img {
    transition: filter 0.26s ease, transform 0.26s ease;
}

.story figure.figure-blur.is-blurred img,
.rich-editor figure.figure-blur.is-blurred img,
.preview-pane figure.figure-blur.is-blurred img {
    filter: blur(16px) brightness(0.72);
    transform: scale(1.04);
}

.story figure.figure-blur.is-revealed img,
.rich-editor figure.figure-blur.is-revealed img,
.preview-pane figure.figure-blur.is-revealed img {
    filter: none;
    transform: none;
}

.story .image-blur-center,
.rich-editor .image-blur-center,
.preview-pane .image-blur-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.86rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.28));
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.story figure.figure-blur.is-revealed .image-blur-center,
.rich-editor figure.figure-blur.is-revealed .image-blur-center,
.preview-pane figure.figure-blur.is-revealed .image-blur-center {
    opacity: 0;
}

.story figure.figure-full img,
.rich-editor figure.figure-full img {
    width: 100%;
}

.story figure.figure-full,
.rich-editor figure.figure-full,
.preview-pane figure.figure-full {
    display: block;
    width: 100%;
    margin: 1em 0;
}

.story figure picture,
.rich-editor figure picture,
.preview-pane figure picture {
    display: block;
}

.story figcaption,
.rich-editor figcaption {
    margin: 0;
    color: #3f3525;
    font-size: 0.98rem;
    line-height: 1.4;
}

.story figcaption.image-polaroid-caption,
.preview-pane figcaption.image-polaroid-caption,
.rich-editor figcaption.image-polaroid-caption {
    display: block;
    padding: 12px 14px 14px;
    min-height: 42px;
    background: linear-gradient(180deg, #2a2a2a, #151515);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 700;
}

.story pre,
.rich-editor pre {
    overflow-x: auto;
    padding: 18px 20px;
    border-radius: 20px;
    background: #1f1a16;
    color: #f6efe3;
}

.code-shell {
    position: relative;
}

.code-shell pre {
    margin: 0;
    padding-top: 44px;
}

.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #f3f3f3;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.empty-state {
    max-width: 860px;
    margin: 0 auto;
    padding: 52px 38px;
    text-align: center;
}

.empty-state--soft {
    margin: 24px 32px 32px;
    box-shadow: none;
    background: var(--paper-soft);
}

.studio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.86fr);
    gap: 24px;
    align-items: start;
}

.editor-panel,
.sidebar-panel {
    padding: 0 28px 30px;
}

.editor-form {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

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

.editor-form label {
    display: grid;
    gap: 8px;
}

.editor-form label span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
}

.editor-form input,
.editor-form textarea,
.editor-form select {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 251, 245, 0.96);
    color: var(--text);
}

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

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.editor-hint {
    margin-top: -2px;
}

.rich-editor {
    min-height: 440px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 251, 245, 0.96);
    outline: none;
}

.rich-editor:focus {
    border-color: rgba(159, 78, 46, 0.45);
    box-shadow: 0 0 0 4px rgba(159, 78, 46, 0.09);
}

.image-dropzone {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 152px;
    padding: 24px;
    text-align: center;
    border: 2px dashed rgba(159, 78, 46, 0.22);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(159, 78, 46, 0.05), rgba(255, 251, 245, 0.7)),
        rgba(255, 251, 245, 0.84);
    cursor: pointer;
}

.image-dropzone.is-over {
    border-color: var(--accent);
    background:
        linear-gradient(180deg, rgba(159, 78, 46, 0.12), rgba(255, 251, 245, 0.8)),
        rgba(255, 251, 245, 0.92);
}

.notice {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.notice--success {
    background: rgba(78, 126, 93, 0.1);
    border-color: rgba(78, 126, 93, 0.18);
}

.notice--error {
    background: rgba(162, 58, 48, 0.08);
    border-color: rgba(162, 58, 48, 0.18);
}

.sidebar-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.image-library {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 12px;
    margin-top: 22px;
    margin-bottom: 24px;
}

.image-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 251, 245, 0.92);
    padding: 10px;
}

.image-card img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    background: #eadfce;
    border-radius: 12px;
}

.image-card__body {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    min-width: 0;
}

.image-card__id {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(29, 26, 23, 0.06);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}

.image-card code {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(29, 26, 23, 0.06);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
}

.image-card__copy {
    flex: 0 0 auto;
    min-height: 40px;
    padding-inline: 12px;
}

.image-card__copy--wide {
    min-width: 84px;
}

.image-card__delete {
    flex: 0 0 auto;
    min-height: 40px;
    min-width: 40px;
    padding-inline: 0;
    border-color: rgba(162, 58, 48, 0.24);
    color: #8c332d;
}

.sidebar-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 251, 245, 0.88);
}

.sidebar-card.is-active {
    border-color: rgba(159, 78, 46, 0.28);
    box-shadow: 0 12px 24px rgba(159, 78, 46, 0.09);
}

.sidebar-card h3 {
    margin: 8px 0 0;
    font-family: var(--font-head);
    font-size: 1.36rem;
    font-weight: 700;
    line-height: 1.1;
    font-optical-sizing: auto;
}

.sidebar-card__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sidebar-card__actions a {
    color: var(--accent-strong);
    font-weight: 700;
}

.admin-posts-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    max-height: 42vh;
    overflow: auto;
    padding-right: 4px;
}

.admin-posts-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 251, 245, 0.86);
    padding: 10px 12px;
}

.admin-posts-item.is-active {
    border-color: rgba(159, 78, 46, 0.35);
    box-shadow: 0 8px 18px rgba(46, 32, 17, 0.08);
}

.admin-posts-item h3 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    line-height: 1.2;
}

.admin-posts-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.admin-posts-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-posts-list--page {
    max-height: none;
    padding: 24px 32px 32px;
    margin-top: 0;
}

.admin-posts-page {
    padding-bottom: 8px;
}

.admin-config-page {
    padding-bottom: 8px;
}

.admin-config-form {
    padding: 12px 32px 0;
}

.admin-config-form .meta-stack {
    max-width: none;
}

.admin-config-form textarea {
    min-height: 170px;
}

.admin-config-meta-top {
    max-width: 260px;
}

.admin-config-meta-top label {
    justify-items: start;
}

.admin-config-meta-top select {
    width: auto;
    min-width: 220px;
}

.admin-config-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 860px) 340px;
    gap: 14px;
    align-items: start;
    justify-content: start;
}

.admin-config-section {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 251, 245, 0.9);
}

.admin-config-section--wide {
    grid-column: 1 / -1;
}

.admin-config-section h3 {
    margin: 0 0 12px;
    font-family: var(--font-head);
    font-size: 1.05rem;
    line-height: 1.2;
    font-optical-sizing: auto;
}

.admin-config-main textarea {
    min-height: 220px;
}

.admin-config-form__actions {
    justify-content: flex-start;
    margin-top: 14px;
}

@media (max-width: 1100px) {
    .admin-config-grid {
        grid-template-columns: 1fr;
    }
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(29, 26, 23, 0.38);
    backdrop-filter: blur(6px);
}

.modal-shell[hidden] {
    display: none;
}

.modal-card {
    width: min(860px, 100%);
    padding: 28px;
}

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

.modal-card--preview {
    width: min(1200px, 100%);
}

.modal-card--preview .modal-card__body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
}

.modal-card__header,
.modal-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.modal-card__body {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.modal-card__body label {
    display: grid;
    gap: 8px;
}

.modal-card__body label > span {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.modal-card__body input,
.modal-card__body textarea,
.modal-card__body select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffdf9;
    padding: 11px 12px;
    font-size: 0.95rem;
    color: var(--text);
}

.modal-card__body textarea {
    resize: vertical;
    min-height: 110px;
}

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

#info-block-modal .modal-card__footer {
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(39, 30, 18, 0.12);
}

#info-block-modal .modal-card__footer .ghost-link,
#info-block-modal .modal-card__footer .ghost-link--button,
#info-block-modal .modal-card__footer .primary-link,
#info-block-modal .modal-card__footer .primary-link--button {
    min-height: 40px;
    height: 40px;
    padding: 0 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

#blur-tips-modal .modal-card__body {
    gap: 10px;
}

#blur-tips-modal .modal-card__body p {
    margin: 0;
    line-height: 1.5;
}

#blur-tips-modal .modal-card__body code {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid rgba(39, 30, 18, 0.16);
    background: rgba(255, 255, 255, 0.78);
    color: #2a1f14;
    font-weight: 700;
}

#images-resize-info-modal .modal-card__body {
    gap: 10px;
}

#images-resize-info-modal .modal-card__body p {
    margin: 0;
    line-height: 1.5;
}

#images-resize-info-modal .modal-card__body ul {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
}

.cropper-wrap {
    min-height: 360px;
    overflow: hidden;
    border-radius: 22px;
    background: #eadfce;
}

.cropper-wrap img {
    max-height: 68vh;
    margin: 0 auto;
}

.preview-pane {
    max-width: 860px;
    margin: 0 auto;
}

.preview-pane--live {
    max-width: none;
    margin: 10px 0 0;
    min-height: calc(100vh - 220px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 251, 245, 0.98);
    box-shadow: var(--shadow-soft);
}

.studio-column--editor.is-previewing .preview-pane--live {
    display: block;
}

.preview-pane h1 {
    margin: 0;
    font-family: var(--font-head);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    font-optical-sizing: auto;
}

.preview-pane > p {
    margin: 14px 0 20px;
    color: var(--muted);
    line-height: 1.625;
}

@media only screen and (min-width: 1001px) {
    body {
        line-height: 1.625;
    }

    .story-head h1 {
        line-height: 1.236;
    }
}

@media only screen and (min-width: 1280px) {
    .story-head h1 {
        line-height: 1.15;
    }
}

.preview-pane figure {
    margin: 22px 0;
    display: inline-block;
    max-width: 100%;
    border: 1px solid rgba(39, 30, 18, 0.14);
    border-radius: 10px;
    overflow: hidden;
    background: #f6f0e4;
    box-shadow: 0 10px 22px rgba(46, 32, 17, 0.08);
}

.preview-pane figure img {
    display: block;
    width: auto;
    max-width: 100%;
    border-radius: 10px 10px 0 0;
}

.preview-pane figure.figure-full img {
    width: 100%;
}

.preview-pane p,
.preview-pane li {
    line-height: 1.85;
}

@media (max-width: 980px) {
    .post-two-col {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .post-side-links {
        margin-top: 0;
    }

    .post-side-links__card {
        position: static;
    }

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

    .post-card {
        grid-column: span 12;
    }
}

@media (max-width: 1880px) {
    .studio-form {
        grid-template-columns: 300px minmax(0, 1fr) 360px;
    }
}

@media (max-width: 1280px) {
    body.studio-shell {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .studio-shell .studio-workbench--admin {
        height: auto;
        display: block;
        padding-bottom: 18px;
    }

    .studio-shell .admin-quick-nav {
        margin-bottom: 10px;
    }

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

    .studio-column--meta,
    .studio-column--images {
        position: static;
        max-height: none;
    }
}

@media (max-width: 760px) {
    .site-header {
        padding: 18px 10px 0;
    }

    .site-header__inner--stacked {
        padding: 22px 16px 18px;
    }

    .site-main,
    .studio-layout {
        width: min(calc(100% - 12px), var(--max-width));
        padding-top: 18px;
    }

    .studio-shell .site-header__inner {
        width: calc(100% - 6px);
    }

    .studio-workbench {
        width: calc(100% - 8px);
    }

    .hero,
    .hero--compact,
    .story,
    .editor-panel,
    .sidebar-panel,
    .modal-card {
        padding-inline: 18px;
    }

    .hero {
        padding-block: 34px;
    }

    .section-head,
    .post-grid {
        padding-inline: 18px;
    }

    .home-contact-card {
        padding: 18px 16px 18px 28px;
    }

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

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

    .story {
        padding-block: 30px;
    }

    .story--single {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .admin-config-form {
        padding-inline: 18px;
    }
}
