/* منصة أحمد — التصميم
   فكرة الهوية: دفتر الخط الإنجليزي (السطور الأربعة) + ملصقات + أزرار لها سُمك تُضغط */

:root {
  --ink: #1B2559; --ink-2: #56608C; --ink-3: #8A93B8;
  --paper: #F3F6FE; --card: #FFFFFF; --line: #E2E8F8; --line-2: #CBD5F0;
  --blue: #2F6BFF; --blue-d: #1B4FD1; --blue-l: #E6EEFF;
  --sun: #FFC21A; --sun-d: #D99A00; --sun-l: #FFF4D1;
  --green: #22B35E; --green-d: #15874A; --green-l: #DDF6E7;
  --berry: #FF4D6D; --berry-d: #D42E50; --berry-l: #FFE3E9;
  --lilac: #8B5CF6; --orange: #F97316; --sky: #0EA5E9;
  --rule: #9DB8F5; --rule-red: #FF8FA6;
  --r-lg: 28px; --r: 18px; --r-sm: 12px;
  --display: 'Baloo Bhaijaan 2', 'Rubik', system-ui, sans-serif;
  --body: 'Rubik', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --side: 250px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper);
  background-image: radial-gradient(#D6DEF5 1.2px, transparent 1.3px); background-size: 22px 22px;
  line-height: 1.6; font-size: 16px; min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0; font-weight: 800; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.hid { visibility: hidden; }
.ico { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 10px; }
[dir=ltr] { unicode-bidi: isolate; }

/* ───────── الهيكل */
.shell { display: flex; min-height: 100vh; }
.side {
  width: var(--side); flex: none; position: sticky; top: 0; height: 100vh; padding: 22px 16px;
  background: var(--card); border-inline-start: 2px solid var(--line); display: flex; flex-direction: column; gap: 22px;
}
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 48px; height: 48px; flex: none; }
.brand-t b { display: block; font-family: var(--display); font-size: 1.5rem; line-height: 1.1; font-weight: 800; }
.brand-t small { color: var(--ink-2); font-size: .82rem; }
.brand.compact { display: none; }
.brand.compact .brand-mark { width: 38px; height: 38px; }
.brand.compact b { font-size: 1.25rem; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; font-weight: 600;
  color: var(--ink-2); border: 2px solid transparent; transition: background .15s;
}
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a.on { background: var(--blue-l); color: var(--blue-d); border-color: #C6D6FF; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 28px; background: rgba(243, 246, 254, .88); backdrop-filter: blur(10px);
}
.chips { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.tchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card);
  border: 2px solid var(--line); font-weight: 700; font-size: .95rem;
}
.tchip .ico { width: 20px; height: 20px; }
.tchip.fire { color: var(--orange); } .tchip.star { color: var(--sun-d); }
.tchip.goalchip .ring { display: block; }
.tchip.goalchip b { color: var(--green-d); }
.me-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem;
  background: var(--sun-l); border: 2px solid #FFE08A; box-shadow: 0 3px 0 #FFD35A;
}
.view { width: 100%; max-width: 1040px; margin: 0 auto; padding: 8px 28px 60px; }
.tabbar { display: none; }

body.bare .side, body.bare .top, body.bare .tabbar { display: none !important; }
body.bare .view { max-width: 720px; padding-top: 24px; }

/* ───────── الأزرار ذات السُّمك */
.btn {
  --b: var(--blue); --bd: var(--blue-d); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 16px;
  background: var(--b); color: var(--fg); font-weight: 700; font-size: 1.02rem; border: 0;
  box-shadow: 0 4px 0 var(--bd); transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s;
  white-space: nowrap; user-select: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--bd); }
.btn:disabled { --b: #DCE2F2; --bd: #C3CBE2; --fg: #8A93B8; cursor: not-allowed; }
.btn.big { padding: 15px 30px; font-size: 1.12rem; border-radius: 18px; }
.btn.sm { padding: 8px 14px; font-size: .92rem; border-radius: 12px; }
.btn-blue { --b: var(--blue); --bd: var(--blue-d); }
.btn-green { --b: var(--green); --bd: var(--green-d); }
.btn-sun { --b: var(--sun); --bd: var(--sun-d); --fg: var(--ink); }
.btn-berry { --b: var(--berry); --bd: var(--berry-d); }
.btn-ghost { --b: var(--card); --bd: var(--line-2); --fg: var(--ink); border: 2px solid var(--line-2); }
.btn-round { --b: var(--card); --bd: var(--line-2); --fg: var(--blue); border: 2px solid var(--line-2); width: 60px; height: 60px; border-radius: 50%; font-size: 2rem; padding: 0; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); flex: none; }
.icon-btn:hover { background: var(--line); color: var(--ink); }

