/* Hearth: what differs from the first world's page. */

:root {
  --panel: rgba(24, 21, 26, 0.9);
  --panel-top: rgba(38, 32, 36, 0.93);
  --line: rgba(240, 220, 170, 0.13);
  --line-strong: rgba(240, 220, 170, 0.24);
  --ink: #efe8d8;
  --ink-soft: #ddd5c3;
  --quiet: #a79f8e;
  --gold: #f0c24c;
  --gold-soft: #f6dc96;
  --ember: #d8763f;
  --sage: #8fbf8a;
  --rust: #c46a5d;
  --violet: #c4aee6;
  --sky: #9fc4e8;
  --left-w: 300px;
  --right-w: 340px;
  --gap: 12px;
}

#view { cursor: crosshair; }

.panel {
  background: linear-gradient(180deg, var(--panel-top), var(--panel) 120px);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 240, 210, 0.05);
}
.panel::-webkit-scrollbar, .tab::-webkit-scrollbar { width: 8px; }
.panel::-webkit-scrollbar-thumb, .tab::-webkit-scrollbar-thumb { background: rgba(240, 220, 170, 0.12); border-radius: 4px; }
.panel::-webkit-scrollbar-track, .tab::-webkit-scrollbar-track { background: transparent; }

canvas.px { display: block; image-rendering: pixelated; }
i[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; font-style: normal; }
i[data-icon]:empty { display: none; }

