/* ==========================================================================
   FoodShare · The Daily Plate
   Editorial magazine redesign (desktop-first)
   Palette: warm paper + ink + tomato accent
   ========================================================================== */

:root {
  /* paper & ink */
  --paper: #f6f1e7;
  --paper-2: #efe7d8;
  --card: #fffdf8;
  --ink: #221a10;
  --ink-soft: #4c4132;
  --mut: #8b7d68;
  --line: #e5d9c3;
  --line-soft: #efe7d8;

  /* accents */
  --tomato: #e4572e;
  --tomato-deep: #b8431d;
  --gold: #c9a227;
  --olive: #6c7a4f;
  --berry: #a63a50;
  --plum: #5f4b8b;
  --slate: #47708f;

  /* category colors */
  --c-meat: #c0532f;
  --c-cheese: #c9a227;
  --c-fastfood: #cf5c1f;
  --c-drink: #2f7f9f;
  --c-guides: #4d7c4f;

  /* type */
  --serif: Georgia, 'Times New Roman', 'Songti SC', 'STSong', SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
          'PingFang SC', 'Microsoft YaHei', sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --sh-sm: 0 1px 2px rgba(34, 26, 16, .06), 0 4px 14px rgba(34, 26, 16, .05);
  --sh-md: 0 6px 18px rgba(34, 26, 16, .09), 0 18px 50px rgba(34, 26, 16, .12);
  --sh-tomato: 0 10px 30px rgba(228, 87, 46, .28);
  --container: 1200px;
}

/* ============ Reset & base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 500px at 85% -100px, rgba(201, 162, 39, .10), transparent 60%),
    radial-gradient(900px 420px at -10% 8%, rgba(228, 87, 46, .08), transparent 55%),
    var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
::selection { background: var(--tomato); color: #fff; }

.wrap { max-width: var(--container); margin: 0 auto; padding-left: 28px; padding-right: 28px; }

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--tomato);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before { content: ''; width: 26px; height: 2px; background: currentColor; display: inline-block; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--tomato); color: #fff; box-shadow: var(--sh-tomato);
}
.btn-primary:hover { background: var(--tomato-deep); box-shadow: 0 14px 34px rgba(228, 87, 46, .34); }

.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--tomato); color: var(--tomato); box-shadow: var(--sh-sm); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--paper-2); }

.btn-sm { padding: 9px 18px; font-size: 13px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(34, 26, 16, .06); color: var(--ink-soft);
}

/* ============ Header (masthead strip) ============ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 241, 231, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease, background .3s ease;
}
.header.scrolled { box-shadow: 0 10px 30px rgba(34, 26, 16, .08); background: rgba(246, 241, 231, .95); }

.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 28px;
}

.logo { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(140deg, var(--tomato), #f08a4b);
  color: #fff; font-size: 20px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(228, 87, 46, .35);
}
.logo-word {
  font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: -.01em;
  display: flex; flex-direction: column; line-height: 1.05;
}
.logo-word small {
  font-family: var(--sans); font-weight: 700; font-size: 8.5px; letter-spacing: .34em;
  text-transform: uppercase; color: var(--tomato);
}

.nav-menu { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-item {
  position: relative; padding: 9px 15px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  border-radius: 10px; transition: color .2s ease, background .2s ease;
}
.nav-item:hover { color: var(--tomato); background: rgba(228, 87, 46, .08); }
.nav-item.active { color: var(--ink); }
.nav-item.active::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 3px; height: 2.5px;
  background: var(--tomato); border-radius: 2px;
}

.header-cta { display: flex; align-items: center; gap: 10px; }

/* ============ Header search ============ */
.header-search {
  position: relative;
  display: flex; align-items: center;
  margin-left: 12px;
  flex: 1; max-width: 280px;
  background: #f4f1ec;
  border-radius: 24px;
  padding: 0 12px 0 14px;
  border: 1.5px solid transparent;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.header-search:hover { background: #ece8e1; }
.header-search.focused {
  background: #fff;
  border-color: var(--tomato);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, .15);
}
.search-icon {
  color: var(--mut);
  flex-shrink: 0;
  margin-right: 6px;
}
.header-search.focused .search-icon { color: var(--tomato); }
.header-search input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-size: 14px; font-family: inherit; color: var(--ink);
  padding: 9px 2px;
}
.header-search input::placeholder { color: var(--mut); }
.search-clear {
  display: none;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.1); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
  align-items: center; justify-content: center;
  padding: 0; flex-shrink: 0;
}
.header-search input:not(:placeholder-shown) ~ .search-clear { display: inline-flex; }
.search-clear:hover { background: rgba(0,0,0,.2); }

