*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f9f6f2;
    --surface: #ffffff;
    --border: #e8ddd4;
    --text: #1a0a0a;
    --muted: #7a6560;
    --hint: #b0a49e;
    --accent: #8b2a0a;
    --accent-bg: #f5ede8;
    --tag-diary: #f0ede8;
    --tag-diary-text: #5a4a3a;
    --tag-foot: #edf0e8;
    --tag-foot-text: #3a5a3a;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* ── NAV ── */
nav {
    border-bottom: 0.5px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.nav-brand {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    font-weight: 400;
    color: #5a0a0a;
    animation: fadeUp 2s ease forwards;
    letter-spacing: 2px;
    text-decoration: none;
    line-height: 1;
    padding-top: 6px;
}

.nav-brand:hover {
    color: #8b2a0a;
}

.nav-back {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-back:hover {
    color: var(--accent);
}

/* ── ARTICLE ── */
article {
    max-width: 720px;
    margin: 0 auto;
    padding: 44px 24px 80px;
}

.breadcrumb {
    font-size: 12px;
    color: var(--hint);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a {
    color: var(--hint);
    text-decoration: none;
}

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

.breadcrumb span {
    color: var(--border);
}

.post-header {
    margin-bottom: 32px;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.tag {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
}

.tag-chaster {
    background: var(--accent-bg);
    color: var(--accent);
}

.tag-diary {
    background: var(--tag-diary);
    color: var(--tag-diary-text);
}

.tag-foot {
    background: var(--tag-foot);
    color: var(--tag-foot-text);
}

.post-date {
    font-size: 12px;
    color: var(--hint);
}

.post-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
}

.post-divider {
    border: none;
    border-top: 0.5px solid var(--border);
    margin: 28px 0;
}

/* ── CHASTER BLOCK ── */
.chaster-block {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 20px 22px;
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chaster-block-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.chaster-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chaster-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.chaster-row-label {
    color: var(--muted);
}

.chaster-row-value {
    font-weight: 500;
    color: var(--text);
}

.chaster-row-value.added {
    background: var(--accent-bg);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.chaster-note {
    font-size: 12px;
    color: var(--hint);
    border-top: 0.5px solid var(--border);
    padding-top: 12px;
    font-style: italic;
}

/* ── BODY TEXT ── */
.post-body {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    line-height: 1.85;
    color: #2a1510;
    text-align: justify;
}

.post-body p {
    margin-bottom: 1.4em;
}

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

.post-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--accent);
}

/* ── FOOTER ── */
.post-footer {
    margin-top: 52px;
    padding-top: 28px;
    border-top: 0.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.back-to-blog {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}

.back-to-blog:hover {
    color: var(--accent);
}

.chaster-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chaster-cta-text {
    font-size: 12px;
    color: var(--hint);
}

.chaster-cta-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border: 0.5px solid #d4a090;
    padding: 7px 16px;
    border-radius: 6px;
    background: var(--accent-bg);
    white-space: nowrap;
}

.chaster-cta-link:hover {
    background: #eeddd8;
}

/* ── AGE GATE ── */
#age-gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gate-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 5, 3, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.gate-box {
    position: relative;
    z-index: 2;
    background: #1a1410;
    border: 0.5px solid #3a2a1a;
    border-radius: 12px;
    padding: 36px 32px 28px;
    max-width: 420px;
    width: 100%;
}

.gate-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    color: #f0e6d3;
    margin-bottom: 16px;
    line-height: 1.3;
}

.gate-title em {
    color: #c4623a;
    font-style: normal;
}

.gate-text {
    font-size: 13px;
    color: #7a6a5a;
    line-height: 1.7;
    margin-bottom: 10px;
}

.gate-divider {
    border: none;
    border-top: 0.5px solid #2a1a0a;
    margin: 20px 0;
}

.gate-cta {
    font-size: 13px;
    color: #a09080;
    text-align: center;
    margin-bottom: 14px;
}

.gate-btn {
    width: 100%;
    padding: 14px;
    background: #8b2a0a;
    color: #f0e6d3;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.gate-btn:hover {
    background: #a03010;
}

.gate-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.gate-footer a {
    font-size: 11px;
    color: #5a4a3a;
    text-decoration: underline;
}

.rta {
    font-size: 10px;
    color: #4a3a2a;
    border: 0.5px solid #3a2a1a;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.1em;
}

@media (max-width: 600px) {
    .post-title {
        font-size: 28px;
    }

    .post-body {
        font-size: 17px;
    }

    .gate-box {
        padding: 28px 20px 22px;
    }

    .post-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── BLOG INDEX ── */
.blog-header {
  padding: 40px 24px 0;
  max-width: 720px;
  margin: 0 auto;
}
.blog-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 8px;
}
.blog-header p { font-size: 13px; color: var(--muted); }

.tabs-wrap {
  max-width: 720px;
  margin: 28px auto 0;
  padding: 0 24px;
  border-bottom: 0.5px solid var(--border);
  display: flex;
}
.tab {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 10px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }

.posts {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s;
  margin-bottom: 16px;
}
.post-card:hover { border-color: #c8a89a; }

.post-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.post-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 2.2;
  margin-bottom: 8px;
  color: var(--text);
}

.post-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.read-more { font-size: 12px; color: var(--accent); font-weight: 500; }
.chaster-badge { font-size: 11px; color: var(--hint); }
.chaster-badge span {
  background: #f9f0ec;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.post-date { font-size: 12px; color: var(--hint); }

.empty {
  text-align: center;
  padding: 60px 0;
  color: var(--hint);
  font-size: 14px;
  display: none;
  max-width: 720px;
  margin: 0 auto;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 32px 0;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  border: 0.5px solid var(--border);
}
.full-set-link {
  margin: 24px 0;
  text-align: center;
}
.full-set-link a {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border: 0.5px solid #d4a090;
  padding: 10px 24px;
  border-radius: 6px;
  background: var(--accent-bg);
}
.full-set-link a:hover { background: #eeddd8; }

.post-card-cover {
  margin: -20px -22px 16px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card-cover img {
  transform: scale(1.03);
}

.photo-slider {
  position: relative;
  margin: 32px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f0ede8;
}
.photo-slider-track {
  display: flex;
  transition: transform 0.4s ease;
}
.photo-slider-track img {
  min-width: 100%;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.photo-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.photo-slider-btn:hover { background: rgba(255,255,255,1); }
.photo-slider-btn.prev { left: 12px; }
.photo-slider-btn.next { right: 12px; }
.photo-slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 6px;
}
.photo-slider-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4c4bc;
  cursor: pointer;
  transition: background 0.15s;
}
.photo-slider-dots span.active { background: #8b2a0a; }