:root {
  color-scheme: light;
  --ink: #30223b;
  --muted: #695575;
  --accent: #6d4388;
  --line: #e1d2e7;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", "MS PMincho", serif;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: #faf6fc;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 70% 12%, #efe5f8, transparent 58%); }
[hidden] { display: none !important; }
button, input { font: inherit; }
a { color: var(--accent); }
a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid #75479b;
  outline-offset: 3px;
}
.shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.journal-nav { border-bottom: 1px solid #e8dbeb; background: #fdf9fdd9; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 14px; }
.back-link, .signature { display: inline-flex; align-items: center; gap: 9px; }
.back-link { min-height: 44px; font-size: .87rem; text-decoration: none; font-weight: 650; }
.back-link span { font-size: 1.2rem; }
.back-link:hover { text-decoration: underline; }
.signature { font: 700 .98rem var(--serif); letter-spacing: .12em; }
.signature span:first-child { color: #976746; font: 1.25rem Georgia, serif; }
main.shell { padding-block: 29px 62px; }

.cover {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 318px;
  overflow: hidden;
  isolation: isolate;
  background: #eee2f5;
  border: 1px solid #d8c6e5;
  border-radius: 21px;
  box-shadow: 0 9px 24px #59346210;
}
.cover-art { position: absolute; z-index: -1; inset: 0 0 0 29%; }
.cover-art img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 57% 27%; }
.cover-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #eee2f5 0%, #eee2f5d9 13%, transparent 45%);
}
.cover-copy { max-width: 51%; padding: 28px 0 28px clamp(26px, 5.2vw, 75px); }
.cover-tape { width: 80px; height: 17px; background: #f4d9b9bd; transform: rotate(-9deg); margin: 0 0 14px -7px; }
.cover h1 {
  position: relative;
  width: fit-content;
  margin: 0 0 14px;
  color: #382344;
  font: 700 clamp(2.55rem, 5.5vw, 4.65rem)/1.18 var(--serif);
  letter-spacing: .06em;
}
.cover h1 span { position: absolute; top: 0; right: -1.2em; font-size: .32em; color: #9d7042; }
.cover p { margin: 0; color: #52395e; font: 600 clamp(.87rem, 1.44vw, 1.05rem)/1.85 var(--serif); }
.archive-jump { display: inline-flex; align-items: center; gap: .55em; min-height: 44px; margin-top: 9px; font-size: .82rem; font-weight: 700; text-underline-offset: .22em; }

.journal-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 32%); align-items: start; gap: 23px; margin-top: 24px; }
.entry-column, .journal-side { min-width: 0; }
.paper { background: #fffdfc; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 6px 18px #5229600a; }
.entry { padding: clamp(24px, 3.5vw, 48px); scroll-margin-top: 15px; }
.entry-header { padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.date-tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 12px;
  border-radius: 99px;
  color: #5b3b6c;
  background: #f1e6f5;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.entry h2 { font: 700 clamp(1.55rem, 2.8vw, 2.35rem)/1.42 var(--serif); margin: 0; overflow-wrap: anywhere; }
.edition-slots { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.edition-slots a { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 11px; font-size: .83rem; text-decoration: none; }
.edition-slots a:hover, .edition-slots [aria-current="page"] { background: #f2e8f8; border-color: #c9aad9; }
.edition-slots [aria-current="page"] { font-weight: 700; }
.story { margin-block: 24px; }
.story h3 { margin: 0 0 12px; padding-left: 12px; border-left: 4px solid #bb95d4; font: 700 clamp(1.17rem, 1.8vw, 1.43rem)/1.5 var(--serif); }
.story h4 { margin: 17px 0 5px; font-size: 1rem; }
.story p, .lira-note p, .transcript p { line-height: 1.85; margin: 0 0 .72em; overflow-wrap: anywhere; }
.story .source { color: var(--muted); font-size: .8rem; }
.story + .story { border-top: 1px solid #eadfec; padding-top: 22px; }
.feature-label { display: inline-block; margin-bottom: 6px; color: var(--accent); font-size: .76rem; font-weight: 700; }
.status { color: var(--muted); line-height: 1.6; font-size: .89rem; }
.lira-note { display: flex; align-items: flex-start; gap: 13px; margin: 25px 0 21px; padding: 17px 18px; border: 1px solid #e5d4eb; border-radius: 5px 14px 8px 15px; background: #f6edf9; }
.note-moon { flex: 0 0 32px; height: 32px; border: 1px solid #c8a9d9; border-radius: 50%; text-align: center; color: #77528e; font: 24px/30px Georgia, serif; }
.lira-note h3 { margin: 1px 0 5px; font: 700 1rem/1.4 var(--serif); }
.lira-note p { margin-bottom: 0; color: #50345e; font-size: .94rem; }
.transcript { padding-top: 12px; border-top: 1px dashed var(--line); }
.transcript summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 700; padding-block: 8px; min-height: 44px; }
.transcript p { color: var(--muted); font-size: .92rem; }

.archive { padding: 22px; scroll-margin-top: 15px; }
.archive h2 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 15px; font: 700 1.39rem/1.4 var(--serif); }
.archive h2 span { color: #9d7042; font-size: 1.1rem; }
.search-field { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 0 10px; border: 1px solid #d9c6e2; border-radius: 8px; color: #76578b; }
.search-icon { position: relative; flex: 0 0 13px; height: 13px; border: 1.5px solid; border-radius: 50%; margin-right: 3px; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.5px; background: currentColor; transform: rotate(45deg); top: 10px; left: 9px; }
.search-field input { width: 100%; min-width: 0; min-height: 38px; border: 0; background: transparent; color: var(--ink); font-size: .88rem; }
.search-field input::placeholder { color: #705d7a; }
.archive-year { margin: 17px 0 4px; padding: 5px 9px; border-radius: 5px; background: #f1e7f6; color: #5e3b73; font-size: .8rem; font-weight: 700; }
.archive-days { list-style: none; margin: 0; padding: 0; }
.archive-days li + li { border-top: 1px solid #ece2ef; }
.archive-link { display: grid; grid-template-columns: minmax(0, 1fr) 13px; gap: 7px; align-items: center; padding: 9px 7px; min-height: 48px; border-radius: 6px; text-decoration: none; }
.archive-link:hover, .archive-link[aria-current="date"] { background: #f6edf8; }
.archive-day { display: block; color: var(--accent); font-size: .73rem; font-weight: 700; }
.archive-summary { display: block; color: var(--ink); font-size: .87rem; line-height: 1.46; overflow-wrap: anywhere; }
.archive-arrow { color: #76578b; font-size: 1rem; }
.journal-ad { margin-top: 16px; padding: 12px; border: 1px solid #e3d9e7; border-radius: 12px; background: #fcf8fc; }
.ad-label { margin: 0 0 7px; color: var(--muted); font-size: .71rem; }
.ad-preview { display: grid; min-height: 104px; place-items: center; border-radius: 7px; border: 1px dashed #d7c6dd; color: #6e5a77; background: #f2ebf5; font-size: .78rem; }
.journal-ad-unit { display: block; inline-size: 100%; max-inline-size: 250px; min-height: 104px; margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 40px); }
  .cover { min-height: 282px; }
  .journal-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 33%); gap: 16px; }
  .archive { padding: 16px; }
}
@media (max-width: 660px) {
  .shell { width: calc(100% - 30px); }
  .nav-inner { min-height: 52px; }
  main.shell { padding-block: 15px 38px; }
  .cover { min-height: 260px; border-radius: 15px; align-items: flex-end; }
  .cover-art { inset: 0; }
  .cover-art img { object-position: 64% 38%; }
  .cover-art::after { background: linear-gradient(0deg, #f1e6f6 0%, #f1e6f6ec 22%, transparent 76%); }
  .cover-copy { max-width: none; width: 100%; padding: 117px 15px 6px; }
  .cover h1 { font-size: clamp(1.92rem, 8.1vw, 2.7rem); margin-bottom: 4px; }
  .cover p { font-size: .82rem; line-height: 1.55; }
  .cover-tape { display: none; }
  .archive-jump { margin-top: 0; font-size: .75rem; }
  .journal-layout { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-top: 15px; }
  .entry { padding: 20px 18px; }
  .archive { padding: 18px; }
}