/* ============ Masthead (home hero) ============ */
.masthead { padding: 46px 28px 26px; }
.mast-grid {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 44px; align-items: center;
}
.mast-copy { padding: 18px 0; }
.mast-title {
  font-family: var(--serif); font-size: clamp(46px, 5vw, 72px);
  line-height: 1.04; letter-spacing: -.02em; margin: 18px 0 20px; color: var(--ink);
}
.mast-title em {
  font-style: italic; color: var(--tomato);
  background: linear-gradient(120deg, var(--tomato), #c9a227);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.mast-sub { font-size: 18px; color: var(--mut); max-width: 46ch; }
.mast-actions { display: flex; gap: 12px; margin: 28px 0 30px; flex-wrap: wrap; }

.mast-stats {
  display: flex; border-top: 1px solid var(--line); padding-top: 18px; gap: 34px;
}
.mast-stats li { display: flex; flex-direction: column; }
.mast-stats b { font-family: var(--serif); font-size: 30px; line-height: 1; }
.mast-stats span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); margin-top: 6px; }

/* Featured story card (masthead right) */
.featured-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
  aspect-ratio: 5 / 6; min-height: 430px;
  box-shadow: var(--sh-md); background: var(--paper-2);
  isolation: isolate;
}
.featured-media {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.featured-card:hover .featured-media { transform: scale(1.045); }
.featured-shade {
  position: absolute; inset: 0;
  background: linear-gradient(185deg, rgba(24, 16, 8, .04) 30%, rgba(24, 16, 8, .16) 55%, rgba(24, 16, 8, .86) 100%);
}
.featured-body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 26px 24px; color: #fff;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.chip-paper { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px); }
.featured-title {
  font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 2vw, 30px);
  line-height: 1.22; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.featured-meta { font-size: 13px; color: rgba(255, 255, 255, .82); display: flex; gap: 8px; align-items: center; }

/* Today's highlights (3-up) */
.highlights { padding: 30px 28px 8px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 14px 0 22px; }
.sec-title { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 36px); letter-spacing: -.01em; margin-top: 6px; }
.sec-link { font-size: 14px; font-weight: 600; color: var(--tomato); white-space: nowrap; }
.sec-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.hl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.hl-card { cursor: pointer; }
.hl-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hl-num { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold); font-weight: 700; }
.hl-chip { padding: 3px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.hl-media {
  border-radius: var(--r-md); overflow: hidden; aspect-ratio: 3 / 2; margin-bottom: 14px;
  box-shadow: var(--sh-sm); background: var(--paper-2);
}
.hl-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hl-card:hover .hl-media img { transform: scale(1.06); }
.hl-title {
  font-family: var(--serif); font-size: 20px; line-height: 1.32; letter-spacing: -.005em; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .2s ease;
}
.hl-card:hover .hl-title { color: var(--tomato); }
.hl-meta { font-size: 13px; color: var(--mut); margin-top: 8px; }

/* ============ Stats band ============ */
.stats-band {
  margin: 46px 28px 10px; border-radius: var(--r-lg);
  background: var(--ink); color: #f4ecdd;
  display: grid; grid-template-columns: repeat(4, 1fr);
  overflow: hidden; box-shadow: var(--sh-md);
}
.stat-cell { padding: 26px 28px; text-align: center; position: relative; }
.stat-cell + .stat-cell::before {
  content: ''; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px;
  background: rgba(255, 255, 255, .12);
}
.stat-cell b { font-family: var(--serif); font-size: 40px; display: block; line-height: 1; }
.stat-cell b i { font-style: normal; color: var(--gold); }
.stat-cell span {
  display: block; margin-top: 8px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(244, 236, 221, .62);
}

/* ============ Category explorer ============ */
.explore { padding: 40px 28px 6px; }
.explore-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }

.cat-card {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  aspect-ratio: 4 / 5; min-height: 200px;
  display: flex; align-items: flex-end; cursor: pointer;
  background-size: cover; background-position: center; background-color: var(--paper-2);
  box-shadow: var(--sh-sm);
  isolation: isolate;
}
.cat-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(24,16,8,0) 34%, rgba(24,16,8,.72) 100%);
  transition: background .3s ease;
}
.cat-card:hover::before { background: linear-gradient(180deg, rgba(228,87,46,0) 20%, rgba(24,16,8,.82) 100%); }
.cat-emoji {
  position: absolute; top: 14px; left: 14px; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.9); box-shadow: var(--sh-sm);
  display: grid; place-items: center; font-size: 21px;
}
.cat-info { padding: 16px; color: #fff; width: 100%; }
.cat-info b { font-family: var(--serif); font-size: 21px; display: block; letter-spacing: -.01em; }
.cat-info span { font-size: 12.5px; opacity: .85; display: block; margin-top: 2px; }
.cat-arrow { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; font-size: 16px; backdrop-filter: blur(4px); transition: transform .25s ease, background .25s ease; }
.cat-card:hover .cat-arrow { transform: translateX(3px); background: var(--tomato); }

/* ============ Latest feed ============ */
.latest { padding: 46px 28px 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; }

.category-tab {
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink-soft);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .2s ease;
}
.category-tab:hover { border-color: var(--tomato); color: var(--tomato); transform: translateY(-1px); }
.category-tab.active {
  background: var(--ink); color: #f6f1e7; border-color: var(--ink);
  box-shadow: var(--sh-sm);
}

/* Feed */
.feed-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; padding: 6px 0 8px;
}
.feed-count { font-size: 13.5px; color: var(--mut); }

/* Card */
.card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  overflow: hidden; cursor: pointer; box-shadow: var(--sh-sm);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease;
  animation: cardIn .55s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: var(--line); }

.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.card:hover .card-img { transform: scale(1.07); }
.card-cat {
  position: absolute; top: 12px; left: 12px; color: #fff;
  padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
.card-body { padding: 16px 18px 17px; }
.card-title {
  font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.34;
  letter-spacing: -.004em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.34em * 2);
  transition: color .2s ease;
}
.card:hover .card-title { color: var(--tomato); }
.card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--mut);
}

/* load more */
.load-more-wrap { text-align: center; padding: 34px 0 10px; }
.load-more-btn { padding: 14px 34px; }

/* ============ Newsletter band ============ */
.cta-band {
  margin: 56px 28px 0; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(700px 300px at 88% 0%, rgba(201, 162, 39, .5), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(228, 87, 46, .45), transparent 60%),
    var(--ink);
  color: #f4ecdd; box-shadow: var(--sh-md);
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 30px;
  padding: 46px 52px;
}
.cta-band .kicker { color: var(--gold); }
.cta-title { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -.01em; margin-top: 10px; }
.cta-sub { color: rgba(244, 236, 221, .72); margin-top: 12px; max-width: 44ch; font-size: 15px; }

.nl-form { display: flex; gap: 10px; }
.nl-field {
  flex: 1; min-width: 0; padding: 13px 18px; border-radius: 999px; border: 1px solid transparent;
  background: #fff; font-size: 14.5px; color: var(--ink); outline: none;
}
.nl-field:focus { border-color: var(--tomato); box-shadow: 0 0 0 4px rgba(228, 87, 46, .18); }
.nl-msg { margin-top: 10px; font-size: 13.5px; color: #bfe0c2; min-height: 1.2em; }
.nl-msg.err { color: #f0b0a0; }

/* ============ Footer ============ */
.footer {
  margin-top: 58px; background: #191207; color: #c9bda6;
  border-top: 4px solid var(--tomato);
}
.footer-grid {
  max-width: var(--container); margin: 0 auto; padding: 54px 28px 40px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px;
}
.footer-brand .logo-word { color: #f4ecdd; font-size: 26px; }
.footer-brand .logo-word small { color: var(--gold); }
.footer-about { margin-top: 14px; font-size: 14px; line-height: 1.7; color: rgba(201, 189, 166, .78); max-width: 34ch; }
.footer h4 { color: #f4ecdd; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col a { font-size: 14.5px; color: #c9bda6; transition: color .2s ease; }
.footer-col a:hover { color: #fff; }
.footer-note { max-width: var(--container); margin: 0 auto; padding: 20px 28px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: rgba(201,189,166,.6); }

/* ============ Detail page ============ */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--tomato), var(--gold)); z-index: 200; transition: width .1s linear; }

.detail-page { padding: 38px 28px 0; }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--mut); margin-bottom: 26px; transition: color .2s ease; }
.back-link:hover { color: var(--tomato); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 46px; align-items: start; }
.detail-main { min-width: 0; }

