:root {
  --paper: #f4f1e8;
  --surface: #fffdf6;
  --ink: #1b1a17;
  --green: #2c6e4f;
  --green-dark: #20523b;
  --amber: #c9781f;
  --line: #d8d2c2;
  --tint: #e7efe5;
  --muted: #6b6558;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --shadow-hard: 4px 4px 0 rgba(27, 26, 23, 0.12);
  --shadow-hard-lg: 6px 6px 0 rgba(27, 26, 23, 0.16);
  --maxw: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(216, 210, 194, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 210, 194, 0.4) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

figure {
  margin: 0;
}

figcaption {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================================
   layout
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--green);
  text-decoration: none;
}

.brand-mark {
  width: 12px;
  height: 12px;
  background: var(--green);
  box-shadow: 3px 3px 0 var(--amber);
  flex: none;
}

.brand-slogan {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}

.nav-link {
  display: inline-block;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--green);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--green);
  font-family: var(--mono);
  font-weight: 700;
  border-bottom-color: var(--green);
  background: var(--tint);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
}

.menu-bar {
  display: block;
  height: 2px;
  background: var(--ink);
}

.mobile-drawer {
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 12px 24px 32px;
  overflow-y: auto;
}

.mobile-drawer[hidden] {
  display: none;
}

.drawer-close {
  width: 44px;
  height: 44px;
  margin-left: auto;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.drawer-close::before {
  content: "×";
}

.drawer-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.drawer-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.drawer-list a:hover {
  color: var(--green);
}

.site-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.inner-main {
  padding-top: 24px;
  padding-bottom: 56px;
}

.site-footer {
  margin-top: 56px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-title {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--green);
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li + li {
  margin-top: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--green);
  text-decoration: underline;
}

.footer-brand {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px 32px;
  border-top: 1px solid var(--line);
}

.footer-brand-name {
  font-family: var(--mono);
  font-weight: 700;
  margin: 0 0 4px;
}

.footer-brand-slogan {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.footer-copy {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   components
   ============================================================ */

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.section-note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 720px;
}

.section-title {
  font-size: 22px;
  margin-bottom: 6px;
}

.eyebrow,
.mono-label,
.kicker,
.page-tag,
.page-label,
.title-label,
.section-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--amber);
  margin: 0 0 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  text-decoration: none;
  box-shadow: var(--shadow-hard);
}

.btn-primary {
  background: var(--green);
  border-color: var(--green-dark);
  color: var(--surface);
}

.btn-primary:hover {
  background: var(--green-dark);
  color: var(--surface);
  text-decoration: none;
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--tint);
  color: var(--green-dark);
  text-decoration: none;
}

.status-tag,
.state-tag,
.entry-status {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 1px 6px;
  border: 1px solid var(--line);
  background: var(--tint);
  color: var(--green-dark);
  white-space: nowrap;
}

.status-serial,
.status-ongoing,
.state-ongoing {
  background: var(--tint);
  border-color: var(--green);
  color: var(--green-dark);
}

.status-complete,
.status-completed,
.status-finished,
.state-complete {
  background: #f0e6d6;
  border-color: var(--amber);
  color: #8a5310;
}

.status-hiatus,
.status-paused,
.state-hiatus {
  background: #efe9dd;
  border-color: var(--muted);
  color: var(--muted);
}

.status-collection,
.status-omnibus,
.state-collection {
  background: #e6e9f0;
  border-color: #7a8398;
  color: #46506a;
}

.status-none {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}

.status-badge {
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--green);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--muted);
}

.page-header {
  margin-bottom: 16px;
}

.page-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.page-hero,
.page-head,
.page-title-section {
  margin-bottom: 32px;
}

.page-lead,
.page-intro,
.title-desc {
  font-size: 16px;
  color: var(--ink);
  max-width: 720px;
  margin: 0;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.page-layout.sidebar-left {
  grid-template-columns: 240px minmax(0, 1fr);
}

.content-main,
.content-column {
  min-width: 0;
}

.content-aside,
.notes-aside,
.calendar-aside {
  min-width: 0;
}

.aside-title {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--green);
  margin-bottom: 10px;
}

