:root {
  --paper: #f7f1e8;
  --paper-deep: #eadfce;
  --ink: #263730;
  --muted: #6a746b;
  --green: #6f8b75;
  --green-dark: #405a48;
  --clay: #c8ad90;
  --white: #fffdf8;
  --danger: #9b3f37;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

button,
.primary-link {
  border: 0;
  border-radius: 6px;
  background: var(--green-dark);
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d7cbb8;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
}

.brand {
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 700;
}

.site-header nav,
.admin-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 42px;
  max-width: 1180px;
  margin: 10px auto 0;
  min-height: 560px;
  padding: 36px 24px 72px;
  align-items: center;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 8px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
}

.hero-copy p {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  min-height: 420px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,0)),
    linear-gradient(155deg, #d6c4ad 0%, #f4e9d9 42%, #89a185 100%);
  box-shadow: 0 24px 80px rgba(64, 90, 72, .18);
}

.linen {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 16%;
  height: 34%;
  background: rgba(255, 253, 248, .74);
  border-radius: 8px;
}

.stone {
  position: absolute;
  width: 74px;
  height: 52px;
  border-radius: 50%;
  background: #59665d;
  bottom: 20%;
}

.stone-one {
  right: 22%;
}

.stone-two {
  right: 36%;
  bottom: 27%;
  background: #7a8178;
}

.leaf {
  position: absolute;
  top: 18%;
  right: 18%;
  width: 90px;
  height: 160px;
  border-radius: 90px 0 90px 0;
  background: rgba(64, 90, 72, .62);
  transform: rotate(32deg);
}

.service-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #d9cdbb;
}

.service-band div {
  background: var(--white);
  padding: 34px;
}

.service-band span {
  color: var(--clay);
  font-weight: 700;
}

.service-band h2 {
  margin: 8px 0;
}

.service-band p,
.article-card span,
.empty-state p,
.article-summary {
  color: var(--muted);
}

.article-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 78px 24px;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: 34px;
}

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

.article-card {
  background: var(--white);
  border: 1px solid #eadfce;
  border-radius: 8px;
  min-height: 230px;
  padding: 24px;
}

.article-card p {
  color: var(--green);
  font-size: 13px;
  margin: 0 0 28px;
}

.article-card h3 {
  font-size: 22px;
  line-height: 1.25;
}

.article-page {
  max-width: 840px;
  margin: 40px auto 100px;
  padding: 0 24px;
}

.article-page h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.article-content {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid #d8cab7;
  font-size: 18px;
}

.empty-state {
  background: var(--white);
  border: 1px solid #eadfce;
  border-radius: 8px;
  padding: 34px;
}

.page-empty {
  max-width: 560px;
  margin: 15vh auto;
}

.admin-body {
  background: #f6f4ef;
}

.admin-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  justify-content: flex-start;
  background: var(--white);
  border-bottom: 1px solid #e2d7c5;
  padding: 14px 22px;
}

.admin-nav form {
  margin-left: auto;
}

.admin-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 22px 80px;
}

.admin-main.narrow,
.login-panel {
  max-width: 680px;
}

.login-panel {
  margin: 14vh auto;
  background: var(--white);
  border: 1px solid #eadfce;
  border-radius: 8px;
  padding: 34px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0 36px;
}

.metric-grid div {
  background: var(--white);
  border: 1px solid #eadfce;
  border-radius: 8px;
  padding: 20px;
}

.metric-grid strong {
  display: block;
  font-size: 20px;
}

.metric-grid span {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid #eadfce;
}

th,
td {
  border-bottom: 1px solid #eadfce;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

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

.table-actions button {
  min-height: 32px;
  padding: 0 10px;
}

.stack-form {
  display: grid;
  gap: 18px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
}

.error,
.danger {
  color: var(--danger);
}

button.danger {
  background: var(--danger);
  color: var(--white);
}

.admin-muted {
  margin: 0;
  color: var(--muted);
}

.admin-panel {
  margin-top: 28px;
}

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

.carousel-admin-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
}

.carousel-admin-card > img {
  width: 100%;
  aspect-ratio: 1.8 / 1;
  border-radius: 8px;
  object-fit: cover;
}

.carousel-edit-form {
  display: grid;
  gap: 12px;
}

.carousel-actions {
  grid-column: 1 / -1;
}

