/* What's New = Hoshi's star log, on the scrapbook kit (2026-11-01; star log 2026-10-31).
   Each update is a star on the dotted path Hoshi travels home. The path leaves
   his observatory (the page head, a torn plate), runs down the night, and each
   entry hangs from its star: a painted note (kit paper) pinned over a collage of
   the worlds that opened (kit plates + brass tags), with one line of the note
   written again in his hand. The path, threads and star states are drawn by
   news.js inside scrapbook.js's one loop; without JS every star is simply lit.
   Furniture (header, toggle, stars, footer, bell) is legal.css + site-footer. */

.starlog {
  --sl-gold: #F5A623;
  --sl-ink-hand: #7A4510;
  --sl-rail: 0px;               /* the lane the path runs down on narrow screens */
  position: relative;
  z-index: 1;
}
.sl-head { --sb-arrival: arrival-news; }

/* ── Furniture on the night ─────────────────────────────── */
.starlog .crumbs { margin-top: 0.6rem; font-size: 0.82rem; color: rgba(250, 246, 239, 0.6); }
.starlog .crumbs a { color: rgba(250, 246, 239, 0.78); text-decoration: none; }
.starlog .crumbs a:hover { color: var(--sl-gold); text-decoration: underline; }
.starlog h1, .starlog h2 {
  font-family: 'Fraunces', 'M PLUS Rounded 1c', Georgia, serif;
  font-variation-settings: 'opsz' 60, 'wght' 700, 'SOFT' 100, 'WONK' 1;
  font-weight: 700; letter-spacing: -0.005em; color: var(--sl-gold);
  word-break: keep-all; overflow-wrap: anywhere;
}
.starlog h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1.15; margin: 0 0 1.1rem; }
.starlog h1 > span, .sl-door h2 > span {
  background: linear-gradient(180deg, #FFE9B8 0%, #F5A623 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.starlog h1 .i18n-jp, .sl-door h2 .i18n-jp { font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 800; }
.sl-lede { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.9; color: rgba(250, 246, 239, 0.84); max-width: 30em; margin: 0 0 1.1rem; }
.sl-keeper { font-size: 0.95rem; line-height: 1.8; color: rgba(250, 246, 239, 0.7); margin: 0; }
.sl-keeper a {
  color: var(--sb-gold); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255, 233, 184, 0.4);
  text-underline-offset: 4px; margin-left: 0.25em; white-space: nowrap;
}
.sl-keeper a::after { content: ' \2192'; }
.sl-keeper a:hover { color: #fff4d6; text-decoration-color: currentColor; }
.sl-keeper a:focus-visible { outline: 2px solid var(--sb-gold); outline-offset: 3px; border-radius: 4px; }

/* ── Head: Hoshi's star log, open on the observatory desk (Tom's painting, 2026-11-01) ── */
.sl-head-art { position: relative; width: min(100%, 600px); }
.sl-head-art .sb-plate { --sb-tilt: var(--sb-tilt-2); aspect-ratio: 1376 / 768; }

/* ── The sky the log is written on ─────────────────────── */
.sl-sky { position: relative; margin-top: clamp(1rem, 3vw, 2rem); }
.sl-path { position: absolute; inset: 0 auto auto 0; overflow: visible; pointer-events: none; z-index: 0; will-change: transform; }
.sl-path-glow { position: absolute; inset: 0 auto auto 0; pointer-events: none; z-index: 0; opacity: 0.45; will-change: opacity, transform; }
.sl-path-glow svg { display: block; overflow: visible; }
.sl-glow { opacity: 0; }
.sl-glow.on { opacity: 1; }
.sl-dot { fill: #F8CB7A; opacity: 0; transition: opacity 420ms var(--sb-ease); }
.sl-dot.on { opacity: var(--o, 0.8); }
.sl-thread { stroke: rgba(248, 203, 122, 0.55); stroke-width: 1.2; fill: none; opacity: 0; transition: opacity 500ms var(--sb-ease) 120ms; }
.sl-thread.on { opacity: 1; }
.sl-list { position: relative; z-index: 1; }

/* One entry: the note hangs from its star on one side; the same news written
   again in Hoshi's hand on the other; the paintings pasted underneath, the
   note pinned over the top of them. Even entries mirror. */
.sl-entry {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sb-gap);
  align-items: center; padding-top: 72px;           /* the star the note hangs from */
  scroll-margin-top: 2rem;
}
.sl-entry + .sl-entry { margin-top: clamp(4rem, 8vw, 7rem); }
.sl-pin { grid-column: 4 / span 6; grid-row: 1; justify-self: center; width: min(100%, 480px); position: relative; z-index: 3; }
.sl-quote { grid-column: 10 / span 3; grid-row: 1; justify-self: start; text-align: left; align-self: center; margin-top: 1rem; font-size: clamp(1.7rem, 2.3vw, 2.2rem); max-width: 11ch; }
.sl-quote:lang(ja), .sl-quote:has(> .i18n-jp:only-child) { max-width: 10em; }
.sl-shots.sb-collage { grid-column: 1 / -1; grid-row: 2; margin-top: calc(var(--sb-overlap) * -0.55); position: relative; z-index: 1; }
/* the path runs down the middle, so every note hangs on it; the quote changes side */
.sl-entry:nth-child(even) .sl-quote { grid-column: 1 / span 3; justify-self: end; text-align: right; }
/* the lantern (newest entry only) fills the night beside the note */
.sl-lamp { grid-column: 1 / span 3; grid-row: 1; justify-self: center; align-self: start; width: clamp(110px, 11.5vw, 170px); margin: calc(var(--sb-overlap) * -0.9) 0 0; position: relative; z-index: 2; }
.sl-lamp .sb-object { width: 100%; --sb-tilt: var(--sb-tilt-3); }
.sl-entry:nth-child(even) .sl-lamp { grid-column: 10 / span 3; }
/* the sixth painting would sit alone in its row: tuck it up between the 3rd and 4th */
.sl-shots .sb-collage__item:nth-of-type(6) { grid-column: 9 / span 4; margin-top: calc(var(--sb-rise) * -0.4); --sb-tilt: var(--sb-tilt-2); }  /* only if an entry has six */
.sl-shots .sb-plate { aspect-ratio: 16 / 9; }
/* the painting the note is pinned over hangs its tag on its far corner */
.sl-entry:nth-child(odd) .sl-shots .sb-collage__item:nth-of-type(2) .sb-tag { left: auto; right: 0.8rem; }
.sl-entry:nth-child(even) .sl-shots .sb-collage__item:nth-of-type(1) .sb-tag { left: auto; right: 0.8rem; }

/* the note: kit paper, live text on it */
.sl-note { --sb-tilt: -1deg; }
.sl-entry:nth-child(even) .sl-note { --sb-tilt: 1.2deg; }
.sl-date { margin: 0 0 0.15rem; line-height: 1.1; }
.sl-date time { font-family: 'Caveat', 'Yomogi', 'M PLUS Rounded 1c', cursive; font-weight: 600; font-size: 1.75rem; color: var(--sl-ink-hand); letter-spacing: 0.01em; }
/* the Japanese date in Hoshi's hand too: Yomogi (subset by subset-hand-font.mjs, which reads .sb-hand) */
.sl-date time .i18n-jp, .sl-date time:lang(ja) { font-family: 'Yomogi', 'M PLUS Rounded 1c', sans-serif; font-weight: 400; font-size: 1.3rem; letter-spacing: 0.04em; }
.sl-note h2 { font-size: clamp(1.45rem, 2.3vw, 1.8rem); line-height: 1.25; color: var(--sb-ink); margin: 0.1rem 0 0.6rem; text-wrap: balance; }
.sl-note h2 .i18n-jp, :lang(ja) > .sl-note h2 { font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 800; font-size: clamp(1.25rem, 2vw, 1.45rem); line-height: 1.45; word-break: auto-phrase; }
.sl-note p:not(.sl-date) { font-family: 'Nunito', 'M PLUS Rounded 1c', sans-serif; font-size: 1rem; line-height: 1.75; color: #2A3366; margin: 0 0 0.4rem; text-wrap: pretty; }
.sl-note p.i18n-jp:not(.sl-date) { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 0.98rem; line-height: 1.95; }

/* The star each note hangs from, above the paper's pin. */
.sl-star {
  position: absolute; width: 46px; height: 46px; pointer-events: none;
  background: url("/Assets/sections/star-dot-lit.webp") center / contain no-repeat;
}
.sl-pin > .sl-star { z-index: 4; left: 50%; top: -60px; transform: translate(-50%, -50%); }
.sl-star::before {             /* the unlit star, faded out when it ignites */
  content: ''; position: absolute; inset: 0;
  background: url("/Assets/sections/star-dot-unlit.webp") center / contain no-repeat;
  opacity: 0; transition: opacity 700ms var(--sb-ease);
}
.sl-star::after {              /* its glow */
  content: ''; position: absolute; inset: -70%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 130, 0.42), rgba(245, 166, 35, 0.12) 55%, transparent 100%);
  opacity: 0.55; transition: opacity 900ms var(--sb-ease), transform 900ms var(--sb-ease);
}
/* The newest star burns warm; older ones settle to a calmer gold. */
.sl-entry:first-child .sl-pin > .sl-star { width: 60px; height: 60px; }
.sl-entry:first-child .sl-pin > .sl-star::after { opacity: 1; inset: -95%; }
.sl-entry:not(:first-child) .sl-pin > .sl-star { filter: saturate(0.75) brightness(0.92); }
/* Home: the last star, dim, with no date and no promise. */
.sl-home { position: relative; height: clamp(120px, 14vw, 190px); }
.sl-star-home { left: 50%; top: 56%; width: 34px; height: 34px; transform: translate(-50%, -50%); background-image: url("/Assets/sections/star-dot-unlit.webp"); opacity: 0.7; }
.sl-star-home::after { opacity: 0.18; }
/* the home star lights when the reader reaches it, with a small warm bloom, and stays lit */
.sl-star-home.lit { background-image: url("/Assets/sections/star-dot-lit.webp"); opacity: 1; }
.sl-star-home.lit::after { opacity: 0.7; animation: sl-bloom 1.6s var(--sb-ease); }
@keyframes sl-bloom { 0% { opacity: 0; transform: scale(0.4); } 40% { opacity: 1; transform: scale(1.35); } 100% { opacity: 0.7; transform: scale(1); } }

/* With news.js running, stars wait unlit until the path reaches them. */
.sl-armed .sl-pin > .sl-star:not(.lit)::before { opacity: 1; }
.sl-armed .sl-pin > .sl-star:not(.lit)::after { opacity: 0; transform: scale(0.7); }
.sl-armed .sl-entry:first-child .sl-pin > .sl-star.lit::after { animation: sl-breathe 5.5s ease-in-out 1.2s infinite; }
@keyframes sl-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.62; } }