.aside-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aside-links li + li {
  margin-top: 8px;
}

.aside-links a {
  font-size: 14px;
}

.aside-block {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
}

.aside-block + .aside-block {
  margin-top: 16px;
}

.aside-text {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-item {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.related-link {
  font-family: var(--mono);
  font-size: 15px;
}

.related-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.figure-caption {
  margin-top: 8px;
}

/* ============================================================
   pages: index
   ============================================================ */

.home-main {
  padding-top: 32px;
  padding-bottom: 8px;
}

.hero {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  min-width: 0;
}

.hero-figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-hard-lg);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-caption {
  margin-top: 10px;
}

.hero-panel {
  min-width: 0;
}

.hero-panel h1 {
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 12px;
}

.hero-lead {
  font-size: 17px;
  max-width: 620px;
}

.hero-facts {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.fact-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.fact-row:last-child {
  border-bottom: 0;
}

.fact-row dt {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  padding: 10px 14px;
  background: var(--tint);
  border-right: 1px solid var(--line);
}

.fact-row dd {
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-channel,
.week-calendar,
.cover-wall,
.editor-picks,
.companion-entry,
.legend-brief {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 2px 2px 0 rgba(27, 26, 23, 0.1);
}

.tag-link:hover {
  background: var(--tint);
  color: var(--green-dark);
  border-color: var(--green);
  text-decoration: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.calendar-col {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  min-width: 0;
}

.calendar-day {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.calendar-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.calendar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.calendar-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.calendar-item .item-name {
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.calendar-item .status-tag {
  align-self: flex-start;
}

.calendar-footnote,
.cover-wall-footnote,
.editor-footnote,
.companion-footnote {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.cover-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cover-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cover-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hard-lg);
}

.cover-card:focus-within {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.cover-figure {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.cover-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--surface);
  border-color: var(--green);
  color: var(--green-dark);
}

.cover-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cover-title {
  font-size: 17px;
  margin: 0;
}

.cover-tag {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
}

.cover-excerpt {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.editor-notes {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.note-item {
  border-left: 3px solid var(--green);
  padding-left: 16px;
}

.note-title {
  font-size: 18px;
  margin-bottom: 4px;
}

.note-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

.note-tip {
  margin: 0;
  font-size: 14px;
  color: var(--green-dark);
  background: var(--tint);
  padding: 8px 12px;
}

.editor-figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-hard);
}

.editor-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.editor-caption {
  margin-top: 10px;
}

.companion-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.companion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.companion-row:first-child {
  border-top: 1px solid var(--line);
}

.companion-source,
.companion-target {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
}

.companion-reason {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.brief-item {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
}

.brief-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.brief-item p {
  font-size: 14px;
  color: var(--muted);
}

.brief-link {
  font-family: var(--mono);
  font-size: 14px;
}

/* ============================================================
   pages: shelf
   ============================================================ */

.page-shelf .sidebar-left {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.shelf-nav {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
}

.shelf-nav-title {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--green);
  margin-bottom: 10px;
}

.shelf-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shelf-nav-list li + li {
  margin-top: 4px;
}

.shelf-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid transparent;
  text-decoration: none;
}

.shelf-nav-list a:hover {
  background: var(--tint);
  border-color: var(--line);
  color: var(--green-dark);
  text-decoration: none;
}

.shelf-nav-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.shelf-nav-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.shelf-content {
  min-width: 0;
}

.shelf-zone {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.shelf-zone:first-child {
  padding-top: 0;
}

.shelf-zone h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.zone-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 720px;
}

.zone-figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px;
  margin-bottom: 20px;
  max-width: 520px;
}

.zone-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.zone-figure figcaption {
  margin-top: 8px;
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 96px;
  grid-template-areas:
    "status name length"
    "brief brief brief";
  gap: 6px 16px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.entry-row .entry-status {
  grid-area: status;
  justify-self: start;
}

.entry-row .entry-name {
  grid-area: name;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.entry-row .entry-name:hover {
  color: var(--green);
  text-decoration: underline;
}

.entry-row .entry-length {
  grid-area: length;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  justify-self: end;
}

.entry-row .entry-brief {
  grid-area: brief;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.length-guide {
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px;
}

.length-guide h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.length-guide-lead {
  font-size: 15px;
  color: var(--muted);
  max-width: 720px;
}

.length-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.length-item {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 16px;
}

.length-item h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.length-item p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.tip-item {
  border-left: 3px solid var(--amber);
  padding-left: 14px;
}

.tip-item p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   pages: calendar
   ============================================================ */

.page-calendar .calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.calendar-week {
  min-width: 0;
}

.page-calendar .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.calendar-day {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  min-width: 0;
}

.day-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.day-name {
  font-family: var(--mono);
  color: var(--green);
}

.day-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.day-entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-calendar .entry-row {
  display: block;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}

.page-calendar .entry-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.page-calendar .entry-row .entry-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.page-calendar .entry-row .state-tag {
  margin-top: 4px;
}

.entry-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.calendar-figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-hard);
}

.calendar-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.calendar-figure figcaption {
  margin-top: 10px;
}

.rhythm-notes {
  margin-top: 40px;
}

.rhythm-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.rhythm-col {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
}

.col-head {
  font-size: 17px;
  margin-bottom: 8px;
}

.rhythm-col p {
  font-size: 14px;
  color: var(--muted);
}

.rhythm-col p:last-child {
  margin-bottom: 0;
}

.paused-list {
  margin-top: 40px;
}

.paused-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.paused-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  grid-template-areas:
    "name state"
    "note note";
  gap: 6px 16px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.paused-row .entry-name {
  grid-area: name;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.paused-row .entry-name:hover {
  color: var(--green);
  text-decoration: underline;
}

.paused-row .state-tag {
  grid-area: state;
  justify-self: start;
}

.paused-note {
  grid-area: note;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.calendar-aside {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
}

/* ============================================================
   pages: editor-notes
   ============================================================ */

.page-editor-notes .layout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.notes-section,
.notes-media,
.notes-reason,
.notes-related {
  margin-bottom: 40px;
}

.note-block {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px;
}

.note-block + .note-block {
  margin-top: 24px;
}

.note-header {
  margin-bottom: 14px;
}

.note-tag {
  color: var(--green);
}

.page-editor-notes .note-title {
  font-size: 22px;
  margin-bottom: 4px;
}

.note-body p {
  font-size: 16px;
}

.note-points {
  margin: 16px 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.note-subtitle {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--amber);
  margin-bottom: 4px;
}

.note-points p {
  font-size: 15px;
  color: var(--ink);
}

.note-pace {
  margin: 0;
  background: var(--tint);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--green-dark);
}

.note-pace .mono-label {
  display: block;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.note-figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-hard);
}

.note-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.note-figure figcaption {
  margin-top: 10px;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.reason-col {
  border-left: 3px solid var(--green);
  padding-left: 16px;
}

.reason-subtitle {
  font-size: 17px;
  margin-bottom: 6px;
}

.reason-col p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   pages: companions
   ============================================================ */

.companion-groups,
.basis-section,
.diff-section,
.more-links {
  margin-bottom: 40px;
}

.companion-groups h2,
.basis-section h2,
.diff-section h2,
.more-links h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.section-intro {
  font-size: 15px;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 20px;
}

.group-block {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px;
}

.group-block + .group-block {
  margin-top: 24px;
}

.group-name {
  font-size: 19px;
  margin-bottom: 6px;
}

.group-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.relation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.relation-card {
  min-width: 0;
}

.relation-card .cover-figure {
  border: 1px solid var(--line);
}

.relation-card .cover-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.cover-caption {
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.relation-card .entry-name {
  font-size: 16px;
  margin: 10px 0 4px;
}

.entry-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-meta .tag {
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
}

.relation-reason {
  min-width: 0;
  border-left: 3px solid var(--amber);
  padding-left: 16px;
}

.reason-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--amber);
  margin: 0 0 6px;
}

.relation-reason p:last-child {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

.basis-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.basis-col {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
}

.basis-col-title {
  font-size: 17px;
  margin-bottom: 8px;
}

.basis-col p {
  font-size: 14px;
  color: var(--muted);
}

.basis-col p:last-child {
  margin-bottom: 0;
}

.diff-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.diff-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.diff-name {
  font-size: 16px;
  margin-bottom: 4px;
}

.diff-item p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.more-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.more-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 14px;
  text-decoration: none;
}

.more-list a:hover {
  background: var(--tint);
  border-color: var(--green);
}

/* ============================================================
   pages: legend
   ============================================================ */

.page-legend .page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.legend-section {
  margin-bottom: 40px;
}

.legend-section h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.legend-section > p {
  font-size: 15px;
  color: var(--muted);
  max-width: 720px;
}

.legend-figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-hard);
}

.legend-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.legend-figure figcaption {
  margin-top: 10px;
}

.mark-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.mark-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.mark-name {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--green);
}

.mark-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

.page-legend .length-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.length-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
}

.length-name {
  font-size: 17px;
  margin-bottom: 4px;
}

.length-range {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber);
  margin: 0 0 8px;
}