button { transition: background 0.15s, border-color 0.15s, color 0.15s; }
button i[data-icon] { margin-right: 5px; vertical-align: -3px; }
button.primary { background: var(--gold); border-color: var(--gold); color: #1a1208; font-weight: 600; }
button.primary:hover { background: #f6d06a; }
button.link { background: none; border: 0; padding: 0 4px; color: var(--quiet); text-decoration: underline dotted rgba(240, 220, 170, 0.35); }
button.link:hover { color: var(--gold); background: none; }

h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.panel > h2:first-child, .tab > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
h3 { margin: 12px 0 4px; font: 600 13px/1.2 var(--serif); color: var(--ink); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 4px; }
.row h3 { margin: 0; }
.hint { font-size: 11px; }
.hint b { color: var(--ink); font-weight: 400; }

/* ---- the left panel: the valley's state, and the Teacher's hands ---- */

#left { width: var(--left-w); max-height: calc(100vh - 2 * var(--gap)); padding: 14px 16px 16px; }
#left header h1 { font-size: 24px; letter-spacing: 0.3em; text-shadow: 0 0 18px rgba(240, 194, 76, 0.25); }
#left .divider { display: flex; margin: 6px 0 2px; opacity: 0.9; }
#when { margin: 6px 0 2px; font: 14px/1.3 var(--serif); }
#season { margin: 0 0 10px; font-size: 11px; }
#season.near { color: var(--sky); }
#season.winter { color: #d8e8f6; }
#season.hard { color: #f4f8ff; font-weight: 600; }

.card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  background: rgba(240, 194, 76, 0.06);
}
.card[hidden] { display: none; }
.card > i[data-icon] { margin-top: 1px; }
.card p { margin: 0; }

#signs { border-left-color: var(--violet); background: rgba(196, 174, 230, 0.07); }
#signsText { font: italic 12.5px/1.4 var(--serif); color: #e2d4f4; }
#signs.disaster { border-left-color: #d9604a; background: rgba(217, 96, 74, 0.1); }
#signs.disaster #signsText { color: #f6cfc4; font-style: normal; font-weight: 600; }

#callingHead { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
#callingText { font: 13px/1.38 var(--serif); color: #f2e8d2; margin: 3px 0 4px !important; }
#callingProgress { font-size: 11px; color: var(--quiet); }
.meter { height: 5px; margin: 2px 0 4px; background: rgba(240, 220, 170, 0.1); border-radius: 3px; overflow: hidden; }
.meter[hidden] { display: none; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #d9a43c, var(--gold)); border-radius: 3px; transition: width 0.6s; }
#calling.done { border-left-color: var(--sage); background: rgba(143, 191, 138, 0.08); }
#calling.done #callingHead { color: var(--sage); }
#calling.failed { border-left-color: var(--rust); background: rgba(196, 106, 93, 0.08); }
#calling.failed #callingHead { color: var(--rust); }

#counts { grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 10px; }
#counts div { padding: 5px 0 4px; text-align: center; background: rgba(240, 220, 170, 0.035); border-radius: 5px; }
#counts dt { font-size: 9px; letter-spacing: 0.05em; white-space: nowrap; }
#counts dd { font-size: 16px; }

#pace { gap: 3px; }
#pace button { padding: 5px 0; }
#rate { margin-bottom: 0; }

#show { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
#show button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px 4px; font-size: 10.5px; text-transform: lowercase; }
#show button .item { display: flex; align-items: center; justify-content: center; height: 24px; }
#show button.known { border-color: rgba(240, 194, 76, 0.45); }
#show button.known::after { content: ''; width: 4px; height: 4px; margin-top: 1px; border-radius: 50%; background: var(--gold); }
#show button:not(.known)::after { content: ''; width: 4px; height: 4px; margin-top: 1px; }
#showWait { font-size: 11px; }

#teachMode { margin: 0; gap: 2px; }
#teachMode button { padding: 2px 9px; font-size: 11px; }
#teachMode[hidden] { display: none; }

#tellForm { display: flex; gap: 4px; }
#tell {
  flex: 1;
  min-width: 0;
  font: 13px/1.3 var(--serif);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
}
#tell:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(240, 194, 76, 0.15); }
#tellForm button { display: inline-flex; align-items: center; }
#told { min-height: 1.4em; margin-top: 5px; font-size: 11px; }
#told .heard { color: var(--ink); }
#told .unknown { color: #e59a7a; }
#told .used { color: var(--gold); }

#phrasebook { margin-top: 6px; }
#phrasebook summary { cursor: pointer; color: var(--quiet); font-size: 11px; }
#phrasebook summary:hover { color: var(--ink); }
#phrases { margin-top: 6px; font: 12px/1.45 var(--serif); }
#phrases h4 { margin: 8px 0 2px; font: 600 10px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--quiet); }
#phrases .say { display: block; cursor: pointer; color: #d9d1bf; padding: 1px 0; }
#phrases .say:hover { color: var(--gold); }
#phrases .say small { color: var(--quiet); font: 10px var(--mono); margin-left: 4px; }
#phrases .words { color: var(--quiet); }
#peaceGroup[hidden] { display: none; }

/* ---- the right panel: tabs of story, voices, knowledge, art, houses, record ---- */

#right { width: var(--right-w); max-height: calc(100vh - 2 * var(--gap)); padding: 10px 12px 12px; }
.tabs { display: flex; gap: 3px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0 4px; font-size: 10px; letter-spacing: 0.02em; background: transparent; border-color: transparent; color: var(--quiet); }
.tabs button i[data-icon] { margin: 0; }
.tabs button:hover { background: rgba(240, 220, 170, 0.07); color: var(--ink); }
.tabs button.on { background: rgba(240, 194, 76, 0.12); border-color: rgba(240, 194, 76, 0.4); color: var(--gold-soft); }
.tabs button b { font-weight: 400; color: var(--quiet); margin-left: 2px; }
.tab { overflow-y: auto; min-height: 0; flex: 1 1 auto; }

#chronicle li small { display: flex; align-items: baseline; gap: 6px; }
#chronicle li small .go { margin-left: auto; font: 10px var(--mono); letter-spacing: 0.04em; text-transform: none; }
#chronicle li.k1 { border-left-color: var(--gold); }
#chronicle li.k2 { border-left-color: var(--rust); }
#chronicle li.k3 { border-left-color: #7fa6d9; }
#chronicle li.k4 { border-left-color: #f2d48a; color: #f2e4be; }
#chronicle li.k5 { border-left-color: var(--sage); font-style: italic; }
#chronicle li.k6 { border-left-color: #c9785a; color: #ecd9c6; }
#chronicle li.k7 { border-left-color: #b98ad6; color: #e6dcef; }
#chronicle li.k8 { border-left-color: #9fb7a6; color: #e3ece4; font-style: italic; }
#chronicle li.k9 { border-left-color: #a07fd0; color: #e2d6f2; font-style: italic; }
#chronicle li.k10 { border-left-color: #d9604a; color: #f6dcd2; font-weight: 600; }

#voices { list-style: none; margin: 0; padding: 0; font: 13px/1.4 var(--serif); }
#voices li { padding: 5px 0 5px 10px; border-left: 2px solid var(--line); margin-bottom: 3px; animation: arrive 1.2s ease-out; }
#voices li small { display: block; font: 10px/1.2 var(--mono); color: var(--quiet); letter-spacing: 0.05em; margin-bottom: 1px; }
#voices li .dots { color: var(--gold); letter-spacing: 1px; margin-left: 4px; }
#voices li.teacher { border-left-color: var(--gold); color: #f6dc96; }

#know h2 { justify-content: space-between; }
#know h2 .quiet { letter-spacing: 0.02em; text-transform: none; font-weight: 400; margin: 0; }
#charts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 4px; }
#charts canvas { height: 46px; }
.bars { list-style: none; margin: 0 0 12px; padding: 0; }
.bars li { display: grid; grid-template-columns: 9px 76px 1fr 34px; gap: 6px; align-items: center; padding: 2px 0; font-size: 11px; }
.bars li .swatch { width: 9px; height: 9px; border-radius: 2px; }
.bars li .track { height: 6px; background: rgba(240, 220, 170, 0.08); border-radius: 3px; overflow: hidden; }
.bars li .fill { display: block; height: 100%; border-radius: 3px; transition: width 0.6s; }
.bars li .value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.bars li .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#learned { display: grid; grid-template-columns: 1fr; gap: 3px; margin: 0; }
#learned div { display: flex; justify-content: space-between; }
#learned dt { color: var(--quiet); }
#learned dd { margin: 0; font-variant-numeric: tabular-nums; }
#beliefs { list-style: none; margin: 0 0 6px; padding: 0; font: 12px/1.45 var(--serif); }
#beliefs li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px solid rgba(240, 220, 170, 0.06); }
#beliefs li b { font-weight: normal; color: var(--quiet); font-variant-numeric: tabular-nums; }

/* Their pictures: a gallery, and one looked at closely. */
#gallery p { margin: 0 0 8px; font-size: 11px; }
#galleryGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.thumb { margin: 0; cursor: pointer; }
.thumb canvas { display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); background: #2a2622; }
.thumb figcaption { margin-top: 3px; font: 11px/1.25 var(--serif); color: #d9d1bf; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb:hover canvas { outline: 1px solid var(--gold); }
.thumb.gone { opacity: 0.55; }
.thumb.gone canvas { filter: grayscale(0.7); }

#artView { right: calc(var(--right-w) + 2 * var(--gap)); top: var(--gap); width: 452px; max-height: calc(100vh - 2 * var(--gap)); overflow-y: auto; z-index: 12; }
#artView .close { float: right; padding: 0 6px; font-size: 14px; line-height: 18px; }
#artView h2 { display: block; border: 0; padding: 0; font: 600 17px/1.25 var(--serif); letter-spacing: 0.02em; text-transform: none; color: #f2e4be; margin: 0 0 2px; }
#artView .of { margin: 0 0 8px; color: var(--quiet); font-size: 11px; }
#artView .of .link { margin-left: 6px; padding: 0 5px; font-size: 10px; }
#artCanvas { display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); }
#artView .said { margin: 10px 0 4px; font: italic 14px/1.4 var(--serif); color: #efe8d8; }
#artReading { margin: 6px 0; font: 13px/1.5 var(--serif); color: #e2dac8; }
#artState { margin: 6px 0 0; font-size: 11px; }

/* The houses: a card for each. */
#housesTab p { margin: 0 0 8px; font-size: 11px; }
#houseList { list-style: none; margin: 0; padding: 0; }
#houseList li.house { padding: 6px 8px 7px 9px; margin-bottom: 7px; border-left: 3px solid var(--line); background: rgba(240, 220, 170, 0.035); border-radius: 0 5px 5px 0; cursor: pointer; }
#houseList li.house:hover { background: rgba(240, 220, 170, 0.07); }
#houseList li.house.on { background: rgba(240, 220, 170, 0.11); }
#houseList h3 { margin: 0 0 4px; font: 600 14px/1.2 var(--serif); display: flex; align-items: baseline; gap: 4px; }
#houseList h3 small { font: 11px var(--mono); color: var(--quiet); flex: 1; }
#houseList h3 .link { padding: 0 5px; font-size: 10px; }
#houseList p { margin: 2px 0; font: 12px/1.4 var(--serif); color: #d9d1bf; }
#houseList p b { font: 600 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--quiet); }
#houseList .only { color: var(--gold); }
#houseList .others { list-style: none; margin: 4px 0 0; padding: 0; }
#houseList .others li { display: grid; grid-template-columns: 72px 54px 1fr; gap: 6px; align-items: center; font-size: 11px; padding: 1px 0; }
#houseList .others li span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#houseList .feud { display: block; height: 5px; background: rgba(240, 220, 170, 0.08); border-radius: 3px; overflow: hidden; }
#houseList .feud span { display: block; height: 100%; background: linear-gradient(90deg, #c9a35a, #d9533c); }
#houseList .others small { color: var(--quiet); }
#houseList .spark { display: block; width: 100%; height: 26px; margin: 2px 0 4px; }

/* The record: callings, and what came down from the Teacher. */
#record h4 { margin: 10px 0 4px; }
#record .callings { list-style: none; margin: 0; padding: 0; font: 12px/1.4 var(--serif); }
#record .callings li { padding: 4px 0 4px 18px; position: relative; border-bottom: 1px solid rgba(240, 220, 170, 0.06); }
#record .callings li::before { position: absolute; left: 2px; top: 4px; font-family: var(--mono, monospace); }
#record .callings li.s0::before { content: '…'; color: var(--gold); }
#record .callings li.s1::before { content: '✓'; color: var(--sage); }
#record .callings li.s2::before { content: '✗'; color: var(--rust); }
#record .callings small, #ending li small { display: block; color: var(--quiet); font-family: inherit; }
#record .share, #ending .share { font: 600 22px/1.2 var(--serif); color: var(--gold); margin: 2px 0; }
#record .legacy, #ending .legacy { list-style: none; margin: 0; padding: 0; font-size: 11px; }
#record .legacy li, #ending .legacy li { display: grid; grid-template-columns: 1fr 64px; gap: 6px; padding: 2px 0; align-items: center; }
#record .legacy .track, #ending .legacy .track { position: relative; height: 6px; background: rgba(240, 220, 170, 0.08); border-radius: 3px; overflow: hidden; }
#record .legacy .track span, #ending .legacy .track span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
#record .legacy .all, #ending .legacy .all { background: rgba(240, 220, 170, 0.22); }
#record .legacy .ours, #ending .legacy .ours { background: var(--gold); }
#record .legacy .name, #ending .legacy .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#record .valleys, #endingValleys ul { list-style: none; margin: 0; padding: 0; font: 12px/1.4 var(--serif); }
#record .valleys li, #endingValleys li { padding: 3px 0; }

/* ---- what is happening now, at the foot of the land ---- */

#now {
  left: calc(var(--left-w) + 2 * var(--gap));
  bottom: var(--gap);
  width: min(460px, calc(100vw - var(--left-w) - var(--right-w) - 4 * var(--gap)));
  padding: 7px 10px 8px;
  z-index: 5;
  transition: left 0.25s;
}
body.inspecting #now { left: calc(var(--left-w) + 3 * var(--gap) + 272px); width: min(440px, calc(100vw - var(--left-w) - var(--right-w) - 272px - 5 * var(--gap))); }
#now header { display: flex; align-items: center; gap: 6px; }
#now header b { font: 600 11px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--quiet); }
#nowWatching { margin: 0; font-size: 10px; color: var(--gold-soft); letter-spacing: 0.05em; }
#storyCam, #houseLand { display: inline-flex; align-items: center; padding: 2px 8px; font-size: 10.5px; }
#houseLand { margin-left: auto; }
#houseLand.on { background: rgba(170, 200, 230, 0.14); border-color: rgba(170, 200, 230, 0.5); color: #dfe8f2; }
#storyCam.on { background: rgba(240, 194, 76, 0.16); border-color: rgba(240, 194, 76, 0.55); color: var(--gold-soft); }
#nowFold { padding: 0 7px; font-size: 12px; line-height: 18px; }
#nowList { list-style: none; margin: 6px 0 0; padding: 0; }
#now.folded #nowList { display: none; }
#nowList li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 4px 4px 4px 8px;
  margin-top: 3px;
  border-left: 2px solid var(--line);
  border-radius: 0 4px 4px 0;
  animation: arrive 1.4s ease-out;
}
#nowList li .text { font: 12.5px/1.35 var(--serif); color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#nowList li .ago { color: var(--quiet); font-size: 10px; white-space: nowrap; }
#nowList li .go { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; font-size: 10.5px; }
#nowList li .go canvas { margin: 0; }
#nowList li.on { background: rgba(240, 194, 76, 0.1); }
#nowList li.empty { display: block; border: 0; font-size: 11px; }
#nowList li.k1 { border-left-color: var(--gold); }
#nowList li.k2 { border-left-color: var(--rust); }
#nowList li.k4 { border-left-color: #f2d48a; }
#nowList li.k5 { border-left-color: var(--sage); }
#nowList li.k5 .text { font-style: italic; }
#nowList li.k6 { border-left-color: #c9785a; }
#nowList li.k7 { border-left-color: #b98ad6; }
#nowList li.k8 { border-left-color: #9fb7a6; }
#nowList li.k9 { border-left-color: #a07fd0; }
#nowList li.k9 .text { color: #e2d6f2; }
#nowList li.k10 { border-left-color: #d9604a; }

