/* Hallmark · shape: app screen · genre: editorial · theme: custom · idea: "月历 — left 栏目 + soft day type + Issue 01 nest"
 * paper/ink B&W · IBM Plex Sans + Noto Sans CJK SC · no highlight · soft edges · v2.1 t62 */
/* Hallmark · waive 7b · binding B&W pure #000/#FFF · Minmin */
@import url("./tokens.css");
@import url("./base.css");

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/IBMPlexSans.ttf") format("truetype");
  font-weight: 100 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Sans CJK SC";
  src: url("./fonts/NotoSansCJK-Regular.ttc") format("collection");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Sans CJK SC";
  src: url("./fonts/NotoSansCJK-Bold.ttc") format("collection");
  font-weight: 700; font-style: normal; font-display: swap;
}

#app { min-height: 100%; height: 100%; }

/* Gate */
.gate {
  min-height: 100%; height: 100%;
  display: grid; place-items: center;
  padding: var(--space-2xl);
  background: var(--color-paper-2);
}
.gate-panel {
  width: min(400px, 100%);
  padding: var(--space-2xl) var(--space-xl) var(--space-xl);
  background: var(--color-paper);
  border-radius: var(--radius-panel);
  color: var(--color-ink);
}
.gate-brand { margin: 0 0 var(--space-md); font-size: var(--text-sm); color: var(--color-muted); font-weight: 500; }
.gate-title { margin: 0 0 var(--space-xl); font-size: var(--text-2xl); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.gate-people { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-xl); }
.gate-people button {
  padding: var(--space-2xs) var(--space-md); min-height: 36px;
  border-radius: var(--radius-control); background: var(--color-paper-2);
  color: var(--color-muted); font-size: var(--text-sm); font-weight: 500;
}
.gate-people button[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); font-weight: 700; }
.gate-label { display: block; margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 500; }
.gate-input {
  display: block; width: 100%; min-height: 48px; padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-card);
  background: var(--color-paper); color: var(--color-ink); font-size: var(--text-md);
}
.gate-error { margin: var(--space-xs) 0 0; font-size: var(--text-sm); font-weight: 500; }
.gate-go {
  margin-top: var(--space-lg); display: inline-flex; align-items: center;
  min-height: 44px; padding: var(--space-xs) var(--space-xl);
  border-radius: var(--radius-control); background: var(--color-accent); color: var(--color-accent-ink);
  font-size: var(--text-sm); font-weight: 700;
}
@media (hover: hover) { .gate-go:hover { background: var(--color-ink-2); } }
.gate-month { margin: var(--space-xl) 0 0; font-size: var(--text-sm); color: var(--color-muted); }

/* Shell */
.shell {
  height: 100%; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--color-paper); color: var(--color-ink);
}

.mast {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-sm) var(--space-xl);
  padding: var(--space-lg) var(--space-2xl) var(--space-md);
}
.mast-brand { display: flex; flex-direction: column; gap: 2px; }
.mast-name { margin: 0; font-size: var(--text-md); font-weight: 700; letter-spacing: -0.01em; }
.mast-month { margin: 0; font-size: var(--text-xs); color: var(--color-muted); }
.mast-end { margin-inline-start: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }

.people, .modes, .channels, .statuses {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center;
}
.people button, .modes button, .channels button, .statuses button {
  padding: var(--space-2xs) var(--space-md); min-height: 32px;
  border-radius: var(--radius-control);
  font-size: var(--text-sm); font-weight: 500; color: var(--color-muted);
}
.people button[aria-pressed="true"],
.modes button[aria-pressed="true"],
.channels button[aria-pressed="true"],
.statuses button[aria-pressed="true"] {
  color: var(--color-ink); font-weight: 700; background: var(--color-paper-2);
}
.channels .n { font-weight: 400; color: var(--color-muted); }
@media (hover: hover) {
  .people button:not([aria-pressed="true"]):hover,
  .modes button:not([aria-pressed="true"]):hover,
  .channels button:not([aria-pressed="true"]):hover,
  .statuses button:not([aria-pressed="true"]):hover {
    color: var(--color-ink); background: var(--color-paper-2);
  }
}

.filters {
  display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-2xl);
  padding: 0 var(--space-2xl) var(--space-md);
}
.facts-launch, .facts-close {
  padding: var(--space-2xs) var(--space-md); min-height: 32px;
  border-radius: var(--radius-control); font-size: var(--text-sm); font-weight: 500;
  color: var(--color-muted); background: var(--color-paper-2);
}
.facts-launch .n { font-weight: 700; color: var(--color-ink); }

