:root {
  color-scheme: light;
  font-family: "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #111;
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button { font: inherit; }

.shell { width: min(100% - 48px, 1100px); margin: 0 auto; }
.site-header { min-height: 160px; display: flex; align-items: center; gap: 22px; border-bottom: 2px solid #111; }
.brand-mark { width: 56px; height: 56px; display: grid; place-items: center; border: 2px solid #111; font: 700 27px/1 ui-monospace, monospace; letter-spacing: -8px; padding-right: 8px; }
.eyebrow, .section-index, .current-label, .site-footer, .count, .calendar-hint { font: 600 11px/1.5 ui-monospace, "Cascadia Code", monospace; letter-spacing: .12em; }
.eyebrow { margin: 0 0 5px; }
h1 { font-size: clamp(31px, 4vw, 46px); line-height: 1.1; letter-spacing: -.06em; margin: 0; }
.header-caption { margin: auto 0 0 auto; padding-bottom: 41px; font-size: 13px; color: #555; }

section { padding-top: 47px; }
.section-heading { display: flex; align-items: baseline; gap: 22px; margin-bottom: 22px; }
.section-index { min-width: 118px; }
h2 { font-size: clamp(21px, 2.5vw, 28px); letter-spacing: -.04em; margin: 0; font-weight: 600; }
.current-card { border: 1.5px solid #111; min-height: 190px; padding: 27px 32px 29px; }
.current-meta { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.current-meta time { font: 600 13px ui-monospace, monospace; letter-spacing: .05em; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; margin: 23px 0 0; font-size: 17px; }
.current-card .note-text { max-width: 860px; font-size: clamp(18px, 2.4vw, 23px); line-height: 1.75; }
.text-button { margin-top: 25px; padding: 0 0 4px; color: #111; background: none; border: 0; border-bottom: 1px solid #111; cursor: pointer; font-size: 13px; }
.text-button span { margin-left: 7px; }

.archive-section { padding-top: 70px; }
.archive-heading { margin-bottom: 22px; }
.archive-grid { display: grid; grid-template-columns: minmax(320px, 430px) minmax(0, 1fr); gap: 0; border: 1.5px solid #111; }
.calendar-panel { padding: 25px; border-right: 1.5px solid #111; }
.month-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
h3 { margin: 0; font-size: 17px; font-weight: 600; }
.month-toolbar h3 { font: 600 19px ui-monospace, "Cascadia Code", monospace; letter-spacing: -.02em; }
.icon-button { width: 35px; height: 35px; border: 1px solid #111; background: #fff; color: #111; cursor: pointer; font-size: 20px; line-height: 1; }
.icon-button:hover, .icon-button:focus-visible { background: #111; color: #fff; }
.weekdays, .calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.weekdays { text-align: center; margin-bottom: 8px; font-size: 12px; color: #555; }
.calendar-day, .calendar-blank { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; }
.calendar-day { border: 1px solid transparent; font: 500 13px ui-monospace, monospace; }
button.calendar-day { border-color: #111; background: #fff; color: #111; cursor: pointer; }
button.calendar-day:hover, button.calendar-day:focus-visible { background: #111; color: #fff; }
.calendar-day.today { text-decoration: underline; text-underline-offset: 4px; }
.calendar-hint { display: flex; align-items: center; gap: 8px; margin: 28px 0 0; color: #555; letter-spacing: .02em; }
.hint-mark { width: 12px; height: 12px; border: 1px solid #111; }
.entries-panel { padding: 25px 30px 30px; min-height: 420px; }
.entries-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 19px; border-bottom: 1px solid #111; }
.count { border: 1px solid #111; min-width: 30px; padding: 3px 6px; text-align: center; }
.entry { padding: 25px 0 27px; border-bottom: 1px solid #aaa; scroll-margin-top: 18px; }
.entry:last-child { border-bottom: 0; }
.entry time { font: 600 13px ui-monospace, monospace; letter-spacing: .06em; }
.entry .note-text { margin-top: 12px; font-size: 15px; }
.entry:target { outline: 2px solid #111; outline-offset: 9px; }
.empty-message { margin: 29px 0; line-height: 1.7; color: #555; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1.5px solid #111; margin-top: 78px; padding: 20px 0 28px; color: #555; letter-spacing: .03em; }

button:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
[hidden] { display: none !important; }

@media (max-width: 720px) {
  .shell { width: min(100% - 32px, 600px); }
  .site-header { min-height: 130px; gap: 14px; }
  .brand-mark { width: 46px; height: 46px; flex: none; }
  .header-caption { display: none; }
  section { padding-top: 36px; }
  .section-heading { display: block; }
  .section-index { display: block; margin-bottom: 7px; }
  .current-card { padding: 22px; }
  .archive-section { padding-top: 53px; }
  .archive-grid { grid-template-columns: 1fr; }
  .calendar-panel { border-right: 0; border-bottom: 1.5px solid #111; }
  .entries-panel { min-height: 220px; }
  .site-footer { display: block; margin-top: 55px; }
  .site-footer span { display: block; margin-bottom: 5px; }
}