/* What is under the pointer. */
#hover {
  position: fixed;
  z-index: 30;
  max-width: 280px;
  padding: 5px 9px 6px;
  pointer-events: none;
  background: rgba(20, 18, 24, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  font: 12.5px/1.35 var(--serif);
}
#hover[hidden] { display: none; }
#hover b { display: block; font-weight: 600; color: var(--ink); }
#hover span { display: block; color: var(--quiet); font-size: 11.5px; }

/* ---- looking closer at one creature ---- */

#inspector { left: calc(var(--left-w) + 2 * var(--gap)); width: 272px; max-height: calc(100vh - 2 * var(--gap)); overflow-y: auto; z-index: 10; }
#inspector .close { float: right; padding: 0 6px; font-size: 14px; line-height: 18px; }
#inspector .head { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; }
#inspector .head canvas.portrait { flex: none; border-radius: 8px; background: radial-gradient(circle at 50% 60%, rgba(240, 220, 170, 0.12), rgba(240, 220, 170, 0.02) 70%); border: 1px solid var(--line); }
#inspector .head canvas.portrait.gone { filter: grayscale(0.85) brightness(0.8); }
#inspector .head > div { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
#inspector .head h2 { display: block; border: 0; padding: 0; margin: 0; font: 600 18px/1.15 var(--serif); letter-spacing: 0.02em; text-transform: none; color: var(--gold); }
#inspector .of { margin: 0; color: var(--quiet); }
#inspector .said { margin: 8px 0; font: 13px/1.4 var(--serif); color: #efe8d8; }
#inspector h4 { margin: 10px 0 3px; font: 600 10px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--quiet); }
#inspector .chips { display: flex; flex-wrap: wrap; gap: 3px; }
#inspector .chips span { border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; }
#inspector .chips span.none { border: 0; color: var(--quiet); padding: 0; }
#inspector .rules { margin: 0; padding-left: 14px; font: 12px/1.4 var(--serif); }
#inspector .lean { display: grid; grid-template-columns: 96px 1fr; gap: 6px; align-items: center; margin: 2px 0; }
#inspector .lean .track { display: block; height: 5px; background: rgba(240, 220, 170, 0.08); border-radius: 3px; overflow: hidden; }
#inspector .lean .fill { display: block; height: 100%; background: var(--ember); }
#inspector .follow { padding: 1px 8px; font: 10px var(--mono); letter-spacing: 0.04em; }
#inspector .follow.on { background: var(--ember); color: #1a1410; border-color: var(--ember); }
#inspector .story { margin: 4px 0 6px; font: 12.5px/1.5 var(--serif); color: #e6dfcf; }
#inspector .line { margin: 0; font: 12px/1.6 var(--serif); color: var(--quiet); }
#inspector .line small { color: var(--quiet); }
#inspector button.who { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline dotted rgba(240, 220, 170, 0.35); opacity: 0.75; }
#inspector button.who.alive { opacity: 1; font-weight: 600; }
#inspector button.who:hover { text-decoration-color: currentColor; }
#inspector .chips.young button.who { border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; text-decoration: none; }
#inspector .group button { margin: 2px 4px 2px 0; }
#inspector .feuds { margin: 0; font: 12px/1.4 var(--serif); color: #e8a28f; }
#inspector .bracing { margin: 2px 0 6px; font: italic 12px/1.4 var(--serif); color: #d9c3ef; }
#inspector .sick { color: #b8d98a; }
#inspector .fromYou { margin: 2px 0 6px; font: italic 12px/1.4 var(--serif); color: #f2d48a; }

