:root {
  --paper: #f4efe6;
  --paper-2: #fffdf8;
  --ink: #1a2421;
  --ink-soft: #4d5b55;
  --line: #e2d8c8;
  --pine: #1a5c45;
  --pine-deep: #0f3d2e;
  --clay: #a33b22;
  --clay-soft: #f8ebe4;
  --amber: #8a5a12;
  --amber-soft: #f8f0dc;
  --shadow: 0 10px 28px rgba(36, 28, 16, 0.06);
  --radius: 18px;
  --tap: 48px;
  --max: 440px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 auto;
  max-width: var(--max);
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 50% -180px, #efe4cf 0%, transparent 70%),
    var(--paper);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(26, 36, 33, 0.015) 1px, transparent 1px);
  background-size: 100% 4px;
}

a { color: var(--pine); }

img, svg { max-width: 100%; }

.wrap {
  padding: 10px 16px 48px;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.04em;
}

h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.slogan {
  margin: 4px 0 0;
  color: var(--pine);
  font-size: 14px;
  font-weight: 600;
}

.seal {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--clay);
  color: var(--clay);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  transform: rotate(-8deg);
  background: rgba(163, 59, 34, 0.04);
}

.kicker {
  margin: 2px 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--clay);
}

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.now {
  padding: 14px 14px 12px;
  border-color: #efd2c6;
}

.when {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.now h2,
.block h2,
.day h3 {
  margin: 2px 0 6px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.person h3 {
  margin: 8px 0 4px;
  font-size: 22px;
  line-height: 1.25;
}

.place {
  margin: 0 0 12px;
  font-size: 16px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  border-radius: 14px;
  background: var(--clay);
  color: #fffdf8;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
}

.nav-btn:active { transform: translateY(1px); }

.nav-url {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.split {
  margin: 12px 0;
  border: 0;
  border-top: 1px dashed var(--line);
}

.tomorrow {
  display: block;
  text-decoration: none;
  color: inherit;
  min-height: var(--tap);
  padding: 4px 0 2px;
}

.tomorrow strong {
  display: block;
  font-size: 18px;
}

.tomorrow span {
  color: var(--ink-soft);
  font-size: 14px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--paper-2);
  background: var(--pine);
}

.action.alt {
  background: var(--pine-deep);
}

.action b {
  font-size: 18px;
  font-weight: 700;
}

.action small {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.85;
}

.quiet {
  margin: 10px 2px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.block {
  margin-top: 28px;
}

.block h2 {
  font-size: 22px;
}

.lead {
  margin: 0 0 12px;
  color: var(--ink-soft);
}

.more {
  display: grid;
  gap: 8px;
}

.more a,
.chip {
  min-height: var(--tap);
}

.more a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}

.day, .month, .person, .duty, .note {
  padding: 14px;
  margin: 0 0 10px;
}

.day header,
.person header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.tag {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.tag.clay {
  background: var(--clay-soft);
  color: var(--clay);
}

.tag.pine {
  background: #e5f2ec;
  color: var(--pine);
}

.muted { color: var(--ink-soft); }

.missing {
  color: var(--amber);
  font-weight: 650;
}

.search {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin: 0 0 10px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font: inherit;
  color: inherit;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
}

.chip[aria-pressed="true"] {
  background: var(--pine);
  border-color: var(--pine);
  color: #fffdf8;
}

.wall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 148px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: inherit;
  text-align: left;
  font: inherit;
  text-decoration: none;
}

.tile b { font-size: 16px; }

.tile span,
.fields dd {
  color: var(--ink-soft);
  font-size: 13px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background:
    linear-gradient(160deg, #efe6d6, #e7efe9);
  border: 1px dashed #c9bfae;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
}

.avatar strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}

.fields {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 4px 8px;
  margin: 8px 0 0;
}

.fields dt {
  color: var(--ink-soft);
  font-size: 14px;
}

.fields dd {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.person details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.person summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  color: var(--pine);
}

.res {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.res div {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f4ee;
}

.res b {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 650;
}

.empty {
  display: none;
  padding: 14px;
  border-radius: 14px;
  background: var(--amber-soft);
}

.note p { margin: 0 0 8px; }
.note p:last-child { margin-bottom: 0; }

.foot {
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 13px;
}

.line {
  margin: 0;
  font-size: 15px;
}

.line + .line { margin-top: 4px; }

.slot {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 6px 8px;
  margin: 8px 0;
  font-size: 15px;
}

.res span, .prose, .slot span, .place { overflow-wrap: anywhere; }

.slot b { font-weight: 650; }

.prose p { margin: 0 0 10px; }

.bullets {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.bullets li { margin: 0 0 6px; }

.duty h3 { margin-top: 0; }

.subhead {
  margin: 18px 0 8px;
  font-size: 18px;
}

details.fold {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

details.fold summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  color: var(--pine);
}

:focus-visible {
  outline: 3px solid #1a5c45;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .actions { grid-template-columns: 1fr; }
  h1 { font-size: 15px; }
}

.avatar.has-photo {
  border: none;
  background: #d9d0c3;
  padding: 0;
  overflow: hidden;
}
.avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.now-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.now-photo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  object-position: center 20%;
  flex: none;
}
.portrait-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.portrait-row img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center 20%;
  flex: none;
}
.portrait-row p { margin: 0; }
