@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --night1: #17154a; --night2: #2f2a7a; --night3: #5a4aa8;
  --paper: #fff8ea; --paper2: #fdeccd; --ink: #3a2d4f; --ink-soft: #7a6a8f;
  --sun: #ffcf4d; --sun-d: #f2a516; --coral: #ff7f8e; --mint: #6dd8c4; --sky: #92ccff; --lilac: #c9b6ff;
  --radius: 26px;
  --head: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pw: 420px; --ph: 440px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body); color: var(--ink);
  background: radial-gradient(120% 80% at 70% 0%, var(--night3) 0%, var(--night2) 45%, var(--night1) 100%) fixed;
  min-height: 100dvh; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- night sky ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.stars span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .7; animation: twinkle 3s ease-in-out infinite; }
.stars span.big { width: 5px; height: 5px; box-shadow: 0 0 8px 2px rgba(255,255,255,.6); }
@keyframes twinkle { 0%,100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.moon { position: absolute; top: 34px; right: 7vw; width: 74px; height: 74px; border-radius: 50%;
  box-shadow: -16px 10px 0 4px #ffe08a; transform: rotate(-20deg); filter: drop-shadow(0 0 24px rgba(255, 224, 138, .55)); }
.cloud { position: absolute; height: 40px; border-radius: 40px; background: rgba(255,255,255,.08); }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud.c1 { width: 160px; top: 120px; left: -40px; animation: drift 60s linear infinite; }
.cloud.c1::before { width: 70px; height: 70px; top: -32px; left: 30px; } .cloud.c1::after { width: 54px; height: 54px; top: -22px; left: 84px; }
.cloud.c2 { width: 120px; bottom: 90px; right: -30px; animation: drift 80s linear infinite reverse; }
.cloud.c2::before { width: 56px; height: 56px; top: -26px; left: 20px; } .cloud.c2::after { width: 42px; height: 42px; top: -16px; left: 62px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(40vw); } }

#app { position: relative; z-index: 1; min-height: 100dvh; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; max-width: 980px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: var(--head); font-weight: 600; font-size: 21px; letter-spacing: .2px; }
.brand img { width: 34px; height: 34px; }
.pill-link { text-decoration: none; color: var(--ink); background: var(--paper); padding: 9px 16px; border-radius: 999px; font-family: var(--head); font-weight: 600; font-size: 15px;
  box-shadow: 0 4px 0 rgba(0,0,0,.18); display: inline-flex; gap: 6px; align-items: center; }
.pill-link:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }

/* ---------- home ---------- */
.home { max-width: 640px; margin: 0 auto; padding: 6px 18px 40px; }
.home h1 { font-family: var(--head); color: #fff; font-weight: 600; font-size: clamp(30px, 7.4vw, 46px); line-height: 1.08; margin: 18px 4px 6px; text-shadow: 0 3px 0 rgba(0,0,0,.18); }
.home .sub { color: #e4ddff; margin: 0 4px 18px; font-size: 17px; }
.card { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 0 rgba(0,0,0,.18), 0 24px 50px rgba(10, 6, 40, .45); position: relative; }
.maker textarea { width: 100%; min-height: 116px; resize: none; border: 3px dashed #e9c98f; background: #fffdf6; border-radius: 20px;
  padding: 14px 16px; font: 600 19px/1.4 var(--body); color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.maker textarea:focus { border-color: var(--sun-d); border-style: solid; box-shadow: 0 0 0 5px rgba(255, 207, 77, .3); }
.maker textarea::placeholder { color: #b6a79a; }
.hint { margin: 8px 4px 12px; color: var(--ink-soft); font-size: 15px; font-weight: 700; }
.ideas { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 16px; padding: 2px 18px 4px; scrollbar-width: none; }
.ideas::-webkit-scrollbar { display: none; }
.chip { flex: none; white-space: nowrap; border: 0; background: #f3e7ff; color: #5b3e98; padding: 8px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.chip:nth-child(2) { background: #dff6f0; color: #1f7a68; } .chip:nth-child(3) { background: #ffe9dc; color: #a24f22; } .chip:nth-child(4) { background: #e2f0ff; color: #2b5f96; }
.row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.field-label { display: block; font-family: var(--head); font-weight: 600; font-size: 15px; margin: 0 0 6px 4px; color: var(--ink); }
.age select { appearance: none; border: 0; background: #fff1d6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%237a6a8f' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding: 11px 38px 11px 16px; border-radius: 16px; font: 800 16px var(--body); color: var(--ink); }
.seg { display: inline-flex; background: #fff1d6; border-radius: 18px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 14px; border-radius: 14px; font: 600 16px var(--head); color: var(--ink-soft); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 3px 0 #f0d9a8; }
.make { width: 100%; border: 0; border-radius: 22px; padding: 18px; font: 700 23px var(--head); color: #4a2a00; letter-spacing: .3px;
  background: linear-gradient(180deg, #ffe07a, var(--sun) 60%, #ffbe2e); box-shadow: 0 7px 0 var(--sun-d), 0 14px 26px rgba(242,165,22,.35); transition: transform .08s; }
.make:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--sun-d); }
.make[disabled] { filter: grayscale(.4); opacity: .75; cursor: default; }
.demo-note { margin: 14px 4px 0; background: #e9f7ff; color: #24597f; padding: 12px 14px; border-radius: 16px; font-weight: 700; font-size: 15px; }
.demo-note a { font-weight: 800; }
.promise { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; color: #d9d0ff; margin-top: 22px; font-weight: 700; font-size: 14px; }

/* ---------- making ---------- */
.making { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 22px; color: #fff; }
.easel { position: relative; width: 210px; height: 190px; margin-bottom: 18px; }
.canvas { position: absolute; inset: 18px 22px 30px; background: var(--paper); border-radius: 18px; box-shadow: 0 8px 0 rgba(0,0,0,.2); overflow: hidden; }
.canvas i { position: absolute; border-radius: 50%; filter: blur(1px); opacity: 0; animation: blob 4.8s ease-in-out infinite; }
.canvas i:nth-child(1) { width: 70px; height: 70px; background: var(--sky); left: 12px; top: 18px; }
.canvas i:nth-child(2) { width: 60px; height: 60px; background: var(--coral); right: 18px; top: 30px; animation-delay: .8s; }
.canvas i:nth-child(3) { width: 80px; height: 50px; background: var(--mint); left: 40px; bottom: 10px; animation-delay: 1.6s; border-radius: 40px; }
.canvas i:nth-child(4) { width: 40px; height: 40px; background: var(--sun); right: 40px; bottom: 18px; animation-delay: 2.4s; }
@keyframes blob { 0% { opacity: 0; transform: scale(.3); } 25%, 70% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1); } }
.brush { position: absolute; font-size: 54px; right: -6px; top: 6px; animation: paint 1.6s ease-in-out infinite; transform-origin: 80% 80%; }
@keyframes paint { 0%,100% { transform: translate(0,0) rotate(-10deg); } 50% { transform: translate(-70px, 60px) rotate(18deg); } }
.making h2 { font-family: var(--head); font-weight: 600; font-size: clamp(26px, 6.5vw, 36px); margin: 4px 0 8px; text-shadow: 0 3px 0 rgba(0,0,0,.2); max-width: 560px; }
.making .msg { color: #e4ddff; font-size: 18px; font-weight: 700; min-height: 26px; margin: 0 0 22px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; width: min(340px, 100%); text-align: left; }
.steps li { background: rgba(255,255,255,.1); border-radius: 16px; padding: 12px 16px; font-weight: 800; display: flex; gap: 12px; align-items: center; color: #d8cfff; }
.steps li .dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); flex: none; display: grid; place-items: center; font-size: 14px; }
.steps li.now { color: #fff; background: rgba(255,255,255,.18); } .steps li.now .dot { border-color: var(--sun); border-top-color: transparent; animation: spin 1s linear infinite; }
.steps li.done { color: #fff; } .steps li.done .dot { background: var(--mint); border-color: var(--mint); }
.steps li.done .dot::after { content: "✓"; color: #134d42; font-weight: 900; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- reader ---------- */
.reader { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.rbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px; color: #fff; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; text-decoration: none; font-size: 20px; }
.rtitle { flex: 1; min-width: 0; text-align: center; font-family: var(--head); font-weight: 600; font-size: 18px; line-height: 1.15; }
.rtitle .tt { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtitle .pageno { display: block; font-family: var(--body); font-size: 13px; min-width: 0; }
.stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: var(--paper); color: var(--ink); font: 700 30px/1 var(--head); box-shadow: 0 5px 0 rgba(0,0,0,.25); display: grid; place-items: center; }
.nav.prev { left: 14px; } .nav.next { right: 14px; }
.nav[disabled] { opacity: 0; pointer-events: none; }
.single .nav { display: none; }
.rctl { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; color: #fff; }
.play { border: 0; border-radius: 999px; padding: 11px 18px; font: 700 17px var(--head); color: #4a2a00; background: var(--sun); box-shadow: 0 4px 0 var(--sun-d); min-width: 150px; }
.play[disabled] { opacity: .6; }
.pageno { font-weight: 800; color: #d8cfff; font-size: 13px; text-align: center; }
.toggle { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; color: #efeaff; background: rgba(255,255,255,.1); padding: 7px 11px 7px 8px; border-radius: 999px; cursor: pointer; }
.toggle input { appearance: none; width: 38px; height: 22px; border-radius: 22px; background: rgba(255,255,255,.3); position: relative; margin: 0; transition: background .2s; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked { background: var(--mint); } .toggle input:checked::after { transform: translateX(16px); }

/* the book */
.book { position: relative; width: calc(var(--pw) * 2); height: var(--ph); perspective: 2400px; transition: transform .7s cubic-bezier(.45,.05,.3,1); }
.book.closed { transform: translateX(calc(var(--pw) * -0.5)); }
.book .spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(#0000, rgba(80,50,30,.25), #0000); z-index: 6; pointer-events: none; }
.book.closed .spine { display: none; }
.page { position: absolute; top: 0; width: var(--pw); height: var(--ph); overflow: hidden; background: var(--paper); }
.page.left { left: 0; border-radius: 18px 4px 4px 18px; box-shadow: -10px 14px 30px rgba(8,4,40,.45); }
.page.right { left: var(--pw); border-radius: 4px 18px 18px 4px; box-shadow: 10px 14px 30px rgba(8,4,40,.45); }
.page.left::after, .leaf .back::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0000 80%, rgba(60,30,10,.18)); pointer-events: none; }
.page.right::before, .leaf .front::before { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(90deg, rgba(60,30,10,.16), #0000 16%); pointer-events: none; }
.page.empty { visibility: hidden; }
.leaf { position: absolute; top: 0; width: var(--pw); height: var(--ph); z-index: 10; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.45,.05,.3,1); }
.leaf.from-right { left: var(--pw); transform-origin: left center; }
.leaf.from-left { left: 0; transform-origin: right center; }
.leaf .front, .leaf .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: var(--paper); }
.leaf.from-right .front { border-radius: 4px 18px 18px 4px; } .leaf.from-right .back { transform: rotateY(180deg); border-radius: 18px 4px 4px 18px; }
.leaf.from-left .front { border-radius: 18px 4px 4px 18px; } .leaf.from-left .back { transform: rotateY(180deg); border-radius: 4px 18px 18px 4px; }
.leaf .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.0), rgba(0,0,0,.18)); opacity: 0; transition: opacity .35s; pointer-events: none; z-index: 5; }
.leaf.turning .shade { opacity: 1; }

.pic { position: absolute; inset: 0; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fadein .6s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.paper { position: absolute; inset: 0; padding: 9% 9% 12%; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(120% 90% at 50% 40%, #fffaf0, var(--paper) 60%, var(--paper2)); }
.paper .story { margin: 0; font: 700 22px/1.55 var(--body); color: var(--ink); }
.paper .pn { position: absolute; bottom: 4.5%; left: 0; right: 0; text-align: center; font: 600 15px var(--head); color: #b59a77; }
.paper .flourish { position: absolute; top: 4.5%; left: 0; right: 0; text-align: center; color: #e9b96a; letter-spacing: 6px; font-size: 14px; }

/* cover */
.cover .ribbon { position: absolute; top: 4%; left: 6%; right: 6%; z-index: 4; text-align: center; padding: 10px 16px; border-radius: 18px;
  background: rgba(255, 248, 234, .93); box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.cover .ribbon h2 { margin: 0; font: 600 clamp(20px, calc(var(--pw) * .062), 32px)/1.1 var(--head); color: #47306e; }
.cover .ribbon .by { font: 800 12px var(--body); letter-spacing: 1.5px; text-transform: uppercase; color: #c07a3b; margin-top: 4px; }
.cover .words { position: absolute; left: 5%; right: 5%; bottom: 4%; z-index: 4; background: rgba(255, 248, 234, .94); border-radius: 18px; padding: 12px 16px;
  box-shadow: 0 6px 0 rgba(0,0,0,.12); max-height: 44%; overflow: auto; }
.cover .words p { margin: 0; font: 700 17px/1.45 var(--body); color: var(--ink); }

/* single-page (phone portrait) */
.single .book { width: var(--pw); }
.single .book.closed { transform: none; }
.single .page { left: 0 !important; border-radius: 22px !important; box-shadow: 0 14px 34px rgba(8,4,40,.5); }
.single .page.left { display: none; }
.sp { position: absolute; inset: 0; display: flex; flex-direction: column; }
.sp .pic { position: relative; inset: auto; flex: none; width: 100%; aspect-ratio: 1 / 1; max-height: 58%; }
.sp .paper { position: relative; inset: auto; flex: 1; padding: 18px 22px 30px; justify-content: flex-start; overflow: auto; }
.sp .paper .story { font-size: 19px; }
.sp .paper .pn { bottom: 8px; }
.sp .paper .flourish { position: static; margin: -4px 0 6px; font-size: 12px; }
.single .leaf { left: 0; transform-origin: left center; border-radius: 22px; }
.single .leaf .front { border-radius: 22px; box-shadow: 0 14px 34px rgba(8,4,40,.4); }

/* painting placeholder */
.painting { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: repeating-linear-gradient(45deg, #fff6e2 0 18px, #fdf0d4 18px 36px); color: var(--ink-soft); text-align: center; padding: 16px; }
.painting .pal { position: relative; width: 120px; height: 86px; }
.painting .pal b { position: absolute; width: 26px; height: 26px; border-radius: 50%; animation: bob 1.4s ease-in-out infinite; }
.painting .pal b:nth-child(1) { background: var(--coral); left: 6px; top: 34px; }
.painting .pal b:nth-child(2) { background: var(--sun); left: 34px; top: 14px; animation-delay: .2s; }
.painting .pal b:nth-child(3) { background: var(--mint); left: 64px; top: 20px; animation-delay: .4s; }
.painting .pal b:nth-child(4) { background: var(--sky); left: 88px; top: 44px; animation-delay: .6s; }
.painting .pal span { position: absolute; font-size: 40px; left: 40px; top: 36px; animation: paint2 1.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes paint2 { 0%,100% { transform: rotate(-14deg) translateX(-8px); } 50% { transform: rotate(14deg) translateX(10px); } }
.painting strong { font: 600 20px var(--head); color: #8a5ad1; }
.painting small { font-weight: 800; font-size: 14px; }
.painting .retry { margin-top: 6px; border: 0; background: var(--sun); color: #4a2a00; font: 700 15px var(--head); padding: 8px 16px; border-radius: 999px; box-shadow: 0 4px 0 var(--sun-d); }

/* the end */
.theend { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px;
  background: radial-gradient(circle at 50% 35%, #fffaf0, var(--paper) 55%, var(--paper2)); }
.theend h2 { font: 600 clamp(34px, calc(var(--pw) * .12), 60px) var(--head); color: #47306e; margin: 0; }
.theend p { margin: 0; font-weight: 800; color: var(--ink-soft); font-size: 17px; }
.theend .big { font-size: 64px; }
.endbtns { display: grid; gap: 10px; width: min(260px, 90%); margin-top: 8px; }
.endbtns button, .endbtns a { border: 0; border-radius: 18px; padding: 13px; font: 700 18px var(--head); text-decoration: none; color: var(--ink); background: #f1e6ff; box-shadow: 0 4px 0 #d8c6f5; }
.endbtns .primary { background: var(--sun); color: #4a2a00; box-shadow: 0 4px 0 var(--sun-d); }

.note-banner { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 30; background: #fff3c4; color: #6b4a00; padding: 9px 14px; border-radius: 14px; font-weight: 800; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.25); max-width: 92%; text-align: center; }

/* ---------- shelf ---------- */
.shelf { max-width: 980px; margin: 0 auto; padding: 0 18px 50px; }
.shelf h1 { font-family: var(--head); color: #fff; font-weight: 600; font-size: clamp(30px, 7vw, 42px); margin: 10px 4px 18px; text-shadow: 0 3px 0 rgba(0,0,0,.18); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 18px; }
.bk { position: relative; text-decoration: none; color: #fff; display: block; }
.bk .cv { position: relative; aspect-ratio: 1 / 1; border-radius: 6px 16px 16px 6px; overflow: hidden; background: #3d3590; box-shadow: 6px 8px 0 rgba(0,0,0,.25), inset 6px 0 0 rgba(0,0,0,.15); }
.bk .cv::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.12), rgba(0,0,0,.1)); z-index: 2; }
.bk .cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk .cv .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; }
.bk .plank { height: 14px; margin: 0 -9px; border-radius: 6px; background: linear-gradient(#c98a4b, #9c6230); box-shadow: 0 6px 0 rgba(0,0,0,.25); position: relative; top: -2px; }
.bk .t { display: block; font: 600 17px/1.2 var(--head); margin-top: 12px; }
.bk .meta { display: block; color: #cfc6ff; font-weight: 800; font-size: 13px; margin-top: 3px; }
.bk .tag { position: absolute; top: 8px; right: 8px; z-index: 3; background: var(--sun); color: #4a2a00; font: 700 12px var(--head); padding: 3px 8px; border-radius: 999px; }
.bk .del { position: absolute; top: 6px; left: 14px; z-index: 3; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(23,21,74,.6); color: #fff; font-size: 14px; display: none; }
.bk:hover .del, .bk:focus-within .del { display: grid; place-items: center; }
.newbk { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 16px; border: 3px dashed rgba(255,255,255,.4); color: #fff; text-decoration: none; font: 600 18px var(--head); text-align: center; gap: 4px; }
.newbk span { font-size: 40px; display: block; }
.empty-shelf { color: #e4ddff; font-weight: 700; margin: 0 4px 22px; font-size: 17px; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 50; background: var(--paper); color: var(--ink); padding: 12px 18px; border-radius: 16px;
  font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: 90%; text-align: center; }

body.reading .moon, body.reading .cloud { display: none; }
@media (max-width: 600px) {
  .moon { width: 58px; height: 58px; top: 70px; right: -14px; box-shadow: -13px 8px 0 3px #ffe08a; }
  .home h1 { max-width: 310px; font-size: 32px; margin-top: 8px; }
  .home .sub { font-size: 16px; margin-bottom: 14px; }
  .row { gap: 12px; margin-bottom: 16px; }
}
@media (max-width: 440px) {
  .rctl { gap: 6px; flex-wrap: nowrap; padding-left: 8px; padding-right: 8px; }
  .toggle { font-size: 13px; padding: 6px 8px 6px 6px; gap: 5px; white-space: nowrap; }
  .toggle input { width: 32px; height: 20px; } .toggle input::after { width: 14px; height: 14px; } .toggle input:checked::after { transform: translateX(12px); }
  .play { min-width: 0; padding: 10px 12px; font-size: 15px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .leaf, .book { transition-duration: .01s !important; } .stars span, .cloud { animation: none; } }