/* ---- words across the top of the land ---- */

/* The playtest: a note on the title and in the menu. */
.alpha-note {
  margin: 14px 0 0;
  font: 13px/1.5 var(--serif);
  color: var(--quiet);
}
.alpha-note a { color: var(--gold-soft); }
.alpha-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
#menu .alpha-note { margin: 0 0 12px; }

#herald {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(640px, calc(100vw - var(--left-w) - var(--right-w) - 60px));
  padding: 8px 18px;
  text-align: center;
  font: italic 19px/1.35 var(--serif);
  color: #f6e6b8;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.9);
  background: radial-gradient(ellipse at center, rgba(10, 8, 14, 0.55), rgba(10, 8, 14, 0) 72%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s;
  z-index: 8;
}
#herald.show { opacity: 1; }
#herald.loss { color: #f0b8a8; }
#herald.house { color: #e3cdf2; }
#herald.omen { color: #e2d0fa; }
#herald.calling { color: var(--gold-soft); }
#herald.calling.done { color: #bfe3b8; }

/* ---- away, the report, the ending ---- */

#away { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(8, 7, 12, 0.55); pointer-events: none; z-index: 20; }
#away[hidden] { display: none; }
#away > div { text-align: center; font: 22px/1.4 var(--serif); }
#away p { margin: 0; }
#away .bar { width: 260px; height: 4px; margin: 12px auto 0; background: rgba(240, 220, 170, 0.15); border-radius: 2px; overflow: hidden; }
#away .bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.3s; }

