.content-shell { padding-block: clamp(36px, 6vw, 72px); }
.content-hero {
  margin-block-end: clamp(25px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 95% 8%, #fce7d9 0%, transparent 51%),
    linear-gradient(137deg, #faf2f6, #efe3f6);
}
.content-hero h1, .article-header h1 {
  font-size: clamp(2.05rem, 5vw, 4.45rem);
  font-weight: 900;
  line-height: 1.23;
  overflow-wrap: anywhere;
}
.content-hero p, .article-header > p {
  max-width: 48ch;
  margin-block-start: 11px;
  color: var(--muted);
  font-size: clamp(1rem, 1.34vw, 1.2rem);
}
.simple-hero { padding: clamp(23px, 5vw, 58px); }
.simple-hero .content-icon { margin-block-end: 14px; }
.content-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 14px;
  color: var(--purple);
  background: #ffffff9b;
}
.content-icon .icon { width: 23px; height: 23px; }
.about-hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); overflow: hidden; }
.about-hero > div { align-self: center; padding: clamp(23px, 4vw, 55px); }
.about-hero .button { margin-block-start: 22px; }
.about-hero img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; object-position: 50% 55%; }
.reading-card, .content-card {
  padding: clamp(17px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: var(--shadow);
  background: var(--paper);
}
.reading-card { width: min(100%, 820px); margin-inline: auto; padding: clamp(21px, 4vw, 43px); }
.prose { color: var(--muted); line-height: 1.92; }
.prose :is(h2, h3) { color: var(--ink); font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.5; }
.prose > * + * { margin-block-start: 11px; }
.prose > p + :is(h2, h3) { margin-block-start: 23px; }
.prose > p { white-space: pre-line; overflow-wrap: anywhere; }
.content-card h2 { font-size: 1.2rem; line-height: 1.4; }

.contact-layout, .faq-layout { display: grid; align-items: start; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 17px; }
.contact-note { background: #f3eaf7; }
.contact-note .prose, .faq-help p { margin-block: 9px 13px; color: var(--muted); }
.contact-info { display: grid; gap: 7px; margin-block: 13px; }
.contact-info div { display: flex; justify-content: space-between; gap: 10px; padding-block: 8px; border-block-start: 1px solid var(--line); }
.contact-info dt { flex-shrink: 0; color: var(--muted); }
.contact-info dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.faq-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 15px;
  font-weight: 800;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover, .faq-item[open] summary { color: var(--purple-deep); background: #f3eaf6; }
.faq-item summary .icon { width: 17px; color: var(--purple); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { padding: 9px 16px 15px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.faq-help { background: #f4eaf7; }
.faq-help > .icon { margin-block-end: 10px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.blog-grid > article { min-width: 0; }
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.blog-card:hover { transform: translateY(-3px); border-color: #ad89c0; }
.blog-cover { overflow: hidden; aspect-ratio: 1.64; border-radius: 13px; background: var(--lilac); }
.blog-cover img, .article-cover img, .admin-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback { display: grid; width: 100%; height: 100%; place-items: center; background: linear-gradient(145deg, #e7d4f1, #f7e3d6); color: var(--purple); }
.cover-fallback .icon { width: 45px; height: 45px; }
.blog-card-copy { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 13px 10px 9px; }
.blog-card-copy h2 { font-size: clamp(1.05rem, 2vw, 1.33rem); line-height: 1.4; }
.blog-card-copy p { flex: 1; color: var(--muted); }
.blog-card-copy > span { color: var(--purple); font-weight: 750; }
.article-shell { width: min(900px, calc(100% - 36px)); }
.article-header { width: min(100%, 800px); margin: 0 auto 22px; }
.article-header h1 { margin-block-start: 12px; font-size: clamp(2rem, 4.4vw, 3.7rem); }
.article-cover { overflow: hidden; aspect-ratio: 1.88; margin: 0 0 25px; border: 1px solid var(--line); border-radius: 22px; background: var(--lilac); }
.article-shell .reading-card { width: 100%; }

.field-stack { display: grid; gap: 15px; }
.field-stack label { display: grid; gap: 5px; font-weight: 750; color: var(--ink); }
.field-stack :is(input:not([type="checkbox"]), textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 8px 12px;
  border: 1px solid #dacee2;
  border-radius: 11px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  font-weight: 450;
}
.field-stack textarea { resize: vertical; }
.field-stack :is(input, textarea):focus-visible { outline-offset: 1px; }
.field-stack input[type="file"] { padding-block: 6px; }
.field-stack input[type="file"]::file-selector-button {
  min-height: 33px;
  margin-inline-end: 8px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--purple-deep);
  background: var(--lilac);
  font: inherit;
  cursor: pointer;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-action { justify-self: start; }
.field-help, .field-stack label small { color: var(--muted); font-size: .88rem; font-weight: 500; }
.field-help { margin-block-start: -9px; }
.notice {
  padding: 9px 13px;
  border: 1px solid #d2bddd;
  border-radius: 11px;
  background: #f2e7f6;
  color: #501c35;
  overflow-wrap: anywhere;
}
.notice-success { background: #eaf3e9; color: #254a2f; border-color: #bad7ba; }
.notice-error { background: #fbe9e6; color: #752b22; border-color: #efcbc5; }

.admin-body {
  background: radial-gradient(ellipse 56rem 29rem at 0 0, #f3e8ef 0%, transparent 100%), #faf6ee;
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(190px, 232px) minmax(0, 1fr);
  min-height: 100vh;
}
.admin-sidebar {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 29px;
  min-height: 100vh;
  padding: 25px 17px;
  border-inline-end: 1px solid var(--line);
  background: #fffaf3bc;
}
.admin-sidebar .brand { margin-inline: 8px; max-width: calc(100% - 16px); }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a, .admin-signout button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: .94rem;
  font-weight: 720;
}
.admin-sidebar nav a:hover, .admin-signout button:hover { background: #f2e8f5; color: var(--purple-deep); }
.admin-sidebar nav a[aria-current] { background: #ebdef3; color: var(--purple-deep); }
.admin-sidebar .icon { width: 19px; height: 19px; color: var(--purple); }
.admin-signout { margin-block-start: auto; }
.admin-signout button { width: 100%; text-align: start; }
.admin-main { min-width: 0; padding: clamp(15px, 3.3vw, 43px); }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 15px; margin-block-end: 23px; }
.admin-head h1 { font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.25; }
.admin-head .button { min-height: 42px; padding-inline: 12px; font-size: .87rem; white-space: nowrap; }
.admin-main > .notice { margin-block-end: 14px; }
.admin-stats, .admin-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-stats a {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: clamp(12px, 2vw, 23px);
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  color: var(--muted);
}
.admin-stats a:nth-child(2) { background: #f1e8f7; }
.admin-stats a:hover, .admin-shortcuts a:hover { border-color: #ae8ec0; color: var(--purple-deep); }
.admin-stats strong { font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1; color: var(--purple); }
.admin-stats .icon, .admin-shortcuts .icon { color: var(--purple); }
.admin-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(135px, .36fr);
  align-items: center;
  gap: 13px;
  overflow: hidden;
  margin-block: 22px;
  padding: clamp(20px, 4vw, 44px);
  border-radius: 22px;
  color: #fff9ff;
  background: linear-gradient(117deg, #896498, #553668 78%);
  box-shadow: var(--shadow);
}
.admin-hero h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.3; }
.admin-hero p { max-width: 45ch; margin-block: 9px 16px; color: #fbebfe; }
.admin-hero-art { position: relative; width: min(100%, 200px); aspect-ratio: 1; justify-self: center; border: 1px solid #fff4; border-radius: 50%; }
.admin-hero-art::before { content: ""; position: absolute; inset: 12%; border: 1px solid #fff5; border-radius: 50%; }
.admin-hero-art span { position: absolute; display: grid; place-items: center; border: 1px solid #fff6; border-radius: 21%; background: #af8dbdb8; color: #fff; }
.admin-hero-art span:nth-child(1) { width: 30%; aspect-ratio: 1; inset: 1% 0 auto auto; transform: rotate(13deg); }
.admin-hero-art span:nth-child(2) { width: 50%; aspect-ratio: 1; inset: 24% 25% auto auto; transform: rotate(-10deg); }
.admin-hero-art span:nth-child(3) { width: 31%; aspect-ratio: 1; inset: auto auto 1% 0; background: #ffd8bd; color: #7c3c25; transform: rotate(-12deg); }
.admin-hero-art .icon { width: 52%; height: 52%; }
.admin-shortcuts a { display: flex; align-items: center; gap: 10px; padding: 16px; }
.admin-tools, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-tools { margin-block-end: 15px; }
.admin-tools .button, .form-actions .button { min-height: 44px; }
.admin-records { display: grid; gap: 9px; }
.admin-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: 13px;
  padding: clamp(10px, 2vw, 18px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.record-title { display: grid; min-width: 0; }
.record-title small { color: var(--muted); overflow-wrap: anywhere; }
.record-title strong { overflow-wrap: anywhere; }
.record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .91rem; }
.pill { width: fit-content; padding: 4px 9px; border-radius: 999px; color: var(--purple-deep); background: var(--lilac); font-size: .81rem; font-weight: 700; }
.pill.is-live { color: #2d5635; background: #e6f0e5; }
.danger-link { color: #9c3227; text-decoration: underline; text-underline-offset: 3px; }
.button.danger { color: #fff; background: #a03224; }
.button.danger:hover { background: #86291e; }
.edit-form { max-width: 820px; }
.cover-fields { display: grid; gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.cover-fields legend { padding-inline: 5px; font-weight: 800; }
.field-stack .checkbox-label { display: flex; align-items: center; gap: 8px; width: fit-content; }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--purple); }
.admin-cover { width: min(280px, 100%); aspect-ratio: 1.65; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.message-text { margin-block: 13px 20px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

.login-shell { padding-block: 25px 45px; }
.login-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(22px, 7vw, 94px); align-items: center; min-height: 70vh; }
.login-intro { padding-inline: clamp(3px, 4vw, 48px) 0; }
.login-intro h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); line-height: 1.13; }
.login-intro h1 span { color: var(--purple); }
.login-intro p { margin-block-start: 20px; color: var(--muted); }
.login-card {
  max-width: 535px;
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid #e6d2f1;
  border-radius: 26px;
  background: linear-gradient(145deg, #faf5fb, #eee6f6);
  box-shadow: 0 20px 48px #39244a1c, 0 0 0 5px #fffdfa;
}
.login-card h2 { margin-block: 14px; font-size: 1.5rem; }
.login-card .content-icon { border: 1px solid #dec9eb; }
.login-card .notice { margin-block-end: 14px; }
.login-card .text-link { display: inline-block; margin-block-start: 17px; }
.login-card .button { width: 100%; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: minmax(150px, 185px) minmax(0, 1fr); }
  .admin-sidebar { padding-inline: 11px; }
  .admin-sidebar nav a { gap: 7px; }
}
@media (max-width: 740px) {
  .content-hero { border-radius: 20px; }
  .about-hero { grid-template-columns: 1fr; }
  .about-hero img { min-height: 0; aspect-ratio: 1.9; }
  .contact-layout, .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-note { order: 1; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-layout { display: block; }
  .admin-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    gap: 9px;
    padding: 12px;
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }
  .admin-sidebar nav { display: flex; width: 100%; order: 2; overflow-x: auto; padding: 4px; }
  .admin-sidebar nav a { flex: 0 0 auto; min-height: 39px; white-space: nowrap; }
  .admin-signout { margin: 0; }
  .admin-hero-art { max-width: 145px; }
}
@media (max-width: 520px) {
  .blog-grid, .form-grid, .login-grid { grid-template-columns: minmax(0, 1fr); }
  .login-grid { min-height: 0; margin-block-start: 24px; }
  .login-intro h1 br { display: none; }
  .login-intro h1 span { margin-inline-start: 5px; }
  .login-intro p { margin-block-start: 9px; }
  .admin-head { flex-wrap: wrap; }
  .admin-stats { gap: 6px; }
  .admin-stats a { padding: 10px 8px; font-size: .82rem; }
  .admin-hero { grid-template-columns: 1fr; }
  .admin-hero-art { display: none; }
  .admin-shortcuts { grid-template-columns: 1fr; gap: 7px; }
  .admin-record { grid-template-columns: minmax(0, 1fr) max-content; gap: 6px 9px; }
  .record-actions { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-card { transition: none; }
}


.admin-cover .cover-card-art {
  object-fit: contain;
  padding: 3% 9%;
  background: radial-gradient(ellipse at 47% 67%, var(--surface-glow, #765a8a), var(--surface, #321f40));
}
