@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&family=Merienda:wght@400;700&display=swap");

:root {
  --beige-50: #f8f1e6;
  --beige-100: #efe3cf;
  --beige-200: #e2d0b2;
  --rose-500: #b84f5f;
  --rose-700: #7f3540;
  --ink-700: #3e3029;
  --ink-900: #231a15;
  --paper: #fffaf3;
  --shadow-soft: 0 14px 32px rgba(79, 55, 37, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--ink-900);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.6;
  background: linear-gradient(175deg, var(--beige-50), var(--beige-100));
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
.brand {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  letter-spacing: 0.02em;
}

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

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

.page-shell {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.brand {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0;
}

.nav-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-pill {
  border: 1px solid rgba(61, 39, 27, 0.16);
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  background: rgba(255, 250, 243, 0.85);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.nav-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(61, 39, 27, 0.15);
}

.page-note {
  margin: 0 0 2rem;
  color: rgba(35, 26, 21, 0.76);
  font-size: 0.95rem;
}

.page-note a {
  color: var(--rose-700);
  text-decoration: underline;
}

.home-page {
  background: var(--beige-50);
}

.home-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.home-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.5), transparent 50%),
    radial-gradient(circle at 78% 78%, rgba(220, 186, 146, 0.22), transparent 48%);
}

.center-rose {
  position: relative;
  z-index: 2;
  width: min(360px, 72vw);
  filter: drop-shadow(0 20px 28px rgba(118, 73, 37, 0.28));
  animation: rise-in 900ms ease both;
}

.icon-dock {
  position: absolute;
  z-index: 3;
  inset: auto 0 7vh;
  display: flex;
  justify-content: center;
  gap: clamp(0.9rem, 2.4vw, 1.6rem);
  padding: 0 1rem;
  flex-wrap: wrap;
}

.icon-link {
  width: 126px;
  height: 126px;
  border-radius: 28px;
  border: 1px solid rgba(76, 48, 32, 0.13);
  background: rgba(255, 249, 240, 0.94);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  gap: 0.35rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.icon-link:hover {
  transform: translateY(-5px) rotate(-1.2deg);
  box-shadow: 0 18px 34px rgba(79, 55, 37, 0.22);
}

.icon-link img {
  width: 48px;
  height: 48px;
}

.home-title {
  position: absolute;
  z-index: 3;
  top: 8vh;
  font-size: clamp(2rem, 5.6vw, 4rem);
  margin: 0;
  color: var(--rose-700);
  text-shadow: 0 8px 26px rgba(157, 98, 72, 0.18);
  animation: fade-in 900ms ease both;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
}

.preview-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(76, 48, 32, 0.12);
  box-shadow: var(--shadow-soft);
  transition: transform 220ms ease;
}

.preview-card:hover {
  transform: translateY(-3px);
}

.preview-body {
  padding: 0.9rem 1rem 1rem;
}

.preview-title {
  margin: 0;
  font-size: 1.35rem;
}

.preview-meta {
  margin: 0.3rem 0 0;
  color: rgba(45, 31, 22, 0.72);
  font-size: 0.88rem;
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f2e5cd;
  color: #664d30;
  border: 1px solid rgba(102, 77, 48, 0.2);
  padding: 0.15rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  border-radius: 24px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(76, 48, 32, 0.12);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.2rem;
}

.featured-body {
  padding: 1.15rem 1.25rem;
}

.featured-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.featured p {
  margin: 0.65rem 0;
}

.detail-hero {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 0.78fr) 1fr;
  align-items: start;
  margin-bottom: 1rem;
}

.detail-title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3rem);
}

.detail-meta {
  color: rgba(35, 26, 21, 0.68);
  margin: 0.45rem 0 0;
}

.letter-top {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(76, 48, 32, 0.12);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1rem;
}

.letter-top img {
  width: 100%;
  max-height: min(50vh, 460px);
  object-fit: cover;
}

.letter-head {
  padding: 1rem 1.2rem;
  text-align: center;
  border-top: 1px solid rgba(76, 48, 32, 0.1);
}

.letter-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.04em;
  color: #603428;
}

.letter-frame,
.post-frame {
  background: #fffaf1;
  border: 1px solid rgba(76, 48, 32, 0.12);
  border-radius: 24px;
  padding: clamp(1.15rem, 2.5vw, 2rem);
  box-shadow: var(--shadow-soft);
}

.prose h2 {
  margin: 1.2rem 0 0.4rem;
  color: var(--rose-700);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.prose p {
  margin: 0.85rem 0;
  font-size: 1.03rem;
}

.letter-prose p {
  font-family: "Merienda", "Brush Script MT", cursive;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  line-height: 1.95;
  letter-spacing: 0.01em;
  color: #3d2b1f;
}

.letter-prose h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  color: #7f3540;
}

.prose p:last-child {
  margin-bottom: 0;
}

.overall-summary {
  background: #fffdf8;
  border: 1px solid rgba(76, 48, 32, 0.12);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.subsections-display {
  display: grid;
  gap: 0.95rem;
}

.subsection-display {
  background: #fffcf6;
  border: 1px solid rgba(76, 48, 32, 0.14);
  border-left: 4px solid #c69b67;
  border-radius: 16px;
  padding: 0.95rem;
}

.subsection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.subsection-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  color: #623a26;
}

.subsection-body p {
  margin: 0.5rem 0;
}

.create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

form.blog-form {
  background: var(--paper);
  border: 1px solid rgba(76, 48, 32, 0.12);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.88rem;
  color: rgba(35, 26, 21, 0.88);
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  border: 1px solid rgba(76, 48, 32, 0.2);
  background: #fffdf8;
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
}

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

.sections-wrap {
  margin: 1rem 0;
  display: grid;
  gap: 0.9rem;
}

.section-card {
  border: 1px solid rgba(76, 48, 32, 0.14);
  background: #fffcf6;
  border-radius: 16px;
  padding: 0.85rem;
}

.section-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 0.55rem 0.82rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--rose-500);
  color: #fff;
}

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

.btn-soft {
  background: #f2e6d3;
  color: #5e452f;
}

.btn-danger {
  background: #f7d9d9;
  color: #7e2f2f;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.top-gap {
  margin-top: 1rem;
}

.success-box {
  margin-top: 1rem;
  border-radius: 14px;
  padding: 0.9rem;
  background: #eef9ea;
  border: 1px solid #c8e5bf;
  display: none;
}

.success-box.visible {
  display: block;
}

.empty-state {
  border-radius: 18px;
  padding: 1.4rem;
  text-align: center;
  background: #fffaf1;
  border: 1px dashed rgba(76, 48, 32, 0.26);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise-in 550ms ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 110ms;
}

.reveal:nth-child(3) {
  animation-delay: 170ms;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 860px) {
  .featured,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .home-title {
    top: 5vh;
  }

  .icon-dock {
    inset: auto 0 4vh;
  }

  .icon-link {
    width: 106px;
    height: 106px;
  }
}
