* { box-sizing:border-box; }
[hidden] { display:none!important; }
:root { color-scheme:light; font:16px/1.45 "Trebuchet MS",Arial,sans-serif; }
body { margin:0; --ink:#5c3045; --accent:#953f60; --line:#deb9bd; --sheet:#fffaf3; --wash:#f6e8e4; --light:#ffe9ed; background:var(--wash); color:var(--ink); }
body[data-game="freckles"] { --ink:#224c48; --accent:#28695e; --line:#acc8be; --wash:#e5efe8; --light:#dff0e7; }
body[data-game="sail"] { --ink:#254558; --accent:#22687a; --line:#abc6ca; --wash:#e3f0ed; --light:#dceff0; }
body,h1,h2,h3,p,figure { margin:0; }
h1,h2,h3 { font-family:Georgia,serif; line-height:1.13; }
button { appearance:none; min-height:44px; padding:8px 14px; border:1px solid var(--line); border-radius:12px; background:var(--sheet); color:var(--ink); font:700 .93rem/1.25 "Trebuchet MS",Arial,sans-serif; cursor:pointer; touch-action:manipulation; }
button:enabled:hover { background:var(--light); }
button:disabled { cursor:default; }
button:focus-visible,a:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
h2:focus { outline:none; }
.room { max-width:1100px; margin:auto; padding:clamp(12px,2.7vw,28px); }
.mast,.tools,figcaption { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.mast { justify-content:space-between; margin-bottom:12px; }
h1 { font-size:clamp(1.55rem,3.8vw,2.5rem); }
h2 { font-size:clamp(1.5rem,3vw,2.2rem); }
.spread { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); background:var(--sheet); border:1px solid var(--line); border-radius:22px; overflow:hidden; box-shadow:0 8px 22px #26393412; }
.scene { display:flex; flex-direction:column; justify-content:center; background:var(--light); min-width:0; }
.picture { width:100%; position:relative; aspect-ratio:1; }
.picture img { display:block; width:100%; height:100%; object-fit:cover; }
figcaption { background:var(--ink); color:#fffefa; padding:9px 12px; justify-content:space-between; font-weight:bold; font-size:.89rem; }
#beads { display:inline-flex; gap:5px; }
#beads i { width:10px; height:10px; border:1px solid #fff9ec; border-radius:50%; }
#beads i.full { background:#ffe5a3; }
.activity { padding:clamp(14px,2.8vw,30px); align-self:center; min-width:0; }
#directions { margin:.5em 0 .9em; }
.prompt { border-left:4px solid var(--accent); background:var(--light); padding:10px 13px; margin:4px 0 10px; border-radius:0 9px 9px 0; font:700 1.04rem/1.35 Georgia,serif; }
#feedback { margin:.7em 0; font-weight:bold; line-height:1.35; }
#feedback:empty { margin:0; }
#next { margin-top:6px; }
.primary,.primary:enabled:hover { background:var(--accent); color:#fff; border-color:var(--accent); }
.primary:enabled:hover { filter:brightness(.92); }
.portraits { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:12px 0 0; }
.portraits button { min-width:0; aspect-ratio:1; padding:0; border-radius:14px; overflow:hidden; border:2px solid #cda4a8; }
.portraits button:enabled:hover { border-color:var(--accent); }
.portraits button img { width:100%; height:100%; display:block; object-fit:cover; }
.portraits .match { border:4px solid #27775c; }
.portraits .retry { border:3px dashed #9a4e3f; }
.cheek-pads { display:grid; width:min(100%,345px); grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:4px auto 14px; text-align:center; }
.cheek-pads h3 { font-size:1rem; margin:0 0 6px; }
.spot-grid { display:grid; grid-template-columns:repeat(2,minmax(44px,1fr)); gap:4px; padding:6px; border:1px solid #c5a79d; border-radius:22px; background:#fae0cf; }
.spot { display:grid; place-items:center; padding:0; border:1px dashed #b78e81; border-radius:40%; min-height:45px; background:#fff0e0; }
button.spot:enabled:hover { background:#ffedce; border-color:#6b4537; }
.spot::after { content:""; width:14px; height:14px; border:1px solid #ad8677; border-radius:50%; }
.spot.ink::after { background:#56372e; border-color:#432b27; box-shadow:inset 1px 1px 0 #855f4a; }
#marks { position:absolute; inset:0; pointer-events:none; }
#marks b { position:absolute; width:2.15%; aspect-ratio:1; border-radius:50%; background:#573326; transform:translate(-50%,-50%); box-shadow:0 0 0 .7px #ecc0a0; }
#course-info { font-size:.91rem; margin:8px 0 12px; }
.pond { --stops:7; display:grid; grid-template-columns:repeat(var(--stops),minmax(0,1fr)); align-items:end; border-radius:16px; margin:14px 0 0; padding:12px 4px 6px; overflow:hidden; background:linear-gradient(180deg,#e7f7ed 0%,#d5efeb 26%,#84c7cd 29%,#c0e9df 75%,#85c7c9 100%); }
.stop { text-align:center; min-width:0; }
.marker { height:43px; width:100%; display:block; position:relative; }
.marker::after { content:""; position:absolute; width:66%; height:6px; border-bottom:2px solid #428e9b; border-radius:50%; bottom:5px; left:17%; }
.marker.lily::before { content:""; position:absolute; width:69%; max-width:38px; height:17px; left:50%; bottom:9px; transform:translateX(-50%) rotate(-8deg); border-radius:50%; background:conic-gradient(from 55deg,#477b4d 0 23deg,transparent 23deg 55deg,#699f56 55deg 360deg); box-shadow:0 3px 0 #437a74; }
.marker.dock::after { bottom:7px; height:10px; width:80%; left:10%; background:repeating-linear-gradient(90deg,#986043 0 6px,#744b39 6px 8px); border-radius:2px; border-bottom:3px solid #68432d; }
.paper-boat { position:absolute; width:92%; max-width:48px; height:31px; left:50%; bottom:10px; transform:translateX(-50%); z-index:2; }
.paper-boat::before { content:""; position:absolute; inset:0 18% 24%; background:linear-gradient(90deg,#fffbea 0 64%,#f8c89f 65%); clip-path:polygon(0 100%,64% 0,76% 90%,100% 100%); }
.paper-boat::after { content:""; position:absolute; bottom:0; left:0; width:100%; height:41%; background:linear-gradient(155deg,#fb9579 0 47%,#c25156 48%); clip-path:polygon(0 0,48% 29%,100% 0,74% 100%,24% 100%); }
.stop.occupied .number { background:#234f60; color:white; }
.number { display:inline-grid; place-items:center; min-width:22px; border-radius:12px; color:#214e5a; font-weight:bold; font-size:.87rem; }
.puff { background:var(--light); }
.puff b { display:inline-block; padding:2px 5px; margin-left:2px; border-radius:7px; color:#fff; background:var(--accent); }
#undo:disabled,#clear:disabled { opacity:.55; }
footer a { color:var(--ink); font-weight:bold; display:inline-block; margin:10px 0 0; padding:6px 1px; }
@media(max-width:650px) {
 .spread { grid-template-columns:1fr; }
 .scene { display:grid; grid-template-columns:minmax(95px,38%) 1fr; align-items:stretch; }
 .picture { width:100%; }
 figcaption { align-content:center; align-items:flex-start; flex-direction:column; justify-content:center; gap:9px; padding:12px; }
 .room { padding:10px; }
 .activity { padding:14px; }
 .mast { gap:5px; }
 .tools { gap:6px; }
 .mast button { padding:7px 9px; }
 .portraits { max-width:420px; }
 .cheek-pads { gap:8px; }
 .spot-grid { padding:4px; }
 .puff { padding:8px 9px; }
}
@media(prefers-reduced-motion:no-preference) { .occupied .paper-boat { animation:bob .45s ease-out; } @keyframes bob { 0% { transform:translate(-57%,2px) rotate(-10deg); } 70% { transform:translate(-47%,-2px) rotate(5deg); } } }
