/* The calm restyle: sentence-case headings, flat buttons, quiet cards, profile settings, Zuno character, planner, brain plan. Load order matters: later files refine earlier ones (see docs/STRUCTURE.md). */
/* =====================================================================================================
   Refinement layer — calmer palette, serif headlines (Fraunces) over Inter text, hairline borders,
   soft layered shadows, quieter buttons. Everything above still works; this block only restyles it.
   ===================================================================================================== */
:root {
  --page: #f2efe9; --bg: #fffdf9; --card: #ffffff; --ink: #1b1d2e; --muted: #6b6f82; --line: #e8e4db;
  --y: var(--y); --y-soft: #fbf0d0; --y-deep: #9a6508; --navy: #1f2a5c; --coral: #d9644a; --purple: #6d4fc2;
  --good: #1f8a4c; --bad: #c8374f; --good-bg: #e4f5ea; --bad-bg: #fcebee; --good-ink: #17492b; --bad-ink: #7d1d30;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(27, 29, 46, .04), 0 10px 26px -14px rgba(27, 29, 46, .16);
  --shadow-lift: 0 2px 4px rgba(27, 29, 46, .05), 0 18px 34px -16px rgba(27, 29, 46, .22);
  --head: "Fraunces", Georgia, "Times New Roman", serif;
  --num: "Inter", system-ui, sans-serif;
}
body { font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }
#app { border-radius: 26px; box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 30px 70px -30px rgba(60, 50, 30, .22); }
h1, h2, h3 { font-weight: 600; letter-spacing: -.015em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.12rem; }
h4, th, label, .eyebrow { font-family: "Inter", system-ui, sans-serif; }

/* numbers stay crisp and aligned */

/* hero headline: sentence case, serif, one accent word */
.display { font-weight: 600; text-transform: none; letter-spacing: -.025em; line-height: 1.12; font-size: clamp(2.4rem, 5.6vw, 4.1rem); }
.dash-word { border: 0; padding: 0 .06em; margin: 0 .12em 0 0; font-style: italic; color: var(--ink); background: linear-gradient(transparent 62%, rgba(242, 182, 50, .45) 62%); }
.yl { color: var(--y-deep); font-style: italic; }
.lead { font-size: 1.08rem; line-height: 1.7; }
.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .14em; color: var(--y-deep); }

