@charset "UTF-8";
/*
 * The entry page is the painting itself. On a wide screen the title is written into the open sky at top left and the
 * chapters lie along the floor as paper cards, so Leonardo, the obsidian and the bench stay in view.
 * On a phone the painting becomes a banner and the contents sit on a sheet of paper below it.
 */
html:has(body.entry-page) { overflow: auto; }
body.entry-page { height: auto; min-height: 100svh; overflow: auto; background: #140e09; }
.entry { position: relative; min-height: 100svh; }

.entry-art { position: fixed; inset: 0; margin: 0; background: radial-gradient(ellipse 80% 70% at 40% 35%, #3a2a1c, #140e09 75%); }
.entry-art img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 1.4s ease; }
.entry-art.ready img { opacity: 1; }
/* A little light behind the title in the sky, and shade along the floor behind the chapters. */
.entry-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 34% 26% at 16% 11%, #fff4dcb3, #fff4dc00 72%), linear-gradient(#140e0900 58%, #140e098c 82%, #140e09d9); }
/* If the painting is missing, an empty frame says what hangs here. */
.entry-art.pending { display: grid; place-items: center; }
.entry-art.pending::after { background: none; }
.entry-pending { position: relative; z-index: 1; width: min(620px, 80vw); margin-bottom: 12vh; padding: 30px 34px; border: 2px dashed #cdb58c88; color: #e8d6b2;
  font: 400 18px/1.9 var(--narrator); letter-spacing: .5px; text-align: center; background: #0b070466; }

.entry-sheet { display: contents; }

/* The title, written into the sky. */
.entry-head { position: absolute; z-index: 1; left: clamp(24px, 3.4vw, 56px); top: clamp(20px, 4.5vh, 48px); max-width: min(560px, 44vw); color: var(--ink);
  text-shadow: 0 0 14px #fff6e2, 0 0 4px #fff6e2; animation: entry-in 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.entry-kicker { display: flex; align-items: center; gap: 10px; margin: 0; font: 400 14px var(--narrator); letter-spacing: 4px; color: var(--red); }
.entry-seal { width: 30px; height: 30px; filter: drop-shadow(0 0 6px #fff6e2); }
.entry-head h1 { margin: 8px 0 0; font: 600 clamp(36px, 3.7vw, 58px)/1.1 var(--narrator); letter-spacing: 1px; white-space: nowrap; }
.entry-head h1 small { display: block; margin-top: 4px; font: italic 400 clamp(20px, 1.9vw, 28px) var(--display); letter-spacing: .5px; color: var(--ink-soft); }
@keyframes entry-in { from { opacity: 0; transform: translateY(-10px); } }

/* The chapters, laid along the floor. */
.entry-shelf { position: absolute; z-index: 1; left: clamp(16px, 3vw, 48px); right: clamp(16px, 3vw, 48px); bottom: clamp(14px, 3vh, 30px);
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "go lines" "rule rule"; align-items: stretch; gap: 10px 16px;
  animation: entry-up 1.1s .2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes entry-up { from { opacity: 0; transform: translateY(14px); } }
.entry-continue { grid-area: go; display: flex; align-items: center; justify-content: center; max-width: 380px; text-wrap: balance; text-align: center; text-decoration: none;
  font: 500 18px/1.4 var(--narrator); letter-spacing: 1px; padding: 14px 26px; box-shadow: 0 14px 30px -8px #000c, 0 1px 0 #fff6 inset; }
.entry-lines { grid-area: lines; list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; min-width: 0; }
.entry-line { flex: 1 1 0; min-width: 0; background: var(--sheet); color: var(--ink); box-shadow: 0 16px 30px -10px #000c, 0 0 0 1px #0002;
  clip-path: polygon(0 2%, 8% 0, 40% 1.5%, 72% .3%, 100% 1.6%, 99.4% 50%, 100% 98%, 70% 100%, 34% 98.6%, 0 100%, .5% 52%); }
.entry-row { height: 100%; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "num state" "name name"; align-items: center; gap: 6px 10px;
  padding: 12px 16px 14px; color: inherit; text-decoration: none; transition: background .2s; }
a.entry-row:hover, a.entry-row:focus-visible { background: #efe3c6; outline: none; }
a.entry-row:focus-visible { box-shadow: inset 0 0 0 2px var(--red); }
.entry-numeral { grid-area: num; font: 400 22px/1 var(--display); color: var(--red); }
.entry-name { grid-area: name; min-width: 0; }
.entry-name b { display: block; font: 600 16px/1.35 var(--narrator); text-wrap: balance; }
.entry-name i { display: block; font: italic 15px var(--display); color: var(--muted); margin-top: 1px; }
.entry-state { grid-area: state; justify-self: end; font: 400 13px var(--narrator); color: var(--ink-soft); white-space: nowrap; padding: 3px 10px; border: 1px solid var(--line); border-radius: 30px; background: #fbf6e9; }
.entry-line[data-state=new] .entry-state, .entry-line[data-state=reading] .entry-state { color: var(--sheet); background: var(--red); border-color: var(--red); }
.entry-line[data-state=locked] { background: #e9dfc8; }
.entry-line[data-state=locked] .entry-row { opacity: .6; cursor: not-allowed; }
.entry-line[data-state=locked] .entry-state { background: none; border-style: dashed; }
.entry-rest { flex: .9 1 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 12px 16px; background: #e9dfc8e6; }
.entry-rest-marks { font: 400 14px/1.5 var(--display); letter-spacing: 1px; color: var(--muted); white-space: pre-wrap; text-wrap: balance; }
.entry-rest .entry-state { justify-self: start; align-self: flex-start; background: none; border: 0; padding: 0; }
.entry-rule { grid-area: rule; margin: 0; font: 400 13px/1.6 var(--narrator); color: #f0e2c4; text-shadow: 0 1px 4px #000; text-align: center; }
.entry-rule span + span::before { content: "　"; }

/* A wide but short window (16:9 laptops) has less sky: the title shrinks so it stays above the dome. */
@media (min-width: 861px) and (max-height: 780px) {
  .entry-head h1 { font-size: clamp(32px, 3vw, 44px); }
  .entry-head h1 small { font-size: 20px; }
  .entry-row { padding: 10px 14px 11px; }
}

@media (max-width: 860px) {
  .entry-art { position: relative; height: 48svh; }
  .entry-art::after { background: linear-gradient(#140e0900 60%, #140e09); }
  .entry-pending { width: auto; margin: 0 16px; padding: 20px; font-size: 15px; }
  .entry-sheet { display: block; position: relative; z-index: 1; margin: -5svh 14px 24px; padding: 26px 20px 22px; background: var(--sheet); box-shadow: 0 30px 80px #000a;
    clip-path: polygon(0 1%, 3% 0, 12% .8%, 27% .2%, 44% 1%, 61% .1%, 78% .9%, 93% .2%, 100% 1%, 99.4% 22%, 100% 47%, 99.3% 71%, 100% 99%, 88% 99.6%, 66% 99%, 45% 100%, 23% 99.2%, 5% 100%, 0 99%, .6% 74%, 0 48%, .7% 24%); }
  .entry-head, .entry-shelf { position: static; max-width: none; animation: none; text-shadow: none; }
  .entry-head { text-align: center; }
  .entry-kicker { justify-content: center; font-size: 13px; }
  .entry-head h1 { font-size: 34px; white-space: normal; }
  .entry-shelf { display: block; margin-top: 18px; }
  .entry-continue { max-width: none; width: 100%; font-size: 17px; }
  .entry-lines { flex-direction: column; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
  .entry-line { clip-path: none; box-shadow: none; background: none; border-bottom: 1px solid var(--line); }
  .entry-line[data-state=locked] { background: none; }
  .entry-row { padding: 12px 4px; }
  .entry-rest { background: none; padding: 12px 4px; opacity: .7; }
  .entry-rule { margin-top: 14px; color: var(--muted); text-shadow: none; }
  .entry-rule span { display: block; }
  .entry-rule span + span::before { content: none; }
}