.detail-article { }
.article-kicker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-type-badge {
  padding: 6px 15px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.detail-readtime { font-size: 13px; color: var(--mut); }
.detail-title {
  font-family: var(--serif); font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.12; letter-spacing: -.015em; margin: 20px 0 16px;
}
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; color: var(--mut); padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.detail-meta b { color: var(--ink-soft); font-weight: 600; }

.detail-cover { border-radius: var(--r-md); box-shadow: var(--sh-md); margin-bottom: 30px; width: 100%; max-height: 560px; object-fit: cover; }

.detail-content { font-family: var(--serif); font-size: 19px; line-height: 1.85; color: var(--ink-soft); }
.detail-content p { margin-bottom: 22px; }
.detail-content img { border-radius: var(--r-md); margin: 28px auto; box-shadow: var(--sh-sm); width: auto; max-width: 100%; }
.detail-content h2, .detail-content h3 { font-family: var(--sans); color: var(--ink); margin: 34px 0 12px; letter-spacing: -.01em; }
.detail-content h2 { font-size: 26px; }
.detail-content h3 { font-size: 21px; }
.detail-content a { color: var(--tomato); text-decoration: underline; text-underline-offset: 3px; }
.detail-content blockquote { border-left: 3px solid var(--tomato); padding: 4px 0 4px 20px; color: var(--ink); font-style: italic; margin: 26px 0; }
.detail-content ul, .detail-content ol { margin: 0 0 22px 24px; }
.detail-content li { margin-bottom: 8px; }

.article-end { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row { display: flex; align-items: center; gap: 8px; }
.share-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); font-weight: 700; margin-right: 4px; }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 15px; color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line);
  transition: all .2s ease;
}
.share-btn:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.share-copy.ok { background: var(--olive); color: #fff; }

/* Sidebar */
.detail-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 22px; }
.side-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 22px; box-shadow: var(--sh-sm); }
.side-card h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 6px; }
.side-card .side-sub { font-size: 13px; color: var(--mut); margin-bottom: 16px; }
.side-title-line { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--tomato); margin-bottom: 16px; display: block; }

.side-nl .nl-field { background: var(--paper); border: 1px solid var(--line); }

.rel-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; align-items: center; }
.rel-item:last-child { border-bottom: none; padding-bottom: 0; }
.rel-thumb { width: 78px; height: 60px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--paper-2); }
.rel-body { min-width: 0; }
.rel-body h4 { font-family: var(--serif); font-size: 15px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.rel-item:hover h4 { color: var(--tomato); }
.rel-meta { font-size: 12px; color: var(--mut); margin-top: 4px; }

.source-box { display: flex; align-items: center; gap: 14px; }
.source-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(140deg, var(--gold), var(--tomato)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.source-box b { display: block; font-size: 15px; }
.source-box span { font-size: 12.5px; color: var(--mut); }

/* ============ Category page ============ */
.category-page { padding: 40px 28px 0; }
.page-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 10px 0 6px; }
.page-title { font-family: var(--serif); font-size: clamp(34px, 4vw, 52px); letter-spacing: -.02em; line-height: 1.05; margin-top: 12px; }
.page-sub { color: var(--mut); margin-top: 14px; max-width: 60ch; font-size: 16.5px; }

.cat-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin: 30px 0 26px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tag {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all .2s ease;
}
.filter-tag:hover { border-color: var(--tomato); color: var(--tomato); }
.filter-tag.active { background: var(--tomato); color: #fff; border-color: var(--tomato); box-shadow: var(--sh-tomato); }
.cat-result { font-size: 13.5px; color: var(--mut); white-space: nowrap; }

/* category cover intro */
.cat-intro { border-radius: var(--r-lg); overflow: hidden; position: relative; min-height: 240px; display: flex; align-items: flex-end; margin-bottom: 10px; box-shadow: var(--sh-md); background-size: cover; background-position: center; isolation: isolate; }
.cat-intro::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(24,16,8,0) 40%, rgba(24,16,8,.85) 100%); }
.cat-intro-body { padding: 30px; color: #fff; display: flex; align-items: center; gap: 16px; }
.cat-intro-body .big-emoji { font-size: 46px; width: 84px; height: 84px; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); border-radius: 20px; display: grid; place-items: center; }
.cat-intro-body h2 { font-family: var(--serif); font-size: clamp(26px, 3vw, 40px); }
.cat-intro-body p { color: rgba(255,255,255,.8); font-size: 14.5px; margin-top: 6px; }