#report, #ending, #guide { z-index: 40; background: linear-gradient(180deg, rgba(36, 30, 34, 0.98), rgba(18, 16, 22, 0.98) 160px); }
#report { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(600px, calc(100vw - 40px)); max-height: calc(100vh - 60px); overflow-y: auto; padding: 20px 24px; }
#report h2 { display: block; border: 0; padding: 0; color: var(--gold); font: 600 20px/1.2 var(--serif); letter-spacing: 0.04em; text-transform: none; }
#report ul { list-style: none; margin: 0 0 14px; padding: 0; font: 14px/1.5 var(--serif); }
#report li { margin-bottom: 7px; }
#report li.speech { font-style: italic; color: #d9e4cf; }

#ending { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 40px)); max-height: calc(100vh - 60px); overflow-y: auto; padding: 22px 26px; }
#endingArt { display: block; width: 100%; aspect-ratio: 2 / 1; margin: 0 0 14px; image-rendering: pixelated; border-radius: 6px; border: 1px solid var(--line); }
#endingArt[hidden] { display: none; }
#ending h2 { display: block; border: 0; padding: 0; color: var(--gold); font: 600 26px/1.2 var(--serif); letter-spacing: 0.02em; text-transform: none; margin: 2px 0 10px; }
#ending h3 { margin: 16px 0 6px; }
#endingEpilogue { font: 15px/1.55 var(--serif); color: #ece4d2; }
#endingReveal { font: italic 14px/1.5 var(--serif); color: #e2d0fa; }
#endingLegacy { list-style: none; margin: 0; padding: 0; }
#endingLegacy > li.head, #record .legacy-list > li.head { margin-top: 6px; }
#endingCallings { margin: 0; padding-left: 18px; font: 13px/1.45 var(--serif); }
#endingCallings li { margin-bottom: 5px; }
#endingCallings li.s1 { color: #cfe8c9; }
#endingCallings li.s2 { color: #e6c2ba; }
#guide h2 { border: 0; padding: 0; }

/* ---- the title ---- */

#title {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(ellipse at 50% 40%, rgba(12, 10, 16, 0.45), rgba(6, 5, 9, 0.9) 75%);
  animation: fadein 0.8s ease-out;
}
#title[hidden] { display: none; }
#title .card {
  display: block;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 18px 24px 16px;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(38, 32, 36, 0.97), rgba(18, 16, 22, 0.97));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
