:root {
  --text: #25313b;
  --muted: #52616b;
  --line: #ccd5d3;
  --accent: #7daea3;
  --accent-strong: #4f8d82;
  --accent-shadow: #537f7226;
  --play-color: #d98f73;
  --play-strong: #bb745a;
  --play-shadow: #d98f7326;
  --post-card-background: #ffffffe6;
  --post-card-blur: 0px;
  --danger: #ab343e;
}
* { box-sizing: border-box; letter-spacing: 0; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; color: var(--text); font-family: Inter, "Segoe UI", Arial, sans-serif; background: #edf3f1; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, input, select, textarea { max-width: 100%; }
button, a { overflow-wrap: anywhere; }
input, select, textarea { min-width: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [contenteditable]:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }
[hidden] { display: none !important; }
.background { position: fixed; inset: 0; z-index: -1; background-position: center; background-size: cover; }
.site-header { width: 100%; position: relative; }
.site-topbar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px max(16px, calc((100% - 1120px) / 2)); background: #ffffffeb; }
.header-links, .footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; min-width: 0; }
.header-links a, .footer-links a { color: var(--muted); font-size: 13px; line-height: 1.4; text-decoration: none; }
.header-links a:hover, .footer-links a:hover { text-decoration: underline; }
.language-picker { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 13px; }
.language-picker select { min-height: 32px; max-width: 160px; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px; }
.hero-banner { display: grid; place-items: center; width: 100%; height: 210px; overflow: hidden; background: #dbe5e3; }
.site-logo-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-logo-text { font-size: 72px; font-weight: 800; max-width: 100%; overflow-wrap: anywhere; text-align: center; padding: 12px; }
.nav-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(1120px, calc(100% - 32px)); margin: -22px auto 0; position: relative; }
.play-button { min-height: 48px; width: min(300px, 100%); display: flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: 8px; background: var(--play-strong); color: #fff; text-decoration: none; font-size: 18px; font-weight: 700; box-shadow: 0 6px 16px var(--play-shadow); }
.tabs, .admin-tab-row, .translation-tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tabs { justify-content: center; width: 100%; }
.tabs button, .admin-tab-row button, .translation-tabs button { border: 1px solid var(--line); border-radius: 6px; min-height: 38px; padding: 8px 14px; color: var(--text); background: #ffffffe6; max-width: 100%; }
.tabs button.is-active, .admin-tab-row button.is-active, .translation-tabs button.is-active { color: #fff; border-color: var(--accent-strong); background: var(--accent-strong); }
.page-shell { width: min(1040px, calc(100% - 32px)); margin: 30px auto 0; padding-bottom: 48px; min-width: 0; }
.feed { display: grid; gap: 26px; }
.feed-card { width: min(960px, 100%); min-width: 0; margin: 0 auto; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--post-card-background); backdrop-filter: blur(var(--post-card-blur)); }
.post-title { margin: 0 0 16px; font-size: 32px; line-height: 1.2; overflow-wrap: anywhere; }
.post-body { margin-top: 18px; min-width: 0; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body pre, .rich-editor pre { overflow: auto; max-width: 100%; white-space: pre-wrap; }
.post-body ul, .post-body ol { padding-inline-start: 24px; }
.post-body a { color: var(--accent-strong); }
.post-body img { max-width: 100%; height: auto; }
.post-image-frame, .image-preview { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #e9efee; }
.post-image-frame img, .image-preview img, .admin-post-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.image-unavailable { opacity: .6; }
.fallback-note { margin: 0 0 14px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.empty-state { margin: 24px auto; padding: 20px 0; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.load-status { margin-bottom: 12px; color: var(--muted); }
.load-more { display: block; margin: 24px auto 0; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.admin-toolbar a { color: var(--accent-strong); font-size: 14px; }
.admin-grid { display: grid; grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-panel { min-width: 0; }
.admin-grid > aside { padding-right: 24px; border-right: 1px solid var(--line); }
.panel-head, .editor-top, .editor-actions, .confirm-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head { margin-bottom: 16px; font-size: 20px; font-weight: 650; }
.settings-heading { margin: 20px 0 12px; font-size: 16px; font-weight: 650; }
.panel-head .settings-heading { margin: 14px 0 0; }
.field { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea, .language-add input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: #ffffffed; }
.field input[type="file"] { font-size: 12px; padding: 8px 4px; }
.field textarea { resize: vertical; min-height: 70px; }
.field input[type="range"] { padding: 0; accent-color: var(--accent-strong); }
.field small { line-height: 1.5; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.ghost-button, .primary-small, .primary-button, .danger-button { border: 1px solid var(--line); border-radius: 6px; min-height: 38px; padding: 8px 14px; }
.ghost-button { background: #fff; color: var(--text); }
.primary-small, .primary-button { background: var(--accent-strong); color: #fff; border-color: transparent; }
.danger-button { background: var(--danger); color: #fff; border-color: transparent; }
.text-button { display: block; border: 0; padding: 6px 0; margin: 0 0 12px; background: none; color: var(--accent-strong); text-align: left; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; min-width: 34px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--text); }
.icon-button.primary-button { background: var(--accent-strong); color: #fff; }
.language-row { font-size: 13px; padding: 4px 0; }
.language-add { display: grid; grid-template-columns: 60px minmax(0, 1fr) 34px; gap: 6px; margin: 10px 0 16px; align-items: center; }
.section-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.section-editor-row .field { margin: 0; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 3px; }
.link-editor-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.link-editor-row .field { margin-bottom: 8px; }
.admin-tab-row { margin-bottom: 18px; }
.post-editor { display: grid; gap: 14px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); min-width: 0; }
.post-editor .field { margin: 0; }
.editor-top { padding-bottom: 4px; }
.translation-status { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.translation-status span, #editorSaveState { color: var(--muted); font-size: 12px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 0; }
.editor-toolbar button, .editor-toolbar select { display: inline-flex; justify-content: center; align-items: center; min-width: 34px; min-height: 34px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--text); }
.rich-editor { min-height: 240px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow-wrap: anywhere; line-height: 1.7; }
.post-list { display: grid; gap: 0; }
.admin-post { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-post-thumb { width: 70px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #dce6e3; }
.admin-post-title { font-weight: 650; overflow-wrap: anywhere; }
.admin-post-meta { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.admin-post-actions { display: flex; gap: 5px; }
.admin-login { width: min(400px, 100%); margin: 0 auto; }
.login-card { display: grid; gap: 14px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.login-card strong { font-size: 20px; }
.confirm-modal { width: min(390px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
.confirm-modal::backdrop { background: #25313b66; }
.confirm-card p { color: var(--muted); line-height: 1.5; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 100; max-width: min(400px, calc(100% - 32px)); padding: 12px 16px; border-radius: 6px; background: #25313bf2; color: #fff; overflow-wrap: anywhere; line-height: 1.5; }
.site-footer { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 36px; display: grid; gap: 14px; justify-items: center; border-top: 1px solid var(--line); }
.footer-links { justify-content: center; }
.copyright { font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
@media (max-width: 820px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-grid > aside { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-banner { height: 150px; }
  .site-logo-text { font-size: 48px; }
  .post-title { font-size: 26px; }
}
@media (max-width: 480px) {
  .site-topbar { flex-wrap: wrap; gap: 10px; }
  .language-picker { margin-left: auto; }
  .page-shell { margin-top: 22px; }
  .feed-card { padding: 18px; }
  .post-title { font-size: 24px; }
  .post-body { font-size: 16px; }
  .admin-post { grid-template-columns: 52px minmax(0, 1fr); }
  .admin-post-thumb { width: 52px; }
  .admin-post-actions { grid-column: 2; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
