:root {
  --paper: #fffdfd;
  --paper-soft: #fbf7f8;
  --ink: #17171a;
  --muted: #716b70;
  --line: #e8dfe3;
  --pink: #cf7897;
  --pink-soft: #f7e8ee;
  --navy: #182844;
  --navy-soft: #eef1f6;
  --shadow: 0 18px 55px rgba(24, 40, 68, .08);
  --serif: "Noto Serif JP", serif;
  --sans: "Zen Kaku Gothic New", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.8;
}
button, input { font: inherit; }
a { color: inherit; }
code {
  background: var(--navy-soft);
  color: var(--navy);
  border-radius: .35rem;
  padding: .08rem .35rem;
  font-size: .88em;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 5vw;
  background: rgba(255,253,253,.92);
  border-bottom: 1px solid rgba(232,223,227,.9);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  margin-right: auto;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  background: var(--navy);
  color: white;
  font-family: var(--serif);
  font-size: 1.1rem;
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong {
  font-family: var(--serif);
  font-size: .87rem;
  letter-spacing: .16em;
}
.brand-copy small {
  color: var(--pink);
  font-size: .66rem;
  letter-spacing: .12em;
  margin-top: .3rem;
}
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .16em;
}
.menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: .12em;
}

.hero {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(4rem, 8vw, 7rem);
}
.hero-kicker, .eyebrow {
  color: var(--pink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
}
.hero h1 {
  max-width: 900px;
  margin: 1.1rem 0 1.4rem;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 6.8rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.035em;
}
.hero h1 em {
  color: var(--navy);
  font-style: normal;
}
.hero > p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(.96rem, 1.5vw, 1.1rem);
}
.hero-rule {
  width: 92px;
  height: 3px;
  margin-top: 2.3rem;
  background: var(--pink);
}

.section {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--line);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.section-heading h2, .about-section h2 {
  margin: .55rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  font-weight: 500;
}
.entry-count {
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .08em;
}

.latest-entry {
  min-height: 280px;
  background:
    linear-gradient(135deg, rgba(247,232,238,.8), transparent 42%),
    var(--paper-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.latest-entry .entry-card {
  border: 0;
  background: transparent;
}
.latest-entry .entry-card-button {
  padding: clamp(2rem, 5vw, 4.5rem);
}
.latest-entry .entry-title {
  max-width: 820px;
  font-size: clamp(1.75rem, 4vw, 3.6rem);
}
.empty-state { padding: clamp(2rem, 5vw, 4.5rem); }
.empty-kicker { color: var(--pink); font-weight: 700; letter-spacing: .16em; font-size: .72rem; }
.empty-state h3 {
  margin: .7rem 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}
.empty-state p:last-child { color: var(--muted); }

.archive-heading { align-items: center; }
.search-box input {
  width: min(360px, 80vw);
  border: 0;
  border-bottom: 1px solid var(--navy);
  background: transparent;
  padding: .8rem .2rem;
  outline: none;
}
.search-box input:focus { border-bottom-color: var(--pink); }

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.tag-filter {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  border-radius: 999px;
  padding: .4rem .75rem;
  cursor: pointer;
  font-size: .78rem;
}
.tag-filter.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.entry-card {
  border: 1px solid var(--line);
  background: white;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.archive-list .entry-card:hover {
  transform: translateY(-3px);
  border-color: #d6c4cb;
  box-shadow: var(--shadow);
}
.entry-card-button {
  width: 100%;
  height: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 2rem;
  cursor: pointer;
  color: inherit;
}
.entry-meta, .dialog-meta {
  display: flex;
  gap: .75rem;
  align-items: center;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .08em;
}
.entry-category, #dialog-category {
  color: var(--navy);
  background: var(--navy-soft);
  padding: .14rem .45rem;
  border-radius: 999px;
  font-size: .67rem;
}
.entry-title {
  margin: .85rem 0 .45rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.5;
}
.entry-subtitle {
  color: var(--muted);
  margin: 0 0 1.1rem;
}
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.tag {
  color: #8b5368;
  background: var(--pink-soft);
  border-radius: 999px;
  padding: .16rem .55rem;
  font-size: .73rem;
}
.read-more {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--navy);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 7vw, 7rem);
}
.about-copy {
  color: var(--muted);
  padding-top: 1.2rem;
}

