:root {
  color-scheme: light;
  --ink: #38271f;
  --muted: #786052;
  --paper: #f7edda;
  --paper-dark: #ecd8b6;
  --cover: #7f5539;
  --cover-deep: #503629;
  --accent: #b84a35;
  --blue: #365f7d;
  --green: #58745a;
  --line: rgba(91, 68, 50, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.34), transparent 24rem),
    linear-gradient(135deg, #d8b781 0%, #8b684c 100%);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.cover,
.notebook {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(63, 43, 31, 0.28);
  box-shadow: 0 22px 50px rgba(47, 31, 22, 0.28);
}

.cover {
  min-height: 290px;
  padding: 24px 22px 22px 44px;
  border-radius: 8px 8px 5px 5px;
  color: #fff9ee;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 17%),
    linear-gradient(135deg, var(--cover), #a36c43 54%, #68432e);
}

.cover::after,
.notebook::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.08) 25%, transparent 25%);
  background-size: 13px 13px;
}

.binding {
  position: absolute;
  inset: 0 auto 0 16px;
  width: 13px;
  background: repeating-linear-gradient(to bottom, #3b291f 0 13px, #d4a373 13px 22px);
  opacity: 0.8;
}

.cover-top,
.page-title,
.day-head,
.actions,
.summary-grid {
  display: flex;
  align-items: center;
}

.cover-top,
.page-title {
  justify-content: space-between;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.74;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: "Segoe Print", "KaiTi", cursive;
  font-size: clamp(2rem, 10vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-family: "Segoe Print", "KaiTi", cursive;
  font-size: 1.65rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.stamp {
  flex: 0 0 auto;
  min-width: 70px;
  padding: 8px 9px;
  border: 2px solid rgba(255, 249, 238, 0.72);
  color: #fff9ee;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  transform: rotate(4deg);
}

.lede {
  max-width: 30em;
  margin: 28px 0 20px;
  color: rgba(255, 249, 238, 0.86);
  line-height: 1.7;
}

.actions {
  flex-wrap: wrap;
  gap: 10px;
}

.primary,
.secondary,
.ghost,
.small {
  min-height: 44px;
  border: 1px solid rgba(56, 39, 31, 0.22);
  border-radius: 7px;
  cursor: pointer;
  font: 800 0.92rem/1 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  text-decoration: none;
}

.primary,
.secondary {
  padding: 13px 15px;
}

.primary {
  color: #fff8ea;
  background: var(--accent);
}

.secondary {
  color: var(--ink);
  background: #f2dfbd;
}

.ghost {
  padding: 13px 14px;
  color: #fff6e8;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.small {
  min-height: 36px;
  padding: 9px 12px;
  color: var(--cover-deep);
  background: #efdfc2;
}

.setup {
  min-height: 22px;
  margin: 14px 0 0;
  color: rgba(255, 249, 238, 0.78);
  font-size: 0.86rem;
  line-height: 1.5;
}

.notebook {
  margin-top: 16px;
  padding: 22px 18px 26px;
  border-radius: 5px 5px 8px 8px;
  background:
    linear-gradient(90deg, rgba(184, 74, 53, 0.18) 0 2px, transparent 2px 100%),
    repeating-linear-gradient(to bottom, var(--paper) 0 31px, var(--line) 32px, var(--paper) 33px);
}

.status {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 18px 0 14px;
  padding: 12px;
  border: 1px dashed rgba(80, 54, 41, 0.32);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 248, 232, 0.72);
  line-height: 1.55;
}

.dot {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(184, 74, 53, 0.13);
}

.summary-grid {
  gap: 10px;
  margin-bottom: 18px;
}

.summary-grid article {
  flex: 1;
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(80, 54, 41, 0.2);
  border-radius: 7px;
  background: rgba(255, 250, 239, 0.74);
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.summary-grid strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--blue);
  font-family: "Segoe Print", "KaiTi", cursive;
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline {
  display: grid;
  gap: 14px;
}

.day-page {
  padding: 15px 13px;
  border: 1px solid rgba(80, 54, 41, 0.2);
  border-radius: 7px;
  background: rgba(255, 252, 242, 0.7);
}

.day-head {
  gap: 12px;
  margin-bottom: 13px;
}

.day-no {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff8ed;
  background: var(--green);
  font-family: "Segoe Print", "KaiTi", cursive;
  font-weight: 900;
}

.day-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 11px;
  padding: 11px 0;
  border-top: 1px dashed rgba(80, 54, 41, 0.22);
}

.time {
  color: var(--accent);
  font-family: "Segoe Print", "KaiTi", cursive;
  font-size: 0.92rem;
  font-weight: 900;
}

.item-copy strong,
.item-copy p,
.item-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.item-copy p {
  margin: 5px 0;
  color: var(--muted);
  line-height: 1.45;
}

.item-copy span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 360px) {
  .shell {
    padding-inline: 9px;
  }

  .cover {
    padding-right: 15px;
    padding-left: 38px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary,
  .secondary,
  .ghost {
    width: 100%;
    text-align: center;
  }
}