.length-card p:last-child {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.tag-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.tag-rule {
  border-left: 3px solid var(--green);
  padding-left: 16px;
}

.tag-rule-name {
  font-size: 16px;
  margin-bottom: 4px;
}

.tag-rule p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  cursor: pointer;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: "+ ";
  font-family: var(--mono);
  color: var(--amber);
}

.faq-item[open] .faq-question::before {
  content: "− ";
}

.faq-answer {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--muted);
  max-width: 720px;
}

/* ============================================================
   pages: disclosure
   ============================================================ */

.disclosure-figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-hard);
}

.disclosure-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.disclosure-section {
  margin-bottom: 40px;
  max-width: 720px;
}

.disclosure-section h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.disclosure-list {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.disclosure-list li {
  margin-bottom: 8px;
  font-size: 15px;
}

.disclosure-list strong {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--green);
}

.disclosure-steps {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.disclosure-steps li {
  margin-bottom: 10px;
  font-size: 15px;
}

.disclosure-steps strong {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--green);
}

.disclosure-related h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

/* ============================================================
   pages: 404
   ============================================================ */

.error-main {
  padding-top: 56px;
  padding-bottom: 56px;
}

.error-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 40px;
  box-shadow: var(--shadow-hard-lg);
  max-width: 720px;
}