#titleArt { display: block; width: 100%; aspect-ratio: 2 / 1; margin: 0 0 14px; image-rendering: pixelated; border-radius: 7px; border: 1px solid var(--line); background: #141a2e; }
#titleArt[hidden] { display: none; }
#title h1 { font-size: 34px; letter-spacing: 0.34em; margin: 4px 0 8px; padding-left: 0.34em; text-shadow: 0 0 24px rgba(240, 194, 76, 0.35); }
#title .tagline { margin: 0 0 10px; font: italic 16px/1.4 var(--serif); color: var(--gold-soft); }
#title p { margin: 0 0 12px; font: 14px/1.55 var(--serif); color: var(--ink-soft); }
#title .group { justify-content: center; gap: 8px; margin: 4px 0 10px; }
#title .group button { padding: 7px 18px; font-size: 13px; }
#titleWorld { font-size: 11px; margin: 0; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---- today's valley ---- */
#endingDaily { margin: 10px 0 6px; padding: 10px 12px; border: 1px solid rgba(240, 194, 76, 0.35); border-radius: 6px; background: rgba(240, 194, 76, 0.06); }
#endingDaily p { margin: 4px 0; font: 13px/1.45 var(--serif); }
#endingDaily b { color: #f6e2b0; font-weight: 600; }
#endingDaily .better { color: #bfe6a8; }
#endingDaily .worse { color: #f0b8a8; }
#endingDaily .days { font: 11px/1.5 var(--mono); color: var(--quiet); }
#endingDaily .group { margin-top: 8px; }
#endingDaily textarea { box-sizing: border-box; width: 100%; margin-top: 6px; padding: 6px; resize: none; font: 12px/1.4 var(--mono); color: var(--ink); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-strong); border-radius: 4px; }