/* ============ Privacy ============ */
.privacy-page { padding: 40px 28px 0; }
.privacy-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; max-width: 1000px; margin: 0 auto; }
.privacy-toc { position: sticky; top: 110px; align-self: start; display: flex; flex-direction: column; gap: 8px; }
.privacy-toc .kicker { margin-bottom: 8px; }
.privacy-toc a { font-size: 13.5px; color: var(--mut); padding: 5px 0; border-bottom: 1px dashed var(--line); transition: color .2s; }
.privacy-toc a:hover { color: var(--tomato); }
.privacy-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: clamp(26px, 4vw, 54px); box-shadow: var(--sh-sm); }
.privacy-card h1 { font-family: var(--serif); font-size: clamp(30px, 3vw, 42px); margin: 14px 0 6px; letter-spacing: -.015em; }
.privacy-updated { color: var(--mut); font-size: 13.5px; margin-bottom: 34px; }
.privacy-card p { color: var(--ink-soft); line-height: 1.85; margin-bottom: 14px; }
.privacy-card h2 { font-family: var(--serif); font-size: 23px; margin: 30px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.privacy-card h2 .sec-num { color: var(--tomato); font-style: italic; margin-right: 8px; }

/* ============ Empty & loading ============ */
.empty-state { text-align: center; padding: 80px 20px; color: var(--mut); }
.empty-state-icon { font-size: 60px; margin-bottom: 16px; opacity: .6; }
.empty-state-text { font-size: 18px; font-family: var(--serif); color: var(--ink-soft); }

.loading { text-align: center; padding: 80px 20px; }
.spinner { width: 44px; height: 44px; margin: 0 auto 18px; border: 3px solid var(--line); border-top-color: var(--tomato); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--mut); font-size: 14px; letter-spacing: .06em; }

/* skeleton */
.skel-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.skel-media { aspect-ratio: 16/10; background: linear-gradient(100deg, var(--paper-2) 40%, #e9dfcc 50%, var(--paper-2) 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skel-line { height: 14px; margin: 14px 18px 0; border-radius: 8px; background: linear-gradient(100deg, var(--paper-2) 40%, #e9dfcc 50%, var(--paper-2) 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skel-line.short { width: 55%; margin-bottom: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============ Back to top ============ */
.back-top {
  position: fixed; right: 26px; bottom: 26px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: #f4ecdd; display: grid; place-items: center;
  box-shadow: var(--sh-md); cursor: pointer; z-index: 90;
  opacity: 0; visibility: hidden; transform: translateY(14px); transition: all .3s ease;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--tomato); transform: translateY(-3px); }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .mast-grid { grid-template-columns: 1fr; gap: 30px; }
  .featured-card { max-height: 560px; }
  .explore-grid { grid-template-columns: repeat(3, 1fr); }
  .explore-grid .cat-card:nth-child(n+4) { display: none; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .detail-aside > * { flex: 1 1 260px; }
  .privacy-layout { grid-template-columns: 1fr; }
  .privacy-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .cta-band { grid-template-columns: 1fr; padding: 38px 34px; }
}

@media (max-width: 820px) {
  .wrap, .header-inner { padding-left: 18px; padding-right: 18px; }
  .masthead, .highlights, .explore, .latest, .detail-page, .category-page, .privacy-page { padding-left: 18px; padding-right: 18px; }
  .stats-band, .cta-band { margin-left: 18px; margin-right: 18px; }

  .nav-menu { gap: 2px; }
  .nav-item { padding: 8px 10px; font-size: 13.5px; }
  .header-search { max-width: 200px; margin-left: 8px; padding: 0 10px 0 12px; }
  .header-search input { font-size: 13px; }
  .header-cta .btn span.txt-hide { display: none; }

  .hl-grid, .feed-grid, .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(3)::before { display: none; }
  .stat-cell { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .detail-title { font-size: 30px; }
}

@media (max-width: 560px) {
  .logo-word { font-size: 18px; }
  .logo-word small { font-size: 7px; }
  .nav-item { font-size: 12.5px; padding: 7px 8px; }
  .header-inner { gap: 10px; }
  .header-search { max-width: 140px; padding: 0 8px 0 10px; margin-left: 6px; }
  .header-search input::placeholder { color: transparent; }
  .header-search input { font-size: 13px; padding: 8px 0; }
  .mast-title { font-size: 40px; }
  .featured-card { min-height: 360px; }
  .hl-grid, .feed-grid, .explore-grid { grid-template-columns: 1fr; }
  .mast-stats { gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .nl-form { flex-direction: column; }
  .footer-note { flex-direction: column; }
  .cat-intro-body { flex-direction: column; align-items: flex-start; }
  .article-tags { display: none; }
}
