:root {
  color-scheme: light;
  --paper: #f4efe6;
  --paper-deep: #e9dfd0;
  --ink: #24201d;
  --muted: #776f66;
  --line: rgba(36, 32, 29, 0.14);
  --accent: #bd5845;
  --accent-soft: #eed1c5;
  --night: #25302f;
  --white: #fffdf8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.82), transparent 25rem),
    linear-gradient(145deg, var(--paper) 0%, #f7f2ea 48%, var(--paper-deep) 100%);
}
a { color: inherit; }
button, audio { font: inherit; }

.site-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 64px;
}
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 54px;
  padding: 10px 0;
  isolation: isolate;
}
.masthead::before {
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: -1;
  width: 100vw;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(69, 55, 43, 0.08);
  content: "";
  transform: translateX(-50%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.3;
}
.brand-title { color: var(--muted); text-wrap: balance; }
.brand-title strong { color: var(--ink); font-weight: 800; letter-spacing: 0.1em; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--night);
  box-shadow: 0 5px 18px rgba(37, 48, 47, 0.2);
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}
h1 { max-width: 820px; margin: 0; font-size: clamp(3rem, 8vw, 6.8rem); line-height: 0.92; }
.lede {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.36rem);
  line-height: 1.65;
}

.calendar-card {
  margin-top: 56px;
  padding: clamp(18px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.73);
  box-shadow: 0 24px 70px rgba(69, 55, 43, 0.11);
  backdrop-filter: blur(12px);
}
.calendar-toolbar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 12px; }
.calendar-toolbar h2 { margin: 0; text-align: center; font-size: clamp(1.8rem, 5vw, 3rem); }
.month-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}
.month-button:hover { transform: translateY(-2px); background: var(--white); }
.month-button:focus-visible, .day-link:focus-visible, .entry-nav a:focus-visible, .brand:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays { margin-top: 34px; border-bottom: 1px solid var(--line); }
.weekdays span { padding: 0 6px 13px; color: var(--muted); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
.calendar-grid { border-left: 1px solid var(--line); }
.day-cell {
  position: relative;
  min-height: clamp(62px, 9vw, 108px);
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.day-cell.is-empty { background: rgba(233, 223, 208, 0.24); }
.day-number { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.day-link { position: absolute; inset: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 14px; text-decoration: none; transition: background 150ms ease, transform 150ms ease; }
.day-link:hover { background: var(--accent-soft); transform: scale(0.97); }
.day-link .day-number { position: absolute; top: 7px; left: 7px; color: var(--ink); }
.music-sticker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  transform: rotate(-6deg);
  transition: transform 150ms ease;
}
.music-symbol {
  width: 19px;
  aspect-ratio: 1;
  background: #111;
  filter:
    drop-shadow(-1px 0 0 var(--white))
    drop-shadow(1px 0 0 var(--white))
    drop-shadow(0 -1px 0 var(--white))
    drop-shadow(0 1px 0 var(--white))
    drop-shadow(1px 2px 1px rgba(36, 32, 29, 0.24));
  -webkit-mask: url("/music/assets/music-note.png") center / contain no-repeat;
  mask: url("/music/assets/music-note.png") center / contain no-repeat;
}
.day-link:hover .music-sticker { transform: translateY(-2px) rotate(2deg) scale(1.06); }
.day-link:active { background: var(--accent); transform: scale(0.94); }
.day-link:active .day-number { color: var(--white); }
.day-link:active .music-sticker { transform: scale(0.94) rotate(-2deg); }
.calendar-foot { display: flex; justify-content: space-between; gap: 20px; margin: 22px 2px 0; color: var(--muted); font-size: 0.78rem; }

.entry-shell { width: min(850px, calc(100% - 32px)); }
.entry-header { padding: clamp(26px, 7vw, 74px) 0 34px; border-bottom: 1px solid var(--line); }
.entry-date { margin: 0 0 12px; color: var(--accent); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.entry-header h1 { max-width: 760px; font-size: clamp(2.8rem, 9vw, 6rem); line-height: 1.08; overflow-wrap: anywhere; text-wrap: balance; }
.entry-subtitle { margin: 22px 0 0; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; font-style: italic; }
.track-list { display: grid; gap: 15px; padding: 38px 0; border-bottom: 1px solid var(--line); }
.track-card { padding: 19px 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 248, 0.68); }
.track-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.track-heading h2 { margin: 0; font-family: inherit; font-size: 0.98rem; font-weight: 720; letter-spacing: 0; }
.track-heading span { flex: 0 0 auto; color: var(--muted); font-size: 0.69rem; letter-spacing: 0.12em; text-transform: uppercase; }
.track-card audio { display: block; width: 100%; height: 42px; }
.notes { padding: 46px 0 54px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.08rem, 2.4vw, 1.28rem); line-height: 1.82; }
.notes h2, .notes h3 { margin: 2em 0 0.55em; line-height: 1.15; }
.notes h2 { font-size: 2rem; }
.notes h3 { font-size: 1.45rem; }
.notes p { margin: 0 0 1.45em; }
.notes a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.notes-placeholder { color: var(--muted); font-style: italic; }
.entry-nav { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 16px; padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
.entry-nav a { display: flex; flex-direction: column; gap: 5px; text-decoration: none; }
.entry-nav a:last-child { text-align: right; }
.entry-nav-label { color: var(--accent); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.entry-nav-date { font-family: Georgia, "Times New Roman", serif; font-size: 1rem; }
.entry-nav-spacer { min-height: 1px; }
.site-footer { display: grid; gap: 7px; margin-top: 70px; color: var(--muted); font-size: 0.72rem; text-align: center; }
.site-version { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; }

@media (min-width: 621px) {
  .entry-header h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); white-space: nowrap; }
}
@media (max-width: 620px) {
  .site-shell { width: min(100% - 20px, 1120px); padding-top: 0; }
  .masthead {
    margin: 0 0 42px;
    padding: max(10px, env(safe-area-inset-top)) 0 10px;
  }
  .brand { gap: 8px; font-size: 0.68rem; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-title strong { letter-spacing: 0.07em; }
  h1 { font-size: clamp(2.55rem, 12.5vw, 3.8rem); line-height: 1.02; }
  .entry-header h1 {
    font-size: clamp(2.05rem, 9.5vw, 3rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  .calendar-card { margin-top: 42px; padding: 14px 8px 20px; border-radius: 22px; }
  .calendar-toolbar { padding: 5px 6px 0; }
  .weekdays { margin-top: 22px; }
  .weekdays span { font-size: 0.56rem; letter-spacing: 0.05em; }
  .day-cell { min-height: 58px; padding: 6px; }
  .day-link { inset: 0; align-items: flex-end; justify-content: flex-end; gap: 2px; padding: 7px; }
  .day-link .day-number { top: 7px; left: 7px; }
  .music-sticker { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; }
  .music-symbol { width: 16px; }
  .calendar-foot { padding: 0 8px; }
  .entry-shell { width: min(100% - 28px, 850px); }
  .track-card { padding: 16px 13px; }
  .track-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
