/* Dust on the Mountain, v4. The game is set as a printed book carried under a hill sky:
   ivory paper, blue-black ink, lapis and brass, and one red thread. */
@import url("../fonts/fonts.css");

:root {
  --ink: #17203a;
  --ink-soft: #46506b;
  --night: #0d1424;
  --paper: #f7f1e3;
  --paper-2: #ede4cf;
  --paper-3: #fbf7ec;
  --rule: #d5c7a6;
  --lapis: #234b8c;
  --sky: #7fb0dc;
  --sky-pale: #dceaf5;
  --brass: #b47f1f;
  --brass-lt: #e5b95c;
  --thread: #b23a2b;
  --leaf: #2f6f4e;
  --skyband: linear-gradient(90deg, #2a63bd, #79aee4 60%, #cfe3f6);
  --serif: "EB Garamond", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Jost", "Gill Sans", "Trebuchet MS", system-ui, sans-serif;
  --hand: "Kalam", "Segoe Print", cursive;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --shadow: 0 18px 50px rgba(6, 10, 22, .45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--ink); overflow: hidden;
  font: 21px/1.5 var(--serif); font-feature-settings: "kern", "liga", "onum"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--brass-lt); outline-offset: 2px; }
#game { position: fixed; inset: 0; }
.label, .kicker { margin: 0; font: 500 12.5px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--lapis); font-feature-settings: "lnum"; }
.muted { color: var(--ink-soft); }
.small { font-size: 16px; }
.num { font-family: var(--sans); font-feature-settings: "lnum", "tnum"; }

/* ---- The sky and the thread: the strip at the head of the screen ---------------- */
.skybar { position: fixed; z-index: 21; left: 0; right: 0; top: 0; height: 5px; background: var(--skyband); }
.thread { position: fixed; z-index: 22; left: 0; right: 0; top: 5px; height: 2px; pointer-events: none; }
.thread i { display: none; }
.thread::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: var(--done, 0%); background: var(--thread); transition: width 900ms var(--ease); }

/* ---- Where and when: the chapter, top left ---------------------------------------- */
.masthead { position: fixed; z-index: 20; left: 14px; top: 26px; max-width: min(420px, 46vw); padding: 9px 16px 10px; border-radius: 10px; background: rgba(13, 20, 36, .78); color: var(--paper);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(229, 185, 92, .28); }
.masthead .label { color: var(--brass-lt); font-size: 11px; }
.masthead b { display: block; font: 600 25px/1.1 var(--display); letter-spacing: .01em; }
.masthead em { display: block; font-size: 16px; color: #c8d6ea; }
.account { position: fixed; z-index: 20; left: 14px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; border-radius: 999px; background: rgba(13, 20, 36, .72); color: var(--paper); font: 400 13px/1 var(--sans); letter-spacing: .04em; }
.account button { padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(247, 241, 227, .14); color: var(--paper); font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.account .chapters { display: inline-flex; gap: 4px; }
.account .chapters button.on { background: var(--brass-lt); color: var(--night); }

/* ---- What Bisnu carries: top right ------------------------------------------------ */
.hud { position: fixed; z-index: 20; top: 26px; right: 14px; display: flex; gap: 6px; align-items: stretch; }
.hud > * { border: 0; border-radius: 10px; background: rgba(13, 20, 36, .78); color: var(--paper); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(229, 185, 92, .22); }
.wallet { display: grid; align-content: center; justify-items: center; min-width: 96px; padding: 5px 14px 6px; line-height: 1.05; }
.wallet .lbl, .hud button .lbl { font: 500 10px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-lt); }
.wallet b { display: inline-block; font: 400 24px/1.1 var(--sans); font-feature-settings: "lnum", "tnum"; }
.wallet .need { font: 400 11px/1.2 var(--sans); letter-spacing: .04em; color: #c8d6ea; }
.wallet.enough b { color: #9be0b4; }
.hud button { display: grid; justify-items: center; align-content: center; gap: 1px; padding: 5px 13px 6px; transition: transform 160ms var(--ease), background-color 160ms ease; }
.hud button b { display: inline-block; font: 400 20px/1.1 var(--sans); font-feature-settings: "lnum", "tnum"; }
.hud button:active { transform: scale(.96); }
.hud .end { padding: 6px 20px; background: var(--brass-lt); color: var(--night); font: 500 13px/1.15 var(--sans); letter-spacing: .12em; text-transform: uppercase; box-shadow: none; max-width: 190px; }
.hud .end:not(.ready) { background: rgba(13, 20, 36, .78); color: #aeb9cd; box-shadow: inset 0 0 0 1px rgba(229, 185, 92, .22); }
.hud .end.ready { animation: ready 2s ease-in-out infinite; }
@keyframes ready { 50% { box-shadow: 0 0 0 7px rgba(229, 185, 92, .25); } }
.goal { position: fixed; z-index: 20; top: 92px; right: 14px; width: min(430px, calc(100% - 28px)); margin: 0; padding: 9px 16px 11px 18px; border-radius: 10px; background: rgba(247, 241, 227, .96); color: var(--ink);
  font-size: 18px; line-height: 1.32; box-shadow: 0 8px 24px rgba(6, 10, 22, .3); border-left: 3px solid var(--thread); }
.goal .label { display: block; margin-bottom: 3px; font-size: 10.5px; color: var(--thread); }
/* pointed out once at the start: a ring round the box, and a tag saying what it is */
.goal.pointed { animation: pointed 1.5s ease-in-out 6; }
.goal.pointed::after { content: "The steps of his task are listed here"; position: absolute; right: 12px; top: 100%; margin-top: 12px; padding: 6px 13px; border-radius: 999px; background: var(--brass-lt); color: #1a2038;
  font: 600 12.5px/1.2 var(--sans); letter-spacing: .03em; white-space: nowrap; box-shadow: 0 6px 16px rgba(6, 10, 22, .35); }
@keyframes pointed { 0%, 100% { box-shadow: 0 8px 24px rgba(6, 10, 22, .3), 0 0 0 0 rgba(229, 185, 92, 0); } 50% { box-shadow: 0 8px 24px rgba(6, 10, 22, .3), 0 0 0 10px rgba(229, 185, 92, .8); } }

.sheet { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(9, 14, 28, .66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); overflow-y: auto; }
.sheet-card { position: relative; width: min(520px, 100%); padding: 34px 36px 30px; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); animation: rise 420ms var(--ease) both; overflow: hidden; }
.sheet-card::before, .ex::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--skyband); box-shadow: 0 2px 0 var(--thread); }
.sheet-card h2 { margin: 2px 0 12px; font: 600 34px/1.08 var(--display); color: var(--ink); }
.sheet-card p { margin: 0 0 12px; }
.sheet-item { margin: 0 0 10px; padding: 10px 14px; background: var(--paper-3); border-left: 2px solid var(--brass); white-space: pre-line; font-size: 19px; }
.sheet-item b { display: block; font: 500 11px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--lapis); }
.notice { position: fixed; z-index: 45; left: 50%; top: 96px; transform: translateX(-50%); max-width: min(600px, calc(100% - 32px)); padding: 11px 20px 12px; background: var(--paper); border-radius: 10px;
  border-left: 3px solid var(--brass); box-shadow: 0 10px 30px rgba(6, 10, 22, .4); font-size: 19px; line-height: 1.35; animation: drop 320ms var(--ease); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* ---- Buttons ------------------------------------------------------------------------ */
.btn { padding: 13px 28px 12px; border: 0; border-radius: 999px; background: var(--lapis); color: #fff; font: 500 13.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  transition: transform 160ms var(--ease), background-color 160ms ease, box-shadow 160ms ease; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.quiet { background: transparent; color: var(--lapis); box-shadow: inset 0 0 0 1.5px rgba(35, 75, 140, .45); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

/* ---- A scene: the painting, its layers, and the leaf of text ---------------------- */
.scene { position: fixed; z-index: 30; inset: 0; overflow: hidden; background: var(--night); --px: 0; --py: 0; }
.scene-bg, .scene-fg { position: absolute; inset: -3%; background: center / cover no-repeat; will-change: transform; }
.scene-bg { animation: drift 34s ease-in-out infinite alternate; transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -6px), 0); }
.scene-fg { pointer-events: none; transform: translate3d(calc(var(--px) * -30px), calc(var(--py) * -16px), 0); transition: opacity 600ms ease; }
@keyframes drift { from { scale: 1; } to { scale: 1.07; } }
.scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(9, 14, 28, .28), transparent 22%, transparent 52%, rgba(9, 14, 28, .62)); }
.air { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx { position: absolute; inset: 0; z-index: 4; opacity: 0; pointer-events: none; }
.film { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; object-fit: cover; background: #000; }

.talk { position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(1080px, calc(100% - 28px)); display: flex; gap: 16px; align-items: flex-end; cursor: pointer; }
.actor, .face-frame { flex: none; width: min(214px, 27vw); margin: 0; padding: 8px; background: var(--paper); border-radius: 6px; box-shadow: var(--shadow), inset 0 0 0 1px var(--rule); }
.actor canvas, .face-frame img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; border-radius: 3px; background: linear-gradient(180deg, #9fc3e6, #e9efe6 70%, #e8dcc0); }
.actor canvas { object-position: 50% 100%; }
.box { position: relative; flex: 1; min-height: 148px; padding: 20px 30px 34px; background: var(--paper); border-radius: 8px; box-shadow: var(--shadow), inset 0 0 0 1px var(--rule);
  background-image: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, .55), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgba(213, 199, 166, .32), transparent 60%); }
.line { margin: 0; font-size: 23px; line-height: 1.48; text-wrap: pretty; hanging-punctuation: first; }
.talk.narration .box { padding-top: 24px; }
.talk.narration .line { font-size: 22.5px; }
.talk.narration.opens .line::first-letter { float: left; margin: .06em .09em 0 0; font: 600 3.25em/.8 var(--display); color: var(--lapis); }
.verse-line { white-space: pre-line; font-style: italic; padding-left: 18px; border-left: 2px solid var(--brass); }
.more { position: absolute; right: 18px; bottom: 9px; font: 400 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); opacity: .7; }
.more::before { content: "❧"; margin-right: 7px; font: 17px/1 var(--serif); letter-spacing: 0; color: var(--brass); display: inline-block; animation: nod 1.8s ease-in-out infinite; }
@keyframes nod { 50% { transform: translateX(4px); } }
.talk.echo .box { background: var(--sky-pale); box-shadow: var(--shadow), inset 3px 0 0 var(--thread); }
.talk.echo .who { color: var(--thread); }
.talk.echo .who::after { background: var(--thread); }