/* Board: left week 栏目 + calendar */
.board {
  flex: 1; min-height: 0; min-width: 0;
  display: grid;
  grid-template-columns: minmax(11.5rem, 14rem) minmax(0, 1fr);
  gap: var(--space-xl);
  padding: 0 var(--space-2xl) var(--space-2xl);
  align-items: stretch;
}

.week-rail {
  display: flex; flex-direction: column; gap: var(--space-sm);
  min-height: 0; overflow: auto; overscroll-behavior: contain;
  padding-block: var(--space-2xs);
}
.week {
  display: flex; flex-direction: column; gap: var(--space-xs);
  text-align: start; padding: var(--space-md);
  border-radius: var(--radius-card); color: var(--color-muted); min-width: 0;
}
.week[aria-pressed="true"], .week.is-now {
  background: var(--color-paper-2); color: var(--color-ink);
}
.w-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.w-n { font-size: var(--text-xs); font-weight: 700; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.w-range { font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.w-title {
  display: flex; flex-direction: column; gap: 2px;
  font-size: var(--text-sm); line-height: 1.55; font-weight: 400;
  overflow-wrap: break-word; min-width: 0; word-break: keep-all; text-wrap: pretty;
}
.w-lead { font-weight: 600; }
.w-body { font-weight: 400; color: inherit; opacity: 0.92; }
.w-st {
  margin-inline-start: auto;
  font-size: var(--text-xs); font-weight: 700;
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-control);
  background: var(--color-ink); color: var(--color-paper);
}

.stage {
  min-height: 0; min-width: 0;
  overflow: auto; overscroll-behavior: contain;
}

/* Facts drawer */
.facts-scrim {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: color-mix(in oklab, var(--color-ink) 18%, transparent);
}
.facts-drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0;
  width: min(340px, 92vw); z-index: var(--z-drawer);
  padding: var(--space-xl); background: var(--color-paper);
  border-radius: var(--radius-panel) 0 0 var(--radius-panel);
  overflow: auto; overscroll-behavior: contain;
}
.facts-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-sm); margin-bottom: var(--space-lg);
}
.rail-h { margin: 0; font-size: var(--text-md); font-weight: 700; }
.rail-h .n { color: var(--color-muted); font-weight: 400; margin-inline-start: var(--space-2xs); }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.fact > button {
  width: 100%; text-align: start; padding: var(--space-md);
  border-radius: var(--radius-card); font-size: var(--text-sm); font-weight: 500;
  background: var(--color-paper-2); color: var(--color-ink-2);
}
.fact-t { margin: var(--space-xs) 0; font-size: var(--text-xs); line-height: 1.55; color: var(--color-muted); }
.fact-ans { display: grid; gap: var(--space-2xs); font-size: var(--text-xs); color: var(--color-muted); }
.fact-ans input {
  min-height: 36px; padding: var(--space-2xs) var(--space-xs);
  border: 0; border-radius: var(--radius-control);
  background: var(--color-paper-3); color: var(--color-ink);
}

/* Calendar */
.cal { max-width: none; }
.cal-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.cal-title {
  font-size: var(--text-2xl); font-weight: 700; line-height: 1.15;
  letter-spacing: -0.03em;
}
.cal-months { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.cal-months button {
  min-height: 36px; padding: var(--space-2xs) var(--space-md);
  border-radius: var(--radius-control);
  font-size: var(--text-sm); font-weight: 500; color: var(--color-muted);
}
.cal-months button[aria-selected="true"] {
  color: var(--color-ink); font-weight: 700; background: var(--color-paper-2);
}

.cal-dows {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
}
.cal-dow {
  font-size: var(--text-sm); font-weight: 500; color: var(--color-muted);
  text-align: center;
}

.cal-body { display: flex; flex-direction: column; gap: var(--space-lg); }
.cal-week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-sm); align-items: stretch;
}
.cal-week.is-dense-week { gap: var(--space-sm); }

.cal-day {
  min-width: 0; min-height: 7rem;
  padding: var(--space-sm) var(--space-xs);
  border-radius: var(--radius-card);
  display: flex; flex-direction: column; gap: var(--space-xs);
}
.cal-day.is-out { opacity: 0.28; pointer-events: none; }
.cal-day.is-dense { background: var(--color-paper-2); }
.cal-day.solstice .cal-num { font-weight: 700; }
.cal-week.is-dense-week .cal-day { min-height: 12rem; }
.cal-week.is-dense-week .cal-day.is-dense { min-height: 14rem; }

