/* One palette across the entrance and the interactive desk. */
:root { --forest:#17483d; --butter:#f9cd58; --parchment:#f7f5ea; --ink:#193f38; }
.entry, body[data-space] {
  margin:0; color:var(--ink); background-color:var(--parchment);
  background-image:radial-gradient(#d5d9c9 1px,transparent 1px);
  background-size:20px 20px; font-family:'Avenir Next','Trebuchet MS',sans-serif;
}
.entry *, .lesson-controls * { box-sizing:border-box; }
.entry { min-height:100svh; display:grid; grid-template-rows:auto 1fr; }
.entry-brand,.page-header { width:min(100%,84rem); box-sizing:border-box; margin:auto; padding:24px clamp(18px,4vw,60px); }
.entry-brand { display:flex; align-items:center; gap:12px; font-size:1.2rem; font-weight:800; }
.entry-brand span,.brand-mark { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:var(--butter); color:var(--forest); font-size:1.8rem; }
.entry-card { display:grid; grid-template-columns:1.12fr 1fr; align-self:center; justify-self:center;
  width:min(90vw,65rem); margin:24px 0 8vh; overflow:hidden; background:#fffef9;
  border:1px solid #bec9bb; border-radius:2rem; box-shadow:0 6px 0 #d9dece; }
.portrait { position:relative; isolation:isolate; display:grid; place-items:center; overflow:hidden; min-height:clamp(22rem,43vw,34rem);
  background-color:#c5e1cb; background-image:linear-gradient(#729f8729 1px,transparent 1px),linear-gradient(90deg,#729f8729 1px,transparent 1px);
  background-size:32px 32px; }
.orbit { position:relative; width:73%; aspect-ratio:1; border-radius:50%; background:#fff9ed; border:2px solid var(--forest); }
.orbit img { width:100%;height:100%;object-fit:contain; border-radius:inherit; }
.orbit:before,.orbit:after { position:absolute; content:""; border-radius:50%; pointer-events:none; }
.orbit:before { inset:-8%; border:1px dashed #53826b; }
.orbit:after { top:0;right:9%; width:8%; aspect-ratio:1; background:var(--butter); border:2px solid var(--forest); }
.admission { padding:clamp(28px,5vw,76px); align-self:center; }
.admission h1 { font-size:clamp(2.4rem,4.8vw,4.6rem); line-height:.99; letter-spacing:-.055em; margin:0 0 .65em; color:var(--forest); }
.admission label { display:block; font-weight:700; margin-bottom:8px; }
.admission input,.admission button { display:block; width:100%; min-height:52px; border-radius:12px; font:inherit; padding:12px 16px; }
.admission input { background:white; border:1.5px solid #738a7b; color:var(--ink); }
.admission button,#start-session { background:var(--forest); color:white; font-weight:750; }
.admission button { margin-top:18px; border:0; cursor:pointer; }
.admission [role=alert] { color:#973623; }
:focus-visible { outline:3px solid #ae5615; outline-offset:3px; }
.page-header { display:flex; flex-wrap:wrap; gap:12px; }
.page-header #connection-state { margin-left:auto; }
.page-header button,.lesson-controls button { border:1px solid #8da296; border-radius:12px; min-height:44px; padding:8px 14px; background:#fffdf6; color:var(--forest); }
.learning-space { max-width:84rem; grid-template-columns:minmax(220px,29%) minmax(0,1fr); gap:clamp(22px,4vw,62px); }
.reachy-space { position:static; }
.reachy-stage { width:min(100%,280px); margin-inline:auto; }
.activity-space,body[data-space=tutor] .activity-space { background:#fffef9; border:1px solid #c1ccbd; border-radius:24px; box-shadow:0 5px 0 #d9dece; }
.lesson-controls { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:16px; }
#start-session,.lesson-controls p { grid-column:1/-1; }
.lesson-controls p { margin:2px 0; color:#405d52; font-size:.85rem; }
.learning-space button { min-height:44px; }
.animation-toggle { min-width:44px; }
@media(max-width:850px) {
 .learning-space { grid-template-columns:1fr; padding:12px clamp(16px,4vw,34px) 28px; }
 .reachy-space { display:grid; grid-template-columns:112px minmax(0,1fr) minmax(12rem,.85fr); gap:6px 18px; align-items:center; }
 .reachy-stage { grid-column:1; grid-row:1/3; margin:0; }
 .chatty-intro,.companion-note { grid-column:2; }
 .chatty-intro { grid-row:1; } .companion-note { grid-row:2; }
 .lesson-controls { grid-column:3; grid-row:1/3; margin:0; }
 .animation-toggle { grid-column:1; grid-row:3; }
 .reachy-caption { margin:0; }
}
@media(max-width:760px) {
 .entry-card { grid-template-columns:1fr; max-width:34rem; }
 .portrait { min-height:0; padding:20px; }
 .orbit { width:clamp(100px,29vw,190px); }
 .admission { padding:clamp(24px,5vw,44px); }
}
@media(max-width:600px) {
 .reachy-space { grid-template-columns:94px minmax(0,1fr); }
 .lesson-controls { grid-column:1/-1; grid-row:auto; }
 .page-header { gap:8px; }
}
@media(max-height:650px) and (min-width:761px) {
 .entry-card { margin:8px 0 24px; } .portrait { min-height:18rem; }
}
.family { margin:0; color:var(--ink); background:var(--parchment); font:1rem/1.5 'Avenir Next','Trebuchet MS',sans-serif; }
.family * { box-sizing:border-box; }
.family-nav,.family-paper { width:min(calc(100% - 32px),78rem); margin:0 auto 20px; }
.family-nav,.pager { display:flex; flex-wrap:wrap; gap:4px 12px; }
.family-nav a,.pager a { display:inline-flex; min-height:44px; align-items:center; padding:0 12px; color:var(--forest); font-weight:700; text-decoration:none; border-radius:12px; }
.family-nav [aria-current=page] { background:var(--forest); color:white; }
.family-paper { padding:clamp(20px,4vw,48px); background:#fffef9; border:1px solid #bec9bb; border-radius:24px; }
.family-paper h1 { font-size:clamp(2rem,4vw,3.8rem); line-height:1.04; letter-spacing:-.04em; margin:0 0 24px; }
.family-paper h2 { font-size:1.25em; margin:6px 0; }
.family-paper a { color:var(--forest); }
.filters { display:flex; align-items:end; flex-wrap:wrap; gap:12px; }
.filters label { display:grid; gap:4px; font-weight:700; max-width:100%; }
.filters :is(input,select,button) { max-width:100%; min-height:48px; border:1px solid #869a8e; padding:8px 14px; background:white; border-radius:9px; font:inherit; }
.filters button { color:white; background:var(--forest); cursor:pointer; }
.family-paper article { margin-top:1.3em; padding-top:1.2em; border-top:1px solid #d5dccd; }
.family-paper article p { white-space:pre-line; max-width:75ch; }
.shelf { list-style:none; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:14px; }
.shelf li { border:1px solid #cbd7c9; border-radius:16px; background:#f3f6eb; padding:18px; overflow-wrap:anywhere; }
.shelf a { display:inline-flex; align-items:center; min-height:44px; }
[data-reading=grande] { font-size:1.25rem; }
[data-reading=grande] :is(.resource-instruction,#message,.reachy-caption,#reply-text) { font-size:1.3rem; }
.book-grid {list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px}
.book-grid li {display:flex}
.book-grid a {display:grid;align-content:space-between;gap:14px;width:100%;padding:20px;border:1px solid #b1c8b7;border-left:7px solid #638970;border-radius:4px 16px 16px 4px;background:#f2f6ec;text-decoration:none;overflow-wrap:anywhere}
.book-grid li:nth-child(3n+2) a {border-left-color:#bf9139}
.book-grid li:nth-child(3n) a {border-left-color:#527f98}
.book-grid a:hover,.book-grid a:focus-visible {background:#e2efd9}
.book-grid strong {font-size:1.15em}
.crumbs,.reader-tools,.reader-tools form {display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.crumbs a,.reader-tools a,.reader-tools :is(button,select),.family-paper summary {display:inline-flex;align-items:center;min-height:44px}
.reader-tools {margin:12px 0;padding:8px 12px;border-radius:12px;background:#eef3e7;justify-content:space-between}
.reader-tools :is(button,select) {font:inherit;padding:5px 12px;border:1px solid #899e90;border-radius:8px;background:white;color:var(--forest)}
.sheet-view {display:block;text-align:center;background:#e8e8da;padding:clamp(4px,1vw,16px);border-radius:8px}
.sheet-view img {display:block;max-width:100%;height:auto;margin:auto}
.family-paper summary {cursor:pointer;font-weight:700}
.text-view { display:block;width:100%;height:65vh;border:1px solid #bec9bb;background:white; }