.public-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(224, 202, 176, .16), transparent 30%),
    linear-gradient(180deg, #fffdf9 0%, #faf6ef 58%, #fffdf9 100%);
  color: #201a17;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.mobile-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255, 253, 249, .94);
  overflow: hidden;
}

.mobile-home {
  padding: 42px 18px 40px;
}

.home-topbar,
.article-toolbar,
.mobile-section-heading,
.article-author,
.article-bottom-actions,
.mobile-article-card footer {
  display: flex;
  align-items: center;
}

.home-topbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.home-brand {
  display: block;
  color: #4b342c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0;
}

.home-topbar p {
  margin: 5px 0 0;
  color: #8a7c73;
  font-size: 14px;
}

.round-icon-button {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 0 0 1px rgba(101, 74, 60, .08), 0 8px 18px rgba(80, 54, 44, .05);
}

.round-icon-button::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border: 1.8px solid #4d342b;
  border-radius: 50%;
  top: 13px;
  left: 13px;
}

.round-icon-button::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 1.8px;
  border-radius: 2px;
  background: #4d342b;
  top: 31px;
  left: 29px;
  transform: rotate(45deg);
}

.home-carousel {
  position: relative;
  aspect-ratio: 1.95 / 1;
  min-height: 182px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 16px 34px rgba(80, 54, 44, .09);
}

.home-carousel img,
.article-cover,
.mobile-article-card img,
.article-inline-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(39, 29, 24, .62) 0%, rgba(39, 29, 24, .33) 48%, rgba(39, 29, 24, .03) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .1));
}

.carousel-copy {
  position: absolute;
  z-index: 1;
  left: 18px;
  top: 18px;
  max-width: 210px;
  color: #fffaf4;
}

.carousel-copy span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(255, 250, 244, .24);
  border-radius: 999px;
  padding: 0 10px;
  color: rgba(255, 250, 244, .75);
  font-size: 11px;
}

.carousel-copy h1 {
  margin: 12px 0 7px;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 600;
}

.carousel-copy p {
  margin: 0 0 14px;
  color: rgba(255, 250, 244, .78);
  font-size: 12px;
  white-space: nowrap;
}

.home-carousel-link {
  display: block;
  width: 100%;
  height: 100%;
}

.home-carousel-link.no-link {
  cursor: default;
}

.carousel-copy b {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: rgba(233, 207, 180, .92);
  color: #493126;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 400;
}

.carousel-copy b::after {
  content: "→";
  margin-left: 6px;
}

.carousel-dots {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 13px;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.carousel-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 250, 244, .74);
}

.carousel-dots .active {
  width: 19px;
  background: #fff;
}

.home-service-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0 2px;
}

.home-service-strip span {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(210, 184, 158, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  color: #806b5f;
  font-size: 12px;
  box-shadow: none;
}

.mobile-article-section {
  margin-top: 24px;
}

.mobile-section-heading {
  justify-content: space-between;
  margin-bottom: 12px;
}

.mobile-section-heading h2 {
  position: relative;
  margin: 0;
  padding-left: 12px;
  font-size: 18px;
  line-height: 1.2;
}

.mobile-section-heading h2::before,
.article-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: #d7b48e;
}

.mobile-section-heading h2::before {
  top: 2px;
  bottom: 2px;
}

.mobile-section-heading a {
  color: #9a8c82;
  font-size: 13px;
}

.mobile-section-heading a::after {
  content: "›";
  margin-left: 3px;
}

.mobile-article-list {
  display: grid;
  gap: 11px;
}

.mobile-article-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  min-height: 112px;
  border: 1px solid rgba(230, 219, 205, .56);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  padding: 10px;
  box-shadow: 0 10px 26px rgba(72, 52, 42, .055);
}

.mobile-article-card img {
  aspect-ratio: 1.12 / 1;
  height: auto;
  align-self: center;
  border-radius: 12px;
}

.mobile-article-card h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: #1f1a17;
  font-size: 15px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mobile-article-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #7a716b;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mobile-article-card footer {
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #9b918b;
  font-size: 12px;
}

.category-chip {
  min-width: 0;
  overflow: hidden;
  color: #a58670;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-count-pill {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  color: #a09891;
  white-space: nowrap;
  font-size: 12px;
}

.mobile-empty-state {
  border: 1px solid rgba(230, 219, 205, .56);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  padding: 22px;
  box-shadow: 0 10px 26px rgba(72, 52, 42, .045);
}

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