.error-panel h1 {
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 12px;
}

.error-text {
  font-size: 16px;
  color: var(--muted);
}

.error-actions {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 1000px) {
  .brand-slogan {
    display: none;
  }

  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .page-layout,
  .page-layout.sidebar-left,
  .page-editor-notes .layout-shell,
  .page-legend .page-layout,
  .page-shelf .sidebar-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .shelf-nav {
    position: static;
  }

  .shelf-nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .shelf-nav-list li + li {
    margin-top: 0;
  }

  .shelf-nav-list a {
    white-space: nowrap;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-figure img {
    aspect-ratio: 16 / 9;
  }

  .page-calendar .calendar-grid,
  .calendar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-layout,
  .brief-grid,
  .rhythm-columns,
  .reason-grid,
  .basis-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .companion-row,
  .relation-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .site-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 32px 16px 16px;
  }

  .footer-brand {
    padding: 16px 16px 28px;
  }

  .mobile-drawer {
    padding: 12px 16px 32px;
  }

  .home-main {
    padding-top: 24px;
  }

  .tag-channel,
  .week-calendar,
  .cover-wall,
  .editor-picks,
  .companion-entry,
  .legend-brief {
    padding: 40px 0;
  }

  .page-calendar .calendar-grid,
  .calendar-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tag-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tag-link {
    white-space: nowrap;
  }

  .fact-row {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "status"
      "name"
      "length"
      "brief";
  }

  .entry-row .entry-length {
    justify-self: start;
  }

  .paused-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "name"
      "state"
      "note";
  }

  .mark-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .error-panel {
    padding: 24px;
  }

  .length-guide {
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cover-card {
    transition: none;
  }

  .cover-card:hover {
    transform: none;
  }
}

@media print {
  .site-nav,
  .menu-toggle,
  .mobile-drawer {
    display: none;
  }

  .site-header {
    position: static;
  }

  body.site-body {
    background: #fff;
  }
}