/* أزرار الاستماع */
.say {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 14px; font-weight: 600;
  background: var(--blue-l); color: var(--blue-d); border: 2px solid #C6D6FF; box-shadow: 0 3px 0 #C6D6FF;
  transition: transform .08s, box-shadow .08s; vertical-align: middle;
}
.say:active { transform: translateY(2px); box-shadow: 0 1px 0 #C6D6FF; }
.say.sm { padding: 6px; border-radius: 10px; }
.say.sm .ico { width: 18px; height: 18px; }
.say.lg { padding: 14px; border-radius: 50%; }
.say.lg .ico { width: 28px; height: 28px; }
.say.slow { background: var(--green-l); color: var(--green-d); border-color: #B5E8C9; box-shadow: 0 3px 0 #B5E8C9; }
.say.mic { background: var(--berry-l); color: var(--berry-d); border-color: #FFC2CF; box-shadow: 0 3px 0 #FFC2CF; }
.say.mic.rec, .mic-big.rec { animation: pulse 1s infinite; }
.say.on { background: var(--sun-l); color: var(--ink); border-color: #FFE08A; box-shadow: 0 3px 0 #FFE08A; }
.say.inline { padding: 4px; border-radius: 10px; margin-inline-start: 6px; }
.say.speaking, .big-say.speaking { animation: bounce .5s infinite alternate; }
.say-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }

.field {
  width: 100%; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--card);
  outline: none; transition: border-color .15s;
}
.field:focus { border-color: var(--blue); }
.field.big { font-size: 1.25rem; padding: 16px 20px; border-radius: 18px; }
.field.sm { width: auto; padding: 7px 12px; border-radius: 10px; }
.range { width: 100%; accent-color: var(--blue); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--paper); border: 2px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.center { justify-content: center; }
.notice { padding: 14px 18px; border-radius: var(--r); background: var(--sun-l); border: 2px solid #FFE08A; margin: 12px 0; }
.warn { color: var(--berry-d); font-weight: 600; }
.stars { display: inline-flex; gap: 2px; }
.stars i { color: #D5DCEF; display: inline-flex; }
.stars i .ico { width: 18px; height: 18px; fill: currentColor; }
.stars i.on { color: var(--sun); }

/* ───────── الشخصية */
.mascot { width: 120px; height: 120px; flex: none; overflow: visible; }
.mascot .eyes { transform-origin: 60px 55px; animation: blink 5s infinite; }
.m-big { width: 170px; height: 170px; }
.m-mid { width: 130px; height: 130px; margin: 0 auto; display: block; }
.m-hello { width: 150px; height: 150px; animation: float 4s ease-in-out infinite; }
.jump { animation: hop .7s ease-out 2; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes hop { 40% { transform: translateY(-24px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, .5); } 100% { box-shadow: 0 0 0 16px rgba(255, 77, 109, 0); } }
@keyframes bounce { to { transform: translateY(-3px); } }

/* ───────── الترحيب */
.ob { min-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.ob-top .progress { flex: 1; }
.ob-dots { display: flex; gap: 8px; }
.ob-dots i { width: 36px; height: 8px; border-radius: 8px; background: var(--line); }
.ob-dots i.on { background: var(--blue); }
.ob-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; padding: 20px 0; }
.ob-q { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.ob-sub { font-size: 1.1rem; color: var(--ink-2); font-weight: 600; }
.ob-hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-words { position: absolute; inset: -40px -120px; pointer-events: none; z-index: -1; }
.hero-words span {
  position: absolute; font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: var(--c, #C6D6FF); opacity: .55;
  animation: drift 7s ease-in-out infinite;
}
.hero-words span:nth-child(1) { top: 4%; left: 6%; --c: #FFB3C1; transform: rotate(-12deg); }
.hero-words span:nth-child(2) { top: 12%; right: 4%; --c: #A7F0C4; animation-delay: -2s; }
.hero-words span:nth-child(3) { top: 46%; left: -2%; --c: #C9B6FF; animation-delay: -4s; }
.hero-words span:nth-child(4) { top: 52%; right: -4%; --c: #FFD66B; animation-delay: -1s; }
.hero-words span:nth-child(5) { bottom: 6%; left: 14%; --c: #9ED8F5; animation-delay: -3s; }
.hero-words span:nth-child(6) { bottom: 2%; right: 12%; --c: #FFC09A; animation-delay: -5s; }
@keyframes drift { 50% { translate: 0 -10px; } }
.bubble {
  position: relative; background: var(--card); border: 2px solid var(--line-2); border-radius: 20px; padding: 8px 18px;
  font-family: var(--display); font-weight: 800; font-size: 1.5rem; direction: ltr; box-shadow: 0 4px 0 var(--line-2);
}
.brand-big { font-size: clamp(3rem, 9vw, 5.2rem); line-height: 1; color: var(--blue); letter-spacing: -.5px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34ch; }
.ob-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.ob-body .field.big { max-width: 420px; text-align: center; }
.avatars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; max-width: 520px; }
.av { font-size: 2rem; aspect-ratio: 1; border-radius: 18px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); transition: transform .12s; }
.av:hover { transform: translateY(-2px); }
.av.on { border-color: var(--blue); background: var(--blue-l); box-shadow: 0 3px 0 var(--blue); transform: scale(1.08); }
.age-pick { display: flex; align-items: center; gap: 28px; }
.age-num b { display: block; font-family: var(--display); font-size: 6rem; line-height: 1; color: var(--blue); }
.age-num span { color: var(--ink-2); font-weight: 600; }
.ob-body .range { max-width: 420px; }
.group-note { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 8px 20px; color: var(--ink-2); }
.group-note b { color: var(--ink); }
.levels { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; }
.lvl {
  display: flex; align-items: center; gap: 16px; text-align: start; padding: 14px 18px; border-radius: 20px; background: var(--card);
  border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); transition: transform .1s; width: 100%;
}
.lvl:hover { transform: translateY(-2px); }
.lvl.on { border-color: var(--c); box-shadow: 0 4px 0 var(--c); background: color-mix(in srgb, var(--c) 8%, white); }
.lvl-ico { font-size: 2.2rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--c) 14%, white); flex: none; }
.lvl b { display: block; font-size: 1.08rem; }
.lvl small { color: var(--ink-2); }
.goals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; max-width: 520px; }
.goal { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; border-radius: 20px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.goal b { font-family: var(--display); font-size: 1.4rem; }
.goal small { color: var(--ink-2); }
.goal em { font-style: normal; font-weight: 700; color: var(--green-d); }
.goal.on { border-color: var(--green); box-shadow: 0 4px 0 var(--green); background: var(--green-l); }
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; width: 100%; }
.prof { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px; border-radius: 22px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); transition: transform .12s; }
.prof:hover { transform: translateY(-3px); border-color: var(--blue); }
.prof-av { font-size: 3rem; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: var(--sun-l); }
.prof.add .prof-av { background: var(--blue-l); color: var(--blue); font-weight: 700; }
.prof small { color: var(--ink-2); font-size: .82rem; }

/* ───────── التقدّم */
.progress { height: 16px; border-radius: 99px; background: var(--line); overflow: hidden; flex: 1; }
.progress i { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--green)); background-image: linear-gradient(transparent 30%, rgba(255, 255, 255, .35) 30% 50%, transparent 50%); transition: width .4s cubic-bezier(.3, 1.4, .5, 1); }

/* ───────── الرئيسية */
.hello {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 32px; margin-top: 8px;
  background: var(--blue); color: #fff; border-radius: var(--r-lg); box-shadow: 0 6px 0 var(--blue-d); position: relative; overflow: hidden;
}
.hello::before { content: 'Hello  Hi  Welcome  Great  Learn  Play  Read  Speak'; position: absolute; inset: auto -20px -18px auto; font-family: var(--display); font-size: 4.5rem; font-weight: 800; white-space: nowrap; color: rgba(255, 255, 255, .07); direction: ltr; pointer-events: none; }
.hello-text { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; position: relative; }
.hello-text .muted { color: #C9D8FF; }
.hello-text h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.hello-text p { color: #E3EBFF; margin-bottom: 10px; }
.hello .mascot path:first-child { fill: #fff; }
.hello .mascot path:nth-child(2) { fill: #DCE7FF; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.stat > span { color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.stat-ring { position: relative; display: grid; place-items: center; }
.stat-ring b { position: absolute; font-size: .95rem; }
.stat-big { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 2.1rem; font-weight: 800; line-height: 58px; }
.stat-big small { font-size: 1.1rem; color: var(--ink-3); }
.stat-big .ico { width: 30px; height: 30px; }
.stat-big.fire { color: var(--orange); } .stat-big.star { color: var(--sun-d); }
.stat-big.star .ico { fill: var(--sun); stroke: var(--sun-d); }
.wod {
  display: flex; align-items: center; gap: 20px; padding: 18px 24px; border-radius: var(--r-lg); background: var(--card);
  border: 2px solid var(--line); position: relative;
}
.wod-label { position: absolute; top: -13px; inset-inline-start: 22px; background: var(--c); color: #fff; font-size: .82rem; font-weight: 700; padding: 2px 12px; border-radius: 99px; }
.wod-emoji { font-size: 3.4rem; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 24px; background: color-mix(in srgb, var(--c) 14%, white); flex: none; }
.wod-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.wod-word { font-family: var(--display); font-size: 2.2rem; font-weight: 800; color: var(--ink); }
.wod-ar { font-size: 1.2rem; font-weight: 600; color: var(--ink-2); }
.wod-ex { width: 100%; color: var(--ink-2); text-align: end; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 34px; }
.q { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: var(--r); background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); transition: transform .12s; }
.q:hover { transform: translateY(-3px); }
.q .ico { width: 34px; height: 34px; padding: 6px; border-radius: 12px; margin-bottom: 6px; box-sizing: content-box; }
.q-game .ico { background: var(--berry-l); color: var(--berry-d); }
.q-book .ico { background: var(--sun-l); color: var(--sun-d); }
.q-mic .ico { background: var(--green-l); color: var(--green-d); }
.q small { color: var(--ink-2); }
.sec-title { font-size: 1.6rem; text-align: center; margin-bottom: 6px; }

/* طريق التعلم المتعرّج */
.path { display: flex; flex-direction: column; align-items: center; padding-bottom: 30px; position: relative; }
.lv-head {
  display: flex; flex-direction: column; align-items: center; gap: 0; margin: 26px 0 14px; padding: 12px 34px; border-radius: 22px;
  background: var(--c); color: #fff; box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 70%, black); text-align: center; min-width: 260px;
}
.lv-head h2 { font-size: 1.6rem; }
.lv-n, .lv-en { font-size: .85rem; opacity: .9; font-weight: 600; }
.lv-head.flat { flex-direction: row; gap: 14px; min-width: 0; padding: 8px 22px; margin: 24px 0 12px; box-shadow: none; display: inline-flex; }
.lv-head.flat h2 { font-size: 1.2rem; }
.node-row { transform: translateX(var(--x)); margin: 6px 0; }
.node { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 150px; text-align: center; position: relative; }
.node-btn {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; background: var(--c);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 65%, black), inset 0 -6px 0 rgba(0, 0, 0, .08); transition: transform .1s, box-shadow .1s;
  border: 5px solid #fff; outline: 3px solid color-mix(in srgb, var(--c) 35%, white);
}
.node:hover .node-btn { transform: translateY(-2px); }
.node:active .node-btn { transform: translateY(5px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 65%, black); }
.node.locked .node-btn { background: #DCE2F2; box-shadow: 0 7px 0 #BFC8E2; outline-color: var(--line); color: #98A2C4; }
.node.locked .node-btn .ico { width: 30px; height: 30px; }
.node.locked .node-t, .node.locked .node-en { color: var(--ink-3); }
.node-t { font-weight: 700; margin-top: 2px; line-height: 1.2; }
.node-en { font-size: .8rem; color: var(--ink-2); line-height: 1.2; }
.node.current { margin-top: 30px; }
.node.current .node-btn { animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { outline-width: 9px; outline-color: color-mix(in srgb, var(--c) 30%, transparent); } }
.here {
  position: absolute; top: -34px; background: var(--card); border: 2px solid var(--line-2); color: var(--blue-d); font-weight: 800; font-size: .85rem;
  padding: 2px 12px; border-radius: 12px; white-space: nowrap; animation: bounce .7s infinite alternate; z-index: 2;
}
.here::after { content: ''; position: absolute; bottom: -7px; left: 50%; width: 10px; height: 10px; background: var(--card); border: 2px solid var(--line-2); border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); }
.path-end { display: flex; flex-direction: column; align-items: center; font-size: 3rem; margin-top: 20px; }
.path-end span { font-size: 1rem; color: var(--ink-2); font-weight: 600; }

/* ───────── الدرس: بطاقة على سطور دفتر الخط */
.lesson, .quiz, .reader, .game { max-width: 760px; margin: 0 auto; }
.lesson-top { display: flex; align-items: center; gap: 14px; margin: 8px 0 14px; }
.lesson-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.flash, .lab {
  background: var(--card); border-radius: var(--r-lg); padding: 30px 28px 24px; text-align: center; border: 2px solid var(--line);
  box-shadow: 0 6px 0 var(--line); display: flex; flex-direction: column; align-items: center; gap: 14px; position: relative;
  border-top: 10px solid var(--c);
}
.sticker {
  font-size: 5.2rem; line-height: 1; width: 150px; height: 150px; display: grid; place-items: center; border-radius: 40px;
  background: color-mix(in srgb, var(--c) 15%, white); animation: pop .45s cubic-bezier(.3, 1.6, .5, 1);
  filter: drop-shadow(0 3px 0 rgba(27, 37, 89, .08));
}
@keyframes pop { from { transform: scale(.6) rotate(-8deg); opacity: 0; } }
.ruled {
  width: 100%; max-width: 560px; padding: 6px 12px;
  background:
    linear-gradient(var(--rule) 0 0) 0 12% / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--rule) 0 9px, transparent 9px 17px) 0 27% / 100% 2px no-repeat,
    linear-gradient(var(--rule-red) 0 0) 0 65% / 100% 2px no-repeat,
    linear-gradient(var(--rule) 0 0) 0 88% / 100% 2px no-repeat;
}
.word { font-family: var(--display); font-size: clamp(2.6rem, 8vw, 4.2rem); font-weight: 700; line-height: 1.35; color: var(--ink); padding: 0 8px; }
.word:hover { color: var(--blue); }
.tr { font-size: 1.6rem; font-weight: 700; color: var(--c); filter: brightness(.85); }
.example { display: flex; gap: 12px; align-items: flex-start; text-align: start; width: 100%; background: var(--paper); border-radius: var(--r); padding: 14px 16px; border: 2px dashed var(--line-2); }
.example > div { flex: 1; }
.ex-en { font-size: 1.15rem; font-weight: 500; text-align: left; }
.ex-en mark { background: color-mix(in srgb, var(--c) 25%, white); border-radius: 6px; padding: 0 3px; color: inherit; font-weight: 700; }
.ex-ar { color: var(--ink-2); }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.mic-res { min-height: 28px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mic-res small { color: var(--ink-2); }
.score { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 99px; font-weight: 700; }
.score b { font-family: var(--display); font-size: 1.3rem; }
.score.ok { background: var(--green-l); color: var(--green-d); }
.score.mid { background: var(--sun-l); color: #8A6200; }
.score.no { background: var(--berry-l); color: var(--berry-d); }
.listening { display: inline-flex; align-items: center; gap: 4px; color: var(--berry-d); font-weight: 600; }
.listening i { width: 5px; height: 16px; border-radius: 4px; background: var(--berry); animation: eq .8s infinite alternate; }
.listening i:nth-child(2) { animation-delay: .2s; } .listening i:nth-child(3) { animation-delay: .4s; margin-inline-end: 6px; }
@keyframes eq { from { transform: scaleY(.3); } }

/* ───────── الأسئلة */
.q-box { background: var(--card); border-radius: var(--r-lg); padding: 28px 24px; text-align: center; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.q-ask { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.q-emoji { font-size: 6rem; line-height: 1.1; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.q-emoji.sm { font-size: 4rem; }
.q-word { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 2.8rem; font-weight: 800; }
.q-word.ar { font-family: var(--body); font-size: 2.2rem; color: var(--c); filter: brightness(.85); }
.q-sent { font-size: 1.35rem; font-weight: 500; line-height: 1.8; }
.q-hint { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.q-ar { font-size: 1.2rem; color: var(--ink-2); }
.q-title { font-size: 1.9rem; }
.blank { display: inline-block; min-width: 80px; border-bottom: 3px solid var(--c, var(--blue)); color: var(--c, var(--blue)); font-weight: 700; }
.big-say {
  width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff;
  box-shadow: 0 6px 0 var(--blue-d); transition: transform .08s, box-shadow .08s;
}
.big-say .ico { width: 52px; height: 52px; }
.big-say:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--blue-d); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opts.pics { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.opt {
  padding: 16px 14px; border-radius: 18px; background: var(--card); border: 2px solid var(--line-2); box-shadow: 0 4px 0 var(--line-2);
  font-weight: 600; font-size: 1.15rem; transition: transform .08s, box-shadow .08s, background .15s;
}
.opt.en { font-family: var(--display); font-size: 1.45rem; font-weight: 700; }
.opt.pic { font-size: 3.6rem; padding: 14px; }
.opt.pic2 { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 3.4rem; line-height: 1.2; }
.opt.pic2 small { font-size: .95rem; font-family: var(--display); }
.opt:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-l); }
.opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line-2); }
.opt:disabled { cursor: default; }
.opt.right { background: var(--green-l); border-color: var(--green); box-shadow: 0 4px 0 var(--green); color: var(--green-d); animation: pop .3s; }
.opt.wrong { background: var(--berry-l); border-color: var(--berry); box-shadow: 0 4px 0 var(--berry); color: var(--berry-d); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.kidq .opt.en { font-size: 1.7rem; }
.feedback { position: fixed; inset: auto 0 0 0; transform: translateY(110%); transition: transform .25s cubic-bezier(.3, 1.3, .5, 1); z-index: 40; }
.feedback.show { transform: none; }
.feedback .fb-in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); }
.feedback.ok { background: var(--green-l); border-top: 3px solid var(--green); }
.feedback.no { background: var(--berry-l); border-top: 3px solid var(--berry); }
.fb-txt { font-size: 1.2rem; }
.fb-txt b { font-family: var(--display); font-size: 1.5rem; margin-inline-end: 8px; }
.feedback.ok .fb-txt { color: var(--green-d); } .feedback.no .fb-txt { color: var(--berry-d); }

/* التهجئة */
.slots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.slot { width: 52px; height: 60px; border-radius: 14px; border: 3px dashed var(--line-2); display: grid; place-items: center; font-family: var(--display); font-size: 2rem; font-weight: 800; cursor: pointer; }
.slot.fill { border-style: solid; border-color: var(--blue); background: var(--blue-l); }
.slot.good { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.slot.bad { border-color: var(--berry); background: var(--berry-l); color: var(--berry-d); }
.tiles { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tile {
  width: 56px; height: 60px; border-radius: 14px; background: var(--sun); box-shadow: 0 5px 0 var(--sun-d); font-family: var(--display);
  font-size: 2rem; font-weight: 800; color: var(--ink); transition: transform .08s, opacity .15s;
}
.tile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sun-d); }
.tile.used { opacity: .2; pointer-events: none; }

/* النتيجة */
.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px 0; }
.result h2 { font-size: 2rem; }
.big-stars .stars i .ico { width: 64px; height: 64px; }
.big-stars .stars i.on { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.big-stars .stars i:nth-child(2) { animation-delay: .15s; } .big-stars .stars i:nth-child(3) { animation-delay: .3s; }
.big-stars .stars i:nth-child(2) .ico { width: 84px; height: 84px; transform: translateY(-14px); }
.res-stats { display: flex; gap: 14px; }
.res-stats div { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 24px; display: flex; flex-direction: column; }
.res-stats b { font-family: var(--display); font-size: 2rem; color: var(--c, var(--blue)); line-height: 1.2; }
.res-stats span { color: var(--ink-2); font-size: .9rem; }
.res-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cover-big { font-size: 5rem; }

/* ───────── رؤوس الصفحات */
.page-head { margin: 10px 0 22px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.page-head p { color: var(--ink-2); max-width: 62ch; }
.page-head .btn { margin-top: 6px; }
.src { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; margin: 8px 0 12px; }
.back-link .ico { width: 18px; height: 18px; }
.done-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--green-d); font-weight: 700; font-size: .85rem; }
.done-tag .ico { width: 18px; height: 18px; }

/* ───────── الحروف */
.abc { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.letter {
  aspect-ratio: 1; border-radius: 22px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; transition: transform .1s; position: relative;
}
.letter b { font-family: var(--display); font-size: 2.4rem; font-weight: 800; color: var(--c); line-height: 1.1; }
.letter span { font-size: 1.6rem; }
.letter:hover { transform: translateY(-3px); }
.letter.heard::after { content: ''; position: absolute; top: 8px; inset-inline-end: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.letter.sing { transform: scale(1.12); background: var(--c); }
.letter.sing b { color: #fff; }
.letter-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.lc-top { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.lc-big { font-family: var(--display); font-size: 7rem; font-weight: 800; line-height: 1; color: var(--blue); }
.lc-big small { font-size: 4.5rem; color: var(--berry); margin-inline-start: 6px; }
.lc-word { display: flex; flex-direction: column; align-items: center; --c: var(--sun); }
.lc-word .sticker { width: 100px; height: 100px; font-size: 3.6rem; border-radius: 28px; }
.lc-word .word { font-size: 2.2rem; }
.lc-line { font-family: var(--display); font-size: 1.6rem; font-weight: 700; }
.trace {
  position: relative; width: 100%; height: 190px; border-radius: 20px; background: #FBFCFF; border: 2px solid var(--line); overflow: hidden;
  background-image:
    linear-gradient(var(--rule) 0 0), repeating-linear-gradient(90deg, var(--rule) 0 9px, transparent 9px 17px),
    linear-gradient(var(--rule-red) 0 0), linear-gradient(var(--rule) 0 0);
  background-size: 100% 2px; background-repeat: no-repeat; background-position: 0 18%, 0 45%, 0 74%, 0 92%;
}
.trace .ghost { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 150px; font-weight: 700; color: rgba(47, 107, 255, .13); line-height: 1; pointer-events: none; padding-top: 12px; }
.trace canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

/* ───────── القصص */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.story-card {
  display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--r-lg); background: var(--card); border: 2px solid var(--line);
  box-shadow: 0 5px 0 var(--line); transition: transform .12s; align-items: flex-start;
}
.story-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.cover { font-size: 3.4rem; width: 100%; height: 120px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--c) 18%, white); margin-bottom: 8px; }
.story-card b { font-size: 1.2rem; }
.story-card .chip { margin-top: 6px; }
.story-title { font-size: 1.6rem; text-align: center; margin-bottom: 12px; }
.story-title small { display: block; font-size: 1rem; color: var(--ink-2); font-weight: 600; }
.page { background: var(--card); border-radius: var(--r-lg); padding: 30px; text-align: center; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.page.reading { border-color: var(--c); box-shadow: 0 6px 0 var(--c); }
.page-art { font-size: 6rem; line-height: 1.1; width: 180px; height: 160px; display: grid; place-items: center; border-radius: 40px; background: color-mix(in srgb, var(--c) 16%, white); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.page-en { font-family: var(--display); font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 600; line-height: 1.55; max-width: 26ch; }
.w { cursor: pointer; border-radius: 8px; padding: 0 2px; transition: background .12s; }
.w:hover, .w.speaking { background: var(--sun-l); color: var(--blue-d); }
.page-ar { font-size: 1.2rem; color: var(--ink-2); }
.reader-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }

/* ───────── القواعد */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rule-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--r); background: var(--card); border: 2px solid var(--line); border-inline-start: 6px solid var(--c); position: relative; transition: transform .12s; }
.rule-card:hover { transform: translateY(-3px); }
.rule-card span { color: var(--ink-2); font-size: .9rem; text-align: end; }
.rule-card em { position: absolute; top: 12px; inset-inline-end: 14px; font-style: normal; font-size: .8rem; font-weight: 700; padding: 1px 10px; border-radius: 99px; background: var(--paper); color: var(--ink-3); }
.rule-card em.ok { background: var(--green-l); color: var(--green-d); }
.rule-card b { padding-inline-end: 56px; }
.gram { max-width: 800px; margin: 0 auto; }
.gram h1 { font-size: 2.1rem; }
.gram h2 { font-size: 1.4rem; margin: 26px 0 10px; }
.gram-intro { font-size: 1.12rem; margin: 16px 0; max-width: 68ch; }
.gram-intro b { color: var(--c); }
.form-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; }
.form-table th, .form-table td { padding: 12px 16px; border-bottom: 2px solid var(--line); text-align: start; vertical-align: middle; }
.form-table tr:last-child > * { border-bottom: 0; }
.form-table th { background: color-mix(in srgb, var(--c) 10%, white); color: var(--ink); width: 28%; }
.form-table td[dir=ltr] { text-align: left; font-weight: 500; }
.form-table td[dir=ltr] .say { margin-inline-start: 6px; }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r); background: var(--sun-l); border: 2px solid #FFE08A; margin-top: 16px; }
.tip .ico { color: var(--sun-d); }
.ex-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ex-list li { display: flex; gap: 12px; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
.ex-list li > div { flex: 1; }
.ex-list p[dir=ltr] { font-size: 1.12rem; font-weight: 500; text-align: left; }
.g-quiz { display: flex; flex-direction: column; gap: 12px; }
.gq { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.gq > p { font-size: 1.2rem; font-weight: 500; text-align: left; margin-bottom: 10px; }
.gq-opts { display: flex; flex-wrap: wrap; gap: 8px; direction: ltr; }
.chipbtn { padding: 8px 16px; border-radius: 12px; background: var(--paper); border: 2px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); font-weight: 600; font-size: 1.05rem; transition: transform .08s; }
.chipbtn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line-2); }
.chipbtn:disabled { opacity: .25; }
.chipbtn.right { background: var(--green-l); border-color: var(--green); color: var(--green-d); box-shadow: 0 3px 0 var(--green); }
.chipbtn.wrong { background: var(--berry-l); border-color: var(--berry); color: var(--berry-d); box-shadow: 0 3px 0 var(--berry); }
.g-score { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; padding: 18px 22px; border-radius: var(--r); background: var(--berry-l); border: 2px solid #FFC2CF; }
.g-score.ok { background: var(--green-l); border-color: #B5E8C9; }
.g-score b { font-family: var(--display); font-size: 2.2rem; }
.g-score span { flex: 1; font-weight: 600; }

/* ───────── المحادثات */
.talk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.talk-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); flex-wrap: wrap; transition: transform .12s; }
.talk-card:hover { transform: translateY(-3px); }
.talk-card > div { flex: 1; display: flex; flex-direction: column; }
.t-emoji { font-size: 2.2rem; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--c) 14%, white); }
.dialog { max-width: 780px; margin: 0 auto; }
.dialog h1 { font-size: 1.9rem; }
.dialog h1 small { font-size: 1rem; color: var(--ink-2); font-weight: 600; margin-inline-start: 8px; }
.d-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 20px; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; align-items: flex-end; gap: 10px; max-width: 88%; }
.msg.A { align-self: flex-end; flex-direction: row-reverse; }
.msg.B { align-self: flex-start; flex-direction: row-reverse; }
.msg.B { direction: ltr; }
.who { font-size: 1.8rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 2px solid var(--line); flex: none; }
.bub { padding: 12px 16px; border-radius: 20px; background: var(--card); border: 2px solid var(--line); direction: rtl; }
.msg.A .bub { border-end-start-radius: 6px; }
.msg.B .bub { background: var(--blue-l); border-color: #C6D6FF; border-end-end-radius: 6px; }
.bub p[dir=ltr] { font-size: 1.12rem; font-weight: 500; text-align: left; transition: filter .3s; }
.bub .ar { color: var(--ink-2); font-size: .95rem; }
.bub .blurred { filter: blur(6px); }
.msg.now .bub { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.rec-out:empty { display: none; }
.rec-out { margin-top: 6px; }

/* ───────── مختبر النطق والقاموس */
.lab .ruled { max-width: 480px; }
.mic-big {
  width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: var(--berry); color: #fff;
  box-shadow: 0 6px 0 var(--berry-d); transition: transform .08s;
}
.mic-big .ico { width: 48px; height: 48px; }
.mic-big:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--berry-d); }
.free { margin-top: 28px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.free h2 { font-size: 1.3rem; margin-bottom: 12px; }
.free-row { display: flex; gap: 8px; flex-wrap: wrap; }
.free-row .field { flex: 1 1 260px; }
.free .mic-res { margin-top: 10px; }
.dict-search { position: relative; }
.dict-search > .ico { position: absolute; inset-inline-start: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.dict-search .field { padding-inline-start: 52px; }
.results { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 28px; }
.entry { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--r); background: var(--card); border: 2px solid var(--line); }
.e-emoji { font-size: 2rem; width: 52px; text-align: center; }
.e-main { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.e-main b { font-family: var(--display); font-size: 1.4rem; }
.e-main small { width: 100%; color: var(--ink-2); text-align: left; }
.e-say { display: flex; gap: 6px; }
.e-say .say { font-size: 1.2rem; padding: 4px 8px; }
.translator { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.tr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tr-head h2 { font-size: 1.35rem; }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tr-cols textarea { resize: vertical; min-height: 120px; }
.tr-out { border-radius: 14px; background: var(--paper); border: 2px dashed var(--line-2); padding: 12px 16px; font-size: 1.12rem; min-height: 120px; }
.tr-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* ───────── ملفي */
.me-head { display: flex; align-items: center; gap: 18px; margin: 10px 0 4px; flex-wrap: wrap; }
.me-head > div { flex: 1; }
.me-head h1 { font-size: 2.2rem; }
.me-av { font-size: 3.4rem; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: var(--sun-l); border: 3px solid #FFE08A; }
.panel { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 18px; }
.panel h2 { font-size: 1.35rem; margin-bottom: 14px; }
.bars { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 200px; align-items: end; padding-bottom: 30px; }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; position: relative; }
.bar i { width: 70%; max-width: 44px; border-radius: 10px 10px 4px 4px; background: #C6D6FF; display: block; max-height: 78%; }
.bar.hit i { background: var(--green); }
.bar em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.bar span { position: absolute; bottom: -28px; font-size: .85rem; color: var(--ink-2); }
.goal-line { position: absolute; inset-inline: 0; border-top: 2px dashed var(--sun-d); pointer-events: none; }
.goal-line span { position: absolute; top: -22px; inset-inline-end: 0; font-size: .75rem; font-weight: 700; color: var(--sun-d); background: var(--card); padding: 0 6px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 10px; border-radius: var(--r); background: var(--paper); border: 2px solid var(--line); filter: grayscale(1); opacity: .55; }
.badge span { font-size: 2.2rem; }
.badge small { color: var(--ink-2); font-size: .8rem; }
.badge.got { filter: none; opacity: 1; background: var(--sun-l); border-color: #FFE08A; }
.settings .set { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.settings .set:last-child { border-bottom: 0; }
.set small { display: block; color: var(--ink-2); font-size: .85rem; }
.set .range { width: 180px; }
.set.danger b { color: var(--berry-d); }
.seg { display: inline-flex; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 3px; gap: 3px; }
.seg button { padding: 7px 14px; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--card); color: var(--blue-d); box-shadow: 0 2px 0 var(--line-2); }
.switch { position: relative; width: 54px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(-24px); }
.switch input:focus-visible + i { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ───────── الألعاب */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.game-card {
  display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: var(--r-lg); background: var(--c); color: #fff;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 65%, black); transition: transform .12s; position: relative; overflow: hidden; min-height: 200px;
}
.game-card:hover { transform: translateY(-4px) rotate(.6deg); }
.game-card:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 65%, black); }
.g-icon { font-size: 3.2rem; line-height: 1.1; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .12)); }
.game-card b { font-family: var(--display); font-size: 1.5rem; }
.game-card small { opacity: .92; flex: 1; }
.best { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .22); padding: 3px 12px; border-radius: 99px; font-weight: 700; font-size: .85rem; align-self: flex-start; }
.best .ico { width: 16px; height: 16px; fill: currentColor; }
.game-card[style*="FFC21A"] { color: var(--ink); }
.game-top { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; flex-wrap: wrap; }
.game-top h1 { font-size: 1.5rem; flex: 1; }
.hud { display: flex; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 99px; background: var(--card); border: 2px solid var(--line); font-weight: 700; }
.pill .ico { width: 18px; height: 18px; fill: var(--sun); stroke: var(--sun-d); }
.lives { font-size: 1.2rem; letter-spacing: 2px; }

/* البالونات */
.sky { position: relative; height: min(68vh, 560px); border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(#BFE3FF, #EAF6FF 70%); border: 2px solid #A9D6FA; }
.sky::before, .sky::after { content: '☁️'; position: absolute; font-size: 4rem; opacity: .8; top: 12%; left: 8%; animation: cloud 30s linear infinite; }
.sky::after { top: 30%; left: 60%; font-size: 3rem; animation-duration: 42s; }
@keyframes cloud { to { translate: 40vw 0; } }
.target { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 10px; background: var(--card); padding: 10px 18px; border-radius: 20px; box-shadow: 0 4px 0 var(--line-2); }
.target .big-say { width: 72px; height: 72px; }
.target .big-say .ico { width: 36px; height: 36px; }
.t-ar { font-size: 1.5rem; font-weight: 700; }
.balloon {
  position: absolute; bottom: -170px; left: var(--l); width: 120px; height: 150px; animation: rise var(--d) linear var(--dl) forwards;
  display: flex; flex-direction: column; align-items: center;
}
.balloon span {
  width: 116px; height: 136px; border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%; background: var(--b); display: grid; place-items: center;
  font-size: 2.8rem; color: #fff; font-family: var(--display); font-weight: 800; box-shadow: inset -12px -14px 0 rgba(0, 0, 0, .12), inset 10px 10px 0 rgba(255, 255, 255, .25);
  padding: 8px; line-height: 1.1; word-break: break-word;
}
body:not(.kid) .balloon span { font-size: 1.35rem; }
.balloon i { width: 2px; height: 40px; background: #7D8AB5; }
.balloon.popped { animation: popped .3s forwards; }
.balloon.shake span { animation: shake .4s; }
@keyframes rise { to { transform: translateY(calc(-1 * min(68vh, 560px) - 190px)); } }
@keyframes popped { to { transform: scale(1.6); opacity: 0; } }
.grass { position: absolute; bottom: 0; inset-inline: 0; height: 24px; background: #7BD389; border-top: 4px solid #5CBF6C; }

/* الذاكرة */
.mem { display: grid; gap: 12px; perspective: 900px; max-width: 560px; margin: 0 auto; }
.mem-4 { grid-template-columns: repeat(4, 1fr); }
.mem-6 { grid-template-columns: repeat(4, 1fr); }
.mcard { aspect-ratio: 3/3.4; position: relative; transform-style: preserve-3d; transition: transform .45s; }
.mcard span { position: absolute; inset: 0; border-radius: 18px; display: grid; place-items: center; backface-visibility: hidden; padding: 6px; }
.back { background: var(--c); color: #fff; font-family: var(--display); font-size: 2.6rem; font-weight: 800; box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 65%, black); background-image: radial-gradient(rgba(255, 255, 255, .18) 2px, transparent 2.5px); background-size: 16px 16px; }
.front { background: var(--card); border: 2px solid var(--line-2); transform: rotateY(180deg); box-shadow: 0 5px 0 var(--line-2); }
.front.pic { font-size: 3rem; }
.front.txt { font-family: var(--display); font-size: 1.3rem; font-weight: 700; text-align: center; line-height: 1.2; }
.mcard.flip { transform: rotateY(180deg); }
.mcard.match .front { background: var(--green-l); border-color: var(--green); box-shadow: 0 5px 0 var(--green); }

/* السرعة */
.speed { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.clock { position: relative; width: 110px; height: 110px; display: grid; place-items: center; }
.clock svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.c-bg { fill: var(--card); stroke: var(--line); stroke-width: 8; }
.c-fg { fill: none; stroke: var(--orange); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.clock b { font-family: var(--display); font-size: 2.4rem; position: relative; }
.clock.hurry b { color: var(--berry); animation: bounce .5s infinite alternate; }
.clock.hurry .c-fg { stroke: var(--berry); }
.speed .q-box { width: 100%; }

/* ترتيب الجملة */
.build { min-height: 66px; width: 100%; border-radius: 16px; border: 3px dashed var(--line-2); padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.build.good { border-style: solid; border-color: var(--green); background: var(--green-l); }
.build.bad { border-style: solid; border-color: var(--berry); background: var(--berry-l); }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chipbtn.in { background: var(--blue-l); border-color: #C6D6FF; }
.answer { font-weight: 700; color: var(--green-d); font-size: 1.15rem; }

/* ───────── منبثقات */
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(27, 37, 89, .25); animation: tin .3s cubic-bezier(.3, 1.4, .5, 1); transition: opacity .3s, transform .3s; }
.toast.gold { background: var(--sun); color: var(--ink); }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes tin { from { transform: translateY(-20px); opacity: 0; } }
.modal-wrap { position: fixed; inset: 0; background: rgba(27, 37, 89, .45); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border-radius: var(--r-lg); padding: 28px; max-width: 460px; width: 100%; position: relative; max-height: 92vh; overflow: auto; animation: tin .3s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 8px 0 rgba(27, 37, 89, .25); }
.modal.wide { max-width: 620px; }
.modal h2 { margin-bottom: 8px; }
.modal p { margin-bottom: 16px; }
.modal-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* ───────── وضع الأطفال: كل شيء أكبر وأكثر لعبًا */
body.kid .nav a { font-size: 1.05rem; }
body.kid .opt { font-size: 1.3rem; }
body.kid .node-btn { width: 96px; height: 96px; font-size: 2.8rem; }

/* ───────── الجوال */
@media (max-width: 900px) {
  .side { display: none; }
  .brand.compact { display: flex; }
  .brand.compact .brand-t b { font-size: 1.1rem; }
  .top { padding: 10px 16px; }
  .view { padding: 4px 16px 110px; }
  .tabbar {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 30; background: var(--card); border-top: 2px solid var(--line);
    overflow-x: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 2px; scrollbar-width: none;
  }
  .tabbar a { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; font-size: .7rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
  .tabbar a.on { color: var(--blue-d); background: var(--blue-l); }
  .tabbar .ico { width: 24px; height: 24px; }
  body:has(.feedback.show) .tabbar { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .quick { grid-template-columns: 1fr; }
  .hello { padding: 22px; }
  .m-hello { width: 100px; height: 100px; }
  .tr-cols { grid-template-columns: 1fr; }
  .chips .tchip.goalchip { display: none; }
}
@media (max-width: 560px) {
  .tchip { padding: 4px 9px; font-size: .88rem; }
  .me-btn { width: 38px; height: 38px; font-size: 1.25rem; }
  .hello { flex-direction: column-reverse; align-items: flex-start; }
  .hello-side { position: absolute; top: 12px; inset-inline-end: 12px; }
  .m-hello { width: 76px; height: 76px; }
  .hello-text .btn.big { width: 100%; white-space: normal; }
  .avatars { grid-template-columns: repeat(4, 1fr); }
  .age-pick { gap: 16px; }
  .age-num b { font-size: 4.6rem; }
  .wod { flex-wrap: wrap; padding: 18px; }
  .wod-emoji { width: 64px; height: 64px; font-size: 2.6rem; }
  .node-row { transform: translateX(calc(var(--x) * .55)); }
  .flash, .lab, .q-box, .page { padding: 22px 16px; }
  .sticker { width: 120px; height: 120px; font-size: 4.2rem; }
  .opts { grid-template-columns: 1fr; }
  .opts.pics, .opts.two { grid-template-columns: 1fr 1fr; }
  .q-emoji { font-size: 4.6rem; }
  .q-word { font-size: 2.1rem; }
  .slot { width: 38px; height: 48px; font-size: 1.5rem; }
  .tile { width: 46px; height: 52px; font-size: 1.6rem; }
  .mem-6 { grid-template-columns: repeat(3, 1fr); }
  .mem-4 { grid-template-columns: repeat(2, 1fr); }
  .balloon { width: 84px; } .balloon span { width: 82px; height: 98px; font-size: 2rem; }
  body:not(.kid) .balloon span { font-size: .95rem; }
  .lesson-nav .btn.big { padding: 13px 18px; }
  .lc-big { font-size: 5rem; } .lc-big small { font-size: 3.2rem; }
  .msg { max-width: 100%; }
  .entry { flex-wrap: wrap; }
  .entry .chip { display: none; }
  .feedback .fb-in { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .balloon { animation-duration: 12s !important; }
}
body:not(.kid) .balloon span.long { font-size: 1rem; }
@media (max-width: 560px) { body:not(.kid) .balloon span.long { font-size: .78rem; } }
@media (max-width: 560px) {
  .wod-word { font-size: 1.7rem; }
  .wod .say.lg { position: absolute; top: 14px; inset-inline-end: 14px; padding: 10px; }
  .wod-main { flex-basis: 100%; }
}

/* ───────── التهجئة وأسماء الحروف */
.spell-strip { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; align-items: center; }
.spell-strip .lt {
  min-width: 34px; height: 40px; padding: 0 6px; border-radius: 10px; background: var(--paper); border: 2px solid var(--line-2);
  box-shadow: 0 3px 0 var(--line-2); font-family: var(--display); font-size: 1.25rem; font-weight: 700; color: var(--ink); transition: transform .1s, background .1s;
}
.spell-strip .lt:hover { border-color: var(--blue); }
.spell-strip .lt.on { background: var(--sun); border-color: var(--sun-d); box-shadow: 0 3px 0 var(--sun-d); transform: translateY(-4px) scale(1.1); }
.spell-strip .gap { width: 12px; }
.spell-strip .spell-all { margin-inline-start: 8px; padding: 6px 10px; }
.letter .ln { font-size: .8rem; color: var(--ink-2); font-weight: 600; line-height: 1; margin-bottom: 2px; }
.lc-names { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lc-chip { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 18px; border-radius: 16px; background: var(--paper); border: 2px solid var(--line-2); min-width: 130px; }
button.lc-chip { background: var(--blue-l); border-color: #C6D6FF; box-shadow: 0 3px 0 #C6D6FF; color: var(--blue-d); }
.lc-chip small { color: var(--ink-2); font-size: .78rem; }
.lc-chip b { font-size: 1.6rem; line-height: 1.3; }
.lc-chip .ico { width: 18px; height: 18px; }

/* ───────── الألعاب الجديدة */
.center-t { text-align: center; margin-top: 10px; }
/* الخُلد */
.moles-top { display: flex; justify-content: center; margin-bottom: 14px; }
.target.mt { position: static; transform: none; }
.field-moles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 560px; margin: 0 auto; padding: 18px; border-radius: var(--r-lg); background: #9BD77F; border: 2px solid #7CC25D; box-shadow: inset 0 -6px 0 #7CC25D; }
.hole { position: relative; aspect-ratio: 1.15; overflow: hidden; border-radius: 0 0 50% 50% / 0 0 30% 30%; }
.hole .dirt { position: absolute; left: 6%; right: 6%; bottom: 4%; height: 30%; border-radius: 50%; background: #5B3A1E; box-shadow: inset 0 8px 0 #3E2712; z-index: 0; }
.mole { position: absolute; left: 50%; bottom: 10%; width: 78%; transform: translate(-50%, 110%); transition: transform .22s cubic-bezier(.3, 1.5, .5, 1); z-index: 1; display: flex; flex-direction: column; align-items: center; }
.mole.up { transform: translate(-50%, 8%); }
.m-face { font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1; }
.m-sign { background: #fff; border: 2px solid var(--line-2); border-radius: 10px; padding: 1px 8px; font-family: var(--display); font-weight: 700; font-size: clamp(.8rem, 2.4vw, 1.1rem); order: -1; margin-bottom: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.kid .m-sign { font-size: 1.8rem; border: 0; background: transparent; }
.mole.hit .m-sign { background: var(--green-l); border-color: var(--green); }
.mole.miss { animation: shake .4s; }
.mole.miss .m-sign { background: var(--berry-l); border-color: var(--berry); }
/* السباق */
.track { position: relative; border-radius: var(--r-lg); background: #4B5563; padding: 12px 0; margin-bottom: 16px; border: 3px solid #374151; overflow: hidden; }
.lane { position: relative; height: 64px; border-bottom: 3px dashed #FDE68A; }
.lane:last-of-type { border-bottom: 0; }
.car { position: absolute; top: 50%; transform: translateY(-50%) scaleX(-1); font-size: 2.8rem; line-height: 1; transition: inset-inline-start .6s cubic-bezier(.3, 1.2, .5, 1); z-index: 2; inset-inline-start: 0; }
.lane-t { position: absolute; inset-inline-end: 40px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .5); font-weight: 700; font-size: .85rem; }
.finish { position: absolute; top: 0; bottom: 0; inset-inline-end: 12px; width: 18px; background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0 / 9px 9px; }
/* صح أم خطأ */
.tf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 420px; }
.tf-b { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border-radius: 20px; color: #fff; font-weight: 800; font-size: 1.2rem; transition: transform .08s; }
.tf-b .ico { width: 40px; height: 40px; stroke-width: 3; }
.tf-b.yes { background: var(--green); box-shadow: 0 5px 0 var(--green-d); }
.tf-b.no { background: var(--berry); box-shadow: 0 5px 0 var(--berry-d); }
.tf-b:active { transform: translateY(3px); }
.tf-b:disabled { opacity: .45; }
.tf-b.right, .tf-b.wrong { opacity: 1; animation: pop .3s; outline: 4px solid var(--sun); }
.slot.ask { border-color: var(--c); color: var(--c); border-style: solid; background: #fff; }
/* خمّن الكلمة */
.guess { position: relative; }
.rocket-box { position: absolute; top: 16px; inset-inline-start: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rocket-box small { color: var(--ink-2); font-size: .75rem; }
.rocket { font-size: 2.6rem; transform: rotate(-45deg); display: inline-block; }
.rocket.launch { animation: launch 1.4s ease-in forwards; }
@keyframes launch { to { transform: translateY(-300px) rotate(-45deg); opacity: 0; } }
.fuel { display: flex; gap: 3px; }
.fuel i { width: 9px; height: 18px; border-radius: 3px; background: var(--line); }
.fuel i.on { background: var(--orange); }
.keys { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; width: 100%; max-width: 520px; }
.key { height: 44px; border-radius: 10px; background: var(--paper); border: 2px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); font-family: var(--display); font-size: 1.3rem; font-weight: 700; }
.key.hit { background: var(--green-l); border-color: var(--green); color: var(--green-d); }
.key.miss { background: var(--line); color: var(--ink-3); box-shadow: none; }
.key:disabled { cursor: default; }
/* البحث عن الكلمات */
.ws { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.ws-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; padding: 12px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-lg); width: min(100%, 460px); }
.ws-c { aspect-ratio: 1; border-radius: 8px; font-family: var(--display); font-size: clamp(1rem, 3.6vw, 1.45rem); font-weight: 700; background: var(--paper); transition: background .15s, transform .1s; }
.ws-c:hover { background: var(--blue-l); }
.ws-c.sel { background: var(--sun); transform: scale(1.12); }
.ws-c.found { color: #fff; }
.ws-c.f0 { background: #2F6BFF; } .ws-c.f1 { background: #22B35E; } .ws-c.f2 { background: #FF4D6D; } .ws-c.f3 { background: #8B5CF6; } .ws-c.f4 { background: #F97316; } .ws-c.f5 { background: #0891B2; }
.ws-c.shake-c { animation: shake .4s; background: var(--berry-l); }
.ws-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.ws-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); }
.ws-list li span { font-size: 1.6rem; }
.ws-list li b { font-family: var(--display); font-size: 1.15rem; }
.ws-list li small { color: var(--ink-2); flex: 1; }
.ws-list li.done { background: var(--green-l); border-color: #B5E8C9; }
.ws-list li.done b { text-decoration: line-through; text-decoration-thickness: 2px; }
@media (max-width: 560px) { .keys { grid-template-columns: repeat(7, 1fr); } .rocket-box { position: static; flex-direction: row; } .field-moles { gap: 8px; padding: 10px; } }

/* ───────── تحدي اليوم والمراجعة */
.today { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.today-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r); color: #fff; transition: transform .12s; }
.today-card:hover { transform: translateY(-3px); }
.today-card.daily { background: var(--berry); box-shadow: 0 5px 0 var(--berry-d); }
.today-card.daily.done { background: var(--green); box-shadow: 0 5px 0 var(--green-d); }
.today-card.review { background: var(--lilac); box-shadow: 0 5px 0 #6D3FD8; }
.today-card b { font-family: var(--display); font-size: 1.3rem; display: block; line-height: 1.2; }
.today-card small { opacity: .92; }
.t-ico { font-size: 2.2rem; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, .2); flex: none; }
/* لوحة الشرف */
.board { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--paper); border: 2px solid var(--line); }
.board li.me { border-color: var(--blue); background: var(--blue-l); }
.board .rank { width: 32px; text-align: center; font-size: 1.4rem; font-weight: 800; }
.board .b-av { font-size: 1.7rem; }
.board b { flex: 1; }
.board .b-w { font-weight: 700; color: var(--green-d); }
/* الشهادات */
.certs { display: flex; flex-direction: column; gap: 8px; }
.cert-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); }
.cert-row > div:not(.progress) { flex: 1; display: flex; flex-direction: column; }
.cert-row small { color: var(--ink-2); }
.cert-row .c-n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, white); color: var(--c); font-weight: 800; font-size: 1.2rem; }
.cert-row.ok { border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, white); }
.progress.sm { height: 10px; max-width: 140px; }
.cert-tools { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.cert { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 10px 30px rgba(27, 37, 89, .12); aspect-ratio: 1.414; max-width: 900px; margin: 0 auto; }
.cert-in { height: 100%; border: 4px solid var(--c); outline: 2px solid var(--c); outline-offset: 6px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 30px;
  background: radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--c) 10%, white), transparent 30%), radial-gradient(circle at 90% 90%, var(--sun-l), transparent 30%); }
.cert-brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 1.4rem; }
.cert-kicker { font-family: var(--display); font-size: 1.3rem; color: var(--ink-2); font-weight: 700; margin-top: 10px; }
.cert h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); color: var(--c); }
.cert-en { color: var(--ink-2); font-weight: 600; }
.cert-to { margin-top: 14px; color: var(--ink-2); }
.cert-name { font-family: var(--display); font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; border-bottom: 3px dashed var(--line-2); padding: 0 30px; line-height: 1.4; }
.cert-body { max-width: 52ch; margin-top: 10px; }
.cert-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; max-width: 600px; margin-top: 24px; color: var(--ink-2); font-size: .9rem; }
.seal { font-size: 2.2rem; width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 5px var(--sun-l), 0 0 0 7px var(--sun); }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .side, .top, .tabbar, .no-print, #toasts, .confetti { display: none !important; }
  .view { padding: 0; max-width: none; }
  .cert { box-shadow: none; padding: 0; max-width: none; height: 185mm; aspect-ratio: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 560px) { .today { grid-template-columns: 1fr; } .cert { aspect-ratio: auto; } }
