/* לייבעדיק מאסטר – רקע כהה, סגול זוהר, נגיעות זהב */
:root {
  --bg: #F5F4FA; --surface: #ffffff; --surface-2: #EEECF9; --line: #E1DEEF;
  --purple: #5B50D6; --purple-soft: #4A40C2; --gold: #C0964C; --gold-ink: #7A5A16; --gold-soft: #F7EEDB;
  --text: #1B1838; --muted: #5B5878; --good: #1D7A52; --bad: #BF2F49;
  --stage: #12102A; --stage-2: #0B0A1C;
  --radius: 14px; --shadow: 0 1px 2px rgba(27, 24, 56, .06), 0 8px 24px rgba(27, 24, 56, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 "Heebo", "Assistant", "Rubik", "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
}
h1, h2, h3 { margin: 0 0 .5em; font-weight: 800; line-height: 1.2; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--purple-soft); }
bdi { unicode-bidi: isolate; }
code { background: var(--surface-2); padding: .15em .5em; border-radius: 6px; font-size: .95em; word-break: break-all; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.boot, .muted { color: var(--muted); }
.boot { text-align: center; padding: 4rem 1rem; }
.small { font-size: .875rem; }
.error { color: var(--bad); min-height: 1.2em; margin: 0; }
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; text-align: center; }

/* סימן המותג */
.logo { display: block; height: 44px; width: auto; }
.logo.big { height: 92px; margin: 2.2rem auto 1.6rem; }