.cal-day-head {
  display: flex; align-items: baseline; gap: var(--space-xs);
  justify-content: space-between;
}
.cal-num {
  font-size: var(--text-xl); font-weight: 700; line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.term { font-size: var(--text-xs); font-weight: 600; color: var(--color-ink); }

.cal-day-posts {
  display: flex; flex-direction: column; gap: var(--space-xs);
  flex: 1; min-height: 0;
}

/* Soft editorial slips — NOT tiny bold bricks */
.cal-slip {
  display: flex; flex-direction: column; gap: 3px;
  width: 100%; text-align: start;
  padding: var(--space-2xs) 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-ink); min-width: 0;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cal-slip { transition: opacity var(--dur-micro) var(--ease-out); }
  .cal-slip:hover { opacity: 0.72; }
}
.cal-slip-meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 0.75rem; color: var(--color-muted); font-weight: 400;
}
.cal-slip .ch { font-weight: 500; color: var(--color-muted); }
.cal-slip-ttl {
  font-size: 0.9375rem; /* 15px */
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: break-word; min-width: 0; text-wrap: pretty;
  color: var(--color-ink);
}

.chip {
  display: inline-flex; align-items: center;
  padding: 0 5px; min-height: 16px;
  border-radius: var(--radius-control);
  font-size: 0.6875rem; font-weight: 500; white-space: nowrap;
  background: transparent; color: var(--color-muted);
}
.chip.is-review { background: var(--color-ink); color: var(--color-paper); font-weight: 600; }
.chip.is-hold { color: var(--color-muted); background: transparent; opacity: 0.85; }

/* Issue 1 nest — parent uses the same .cal-slip type as neighbors */
.cal-zine {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.cal-zine-body {
  display: flex; flex-direction: column; gap: 2px;
  padding-inline-start: var(--space-sm);
  margin-inline-start: 2px;
  border-inline-start: 1px solid var(--color-rule);
}
.cal-nest {
  display: flex; flex-direction: column; gap: 1px;
  width: 100%; text-align: start;
  padding: 4px 0; color: var(--color-ink); min-width: 0;
}
.nest-role {
  font-size: 0.6875rem; font-weight: 500; color: var(--color-muted);
}
.nest-ttl, .cal-nest .nest-ttl {
  font-size: 0.875rem; font-weight: 400; line-height: 1.4;
  overflow-wrap: break-word; text-wrap: pretty;
}
@media (hover: hover) {
  .cal-nest:hover .nest-ttl { opacity: 0.72; }
}

/* List */
.register { max-width: var(--container); }
.register-head {
  display: flex; justify-content: space-between; margin-bottom: var(--space-lg);
  font-size: var(--text-sm); font-weight: 700; color: var(--color-muted);
}
.list-row, .list-zine-head {
  display: grid;
  grid-template-columns: 7.5rem 4rem minmax(0, 1fr) 5rem auto 4rem;
  gap: var(--space-md); align-items: center;
  width: 100%; text-align: start;
  padding: var(--space-md); border-radius: var(--radius-card);
  color: var(--color-ink); min-width: 0;
}
.list-row .ttl, .list-zine-head .ttl { font-weight: 500; overflow-wrap: break-word; min-width: 0; }
.list-row .d, .list-row .w, .list-row .ch, .list-row .ac,
.list-zine-head .d, .list-zine-head .w, .list-zine-head .ch, .list-zine-head .ac {
  font-size: var(--text-sm); color: var(--color-muted); font-weight: 400;
}
.list-row.solstice, .list-row:hover, .list-zine-head:hover { background: var(--color-paper-2); }
.list-zine { margin-bottom: 2px; }
.list-zine-body {
  display: flex; flex-direction: column;
  padding: 0 0 var(--space-sm) var(--space-xl);
  margin-inline-start: 7.5rem;
}
.list-nest {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto 4rem;
  gap: var(--space-md); align-items: center;
  width: 100%; text-align: start;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-card); color: var(--color-ink);
}
.list-nest .ttl { font-weight: 400; }
.list-nest:hover { background: var(--color-paper-2); }
@media (max-width: 1100px) {
  .list-row, .list-zine-head { grid-template-columns: 6rem minmax(0, 1fr) auto; }
  .list-zine-body { margin-inline-start: 0; }
}

