/* =====================================================================
   אתר ההדרכה — קדימה · styles (v2: flat, light, no color bands)
   ===================================================================== */
@font-face {
  font-family: 'Gveret Levin';
  src: url('assets/fonts/GveretLevin-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
:root {
  --orange: #F08418;
  --orange-600: #D46E08;
  --orange-700: #B35B04;
  --orange-50: #FFF4E8;
  --orange-100: #FFE5C6;
  --orange-200: #FFD2A0;
  --teal: #0E9E9C;
  --teal-50: #E6F6F5;
  --coral: #E0515A;
  --coral-50: #FCEBEC;
  --ink: #17171A;
  --ink-2: #3F3F47;
  --muted: #75757F;
  --line: #ECE5DC;
  --line-2: #F3EEE7;
  --tint: #F3F1EE;
  --bg: #FBF6EF;
  --card: #FFFFFF;
  --shadow: 0 1px 2px rgba(40, 20, 0, .05), 0 10px 30px rgba(40, 20, 0, .07);
  --shadow-sm: 0 1px 2px rgba(40, 20, 0, .06);
  --r: 18px;
  --r-sm: 12px;
  --font: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Secular One', 'Heebo', sans-serif;
  --font-hand: 'Gveret Levin', 'Secular One', 'Heebo', sans-serif;
  --topbar-h: 64px;
  --bottombar-h: 64px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
/* overflow-x: clip is not supported on older Android browsers (Samsung Internet), and without it the
   full-bleed rows below turn into real horizontal scrolling — hidden first, clip for browsers that have it */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overscroll-behavior-x: none; }
body {
  margin: 0; overflow-x: hidden; overflow-x: clip; max-width: 100%; font-family: var(--font); font-size: 17px; line-height: 1.55;
  color: var(--ink); background: var(--bg) url('assets/pattern.svg') top center / 1100px 760px repeat;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select { font: inherit; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { height: 42px; width: auto; }
.brand__text { font-weight: 800; font-size: .82rem; line-height: 1.15; color: var(--ink-2); padding-inline-start: 10px; border-inline-start: 1.5px solid var(--line); }
.mainnav { display: flex; align-items: center; gap: 4px; position: absolute; left: 50%; transform: translateX(-50%); }
.mainnav > a, .topmenu__btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px;
  font-weight: 600; color: var(--ink-2); transition: background .15s, color .15s; white-space: nowrap;
}
.mainnav > a svg { width: 19px; height: 19px; color: var(--muted); transition: color .15s; }
.mainnav > a:hover, .topmenu__btn:hover { background: var(--tint); color: var(--ink); }
.mainnav > a.is-active { background: var(--orange-50); color: var(--orange-700); font-weight: 800; }
.mainnav > a.is-active svg { color: var(--orange-600); }
.iconbtn__badge {
  position: absolute; top: 2px; inset-inline-end: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.topmenu { position: relative; }
.topmenu__btn .caret { width: 16px; height: 16px; transform: rotate(90deg); color: var(--muted); transition: transform .15s; }
.topmenu.is-open .topmenu__btn .caret { transform: rotate(-90deg); }
.topmenu__menu {
  display: none; position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 200px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 60;
}
.topmenu.is-open .topmenu__menu { display: block; }
.topmenu__menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; font-weight: 600; }
.topmenu__menu a:hover { background: var(--orange-50); }
.topmenu__menu a.is-active { color: var(--orange-700); font-weight: 800; }
.topmenu__menu a svg { width: 16px; height: 16px; color: var(--muted); }
.topbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.iconbtn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.iconbtn:hover { background: var(--tint); color: var(--ink); }
.iconbtn.is-active { color: var(--orange-600); }
.iconbtn svg { width: 21px; height: 21px; }
.userchip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 10px; background: transparent;
  color: var(--ink-2); font-weight: 700; font-size: .95rem; transition: background .15s, color .15s; margin-inline-start: 2px; min-height: 40px;
}
.userchip:hover { background: var(--tint); color: var(--ink); }
.userchip > svg { width: 19px; height: 19px; color: var(--ink-2); }
.userchip.is-on { color: var(--ink); }
.userchip.is-on > svg { color: var(--orange-600); }

/* ---------- bottom bar (mobile) ---------- */
.bottombar {
  display: none; position: fixed; bottom: 0; inset-inline: 0; z-index: 50; height: calc(var(--bottombar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); grid-template-columns: repeat(5, 1fr);
}
.bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bottombar a svg { width: 24px; height: 24px; }
.bottombar a.is-active { color: var(--orange-600); }

/* ---------- layout ---------- */
.app { min-height: calc(100vh - var(--topbar-h) - 120px); padding-bottom: 48px; }
.section { padding-block: 26px 6px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section__head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; display: flex; align-items: center; gap: 10px; }
.section__head .more, .more { color: var(--orange-700); font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.more svg { width: 18px; height: 18px; }
.section__sub { color: var(--muted); margin-top: 4px; }
.page-head { padding-block: 26px 6px; }
.page-head h1 { font-family: var(--font-hand); font-size: 2.1rem; font-weight: 400; }
.page-head p { color: var(--ink-2); margin-top: 8px; max-width: 62ch; font-size: 1.05rem; }
.page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.acard--mine { border-style: dashed; border-color: color-mix(in srgb, var(--orange) 45%, #fff); background: color-mix(in srgb, var(--orange) 4%, #fff); }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.crumb svg { width: 16px; height: 16px; transform: scaleX(-1); }
.crumb a:hover { color: var(--orange-700); }
.count { color: var(--muted); font-weight: 700; font-size: .95rem; }

/* ---------- hero (flat) ---------- */
.hero__in { padding-block: 42px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; color: var(--orange-700); background: var(--orange-50); border: 1px solid var(--orange-200); padding: 5px 14px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-family: var(--font-hand); font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 400; letter-spacing: 0; line-height: 1.15; }
.hero h1 .circled { position: relative; display: inline-block; padding: .05em .22em; margin-inline-start: .1em; }
.hero h1 .circled .q { color: var(--orange-600); }
.hero h1 .circled::before {
  content: ''; position: absolute; inset: -30% -8% -24% -10%; z-index: -1;
  background: url('assets/swoosh-orange.svg') center / 100% 100% no-repeat;
  transform: rotate(-2deg);
}
.hero p.lead { margin-top: 10px; font-size: 1.1rem; color: var(--ink-2); max-width: 52ch; margin-inline: auto; }
.hero__search { margin-top: 22px; max-width: 760px; }
.hero__search .fbar { margin: 0; }
.hero__search .fpill { height: 60px; width: 100%; border-radius: 18px; box-shadow: 0 12px 34px rgba(60, 30, 0, .12), 0 1px 2px rgba(60,30,0,.06); }
.hero__search .fsearch { flex: 1; }
.hero__search .fsearch input { width: 100%; flex: 1; font-size: 1.05rem; }

/* ---------- sticky centered home search ---------- */
.homesearch { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 35; margin-top: -6px; }
.homesearch__in { display: flex; justify-content: center; }
.homesearch .fbar { margin: 0; width: 100%; justify-content: center; }
.homesearch .fpill { height: 58px; width: 100%; max-width: 720px; border-radius: 18px; box-shadow: 0 12px 34px rgba(60, 30, 0, .14), 0 1px 2px rgba(60,30,0,.06); }
.homesearch .fsearch { flex: 1; }
.homesearch .fsearch input { width: 100%; flex: 1; font-size: 1.05rem; }
.secico { width: 38px; height: 38px; border-radius: 50%; background: var(--sc, var(--orange)); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.secico svg { width: 20px; height: 20px; }
@media (max-width: 760px) {
  .homesearch { top: calc(var(--topbar-h) + 6px); }
  .homesearch .fpill { height: 50px; }
  .secico { width: 32px; height: 32px; }
  .secico svg { width: 17px; height: 17px; }
}

/* ---------- onboarding (fits one screen, no scroll) ---------- */
.ob { text-align: center; min-height: calc(100dvh - var(--topbar-h) - 2px); display: flex; flex-direction: column; justify-content: center; padding-block: 10px 8px; }
.ob__title { font-family: var(--font-hand); font-weight: 400; font-size: clamp(2rem, min(4.2vw, 7.5vh), 3.2rem); line-height: 1.2; }
.ob__title .circled { position: relative; display: inline-block; padding: .05em .2em; }
.ob__title .circled::before { content: ''; position: absolute; inset: -26% -10% -20% -12%; z-index: -1; background: url('assets/swoosh-orange.svg') center / 100% 100% no-repeat; transform: rotate(-2deg); }
.ob__sub { color: var(--muted); margin-top: 6px; font-size: 1rem; }
.ob__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: min(1.8vh, 14px); max-width: 760px; width: 100%; margin: min(2.8vh, 24px) auto min(2vh, 16px); }
.ob__tile {
  background: color-mix(in srgb, var(--gc) 8%, #fff); border: 1.5px solid color-mix(in srgb, var(--gc) 22%, #fff);
  border-radius: 18px; padding: min(1.8vh, 16px) 8px min(1.3vh, 12px); display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  animation: obIn .45s cubic-bezier(.2,.7,.3,1.1) both; animation-delay: calc(var(--i) * 40ms);
}
.ob__tile:hover { transform: translateY(-3px); border-color: var(--gc); box-shadow: 0 12px 26px color-mix(in srgb, var(--gc) 22%, transparent); }
.ob__tile img { width: min(7.2vh, 62px); height: min(7.2vh, 62px); object-fit: contain; }
.ob__tile b { font-size: min(1.25rem, 2.8vh); font-weight: 900; }
.ob__tile small { color: var(--muted); font-size: min(.78rem, 2vh); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ob__skip { color: var(--orange-700); font-weight: 700; padding: 6px 14px; border-radius: 999px; align-self: center; }
.ob__skip:hover { background: var(--orange-50); }
body.is-ob .footer { display: none; }
body.is-ob .app { padding-bottom: 0; min-height: 0; }
@keyframes obIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-height: 560px) { .ob__sub { display: none; } .ob__tile small { display: none; } }
@media (max-width: 640px) {
  .ob { min-height: calc(100dvh - var(--topbar-h) - var(--bottombar-h)); }
  .ob__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- unified filter pill ---------- */
.fbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-block: 10px 18px; }
.fpill {
  display: flex; align-items: stretch; background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  height: 60px; padding: 0 6px; max-width: 100%;
}
.fpill > * + * { position: relative; }
.fpill > * + *::before { content: ''; position: absolute; inset-inline-start: 0; top: 22%; height: 56%; width: 1px; background: var(--line); }
.fbar .count { margin-inline-start: 2px; }
.fclear { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: .9rem; padding: 6px 10px; border-radius: 999px; }
.fclear:hover { background: var(--tint); color: var(--ink); }
.fclear svg { width: 16px; height: 16px; }
.fdrop { position: relative; display: flex; }
.fdrop__btn {
  display: inline-flex; align-items: center; gap: 8px; align-self: stretch; padding: 0 16px; font-weight: 700; font-size: 1rem; color: var(--ink);
  white-space: nowrap; border-radius: 12px; margin: 10px 6px; padding: 0 12px; transition: background .15s, color .15s;
}
.fdrop__btn:hover { background: #F6F3EF; }
.fdrop__btn:hover .caret { color: var(--ink); }
.fpill { padding: 0 8px; }
.fdrop__lbl { color: var(--ink-2); font-weight: 600; }
.fdrop.is-on .fdrop__lbl { color: var(--muted); }
.fval { display: inline-flex; align-items: center; gap: 6px; background: #EEF3FA; color: #23395B; border-radius: 999px; padding: 4px 11px; font-weight: 800; font-size: .92rem; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fdrop__btn .caret { width: 16px; height: 16px; transform: rotate(90deg); color: var(--muted); transition: transform .15s; }
.fdrop.is-open .fdrop__btn .caret { transform: rotate(-90deg); }
.fsearch { display: flex; align-items: center; gap: 4px; padding-inline-start: 10px; min-width: 0; }
.fsearch input { border: 0; outline: 0; background: transparent; font-size: 1.05rem; width: 330px; min-width: 0; padding: 0 6px; color: var(--ink); }
.fsearch input::placeholder { color: var(--muted); }
.fsearch button { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); align-self: center; }
.fsearch button:hover { background: var(--orange-50); color: var(--orange-700); }
.fsearch button svg { width: 24px; height: 24px; stroke-width: 2.2; }
.fdrop__menu {
  display: none; position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 30; min-width: 220px; max-height: 340px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 6px;
}
.fdrop.is-open .fdrop__menu { display: block; }
.fdrop__menu a, .fdrop__menu .fopt { width: 100%; text-align: start; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.fdrop__menu a:hover, .fdrop__menu .fopt:hover { background: var(--orange-50); }
.fdrop__menu a svg, .fdrop__menu .fopt svg { width: 16px; height: 16px; visibility: hidden; color: var(--orange-600); }
.fdrop__menu a.is-sel, .fdrop__menu .fopt.is-sel { background: var(--orange-50); color: var(--orange-700); }
.fdrop__menu a.is-sel svg, .fdrop__menu .fopt.is-sel svg { visibility: visible; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-inline-end: 4px; flex: none; }
.fval .dot { margin-inline-end: 0; }
.fval--solid { background: var(--vc); color: #fff; }
.fval--solid .dot { display: none; }


/* ---------- mobile search bar + filter sheet ---------- */
.fmob { display: none; width: 100%; gap: 8px; align-items: center; }
.fmob__search { flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; height: 48px; padding: 0 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.fmob__search svg { width: 20px; height: 20px; color: var(--ink-2); stroke-width: 2.2; }
.fmob__search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1rem; min-width: 0; }
.fmob__btn { display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 800; color: var(--ink); box-shadow: var(--shadow-sm); white-space: nowrap; }
.fmob__btn svg { width: 18px; height: 18px; }
.fmob__btn.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fmob__n { min-width: 20px; height: 20px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.fsheet { position: fixed; inset: 0; z-index: 90; }
.fsheet__bg { position: absolute; inset: 0; background: rgba(20,12,0,.45); }
.fsheet__panel { position: absolute; inset-inline: 0; bottom: 0; background: #fff; border-radius: 22px 22px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 82vh; overflow: auto; box-shadow: 0 -10px 40px rgba(0,0,0,.15); }
.fsheet__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fsheet__head b { font-size: 1.2rem; font-weight: 900; margin-inline-end: auto; }
.fsheet__group { padding: 10px 0; border-top: 1px solid var(--line-2); }
.fsheet__lbl { font-weight: 800; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.fsheet__foot { padding-top: 12px; display: flex; justify-content: center; }
.fsheet__foot .btn { width: 100%; justify-content: center; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; font-weight: 700; font-size: .95rem; background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.fchip.is-sel { background: var(--ink); color: #fff; box-shadow: none; }
.fchip .dot { margin-inline-end: 0; }
@media (max-width: 760px) {
  .fpill, .fclear--desk { display: none !important; }
  .fmob { display: flex; }
  .hero__search .fmob__search { height: 52px; }
  .acard--game .acard__meta span + span { display: none; }
  .gsec .section__head { align-items: center; }
  .gtype { flex: 0 0 88px; height: 88px; font-size: .86rem; gap: 6px; }
  .gtype svg { width: 26px; height: 26px; }
}

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-weight: 700;
  background: var(--ink); color: #fff; transition: transform .1s, background .15s; white-space: nowrap;
}
.btn:hover { background: #000; }
.btn:active { transform: scale(.98); }
.btn svg { width: 19px; height: 19px; }
.btn--orange { background: var(--orange); }
.btn--orange:hover { background: var(--orange-600); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { background: var(--orange-50); box-shadow: inset 0 0 0 1.5px var(--orange-200); }
.btn--sm { padding: 8px 14px; font-size: .95rem; }
.btn.is-on { background: var(--coral); color: #fff; box-shadow: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: .86rem; font-weight: 700;
  background: var(--tint); color: var(--ink-2); white-space: nowrap; line-height: 1.4;
}
.chip svg { width: 15px; height: 15px; }
.chip--lvl { background: color-mix(in srgb, var(--lvl, var(--orange)) 13%, #fff); color: color-mix(in srgb, var(--lvl, var(--orange)) 78%, #000); }
.chip--orange { background: var(--orange-100); color: var(--orange-700); }
.chip--teal { background: var(--teal-50); color: #0B7D7B; }
.chip--coral { background: var(--coral-50); color: #B3343D; }
.chip--dark { background: var(--ink); color: #fff; }
.chip--type { background: color-mix(in srgb, var(--tc) 13%, #fff); color: color-mix(in srgb, var(--tc) 78%, #000); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* letter tile (grade) */
.ltile {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: 14px;
  font-weight: 900; font-size: 1.35rem; background: var(--lvl); color: #fff;
}
.ltile--lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.7rem; }
.ltile--xl { width: 84px; height: 84px; border-radius: 22px; font-size: 2.3rem; }
.ltile img { width: 74%; height: 74%; object-fit: contain; }
.gtile__letter img { width: 76%; height: 76%; object-fit: contain; }
.gdot { width: 22px; height: 22px; object-fit: contain; flex: none; }
.fval .gdot { width: 18px; height: 18px; }

/* ---------- "my grade" card ---------- */
.mygrade { margin-top: 6px; }
.mygrade__card {
  --lvl: var(--orange);
  background: color-mix(in srgb, var(--lvl) 10%, #fff); border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--lvl) 22%, #fff); padding: 20px 22px;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px;
}
.mygrade__card .ltile { background: color-mix(in srgb, var(--lvl) 11%, #fff); }
.mygrade__card .btn--orange { background: var(--lvl); }
.mygrade__card .btn--orange:hover { background: color-mix(in srgb, var(--lvl) 85%, #000); }
.mygrade__card .btn--ghost { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lvl) 35%, #fff); background: rgba(255,255,255,.6); }
.mygrade__card .btn--ghost:hover { background: #fff; }
.mygrade__card .next { background: color-mix(in srgb, var(--lvl) 18%, #fff); }
.mygrade__card .next__eyebrow { color: color-mix(in srgb, var(--lvl) 70%, #000); }
.mygrade__card .next .chip { background: rgba(255,255,255,.75); color: color-mix(in srgb, var(--lvl) 70%, #000); }
.mygrade__card .next .btn { background: var(--ink); }
.mygrade__main { display: flex; gap: 16px; align-items: flex-start; }
.mygrade__eyebrow { color: var(--muted); font-weight: 700; font-size: .88rem; }
.mygrade__title { font-family: var(--font-display); font-weight: 400; font-size: 1.55rem; margin-top: 2px; }
.mygrade__title small { color: var(--muted); font-weight: 600; font-size: .95rem; margin-inline-start: 8px; }
.mygrade__desc { color: var(--ink-2); margin-top: 4px; }
.mygrade__actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.next { background: var(--orange-50); border-radius: var(--r-sm); padding: 14px 16px; align-self: start; }
.next__eyebrow { color: var(--orange-700); font-weight: 800; font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.next__title { font-size: 1.15rem; font-weight: 800; margin-top: 4px; }
.next__meta { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.next a.btn { margin-top: 12px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
.hrow {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity;
  scrollbar-width: none; margin-left: calc(50% - 50vw); padding-left: calc(50vw - 50%); max-width: 100vw;
}
.hrow::-webkit-scrollbar { display: none; }
.hrow > * { flex: 0 0 270px; scroll-snap-align: start; }
.card {
  background: var(--card); border-radius: var(--r); border: 1px solid var(--line);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative;
}
a.card:hover { box-shadow: var(--shadow); border-color: #E3DACD; }
.card__title { font-size: 1.12rem; font-weight: 800; line-height: 1.3; }
.card__sub { color: var(--muted); font-size: .95rem; line-height: 1.45; }
.card .fav { position: absolute; top: 14px; inset-inline-end: 14px; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: #fff; border: 1px solid var(--line); z-index: 2; transition: all .15s; }
.card .fav:hover { color: var(--coral); border-color: var(--coral); }
.card .fav.is-on { color: var(--coral); border-color: var(--coral-50); background: var(--coral-50); }
.card .fav.is-on svg { fill: var(--coral); }
.card .fav svg { width: 18px; height: 18px; }

/* activity / game card — clean */
.acard { padding: 20px 20px 16px; padding-inline-end: 62px; min-height: 168px; gap: 12px; }
.acard__title { font-size: 1.22rem; font-weight: 800; line-height: 1.3; }
.acard__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.acard__goal { color: var(--ink-2); font-size: .95rem; line-height: 1.45; margin-top: -4px; }
.acard__meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.acard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.acard__meta svg { width: 15px; height: 15px; }
.acard__meta .is-muted { opacity: .7; }
.acard--game .acard__tags { margin-top: 0; }
.acard--game .acard__meta { margin-top: auto; }

/* grade tiles — whole tile in a soft tint of the grade color */
.gtile {
  border-radius: var(--r); padding: 14px 16px; background: color-mix(in srgb, var(--lvl) 16%, #fff); color: color-mix(in srgb, var(--lvl) 72%, #000); border: 0;
  display: flex; gap: 14px; align-items: center; transition: transform .15s, box-shadow .15s, background .15s;
}
.gtile:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--lvl) 22%, #fff); box-shadow: 0 10px 24px color-mix(in srgb, var(--lvl) 22%, transparent); }
.gtile__letter {
  width: 52px; height: 52px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: color-mix(in srgb, var(--lvl) 11%, #fff); box-shadow: 0 1px 3px rgba(40,20,0,.06);
}
.gtile__body { min-width: 0; flex: 1; }
.gtile__theme { font-weight: 800; font-size: 1.08rem; line-height: 1.25; }
.gtile__sub { opacity: .75; font-size: .88rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtile__arrow { width: 18px; height: 18px; opacity: .8; }
.gtile--empty { background: color-mix(in srgb, var(--lvl) 9%, #fff); }
.gtile--empty .gtile__letter { background: color-mix(in srgb, var(--lvl) 8%, #fff); opacity: .85; }
.gtile--empty .gtile__theme { font-weight: 700; opacity: .8; }

/* tools */
.toolcard { gap: 6px; }
.toolcard__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--orange-50); color: var(--orange-700); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.toolcard__icon svg { width: 24px; height: 24px; }
.linkcard { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.linkcard__name { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.linkcard__name svg { width: 16px; height: 16px; color: var(--muted); }
.linkcard__desc { color: var(--muted); font-size: .92rem; margin-top: 2px; }

/* ---------- games page ---------- */
.gtypes { display: flex; gap: 10px; overflow-x: auto; padding: 18px 0 6px; scrollbar-width: none; margin-left: calc(50% - 50vw); padding-left: calc(50vw - 50%); max-width: 100vw; }
.gtypes::-webkit-scrollbar { display: none; }
.gtype {
  flex: 1 0 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 84px; border-radius: 16px;
  background: color-mix(in srgb, var(--tc) 11%, #fff); color: color-mix(in srgb, var(--tc) 78%, #000); font-weight: 800; font-size: .95rem;
  border: 1.5px solid transparent; transition: all .15s;
}
.gtype svg { width: 26px; height: 26px; }
.gtype:hover { border-color: color-mix(in srgb, var(--tc) 40%, #fff); transform: translateY(-1px); }
.gtype.is-on { background: var(--tc); color: #fff; }
.gameshead { text-align: center; padding-block: 24px 6px; }
.gameshead h1 { font-family: var(--font-hand); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 400; letter-spacing: 0; }
.gameshead p { color: var(--ink-2); margin-top: 6px; font-size: 1.05rem; }
.rollseg { align-self: stretch; display: inline-flex; align-items: center; gap: 6px; margin: 10px 6px; padding: 0 14px; border-radius: 12px; font-weight: 800; font-size: .95rem; color: var(--orange-700); white-space: nowrap; transition: background .15s; }
.rollseg:hover { background: var(--orange-50); }
.gameshead + .fbar { justify-content: center; }
.gsec .section__head h2 { font-size: 1.3rem; }
.gsec__ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--tc) 13%, #fff); color: color-mix(in srgb, var(--tc) 80%, #000); }
.gsec__ico svg { width: 20px; height: 20px; }

/* ---------- grade page ---------- */
.gradehead { padding-block: 26px 6px; }
.gradehead__row { display: flex; gap: 20px; align-items: flex-start; }
.gradehead__body { min-width: 0; }
.gradehead__eyebrow { font-weight: 700; color: var(--muted); font-size: .92rem; }
.gradehead h1 { font-family: var(--font-hand); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 400; margin-top: 2px; letter-spacing: 0; }
.gradehead p { margin-top: 10px; max-width: 70ch; color: var(--ink-2); font-size: 1.05rem; }
.gradehead__goals { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.gradehead__stats { margin-top: 16px; display: flex; gap: 26px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 1.5rem; font-weight: 900; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
.gradehead__actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

.timeline { margin-top: 8px; }
.stagehead { display: flex; gap: 14px; align-items: flex-start; padding: 22px 0 12px; position: sticky; top: var(--topbar-h); background: rgba(251,246,239,.92); backdrop-filter: blur(6px); z-index: 3; }
.stagehead__n { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stagehead h3 { font-size: 1.2rem; }
.stagehead p { color: var(--muted); font-size: .95rem; margin-top: 2px; }
.tl { list-style: none; border-inline-start: 2px solid var(--line); margin-inline-start: 19px; padding-inline-start: 24px; display: flex; flex-direction: column; gap: 8px; }
.tl__item { position: relative; }
.tl__item::before { content: ''; position: absolute; inset-inline-start: -31px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--line); }
.tl__item.is-free::before { width: 8px; height: 8px; inset-inline-start: -29px; top: 12px; background: var(--line); }
.tl__item.is-event::before { background: var(--orange); border-color: var(--orange); }
.tl__item.is-next::before { background: var(--coral); border-color: var(--coral); box-shadow: 0 0 0 5px var(--coral-50); }
.tl__item.is-past::before { background: var(--line); }
.tlrow { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; transition: box-shadow .12s; }
a.tlrow:hover { box-shadow: var(--shadow); }
.tlrow__n { font-weight: 900; color: var(--muted); min-width: 44px; font-size: .85rem; }
.tlrow__n b { display: block; font-size: 1.15rem; color: var(--ink); line-height: 1; }
.tlrow__title { font-weight: 700; flex: 1; min-width: 0; }
.tlrow__meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tlrow__meta .ico { color: var(--muted); display: inline-flex; }
.tlrow__meta .ico svg { width: 18px; height: 18px; }
.is-free .tlrow { background: transparent; border-style: dashed; padding-block: 8px; color: var(--muted); }
.is-free .tlrow__title { font-weight: 500; font-size: .95rem; }
.is-event .tlrow { background: var(--orange-50); border-color: var(--orange-200); }
.is-next .tlrow { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-50); }
.is-past .tlrow { opacity: .85; }
.tag-next { background: var(--coral); color: #fff; }

/* ---------- activity page ---------- */
.acthead { padding-block: 26px 8px; }
.acthead__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.acthead h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 400; max-width: 26ch; letter-spacing: 0; }
.acthead__meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acthead__summary { margin-top: 12px; color: var(--ink-2); font-size: 1.08rem; max-width: 70ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.act-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; margin-top: 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel h2 svg { width: 22px; height: 22px; color: var(--orange-600); }
.goals { list-style: none; display: flex; flex-direction: column; gap: 8px; counter-reset: g; }
.goals li { display: flex; gap: 10px; align-items: flex-start; }
.goals li::before { counter-increment: g; content: counter(g); width: 26px; height: 26px; border-radius: 8px; background: var(--orange-100); color: var(--orange-700); font-weight: 900; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; flex: none; margin-top: 2px; }
.note { background: var(--orange-50); border-inline-start: 4px solid var(--orange); border-radius: 10px; padding: 12px 14px; color: var(--ink-2); font-size: .98rem; margin-bottom: 14px; }
.timebar { display: flex; gap: 3px; height: 12px; border-radius: 999px; overflow: hidden; margin: 6px 0 18px; background: var(--line-2); }
.timebar span { display: block; height: 100%; background: var(--orange); opacity: .85; }
.timebar span:nth-child(even) { background: var(--orange-600); }
.timebar span.is-break { background: var(--line); }
.timebar-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; font-weight: 600; margin-top: -12px; margin-bottom: 16px; }
.steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.step__n { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.step__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step__name { font-weight: 800; font-size: 1.08rem; }
.step__min { display: inline-flex; align-items: center; gap: 4px; background: var(--orange-100); color: var(--orange-700); padding: 2px 9px; border-radius: 999px; font-size: .85rem; font-weight: 800; }
.step__min svg { width: 14px; height: 14px; }
.step__text { color: var(--ink-2); margin-top: 4px; }
.step__bul { margin-top: 8px; padding-inline-start: 18px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.step--break .step__n { background: var(--line); color: var(--muted); }
.step--break .step__name { color: var(--muted); }
.equip { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.equip li label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.equip li label:hover { background: var(--line-2); }
.equip input { width: 20px; height: 20px; accent-color: var(--orange); margin-top: 2px; flex: none; }
.equip .done { text-decoration: line-through; color: var(--muted); }
.equip__progress { color: var(--muted); font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.metalist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.metalist li { display: flex; gap: 10px; align-items: flex-start; }
.metalist svg { width: 20px; height: 20px; color: var(--orange-600); margin-top: 2px; }
.metalist b { display: block; font-size: .85rem; color: var(--muted); font-weight: 700; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prevnext a { background: var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: .92rem; }
.prevnext a:hover { background: var(--orange-50); }
.prevnext small { display: block; color: var(--muted); font-weight: 700; font-size: .8rem; }
.stub { background: #fff; border: 1px dashed var(--line); border-radius: var(--r); padding: 28px; text-align: center; color: var(--ink-2); }
.stub svg { width: 40px; height: 40px; color: var(--orange); margin: 0 auto 8px; }
.badge-real { background: var(--teal-50); color: #0B7D7B; }
.badge-sample { background: var(--line-2); color: var(--muted); }

/* ---------- game page ---------- */
.gamehead { padding-block: 26px 10px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kv div { background: var(--line-2); border-radius: 12px; padding: 10px 12px; }
.kv b { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; }

/* ---------- more page ---------- */
.morelist { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.morelink { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: start; width: 100%; transition: box-shadow .15s; }
.morelink:hover { box-shadow: var(--shadow); }
.morelink__ico { width: 42px; height: 42px; border-radius: 12px; background: var(--orange-50); color: var(--orange-700); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.morelink__ico svg { width: 22px; height: 22px; }
.morelink__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.morelink__body b { font-weight: 800; }
.morelink__body small { color: var(--muted); font-size: .88rem; }
.morelink > svg { width: 18px; height: 18px; color: var(--muted); }

/* ---------- quote band ---------- */
.quoteband { text-align: center; padding-block: 44px 8px; }
.quoteband__q { font-family: 'Amatic SC', var(--font); font-weight: 700; font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.15; color: var(--ink-2); letter-spacing: .01em; }
.quoteband__q em { font-style: normal; color: var(--orange-600); }
.quoteband__by { margin-top: 6px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.quoteband__by::before { content: '— '; }
@media (max-width: 760px) { .quoteband { padding-block: 30px 4px; } }


/* ---------- progress ---------- */
.chk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: #fff; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; transition: all .15s; }
.chk svg { width: 15px; height: 15px; stroke-width: 3; }
.chk:hover { border-color: #2E8B57; box-shadow: 0 0 0 3px #E8F5EE; }
.is-done .chk { background: #2E8B57; border-color: #2E8B57; }
.is-done .tlrow { opacity: .72; }
.is-done .tlrow__title { text-decoration: line-through; text-decoration-color: #C4BDB2; }
.tl__item.is-done::before { background: #2E8B57; border-color: #2E8B57; }
.btn--green { background: #2E8B57; }
.btn--green:hover { background: #257248; }
.is-done-btn { color: #2E8B57; box-shadow: inset 0 0 0 1.5px #BFE3CF; }
.chip--idea { background: var(--orange-50); color: var(--orange-700); }
.chip--idea:hover { background: var(--orange-100); }
.progbanner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--orange-50); border: 1px solid var(--orange-200); border-radius: 14px; padding: 12px 16px; margin-top: 14px; }
.progbanner > div { flex: 1; min-width: 220px; }
.progbanner span { color: var(--ink-2); font-size: .95rem; }
.next__eyebrow b { color: #2E8B57; }

.next__ask { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--orange-200); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; font-size: .92rem; color: var(--ink-2); }
.next__ask-t { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.next__ask-b { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.next__ask svg { width: 16px; height: 16px; color: var(--orange-600); }
.askbtn { display: inline-flex; align-items: center; gap: 4px; background: var(--orange); color: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .88rem; }
.askbtn svg { width: 14px; height: 14px; color: #fff; }
.askbtn--ghost { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }

/* ---------- row nav (arrow + fade at scroll end) ---------- */
.hrowwrap { position: relative; }
.hrow__fade { position: absolute; left: calc(50% - 50vw); top: 0; bottom: 4px; width: 90px; background: linear-gradient(to right, var(--bg) 12%, transparent); pointer-events: none; }
.hrow__nav {
  position: absolute; left: calc(50% - 50vw + 54px); top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--ink); transition: transform .12s;
}
.hrow__nav:hover { transform: translateY(-50%) scale(1.06); }
.hrow__nav svg { width: 20px; height: 20px; transform: rotate(180deg); }
.hrowwrap.is-end .hrow__nav, .hrowwrap.is-end .hrow__fade { display: none; }
@media (max-width: 760px) { .hrow__nav { display: none; } .hrow__fade { width: 44px; } }

/* ---------- activity header (calm) ---------- */
.metaline { color: var(--muted); font-weight: 600; font-size: .98rem; }
.metaline b { font-weight: 800; }
.metaline i { font-style: normal; opacity: .6; margin-inline: 2px; }
.actions--icons { gap: 8px; align-items: center; }
.iconbtn--line.is-done { background: var(--green, #2E8B57); border-color: var(--green, #2E8B57); color: #fff; }

/* ---------- activity header card ---------- */
.acthead-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm);
  padding: 22px 24px 0;
}
.acthead-card .crumb { margin-bottom: 6px; }
.acthead-card h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.acthead-card .acthead__meta { margin-top: 10px; }
.acthead-card .acthead__meta:last-child { padding-bottom: 20px; }
.acthead-card .acthead__summary { margin-top: 10px; color: var(--ink-2); font-size: 1.02rem; }
.acard-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); margin: 16px -24px 0; padding: 6px 12px; }
.aact { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 10px; font-weight: 700; font-size: .97rem; color: var(--ink-2); transition: background .15s, color .15s; }
.aact svg { width: 18px; height: 18px; }
.aact:hover { background: var(--tint); color: var(--ink); }
.aact--check { color: #256E47; background: #E8F5EE; }
.aact--check:hover { background: #DCEEE3; color: #1E5B3A; }
.aact--check.is-done { background: var(--green, #2E8B57); color: #fff; }
.aact { color: var(--ink-2); }
.acard-acts .aact:nth-child(2) { color: var(--orange-700); background: var(--orange-50); }
.acard-acts .aact:nth-child(2):hover { background: var(--orange-100); }
.aact--fav { color: var(--coral); background: var(--coral-50); }
.aact--fav:hover { background: #F9DDE0; color: var(--coral); }
.aact--fav.is-on svg { fill: var(--coral); }
.aact--dim { color: var(--muted); font-weight: 600; }
.aact-spacer { flex: 1; }
@media (max-width: 760px) {
  .acthead-card { padding: 16px 16px 0; }
  .acard-acts { margin: 14px -16px 0; padding: 4px 6px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .acard-acts::-webkit-scrollbar { display: none; }
  .aact { white-space: nowrap; padding: 10px 11px; }
}

/* ---------- header overflow menu ---------- */
.iconbtn--line { border: 1.5px solid var(--line); width: 42px; height: 42px; }
.iconbtn--line:hover { border-color: var(--orange-200); background: var(--orange-50); }
.iconbtn--line.is-on { color: var(--coral); border-color: var(--coral-50); background: var(--coral-50); }
.iconbtn--line.is-on svg { fill: var(--coral); }
.ddwrap { position: relative; display: inline-flex; }
.dd__menu { display: none; position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 170px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); padding: 5px; z-index: 40; }
.ddwrap.is-open .dd__menu { display: block; }
.dd__menu a, .dd__menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; text-align: start; padding: 9px 12px; border-radius: 9px; font-weight: 600; font-size: .95rem; }
.dd__menu a:hover, .dd__menu button:hover { background: var(--orange-50); }
.dd__menu svg { width: 15px; height: 15px; color: var(--muted); }

.mpcats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mpc { padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); border: 1.5px solid transparent; }
.mpc.is-on { background: color-mix(in srgb, var(--tc, var(--orange)) 14%, #fff); color: color-mix(in srgb, var(--tc, var(--orange)) 75%, #000); border-color: color-mix(in srgb, var(--tc, var(--orange)) 45%, #fff); }
.mpc:hover { border-color: color-mix(in srgb, var(--tc, var(--orange)) 45%, #fff); }
.btn--green { background: var(--green, #2E8B57); color: #fff; }
.gpick__list { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.gpick__item { display: flex; align-items: center; gap: 10px; text-align: start; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.gpick__item:hover { border-color: var(--orange); }
.gpick__item b { white-space: nowrap; }
.gpick__item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- guides ---------- */
.guidecard { gap: 8px; }
.guidecard .acard__meta { margin-top: auto; }
.guide__body { max-width: 760px; }
.guide__body .panel h2 { font-size: 1.2rem; gap: 10px; }
.guide__p { color: var(--ink-2); font-size: 1.05rem; }
.guide__ul { margin-top: 10px; padding-inline-start: 4px; list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.guide__ul li { display: flex; gap: 10px; }
.guide__ul li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; margin-top: 9px; }

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty svg { width: 44px; height: 44px; margin: 0 auto 8px; color: var(--orange-200); }
.about p { margin-top: 10px; max-width: 70ch; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.admin-table th, .admin-table td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--line-2); font-size: .9rem; color: var(--muted); }
.admin-table select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20,12,0,.45); }
.modal__card { position: relative; background: #fff; border-radius: 22px; padding: 26px; width: min(460px, 100%); box-shadow: var(--shadow); }
.modal__card h2 { font-size: 1.4rem; }
.modal__card p { color: var(--ink-2); margin-top: 6px; }
.field { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field select { padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); font-size: 1rem; background: #fff; }
.field input:focus, .field select:focus { outline: 2px solid var(--orange-200); border-color: var(--orange); }
.modal__actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.modal__close { position: absolute; top: 12px; inset-inline-end: 12px; }
.modal__foot { margin-top: 16px; font-size: .9rem; color: var(--muted); }
.modal__foot a { color: var(--orange-700); font-weight: 700; }
.toast { position: fixed; bottom: calc(var(--bottombar-h) + 16px); inset-inline-start: 50%; transform: translateX(50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 120; box-shadow: var(--shadow); }
.demo-pill { background: var(--orange-100); color: var(--orange-700); padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: .92rem; }
.footer__in { padding-block: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.footer__muted { color: var(--muted); }
.footer__links { display: flex; gap: 16px; align-items: center; }
.footer__links a:hover { color: var(--orange-700); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .act-layout { grid-template-columns: 1fr; }
  .mygrade__card { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --topbar-h: 58px; }
  body { font-size: 16px; padding-bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom)); }
  .wrap { padding-inline: 16px; }
  .mainnav { display: none; }
  .bottombar { display: grid; }
  .brand__logo { height: 34px; }
  .brand__text { display: none; }
  .userchip span { display: none; }
  .userchip { padding: 8px; width: 40px; height: 40px; justify-content: center; border-radius: 50%; }
  .footer { display: none; }
  .hero__in { padding-block: 22px 16px; }
  .hero__search .fpill { height: 52px; border-radius: 14px; }
  .fbar { gap: 8px; }
  .fpill { height: 48px; width: 100%; overflow-x: auto; scrollbar-width: none; padding: 0 12px; border-radius: 14px; scroll-padding-inline: 12px; }
  .fpill::-webkit-scrollbar { display: none; }
  .fdrop__btn { padding: 0 10px; font-size: .95rem; gap: 6px; }
  .fdrop.is-on .fdrop__lbl { display: none; }
  .fval { max-width: 140px; font-size: .88rem; }
  .fdrop__btn { margin: 4px 0; }
  .fsearch { padding-inline-start: 4px; }
  .fsearch input { width: 96px; }
  .fsearch button { width: 40px; height: 40px; }
  .fdrop__menu { position: fixed; inset-inline: 12px; top: auto; bottom: calc(var(--bottombar-h) + 10px); max-height: 50vh; }
  .mygrade__card { padding: 16px; }
  .mygrade__main { gap: 12px; }
  .ltile--lg { width: 52px; height: 52px; font-size: 1.4rem; }
  .ltile--xl { width: 64px; height: 64px; font-size: 1.8rem; border-radius: 18px; }
  .section { padding-block: 20px 4px; }
  .section__head h2 { font-size: 1.25rem; }
  .hrow > * { flex: 0 0 50%; }
  .page-head h1 { font-size: 1.7rem; }
  .gradehead__row { gap: 12px; }
  .stagehead { padding: 18px 0 10px; }
  .tl { margin-inline-start: 8px; padding-inline-start: 18px; }
  .tl__item::before { inset-inline-start: -25px; }
  .tl__item.is-free::before { inset-inline-start: -23px; }
  .tlrow { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
  .tlrow__title { flex-basis: calc(100% - 60px); }
  .tlrow__meta { width: 100%; justify-content: flex-start; }
  .acthead h1 { font-size: 1.55rem; }
  .panel { padding: 16px; border-radius: 14px; }
  .step { grid-template-columns: 36px 1fr; gap: 10px; }
  .step__n { width: 34px; height: 34px; border-radius: 10px; }
  .prevnext { grid-template-columns: 1fr; }
  .gtypes { margin-inline: -16px; padding-inline: 16px; }
  .gtype { flex: 0 0 96px; height: 76px; font-size: .88rem; }
  .gameshead { padding-block: 14px 4px; }
  /* two cards per row on phones — smaller, not just shorter (Kadima, 2026-08-24) */
  .grid, .grid--3, .grid--4, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* two columns on phones must be allowed to shrink: a bare 1fr keeps each column at its
     min-content width, which pushed the second column off-screen with no way to scroll to it */
  .grid--2m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid > *, .grid--2m > * { min-width: 0; }

  /* denser cards on phones — Kadima asked for smaller tiles (2026-08-24) */
  .card { padding: 13px 14px; gap: 8px; border-radius: 14px; }
  .card__title { font-size: 1.09rem; }
  .card__sub { font-size: .94rem; line-height: 1.4; }
  .acard { padding: 9px 10px 8px; padding-inline-end: 28px; min-height: 0; gap: 4px; }
  .acard__title { font-size: 1rem; line-height: 1.24; }
  .acard__title, .card__title, .gtile__theme { overflow-wrap: anywhere; }
  .acard__goal { font-size: .89rem; line-height: 1.35; }
  /* the card was mostly air: an auto margin above the tags, then two wrapped rows of
     full-size chips and meta. Tighten all three. */
  .acard__tags { margin-top: 4px; gap: 4px; }
  /* inside a card, pills cost a whole row each — on phones they become plain text */
  .acard__tags { gap: 4px 8px; margin-top: 2px; }
  .acard__tags .chip { font-size: .77rem; padding: 0; background: none; border: 0; color: var(--muted); font-weight: 700; }
  .acard__tags .chip--lvl, .acard__tags .chip--dark, .acard__tags .chip--orange { color: var(--ink-2); background: none; }
  .acard__tags .chip + .chip::before { content: '·'; margin-inline-end: 8px; color: var(--line); }
  .acard__meta { gap: 2px 8px; font-size: .8rem; }
  .acard__meta svg { width: 14px; height: 14px; }
  .myv-badge { font-size: .7rem; padding: 2px 7px; }
  /* on a phone card, "has full content" is the normal case — only its absence is worth a marker */
  .acard .meta-full { display: none; }
  .card .fav { inset-inline-end: 5px; top: 5px; width: 24px; height: 24px; }
  .card .fav svg { width: 14px; height: 14px; }
  /* in a half-width column the row layout truncates the subtitle — stack it instead */
  .gtile { flex-direction: column; align-items: stretch; padding: 11px 12px; gap: 7px; border-radius: 14px; }
  .gtile__letter { width: 34px; height: 34px; border-radius: 10px; }
  .gtile__theme { font-size: 1.06rem; }
  .gtile__sub { font-size: .87rem; white-space: normal; overflow: visible; }
  .gtile__arrow { display: none; }
  .toolcard { gap: 5px; padding: 11px 12px; }
  .toolcard__icon { width: 32px; height: 32px; border-radius: 9px; margin-bottom: 2px; }
  .toolcard__icon svg { width: 18px; height: 18px; }
  .guidecard { gap: 4px; padding: 11px 12px; }
  .guidecard .card__sub, .toolcard .card__sub { font-size: .9rem; line-height: 1.35; }
  .chip { font-size: .8rem; padding: 4px 9px; }
  .tlrow { padding: 10px 12px; gap: 10px; }
  .tlrow__title { font-size: 1.05rem; }
  /* link rows keep the full width — they are list items with a description, not tiles */
  .grid:has(> .linkcard) { grid-template-columns: 1fr; }
  .linkcard { padding: 11px 12px; }
  .acard { min-height: 0; }

  /* squarer tiles on phones — the short ones read as strips otherwise (Jonathan, 2026-08-26) */
  .card { min-height: 132px; }
  .gtile { min-height: 124px; }
  .acard { min-height: 124px; }
  .grid:has(> .linkcard) .linkcard, .linkcard { min-height: 0; }
}

/* ---------- print ---------- */
@media print {
  .topbar, .bottombar, .footer, .actions, .prevnext, .fav, .crumb,
  .acard-acts, .vswitch, .hrow__nav, .hrow__fade, .toast, .modal, .fbar, .note--sample, .demo-pill { display: none !important; }
  aside .panel { display: none !important; }
  aside .panel--equip, aside .panel:first-child { display: block !important; }
  body { background: #fff; font-size: 12pt; }
  .act-layout { display: block; }
  .acthead { padding-top: 0; }
  .acthead-card { border: 0; box-shadow: none; background: #fff; padding: 0 0 10px; }
  .acthead-card h1 { font-size: 1.9rem; }
  .panel { border: 0; box-shadow: none; padding: 0; margin-top: 16px; break-inside: avoid; background: #fff; }
  .step, .ed__block { break-inside: avoid; }
  .chip { border: 1px solid #ccc; background: #fff !important; color: #333 !important; }
}

/* ===== activity sheet (מערך מעוצב) ===== */
.asheetwrap > .crumb { margin: 14px 4px 10px; }
.asheet { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 14px 40px rgba(23,23,26,.07); overflow: hidden; margin-bottom: 8px; }
.asheet__band { height: 96px; background: var(--orange-50); position: relative; }
.asheet__band::before { content: ''; position: absolute; inset: 0; background: url('assets/pattern.svg') top center / 700px 480px repeat; opacity: .5; }
.asheet__plate { text-align: center; margin-top: -46px; position: relative; padding: 0 24px; }
.asheet__plate h1 { display: inline-block; background: #fff; border-radius: 18px; padding: 12px 40px 14px; box-shadow: 0 10px 26px rgba(23,23,26,.1); font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; max-width: 100%; }
.asheet__chips { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.asheet__plate .acard-acts { margin: 14px 0 0; padding: 6px 4px; }
.asheet__pg { padding: 4px 40px 38px; }
.aslab { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; }
.aslab .ico { width: 40px; height: 40px; border-radius: 999px; background: color-mix(in srgb, var(--sc) 14%, #fff); border: 2.5px solid color-mix(in srgb, var(--sc) 45%, #fff); display: grid; place-items: center; color: color-mix(in srgb, var(--sc) 70%, #000); flex: 0 0 40px; }
.aslab .ico svg { width: 21px; height: 21px; }
.aslab b { font-size: 1.15rem; font-weight: 900; }
.aslab small { color: var(--muted); font-weight: 600; }
.abox { background: #F7F3EC; border-radius: 16px; padding: 14px 20px; }
.abox--or { background: var(--orange-50); font-weight: 700; color: var(--orange-700); }
.aabc { margin: 0 16px 0 0; padding: 0; list-style: none; }
.aabc li { margin: 3px 0; font-size: 1rem; }
.acompassrow { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.acompassrow .aslab { margin: 0; flex-shrink: 0; }
.acompassrow .abox { flex: 1; }
.acards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.acards + .acards { margin-top: 14px; }
.ascard { border: 1.5px solid var(--line); border-radius: 18px; padding: 16px 18px 14px; box-shadow: 0 8px 20px rgba(23,23,26,.05); background: #fff; }
.ascard h3 { font-size: 1.06rem; font-weight: 900; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ascard h3 .m { font-size: .78rem; font-weight: 800; color: var(--orange-700); background: var(--orange-50); border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.ascard > p { color: var(--ink-2); font-size: .93rem; margin-top: 7px; }
.aqs { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.aq { display: flex; gap: 8px; font-size: .9rem; color: var(--ink-2); align-items: baseline; }
.aq::before { content: ''; flex: 0 0 13px; height: 12px; align-self: center; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8A93' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M21 12a8 8 0 0 1-8 8H4l2-3a8 8 0 1 1 15-5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.awband { margin: 16px -40px; background: var(--orange-100); padding: 10px 40px; font-family: var(--font-hand); font-size: 1.2rem; color: var(--orange-700); text-align: center; }
.aeqrow { display: flex; flex-wrap: wrap; gap: 8px; }
.aeqpill { display: inline-flex; gap: 8px; align-items: center; background: #F7F3EC; border-radius: 99px; padding: 7px 15px; font-size: .9rem; font-weight: 600; cursor: pointer; }
.aeqpill input { accent-color: var(--orange); width: 15px; height: 15px; }
.asumrow { display: flex; align-items: center; justify-content: flex-start; gap: 30px; margin-top: 22px; padding-bottom: 18px; border-bottom: 1.5px dashed var(--line); flex-wrap: wrap; }
.amadatz { font-weight: 900; font-size: 1.12rem; }
.astamp { font-family: var(--font-hand); color: var(--orange-700); font-size: 2rem; transform: rotate(-5deg); position: relative; padding: .1em .4em; white-space: nowrap; }
.astamp::before { content: ''; position: absolute; inset: -16% -6% -12% -8%; background: url('assets/swoosh-orange.svg') center / 100% 100% no-repeat; z-index: -1; }
.abelow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; align-items: start; }
.abelow > .panel { margin-top: 0; }
@media (max-width: 760px) {
  .acards { grid-template-columns: 1fr; }
  .asheet__pg { padding: 4px 20px 30px; }
  .awband { margin-inline: -20px; padding-inline: 20px; }
  .abelow { grid-template-columns: 1fr; }
  .acompassrow { flex-direction: column; align-items: stretch; }
  .asheet__plate h1 { padding: 10px 22px 12px; }
}
@media print {
  .asheet { border: 0; box-shadow: none; }
  .asheet__band { display: none; }
  .asheet__plate { margin-top: 0; }
  .asheet__plate h1 { box-shadow: none; padding: 0; }
  .abelow { display: none !important; }
}

/* ===== editor modal (מצב עריכה) ===== */
body.is-editing { overflow: hidden; }
.akind { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--muted); margin-inline-start: 4px; vertical-align: middle; }
.akind svg { width: 13px; height: 13px; }
.edov { position: fixed; inset: 0; z-index: 60; background: rgba(23,23,26,.5); display: flex; justify-content: center; padding: 22px; }
.edm { width: min(900px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.28); display: flex; flex-direction: column; overflow: hidden; }
.edm__top { padding: 14px 22px 12px; display: flex; align-items: center; gap: 14px; }
.edm__ttl { min-width: 0; }
.edm__top h1 { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edm__sub { color: var(--muted); font-size: .84rem; font-weight: 600; }
.edm__total { margin-inline-start: auto; padding-inline-end: 4px; font-weight: 700; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.edm__total b { color: var(--ink); font-size: 1rem; }
.edm__total.is-over b { color: var(--coral); }
.edm__x { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); flex: 0 0 34px; }
.edm__x:hover { color: var(--ink); border-color: var(--muted); }
.edm__x svg { width: 16px; height: 16px; }
.edm__done { border-radius: 9px; }
.edm__prog { height: 3px; background: var(--line-2); position: relative; }
.edm__prog i { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; background: var(--orange); transition: width .2s; }
.edm__body { overflow: auto; padding: 6px 22px 28px; background: #FDFBF8; border-top: 1px solid var(--line); flex: 1; }
.edm__sec { display: flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: .92rem; color: var(--ink); margin: 22px 0 10px; }
.edm__sec small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.edm__title { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; font-weight: 800; font-size: 1.1rem; background: #fff; outline: 0; }
.edm__title:focus { border-color: var(--orange); }
.eblk { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.eblk:hover { border-color: #D9D0C3; }
.eblk:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240,132,24,.12); }
.eblk.is-break { background: var(--line-2); border-style: dashed; padding-bottom: 12px; }
.eblk__row1 { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; }
.eblk__n { font-weight: 800; color: var(--muted); font-size: .88rem; display: grid; place-items: center; }
.eblk__n svg { width: 17px; height: 17px; color: var(--orange-700); }
.eblk__nm { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.eblk__name { border: 0; font: inherit; font-weight: 800; font-size: 1.04rem; padding: 2px 0; background: transparent; outline: 0; min-width: 0; flex: 1; border-bottom: 1.5px solid transparent; color: var(--ink); }
.eblk__name:hover { border-bottom-color: var(--line); }
.eblk__name:focus { border-bottom-color: var(--orange); }
.eblk__kind { color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.emin { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: .86rem; background: #fff; }
.emin input { width: 36px; border: 0; text-align: center; font: inherit; font-weight: 800; padding: 4px 0; outline: 0; }
.emin button { border: 0; background: var(--line-2); width: 26px; height: 30px; cursor: pointer; color: var(--ink-2); font-weight: 800; }
.emin button:hover { background: var(--line); }
.emin span { color: var(--muted); padding-inline-end: 8px; font-weight: 600; }
.eblk__text { display: block; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .94rem; line-height: 1.55; color: var(--ink-2); margin: 8px 0 0 -10px; width: calc(100% + 10px); resize: none; min-height: 58px; outline: 0; background: transparent; }
.eblk__text:hover { background: var(--line-2); }
.eblk__text:focus { background: #fff; border-color: var(--line); }
.eblk__acts { display: flex; align-items: center; gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line-2); }
.elnk { border: 0; background: none; font: inherit; font-size: .84rem; font-weight: 700; color: var(--ink-2); cursor: pointer; padding: 5px 9px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; }
.elnk svg { width: 15px; height: 15px; }
.elnk:hover { background: var(--line-2); color: var(--ink); }
.elnk--del { color: var(--muted); margin-inline-start: auto; }
.elnk--del:hover { color: var(--coral); background: #FBEDEB; }
.esep { width: 1px; height: 14px; background: var(--line); margin: 0 6px; }
.emv { display: inline-flex; }
.emv button { border: 0; background: none; width: 26px; height: 26px; cursor: pointer; color: var(--muted); border-radius: 6px; display: grid; place-items: center; }
.emv button svg { width: 14px; height: 14px; transform: rotate(-90deg); }
.emv button + button svg { transform: rotate(90deg); }
.emv button:disabled { opacity: .3; cursor: default; }
.emv button:not(:disabled):hover { background: var(--line-2); color: var(--ink); }
.eins { position: relative; display: flex; align-items: center; justify-content: center; height: 30px; }
.eins::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.eins > button { position: relative; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; font-weight: 900; line-height: 1; display: grid; place-items: center; transition: .12s; font-size: .95rem; }
.eins:hover > button, .eins > button:hover { border-color: var(--orange); color: var(--orange-700); transform: scale(1.12); }
.emenu { position: absolute; top: 30px; right: 50%; transform: translateX(50%); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 5px; z-index: 3; min-width: 210px; }
.emenu div { padding: 8px 12px; font-size: .9rem; font-weight: 700; border-radius: 7px; display: flex; align-items: center; gap: 9px; color: var(--ink-2); cursor: pointer; }
.emenu div svg { width: 15px; height: 15px; }
.emenu div:hover { background: var(--line-2); color: var(--ink); }
.emenu div small { margin-inline-start: auto; color: var(--muted); font-weight: 600; font-size: .78rem; }
.edm__eq { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; }
.edm__eq > div { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line-2); font-size: .95rem; }
.edm__eq > div:last-child { border-bottom: 0; }
.edm__eq input { border: 0; font: inherit; flex: 1; outline: 0; background: transparent; }
.edm__eq .x { border: 0; background: none; color: var(--muted); cursor: pointer; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; }
.edm__eq .x svg { width: 14px; height: 14px; }
.edm__eq .x:hover { color: var(--coral); background: #FBEDEB; }
.edm__addrow { color: var(--orange-700); font-weight: 700; cursor: pointer; font-size: .9rem; }
.edm__notes { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font: inherit; font-size: .94rem; color: var(--ink-2); min-height: 64px; outline: 0; background: #fff; resize: none; }
.edm__notes:focus { border-color: var(--orange); }
.edm__foot { border-top: 1px solid var(--line); padding: 12px 22px; display: flex; gap: 18px; align-items: center; background: #fff; }
.edm__hint { color: var(--muted); font-size: .84rem; margin-inline-end: auto; display: inline-flex; align-items: center; gap: 6px; }
.edm__hint i { width: 7px; height: 7px; border-radius: 99px; background: #2E8B57; display: inline-block; }
.edm__reset { color: var(--muted); font-weight: 700; background: none; border: 0; cursor: pointer; font: inherit; }
.edm__reset:hover { color: var(--coral); }
@media (max-width: 760px) {
  .edov { padding: 0; }
  .edm { border-radius: 0; }
  .edm__top { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .edm__body { padding: 4px 14px 24px; }
  .eblk__row1 { grid-template-columns: 22px 1fr; }
  .eblk__row1 .emin { grid-column: 2; justify-self: start; }
  .eblk__acts { flex-wrap: wrap; }
}
@media print { .edov { display: none !important; } }
.abelow > :only-child { grid-column: 1 / -1; }
.myv-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--teal-50); color: #0B7D7B; border-radius: 999px; padding: 2px 9px; font-size: .82rem; font-weight: 800; }
.alink { color: var(--orange-700); font-weight: 700; text-decoration: underline; text-decoration-color: var(--orange-100); text-underline-offset: 3px; word-break: break-all; }
.abox--hint { margin-top: 10px; font-size: .92rem; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.abox--hint svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px; color: var(--orange-700); }
.afiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.afile { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; font-weight: 700; transition: .15s; }
.afile:hover { border-color: var(--orange); }
.afile svg { width: 18px; height: 18px; color: var(--orange-700); flex: 0 0 18px; }
.afile span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afile small { color: var(--muted); font-weight: 700; font-size: .72rem; white-space: nowrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.gallery a { display: block; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); background: #fff; transition: .15s; }
.gallery a:hover { border-color: var(--orange); transform: translateY(-2px); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery--wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery--wide a { aspect-ratio: 4 / 3; }
.fmob__extra { display: none; }
@media (max-width: 760px) {
  .fmob__extra { display: flex; justify-content: center; margin-top: 8px; }
  .fmob__extra .rollseg { border: 1.5px dashed var(--orange); border-radius: 999px; background: var(--orange-50); margin: 0; padding: 7px 16px; height: auto; }
  .edm__foot { flex-wrap: wrap; gap: 10px 14px; padding: 10px 14px; }
  .edm__hint { font-size: .78rem; }
  .edm__reset { white-space: nowrap; }
  .edm__done { margin-inline-start: auto; }
}

/* ---------- language switch ---------- */
.langsw { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; font-size: .9rem; color: var(--ink-2); transition: .15s; }
.langsw svg { width: 17px; height: 17px; color: var(--orange-700); }
.langsw:hover { border-color: var(--orange); color: var(--ink); background: var(--orange-50); }
.topmenu__lang { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px !important; color: var(--orange-700) !important; font-weight: 800; }
.ob__lang { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; color: var(--ink-2); }
.ob__lang svg { width: 18px; height: 18px; color: var(--orange-700); }
.ob__lang:hover { border-color: var(--orange); background: var(--orange-50); color: var(--ink); }
@media (max-width: 900px) { .langsw span { display: none; } .langsw { padding: 7px 9px; } }

/* ---------- arabic build ---------- */
html[lang="ar"] { --font: 'Tajawal', 'Noto Kufi Arabic', system-ui, sans-serif; --font-display: 'Baloo Bhaijaan 2', 'Tajawal', system-ui, sans-serif; --font-hand: 'Baloo Bhaijaan 2', 'Tajawal', system-ui, sans-serif; }
html[lang="ar"] .page-head h1, html[lang="ar"] .hero h1, html[lang="ar"] .gameshead h1, html[lang="ar"] .gradehead h1, html[lang="ar"] .ob__title { font-weight: 700; letter-spacing: 0; }
html[lang="ar"] .section__head h2, html[lang="ar"] .mygrade__title { font-weight: 700; }
html[lang="ar"] .brand__text { font-size: .95rem; line-height: 1.15; }
html[lang="ar"] .brand { gap: 10px; }

/* ---------- arabic top bar: labels are longer than the Hebrew ones ----------
   the Hebrew nav is absolutely centred, which can overlap the brand / actions once the
   labels grow. For Arabic the nav joins the flex flow (auto margins keep it centred in the
   free space) so it can never overlap, and it tightens progressively as the window narrows. */
html[lang="ar"] .mainnav { position: static; transform: none; margin-inline: auto; min-width: 0; }
html[lang="ar"] .topbar__in { gap: 8px; }
html[lang="ar"] .brand { flex: 0 0 auto; }
html[lang="ar"] .topbar__actions { flex: 0 0 auto; }
@media (max-width: 1240px) {
  html[lang="ar"] .mainnav > a, html[lang="ar"] .topmenu__btn { padding: 8px 10px; font-size: .95rem; gap: 6px; }
  html[lang="ar"] .langsw span { display: none; }
  html[lang="ar"] .langsw { padding: 7px 9px; }
}
@media (max-width: 1080px) {
  html[lang="ar"] .mainnav > a svg { display: none; }
  html[lang="ar"] .mainnav > a, html[lang="ar"] .topmenu__btn { padding: 8px 9px; font-size: .92rem; }
}
@media (max-width: 900px) {
  html[lang="ar"] .brand__text { display: none; }
  html[lang="ar"] .mainnav > a, html[lang="ar"] .topmenu__btn { padding: 7px 7px; font-size: .89rem; }
}

/* ---------- narrow desktop: the centred nav must not reach the brand or the actions ----------
   (the language pill widened the actions block; below ~1000px the nav tightens instead of overlapping) */
@media (max-width: 1120px) {
  .langsw span { display: none; }
  .langsw { padding: 7px 9px; }
  .mainnav > a, .topmenu__btn { padding: 8px 10px; font-size: .95rem; gap: 6px; }
  .mainnav > a svg { width: 17px; height: 17px; }
}
@media (max-width: 880px) {
  .mainnav > a svg { display: none; }
  .mainnav > a, .topmenu__btn { padding: 7px 8px; font-size: .92rem; }
  .brand__text { display: none; }
}
@media (max-width: 830px) {
  #userLabel { display: none; }
  .userchip { padding-inline: 9px; }
}