/* ---- An illustrated page ------------------------------------------------------------ */
.page { position: absolute; z-index: 3; inset: 0; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); background: var(--paper); cursor: pointer; }
.page-pic { position: relative; overflow: hidden; min-height: 0; background: var(--night); }
.page-pic::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(247, 241, 227, .55); pointer-events: none; }
.page-img { width: 100%; height: 100%; object-fit: cover; display: block; animation: drift 38s ease-in-out infinite alternate; }
.page-text { position: relative; z-index: 1; overflow-y: auto; padding: 46px clamp(26px, 4vw, 60px) 64px; background: var(--paper);
  background-image: linear-gradient(90deg, rgba(23, 32, 58, .07), transparent 26px); }
.page-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 26px; border-bottom: 1px solid var(--rule); font: 500 10.5px/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.page-text h1 { margin: 0 0 6px; font: 500 clamp(34px, 3.6vw, 54px)/1.02 var(--display); letter-spacing: -.005em; color: var(--ink); text-wrap: balance; }
.page-orn { margin: 12px 0 22px; height: 12px; background: linear-gradient(var(--thread), var(--thread)) left center / 54px 2px no-repeat; }
.page-body p { margin: 0 0 .9em; font-size: clamp(19px, 1.42vw, 22.5px); line-height: 1.6; text-wrap: pretty; hanging-punctuation: first; max-width: 34em; }
.page-body p:first-child::first-letter { float: left; margin: .05em .09em 0 0; font: 600 3.5em/.8 var(--display); color: var(--lapis); }
.page-body p.verse { white-space: pre-line; font-style: italic; padding-left: 20px; border-left: 2px solid var(--brass); }
.page-body p.verse::first-letter { float: none; margin: 0; font: inherit; color: inherit; }
.page-body p.by { margin-top: -.5em; font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.page-body p.by::first-letter { float: none; margin: 0; font: inherit; color: inherit; }
.page .more { right: 26px; bottom: 18px; }

/* ---- A title card between parts of the story --------------------------------------- */
.title-card { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--paper); cursor: pointer; background: linear-gradient(180deg, rgba(9, 14, 28, .5), rgba(9, 14, 28, .82)); }
.title-card .label { color: var(--brass-lt); }
.title-card h1 { margin: 14px 0 12px; font: 500 clamp(44px, 7vw, 96px)/.98 var(--display); letter-spacing: -.01em; }
.title-card p { margin: 0 auto; max-width: 30em; font-size: 22px; font-style: italic; color: #d7e2f1; }
.title-card i.knot { display: block; width: 72px; height: 2px; margin: 0 auto 22px; background: var(--thread); }

/* ---- Tasks, decisions and other panels ---------------------------------------------- */
.panel { position: absolute; z-index: 3; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; padding: 30px 16px 16px; background: rgba(9, 14, 28, .6); -webkit-backdrop-filter: blur(5px) saturate(.9); backdrop-filter: blur(5px) saturate(.9); }
.ex { position: relative; width: min(760px, 100%); max-height: calc(100dvh - 46px); overflow-y: auto; padding: 34px 38px 30px; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); animation: rise 380ms var(--ease);
  background-image: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .5), transparent 60%); }