/* ——— Entry: work is the protagonist ——— */
.entry-page {
  height: 100%; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--color-paper); color: var(--color-ink);
}
.entry-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  border-block-end: 1px solid var(--color-rule);
  flex-shrink: 0;
}
.entry-bar .back {
  font-size: var(--text-sm); font-weight: 500; color: var(--color-muted);
  padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-control);
  min-height: 32px;
}
@media (hover: hover) { .entry-bar .back:hover { color: var(--color-ink); background: var(--color-paper-2); } }
.entry-quiet {
  flex: 1; min-width: 0; margin: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-sm);
  font-size: var(--text-sm); line-height: 1.35;
}
.eq-meta { color: var(--color-muted); font-weight: 400; }
.eq-ttl {
  font-weight: 500; color: var(--color-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36rem;
}
.eq-ac { color: var(--color-muted); font-weight: 400; margin-inline-start: auto; }
.entry-bar-end {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs);
}
.entry-people { margin: 0; gap: 4px; }
.entry-people button {
  min-height: 28px; padding: 2px 10px; font-size: var(--text-xs);
  background: transparent; color: var(--color-muted);
}
.entry-people button[aria-pressed="true"] {
  background: var(--color-paper-2); color: var(--color-ink); font-weight: 600;
}
.modes-mini {
  min-height: 28px; padding: 2px 10px;
  border-radius: var(--radius-control); font-size: var(--text-xs);
  font-weight: 500; color: var(--color-muted); background: var(--color-paper-2);
}

.entry-stage {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}
.galley {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: var(--color-paper-2); border-radius: var(--radius-panel); height: 100%;
}
.col-h { margin: 0; padding: var(--space-sm) var(--space-lg) var(--space-2xs); font-size: var(--text-sm); font-weight: 700; }
.col-scroll {
  flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
  padding: 0 var(--space-lg) var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.note, .assets-note, .brief { margin: 0; font-size: var(--text-sm); line-height: 1.6; color: var(--color-muted); }
.shots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.shot {
  display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: var(--space-xs);
  font-size: var(--text-sm); font-weight: 400;
}
.shot .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.shot .auth { display: block; margin-top: 2px; font-size: var(--text-xs); color: var(--color-muted); }
.drop {
  display: grid; place-items: center; gap: var(--space-2xs);
  min-height: 112px; padding: var(--space-lg);
  border: 2px dashed var(--color-rule); border-radius: var(--radius-card);
  background: var(--color-paper); cursor: pointer; text-align: center;
  flex-shrink: 0;
}
.drop.is-over { border-color: var(--color-ink); background: var(--color-paper-3); }
.drop-title { font-size: var(--text-sm); font-weight: 600; }
.drop-hint { font-size: var(--text-xs); color: var(--color-muted); }
.note-field { display: grid; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.note-field input, .revise {
  width: 100%; min-height: 40px; padding: var(--space-sm);
  border: 0; border-radius: var(--radius-card);
  background: var(--color-paper); color: var(--color-ink); font-size: var(--text-md);
}
.revise { min-height: 72px; resize: vertical; line-height: 1.55; }
.copy-body {
  margin: 0; white-space: pre-wrap; font-size: var(--text-md); line-height: 1.75;
  color: var(--color-ink); max-width: 40rem; text-wrap: pretty; font-weight: 400;
}
.tags { margin: var(--space-sm) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.miss {
  list-style: none; margin: var(--space-sm) 0 0; padding: var(--space-md);
  border-radius: var(--radius-card); background: var(--color-paper); font-size: var(--text-sm);
}
.acts {
  display: flex; flex-wrap: wrap; gap: var(--space-xs);
  margin-top: auto; padding-top: var(--space-sm);
  position: sticky; bottom: 0;
  background: linear-gradient(180deg, transparent, var(--color-paper-2) 28%);
  padding-bottom: var(--space-xs);
}
.act {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-control);
  background: var(--color-accent); color: var(--color-accent-ink);
  font-size: var(--text-sm); font-weight: 700;
}
.act.quiet { background: var(--color-paper); color: var(--color-ink); }
@media (hover: hover) {
  .act:hover { background: var(--color-ink-2); }
  .act.quiet:hover { background: var(--color-paper-3); }
}

.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

@media (max-width: 1100px) {
  .board {
    grid-template-columns: 1fr;
    padding-inline: var(--space-lg);
  }
  .week-rail {
    flex-direction: row; overflow-x: auto;
    gap: var(--space-sm);
  }
  .week { min-width: 11rem; flex: 0 0 auto; }
  .mast, .filters { padding-inline: var(--space-lg); }
}
@media (max-width: 900px) {
  .entry-stage { grid-template-columns: 1fr; }
  .galley { height: auto; max-height: 55vh; }
  .cal-num { font-size: var(--text-lg); }
  .eq-ttl { white-space: normal; max-width: none; }
}