.mobile-empty-state p {
  margin: 0;
  color: #7a716b;
}

.mobile-article {
  padding: 52px 20px 106px;
}

.article-toolbar {
  justify-content: space-between;
  margin-bottom: 24px;
}

.article-toolbar > div {
  display: flex;
  gap: 24px;
}

.article-back,
.article-icon {
  position: relative;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 50%;
  background: transparent;
  padding: 0;
}

.article-back::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border-left: 2px solid #191412;
  border-bottom: 2px solid #191412;
  top: 8px;
  left: 10px;
  transform: rotate(45deg);
}

.article-star::before {
  content: "☆";
  color: #191412;
  font-size: 33px;
  line-height: 1;
}

.article-share::before {
  content: "↗";
  color: #191412;
  font-size: 30px;
  line-height: 1;
}

.article-cover {
  aspect-ratio: 1.98 / 1;
  height: auto;
  border-radius: 13px;
  box-shadow: 0 18px 38px rgba(72, 52, 42, .1);
}

.article-detail h1 {
  margin: 24px 0 9px;
  color: #44302a;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 30px;
  line-height: 1.35;
}

.article-detail .article-summary {
  margin: 0;
  color: #8b817a;
  font-size: 15px;
  line-height: 1.7;
}

.article-author {
  gap: 11px;
  margin: 26px 0 28px;
}

.author-avatar {
  display: flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #d8b895, #ead9c6);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 13px;
}

.article-author strong {
  color: #33221d;
  font-size: 15px;
}

.article-author p {
  margin: 2px 0 0;
  color: #8f8580;
  font-size: 13px;
}

.article-author button {
  min-height: 37px;
  margin-left: auto;
  border-radius: 999px;
  background: #e3c7aa;
  color: #5a3d31;
  padding: 0 15px;
  font-size: 14px;
}

.mobile-article .article-content {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
  color: #27211e;
  font-size: 17px;
  line-height: 2;
}

.mobile-article .article-content p {
  margin: 0 0 24px;
}

.article-content h2 {
  position: relative;
  margin: 30px 0 13px;
  padding-left: 14px;
  color: #211815;
  font-size: 19px;
  line-height: 1.45;
}

.article-content h2::before {
  top: 7px;
  height: 20px;
}

.article-inline-image {
  aspect-ratio: 1.9 / 1;
  height: auto;
  margin: 16px 0 32px;
  border-radius: 9px;
}

.article-bottom-actions {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 0;
  justify-content: space-between;
  gap: 11px;
  width: min(100%, 430px);
  min-height: 78px;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, .9);
  padding: 13px 20px max(13px, env(safe-area-inset-bottom));
  box-shadow: 0 -12px 34px rgba(53, 40, 34, .1);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.article-bottom-actions button {
  min-height: 42px;
  border-radius: 999px;
  background: transparent;
  color: #5f5651;
  padding: 0;
  white-space: nowrap;
}

.article-bottom-actions .comment-input {
  justify-content: flex-start;
  width: 180px;
  background: #f4f1ee;
  color: #aaa19b;
  padding: 0 16px;
}

.article-bottom-actions span {
  margin-left: 3px;
}

@media (min-width: 680px) {
  .mobile-shell {
    margin-top: 24px;
    margin-bottom: 24px;
    border-radius: 26px;
    box-shadow: 0 24px 80px rgba(80, 54, 44, .1);
  }

  .article-bottom-actions {
    bottom: 24px;
    border-radius: 24px;
  }
}

@media (max-width: 380px) {
  .mobile-home {
    padding: 38px 14px 36px;
  }

  .home-brand {
    font-size: 36px;
  }

  .home-carousel {
    min-height: 170px;
  }

  .carousel-copy h1 {
    font-size: 23px;
  }

  .carousel-copy p {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-article-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
  }

  .mobile-article-card h3 {
    font-size: 14px;
  }

  .mobile-article-card p,
  .home-count-pill,
  .category-chip {
    font-size: 11px;
  }

  .article-bottom-actions {
    gap: 7px;
    padding-inline: 14px;
  }

  .article-bottom-actions .comment-input {
    width: 142px;
  }
}

@media (max-width: 820px) {
  .site-header,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .service-band,
  .article-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 12px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .admin-nav {
    flex-wrap: wrap;
  }
}