/* ── The door: centred under the path's home star; the painted sign, not a box ─── */
.sb .sl-door { padding-top: 0; }
.sl-door-grid { display: flex; justify-content: center; text-align: center; }
.sl-door-copy { max-width: 30rem; }
.sl-home { height: 110px; }
.sl-star-home { top: 50%; }
.sl-door h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.3; margin: 0 0 0.5rem; }
.sl-door p { color: rgba(250, 246, 239, 0.86); margin: 0; font-size: 1.05rem; }
.sl-sign { display: inline-block; margin: 0.9rem auto 0; width: clamp(220px, 24vw, 300px); transform-origin: 50% 100%; transition: transform 220ms var(--sb-ease), filter 220ms var(--sb-ease); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.45)); }
.sl-sign img { display: block; width: 100%; height: auto; }
.sl-sign:active { transform: scale(0.97); }
.sl-sign:focus-visible { outline: 2px solid var(--sl-gold); outline-offset: 6px; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) {
  .sl-sign:hover { transform: rotate(-1.5deg) translateY(-3px); filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.5)) brightness(1.06); }
}
.starlog ~ .page-curtain { margin-top: -14%; }

/* ── Tablet + phone (<= 860, the kit's tablet): the path runs down a rail on
   the left; note, quote and paintings stack beside it. ─────── */