/* ---- the legend of the Teacher ---- */
.legend p { margin: 4px 0; font: 13px/1.45 var(--serif); }
.legend ul { margin: 2px 0 6px; padding-left: 18px; font: 13px/1.45 var(--serif); }
.legend li { margin-bottom: 4px; }
.legend li small { display: block; color: var(--ink-soft); }
.legend b { color: #f6e2b0; font-weight: 600; }
.legend q { font-style: italic; }

/* ---- their words: the Teacher's notebook ---- */
#notebook { flex: 0 0 auto; max-height: 62%; padding: 2px 6px 10px 2px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
#notebook .nb-head { display: flex; align-items: baseline; gap: 8px; }
#notebook .nb-head h3 { margin: 4px 0; }
#notebook .nb-head small { margin-left: auto; font: 10.5px var(--mono); color: var(--quiet); }
#notebook > p { margin: 4px 0 8px; font: 12px/1.45 var(--serif); }
#notebook .nb-list { list-style: none; margin: 0; padding: 0; }
#notebook .nb-word { padding: 6px 0; border-top: 1px dashed var(--line); }
#notebook .nb-top { display: flex; align-items: center; gap: 8px; }
#notebook .nb-top b { font: 600 15px var(--serif); color: #f6e2b0; letter-spacing: 0.02em; }
#notebook .nb-top select { margin-left: auto; font-size: 11.5px; padding: 2px 4px; background: rgba(0, 0, 0, 0.3); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 4px; }
#notebook .nb-ex { list-style: none; margin: 3px 0 0; padding: 0; }
#notebook .nb-ex li { font: 12.5px/1.4 var(--serif); color: var(--ink-soft); }
#notebook .nb-ex q { font-style: italic; }
#notebook .nb-ex small { color: var(--quiet); font-size: 10.5px; }
#notebook .nb-result { margin: 6px 0 0; font: 12px/1.4 var(--serif); }
#notebook .nb-result.right { color: #bfe6a8; }
#notebook .nb-result.wrong { color: #f0b8a8; }
#notebook .nb-known { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 12px var(--serif); }
#notebook .nb-known span { color: var(--ink-soft); }
#notebook h4 { margin: 10px 0 4px; }
.gloss { text-decoration: underline dotted rgba(246, 226, 176, 0.6); text-underline-offset: 2px; }
.gloss-en { font: 9.5px var(--mono); color: var(--quiet); margin: 0 2px 0 1px; vertical-align: baseline; position: relative; top: 0.2em; }
#wordsCount { margin-left: 3px; color: #f6e2b0; }
#theirWayRow { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 11.5px; cursor: pointer; }
#theirWayRow[hidden] { display: none; }

/* ---- echoes: what the Teacher taught, come back far away ---- */
#echo { left: 50%; transform: translateX(-50%); top: 52px; width: min(460px, calc(100vw - var(--left-w) - var(--right-w) - 4 * var(--gap))); padding: 9px 12px 10px; z-index: 13; border-left: 3px solid #b8c6f2; animation: echoIn 0.9s ease-out; }
#echo[hidden] { display: none; }
#echo .head { display: flex; align-items: center; gap: 8px; }
#echo .head svg { flex: none; }
#echo .head h3 { margin: 0; font: 600 15px/1.25 var(--serif); color: #dfe6ff; letter-spacing: 0.01em; text-transform: none; }
#echo .head small { margin-left: auto; font: 10px var(--mono); color: var(--quiet); letter-spacing: 0.06em; white-space: nowrap; }
#echo p { margin: 5px 0 0; font: 13px/1.45 var(--serif); color: #efe8d8; }
#echo .buttons { display: flex; gap: 6px; align-items: center; margin-top: 7px; }
#echo .buttons button { font-size: 11.5px; padding: 3px 10px; }
#echo .buttons button.look { background: rgba(184, 198, 242, 0.14); border-color: rgba(184, 198, 242, 0.55); color: #dfe6ff; }
@keyframes echoIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 860px) { #echo { width: calc(100vw - 20px); } }
#endingEchoes ul, #endingWords ul { margin: 0; padding-left: 18px; font: 13px/1.45 var(--serif); }
#endingEchoes li, #endingWords li { margin-bottom: 6px; }
#endingEchoes li b { color: #dfe6ff; font-weight: 600; }
#endingEchoes li small, #endingWords li small { display: block; color: var(--ink-soft); }
#endingWords li b { color: #f6e2b0; font-weight: 600; }

/* ---- moments that need the Teacher ---- */
#moment { left: 50%; transform: translateX(-50%); top: 52px; width: min(440px, calc(100vw - var(--left-w) - var(--right-w) - 4 * var(--gap))); padding: 9px 12px 10px; z-index: 14; border-left: 3px solid #f0c24c; }
#moment[hidden] { display: none; }
#moment .head { display: flex; align-items: center; gap: 8px; }
#moment .head h3 { margin: 0; font: 600 15px/1.25 var(--serif); color: #f6e2b0; letter-spacing: 0.01em; text-transform: none; }
#moment .head small { margin-left: auto; font: 10px var(--mono); color: var(--quiet); letter-spacing: 0.06em; }
#moment p { margin: 4px 0 0; font: 13px/1.4 var(--serif); color: #efe8d8; }
#moment p.ask { color: #f2d48a; font-style: italic; }
#moment .bar { height: 3px; margin: 7px 0 6px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden; }
#moment .bar span { display: block; height: 100%; background: #f0c24c; transition: width 0.4s linear; }
#moment .buttons { display: flex; gap: 6px; align-items: center; }
#moment .buttons button { font-size: 11.5px; padding: 3px 10px; }
#moment .buttons button.act:not(:disabled) { background: rgba(240, 194, 76, 0.18); border-color: rgba(240, 194, 76, 0.6); color: #f6e2b0; }
#moment .buttons .note { margin-left: auto; font: 10.5px var(--mono); color: var(--quiet); }
#moment.answered { border-left-color: #9fd88a; }
#moment.answered .head h3 { color: #d8f0c8; }
#moment.passed { border-left-color: #a8a4ae; }
#moment.missed { border-left-color: #e5604a; }
#moment.missed .head h3 { color: #f4c0b4; }
@media (max-width: 860px) { #moment { top: 52px; width: calc(100vw - 20px); } }

/* ---- folding the side panels away, and watching the land alone ---- */
.fold-side { padding: 0 7px; font-size: 15px; line-height: 18px; color: var(--quiet); }
#foldLeft { position: absolute; top: 0; right: 64px; }
#foldRight { margin-left: auto; align-self: center; }
@media (min-width: 861px) {
  body.fold-left { --left-w: 0px; }
  body.fold-right { --right-w: 0px; }
  body.fold-left #left, body.fold-right #right, body.watching #now { display: none; }
  body.fold-left #openLeft, body.fold-right #openRight { display: inline-flex; align-items: center; gap: 6px; position: fixed; top: 10px; z-index: 25; padding: 6px 10px; background: var(--panel-top); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); opacity: 0.75; }
  body.fold-left #openLeft:hover, body.fold-right #openRight:hover { opacity: 1; }
  body.fold-left #openLeft { left: 10px; }
  body.fold-right #openRight { right: 10px; }
  body.fold-left #inspector { top: 52px; }
}

/* ---- drawers, for small screens ---- */

.drawer { display: none; }

@media (max-width: 1240px) {
  :root { --right-w: 300px; }
}

@media (max-width: 1100px) {
  :root { --left-w: 270px; --right-w: 260px; }
  #show { grid-template-columns: repeat(4, 1fr); }
  #artView { width: min(452px, calc(100vw - var(--right-w) - 48px)); }
  body.inspecting #now { display: none; }
}

@media (max-width: 860px) {
  .drawer { display: inline-flex; align-items: center; gap: 6px; position: fixed; top: 10px; z-index: 25; padding: 6px 10px; background: var(--panel-top); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
  .drawer i[data-icon] { margin: 0; }
  #openLeft { left: 10px; }
  #openRight { right: 10px; }
  #left, #right { display: none; top: 52px; max-height: calc(100vh - 64px); z-index: 24; }
  body.show-left #left { display: block; left: 10px; width: min(340px, calc(100vw - 20px)); }
  body.show-right #right { display: flex; right: 10px; width: min(380px, calc(100vw - 20px)); }
  #now, body.inspecting #now { display: block; left: 10px; right: 10px; width: auto; bottom: 10px; }
  #nowList li:nth-last-child(n+4) { display: none; }
  #nowList li .text { font-size: 12px; }
  #storyCam, #houseLand { font-size: 10px; padding: 2px 6px; }
  #inspector:not([hidden]) { display: block; left: 10px; right: 10px; width: auto; top: 52px; max-height: 52vh; }
  #artView { left: 10px; right: 10px; top: 52px; width: auto; }
  #herald { max-width: calc(100vw - 32px); top: 52px; font-size: 16px; }
}

/* ---- writing ---- */
#chronicle li.k11 { border-left-color: #7fc4b8; color: #def0ec; }
#nowList li.k11 { border-left-color: #7fc4b8; }
#tellMode { margin: 0; gap: 2px; }
#tellMode button { padding: 2px 9px; font-size: 11px; }
#tellMode[hidden] { display: none; }
#writingView { right: calc(var(--right-w) + 2 * var(--gap)); top: var(--gap); width: 420px; max-height: calc(100vh - 2 * var(--gap)); overflow-y: auto; z-index: 12; }
#writingView .close { float: right; padding: 0 6px; font-size: 14px; line-height: 18px; }
#writingView h2 { display: block; border: 0; padding: 0; font: 600 17px/1.25 var(--serif); letter-spacing: 0.02em; text-transform: none; color: #def0ec; margin: 0 0 2px; }
#writingView .of { margin: 0 0 8px; color: var(--quiet); font-size: 11px; }
#writingView .of .link { margin-left: 6px; padding: 0 5px; font-size: 10px; }
#writingCanvas { display: block; width: 100%; aspect-ratio: 3 / 1; border-radius: 4px; box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.5); }
#writingView .said { margin: 10px 0 6px; font: italic 15px/1.4 var(--serif); color: #efe8d8; }
#writingKey { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
#writingKey .key { margin: 0; text-align: center; }
#writingKey .key canvas { display: block; margin: 0 auto; }
#writingKey figcaption { font: 10px var(--mono); color: var(--quiet); }
#writingState { font-size: 11px; }
#writingStats { display: grid; gap: 3px; margin: 0 0 6px; }
#writingStats div { display: flex; justify-content: space-between; }
#writingStats dt { color: var(--quiet); }
#writingStats dd { margin: 0; font-variant-numeric: tabular-nums; }
#houseList .signs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 3px 0; }
#houseList .signs b { font: 600 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--quiet); margin-right: 4px; }
#houseList .signs small { color: var(--quiet); font-size: 10px; margin-left: 4px; }
canvas.sign { border-radius: 3px; background: rgba(240, 220, 170, 0.06); }
canvas.sign.budding { opacity: 0.4; }
#inspector .signs-known { margin: 0; font: 12px/1.45 var(--serif); }
#inspector .signs-known small { color: var(--quiet); }
#inspector .signs-known .yours { color: #f2d48a; }
@media (max-width: 860px) {
  #writingView { left: 10px; right: 10px; top: 52px; width: auto; }
}

/* ---- strangers ---- */
#chronicle li.k12 { border-left-color: #e0a060; color: #f6e2cc; font-weight: 600; }
#nowList li.k12 { border-left-color: #e0a060; }
#herald.strangers { color: #f6d2a8; }
#inspector .stranger { margin: 0; font: italic 12px/1.4 var(--serif); color: #f0c49a; }
#houseList .stranger { color: #f0c49a; }
#houseList .stranger b { color: #e0a060; }

/* ---- sound ---- */
#left header { position: relative; }
#soundToggle { position: absolute; top: 0; right: 0; padding: 2px 8px; font-size: 11px; color: var(--quiet); }
#soundToggle.on { color: var(--gold-soft); border-color: rgba(240, 194, 76, 0.5); background: rgba(240, 194, 76, 0.12); }

/* ---- remembering ---- */
#chronicle li.k13 { border-left-color: #c9b48a; color: #efe6d2; font-style: italic; }
#nowList li.k13 { border-left-color: #c9b48a; }
#herald.rite { color: #efe0bf; }
#days { list-style: none; margin: 0 0 4px; padding: 0; font: 12px/1.45 var(--serif); }
#days li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px solid rgba(240, 220, 170, 0.06); }
#days li b { font-weight: normal; color: var(--quiet); white-space: nowrap; font-size: 11px; }
#gatheringNow { color: var(--gold-soft); font-size: 11px; }
#gatheringNow:empty { display: none; }
#inspector .named { margin: 0; font: italic 12px/1.4 var(--serif); color: #e6dcc6; }
#inspector .keeps { margin: 0; font: 12px/1.4 var(--serif); color: #e6dcc6; }

/* ---- gardens, boats and drums ---- */
#chronicle li.k14 { border-left-color: #a8c77a; color: #eef3df; }
#nowList li.k14 { border-left-color: #a8c77a; }
#herald.making { color: #e6f0cc; }
#chronicle li.k15 { border-left-color: #e0a96a; color: #f6e9d6; }
#nowList li.k15 { border-left-color: #e0a96a; }
#herald.gift { color: #f6e2c4; }
#inspector .gifts { margin: 0; font: 12px/1.4 var(--serif); color: #ecd9b8; }
#inspector .doing { margin: 0; font: italic 12px/1.4 var(--serif); color: #e9e0c8; }
#inspector .later { margin: 0; font: 12px/1.4 var(--serif); color: #d8e6c0; }