/* buttons: flat and confident */
button { border-radius: 11px; padding: 11px 22px; font-weight: 600; letter-spacing: 0; box-shadow: 0 1px 2px rgba(27, 29, 46, .10), inset 0 -1px 0 rgba(0, 0, 0, .06); }
button:hover { filter: none; background-image: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)); transform: translateY(-1px); }
button:active { transform: translateY(0); box-shadow: inset 0 1px 2px rgba(0,0,0,.12); }
button.ghost { background: #fff; border: 1px solid #d9d4c8; color: var(--ink); box-shadow: none; }
button.ghost:hover { background: var(--y-soft); border-color: #d9c48a; }
button.small { padding: 7px 14px; border-radius: 9px; }
button.big { padding: 15px 30px; border-radius: 13px; }
.play span { box-shadow: var(--shadow); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* cards: hairline border, soft depth */
.card, .ucard, .rcard { border: 1px solid var(--line); box-shadow: var(--shadow); }
.card.click { border-top: 3px solid var(--y); }
.card.click:hover, .card.click:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.ucard { border-radius: 18px; } .ucard::before { height: 3px; } .ucard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.ucard.now { border-color: #e8cf86; box-shadow: 0 0 0 3px var(--y-soft), var(--shadow); }
.ucard .unum { border-radius: 9px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.ucard .ribbon { background: var(--navy); font-weight: 500; letter-spacing: .02em; }
.qcard { border-top: 3px solid var(--y); border-radius: 18px; } .qcard .q { font-family: "Inter", system-ui, sans-serif; font-weight: 600; letter-spacing: -.01em; }
.q { font-family: "Inter", system-ui, sans-serif; font-weight: 600; letter-spacing: -.01em; }
.unit { border-left-width: 3px; }
.ex { border-left-width: 3px; background: var(--y-soft); border-radius: 12px; }
.lesson b { background: linear-gradient(transparent 68%, rgba(242, 182, 50, .32) 68%); }
.learn-grid .lesson { padding: 36px 40px; } .learn-grid .lesson h1 { font-size: 2.1rem; }

/* dashboard hero / result hero: warm sand instead of loud yellow */
.hero, .result-hero { background: linear-gradient(135deg, #f8e3a6 0%, #f1cc6c 100%); box-shadow: var(--shadow-lift); border: 1px solid rgba(154, 101, 8, .15); }
.hero .avatar { background: rgba(255, 255, 255, .6); box-shadow: 0 6px 16px -8px rgba(80, 50, 0, .35); }
.hero h1 { font-weight: 600; font-size: 2.3rem; }
.chip { border: 1px solid rgba(27, 29, 46, .08); font-weight: 500; }
.bubble { box-shadow: 0 6px 16px -10px rgba(80, 50, 0, .4); }
.hero .hero-art svg, .result-hero .mascot { filter: drop-shadow(0 12px 14px rgba(120, 80, 0, .2)); }

/* subject banner */
.banner { border-radius: 22px; border-width: 1px; background: linear-gradient(120deg, color-mix(in srgb, var(--sc, var(--y)) 9%, #fff), color-mix(in srgb, var(--sc, var(--y)) 20%, #fff)); border-color: color-mix(in srgb, var(--sc, var(--y)) 28%, #fff); }
.banner .display.sm .dash-word { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--sc, var(--y)) 40%, transparent) 62%); }
.banner-art .bigicon { filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .14)); }

/* nav + crumbs */
.nav { padding-top: 24px; } .brand { font-family: var(--head); font-weight: 600; font-size: 1.25rem; letter-spacing: -.01em; }
.links a { font-weight: 500; } .links a.active::after { width: 18px; height: 3px; border-radius: 3px; margin-left: -9px; bottom: -4px; }
.crumbs b { background: var(--y-soft); font-weight: 600; }

/* progress, pills, chips */
.bar, .qprog { background: #ece8de; } .bar > i, .qprog > i { background: linear-gradient(90deg, var(--y), #f7cb69); }
.qprog { height: 10px; } .bar { height: 9px; }
.pill { font-weight: 600; letter-spacing: .01em; } .pill.mastered { background: #e1f3e8; color: #17492b; } .pill.getting { background: #fbefcf; color: #7a4a05; } .pill.needs { background: #fbe4e8; color: #7d1d30; }
.ring { background: conic-gradient(var(--y) calc(var(--p) * 1%), #ece8de 0); }
.badge .ic { border-width: 2px; }

/* answer choices */
.choice { border: 1.5px solid var(--line); border-radius: 12px; font-weight: 500; } .choice .k { background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.choice:hover:not(:disabled) { border-color: #d9c48a; background: #fffaf0; } .choice.sel { border-color: var(--y); background: var(--y-soft); }
.feedback { border-radius: 14px; }

/* forms */
input, select { border: 1.5px solid #ddd8cc; border-radius: 10px; background: #fff; } input:focus, select:focus { border-color: var(--y); box-shadow: 0 0 0 3px rgba(242, 182, 50, .22); outline: none; }
.form label { font-weight: 600; font-size: .92rem; }

/* tables */
th { font-family: "Inter", system-ui, sans-serif; } td, th { border-bottom: 1px solid #efebe2; }

/* parent portal */
.kcard header { background: linear-gradient(120deg, #fbf0d0, #fffdf9); } .kcard th { letter-spacing: .06em; }
.atabs { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); } .atabs button { box-shadow: none; border-radius: 10px; font-weight: 500; } .atabs button.on { background: var(--navy); color: #fff; box-shadow: none; }
.spick button { box-shadow: none; border: 1px solid var(--line); font-weight: 500; } .spick button.on { background: var(--navy); border-color: var(--navy); }
.acc { border: 1px solid var(--line); border-radius: 14px; } .acc > summary { font-weight: 600; }
.dsum div { border: 1px solid var(--line); background: #fff; border-radius: 12px; } .fchips button { box-shadow: none; border: 1px solid var(--line); font-weight: 500; } .fchips button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chipbtn { box-shadow: none; border: 1px solid var(--line); }
.admin-top .av { background: var(--navy); border-radius: 16px; }
.dbars { border-bottom-color: var(--line); } .dbar i { background: #d9d6ea; } .dbar.goal i { background: var(--y); }
.focus li { border-radius: 12px; }

/* quiet the motion a little */
.art .mascot, .coach-card .mascot, .auth .art .mascot { animation-duration: 6s; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(1deg); } }
.card.click:hover .big-emoji { animation: none; transform: scale(1.06); }
@media (max-width: 860px) { #app { border-radius: 0; box-shadow: none; } .learn-grid .lesson { padding: 24px 22px; } }

.focus.kid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.kcard .kstats b, .result-hero .score, .hero .stats .chip { font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -.02em; }

/* banner text: calm, upright title and a comfortable reading measure */
.banner .display { font-style: normal; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin: 2px 0 10px; }
.banner .display .dash-word, .banner .display.sm .dash-word { font-style: normal; padding: 0; margin: 0; border: 0; box-decoration-break: clone; background-image: linear-gradient(transparent 80%, color-mix(in srgb, var(--sc, var(--y)) 34%, transparent) 80%); }
.banner .lead { max-width: 36em; margin: 0 0 12px; text-wrap: pretty; font-size: 1.02rem; line-height: 1.6; }
.banner .lead + .lead, .banner .meta { font-size: .95rem; }
.banner .bar { margin: 10px 0 16px; }
.lead, .lesson p, .ucard .meta, .coach-card, .bubble { text-wrap: pretty; }
.banner .meta { margin: 0; color: var(--ink); font-weight: 500; opacity: .75; }
.banner .lead { margin-bottom: 8px; }

/* Buddy's voice picker */
.vgroup { margin: 14px 0 6px; font-size: .95rem; } .vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.vcard { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; font-weight: 400; }
.vcard:hover { background: var(--bg); } .vcard:has(input:checked) { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(31, 42, 92, .15); background: #f7f8ff; }
.vcard input { margin-top: 4px; accent-color: var(--navy); } .vbadge { font-style: normal; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--y-soft); color: var(--y-deep); padding: 1px 8px; border-radius: 99px; }
.vnote { margin: 12px 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }

/* Profile & personal settings */
.avimg { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.hero .avatar, .admin-top .av, .kcard header .av, .ovhead .av { overflow: hidden; } .hero .avatar { cursor: pointer; }
.avnav { display: inline-flex; align-items: center; gap: 6px; } .avsm { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; font-size: 1rem; line-height: 1; }
.pwrap { max-width: 760px; margin: 8px auto 40px; display: grid; gap: 18px; }
.pedit { display: grid; gap: 14px; } .pprev { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.pavatar { width: 84px; height: 84px; border-radius: 50%; background: var(--y-soft); border: 1px solid var(--line); display: grid; place-items: center; font-size: 2.8rem; overflow: hidden; flex: none; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.pe { font-size: 1.5rem; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: none; min-height: 48px; } .pe:hover { background: var(--y-soft); transform: none; filter: none; } .pe.on { background: var(--y-soft); border-color: var(--y-deep); box-shadow: 0 0 0 2px rgba(154, 101, 8, .25); }
.filebtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; background: #fff; border: 1px solid #d9d4c8; font-weight: 600; font-size: .88rem; cursor: pointer; } .filebtn:hover { background: var(--y-soft); }
.switch { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400; } .switch:last-of-type { border: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; } .slider { flex: none; width: 46px; height: 26px; border-radius: 99px; background: #d9d6cc; position: relative; transition: background .15s; } .slider::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .slider { background: var(--navy); } .switch input:checked + .slider::after { transform: translateX(20px); } .switch input:focus-visible + .slider { outline: 2px solid var(--navy); outline-offset: 3px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; } .sw { width: 40px; height: 40px; border-radius: 50%; padding: 0; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); } .sw.on { box-shadow: 0 0 0 3px var(--navy); }
.sw-fresh { background: #2a8318; } .sw-amber { background: #ffb62e; } .sw-blue { background: #5aa2f2; } .sw-pink { background: #ef7aa8; } .sw-green { background: #62c47f; } .sw-violet { background: #a78bf0; }
:root { --hero-a: #f8e3a6; --hero-b: #f1cc6c; }
.hero, .result-hero { background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%); }
html[data-accent=blue] { --y: #5aa2f2; --y-soft: #e3effd; --y-deep: #1f5fa8; --hero-a: #d3e6fb; --hero-b: #a4cbf4; }
html[data-accent=pink] { --y: #ef7aa8; --y-soft: #fde6ef; --y-deep: #a8325f; --hero-a: #fbd9e7; --hero-b: #f4adc9; }
html[data-accent=green] { --y: #62c47f; --y-soft: #e2f5e8; --y-deep: #23703d; --hero-a: #d4f0dd; --hero-b: #a3ddb7; }
html[data-accent=violet] { --y: #a78bf0; --y-soft: #ece6fc; --y-deep: #5b3fb8; --hero-a: #e0d6fb; --hero-b: #bba6f3; }
html[data-text=l] { font-size: 112.5%; } html[data-text=xl] { font-size: 125%; } html[data-text] body { font-size: 1rem; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.pprev label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; min-width: 200px; }

/* Student picker (parent portal): a small round photo or emoji beside the name. Uploaded photos used to render at full size inside the
   button and stretch the pill into a large oval; the photo is now a fixed 28px circle and the label sits next to it. */
.spick button { display: inline-flex; align-items: center; gap: 8px; line-height: 1.2; }
.spick button .avimg { width: 28px; height: 28px; flex: none; }
.spick button .dotw { margin-left: 2px; flex: none; }

/* ===== Zuno brand + animated character (src/ui/zuno.js) ===== */
.brand .zuno-logo { height: 30px; width: auto; display: block; }
.zuno-fox { display: block; overflow: visible; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.zuno-fox * { transform-box: view-box; }
.art .zuno-fox, .coach-card .zuno-fox, .result-hero .zuno-fox, .auth .art .zuno-fox, .hero-art2 .zuno-fox, #buddy .zuno-fox { animation: none; }   /* Zuno has its own idle motion */
/* idle: breathing, a gentle head bob, a swishing tail, swaying and twitching ears, blinking, eyes that follow the pointer */
.zf-body { animation: zf-breathe 3.6s ease-in-out infinite; }
.zf-head { animation: zf-headbob 5s ease-in-out infinite; }
.zf-tail { animation: zf-tail 2.6s ease-in-out infinite; }
.zf-ear-l { animation: zf-earL 6.5s ease-in-out infinite; }
.zf-ear-r { animation: zf-earR 7.3s ease-in-out infinite; }
.zf-arm { animation: zf-armidle 4.2s ease-in-out infinite; }
.zf-eye { animation: zf-blink 4.6s infinite; }
.zf-eye + .zf-eye { animation-delay: .01s; }
.zf-look { transform-origin: 150px 206px; transform: translate(calc(var(--zx, 0) * 3px), calc(var(--zy, 0) * 1.6px)) rotate(calc(var(--zx, 0) * 2.4deg)); transition: transform .3s ease-out; }
.zf-pupil { transform: translate(calc(var(--zx, 0) * 3.4px), calc(var(--zy, 0) * 2.8px)); transition: transform .15s ease-out; }
/* moods set by the app */
.zuno-fox.wave .zf-arm { animation: zf-wave .55s ease-in-out infinite; }
.zuno-fox.cheer .zf-all { animation: zf-hop .8s ease-out; }
.zuno-fox.cheer .zf-arm { animation: zf-wave .35s ease-in-out 3; }
.zuno-fox.cheer .zf-ear-l, .zuno-fox.cheer .zf-ear-r { animation: zf-flap .4s ease-in-out 2; }
.zuno-fox.cheer .zf-tail { animation: zf-tail .3s ease-in-out infinite; }
.zuno-fox.oops .zf-head { animation: zf-oops .9s ease-in-out; }
.zuno-fox.oops .zf-ear-l { animation: zf-droopL .9s ease-in-out; } .zuno-fox.oops .zf-ear-r { animation: zf-droopR .9s ease-in-out; }
.zuno-fox.oops .zf-brow-l { transform: rotate(-14deg); } .zuno-fox.oops .zf-brow-r { transform: rotate(14deg); }
.zuno-fox.talk .zf-mouth { animation: zf-talk .24s ease-in-out infinite alternate; }
.zuno-fox.talk .zf-head { animation: zf-talkbob .5s ease-in-out infinite; }
.zuno-fox.poke .zf-all { animation: zf-poke .6s cubic-bezier(.3, 1.6, .5, 1); }
.zuno-fox.poke .zf-ear-l, .zuno-fox.poke .zf-ear-r { animation: zf-flap .35s ease-in-out 2; }
.zf-brow { transition: transform .25s ease; }
@keyframes zf-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.022); } }
@keyframes zf-headbob { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-1.4deg) translateY(-2px); } }
@keyframes zf-tail { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(10deg); } }
@keyframes zf-earL { 0%, 58%, 100% { transform: rotate(0); } 20% { transform: rotate(-3deg); } 40% { transform: rotate(2deg); } 62% { transform: rotate(-11deg); } 66% { transform: rotate(3deg); } 70% { transform: rotate(-6deg); } 76% { transform: rotate(0); } }
@keyframes zf-earR { 0%, 30%, 100% { transform: rotate(0); } 12% { transform: rotate(3deg); } 22% { transform: rotate(-2deg); } 34% { transform: rotate(11deg); } 38% { transform: rotate(-3deg); } 42% { transform: rotate(6deg); } 48% { transform: rotate(0); } 70% { transform: rotate(3deg); } }
@keyframes zf-blink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.07); } 97% { transform: scaleY(1); } }
@keyframes zf-armidle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3.5deg); } }
@keyframes zf-wave { 0%, 100% { transform: rotate(2deg); } 30% { transform: rotate(-20deg); } 70% { transform: rotate(14deg); } }
@keyframes zf-hop { 0% { transform: translateY(0) scale(1, 1); } 14% { transform: translateY(0) scale(1.08, .9); } 46% { transform: translateY(-34px) scale(.95, 1.08); } 76% { transform: translateY(0) scale(1.07, .92); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes zf-flap { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-9deg); } }
@keyframes zf-oops { 0%, 100% { transform: rotate(0) translateY(0); } 40% { transform: rotate(5deg) translateY(5px); } }
@keyframes zf-droopL { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-16deg); } }
@keyframes zf-droopR { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(16deg); } }
@keyframes zf-talk { from { transform: scaleY(.75); } to { transform: scaleY(1.45); } }
@keyframes zf-talkbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px) rotate(-.8deg); } }
@keyframes zf-poke { 0% { transform: scale(1, 1); } 18% { transform: scale(1.15, .8); } 40% { transform: scale(.9, 1.17); } 62% { transform: scale(1.06, .95); } 82% { transform: scale(.99, 1.02); } 100% { transform: scale(1, 1); } }
@media (prefers-reduced-motion: reduce) { .zuno-fox *, .zuno-fox { animation: none !important; } .zf-look, .zf-pupil { transition: none; } }

/* dashboard top row: compact, equal-height cards with actions pinned to the bottom */
.dcard { display: flex; flex-direction: column; padding: 16px 18px; }
.dcard h3 { margin: 0 0 8px; font-size: 1rem; }
.dcard .dtxt { margin: 0 0 12px; font-size: .95rem; line-height: 1.35; }
.dcard .dsub { display: block; margin-top: 3px; font-size: .85rem; color: var(--muted, var(--muted)); }
.dcard .dact { margin-top: auto; gap: 8px; }
.dcard .goal { font-size: .95rem; line-height: 1.35; gap: 12px; margin-bottom: 8px; }
.dcard .goalrow { font-size: .85rem; }
.sdots { display: flex; gap: 5px; }
.sdot { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 10px; background: var(--y-soft, #f4efe4); font-size: .85rem; min-height: 44px; }
.sdot i { font-style: normal; font-size: .7rem; color: var(--muted, var(--muted)); font-weight: 600; }
.sdot.on { background: #ffe9b0; }

/* planner: calendar + journal */

.ptabs { display: flex; gap: 8px; margin-bottom: 14px; }
.ptabs button { background: #fff; border: 1.5px solid var(--y); box-shadow: none; }
.ptabs button.on { background: var(--y); }
.calgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) { .calgrid { grid-template-columns: 1fr; } }
.calhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calhead h2 { margin: 0; flex: 1; text-align: center; font-size: 1.25rem; }
.cw, .cm { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cw span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted, var(--muted)); padding-bottom: 2px; }
.cd { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 58px; padding: 5px 6px; border-radius: 10px; background: #fff; border: 1.5px solid #ece6d6; box-shadow: none; font-weight: 500; text-align: left; }
.cd.blank { background: none; border: 0; }
.cd b { font-size: .85rem; } .cd:hover { background: var(--y-soft, #fff6dc); transform: none; }
.cd.today { border-color: var(--y); } .cd.today b { background: var(--y); border-radius: 8px; padding: 0 6px; }
.cd.sel { outline: 2.5px solid var(--navy, #1f3a5f); outline-offset: -1px; }
.cdots { display: flex; gap: 1px; flex-wrap: wrap; font-size: .7rem; line-height: 1; } .cdots i { font-style: normal; } .cdots i.dn { opacity: .35; }
.cd em { position: absolute; right: 4px; bottom: 3px; font-size: .65rem; font-style: normal; }
.ev { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: #faf6ea; cursor: pointer; }
.ev.done .et b { text-decoration: line-through; opacity: .55; } .ev .et { flex: 1; } .ev .x { padding: 2px 8px; }
.evform input:not([type=time]), .evform select, #jg, #jt { width: 100%; font: inherit; padding: 9px 11px; border: 1.5px solid #d9d2bf; border-radius: 10px; background: #fff; box-sizing: border-box; }
.evform .row { margin-top: 8px; gap: 8px; } .evform select { width: auto; } .evform input[type=time] { font: inherit; padding: 8px; border: 1.5px solid #d9d2bf; border-radius: 10px; }
.upl, .jlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.upl li { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.moods { display: flex; gap: 8px; flex-wrap: wrap; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 10px; background: #fff; border: 1.5px solid #ece6d6; box-shadow: none; border-radius: 12px; }
.mood span { font-size: 1.6rem; } .mood small { font-size: .7rem; font-weight: 600; } .mood.on { background: #ffe9b0; border-color: var(--y); }
#jt { resize: vertical; }
.jlist button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: #faf6ea; box-shadow: none; padding: 8px 10px; border-radius: 10px; font-weight: 500; }
.jlist button.on { outline: 2px solid var(--y); } .jlist .jm { font-size: 1.4rem; }
.cd.studied { background: #eaf7ec; border-color: #b9e0c0; }
.actline { margin: 0 0 10px; padding: 6px 10px; border-radius: 10px; background: #eaf7ec; }
.evgo { gap: 6px; margin-top: 4px; }
.plan { margin: 0 0 40px; }
.plan .calgrid { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
.cd { min-height: 84px; padding: 7px 9px; } .cd b { font-size: .95rem; } .cdots { font-size: .85rem; gap: 2px; }
@media (max-width: 760px) { .cd { min-height: 54px; padding: 4px 5px; } .plan .calgrid { grid-template-columns: 1fr; } }

/* journal */
.jgrid { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
.jlab { margin: 14px 0 6px; font-size: .88rem; font-weight: 700; }
.wstrip { display: flex; gap: 6px; margin-bottom: 10px; }
.wd { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 4px 0; background: #faf6ea; border: 1.5px solid transparent; box-shadow: none; border-radius: 12px; }
.wd i { font-style: normal; font-size: .68rem; font-weight: 700; color: var(--muted, var(--muted)); } .wd span { font-size: 1.25rem; line-height: 1.3; } .wd.on { border-color: var(--y); background: #fff3cf; }
.rate { display: flex; gap: 2px; } .rate button { background: none; box-shadow: none; padding: 0 3px; font-size: 1.8rem; line-height: 1; color: #d9d2bf; } .rate button.on { color: var(--y); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; } .tg { padding: 5px 11px; font-size: .85rem; font-weight: 600; border-radius: 999px; background: #fff; border: 1.5px solid #ece6d6; box-shadow: none; } .tg.on { background: #ffe9b0; border-color: var(--y); } .tags.small .tg { padding: 3px 8px; }
.jfields { display: grid; gap: 8px; margin: 14px 0 0; } .jf { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; }
.jf input { font: inherit; font-weight: 400; padding: 9px 11px; border: 1.5px solid #d9d2bf; border-radius: 10px; background: #fff; min-width: 0; } @media (max-width: 520px) { .jf { grid-template-columns: 1fr; gap: 2px; } }
.jmeta { display: flex; justify-content: space-between; margin-top: 6px; }
.phs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; border-radius: 14px; } .phs.over { outline: 2px dashed var(--y); outline-offset: 4px; }
.ph { position: relative; margin: 0; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #f1ecdd; } .ph.gone { display: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; opacity: 0; transition: opacity .25s; } .ph img.ok { opacity: 1; }
.ph .x { position: absolute; top: 4px; right: 4px; padding: 0 7px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; box-shadow: none; font-size: .8rem; }
.phadd { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; border: 2px dashed #d9c58a; border-radius: 14px; cursor: pointer; color: var(--muted, var(--muted)); background: #fffaf0; } .phadd span { font-size: 1.8rem; line-height: 1; } .phadd:hover { background: #fff3cf; }
.jstats { display: flex; gap: 8px; margin-bottom: 10px; } .jstats div { flex: 1; text-align: center; padding: 8px 4px; border-radius: 12px; background: #faf6ea; } .jstats b { display: block; font-size: 1.25rem; } .jstats span { font-size: .72rem; color: var(--muted, var(--muted)); }
.jsearch { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 11px; margin-bottom: 8px; border: 1.5px solid #d9d2bf; border-radius: 10px; }
.jlist { margin-top: 10px; } .jlist .jx { flex: 1; min-width: 0; } .jth { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; opacity: 0; } .jth[src] { opacity: 1; } .stars2 { color: var(--y); font-size: .8rem; letter-spacing: -1px; }
.lightbox { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(15,20,30,.82); padding: 20px; } .lightbox[hidden] { display: none; } .lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; } .lightbox button { position: absolute; top: 16px; right: 16px; }
.nbadge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: #e0483b; color: #fff; font-size: .72rem; line-height: 18px; text-align: center; }
.pstrip { flex-wrap: wrap; } .pstrip .wd { flex: 0 0 calc(100% / 14 - 6px); min-width: 22px; padding: 2px 0; } .pstrip .wd span { font-size: 1rem; }

/* brain plan */
.bgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); align-items: start; margin-bottom: 40px; }
@media (max-width: 800px) { .bgrid { grid-template-columns: 1fr; } }
.bweek { margin-bottom: 14px; padding: 10px; border-radius: 14px; background: #faf6ea; } .bweek.cur { background: #efe8ff; outline: 2px solid #c9b6f5; }
.bweek h3 { margin: 0 0 8px; font-size: .95rem; }
.bcells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bcell { display: flex; flex-direction: column; gap: 1px; padding: 6px 7px; border-radius: 10px; background: #fff; border: 1.5px solid #ece6d6; min-height: 62px; font-size: .78rem; }
.bcell i { font-style: normal; color: var(--muted, var(--muted)); font-weight: 600; } .bcell b { font-size: .8rem; line-height: 1.15; } .bcell span { margin-top: auto; font-weight: 700; }
.bcell.done { background: #eaf7ec; border-color: #b9e0c0; } .bcell.now { border-color: var(--purple); background: #fff; box-shadow: 0 0 0 2px #e4d8ff; } .bcell.miss { opacity: .55; }
@media (max-width: 520px) { .bcells { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; } .bcell { padding: 4px; font-size: .68rem; } .bcell b { font-size: .68rem; } }
.spark2 { display: flex; align-items: flex-end; gap: 5px; height: 70px; padding: 4px 0; } .spark2 span { flex: 1; border-radius: 4px 4px 0 0; background: #c9b6f5; } .spark2 .hi { background: #5cb87a; } .spark2 .md { background: var(--y); } .spark2 .lo { background: #e0786b; }
.barrow { display: grid; grid-template-columns: minmax(0, 1fr) 90px 42px; gap: 8px; align-items: center; font-size: .86rem; margin: 4px 0; } .barrow b { text-align: right; }
.focusbox { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: #efe8ff; } .focusbox.ok { background: #eaf7ec; } .focusbox button { margin-top: 6px; }
.wlist { margin: 6px 0 0; padding-left: 18px; } .wlist li { margin: 3px 0; }
.pbadge { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e4d8ff; white-space: nowrap; }
.pform { display: grid; gap: 6px; margin: 8px 0; } .pform input, .pform select { font: inherit; padding: 8px 10px; border: 1.5px solid #d9d2bf; border-radius: 10px; background: #fff; min-width: 0; }

/* reading passages */
.pass { margin: 0 0 14px; padding: 14px 16px; border-left: 4px solid var(--y); border-radius: 12px; background: #faf6ea; font-size: 1rem; font-weight: 400; line-height: 1.6; text-transform: none; }
.pass .t { display: block; margin-bottom: 6px; font-size: 1.05rem; } .pass p { margin: .4em 0; }
.pq { margin: .2em 0 0; font-weight: 600; }
.ptabs .grow { flex: 1; } .ptabs { align-items: center; flex-wrap: wrap; } .ptabs #premind { box-shadow: none; }
/* comfortable tap targets on touch screens */
.ev input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--navy, #1f3a5f); }
.ev .x { min-width: 40px; min-height: 40px; } .ev { min-height: 48px; }
.rate button { min-width: 40px; min-height: 40px; }
.ph .x { min-width: 32px; min-height: 32px; font-size: .95rem; }
.moods .mood { min-height: 56px; }
.tg { min-height: 36px; }
#offline-bar { position: sticky; top: 0; z-index: 70; padding: 8px 14px; background: #1f3a5f; color: #fff; font-size: .85rem; text-align: center; display: none; } .offline #offline-bar { display: block; }

/* my progress */
.pgsum { margin: 0 0 16px; }
.pggrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); margin-bottom: 18px; align-items: start; }
@media (max-width: 760px) { .pggrid { grid-template-columns: 1fr; } }
.wbars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 18px; }
.wbar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.wbar i { display: block; width: 100%; max-width: 38px; border-radius: 8px 8px 0 0; background: #c9b6f5; } .wbar.now i { background: var(--y, var(--y)); }
.wbar em { font-style: normal; font-size: .66rem; color: var(--muted, var(--muted)); margin-top: 4px; white-space: nowrap; } .wbar .wv { font-size: .72rem; font-weight: 700; margin-bottom: 2px; }
.nextl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; } .nextl li { display: flex; align-items: center; gap: 10px; } .nextl li > span:first-child { font-size: 1.5rem; } .nextl li > div { flex: 1; min-width: 0; }
.pgsub { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .pgs { padding: 10px 12px; border-radius: 12px; background: #faf6ea; border-left: 4px solid var(--sc, var(--y)); } .pgh { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.journey { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; } .journey li { display: flex; align-items: center; gap: 10px; } .jd { width: 62px; flex: none; font-size: .78rem; color: var(--muted, var(--muted)); font-weight: 600; } .ji { font-size: 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pnote { margin: 0 0 18px; background: linear-gradient(120deg, #fff0f3, #ffe2ea); border-color: #f5b8c8; } .pn-h { font-weight: 800; margin-bottom: 4px; } .pn-t { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.5; }

/* Spanish: the Listen button and the word tables */
.say { border: 0; background: #fff3c4; color: #14142b; border-radius: 999px; min-width: 34px; min-height: 34px; padding: 0 8px; font-size: 1rem; cursor: pointer; vertical-align: middle; box-shadow: none; text-shadow: none; letter-spacing: 0; }
.say.on { background: #ffb800; } .say:hover { filter: brightness(.96); }
.lesson table.vtab { width: 100%; } .lesson table.vtab td:first-child { white-space: nowrap; }
.playq { margin: 4px 0 10px; } .say.big { font: 800 1.05rem Lexend, system-ui, sans-serif; padding: 12px 22px; min-height: 48px; border-radius: 16px; background: #ffd23f; }
.typed { margin: 8px 0; } .ty-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ty-k { border: 0; background: #eef0fb; color: #14142b; border-radius: 10px; min-width: 40px; min-height: 40px; font: 700 1.05rem Lexend, system-ui, sans-serif; cursor: pointer; box-shadow: none; text-shadow: none; letter-spacing: 0; padding: 0 10px; }
.ty-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.typed input { flex: 1; min-width: 180px; font: 600 1.2rem Lexend, system-ui, sans-serif; padding: 12px 16px; border: 2px solid var(--line, #dfe2f2); border-radius: 14px; background: #fff; color: #14142b; }
.typed input:focus { outline: 0; border-color: var(--blue); } .typed input.right { border-color: #1f9d55; background: #e8f7ee; } .typed input.wrong { border-color: #d63a52; background: #fdeaed; }
#tmr.late { background: #ffe3e6; color: #b3182f; font-weight: 800; }
