/* The child's desk: one calm page. Big type, one thing at a time, nothing that scrolls sideways. */
.child-desk main { padding-bottom: 120px; }
.child-desk .mast-nav { display: flex; align-items: center; gap: 16px; }
.mission-btn { font: 600 15px/1 var(--sans); padding: 12px 18px; }
.top { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; margin:20px auto 32px; max-width:1180px; }
.top:has(#missionTile[hidden]) { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.hello { margin:0; max-width:none; display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:24px; align-items:center; }
.hello .eye { grid-column:1; margin:0; color:#823747; }
.hello h1 { grid-column:1; font:500 38px/1.12 var(--serif); letter-spacing:0; margin:6px 0 10px; }
.hello-line { font:400 20px/1.5 var(--serif); color:var(--ink); max-width:42em; }
.hello .hello-line { grid-column:1; margin:0; }
.hello .cta-row { grid-column:2; grid-row:1 / span 3; margin:0; max-width:260px; }
.hello .help-line { grid-column:1 / -1; }
.child-desk:has(#missionTile:not([hidden])) #playMission { display:none; }
.mission-tile { position:relative; display:grid; min-height:440px; height:min(58svh,640px); overflow:hidden; isolation:isolate; text-decoration:none; color:var(--ink); background:var(--paper,#fffcf5); border:0; border-radius:8px; padding:0; animation:desk-arrive .65s ease-out both; }
.mission-tile img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; object-position:center 42%; transition:transform .8s ease; }
.mission-tile:hover img { transform:scale(1.025); }
.tile-text { z-index:1; align-self:end; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 32px; padding:22px 28px; background:rgba(255,252,245,.96); border-top:1px solid var(--line,#d9d2c3); }
.tile-text .eye { grid-column:1; color:#823747; margin:0; font:500 13px/1.4 var(--sans); }
.tile-title { grid-column:1; font:500 34px/1.15 var(--serif); overflow-wrap:anywhere; }
.tile-go { grid-column:2; grid-row:1 / span 2; align-self:center; display:inline-flex; align-items:center; gap:18px; width:max-content; font:600 17px/1 var(--sans); color:var(--paper,#fff); background:var(--ink); padding:18px 26px; border-radius:6px; transition:background .2s,transform .2s; }
.mission-tile:hover .tile-go { background:#0e5d57; transform:translateX(3px); }
.mission-tile:focus-visible { outline:3px solid #823747; outline-offset:5px; }
.mission-tile:has(img[hidden]):not(.world) { min-height:180px; height:auto; }
.mission-tile.world { min-height:440px; height:min(62svh,700px); background:linear-gradient(to bottom,#dfe9d3,var(--paper,#fffcf5)); }
@keyframes desk-arrive { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:600px) {
  .child-desk .mast { flex-wrap:wrap; gap:14px; }
  .child-desk .mast-nav { gap:12px; }
  .top { gap:18px; margin-top:12px; }
  .hello { grid-template-columns:minmax(0,1fr); }
  .hello h1 { font-size:32px; }
  .hello .hello-line { font-size:18px; }
  .hello .cta-row { grid-column:1; grid-row:auto; margin-top:12px; max-width:none; }
  .mission-tile { height:440px; min-height:360px; }
  .mission-tile img { object-position:58% center; }
  .tile-text { padding:18px; gap:8px 12px; }
  .tile-title { font-size:25px; }
  .tile-go { padding:15px; font-size:15px; gap:8px; }
}
@media(prefers-reduced-motion:reduce) {
  .mission-tile { animation:none; }
  .mission-tile img,.tile-go { transition:none; }
  .mission-tile:hover img,.mission-tile:hover .tile-go { transform:none; }
}
.hello-line .w.lit { background: var(--lemon); border-radius: 4px; }
.call { margin: 28px auto 0; max-width: 1180px; padding: 22px 24px 20px; border: 1px solid var(--line, #d9d2c3); border-radius: 18px; background: linear-gradient(180deg, var(--cream, #fbf6ea), transparent); }
.call h2 { font: 600 clamp(24px, 3.4vw, 32px)/1.1 var(--serif); margin: 6px 0 12px; }
.call .hello-line { max-width: 34em; }
.ask { margin: 44px auto 0; max-width: 1180px; }
.ask h2, .ask-row, .starters, .ask .small { max-width: 760px; }
.ask h2 { font: 600 clamp(26px, 3.6vw, 36px)/1.1 var(--serif); margin: 0 0 16px; }
.ask-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ask-row input { flex: 1 1 320px; min-height: 56px; padding: 12px 18px; border: 2px solid var(--line-strong); border-radius: 14px; font: 500 20px/1.3 var(--serif); background: #fff; }
.ask-row input:focus { outline: 3px solid var(--lemon); outline-offset: 2px; border-color: var(--ink); }
.ask-row .btn { min-height: 56px; font-size: 17px; }
.ask-row .mic { min-height: 56px; font-size: 18px; padding-inline: 26px; }
.mic-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lemon); margin-right: 10px; vertical-align: middle; }
.mic[aria-pressed="true"] .mic-dot { animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .5; } }
.starters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.starters button { font: 500 15px/1 var(--sans); min-height: 40px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.starters button:hover { border-color: var(--ink); }
.learn { margin: 24px auto 0; max-width: 1180px; }
.learn-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.learn h2 { font: 600 clamp(28px, 4vw, 42px)/1.08 var(--serif); margin: 4px 0 6px; }
.learn-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sim { margin: 18px 0 22px; }
/* More than one reviewed simulation for a page: the child picks. Big enough
   for a young reader's finger, and the one playing says so without colour
   alone. */
.sim-picker { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.sim-picker button { min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: #fff; font: 600 16px/1.2 var(--sans); color: var(--ink); cursor: pointer; }
.sim-picker button[aria-pressed="true"] { background: var(--lemon, #f6e27a); border-color: var(--ink); }
/* Whose book a page or a simulation came out of. One line, never louder than the work. */
.credit { margin: 8px 0 0; color: var(--ink-soft); }
.credit a { color: inherit; }
.sim-frame { border: 1.5px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: #fff; aspect-ratio: 16 / 9; max-height: 540px; }
.sim-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.sim-wait { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border: 1.5px dashed var(--line-strong); border-radius: 14px; font: 500 16px/1.4 var(--sans); color: var(--ink-soft); }
.sim-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--lemon); animation: pulse 1.2s infinite; }
.story { max-width: 760px; }
.read-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.read { font: 400 clamp(20px, 2.4vw, 25px)/1.6 var(--serif); color: var(--ink); }
.read .w.lit { background: var(--lemon); border-radius: 4px; }
.more { margin-top: 16px; }
.more .read { margin-top: 10px; font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); }
.slides { max-width: 820px; }
.slide-card { border-radius: 24px; padding: clamp(26px, 4vw, 44px) clamp(24px, 4vw, 48px); min-height: 240px; display: flex; align-items: center; box-shadow: 0 14px 40px rgba(23, 58, 50, .10); transition: background .4s; }
.slide-card[data-tone="lemon"] { background: #FFE58A; } .slide-card[data-tone="mint"] { background: #C8DDD5; } .slide-card[data-tone="sky"] { background: #CFE5F5; } .slide-card[data-tone="coral"] { background: #F7C1B0; } .slide-card[data-tone="cream"] { background: #FFF1BF; }
.slide-text { font: 500 clamp(26px, 3.6vw, 40px)/1.35 var(--serif); color: var(--ink); }
.read.reveal .w { opacity: .14; transition: opacity .25s; } .read.reveal .w.shown { opacity: 1; }
.slide-text .w.lit { background: rgba(255, 255, 255, .75); border-radius: 8px; }
.slide-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.dots { display: flex; gap: 8px; } .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); } .dots i.on { background: var(--ink); }
.slide-acts { display: flex; gap: 10px; } .slide-acts .btn { min-height: 48px; font-size: 17px; }
.waiting { margin: 40px auto; max-width: 640px; }
.waiting h2 { font: 600 30px/1.1 var(--serif); }
@media (max-width: 640px) { .child-desk .mast-nav { gap: 8px; } .mission-btn { padding: 10px 12px; font-size: 13px; } }

/* Take it outside: the project card. A form a child can fill with a grown-up, and the record read back in the book's words. */
.help-line { font: 500 clamp(17px, 2vw, 20px)/1.45 var(--serif); color: var(--oxblood); margin: 8px 0 0; }
.project { margin: 34px auto 0; max-width: 1180px; padding: 26px 28px 24px; border-radius: 22px; background: linear-gradient(180deg, #eef5ef, transparent); border: 1px solid var(--line, #d9d2c3); }
.project h2 { font: 600 clamp(24px, 3.4vw, 32px)/1.1 var(--serif); margin: 6px 0 12px; }
.project .hello-line { max-width: 40em; font-size: clamp(18px, 2.2vw, 22px); }
.project-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 22px; margin-top: 18px; max-width: 900px; }
.project-form label { display: grid; gap: 6px; font: 500 15px/1.3 var(--sans); }
.project-form input { min-height: 48px; padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; font: 500 20px/1.2 var(--serif); background: #fff; width: 100%; }
.project-form .money { display: flex; align-items: center; gap: 6px; } .project-form .money b { font: 600 18px var(--serif); }
.project-form .with { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; font: 500 15px/1.3 var(--sans); }
.project-form .with label { display: flex; align-items: center; gap: 8px; }
.project-form .with input { width: 20px; height: 20px; min-height: 0; padding: 0; }
.project-form .cta-row { grid-column: 1 / -1; margin: 6px 0 0; }
.projects { display: grid; gap: 14px; margin-top: 18px; }
.projects article { padding: 14px 18px; border: 1px solid var(--line, #d9d2c3); border-radius: 14px; background: #fff; }
.projects .eye { margin: 0 0 4px; }
.projects p { margin: 4px 0; font: 400 clamp(17px, 1.9vw, 19px)/1.5 var(--serif); }
.projects .mentor { margin-top: 8px; padding: 10px 14px; border-left: 3px solid var(--oxblood); background: var(--paper-2, #f5f0e6); font-size: 17px; }

/* The living garden in the mission card: the studio's voxel world, with the picture underneath only until it draws. */
.mission-tile .tile-text { position: relative; z-index: 2; }
/* Today's page: what a finished mission becomes, under the card. */

/* One page (2026-09-24, "the dash should be exactly one page, the chapter image
   blending into the page, you hit play and land in the mission"): the greeting,
   the world, Play. The picture fades into the paper instead of sitting in a box. */
.child-desk .mast-nav .mast-link{display:none}
.mission-tile{border:0;border-radius:0;background:transparent;box-shadow:none;height:min(62svh,700px)}
.mission-tile img{-webkit-mask-image:linear-gradient(to bottom,#000 0,#000 56%,rgba(0,0,0,.45) 80%,transparent 100%);mask-image:linear-gradient(to bottom,#000 0,#000 56%,rgba(0,0,0,.45) 80%,transparent 100%)}
.mission-tile .tile-text{background:transparent;border-top:0;padding:0 4px 4px}
.mission-tile .tile-title{font-size:30px}
.child-desk #call,.child-desk #diagnostic,.child-desk #learn,.child-desk #project{margin-top:24px}
/* A short welcome on this device. Account setup stays with the founder. */
.desk-welcome{width:min(860px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #c8ccbe;border-radius:8px;background:#f6f1e7;color:#173a32;overflow:auto;position:relative}
.desk-welcome::backdrop{background:#173a3266}
/* The drawn arrival: her tower and its isles are the page itself, softened by paper so her words still read. */
.desk-welcome.sky-welcome{background:linear-gradient(rgba(246,241,231,.30) 0%,rgba(246,241,231,.62) 45%,rgba(246,241,231,.94) 78%),url("/primer/art/sky-orbit.png") center 18%/cover no-repeat,#f6f1e7;overflow:hidden}
.desk-welcome>img{display:block;width:100%;height:260px;object-fit:cover}
.welcome-confetti{position:absolute;top:-4%;left:var(--x,50%);width:9px;height:14px;border-radius:2px;pointer-events:none;z-index:3;animation:welcome-confetti-fall var(--d,2.6s) ease-in forwards}
@keyframes welcome-confetti-fall{0%{transform:translateY(0) rotate(0);opacity:1}100%{transform:translate(var(--dx,0),105dvh) rotate(var(--r,180deg));opacity:.55}}
.desk-welcome .welcome-copy{padding:28px 36px}
.desk-welcome h2{font-size:38px;line-height:1.15;margin:0 0 16px}
.desk-welcome .welcome-line{font-size:20px;line-height:1.5;min-height:60px;max-width:46ch}
.desk-welcome nav{display:flex;justify-content:space-between;gap:12px;margin-top:24px}
.desk-welcome nav button{font:inherit;border:1px solid #173a32;border-radius:4px;padding:12px 22px;background:transparent;color:#173a32;cursor:pointer}
.desk-welcome nav [data-next]{background:#173a32;color:#fff5df}
.desk-welcome nav button:disabled{opacity:.35;cursor:default}
.desk-welcome button:focus-visible{outline:3px solid #782d3b;outline-offset:4px}
.desk-welcome .welcome-skip{display:block;margin:18px auto 0;border:0;background:none;color:inherit;text-decoration:underline;padding:8px}
@media(max-width:600px){.desk-welcome>img{height:190px}.desk-welcome .welcome-copy{padding:24px}.desk-welcome h2{font-size:30px}.desk-welcome .welcome-line{font-size:18px;min-height:90px}}
.brand .companion-mark{width:58px;height:58px;object-fit:cover;border-radius:50%}
.desk-welcome.dragon-welcome{width:100%;max-width:none;height:100dvh;max-height:none;margin:0;border:0;border-radius:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 24px;box-sizing:border-box;text-align:center}
.dragon-welcome>img{width:min(500px,58dvh);height:min(500px,58dvh);object-fit:contain;flex:none;mix-blend-mode:multiply}
.dragon-welcome>img[hidden]{display:none}
.dragon-welcome .welcome-copy{width:min(760px,100%);padding:20px 0 0}
/* One size for every screen, and a two-line stand reserved beneath it, so a turn of the page never moves the dots or the button. The first greeting keeps only its colour, set apart by ink not by scale. */
.dragon-welcome h2{font-size:clamp(38px,5.6vw,60px);line-height:1.14;text-wrap:balance;outline:none;min-height:2.28em;display:flex;align-items:center;justify-content:center;margin:0}
.dragon-welcome[data-slide="0"] h2{color:#782d3b}
.dragon-welcome .welcome-line{min-height:1.55em;max-width:38ch;margin:14px auto 8px;font-size:22px}
.dragon-welcome nav{max-width:420px;margin:26px auto 0;flex-direction:column;align-items:center;gap:12px}
/* The way in keeps its width across "Next", "Meet Luz" and "Enter DragonWorld": the label may change, the door does not move. */
.dragon-welcome nav [data-next]{min-width:15ch}
.dragon-welcome .welcome-dots{display:flex;justify-content:center;gap:10px;margin:18px auto 0}
.dragon-welcome .welcome-dots i{width:9px;height:9px;border-radius:50%;border:1.5px solid #173a32;opacity:.45}
.dragon-welcome .welcome-dots i.on{background:#173a32;opacity:1}
.dragon-welcome .welcome-hear{font:inherit;border:0;background:none;color:var(--ink,#173a32);text-decoration:underline;padding:6px 12px;cursor:pointer;border-radius:4px}
.dragon-welcome .welcome-hear:focus-visible{outline:3px solid #782d3b;outline-offset:4px}
@media(max-width:600px){.desk-welcome.dragon-welcome{padding:20px}.dragon-welcome h2{font-size:34px;min-height:2.28em}.dragon-welcome .welcome-line{font-size:19px}.dragon-welcome>img{width:min(290px,38dvh);height:min(290px,38dvh)}}
@media(prefers-reduced-motion:no-preference){.dragon-welcome .welcome-copy.turn{animation:welcome-arrive .35s ease-out}.dragon-welcome .welcome-art{animation:welcome-arrive .55s ease-out both}.dragon-welcome nav [data-next]{animation:welcome-arrive .45s ease-out both}.dragon-welcome[data-slide="3"]>img{animation:welcome-arrive .5s ease-out}@keyframes welcome-arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}}

/* The dragon, in the masthead and on the desk (docs/engineering/THE_DAILY_LOOP.md).
   One rule: it takes you home, and at home it opens. */
.companion-button { display:inline-flex; align-items:center; gap:6px; padding:4px 10px 4px 4px; border:1px solid var(--line); border-radius:999px; background:var(--paper); cursor:pointer; text-decoration:none; color:inherit; min-height:44px; }
.companion-button:hover, .companion-button:focus-visible { border-color:var(--oxblood); }
.companion-button img { width:34px; height:34px; border-radius:50%; object-fit:cover; }
.companion-level { font:600 14px/1 var(--sans); color:var(--oxblood); }
.companion { margin:24px 0; padding:22px 24px; border:1px solid var(--line); border-radius:14px; background:var(--paper-2, #f1ece0); }
.companion-head { display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.companion-head img { width:96px; height:96px; border-radius:14px; object-fit:cover; }
.companion-head h2 { margin:2px 0 4px; font-size:26px; }
.companion-stats { list-style:none; margin:20px 0 0; padding:0; display:grid; gap:10px; }
.companion-stats li { display:grid; }
.companion-stat { display:grid; }
.companion-stat small { color:var(--ink-soft); }

/* The one problem a day opens on: its look is child-desk.css's. Not a test: getting it wrong costs nothing,
   and after two tries it walks the child through and opens anyway. */
#gateExplainForm { display:grid; gap:8px; margin-top:18px; max-width:52ch; }
#gateExplainForm textarea { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; font:inherit; }
#gateExplainForm button { justify-self:start; }
/* A line a day, whichever mission it was: the thing a parent reads back. */
.companion-days { margin-top:20px; padding-top:16px; border-top:1px solid var(--line); }
.journal { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.journal li { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:baseline; font:15px/1.5 var(--sans); }
.journal li b { font-weight:600; }
.journal li small { color:var(--ink-soft); }
@media (max-width:640px) { .journal li { grid-template-columns:1fr; gap:0; } }

/* The countdown is a quiet line that is also a button: a tap shows the clock time behind the minutes (mission-window.js, rewards R1). */
#deskWindows { display: grid; justify-items: start; gap: 4px; }
#deskWindows .mission-window { background: none; border: 0; padding: 4px 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
#deskWindows .mission-window[hidden] { display: none; }
/* A Primer child's "New mission now" beside a road's countdown (mission-now.js). */
#deskWindows .mission-now { min-height: 44px; }
