/* I Crave Anime — Sakura Café design system */
:root {
  --bg: #fff9f4;
  --card: #ffffff;
  --pink: #ff8fab;
  --deep: #e4567e;
  --lav: #b89ae8;
  --mint: #6fcdb8;
  --sun: #ffb454;
  --ink: #4a3b42;
  --mute: #a08c95;
  --line: #ffe3ec;
  --tint-pink: #fdeef3;
  --tint-lav: #f3edfc;
  --tint-mint: #e9f8f4;
  --tint-sun: #fff3e0;
  --blush: #fff0f5;
  --font: "M PLUS Rounded 1c", sans-serif;
  --shadow-card: 0 6px 22px rgba(240, 200, 214, 0.35);
  --shadow-pop: 0 14px 40px rgba(240, 200, 214, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin: 0; text-wrap: pretty; }
p { margin: 0; text-wrap: pretty; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-logo { font-weight: 800; font-size: 23px; }
.nav-logo em { font-style: normal; color: var(--deep); }
.nav-jp { font-weight: 800; font-size: 20px; color: var(--lav); line-height: 1; align-self: center; }
.nav-links { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.nav-links > a { padding: 8px 14px; border-radius: 999px; transition: background 0.15s; }
.nav-links > a:hover { background: var(--tint-pink); color: var(--deep); }
.nav-links > a.active { background: var(--pink); color: #fff; }
.btn-start { background: var(--ink); color: #fff; padding: 9px 20px; border-radius: 999px; }
.btn-start:hover { background: var(--deep); }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span { width: 22px; height: 2.5px; background: var(--deep); border-radius: 2px; }

/* ---------- Buttons, chips, bowls ---------- */
.btn { display: inline-block; font-weight: 800; font-size: 15px; padding: 13px 30px; border-radius: 999px; cursor: pointer; border: none; font-family: var(--font); }
.btn-primary { background: var(--deep); color: #fff; box-shadow: 0 6px 18px rgba(228, 86, 126, 0.27); }
.btn-primary:hover { background: #cf3f68; }
.btn-ghost { background: #fff; color: var(--deep); border: 2px solid var(--pink); }
.chip { display: inline-block; font-weight: 800; font-size: 11.5px; color: #fff; padding: 5px 13px; border-radius: 999px; }
.chip-review { background: var(--deep); }
.chip-watch { background: var(--lav); }
.chip-seasonal { background: var(--mint); }
.chip-news { background: var(--sun); }
.bowls { font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
.bowls .off { opacity: 0.22; filter: grayscale(1); }
.meta { font-size: 13px; font-weight: 700; color: var(--mute); }

/* ---------- Placeholders (swap for real images) ---------- */
.ph { position: relative; background: var(--tint-pink); border-radius: 20px; overflow: hidden; }
.ph::after { content: ""; position: absolute; top: 12px; right: 16px; width: 13px; height: 13px; background: #ffd1de; border-radius: 70% 0 70% 70%; transform: rotate(45deg); }
.ph > span { position: absolute; bottom: 10px; left: 14px; font-weight: 700; font-size: 11px; color: #d9a8b8; }
.ph-lav { background: var(--tint-lav); }
.ph-mint { background: var(--tint-mint); }
.ph-sun { background: var(--tint-sun); }

/* ---------- Petals ---------- */
.petal { position: absolute; width: 13px; height: 13px; background: #ffd1de; border-radius: 70% 0 70% 70%; transform: rotate(45deg); opacity: 0.8; pointer-events: none; }

/* ---------- Waves ---------- */
.wave { display: block; width: 100%; height: 28px; }
.wave.flip { transform: scaleY(-1); }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow-card); }
.post-card { padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.post-card .ph { aspect-ratio: 16/10; }
.post-card-body { display: flex; flex-direction: column; gap: 9px; padding: 2px 8px 8px; align-items: flex-start; }
.post-card h3 { font-size: 18.5px; line-height: 1.32; }
.post-card-meta { display: flex; align-items: center; gap: 10px; }

/* ---------- Section headers ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; gap: 16px; }
.sec-head h2 { font-size: 29px; }
.sec-head .more { font-weight: 700; font-size: 14px; color: var(--deep); white-space: nowrap; }
.sec-sub { font-size: 14px; font-weight: 700; color: var(--lav); }

/* ---------- Leaderboard ---------- */
.board { display: flex; flex-direction: column; gap: 10px; }
.board-row { display: flex; align-items: center; gap: 20px; background: #fff; border-radius: 18px; padding: 14px 22px; box-shadow: 0 4px 14px rgba(240, 200, 214, 0.2); }
.board-rank { font-weight: 800; font-size: 26px; color: #e8c7d2; width: 30px; flex: 0 0 auto; }
.board-row:first-child .board-rank { color: var(--deep); }
.board-title { font-weight: 800; font-size: 17.5px; flex: 1; }
.board-delta { font-weight: 800; font-size: 13px; width: 42px; text-align: right; flex: 0 0 auto; }
.up { color: var(--mint); } .down { color: var(--deep); } .same { color: var(--mute); }

/* ---------- Menu list (dotted leaders) ---------- */
.menu-row { display: flex; align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 2px dotted var(--line); }
.menu-row:last-child { border-bottom: none; }
.menu-row strong { font-weight: 800; font-size: 17px; }
.menu-row .dots { flex: 1; border-bottom: 2px dotted #f3d9e2; transform: translateY(-4px); }
.menu-row .time { font-weight: 700; font-size: 13px; color: var(--deep); white-space: nowrap; }
.menu-row:hover strong { color: var(--deep); }

/* ---------- Article pages ---------- */
.article-head { text-align: center; max-width: 760px; margin: 0 auto; padding: 36px 0 28px; position: relative; }
.article-head h1 { font-size: 42px; margin: 14px 0 12px; }
.article-hero { max-width: 860px; margin: 0 auto; }
.article-hero .ph { aspect-ratio: 16/8; }
.prose { max-width: 680px; margin: 0 auto; padding: 36px 0 10px; display: flex; flex-direction: column; gap: 18px; font-size: 16.5px; font-weight: 500; }
.prose h2 { font-size: 26px; margin-top: 18px; }
.prose h3 { font-size: 20px; margin-top: 8px; }
.prose .lead { font-size: 19px; color: var(--mute); font-weight: 600; }
.prose ul, .prose ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.prose .ph { aspect-ratio: 16/9; margin: 10px 0; }
.callout { background: var(--tint-lav); border-radius: 18px; padding: 18px 22px; font-weight: 600; font-size: 15px; }
.callout strong { color: var(--deep); }

/* ---------- Score card (Crave Meter) ---------- */
.score-card { background: linear-gradient(135deg, #ffe3ec, #efe4fb); border-radius: 26px; padding: 30px 34px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.score-num { font-weight: 800; font-size: 56px; color: var(--deep); line-height: 1; }
.score-num small { font-size: 22px; color: var(--mute); font-weight: 800; }
.score-label { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 220px; }
.score-label .bowls { font-size: 22px; }
.score-label strong { font-size: 21px; font-weight: 800; }
.score-label span { font-size: 13.5px; font-weight: 600; color: #8c7480; }

/* ---------- Steps (watch order) ---------- */
.steps { display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.step { display: flex; gap: 18px; align-items: flex-start; background: #fff; border-radius: 18px; padding: 18px 22px; box-shadow: 0 4px 14px rgba(240, 200, 214, 0.2); }
.step::before { counter-increment: step; content: counter(step); flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--tint-pink); color: var(--deep); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.step.skip::before { content: "✕"; background: #f5f0f2; color: var(--mute); }
.step-body { display: flex; flex-direction: column; gap: 3px; }
.step-body strong { font-size: 16.5px; font-weight: 800; }
.step-body span { font-size: 13.5px; font-weight: 600; color: var(--mute); }

/* ---------- Newsletter ---------- */
.newsletter { background: linear-gradient(135deg, #ffe3ec, #efe4fb); border-radius: 28px; padding: 34px 44px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; position: relative; overflow: hidden; }
.newsletter h3 { font-size: 24px; margin-bottom: 6px; }
.newsletter p { font-weight: 500; font-size: 15px; color: #8c7480; }
.newsletter-form { display: flex; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; }
.newsletter-form input { background: #fff; border: none; border-radius: 999px; padding: 12px 22px; font-size: 14px; font-weight: 600; color: var(--ink); font-family: var(--font); width: 210px; outline-color: var(--pink); }
.newsletter-form button:disabled { opacity: 0.6; cursor: default; }
.newsletter .nl-msg { flex-basis: 100%; font-size: 13px; font-weight: 700; color: var(--deep); margin: 0; }
.newsletter .nl-success { font-weight: 800; font-size: 16px; color: var(--deep); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #fff; margin-top: 48px; }
.footer-in { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 26px 0; flex-wrap: wrap; }
.footer-logo { font-weight: 800; font-size: 16px; }
.footer-logo em { font-style: normal; color: var(--pink); }
.footer-jp { font-weight: 700; font-size: 11px; color: #9d8b94; margin-left: 8px; }
.footer-links { display: flex; gap: 20px; font-weight: 700; font-size: 13px; color: #c9b8c0; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; font-weight: 600; color: #9d8b94; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 64px; left: 16px; right: 16px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-pop); padding: 12px; z-index: 50; }
  .nav { position: relative; }
  .nav-burger { display: flex; }
  .nav-jp { display: none; }
  .article-head h1 { font-size: 30px; }
  .sec-head h2 { font-size: 23px; }
  .score-card { padding: 24px; gap: 18px; }
  .newsletter { padding: 26px 24px; }
}

/* ============================================================
   Hugo integration additions (real content, images, prose)
   ============================================================ */

/* Image logo in nav/footer (keeps existing brand asset) */
.nav-logo-img { height: 90px; width: auto; max-width: 70vw; display: block; }
.footer-logo-img { height: 52px; width: auto; display: block; }
@media (max-width: 900px) {
  .nav-logo-img { height: 58px; }
  .nav { padding: 12px 0; }
}

/* Real cover images inside placeholder frames */
.ph.has-img { background: var(--tint-pink); }
.ph img.ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph.has-img::after { display: none; }
.ph.has-img > span { display: none; }

.post-card .ph { aspect-ratio: 1 / 1; }
.special-card .ph.has-img { aspect-ratio: 16 / 10; }
.article-hero .ph.has-img { aspect-ratio: 16 / 8; }

/* Active nav state via aria-current */
.nav-links > a[aria-current="page"] { background: var(--pink); color: #fff; }

/* Pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 40px 0 8px; }
.pager a, .pager span { font-weight: 800; font-size: 14px; padding: 9px 18px; border-radius: 999px; }
.pager a { background: #fff; color: var(--deep); box-shadow: 0 3px 10px rgba(240, 200, 214, 0.3); }
.pager a:hover { background: var(--deep); color: #fff; }
.pager .disabled { color: var(--mute); opacity: 0.5; }
.pager .current { background: var(--pink); color: #fff; }

/* Rendered-markdown prose (post body) */
.prose a { color: var(--deep); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--deep); }
.prose img { border-radius: 18px; margin: 10px 0; }
.prose figure { margin: 10px 0; }
.prose figure img { margin: 0; }
.prose figcaption { font-size: 13px; color: var(--mute); font-weight: 600; text-align: center; margin-top: 8px; }
.prose blockquote { margin: 4px 0; background: var(--tint-lav); border-radius: 18px; padding: 18px 22px; font-weight: 600; font-style: normal; color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose blockquote strong { color: var(--deep); }
.prose hr { border: none; border-top: 2px dotted var(--line); margin: 14px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 800; color: var(--deep); }
.prose code { background: var(--tint-pink); border-radius: 6px; padding: 2px 7px; font-size: 0.92em; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.prose pre { background: #2a2230; color: #fce8f0; border-radius: 16px; padding: 18px 20px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose h2 { scroll-margin-top: 90px; }
.prose h3 { scroll-margin-top: 90px; }

/* Tags row on article + cards */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 0; }
.tag-pill { font-weight: 700; font-size: 12px; color: var(--deep); background: var(--tint-pink); padding: 5px 12px; border-radius: 999px; }
.tag-pill:hover { background: var(--pink); color: #fff; }

/* Related posts */
.related { padding: 40px 0 0; }

/* Empty-state */
.empty-note { text-align: center; color: var(--mute); font-weight: 600; padding: 40px 0; }

/* List header reused from posts-head */
.list-head { text-align: center; max-width: 700px; margin: 0 auto; padding: 36px 0 26px; position: relative; }
.list-head h1 { font-size: 42px; margin: 8px 0 12px; }
.list-head p { font-size: 16px; font-weight: 500; color: var(--mute); }
@media (max-width: 900px) { .list-head h1 { font-size: 30px; } }

/* Back link */
.back-link { display: inline-block; font-weight: 700; font-size: 14px; color: var(--deep); margin: 8px 0; }