.entry-dialog {
  width: min(930px, 92vw);
  max-height: 90vh;
  padding: 0;
  border: 0;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(24,40,68,.25);
}
.entry-dialog::backdrop {
  background: rgba(24,40,68,.42);
  backdrop-filter: blur(5px);
}
.dialog-shell {
  position: relative;
  padding: clamp(2rem, 6vw, 5rem);
}
.dialog-close {
  position: sticky;
  float: right;
  top: 0;
  border: 0;
  background: var(--navy);
  color: white;
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.entry-dialog h2 {
  clear: both;
  margin: 1.4rem 0 .8rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.35;
  font-weight: 500;
}
.dialog-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
}
.article-rule {
  width: 72px;
  height: 3px;
  margin: 2.5rem 0;
  background: var(--pink);
}
.article-body {
  font-family: var(--serif);
  line-height: 2.05;
  font-size: 1rem;
}
.article-body h1, .article-body h2, .article-body h3 {
  color: var(--navy);
  margin-top: 2.2em;
  line-height: 1.55;
}
.article-body h2 {
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--line);
}
.article-body blockquote {
  margin: 1.8rem 0;
  padding: .3rem 1.2rem;
  border-left: 3px solid var(--pink);
  color: var(--muted);
  background: var(--paper-soft);
}
.article-body img { max-width: 100%; height: auto; }
.article-body a { color: var(--navy); text-decoration-color: var(--pink); }

.site-footer {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .08em;
}

@media (max-width: 760px) {
  .site-header { min-height: 68px; }
  .brand-copy small { display: none; }
  .menu-button { display: inline-block; }
  .site-nav {
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    padding: 1.25rem 5vw 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .section-heading, .archive-heading { align-items: flex-start; flex-direction: column; }
  .archive-list, .about-section { grid-template-columns: 1fr; }
  .search-box, .search-box input { width: 100%; }
  .site-footer { flex-direction: column; }
}


/* LINK CARDS */
.link-card {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  margin: 2rem 0;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  box-shadow: 0 14px 38px rgba(24, 40, 68, .07);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.link-card:hover {
  transform: translateY(-2px);
  border-color: #d8c2cb;
  box-shadow: 0 20px 46px rgba(24, 40, 68, .12);
}
.link-card-media {
  min-height: 180px;
  background: linear-gradient(135deg, var(--pink-soft), var(--navy-soft));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.link-card-media img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}
.link-card-placeholder {
  color: var(--navy);
  font-family: var(--serif);
  font-size: 2rem;
}
.link-card-content {
  min-width: 0;
  padding: 1.35rem 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.link-card-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: .6rem;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.link-card-brand { color: var(--pink); }
.link-card-site { color: var(--navy); }
.link-card-title {
  margin: 0 !important;
  color: var(--ink) !important;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.55;
}
.link-card-variant {
  margin: .35rem 0 0;
  color: var(--navy);
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 700;
}
.link-card-description {
  margin: .7rem 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .83rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-card-action {
  margin-top: 1rem;
  color: var(--navy);
  font-family: var(--sans);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .14em;
}
@media (max-width: 640px) {
  .link-card { grid-template-columns: 1fr; }
  .link-card-media,
  .link-card-media img {
    min-height: 210px;
    max-height: 280px;
  }
}

/* SAME-DAY ENTRY BADGE */
.entry-daynum {
  color: var(--pink);
  background: var(--pink-soft);
  border-radius: 999px;
  padding: .14rem .55rem;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
}

/* ENTRY PREV / NEXT NAVIGATION */
.entry-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.entry-nav-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--navy);
  padding: .65rem 1.1rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.entry-nav-btn:hover:not(:disabled) {
  border-color: var(--pink);
  color: var(--pink);
}
.entry-nav-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
@media (max-width: 480px) {
  .entry-nav-btn { flex: 1; text-align: center; }
}

/* HELP PAGE */
.help-back {
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .14em;
  white-space: nowrap;
}
.help-back:hover { color: var(--pink); }

.help-hero { padding-bottom: clamp(3rem, 6vw, 5rem); }
.help-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); }

.help-section .about-copy p + p { margin-top: 1rem; }

.quick-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin: 1.5rem 0;
}
.quick-chain .chain-step {
  background: var(--pink-soft);
  color: #8b5368;
  border-radius: 999px;
  padding: .45rem .95rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.quick-chain .chain-arrow {
  color: var(--pink);
  font-weight: 700;
}

.step-list { margin-top: 1.5rem; }
.step-item {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: .9rem 0;
}
.step-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-family: var(--serif);
  font-size: .82rem;
  font-weight: 600;
}
.step-done .step-num { background: var(--pink); }
.step-body h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.6;
}
.step-arrow {
  margin-left: 21px;
  color: var(--pink);
  font-size: 1rem;
  line-height: 1;
  padding: .1rem 0;
}

.help-callout {
  margin: 1.5rem 0;
  padding: 1.4rem 1.6rem;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
}
.help-callout ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink);
}
.help-callout li { margin: .5rem 0; }

.help-footer-back {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 0;
}

@media (max-width: 760px) {
  .step-item { align-items: flex-start; }
  .step-arrow { margin-left: 21px; }
}