.ex h2 { margin: 3px 0 8px; font: 600 clamp(27px, 2.5vw, 35px)/1.1 var(--display); color: var(--ink); text-wrap: balance; }
.ex p { margin: 0 0 10px; }
.ex > .muted { font-size: 19px; }
.spread { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); width: min(1100px, 100%); max-height: calc(100dvh - 46px); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); animation: rise 380ms var(--ease); background: var(--paper); }
.spread .ex { width: auto; max-height: none; height: 100%; border-radius: 0; box-shadow: none; animation: none; }
.plate { position: relative; min-height: 220px; background: var(--night) center / cover no-repeat; }
.plate::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(247, 241, 227, .6); }
.plate::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(9, 14, 28, .78)); }
.plate figcaption { position: absolute; z-index: 1; left: 28px; right: 28px; bottom: 26px; color: var(--paper); font: italic 400 19px/1.35 var(--serif); }
.plate figcaption b { display: block; margin-bottom: 6px; font: 500 11px/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--brass-lt); }

.quote { margin: 14px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--brass); font-size: 24.5px; line-height: 1.42; font-style: italic; color: var(--ink); text-wrap: pretty; }
.quote.verse, .quote.gap { white-space: pre-line; }
.by { margin: -6px 0 14px 22px; font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.by::before { content: "from "; }
.price { font: 400 30px/1.2 var(--sans); color: var(--lapis); }

/* Answers and choices: each one a card with its letter. */
.opts { display: grid; gap: 9px; margin: 14px 0 6px; counter-reset: opt; }
.opt { position: relative; text-align: left; padding: 13px 18px 13px 62px; background: var(--paper-3); border: 1px solid var(--rule); border-radius: 10px; font-size: 20.5px; line-height: 1.34; color: var(--ink); counter-increment: opt;
  transition: transform 180ms var(--ease), border-color 160ms ease, box-shadow 180ms ease, background-color 160ms ease; }
.opt::before { content: counter(opt, upper-alpha); position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--brass); color: var(--brass); font: 600 20px/1 var(--display); background: var(--paper); transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.opt:active:not(:disabled) { transform: scale(.985); }
.opt:disabled { cursor: default; }
.opt:disabled:not(.right):not(.wrong) { opacity: .5; }
.opt.right, .opt.right:disabled { background: #e6f1e8; border-color: var(--leaf); color: #173a28; animation: pop 360ms var(--ease); }
.opt.right::before { content: "✓"; background: var(--leaf); border-color: var(--leaf); color: #fff; font: 600 17px/1 var(--sans); }
.opt.wrong, .opt.wrong:disabled { background: #f7e5e0; border-color: var(--thread); color: #7a2a20; animation: shake 360ms ease-in-out; }
.opt.wrong::before { content: "✕"; background: transparent; border-color: var(--thread); color: var(--thread); font: 500 15px/1 var(--sans); }
@keyframes pop { 40% { transform: scale(1.02); } }
@keyframes shake { 25% { transform: translateX(-5px); } 55% { transform: translateX(5px); } 80% { transform: translateX(-2px); } }
.opt .sub { display: block; margin-top: 3px; font-size: 17px; font-style: italic; color: var(--ink-soft); }
@media (hover: hover) and (pointer: fine) {
  .opt:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--lapis); box-shadow: 0 8px 20px rgba(23, 32, 58, .14); background: #fff; }
  .opt:hover:not(:disabled)::before { background: var(--lapis); border-color: var(--lapis); color: #fff; }
  .btn:hover:not(:disabled) { background: #1b3d75; box-shadow: 0 6px 16px rgba(23, 32, 58, .25); }
  .btn.quiet:hover:not(:disabled) { background: rgba(35, 75, 140, .08); box-shadow: inset 0 0 0 1.5px var(--lapis); }
  .hud button:hover { background: rgba(28, 40, 68, .92); }
  .hud .end.ready:hover { background: #f1cc7c; }
  .tok:hover:not(:disabled) { background: var(--sky-pale); }
  .word:hover { background: rgba(35, 75, 140, .12); }
}
/* word banks, piles and pairs do without the letters */
.opts.bank { display: flex; flex-wrap: wrap; gap: 8px; }
.opts.bank .opt, .bins .opt, .match .opt, .opt.typed { padding: 10px 16px; counter-increment: none; }
.opts.bank .opt::before, .bins .opt::before, .match .opt::before, .opt.typed::before { content: none; }
.opts.bank .opt { width: auto; flex: 0 1 auto; border-radius: 999px; }
.opt.typed { display: flex; gap: 8px; align-items: center; cursor: default; }
.opt.typed .own { flex: 1; }
.opt.typed .btn { flex: none; margin: 0; }

/* A decision: the fork in the path. */
.choice h2 { font-size: clamp(27px, 2.6vw, 37px); }
.choice .lead { font-size: 20px; font-style: italic; color: var(--ink-soft); }
.clock { position: relative; height: 3px; margin: 2px 0 16px; background: var(--rule); }
.clock i { display: block; height: 100%; background: var(--thread); transform-origin: left; }
.clock i::after { content: ""; position: absolute; right: -5px; top: -5px; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle, #fff 0 22%, #ffc55c 40%, #f0562c 70%, transparent 74%); animation: spark 260ms linear infinite alternate; }
@keyframes spark { to { scale: 1.5; opacity: .75; } }
.choice.urgent::before { background: linear-gradient(90deg, #7f1d12, var(--thread) 60%, #e98a5b); box-shadow: none; }

/* A task. */
.lvl { display: flex; align-items: center; gap: 9px; margin: 10px 0 0; font: 400 12.5px/1.3 var(--sans); letter-spacing: .05em; color: var(--ink-soft); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule); }
.dots i.on { background: var(--brass); box-shadow: none; }
.mood { margin: 12px 0; padding: 12px 16px; background: var(--sky-pale); border-left: 2px solid var(--lapis); font-style: italic; }
.poems, .passages { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.opt.poem, .opt.passage { display: grid; gap: 8px; align-content: start; padding: 16px 18px; counter-increment: none; }
.opt.poem::before, .opt.passage::before { content: none; }
.poem .form, .passage .form { font: 500 11px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.poem .verse { white-space: pre-line; font-style: italic; font-size: 19px; }
.passage .verse { font-size: 17px; color: var(--ink-soft); }
.opt.right .form, .opt.wrong .form { color: inherit; }
.gap .blank { display: inline-block; min-width: 92px; margin: 0 4px; padding: 0 10px; border-bottom: 2px dashed var(--brass); text-align: center; color: #b7a987; font-style: normal; }
.gap .blank.filled { border-bottom-style: solid; border-color: var(--leaf); color: #1f5c38; font-weight: 600; }
.built { margin: 10px 0; padding: 12px 14px 12px 42px; min-height: 68px; background: var(--paper-2); border-radius: 8px; font-size: 20px; line-height: 1.4; }
.built li { padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.built li.ghost { list-style: none; margin-left: -22px; color: #8d8468; font-style: italic; cursor: default; }
.built li.wrong { background: #f7e5e0; }
.built.right { background: #e6f1e8; }
.spot { line-height: 2.05; }
.tok { margin: 0; padding: 1px 5px; border: 0; border-radius: 5px; background: none; font: inherit; color: inherit; cursor: pointer; transition: background-color 140ms ease; }
.tok.right { background: #cfe6d6; color: #17462b; font-weight: 600; opacity: 1; }
.tok.wrong { background: #f7e5e0; text-decoration: line-through; }
.tok:disabled { cursor: default; }
.sortcard { padding: 18px 20px; background: #fff; border: 1px solid var(--rule); border-left: 0; border-radius: 4px; box-shadow: 0 7px 0 -3px var(--paper-2), 0 13px 0 -6px var(--paper-3), 0 10px 24px rgba(23, 32, 58, .12); font-style: normal; }
.bins { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 16px 0 6px; }
.bin { text-align: center; padding: 16px 8px !important; border-style: dashed; font: 500 13px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-col { display: grid; gap: 8px; align-content: start; }
.match .opt { font-size: 18.5px; }
.match .opt.sel { border-color: var(--lapis); box-shadow: 0 0 0 3px rgba(35, 75, 140, .2); }
.match .opt.right { opacity: 1; }

/* A leaf from Puja's reader: the ideas a task needs. */
.learn { background: #f4ecd6; background-image: linear-gradient(90deg, rgba(178, 58, 43, .35) 0 1px, transparent 1px), repeating-linear-gradient(180deg, transparent 0 33px, rgba(35, 75, 140, .09) 33px 34px); background-position: 58px 0, 0 20px; padding-left: 82px; }
.learn .reader-head { display: flex; justify-content: space-between; margin: 0 0 8px; font: 500 11px/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.margin-note { position: absolute; left: 8px; top: 96px; width: 64px; transform: rotate(-6deg); font: 400 15px/1.15 var(--hand); color: var(--thread); text-align: center; }

/* The work to be done, and what it pays. */
.job .terms { margin: 12px 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--rule); font-size: 19px; }
.job .terms li { padding: 9px 2px; border-bottom: 1px solid var(--rule); }

/* Before a scene: where it is, and who is there. */
.intro-card { text-align: center; width: min(560px, 100%); padding-top: 0; }
.intro-card .where { height: 150px; margin: 0 -36px 20px; background: var(--night) center / cover no-repeat; position: relative; }
.intro-card .where::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 14, 28, .1), rgba(247, 241, 227, 1)); }
.who-row { display: flex; justify-content: center; gap: 16px; margin: 6px 0 14px; }
.who-face { margin: 0; }
.who-face img { width: 76px; height: 76px; object-fit: cover; object-position: top; border-radius: 50%; box-shadow: 0 0 0 1px var(--brass), 0 0 0 5px var(--paper), 0 0 0 6px var(--rule); }
.who-face figcaption { margin-top: 10px; font: 500 10.5px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.end-card { width: min(600px, 100%); }
.end-card .tally { margin: 14px 0; border-top: 1px solid var(--rule); }
.end-card .tally p { margin: 0; padding: 10px 2px; border-bottom: 1px solid var(--rule); font-size: 19.5px; }

/* ---- Blackout poems and the player's own writing ------------------------------------ */
.ex.blackout { width: min(860px, 100%); }
.paper { margin: 12px 0; padding: 20px 24px; background: #efe9d8; border: 1px solid #d3c9ac; font: 400 19px/1.95 var(--serif); user-select: none; touch-action: none; box-shadow: 0 10px 22px rgba(23, 32, 58, .12); }
.paper-line { margin: 0 0 4px; }
.word { padding: 1px 3px; border: 0; border-radius: 2px; background: none; font: inherit; color: var(--ink); cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.word.black { background: #14161c; color: #14161c; }
.poem-out { margin: 14px 0; padding: 26px 28px; white-space: pre-line; font: italic 500 27px/1.42 var(--display); color: var(--ink); background: var(--paper-3); border: 1px solid var(--rule); border-radius: 4px; text-align: center; box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--rule); }
.own { width: 100%; padding: 11px 14px; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
.own:focus { outline: none; border-color: var(--lapis); box-shadow: 0 0 0 4px rgba(35, 75, 140, .16); }
.own.area { margin-top: 10px; font-style: italic; font-size: 22px; line-height: 34px; resize: vertical; padding: 8px 18px; border-radius: 4px; background: #fffdf6 repeating-linear-gradient(180deg, transparent 0 33px, rgba(35, 75, 140, .13) 33px 34px); background-attachment: local; background-position: 0 8px; }
.own-row { display: flex; gap: 8px; margin-top: 6px; }
.own-row .btn { flex: none; }
.notes-head { margin: 12px 0 4px; font: 500 11px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.notes { margin: 0 0 14px; padding: 10px 16px 10px 34px; background: var(--paper-2); border-left: 2px solid var(--brass); font-size: 18.5px; line-height: 1.45; }
.notes b { font-weight: 600; color: var(--ink-soft); }
/* Puja reads the piece and writes in the margin. */
.ex.editing { width: min(1040px, 100%); }
.desk { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 22px; align-items: start; }
.margin { padding: 14px 16px 16px; background: #fff8d9; border-radius: 3px; box-shadow: 0 8px 18px rgba(23, 32, 58, .14); transform: rotate(.5deg); }
.margin h3 { margin: 0 0 8px; font: 500 11px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--thread); }
.margin p, .margin li { margin: 0 0 9px; font: 400 19px/1.35 var(--hand); color: #25407a; }
.margin ul { margin: 0; padding-left: 20px; }
.margin .round { font: 400 12px/1.3 var(--sans); letter-spacing: .06em; color: var(--ink-soft); }
.margin.reading p { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }

/* ---- A cutting from the newspaper ---------------------------------------------------- */
.clipping-wrap, .postcard-wrap { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; padding: 34px 16px 20px; background: rgba(9, 14, 28, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); cursor: pointer; overflow-y: auto; }
.clipping { position: relative; width: min(680px, 100%); padding: 26px 34px 34px; background: #ece6d3; color: #1b1b1d; transform: rotate(-.7deg); box-shadow: var(--shadow); animation: rise 460ms var(--ease);
  clip-path: polygon(0 1.2%, 4% 0, 9% 1%, 15% .2%, 22% 1.1%, 30% 0, 38% .9%, 47% .1%, 55% 1%, 64% .2%, 72% 1.1%, 81% .1%, 89% 1%, 95% .2%, 100% 1%, 100% 99%, 94% 100%, 87% 99.1%, 79% 100%, 70% 99%, 61% 100%, 52% 99.1%, 43% 100%, 34% 99%, 25% 100%, 16% 99.1%, 8% 100%, 0 99.2%); }
.clipping .paper-name { margin: 0; text-align: center; font: 700 30px/1.1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.clipping .dateline { display: flex; justify-content: space-between; margin: 8px 0 16px; padding: 5px 0; border-top: 2px solid #1b1b1d; border-bottom: 1px solid #1b1b1d; font: 500 10.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.clipping h2 { margin: 0 0 6px; font: 700 31px/1.08 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.clipping .deck { margin: 0 0 12px; font: italic 400 19px/1.3 var(--serif); }
.clipping .cols { columns: 2; column-gap: 24px; column-rule: 1px solid rgba(27, 27, 29, .35); font-size: 17.5px; line-height: 1.42; text-align: justify; hyphens: auto; }
.clipping .cols p { margin: 0 0 .7em; text-indent: 1em; }
.clipping .cols p:first-child { text-indent: 0; }
.clipping .photo { margin: 0 0 14px; filter: grayscale(1) contrast(1.08) sepia(.18); }
.clipping .photo img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.clipping .photo figcaption { margin-top: 5px; font: italic 400 15px/1.3 var(--serif); }
.clipping.small-item { width: min(430px, 100%); }
.clipping.small-item h2 { font-size: 22px; }
.clipping.small-item .cols { columns: 1; }
.turn-hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font: 400 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: rgba(247, 241, 227, .8); }

/* ---- A postcard from home ------------------------------------------------------------- */
.postcard { position: relative; width: min(640px, 100%); padding: 26px 30px 26px; background: #f2e2bd; color: #25407a; transform: rotate(.9deg); box-shadow: var(--shadow); animation: rise 460ms var(--ease);
  background-image: radial-gradient(130% 100% at 0 0, rgba(255, 255, 255, .45), transparent 60%); }
.postcard .stamp { float: right; width: 76px; height: 90px; margin: 0 0 12px 18px; display: grid; place-items: center; text-align: center; background: #dceaf5; outline: 2px dashed rgba(37, 64, 122, .5); outline-offset: 3px; font: 600 11px/1.2 var(--sans); letter-spacing: .08em; color: var(--lapis); }
.postcard .stamp b { display: block; font: 600 26px/1 var(--display); }
.postcard .mark { position: absolute; right: 78px; top: 16px; width: 92px; height: 92px; border-radius: 50%; border: 2px solid rgba(23, 32, 58, .55); display: grid; place-items: center; text-align: center; transform: rotate(-14deg); font: 500 9.5px/1.25 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(23, 32, 58, .68); }
.postcard .hand { margin: 0 0 10px; font: 400 21.5px/1.5 var(--hand); }
.postcard .hand:last-of-type { margin-bottom: 0; }
.postcard .from { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(37, 64, 122, .3); font: 500 10.5px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: rgba(23, 32, 58, .7); clear: both; }

/* ---- The class board ------------------------------------------------------------------- */
.board { width: min(640px, 100%); }
.board .tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.board .tabs button { padding: 8px 16px; border: 0; border-radius: 999px; background: var(--paper-2); color: var(--ink-soft); font: 500 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.board .tabs button.on { background: var(--lapis); color: #fff; }
.board ol { list-style: none; margin: 0; padding: 0; max-height: min(46vh, 420px); overflow-y: auto; border-top: 1px solid var(--rule); }
.board li { display: grid; grid-template-columns: 46px 1fr auto auto; gap: 12px; align-items: baseline; padding: 9px 8px; border-bottom: 1px solid var(--rule); font-size: 20px; }
.board li .rank { font: 300 24px/1 var(--sans); font-feature-settings: "lnum", "tnum"; color: var(--ink-soft); }
.board li:nth-child(-n+3) .rank { color: var(--brass); font-weight: 500; }
.board li .gr { font: 500 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.board li .pts { font: 400 21px/1 var(--sans); font-feature-settings: "lnum", "tnum"; color: var(--lapis); }
.board li.me { background: var(--sky-pale); box-shadow: inset 3px 0 0 var(--thread); }
.board .empty { padding: 18px 4px; font-style: italic; color: var(--ink-soft); }
.board .yours { margin: 0 0 6px; font-size: 20px; }

/* ---- The first page: the title, and signing in ------------------------------------------ */
.hero { position: fixed; inset: 0; z-index: 60; overflow-y: auto; color: #fff; background: #2a63bd url("../art/hero_sky.webp") center bottom / cover no-repeat; }
.hero::before { content: ""; position: fixed; inset: 0; background: linear-gradient(110deg, rgba(13, 36, 84, .5), rgba(13, 36, 84, .08) 55%), linear-gradient(0deg, rgba(9, 14, 28, .35), transparent 40%); pointer-events: none; }
.hero-in { position: relative; min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 380px); gap: clamp(20px, 5vw, 80px); align-items: start; padding: clamp(28px, 6vh, 72px) clamp(22px, 6vw, 96px); }
.hero-in > div:first-child { align-self: center; }
.hero .mag { margin: 0; font: 500 12.5px/1.3 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #dbe9f9; }
.hero h1 { margin: 14px 0 0; font: italic 500 clamp(54px, 8.6vw, 132px)/.9 var(--display); letter-spacing: -.015em; text-shadow: 0 2px 30px rgba(13, 36, 84, .35); text-wrap: balance; }
.hero .knot { display: block; width: 96px; height: 2px; margin: 30px 0 22px; background: var(--thread); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .5); }
.hero .story { margin: 0; font: 600 clamp(22px, 2.3vw, 31px)/1.1 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.hero .after { margin: 10px 0 0; max-width: 30em; font-size: 20px; font-style: italic; color: #e8f0fb; }
.hero .writers { margin-top: 22px; padding: 0 0 2px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .6); background: none; color: #fff; font: 500 11.5px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.signin-card { position: relative; padding: 34px 32px 30px; background: rgba(247, 241, 227, .97); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; animation: rise 600ms var(--ease) both; }
.signin-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--skyband); box-shadow: 0 2px 0 var(--thread); }
.signin-card h2 { margin: 4px 0 6px; font: 600 33px/1.08 var(--display); }
.signin-sub { margin: 0 0 4px; font-size: 18.5px; color: var(--ink-soft); }
.signin-card .guest { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule); }
.guest-sub { margin: 4px 0 0; font-size: 17px; color: var(--ink-soft); }
.guest-grades { margin-top: 12px; flex-wrap: nowrap; gap: 8px; }
.guest-grades .btn { flex: 1 1 0; width: auto; min-width: 0; margin: 0; padding-left: 4px; padding-right: 4px; white-space: nowrap; letter-spacing: .06em; }
.signin-card label { display: grid; gap: 6px; margin-top: 16px; font: 500 11px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.signin-card input { width: 100%; padding: 12px 14px; font: 400 20px/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
.signin-card input:focus { outline: none; border-color: var(--lapis); box-shadow: 0 0 0 4px rgba(35, 75, 140, .16); }
.signin-error { min-height: 1.4em; margin: 12px 0 2px; color: var(--thread); font-size: 18px; }
.signin-card .btn { width: 100%; margin-top: 6px; padding: 16px; }
.resume { margin: 10px 0 14px; padding: 12px 14px; background: var(--sky-pale); border-left: 2px solid var(--thread); font-size: 19px; line-height: 1.35; }
.resume b { display: block; font: 600 24px/1.15 var(--display); }
.credits { width: min(680px, 100%); max-height: 86vh; overflow-y: auto; }
.credits h3 { margin: 18px 0 4px; font: 600 24px/1.2 var(--display); color: var(--lapis); }
.credits p { font-size: 19px; }

@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; grid-template-rows: 150px minmax(0, 1fr); }
  .plate { min-height: 150px; }
  .desk { grid-template-columns: 1fr; }
  .hero-in { grid-template-columns: 1fr; align-content: center; }
}
@media (max-width: 640px) {
  html, body { font-size: 18px; }
  .masthead { top: 22px; left: 8px; padding: 6px 12px 7px; max-width: 46vw; }
  .masthead b { font-size: 19px; }
  .masthead em { font-size: 13px; }
  .hud { top: 22px; right: 8px; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 52vw; }
  .wallet { min-width: 66px; padding: 4px 8px; }
  .wallet b { font-size: 19px; }
  .hud button { padding: 4px 8px; }
  .hud button b { font-size: 16px; }
  .hud .end { padding: 6px 10px; font-size: 11px; }
  .goal { top: auto; bottom: 52px; right: 8px; left: 8px; width: auto; font-size: 15.5px; }
  .goal.pointed::after { top: auto; bottom: 100%; margin: 0 0 12px; }
  .page { grid-template-columns: 1fr; grid-template-rows: 34vh minmax(0, 1fr); }
  .page-text { padding: 22px 20px 54px; }
  .talk { bottom: 10px; gap: 8px; }
  .line { font-size: 19px; }
  .talk.narration .line { font-size: 18.5px; }
  .actor, .face-frame { width: 96px; padding: 5px 5px 0; }
  .box { min-height: 120px; padding: 14px 16px 30px; }
  .ex { padding: 28px 20px 22px; }
  .learn { padding-left: 20px; background-image: none; }
  .margin-note { display: none; }
  .opt { padding: 11px 12px 11px 52px; font-size: 18px; }
  .opt::before { left: 10px; width: 30px; height: 30px; font-size: 17px; }
  .quote { font-size: 20px; }
  .match { grid-template-columns: 1fr; }
  .bins { grid-auto-flow: row; }
  .clipping { padding: 22px 20px 28px; }
  .clipping .cols { columns: 1; }
  .clipping .paper-name { font-size: 22px; }
  .board li { grid-template-columns: 34px 1fr auto; }
  .board li .gr { display: none; }
  .account { bottom: 6px; left: 8px; }
}
@media (max-height: 760px) and (min-width: 641px) {
  .box { min-height: 126px; padding: 16px 26px 30px; }
  .line { font-size: 21px; }
  .talk.narration .line { font-size: 20.5px; }
  .actor, .face-frame { width: 176px; }
  .ex { padding: 28px 32px 24px; }
  .opt { padding: 10px 16px 10px 58px; font-size: 19.5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Working beside the questions: the person whose job it is. */
.ex-wrap { display: flex; align-items: flex-end; gap: 14px; width: min(1100px, 100%); max-height: calc(100dvh - 46px); }
.ex-wrap > .ex, .ex-wrap > .spread { flex: 1; min-width: 0; }
.washer { flex: none; width: clamp(150px, 22vw, 280px); aspect-ratio: 1; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
@media (max-width: 640px) { .ex-wrap { flex-direction: column; align-items: center; } .washer { width: 120px; margin-bottom: -12px; } }

/* ==== Order on the page: what the eye should meet first, second and third ================= */

/* The speaker's name is set like a name in a play, above the speech. The picture needs no label of its own. */
.actor figcaption, .face-frame figcaption { display: none; }
.who { margin-bottom: 7px; font: 600 29px/1 var(--display); letter-spacing: .07em; font-variant-caps: all-small-caps; color: var(--lapis); }
.who:empty { display: none; }
.who::after { content: ""; display: block; width: 28px; height: 2px; margin-top: 6px; background: var(--brass); }

/* What Bisnu must do: the step in a sentence, and under it the errands, ticked as they are done. */
.errands { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 9px 0 1px; padding: 0; }
.errands li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 8px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); font: 500 12px/1.2 var(--sans); letter-spacing: .06em; color: var(--ink); }
.errands li::before { content: ""; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.errands li.done { background: #e6f1e8; box-shadow: none; color: #1e3f2d; }
.errands li.done::before { content: "✓"; display: grid; place-items: center; background: var(--leaf); box-shadow: none; color: #fff; font: 600 9px/1 var(--sans); }

/* A task. The head is quiet (which job, how far along). The body belongs to the question. */
.ex.task { display: flex; flex-direction: column; width: min(840px, 100%); padding: 0; overflow: hidden; }
.task-head { flex: none; display: flex; align-items: center; gap: 20px; padding: 24px 36px 14px; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.task-name { flex: 1; min-width: 0; display: grid; gap: 4px; }
.task-name .label { font-size: 11px; }
.task-name b { font: 600 23px/1.1 var(--display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { flex: none; display: grid; justify-items: end; gap: 7px; }
.progress-text { font: 500 11px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.pips { display: inline-flex; gap: 5px; }
.pips i { width: 26px; height: 8px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); transition: background-color 500ms ease, box-shadow 500ms ease; }
.pips i.on { background: var(--lapis); box-shadow: none; }
.task.fire .pips i.on { background: linear-gradient(90deg, #c4421f, #f0a23c); }
.purse { flex: none; margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--night); color: var(--brass-lt); font: 500 14px/1.1 var(--sans); font-feature-settings: "lnum", "tnum"; }
.task-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 36px 26px; }
.q-eyebrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.q-eyebrow .label { color: var(--thread); }
.worth { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1 var(--sans); letter-spacing: .05em; color: var(--ink-soft); }
.ask { margin: 0 0 16px; font: 600 clamp(22px, 1.95vw, 26px)/1.26 var(--serif); color: var(--ink); text-wrap: balance; }
.task .quote, .ex .step .quote { margin: 0 0 6px; padding: 16px 24px 17px; background: var(--paper-2); border-left: 3px solid var(--brass); border-radius: 0 10px 10px 0; font-size: clamp(22px, 2.05vw, 27px); line-height: 1.4; }
.task .by { margin: 2px 0 0 27px; }
.task .opts { margin-top: 18px; }
.opts.short { grid-template-columns: 1fr 1fr; }
.how { margin: 0; font: 400 13px/1.4 var(--sans); letter-spacing: .03em; color: var(--ink-soft); }
.hint { position: relative; margin: 16px 0 0; padding: 10px 16px 9px 46px; background: #fff8d9; border-radius: 4px; box-shadow: 0 2px 6px rgba(23, 32, 58, .08); font: 400 19.5px/1.35 var(--hand); color: #25407a; }
.hint:empty { display: none; }
.hint::before { content: "✎"; position: absolute; left: 15px; top: 7px; font: 400 21px/1.3 var(--serif); color: var(--thread); }
.feedback { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; align-items: baseline; margin-top: 16px; padding: 14px 20px 15px; border-radius: 10px; }
.feedback.won { background: #e6f1e8; box-shadow: inset 3px 0 0 var(--leaf); color: #173a28; }
.feedback.shown { background: #f6ead8; box-shadow: inset 3px 0 0 var(--brass); color: #55390f; }
.feedback b { font: 600 21px/1.3 var(--serif); }
.feedback .got { font: 500 11.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.feedback p { grid-column: 1 / -1; margin: 6px 0 0; font-size: 19px; line-height: 1.42; }
.task-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.task-foot .btn { margin-left: auto; }

/* What a task came to. The story first, then the marks with their unit beside them, then each question. */
.ex.score-card { width: min(660px, 100%); padding: 38px 42px 32px; }
.score-card h2 { margin-bottom: 4px; }
.score-card .outcome { margin: 0 0 20px; font: italic 400 22px/1.35 var(--serif); color: var(--ink-soft); }
.marks { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 18px 0 16px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.big-score { margin: 0; font: 300 78px/.86 var(--sans); font-feature-settings: "lnum"; color: var(--lapis); animation: pop 500ms var(--ease); }
.marks .of { font: 500 13px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.marks .earned { margin-left: auto; padding: 9px 16px; border-radius: 999px; background: var(--night); color: var(--brass-lt); font: 500 15px/1.1 var(--sans); font-feature-settings: "lnum", "tnum"; }
.strip-head { margin: 22px 0 10px; color: var(--ink-soft); }
.tries { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; margin: 0; padding: 0; }
.tries li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 7px 12px 7px 8px; border-radius: 8px; background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--rule); font: 400 13.5px/1.2 var(--sans); color: var(--ink); }
.tries .n { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--leaf); color: #fff; font: 500 12px/1 var(--sans); font-feature-settings: "lnum"; }
.tries li.later .n { background: var(--brass); }
.tries li.shown .n { background: var(--thread); }
.tries b { font: 500 15px/1 var(--sans); font-feature-settings: "lnum", "tnum"; color: var(--lapis); }
.tries li.shown b { color: var(--ink-soft); }
.score-card .btn-row { justify-content: flex-end; }

/* The leaf from the reader: each term beside its meaning, and the rules as three short lines. */
.meanings { margin: 14px 0 6px; border-bottom: 1px solid rgba(35, 75, 140, .16); }
.meaning { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 2px 22px; padding: 11px 0 12px; border-top: 1px solid rgba(35, 75, 140, .16); }
.meanings dt { font: 600 24px/1.15 var(--display); color: var(--lapis); }
.meanings dd { margin: 0; font-size: 20px; line-height: 1.4; }
.meanings .eg { display: block; margin-top: 3px; font-style: italic; color: var(--ink-soft); }
.rules-head { margin: 16px 0 8px; color: var(--ink-soft); }
.rules { list-style: none; display: grid; gap: 5px; margin: 0 0 4px; padding: 0; font: 400 14px/1.35 var(--sans); letter-spacing: .02em; color: var(--ink-soft); }
.rules li { position: relative; padding-left: 20px; }
.rules li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }
.learn .btn-row { justify-content: flex-end; }

/* A decision: the question large, what is at stake under it, and the answers as the only bright things on the card. */
.choice .kicker { color: var(--thread); }
.choice .lead { margin: 2px 0 6px; }
.choice .opt { font-size: 21.5px; }
.choice .opt:disabled { opacity: .55; }

@media (max-width: 640px) {
  .task-head { padding: 22px 20px 12px; gap: 12px; flex-wrap: wrap; }
  .task-body { padding: 18px 20px 22px; }
  .opts.short, .tries { grid-template-columns: 1fr; }
  .meaning { grid-template-columns: 1fr; }
  .ex.score-card { padding: 32px 22px 24px; }
  .big-score { font-size: 60px; }
}

/* The clock on a task: a small ring that empties, and turns red for the last ten seconds. */
.timer { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 5px; border-radius: 999px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule); }
.timer i { width: 20px; height: 20px; border-radius: 50%; background: conic-gradient(var(--lapis) calc(var(--left, 1) * 360deg), #fff 0); box-shadow: inset 0 0 0 1px var(--rule); }
.timer b { min-width: 34px; font: 500 14px/1 var(--sans); font-feature-settings: "lnum", "tnum"; color: var(--ink); }
.timer.low { background: #f7e5e0; box-shadow: inset 0 0 0 1px var(--thread); animation: tick 1s steps(2, end) infinite; }
.timer.low i { background: conic-gradient(var(--thread) calc(var(--left, 1) * 360deg), #fff 0); }
.timer.low b { color: var(--thread); }
.timer.stopped { opacity: .45; animation: none; }
@keyframes tick { 50% { transform: scale(1.06); } }
.q-eyebrow .timer { margin-left: auto; }
.q-eyebrow .worth { margin-left: 14px; }
/* A way past a task, kept small and out of the way. */
.skip { flex: none; padding: 6px 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft); font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; box-shadow: inset 0 0 0 1px var(--rule); }
.card-tools { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -8px 0 6px; }
.ex.skipped { width: min(560px, 100%); }
.game-skip { position: fixed; z-index: 25; right: 14px; bottom: 12px; padding: 10px 18px; border: 0; border-radius: 999px; background: rgba(13, 20, 36, .8); color: var(--paper); font: 500 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; box-shadow: inset 0 0 0 1px rgba(229, 185, 92, .35); }
/* Lines of verse at the head of a chapter, with the poet's name. */
.title-card .epigraph { margin-top: 26px; white-space: pre-line; font: italic 400 clamp(20px, 2vw, 25px)/1.4 var(--serif); color: #e8eef8; }
.title-card .epigraph-by { margin-top: 10px; font: 500 11px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; font-style: normal; color: var(--brass-lt); }
@media (hover: hover) { .skip:hover { color: var(--thread); box-shadow: inset 0 0 0 1px var(--thread); } .game-skip:hover { background: rgba(28, 40, 68, .95); } }

/* ---- Loading screen: the website's own (site/css/site.css), with its colours and sizes set here because this
   page has others. A walker from each game crosses it at the pace the story's pictures arrive. It is shown only
   while the page carries the class "loading", which a line in the head sets and js/preload.js takes away. ------ */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loader { display: none; --ivory: #F4EEE1; --green: #0F2B24; --m: clamp(16px, 2.2vw, 32px); --logo-h: 56px; }
.loader p { margin: 0; }
.loading .loader, .loader.lifting { display: block; position: fixed; z-index: 90; inset: 0; overflow: hidden; background: var(--ivory); color: var(--green); clip-path: inset(0); transition: clip-path 900ms cubic-bezier(0.76, 0, 0.24, 1);
  font: 400 clamp(17px, 0.5vw + 12px, 20px)/1.55 "Jost", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.loader.lifting { clip-path: inset(0 0 100% 0); }
.loader-mark { position: absolute; top: 12px; left: var(--m); }
.loader-mark img { display: block; width: auto; height: var(--logo-h); }
.loader-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 34svh; background: var(--green); color: var(--ivory); }
.loader-count { position: absolute; left: var(--m); bottom: clamp(16px, 2.4vw, 32px); font: 600 clamp(84px, 11.4vw, 196px)/0.8 "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif; letter-spacing: -0.04em; font-variant-numeric: lining-nums tabular-nums; }
.loader-say { position: absolute; left: calc(50% + 12px); right: var(--m); bottom: clamp(20px, 2.6vw, 36px); }
.loader-walk { --wh: clamp(96px, min(24svh, 26vw), 240px); position: absolute; left: 0; bottom: 34svh; display: flex; align-items: flex-end; gap: clamp(4px, 1.6vw, 24px);
  transform: translate3d(calc(var(--load, 0) * (100vw + 100%) - 100%), 0, 0); will-change: transform; }
.walker { display: block; flex: none; width: var(--h); height: var(--h); margin-bottom: calc(var(--h) * -0.022); background-repeat: no-repeat; background-size: auto 100%; }
.walker-raider { --h: var(--wh); background-image: url("../art/loader/walk_raider.webp"); animation: walk-4 640ms steps(4) infinite; }
.walker-student { --h: var(--wh); background-image: url("../art/loader/walk_student.webp"); animation: walk-4 580ms steps(4) infinite; }
.walker-bisnu { --h: calc(var(--wh) * 0.8); background-image: url("../art/loader/walk_bisnu.webp"); animation: walk-24 1700ms steps(24) infinite; }
@keyframes walk-4 { to { background-position: calc(var(--h) * -4) 0; } }
@keyframes walk-24 { to { background-position: calc(var(--h) * -24) 0; } }
@media (prefers-reduced-motion: reduce) {
  .loading .loader, .loader.lifting { transition: opacity 300ms ease !important; }
  .loader.lifting { clip-path: none; opacity: 0; }
  .loader-walk { left: var(--m); transform: none; }
}

/* On a wide screen a message at the top sits between the chapter's name and the box of steps, and covers neither. */
@media (min-width: 1280px) { .notice { left: calc(50% - 95px); max-width: min(600px, calc(100% - 722px)); } }
