:root {
  --bg: #0d1b2a;
  --panel: #14263a;
  --ink: #e6f0ff;
  --muted: #a4b7d1;
  --accent: #2f7bdc;
  --line: #2b3f5a;
}

* {
  box-sizing: border-box;
}

html {
  line-height: 1.6;
}

body {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--ink);
  background: var(--bg);
  height: 100vh;
  overflow: hidden;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  font-size: 16px;
}

* {
  text-shadow: none;
}

.layout {
  display: flex;
  height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  padding: 32px 24px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.avatar img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 3px solid var(--line);
}

.title {
  font-size: 2em;
  letter-spacing: 0.4px;
}

.menu {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.menu a {
  color: var(--ink);
  text-decoration: none;
}

.menu a:hover {
  color: var(--accent);
}

.tagline {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.social {
  display: flex;
  gap: 10px;
  font-size: 13px;
  justify-content: center;
}

.social a {
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
}

.social a:hover {
  background: var(--panel);
}

.social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.promo {
  margin-top: auto;
}

.promo-link {
  display: inline-block;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  background: #000;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  font-size: 0.8em;
}

.promo-link:hover {
  background: #111;
  color: #fff;
}

.content {
  margin-left: 280px;
  padding: 40px 60px 60px;
  height: 100vh;
  overflow-y: auto;
  width: calc(100% - 280px);
}

.section-title {
  font-size: 1.6em;
  margin: 0 0 24px;
}

.posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 28px;
}

.post-title {
  font-size: 1.1em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.post-date {
  font-size: 0.8em;
  color: var(--muted);
  margin-top: 6px;
}

.post-thumb {
  margin: 16px 0 12px;
  height: 180px;
  background: linear-gradient(135deg, #f5f1e8, #e2d6c7);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-thumb-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.post-excerpt {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9em;
}

.short-description {
  font-size: 15px;
}

.main-photo-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.main-photo {
  width: 100%;
  max-width: 720px;
  border-radius: 18px;
  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.35);
}

.divider {
  border-bottom: 1px solid var(--line);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  font-size: 0.8em;
}

.ad-banner {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.ad-banner .adsbygoogle {
  max-width: 100%;
}

.page-link {
  padding: 6px 10px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  background: var(--panel);
  font-size: 13px;
}

.page-link.active {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

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

.post-category {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}

.post-detail h1 {
  margin: 0 0 10px;
  font-size: 30px;
}

.post-body {
  line-height: 1.7;
  color: var(--ink);
}

.post-body h2,
.post-body h3 {
  margin-top: 24px;
}

.post-body blockquote {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0;
  font-family: "Courier New", Courier, monospace;
  color: var(--ink);
  font-size: 1em;
  position: relative;
}

.post-body blockquote p {
  margin: 0;
  white-space: pre-wrap;
}

.youtube-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.youtube-embed iframe {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.youtube-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9em;
  word-break: break-word;
  text-align: center;
}

.youtube-link:hover {
  text-decoration: underline;
}

.quote-lines {
  white-space: pre-wrap;
}

.quote-line {
  margin: 0;
}

.prompt {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.75em;
  padding: 4px 8px;
  cursor: pointer;
  user-select: none;
}

.copy-button:hover {
  background: var(--panel);
}
.post-body img {
  max-width: 100%;
  height: auto;
}

.post-video {
  margin: 16px 0;
}

.post-video video {
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--line);
  background: #000;
}

.post-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  margin: 16px 0 0;
}

.contact-details img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  margin-top: 10px;
}

.email {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
}

span.email::after {
  font-weight: bold;
  content: attr(data-email);
}

.content-thumb-link {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.content-thumb {
  max-width: 100%;
  border: 1px solid var(--line);
}

.content-thumb.half-size {
  max-width: 50%;
}

.flash-list {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.flash {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 13px;
  border-radius: 10px;
}

.flash.success {
  border-color: #2f7d4c;
  background: #1e3a2a;
  color: #cfe9d9;
}

.flash.error {
  border-color: #b44a3f;
  background: #3a1f1b;
  color: #f3c9c4;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.hero.compact {
  align-items: flex-start;
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  min-width: 220px;
}

.section {
  margin-bottom: 32px;
}

.section-header {
  margin-bottom: 16px;
}

.section-header.tight {
  margin-bottom: 10px;
}

.admin-form {
  display: grid;
  gap: 24px;
}

.form-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.contact-form .form-grid label {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

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

.turnstile-wrap {
  margin: 12px 0 16px;
}

.form-break {
  grid-column: 1 / -1;
  height: 0;
  margin-bottom: 8px;
}

.contact-form .form-break {
  margin-bottom: 0;
}
.media-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 12px 0 20px;
}

.media-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  padding: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

.button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  background: var(--panel);
}

.inline-form {
  display: inline;
}

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.link-button.danger {
  color: var(--accent);
}

.image-order {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.image-order-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.image-order-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.main-photo-preview img {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.35);
}

.main-photo-preview {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  justify-items: start;
}

.image-order-card video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #000;
}

.image-order-actions {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.image-order-actions button {
  flex: 1;
  padding: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
}

.markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.markdown-toolbar button {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 4px 8px;
  cursor: pointer;
}

.video-tag-list {
  display: grid;
  gap: 10px;
}

.video-tag {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 4px 8px;
  font-family: "Courier New", Courier, monospace;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .content {
    margin-left: 0;
    width: 100%;
    height: auto;
    padding: 28px 20px 40px;
    overflow: visible;
  }

  .promo-box {
    width: 100%;
  }

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

  .form-grid .span-2 {
    grid-column: span 1;
  }
}