/* ── Tablet (601-860): the same centred path; the note takes more of the
   width, the lantern keeps its side, the quote drops under the note. ── */
@media (max-width: 860px) {
  .sl-head .sb-head__copy { text-align: left; }
  .sl-head-art { margin-bottom: clamp(0.6rem, 3vw, 1.4rem); }
  .sl-pin { grid-column: 3 / span 8; }
  .sl-lamp, .sl-entry:nth-child(even) .sl-lamp { grid-column: 1 / span 2; width: 100px; justify-self: start; align-self: center; margin-top: 0; }
  .sl-quote, .sl-entry:nth-child(even) .sl-quote { grid-column: 7 / span 6; grid-row: 2; justify-self: end; text-align: right; margin: 2rem 0 0; max-width: 14ch; }
  .sl-shots.sb-collage { grid-row: 3; margin-top: 1.6rem; }
  .sl-shots .sb-collage__item:nth-of-type(6) { grid-column: auto / span 6; margin-top: 3rem; }
}
/* ── Phone (<= 600): the path runs down a rail on the left; the note beside
   it; the lantern sits small beside the quote, under the note. ── */
@media (max-width: 600px) {
  .starlog { --sl-rail: 2rem; }
  .sl-list { padding-left: calc(var(--sb-gutter) + var(--sl-rail)); }
  .sl-entry, .sl-entry:nth-child(even) { grid-template-columns: auto minmax(0, 1fr); column-gap: 0.8rem; padding-top: 2.6rem; }
  .sl-pin { grid-column: 1 / -1; grid-row: 1; justify-self: start; width: 100%; }
  .sl-lamp, .sl-entry:nth-child(even) .sl-lamp { grid-column: 1; grid-row: 2; width: 64px; align-self: end; margin-top: 1.6rem; }
  .sl-quote, .sl-entry:nth-child(even) .sl-quote { grid-column: 2; grid-row: 2; justify-self: end; text-align: right; margin: 1.8rem 0 0; max-width: 15ch; font-size: 1.8rem; }
  .sl-shots.sb-collage { grid-column: 1 / -1; grid-row: 3; }
  .sl-pin > .sl-star { left: calc(var(--sl-rail) * -0.55); top: 0.9rem; width: 34px; height: 34px; }
  .sl-entry:first-child .sl-pin > .sl-star { width: 42px; height: 42px; }
  .sl-date time { font-size: 1.5rem; }
  .sl-shots .sb-collage__item:nth-of-type(6) { margin: 0 0 2.2rem auto; }
  .sl-home { height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .sl-dot, .sl-thread, .sl-star::before, .sl-star::after, .sl-sign { transition: none; }
  .sl-star-home.lit::after { animation: none; }
  .sl-path-glow { opacity: 0.55 !important; }
  .sl-armed .sl-entry:first-child .sl-pin > .sl-star.lit::after { animation: none; }
}
