@font-face { font-family: 'Cairo'; font-weight: 400; font-display: swap; src: url(fonts/cairo-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url(fonts/cairo-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 400; font-display: swap; src: url(fonts/cairo-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url(fonts/cairo-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root { --ds-page: #fff8ec; --ds-ink: #1d2b4f; --ds-ink-2: #5b6785; --ds-hairline: #eadfcb; --ds-teal: #1fa38a; --ds-surface: #fff; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: 'Cairo', 'Segoe UI', Tahoma, 'Noto Naskh Arabic', sans-serif; color: var(--ds-ink); background: radial-gradient(circle at 15% 0%, #ffeab8 0, transparent 38%), radial-gradient(circle at 100% 20%, #d7ecff 0, transparent 40%), #fff8ec; background-attachment: fixed; line-height: 1.8; font-size: 17px; -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 980px; margin: 0 auto; padding: 14px 16px 40px; padding-top: max(14px, env(safe-area-inset-top)); }
header h1 { margin: 0 0 4px; font-size: 26px; }
h1, h2, h3 { line-height: 1.4; } p { margin: 6px 0; }
.caption { color: var(--ds-ink-2); font-size: 14px; margin: 4px 0; }
.callout { background: #fff3d6; border: 2px solid #ffb703; border-radius: 16px; padding: 10px 14px; margin: 10px 0; }
.group { border-top: 2px dashed var(--ds-hairline); padding: 6px 0 4px; margin: 10px 0; } .group h3 { margin: 6px 0; font-size: 19px; }
.closing { color: var(--ds-ink-2); font-size: 13px; margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--ds-hairline); }
.btn { font: inherit; font-weight: 700; min-height: 50px; padding: 8px 22px; border-radius: 26px; border: 0; cursor: pointer; background: linear-gradient(180deg, #ffc42e, #ffa400); color: #1d2b4f; box-shadow: 0 4px 0 #d98a00; margin: 6px 0 8px 8px; transition: transform .12s, box-shadow .12s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d98a00; }
.btn.secondary { background: #fff; color: #1d2b4f; box-shadow: 0 4px 0 #cfd8ec; border: 2px solid #cfd8ec; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ds-ink-2); text-decoration: underline; min-height: 44px; }
.btn.compact { min-height: 44px; padding: 4px 16px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: block; margin: 10px 0; } .field span { display: block; color: var(--ds-ink-2); font-size: 14px; }
.field input { width: 100%; min-height: 50px; font: inherit; font-size: 18px; border-radius: 14px; border: 2px solid #cfd8ec; padding: 6px 12px; background: #fff; color: inherit; }
.field input:focus { outline: 3px solid #4dabf7; border-color: #4dabf7; }
button:focus-visible, a:focus-visible { outline: 3px solid #4dabf7; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
html, body, #root { margin: 0; min-height: 100%; }
body { background: var(--ds-page); }
html, body, #root { margin: 0; min-height: 100%; }

.file-nav { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--ds-hairline); }
.file-nav a { padding: 10px 0; color: var(--ds-ink-2); text-decoration: none; }
.file-nav a[aria-current="page"] { color: var(--ds-ink); box-shadow: inset 0 -1px 0 var(--ds-ink); }
@media (max-width: 600px) { .file-nav a { display: inline-flex; align-items: center; min-height: 44px; } }
.ms-stage { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 16px; }
.ms-teacher { width: 120px; height: 132px; flex: none; }
.ms-bubble { flex: 1; background: var(--ds-surface, #fff); border: 1.5px solid var(--ds-hairline); border-radius: 16px; padding: 10px 14px; line-height: 1.8; min-height: 60px; }
.ms-mouth { transform-origin: 100px 124px; opacity: 0; }
.ms-teacher.talk .ms-mouth { opacity: 1; animation: ms-talk .32s infinite alternate ease-in-out; }
.ms-teacher.talk .ms-smile { opacity: 0; }
.ms-teacher.talk .ms-body { animation: ms-bob .6s infinite alternate ease-in-out; }
.ms-teacher.cheer .ms-body { animation: ms-hop .4s 3 ease-in-out; }
.ms-eyes { transform-origin: 100px 94px; animation: ms-blink 4s infinite; }
@keyframes ms-talk { from { transform: scaleY(.6) scaleX(.9); } to { transform: scaleY(2.6) scaleX(.8); } }
@keyframes ms-bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes ms-hop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ms-blink { 0%,94%,100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .ms-teacher .ms-body, .ms-teacher .ms-mouth, .ms-eyes { animation: none !important; } }
.ms-phases { display: flex; gap: 6px; margin: 8px 0 12px; flex-wrap: wrap; }
.ms-phases span { flex: 1; min-width: 90px; text-align: center; padding: 6px 4px; border-radius: 10px; background: var(--ds-hairline); color: var(--ds-ink-2); font-size: 13px; }
.ms-phases span.on { background: #cfe9e5; color: var(--ds-ink); }
.ms-phases span.now { background: var(--ds-teal, #1f8a8a); color: #fff; }
.ms-card { border-top: 1px solid var(--ds-hairline); padding: 10px 0; }
.ms-card h3, .ms-board h3, .ms-h { margin: 0 0 6px; font-size: 20px; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ms-chip { border: 1.5px solid var(--ds-hairline); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; min-width: 90px; }
.ms-chip b { font-size: 22px; }
.ms-chip span { font-size: 13px; color: var(--ds-ink-2); }
.ms-sentence { font-size: 26px; line-height: 2; margin: 8px 0; }
.ms-prompt { font-size: 20px; line-height: 1.8; margin: 4px 0 8px; }
.ms-opts, .ms-words { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.ms-opt, .ms-word { min-height: 52px; border-radius: 14px; border: 1.5px solid var(--ds-hairline); background: var(--ds-page); font: inherit; font-size: 20px; color: inherit; cursor: pointer; padding: 8px 16px; }
.ms-opts .ms-opt { flex: 1 1 140px; }
.ms-opt:disabled, .ms-word:disabled { opacity: .6; cursor: default; }
.ms-word.c-fil { background: #fbd5d5; } .ms-word.c-ism { background: #d5e8fb; } .ms-word.c-harf { background: #d5f2d5; }
.ms-tag { display: block; font-size: 13px; color: var(--ds-ink-2); }
.ms-btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ms-big { font-size: 56px; text-align: center; margin: 8px 0; }
.ms-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-badge { padding: 6px 12px; border-radius: 16px; border: 1px solid var(--ds-hairline); color: var(--ds-ink-2); font-size: 14px; }
.ms-badge.on { background: #fff2c2; color: var(--ds-ink); border-color: #e0c24a; }
.ms-opt.correct, .ms-word.correct { background: #d5f2d5; border-color: #3a9a5a; opacity: 1 !important; }
.app-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; position: sticky; top: 0; background: var(--ds-page); z-index: 5; border-bottom: 1px solid var(--ds-hairline); }
.app-nav button { flex: 1 0 auto; min-height: 46px; padding: 6px 14px; border-radius: 23px; border: 1.5px solid var(--ds-hairline); background: transparent; font: inherit; color: var(--ds-ink-2); cursor: pointer; white-space: nowrap; transition: background .2s, transform .15s; }
.app-nav button:active { transform: scale(.96); }
.app-nav button.on { background: var(--ds-teal, #1f8a8a); color: #fff; border-color: transparent; }
.app-body { padding: 12px 0; animation: app-in .3s ease; }
@keyframes app-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.today { background: #e7f4f2; border-radius: 18px; padding: 14px 16px; margin: 8px 0 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 12px 0; }
.stats div { border: 1.5px solid var(--ds-hairline); border-radius: 14px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.stats b { font-size: 28px; } .stats span { font-size: 13px; color: var(--ds-ink-2); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.subj, .badge { text-align: start; font: inherit; color: inherit; border: 1.5px solid var(--ds-hairline); border-radius: 18px; padding: 14px; background: var(--ds-page); display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: transform .15s; }
.subj:active { transform: scale(.98); }
.subj.off, .badge { cursor: default; } .subj.off { opacity: .6; }
.badge.on { background: #fff2c2; border-color: #e0c24a; }
.ic { width: 44px; height: 44px; border-radius: 50%; background: var(--ds-teal, #1f8a8a); color: #fff; display: grid; place-items: center; font-size: 22px; }
.unit-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; } .unit-tabs button { font: inherit; color: inherit; border: 0; min-height: 40px; cursor: pointer; padding: 4px 12px; border-radius: 12px; background: var(--ds-hairline); font-size: 13px; } .unit-tabs span { padding: 4px 10px; border-radius: 12px; background: var(--ds-hairline); font-size: 13px; } .unit-tabs button.on, .unit-tabs span.on { background: #cfe9e5; }
.lessons { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.lessons li { border: 1.5px solid var(--ds-hairline); border-radius: 14px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.lessons li.soon { opacity: .6; } .lessons li.live { border-color: var(--ds-teal, #1f8a8a); background: #f1faf8; }
.lessons .kind { display: block; font-size: 12px; color: var(--ds-ink-2); } .lessons .st { font-size: 13px; padding: 3px 10px; border-radius: 12px; background: var(--ds-hairline); }
.tbl { width: 100%; border-collapse: collapse; } .tbl td { padding: 8px 4px; border-bottom: 1px solid var(--ds-hairline); vertical-align: top; }
@media (max-width: 600px) { .ms-teacher { width: 90px; height: 100px; } .ms-sentence { font-size: 22px; } }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, #1d2b4f 0%, #27507a 60%, #2bb39a 130%); color: #fff; border-radius: 22px; padding: 14px 20px; margin: 4px 0 10px; overflow: hidden; }
.hero h1 { margin: 2px 0; font-size: 34px; color: #fff; } .hero small, .hero span { color: #ffe3a3; font-size: 14px; }
.hero .ms-teacher { width: 120px; height: 120px; flex: none; } .hero.small { padding: 10px 18px; } .hero.small h1 { font-size: 22px; }
.app-nav a { flex: 1 0 auto; min-height: 46px; padding: 6px 14px; border-radius: 23px; border: 1.5px solid var(--ds-hairline); color: var(--ds-ink-2); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; transition: background .2s, transform .15s; }
.app-nav a.on { background: #1d2b4f; color: #fff; border-color: transparent; } .app-nav a:active { transform: scale(.96); }
.warn { background: #fff3d6; border: 1.5px solid #f5a623; border-radius: 14px; padding: 10px 14px; margin: 8px 0; line-height: 1.8; font-size: 15px; }
.speech { background: #fff; border: 2px solid #f5a623; border-radius: 18px; padding: 12px 16px; margin: 6px 0 12px; line-height: 1.9; font-size: 18px; }
.mission { background: #eef4ff; border-radius: 20px; padding: 16px 18px; margin: 10px 0; border: 1.5px solid #cfdcf5; } .mission h2 { margin: 6px 0; font-size: 24px; } .soonbox { background: #f4f1ec; border-color: var(--ds-hairline); }
.tag { display: inline-block; background: #f5a623; color: #1d2b4f; font-size: 13px; font-weight: 600; border-radius: 10px; padding: 2px 10px; }
.h { font-size: 24px; margin: 10px 0; } .h2 { font-size: 19px; margin: 16px 0 6px; }
.prog { margin: 12px 0; } .prog-h { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 15px; } .bar { height: 12px; border-radius: 6px; background: var(--ds-hairline); overflow: hidden; margin-top: 6px; } .bar i { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, #2bb39a, #f5a623); transition: width .6s; }
a.subj { text-decoration: none; } .subj.big { grid-column: 1 / -1; } .subj .soon { background: var(--ds-hairline); border-radius: 10px; padding: 0 8px; align-self: flex-start; font-size: 13px; }
.ic { background: #1d2b4f; } .badge.on { background: #fff2c2; }
.unitlist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; } .unitrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #eef4ff; color: inherit; text-decoration: none; min-height: 52px; } .unitrow small { display: block; color: var(--ds-ink-2); } .chev { font-size: 24px; }
.back { display: inline-block; padding: 10px 0; color: #27507a; text-decoration: none; min-height: 44px; }
.unit-tabs a { padding: 8px 14px; border-radius: 14px; background: var(--ds-hairline); color: inherit; text-decoration: none; font-size: 14px; display: inline-flex; min-height: 40px; align-items: center; } .unit-tabs a.on { background: #1d2b4f; color: #fff; }
.lessons li a { color: inherit; text-decoration: none; display: block; flex: 1; min-height: 44px; } .lessons li small { color: var(--ds-ink-2); } .lessons .st.go { background: #2bb39a; color: #fff; }
.lessons li.live { border-color: #2bb39a; background: #effaf7; }
.parts { padding-inline-start: 18px; line-height: 1.9; } .parts li b { display: block; }
@media (max-width: 600px) { .hero h1 { font-size: 26px; } .hero .ms-teacher { width: 84px; height: 84px; } .speech { font-size: 16px; } }
.hero { padding: 8px 18px; margin: 0 0 8px; } .hero h1 { font-size: 28px; } .hero .ms-teacher { width: 84px; height: 84px; }
.app-nav { padding: 6px 0; } .app-nav a { min-height: 44px; }
.warn { padding: 6px 12px; margin: 6px 0; font-size: 14px; line-height: 1.6; }
@media (max-width: 600px) { .hero h1 { font-size: 22px; } .hero .ms-teacher { width: 64px; height: 64px; } }

.app-nav { background: rgba(255,248,236,.92); backdrop-filter: blur(6px); }
.app-nav a.on { background: #1d2b4f; }
.hero { background: linear-gradient(135deg, #1d2b4f 0%, #2a5a9a 55%, #1fa38a 120%); box-shadow: 0 6px 0 #101a33; position: relative; }
.hero::after { content: '★ ✦ ★'; position: absolute; top: 8px; left: 16px; color: #ffd36b; opacity: .6; letter-spacing: 8px; font-size: 14px; }
.mission { background: #fff; border: 2px solid #cfdcf5; box-shadow: 0 5px 0 #cfdcf5; }
.today, .stats div, .subj, .badge, .lessons li { background: #fff; }
.stats div { border: 2px solid #eadfcb; box-shadow: 0 4px 0 #eadfcb; }
.stats div:nth-child(1) b { color: #f59f00; } .stats div:nth-child(2) b { color: #1fa38a; } .stats div:nth-child(3) b { color: #4c6ef5; } .stats div:nth-child(4) b { color: #e8590c; }
.subj { border: 2px solid #eadfcb; box-shadow: 0 5px 0 #eadfcb; }
.ms-opt, .ms-word { border: 2px solid #cfd8ec; background: #fff; box-shadow: 0 4px 0 #cfd8ec; min-height: 56px; font-weight: 700; }
.ms-opt:active, .ms-word:active { transform: translateY(3px); box-shadow: 0 1px 0 #cfd8ec; }
.ms-bubble { border: 2px solid #ffb703; background: #fff; }
.field.sel, .field.ta { width: 100%; font: inherit; padding: 12px; border-radius: 14px; border: 2px solid #cfd8ec; background: #fff; color: #1d2b4f; }
.field.ta { min-height: 104px; resize: vertical; line-height: 1.9; }
.diagcard { border-color: #ffd36b !important; box-shadow: 0 5px 0 #ffd36b !important; }
.parts li b { display: block; margin-bottom: 3px; }
.stats div b { font-size: 30px; line-height: 1.1; }

.profbar{display:flex;justify-content:space-between;align-items:center;padding:6px 12px;background:#fff8ec;border-bottom:1px solid #e5d9c0;font-size:14px}

.btn{min-height:52px;font-size:1.05rem}
.btn.compact{min-height:44px}
.ms-btnrow .btn{flex:1 1 auto;min-width:96px}
@keyframes pop{0%{transform:scale(.9);opacity:.2}60%{transform:scale(1.04)}100%{transform:scale(1);opacity:1}}
.callout{animation:pop .25s ease-out}

/* v3 design pass: richer feedback + friendlier teacher */
.ms-teacher .ms-spark { opacity: 0; }
.ms-teacher.cheer .ms-spark { opacity: 1; animation: ms-twinkle .55s 3 ease-in-out; }
@keyframes ms-twinkle { 0%,100% { opacity: .2; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.08); } }
.ms-card { position: relative; }
.ms-card.ok { animation: ms-glow .7s ease-out; }
@keyframes ms-glow { 0% { box-shadow: 0 0 0 0 rgba(46, 160, 90, .55); } 100% { box-shadow: 0 0 0 18px rgba(46, 160, 90, 0); } }
.ms-fx { position: absolute; top: -14px; inset-inline-start: 14px; font-size: 30px; pointer-events: none; z-index: 3; animation: ms-floaty 1.1s ease-out forwards; }
.ms-fx-wrong { animation-name: ms-nudge; }
@keyframes ms-floaty { 0% { opacity: 0; transform: translateY(10px) scale(.5); } 30% { opacity: 1; transform: translateY(-6px) scale(1.25); } 100% { opacity: 0; transform: translateY(-30px) scale(1); } }
@keyframes ms-nudge { 0% { opacity: 0; transform: translateX(0) scale(.6); } 25% { opacity: 1; transform: translateX(-6px) scale(1.1); } 50% { transform: translateX(6px) scale(1.1); } 75% { transform: translateX(-3px) scale(1.05); } 100% { opacity: 0; transform: translateX(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .ms-card.ok, .ms-fx, .ms-teacher.cheer .ms-spark { animation: none !important; } .ms-fx { opacity: 0; } }

/* v4: typing, writing, listening, poetry */
.ms-typerow { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.ms-typein { flex: 1; min-height: 52px; font-size: 1.15rem; font-family: inherit; padding: 8px 14px; border: 2px solid #d8c9a8; border-radius: 12px; background: #fffdf7; }
.ms-typein:focus { outline: 3px solid #f2b13466; border-color: #1f8a8a; }
.ms-writebox { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 1.1rem; line-height: 1.9; padding: 12px 14px; border: 2px solid #d8c9a8; border-radius: 12px; background: #fffdf7; resize: vertical; }
.ms-writebox:focus { outline: 3px solid #f2b13466; border-color: #1f8a8a; }
.ms-poem { text-align: center; margin: 8px 0 14px; }
.ms-verse { font-size: 1.35rem; line-height: 2.2; margin: 2px 0; }
.ms-listen { margin: 12px 0; }
.ms-details { margin: 10px 0; }
.ms-details summary { cursor: pointer; color: #1f8a8a; font-weight: 600; min-height: 44px; }
.ms-speak { display: inline-flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.ms-written { background: #f4fbf6; border: 1px solid #bfe3c9; border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.ms-written p { white-space: pre-wrap; margin: 6px 0 0; }

/* ===== real textbook art + 3D depth (v4) ===== */
.ms-art { margin: 10px 0 14px; }
.ms-art img { display: block; width: 100%; max-height: 300px; object-fit: contain; background: #fff;
  border-radius: 18px; border: 1px solid var(--ds-hairline);
  box-shadow: 0 16px 26px -14px rgba(16,26,51,.55), 0 4px 0 #ece5d8, 0 1px 0 #fff inset;
  transform: perspective(1000px) rotateX(2deg); transition: transform .35s ease; }
.ms-art img:hover { transform: perspective(1000px) rotateX(0) translateY(-2px); }
.ms-art figcaption { font-size: 13px; color: var(--ds-ink-2); margin-top: 7px; line-height: 1.7; }
.ms-art.mini img { max-height: none; height: 132px; object-fit: cover; object-position: center 30%; }
.ms-art.mini figcaption { display: none; }
.app-body { perspective: 1400px; }
.hero { transform: perspective(1200px) rotateX(1.2deg); box-shadow: 0 10px 0 #101a33, 0 22px 34px -18px rgba(16,26,51,.75); }
.mission, .ms-card, .badge, .subj { box-shadow: 0 1px 0 #fff inset, 0 12px 22px -16px rgba(16,26,51,.6); }
.mission { transition: transform .3s ease; }
.btn { box-shadow: 0 4px 0 rgba(16,26,51,.35), 0 12px 18px -12px rgba(16,26,51,.65); transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(16,26,51,.35); }
.cards .subj { transform: perspective(900px) rotateX(2.5deg); transition: transform .25s ease; }
.cards .subj:hover { transform: perspective(900px) rotateX(0); }
.credits li { margin: 8px 0; line-height: 1.8; }
@media (prefers-reduced-motion: reduce) { .ms-art img, .hero, .cards .subj, .mission { transform: none !important; } }
.footlinks { text-align: center; padding: 6px 0 14px; font-size: 14px; }
.footlinks a { color: var(--ds-ink-2); }
.ms-mic { display: inline-flex; flex-direction: column; }
.ms-mic .ms-cap, .ms-mic span { font-size: 12px; }

/* ---- v5: recorded audio player, read-along, offline audio card ---- */
.v5-player { border: 1.5px solid var(--ds-hairline); border-radius: 14px; padding: 10px 12px; margin: 10px 0; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.v5-player.compact { padding: 8px 10px; }
.v5-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.v5-row .btn { flex: 0 0 auto; }
.v5-bar { height: 8px; background: #ece7dc; border-radius: 99px; overflow: hidden; }
.v5-fill { height: 100%; background: var(--ds-teal); border-radius: 99px; transition: width .2s linear; }
.v5-time { font-size: 13px; color: var(--ds-ink-2); }
.v5-sent { font-size: 1.3rem; line-height: 2.2; background: #fffdf7; border-radius: 12px; padding: 10px 12px; margin: 0; }
.v5-word { display: inline-block; padding: 0 3px; border-radius: 7px; }
.v5-word.ok { background: #d7f5e6; }
.v5-word.miss { background: #ffe1e1; text-decoration: underline wavy #c0392b; }
.v5-missed { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.v5-pill { border: 1.5px solid var(--ds-hairline); border-radius: 99px; padding: 4px 10px; background: #fff; font: inherit; font-size: 15px; min-height: 36px; }
.v5-pill:active { background: #f3efe4; }
@media (max-width: 420px) { .v5-sent { font-size: 1.15rem; } .v5-row .btn { flex: 1 1 auto; } }

/* v6: larger text for a 4th grader (min 16px everywhere, 18px for main text) */
.app-body, .app-body p, .app-body li, .app-body td, .app-body th, .app-body label { font-size: 18px; line-height: 1.8; }
.caption, .closing, .field span, .ms-chip span, .ms-tag, .ms-badge, .stats span, .lessons .kind, .lessons .st, .hero small, .hero span, .warn, .tag, .btn.compact, .prog-h, .unit-tabs a, .unit-tabs button, .profbar, .profbar *, .ms-phases span, .app-body small, .app-body .caption { font-size: 16px !important; }
.warn { line-height: 1.7; }
.btn, .btn.compact, button.btn { min-height: 52px; font-size: 18px; }
.btn.compact { font-size: 16px !important; }
.ms-opt, .ms-word { font-size: 20px; }
.app-body table { font-size: 16px; }
.footlinks, .footlinks a, .v5-time, .v5-row, .v5-row * { font-size: 16px !important; }