/* כפתורים */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: .55rem 1.4rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--purple); }
.btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: 0 6px 16px rgba(91, 80, 214, .25); }
.btn.primary:hover { background: #4A40C2; }
.btn.small { min-height: 36px; padding: .3rem 1rem; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.link { background: none; border: 0; padding: .25rem 0; color: var(--purple-soft); font: inherit; cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--bad); }
.link:disabled { opacity: .5; }

.chip { display: inline-block; padding: .1rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.good { color: var(--good); border-color: rgba(29, 122, 82, .35); background: #E4F3EC; }
.chip.bad { color: var(--bad); border-color: rgba(191, 47, 73, .35); background: #FBE9EC; }
.chip.gold { background: var(--gold-soft); color: var(--gold-ink); border-color: #E6D3A8; }

/* טפסים */
.form { display: grid; gap: .9rem; max-width: 26rem; }
.field { display: grid; gap: .3rem; }
.field > span { font-weight: 700; font-size: .95rem; }
.field small, .steps small { color: var(--muted); }
input, select {
  width: 100%; min-height: 46px; padding: .5rem .9rem; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit;
}
input[dir="ltr"] { text-align: left; }
input:focus, select:focus { border-color: var(--purple); outline: none; box-shadow: 0 0 0 3px rgba(91, 80, 214, .3); }
input[type="file"] { padding: .6rem; }
input[type="search"] { max-width: 24rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.card.narrow { max-width: 30rem; }

/* מסכי כניסה */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; position: relative; overflow: hidden; background: radial-gradient(ellipse 60rem 40rem at 50% 45%, rgba(110, 100, 235, .55), rgba(110, 100, 235, 0) 70%), var(--stage); }
.rings {
  position: absolute; inset-inline-start: 50%; top: 50%; width: 1500px; height: 1500px; transform: translate(50%, -50%);
  background: repeating-radial-gradient(circle, transparent 0 118px, rgba(160, 152, 250, .14) 118px 119px);
  pointer-events: none;
}
[dir="rtl"] .rings { transform: translate(50%, -50%); }
.auth-card { position: relative; width: 100%; max-width: 27rem; padding: 0 1.6rem 1.6rem; overflow: hidden; margin: 0; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); border: 0; }
.auth-card .banner { display: block; width: 100%; height: auto; margin: 1.2rem 0 1.3rem; border-radius: 15% 15% 0 0 / 36% 36% 0 0; }
.auth-card .form { max-width: none; }
.auth-card .btn { width: 100%; }
.qr { display: block; width: 190px; height: 190px; margin: 0 auto 1rem; background: #fff; border-radius: 12px; padding: 8px; }

/* מעטפת */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  padding: .7rem clamp(1rem, 4vw, 2.5rem); background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; }
.top nav { display: flex; gap: 0; flex-wrap: wrap; flex: 1; font-size: .92rem; }
.top nav a { padding: .45rem .55rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--text); }
.top nav a.on { background: var(--surface-2); color: var(--purple-soft); font-weight: 700; }
.who { display: flex; align-items: center; gap: .7rem; font-size: .9rem; }
.who a { color: var(--text); text-decoration: none; font-weight: 700; }
.page { max-width: 68rem; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2.5rem) 4rem; }
.page > h1 { margin-bottom: .3em; }
.page h2 { margin-top: 1.6rem; }
.card h2:first-child, .card > .row h2 { margin-top: 0; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: .4rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.row h2 { margin-bottom: 0; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.tile {
  display: grid; gap: .6rem; justify-items: start; padding: 1.2rem; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--purple); box-shadow: 0 10px 28px rgba(91, 80, 214, .16); }
.tile h2, .tile h3 { margin: 0; }
.soon { border-style: dashed; }
.people { columns: 14rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.people li { padding: .3rem 0; border-bottom: 1px solid var(--line); break-inside: avoid; }

.steps { display: grid; gap: 1.2rem; padding-inline-start: 1.3rem; margin: 0 0 1rem; max-width: 30rem; }
.steps li { display: grid; gap: .4rem; }
.steps li::marker { color: var(--gold-ink); font-weight: 800; }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 1rem 0; }
.bar i { display: block; height: 100%; width: 0; background: var(--purple); transition: width .3s; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: .75rem 0 1rem; background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .65rem .9rem; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--surface-2); color: var(--muted); font-size: .85rem; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

/* הכיתה */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: .55rem;
  min-height: 15.5rem; padding: 1.6rem clamp(1.3rem, 4vw, 2.75rem) 2.4rem; margin-bottom: 1.1rem; border-radius: 22px; color: #fff;
  background: radial-gradient(ellipse 30rem 21rem at 15rem 56%, rgba(134, 124, 246, .92), rgba(134, 124, 246, 0) 72%),
              radial-gradient(ellipse 60rem 30rem at 0 100%, rgba(91, 80, 214, .35), rgba(91, 80, 214, 0) 70%), var(--stage); }
.hero > * { position: relative; }
.hero .floor { position: absolute; inset: auto 0 0 0; height: 1rem; background: var(--stage-2); }
.hero .shots { position: absolute; inset-block: 0; inset-inline-end: 3rem; width: min(26rem, 46%); pointer-events: none; }
.hero .shot { position: absolute; left: 50%; bottom: .5rem; transform: translateX(-50%); max-width: 100%; max-height: calc(100% - 1.6rem); opacity: 0;
  animation: stage-cycle 35s linear infinite; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.hero .shot:nth-child(2) { animation-delay: -28s; } .hero .shot:nth-child(3) { animation-delay: -21s; }
.hero .shot:nth-child(4) { animation-delay: -14s; } .hero .shot:nth-child(5) { animation-delay: -7s; }
@keyframes stage-cycle { 0% { opacity: 0; } 5% { opacity: 1; } 17% { opacity: 1; } 22% { opacity: 0; } 100% { opacity: 0; } }
.hero h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 900; margin: 0; line-height: 1.05; letter-spacing: -.02em; max-width: 52%; }
.hero .chip.gold { background: transparent; color: #EBCB8B; border: 1.5px solid #D9B36A; padding: .2rem .95rem; font-size: .85rem; }
.hero .next { margin: 0; color: #DAD7F6; max-width: 52%; }
.hero .next b { color: #EBCB8B; }
.hero .crumbs { margin: 0; color: #C2BEE6; } .hero .crumbs a { color: #fff; }
.tabs { display: flex; gap: 1.6rem; align-items: center; overflow-x: auto; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .65rem .1rem .8rem; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); font-weight: 800; border-bottom-color: var(--gold); }
.tabs .chip { margin-inline-start: auto; }
.posts { display: grid; gap: 1rem; margin-top: 1rem; }
.post { display: grid; gap: .7rem; justify-items: start; padding: 1.3rem 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.by { display: flex; align-items: center; gap: .7rem; width: 100%; }
.by > div { display: grid; line-height: 1.3; }
.by .chip { margin-inline-start: auto; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--purple); }
.avatar.av1 { background: #8A6420; } .avatar.av2 { background: #1D7A52; } .avatar.av3 { background: #2A2466; } .avatar.av4 { background: #A0435A; }
.post footer:empty { display: none; }
.classroom { display: block; }
.menu-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .3rem .95rem; margin-bottom: .9rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.menu-btn:hover { border-color: var(--purple); color: var(--purple-soft); }
.scrim { position: fixed; inset: 0; z-index: 29; background: rgba(18, 16, 42, .4); display: none; }
.classroom.open .scrim { display: block; }
.tabs.side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 30; width: 17rem; display: flex; flex-direction: column; gap: .15rem; align-items: stretch; overflow-y: auto;
  margin: 0; padding: 1.2rem .9rem; background: var(--surface); border: 0; border-inline-end: 1px solid var(--line); box-shadow: 0 0 60px rgba(27, 24, 56, .25);
  transform: translateX(105%); visibility: hidden; transition: transform .2s ease, visibility 0s .2s; }
.classroom.open .tabs.side { transform: none; visibility: visible; transition: transform .2s ease; }
.tabs.side a { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: 12px; border: 0; margin: 0; font-weight: 500; color: var(--text); }
.tabs.side a:hover { background: var(--surface-2); }
.tabs.side a.on { background: var(--purple); color: #fff; font-weight: 700; }
.tabs.side .grp { font-size: .8rem; font-weight: 700; color: var(--muted); padding: .9rem .8rem .2rem; }
.tabs.side .ttl { font-size: 1.15rem; font-weight: 800; padding: .2rem .8rem .8rem; border-bottom: 1px solid var(--line); margin-bottom: .5rem; }
.progress { display: flex; align-items: center; gap: .8rem; margin-inline-start: auto; padding: .55rem 1.1rem .55rem .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.progress > span { display: grid; line-height: 1.3; }
.ring { width: 54px; height: 54px; flex: none; }
.ring circle { fill: none; stroke-width: 8; } .ring .bg { stroke: #E9E6FB; } .ring .fg { stroke: var(--purple); stroke-linecap: round; }
.ring text { font-size: 15px; font-weight: 800; fill: var(--text); }
.dock { display: none; }
.hero.compact { min-height: 8.5rem; padding-bottom: 1.9rem; }
.hero.compact h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.hero.compact .shots { width: min(18rem, 40%); }
.hello { display: flex; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap; margin: .2rem 0 1.1rem; }
.hello h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 900; margin: 0; letter-spacing: -.02em; }
.hero.now { min-height: 13.5rem; margin-bottom: 0; }
.hero.now h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.hero .btn { background: #fff; color: var(--text); border: 0; margin-top: .3rem; padding-inline: 1.8rem; }
.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin: 1.2rem 0 1.6rem; }
.area { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; min-height: 11.5rem; padding: 1.4rem 1.5rem; border-radius: 24px; text-decoration: none; color: var(--text); }
.area.a1 { background: #E9E6FB; } .area.a2 { background: #F7EEDB; } .area.a3 { background: #DDF1E7; }
.area:hover { box-shadow: 0 10px 28px rgba(27, 24, 56, .14); }
.area .go { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.area .ic { width: 58px; height: 58px; flex: none; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--purple); }
.area.a2 .ic { background: #8A6420; } .area.a3 .ic { background: #1D7A52; }
.area .ic .ico { width: 30px; height: 30px; }
.area .n { background: #fff; border-radius: 999px; padding: .25rem .85rem; font-size: .85rem; font-weight: 700; }
.area h3 { font-size: 1.7rem; font-weight: 800; margin: 0; display: block; } .area p { margin: .15rem 0 0; color: #3D3A5C; display: block; }
.row.between { justify-content: space-between; } .row.between h2 { margin: 0; } .row.between a { font-weight: 700; text-decoration: none; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stream { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-top: 1rem; }
.stream .posts { margin-top: 0; } .stream .composer { margin: 0 0 1rem; }
.upnext { margin: 0; padding: 1.1rem 1.2rem; position: sticky; top: 6rem; }
.upnext h2 { font-size: 1rem; margin: 0 0 .5rem; }
.up-row { display: flex; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.up-row .ico { color: var(--purple); margin-top: .2rem; }
.up-row span { display: grid; line-height: 1.35; min-width: 0; } .up-row b { overflow-wrap: anywhere; }
a.up-row:hover b { color: var(--purple-soft); }
.upnext .more { display: inline-block; margin-top: .6rem; font-weight: 700; text-decoration: none; }
.feed-row { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.feed-row:hover { border-color: var(--purple); }
.feed-row > div { display: grid; min-width: 0; line-height: 1.4; } .feed-row .t { overflow-wrap: anywhere; }
.feed-row .chip { margin-inline-start: auto; }
.post.topic-row { grid-template-columns: 40px minmax(0, 1fr) auto 9.5rem; align-items: center; gap: .4rem 1rem; padding: 1rem 1.3rem; }
.tr-main { display: grid; gap: .3rem; min-width: 0; } .tr-main h3 { margin: 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.tr-num { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; white-space: nowrap; }
.tr-last { display: grid; line-height: 1.35; } .tr-last b { color: var(--text); font-weight: 500; }
.post.pinned { border-color: #E0CB9B; box-shadow: inset 0 3px 0 var(--gold), var(--shadow); }
.post h3 { margin: 0; font-size: 1.2rem; }
.post .body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; }
.post footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; width: 100%; padding-top: .7rem; border-top: 1px solid var(--line); }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.file { display: inline-flex; align-items: baseline; gap: .6rem; min-height: 44px; padding: .5rem 1rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: start; }
.file::before { content: "⭳"; color: var(--gold-ink); font-weight: 800; }
.file:hover { border-color: var(--purple); }
.file span { overflow-wrap: anywhere; }
.file small { color: var(--muted); white-space: nowrap; }
.composer { padding: 0; margin: 1rem 0 0; }
.composer summary { padding: 1rem 1.4rem; font-weight: 800; cursor: pointer; color: var(--purple-soft); list-style: none; }
.composer summary::-webkit-details-marker { display: none; }
.composer[open] summary { border-bottom: 1px solid var(--line); }
.composer .form { padding: 1.2rem 1.4rem 1.4rem; }
.form.wide { max-width: 42rem; }
.form.wide .btn { justify-self: start; }
textarea { width: 100%; padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; resize: vertical; }
textarea:focus { border-color: var(--purple); outline: none; box-shadow: 0 0 0 3px rgba(91, 80, 214, .3); }
.check { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.check input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--purple); }
.sessions { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.sessions li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; padding: .9rem 1.2rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.sessions li b { color: var(--purple-soft); min-width: 5rem; }
.sessions li.past { opacity: .55; }
.sessions li .link { margin-inline-start: auto; }

a.post.task { text-decoration: none; color: var(--text); }
a.post.task:hover { border-color: var(--purple); box-shadow: 0 10px 28px rgba(91, 80, 214, .16); }
.post h2 { margin: 0; }
.post .form { width: 100%; max-width: 42rem; }
.post .form .btn, .post .form .link { justify-self: start; }
.feedback { display: grid; gap: .4rem; width: 100%; padding: 1rem 1.2rem; border-radius: 14px; background: var(--gold-soft); border: 1px solid #E6D3A8; }
.feedback b { color: var(--gold-ink); }
.feedback .body { margin: 0; }
.feedback .grade strong { font-size: 1.5rem; font-weight: 900; color: var(--text); }
input.short { max-width: 8rem; }
.file.play::before { content: "▶"; }
li.file { cursor: default; }
li.file::before { content: "♪"; }
li.file.new { border-style: dashed; border-color: var(--purple); }
.files li audio { display: block; width: min(100%, 24rem); }
.files li video { display: block; width: min(100%, 30rem); border-radius: 12px; background: #000; }
.files li:has(audio), .files li:has(video) { display: grid; gap: .3rem; width: 100%; }
label.btn { position: relative; overflow: hidden; }
label.btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
label.btn:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.rec { background: #b3303f; border-color: #b3303f; color: #fff; }
form.card .actions { margin: 0; }

.questions { display: grid; gap: 1rem; counter-reset: q; width: 100%; }
.q { display: grid; gap: .6rem; margin: 0; padding: 1rem 1.2rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.q legend { padding: 0 .5rem; font-weight: 800; color: var(--purple-soft); }
.q legend::after { counter-increment: q; content: " " counter(q); }
.q-title { margin: 0; font-weight: 700; font-size: 1.1rem; }
.opts { display: grid; gap: .5rem; }
.opt { display: flex; align-items: center; gap: .6rem; }
input[type="radio"] { width: 22px; height: 22px; min-height: 22px; flex: none; padding: 0; accent-color: var(--purple); }
.choice { display: flex; align-items: center; gap: .7rem; min-height: 46px; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice:hover, .choice:has(:checked) { border-color: var(--purple); }
.choice:has(:checked) { background: rgba(91, 80, 214, .15); }
.review { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.review li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 12px; }
.review li.right { border-color: var(--good); background: #E4F3EC; }
.review li.right b { color: var(--good); }
.review li.wrong { border-color: var(--bad); background: #FBE9EC; }
.review li.wrong b { color: var(--bad); }
.score { display: grid; justify-items: center; gap: .2rem; padding: 1.5rem; margin: 1rem 0; border-radius: var(--radius); border: 1px solid #E6D3A8; background: var(--gold-soft); text-align: center; }
.score strong { font-size: 3.4rem; font-weight: 900; line-height: 1; color: var(--purple-soft); }

.chip.kind { border-color: var(--purple); color: var(--purple-soft); }
.chip.kind.quiz { border-color: #E6D3A8; color: var(--gold-ink); background: var(--gold-soft); }
.chip.kind.exam { background: var(--purple); border-color: var(--purple); color: #fff; }
.task .row h3 { margin: 0; }
.composer-body { display: grid; gap: 1.2rem; padding: 1.2rem 1.4rem 1.4rem; }
.composer .composer-body .form { padding: 0; }
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .6rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.types legend { padding: 0 0 .5rem; font-weight: 700; }
.types .choice { align-items: flex-start; }
.types .choice span { display: grid; gap: .15rem; }
.score .btn { margin-top: .6rem; }
.timer { position: sticky; top: 4.5rem; z-index: 4; justify-self: start; padding: .5rem 1.2rem; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1px solid var(--purple); box-shadow: 0 6px 24px rgba(27, 24, 56, .18); }
.timer.low { border-color: var(--bad); color: var(--bad); }

.byline { gap: .5rem; }
.post.reply { margin-inline-start: clamp(.5rem, 3vw, 2rem); background: #FAF9FE; }
.replies { margin-bottom: 1.2rem; }
.post .body.quote { padding: .7rem 1rem; border-inline-start: 3px solid var(--purple); background: var(--surface-2); border-radius: 8px; width: 100%; max-width: none; }
form.card.wide { max-width: none; }
.post > .form.wide { width: 100%; }
form.card.wide .field { max-width: 42rem; }

/* צ'אט */
.chat { display: grid; gap: .8rem; }
.chat-top { margin: 0; min-height: 0; }
.chat-list { display: flex; flex-direction: column; gap: .6rem; height: min(62vh, 40rem); overflow-y: auto; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #FAF9FE; overscroll-behavior: contain; }
.chat-empty { margin: auto; }
.msg { display: grid; gap: .35rem; max-width: min(85%, 38rem); padding: .7rem 1rem; border-radius: 16px; border-start-start-radius: 4px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.msg.mine { align-self: flex-end; background: #E9E6FB; border-color: #CFCAF3; border-start-start-radius: 16px; border-start-end-radius: 4px; }
.msg header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.msg .body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .msg-actions { gap: .9rem; font-size: .85rem; }
.msg .msg-actions:empty { display: none; }
.msg .form { max-width: none; min-width: min(60vw, 22rem); }
.media { display: grid; gap: .3rem; justify-items: start; }
.media audio { width: min(100%, 22rem); }
.media video, .media img { max-width: 100%; max-height: 22rem; border-radius: 12px; background: #000; }
.file.show::before { content: "▣"; }
div.file { cursor: default; }
div.file::before { content: "♪"; }
.chat-form { display: grid; gap: .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.chat-form .row .btn.primary { margin-inline-start: auto; }

.actions .end { margin-inline-start: auto; }

.modal { background: var(--surface); color: var(--text); border: 1px solid var(--purple); border-radius: var(--radius); padding: 1.5rem; width: min(26rem, calc(100% - 2rem)); box-shadow: 0 30px 80px rgba(27, 24, 56, .35); }
.modal::backdrop { background: rgba(18, 16, 42, .55); }
.modal .actions { margin-bottom: 0; }

.toast {
  position: fixed; inset-block-end: 1.5rem; inset-inline: 0; margin-inline: auto; width: fit-content; max-width: calc(100% - 2rem);
  background: var(--stage); border: 1px solid var(--stage); color: #fff; padding: .75rem 1.3rem; border-radius: 999px; z-index: 20;
  box-shadow: 0 10px 40px rgba(27, 24, 56, .35);
}
.toast.bad { background: #8E1F35; border-color: #8E1F35; }

@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .top nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .top nav a { white-space: nowrap; }
  .who { margin-inline-start: auto; }
  .who .chip, .tabs .chip { display: none; }
  .logo { height: 36px; }
  .menu-btn, .scrim, .classroom.open .scrim, .tabs.side .ttl { display: none; }
  .tabs.side { position: static; width: auto; flex-direction: row; overflow: visible; transform: none; visibility: visible; transition: none; margin-bottom: 1rem; gap: 0; padding: 4px; background: #E9E6FB; border: 0; border-radius: 999px; box-shadow: none; }
  .progress { margin-inline-start: 0; width: 100%; border-radius: 18px; }
  .tabs.side.solo { display: none; }
  .tabs.side .grp, .tabs.side a, .tabs.side a .ico { display: none; }
  .tabs.side a.cur { display: flex; flex: 1; justify-content: center; padding: .5rem .4rem; border-radius: 999px; white-space: nowrap; }
  .tabs.side a.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(27, 24, 56, .15); }
  .dock { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line);
    padding: .4rem .4rem calc(.5rem + env(safe-area-inset-bottom)); }
  .dock a { display: grid; justify-items: center; gap: .1rem; padding: .4rem 0; border-radius: 14px; font-size: .78rem; font-weight: 500; color: var(--muted); text-decoration: none; }
  .dock a .ico { width: 24px; height: 24px; }
  .dock a.on { color: var(--purple-soft); background: var(--surface-2); font-weight: 700; }
  .page:has(.dock) { padding-bottom: 6.5rem; } .toast { inset-block-end: 5.6rem; }
  .areas { grid-template-columns: 1fr; gap: .8rem; } .area { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 1rem; padding: 1rem 1.1rem; }
  .area .go { flex-direction: row; } .area .n { display: none; } .area h3 { font-size: 1.35rem; }
  .hero.now { min-height: 12rem; }
  .stream { grid-template-columns: 1fr; } .upnext { position: static; }
  .post.topic-row { grid-template-columns: 40px minmax(0, 1fr); } .tr-num, .tr-last { grid-column: 2; } .tr-last { display: flex; gap: .4rem; }
  .feed-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .5rem .9rem; } .feed-row .chip { grid-column: 2; justify-self: start; margin: 0; }
  .logo.big { height: 76px; }
  .hero { min-height: 13rem; }
  .hero .shots { inset-inline-end: 0; width: 50%; opacity: .4; }
  .hero h1, .hero .next { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .hero .shot { animation: none; } .hero .shot:first-child { opacity: 1; } }
.auth-card .form + p { margin-top: 1rem; }

/* קבוצה חדשה: ארבעה שדות בשורה */
.form:has(.four) { max-width: none; } .form:has(.four) .btn { justify-self: start; }
.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
/* לוח שנה */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 1rem; }
.cal-head { text-align: center; font-weight: 700; color: var(--muted); padding: .3rem 0; }
.cal-day { min-height: 6.5rem; padding: .45rem .5rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: .3rem; align-content: start; }
.cal-day.off { background: transparent; border-color: transparent; }
.cal-day.today { border-color: var(--purple); box-shadow: inset 0 0 0 1px var(--purple); }
.cal-num { display: flex; justify-content: space-between; align-items: baseline; gap: .3rem; } .cal-num span { font-size: .72rem; }
.cal-ev { display: grid; padding: .3rem .45rem; border-radius: 8px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .8rem; line-height: 1.3; overflow-wrap: anywhere; }
.cal-ev:hover { background: #E0DCF8; } .cal-ev .muted { font-size: .72rem; }
.cal-title { min-width: 8rem; text-align: center; }
@media (max-width: 760px) {
  .four { grid-template-columns: 1fr 1fr; }
  .cal { grid-template-columns: 1fr; } .cal-head, .cal-day.off, .cal-day:not(.has):not(.today) { display: none; } .cal-day { min-height: 0; }
}

/* ── כרטיסי חברי קבוצה ── */
.avatar.big { width: 64px; height: 64px; font-size: 1.5rem; }
img.avatar.photo { object-fit: cover; background: var(--surface-2); }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; margin: 0 0 1.5rem; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; display: grid; gap: .5rem; align-content: start; }
.phead { display: flex; align-items: center; gap: .8rem; }
.phead > div { display: grid; }
.pline { margin: 0; font-size: .92rem; overflow-wrap: anywhere; }
.pnotes { width: 100%; font: inherit; border: 1px dashed var(--line); border-radius: 8px; padding: .4rem .6rem; background: var(--surface-2); resize: vertical; }
.photo-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.insts { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; margin: 0 0 1rem; }
.insts legend { padding: 0 .4rem; font-weight: 700; }
label.inst { display: inline-flex; align-items: center; gap: .35rem; min-width: 7rem; padding: .25rem 0; }
