/* English Lessons – design: negru cald + auriu închis */
:root {
  --bg: #0d0c0a;
  --bg-2: #141310;
  --surface: #181714;
  --surface-2: #1f1d19;
  --line: #2b2823;
  --line-2: #3a362e;
  --text: #ece6da;
  --muted: #958d7e;
  --gold: #b48a2c;        /* auriu principal, închis */
  --gold-2: #c99b36;      /* la hover */
  --gold-deep: #7d5f1d;
  --gold-ink: #1a1408;    /* text pe auriu */
  --red: #d06a5b;
  --green: #7fae8c;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.55 var(--sans);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(180,138,44,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(180,138,44,.05), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
/* granulație fină, ca hârtia */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--gold); color: var(--gold-ink); }
a { color: var(--gold-2); }
main { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 28px 28px 64px; }
main > * { animation: rise .7s var(--ease) both; }
main > *:nth-child(2) { animation-delay: .06s; } main > *:nth-child(3) { animation-delay: .12s; }
main > *:nth-child(4) { animation-delay: .18s; } main > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* antet */
.site-head { position: relative; z-index: 2; max-width: 1040px; margin: 0 auto; padding: 26px 28px 6px; display: flex; align-items: center; }
.brand { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -.2px; color: var(--text); text-decoration: none; }
.brand i { font-style: italic; color: var(--gold-2); }

h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.4px; color: var(--text); }
h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.15; }
h2 { margin: 0 0 16px; font-size: 22px; }
.muted { color: var(--muted); }
.error { color: var(--red); }
.center { text-align: center; }
.code { letter-spacing: 2px; }

/* pagina de start */
.home { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; min-height: calc(100vh - 160px); }
.home > * { animation: rise .8s var(--ease) both; }
.home > .login-col { animation-delay: .15s; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 600; color: var(--gold); margin: 0 0 20px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -1.5px; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--gold-2); font-weight: 400; }
.lead { color: #bdb4a3; font-size: 17px; max-width: 470px; margin: 0 0 36px; }
.facts { list-style: none; padding: 26px 0 0; margin: 0; display: flex; gap: 40px; border-top: 1px solid var(--line); max-width: 470px; }
.facts b { display: block; font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--text); }
.facts span { font-size: 13px; color: var(--muted); }
.login-col { display: flex; flex-direction: column; gap: 16px; }
.card.login { padding: 34px; }
.teacher-link { align-self: center; color: var(--muted); font-size: 14px; text-decoration: none; }
.teacher-link span { color: var(--gold-2); border-bottom: 1px solid transparent; transition: border-color .2s; }
.teacher-link:hover span { border-color: var(--gold-2); }

/* suprafețe */
.card {
  position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
  border-radius: var(--r); padding: 26px; margin-bottom: 20px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 40px -24px rgba(0,0,0,.7);
}
.card.narrow { max-width: 440px; margin: 48px auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin: 18px 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topbar h1 { margin: 0; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.top-actions form, .topbar form { margin: 0; }
.notice { background: rgba(180,138,44,.08); border: 1px solid rgba(180,138,44,.35); color: #dccfb2; padding: 13px 16px; border-radius: 10px; font-size: 14px; }

/* formulare */
label { display: block; font-weight: 500; font-size: 13px; color: #c9c1b1; margin-bottom: 16px; letter-spacing: .01em; }
input {
  display: block; width: 100%; margin-top: 7px; padding: 12px 14px; font: 15px var(--sans); color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: #5f594e; }
input:hover { border-color: #4a4539; }
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(180,138,44,.16); background: #110f0c; }
input[type=datetime-local] { color-scheme: dark; }
input[type=checkbox] { accent-color: var(--gold); }
.remember { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--muted); cursor: pointer; margin: 4px 0 22px; }
.remember input { width: 17px; height: 17px; margin: 0; flex: none; }
.inline-form { display: grid; grid-template-columns: 2fr 1.3fr; gap: 14px; align-items: end; }
.inline-form label { margin: 0; }
.inline-form.four { grid-template-columns: 1.4fr 1fr 1fr auto; }
.field-title { font-weight: 500; font-size: 13px; color: #c9c1b1; margin: 20px 0 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.check { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 14px; font-weight: 400; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 15px; cursor: pointer; transition: border-color .2s, background .2s; }
.check:hover { border-color: var(--gold-deep); }
.check:has(input:checked) { border-color: var(--gold); background: rgba(180,138,44,.1); }
.check input { width: 16px; height: 16px; margin: 0; }
.assign { margin-top: 10px; font-size: 14px; }
.assign summary { cursor: pointer; color: var(--gold-2); font-weight: 500; padding: 4px 0; list-style: none; }
.assign summary::-webkit-details-marker { display: none; }
.assign summary::after { content: " +"; }
.assign[open] summary::after { content: " –"; }
.assign form { margin-top: 10px; }
.pw-form { display: flex; gap: 6px; }
.pw-form input { margin: 0; width: 150px; padding: 8px 11px; font-size: 13px; }

/* butoane */
button, .btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: var(--gold-ink); border: 1px solid var(--gold); border-radius: 10px;
  padding: 12px 20px; font: 600 14.5px var(--sans); letter-spacing: .01em; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px -10px rgba(180,138,44,.6);
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
button::after, .btn::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transition: transform .7s var(--ease);
}
button:hover, .btn:hover { background: var(--gold-2); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 26px -12px rgba(201,155,54,.75); }
button:hover::after, .btn:hover::after { transform: translateX(120%); }
button:active, .btn:active { transform: translateY(0); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
button.wide { width: 100%; padding: 14px; }
.small { padding: 8px 13px; font-size: 13px; border-radius: 8px; }
.secondary { background: transparent; color: var(--text); border-color: var(--line-2); box-shadow: none; }
.secondary:hover { background: rgba(255,255,255,.04); border-color: var(--gold-deep); color: var(--text); box-shadow: none; }
.secondary::after, .danger::after { display: none; }
.danger { background: transparent; color: var(--red); border-color: rgba(208,106,91,.35); box-shadow: none; }
.danger:hover { background: rgba(208,106,91,.1); border-color: var(--red); box-shadow: none; }
button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.big-action { margin: 0 0 22px; padding: 15px 22px; font-size: 15px; }
.arrow { display: inline-block; transition: transform .25s var(--ease); }
.big-action:hover .arrow { transform: translateX(4px); }

/* liste de lecții / elevi */
.lesson {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 12px;
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.lesson:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 18px 36px -22px rgba(0,0,0,.8); }
.lesson::before { content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 2px; border-radius: 2px; background: transparent; transition: background .25s; }
.lesson:hover::before { background: var(--gold-deep); }
.lesson.live::before { background: var(--gold); }
.lesson:target { border-color: var(--gold); }
.lesson-main { flex: 1; min-width: 260px; }
.lesson-title { font-family: var(--serif); font-weight: 500; font-size: 19px; margin-bottom: 4px; letter-spacing: -.2px; }
.lesson-actions { display: flex; gap: 8px; align-items: center; }
.lesson-actions form { margin: 0; }
.link-row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.link-row input { margin: 0; font-size: 13px; padding: 8px 11px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); background: rgba(180,138,44,.12); color: var(--gold-2); border: 1px solid rgba(180,138,44,.35); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.spinner { width: 38px; height: 38px; border: 2px solid var(--line-2); border-top-color: var(--gold); border-radius: 50%; margin: 24px auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* calendar */
.week-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 14px; flex-wrap: wrap; }
.week-nav b { font-family: var(--serif); font-weight: 500; font-size: 19px; }
.cal-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; }
.cal { border-collapse: separate; border-spacing: 5px; width: 100%; min-width: 760px; }
.cal th { font-size: 12px; font-weight: 600; padding: 6px 4px 10px; text-align: center; color: var(--text); letter-spacing: .02em; }
.cal th .muted { font-weight: 400; }
.cal th.today { color: var(--gold-2); }
.cal th.today .muted { color: var(--gold); }
.cal th.hour { position: sticky; left: 0; z-index: 1; background: var(--surface); font-size: 12px; width: 54px; font-variant-numeric: tabular-nums; font-weight: 500; }
.cal td { padding: 0; height: 44px; }
.cal td form { margin: 0; height: 100%; }
.slot {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 42px; padding: 2px 6px;
  border-radius: 8px; font: 500 12px var(--sans); text-align: center; text-decoration: none; overflow: hidden; border: 1px solid transparent;
  box-shadow: none; transform: none;
}
.slot::after { display: none; }
button.slot { cursor: pointer; min-height: 42px; }
.slot.free { background: transparent; color: #a89f8d; border-color: var(--line-2); transition: border-color .15s, color .15s, background .15s; }
.slot.free:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(180,138,44,.08); transform: none; box-shadow: 0 0 0 3px rgba(180,138,44,.1); }
.slot.taken { background: var(--bg-2); color: #5f594e; }
.slot.off { color: #8c6d62; border-color: #3b2a25; background: repeating-linear-gradient(135deg, #1b1512 0 6px, #211915 6px 12px); }
.slot.off:hover { border-color: var(--red); color: var(--red); background: repeating-linear-gradient(135deg, #1b1512 0 6px, #211915 6px 12px); box-shadow: none; transform: none; }
.slot.booked, .slot.mine { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); font-weight: 600; box-shadow: 0 6px 16px -8px rgba(180,138,44,.7); }
.slot.past { background: transparent; color: #4a453c; border-color: #1f1d19; }
.day-btn { width: 100%; font-size: 11px; padding: 7px 4px; }

/* camera video */
body.room { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #000; padding-bottom: env(safe-area-inset-bottom); }
body.room::before { display: none; }
.room-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--bg); border-bottom: 1px solid var(--line); color: var(--text); }
.room-bar b { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.room-bar span { display: flex; gap: 8px; align-items: center; }
#meet { flex: 1; }

/* telefon și tabletă */
@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding-top: 12px; }
  .facts { gap: 28px; }
}
@media (max-width: 640px) {
  .site-head { padding: 20px 18px 0; }
  main { padding: 18px 16px 48px; }
  h1 { font-size: 28px; }
  .hero h1 { letter-spacing: -1px; }
  .lead { font-size: 16px; }
  .facts { gap: 22px; } .facts b { font-size: 22px; }
  .card, .card.login { padding: 22px; }
  .inline-form, .inline-form.four { grid-template-columns: 1fr; }
  .lesson { padding: 18px; }
  .lesson-main { min-width: 0; width: 100%; }
  .lesson-actions { width: 100%; flex-wrap: wrap; }
  .lesson-actions .btn { flex: 1; }
  .link-row { flex-direction: column; align-items: stretch; }
  .pw-form { width: 100%; } .pw-form input { flex: 1; width: auto; }
  .week-nav b { order: -1; width: 100%; text-align: center; }
  .big-action { width: 100%; }
  button, .btn { min-height: 46px; } .small { min-height: 40px; } .slot { min-height: 42px; }
  .room-bar { font-size: 14px; }
}
.nw { white-space: nowrap; }
.link-row button { white-space: nowrap; }

/* navigare */
.site-head { justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-nav { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 15px; border-radius: 999px; transition: color .2s, background .2s; }
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.site-nav a.active { color: var(--gold-ink); background: var(--gold); }
.site-nav form { margin: 0; }
.nav-out { background: transparent; border: 0; box-shadow: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; min-height: 0 !important; }
.nav-out::after { display: none; }
.nav-out:hover { background: rgba(208,106,91,.1); color: var(--red); transform: none; box-shadow: none; }
.topbar .eyebrow { margin-bottom: 10px; }

/* bandă cu informații rapide */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 22px; }
.strip-item { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--gold); border-radius: 12px; padding: 14px 16px; }
.strip-item .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.strip-item b { font-family: var(--serif); font-weight: 500; font-size: 18px; grid-row: 2; }
.strip-item .btn { grid-row: 1 / span 2; grid-column: 2; }

/* formulare suplimentare */
select, textarea {
  display: block; width: 100%; margin-top: 7px; padding: 12px 14px; font: 15px var(--sans); color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; transition: border-color .2s, box-shadow .2s; color-scheme: dark;
}
textarea { resize: vertical; line-height: 1.5; }
select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(180,138,44,.16); }
.inline-form.three { grid-template-columns: 110px 2fr 150px; margin-top: 18px; }
.key-form { grid-template-columns: 1fr auto; }
.steps { padding-left: 20px; margin: 0 0 18px; color: #c9c1b1; }
.steps li { margin-bottom: 8px; }
.small-text { font-size: 13px; margin: 10px 0 0; }
.error-box { border-color: rgba(208,106,91,.45); background: rgba(208,106,91,.08); color: #e3a79c; }
.ai-key { border-color: rgba(180,138,44,.45); }
.gen-wait { margin-left: 12px; font-size: 14px; }

/* teme */
.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.pill.done { border-color: rgba(127,174,140,.45); color: var(--green); background: rgba(127,174,140,.08); }
.badge.plain::before { display: none; }
.hw-students { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 14px; }
.hw-students span { display: inline-flex; align-items: center; gap: 8px; }
a.hw-link { color: inherit; text-decoration: none; align-items: center; }
.ex-num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--gold-deep); color: var(--gold-2); font-family: var(--serif); font-size: 14px; flex: none; }
.ex-edit .ex-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.ex-edit .ex-head select { width: auto; margin: 0; padding: 8px 12px; font-size: 14px; }
.ex-edit .del { margin: 0 0 0 auto; }
.ex-edit .grid2 label { margin-bottom: 0; }
.ex-edit .grid2 { margin-bottom: 16px; }
.ex-new { border-style: dashed; opacity: .8; }
.ex-new .ex-num { border-style: dashed; color: var(--muted); }
.sticky-actions { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 10px; flex-wrap: wrap; padding: 12px; background: rgba(20,19,16,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 14px; }
.sticky-actions .danger { margin-left: auto; }
.ex { padding: 22px 24px; }
.ex-q { display: flex; gap: 14px; align-items: flex-start; font-size: 16.5px; line-height: 1.5; margin-bottom: 14px; }
.ex input:not([type=radio]), .ex textarea { margin-top: 0; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; font-size: 15px; color: var(--text); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.choice:hover { border-color: var(--gold-deep); }
.choice:has(input:checked) { border-color: var(--gold); background: rgba(180,138,44,.1); }
.choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--gold); flex: none; }
.review { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--line-2); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.review.ok { border-left-color: var(--green); }
.review.bad { border-left-color: var(--red); }
.review-q { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.review-a { margin-left: 40px; font-size: 14.5px; }
.review .small-text { margin: 6px 0 0 40px; }
.review.ok .review-a b { color: var(--green); }
.review.bad .review-a b { color: var(--red); text-decoration: line-through; text-decoration-thickness: 1px; }
.score-card { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 22px 26px; margin-bottom: 18px; border: 1px solid rgba(180,138,44,.45); border-radius: var(--r); background: linear-gradient(180deg, rgba(180,138,44,.10), rgba(180,138,44,.03)); }
.score-card b { font-family: var(--serif); font-weight: 500; font-size: 40px; color: var(--gold-2); line-height: 1; }
.result summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; font-size: 16px; }
.result summary::-webkit-details-marker { display: none; }
.result[open] summary { margin-bottom: 16px; }
.result .review { background: var(--bg-2); }

@media (max-width: 860px) { .site-nav { width: 100%; justify-content: space-between; } .site-nav a { padding: 8px 10px; } }
@media (max-width: 640px) {
  .inline-form.three, .key-form { grid-template-columns: 1fr; }
  .site-nav a, .nav-out { font-size: 13px; padding: 8px 9px; }
  .ex { padding: 18px; }
  .review-a, .review .small-text { margin-left: 0; }
  .sticky-actions button { flex: 1; }
  .sticky-actions .danger { margin-left: 0; }
  .strip-item .btn { min-height: 40px; }
}
.cal { table-layout: fixed; } .cal th.hour { width: 58px; }
.ai-change { margin-top: 28px; }
.ai-change summary { cursor: pointer; color: var(--muted); font-size: 14px; list-style: none; margin-bottom: 14px; }
.ai-change summary::-webkit-details-marker { display: none; }
.ai-change summary:hover { color: var(--gold-2); }

/* progres la teme */
.tiles { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.tile .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.tile b { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.tile b small { font-size: 18px; color: var(--muted); }
.tile.hero { border-color: rgba(180,138,44,.45); background: linear-gradient(160deg, rgba(180,138,44,.14), rgba(180,138,44,.02) 60%), var(--surface); }
.tile.hero b { font-size: 46px; color: var(--gold-2); }
.tile.attn b { color: var(--gold-2); }
.tile .up, .tile .down { font-size: 13px; font-weight: 500; }
.tile .up { color: var(--green); } .tile .down { color: var(--red); }
.focus h2 { margin-bottom: 12px; }
.weak-list { list-style: none; margin: 0; padding: 0; }
.weak-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.weak-list li:first-child { border-top: 0; }
.weak-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.flag { color: var(--red); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.charts { margin-bottom: 8px; }
.charts .card { margin-bottom: 0; }
.chart { margin: 0; }
.chart figcaption, h3.mini { font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
h3.mini:not(:first-child) { margin-top: 22px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 12px var(--sans); }
.chart .trend-line { fill: none; stroke: var(--gold-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--gold-2); stroke: var(--surface); stroke-width: 2; transition: r .15s; }
.chart .hit { fill: transparent; cursor: default; }
.chart .pt:hover .dot { r: 7; }
.chart .val { fill: var(--text); font: 600 13px var(--sans); }
.bar-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 86px; gap: 12px; align-items: center; padding: 6px 0; }
.bar-label { font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bar-track { height: 8px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gold); border-radius: 0 4px 4px 0; transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.bar-val { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.section { margin: 30px 0 14px; font-size: 22px; }
.hw-link.todo { border-color: rgba(180,138,44,.35); }
.mini-bar { height: 4px; background: var(--bg-2); border-radius: 2px; margin-top: 10px; max-width: 320px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--gold); border-radius: 0 2px 2px 0; }
.score-badge { flex-direction: column; align-items: flex-end !important; gap: 2px !important; }
.score-badge b { font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--gold-2); line-height: 1; }
.score-badge .muted { font-size: 12px; }
.small-link { font-size: 13px; color: var(--gold-2); margin-left: auto; font-weight: 400; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr 1fr; } .tile.hero { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .tile b { font-size: 28px; } .tile.hero b { font-size: 40px; }
  .bar-row { grid-template-columns: 1fr 76px; } .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .score-badge { width: auto !important; flex-direction: row; align-items: baseline !important; gap: 8px !important; }
}
.bar-row { grid-template-columns: minmax(150px, 1.3fr) 2fr 86px; }
.bar-label { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bar-label .flag { margin-right: 4px; }
.trend-cols { display: none; }
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tile { padding: 14px; } .tile .muted { font-size: 10.5px; letter-spacing: .05em; }
  .tile b { font-size: 24px; } .tile b small { font-size: 14px; }
  .chart svg { display: none; }
  .trend-cols { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
  .tcol { flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .tval { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .tbar { width: 100%; max-width: 34px; height: 110px; background: var(--bg-2); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
  .tbar i { display: block; width: 100%; background: var(--gold); border-radius: 4px 4px 0 0; }
  .tdate { font-size: 11px; color: var(--muted); white-space: nowrap; }
  .bar-row { grid-template-columns: 1fr 76px; }
}

/* calendar: actualizare pe loc */
#cal-area { transition: opacity .2s; }
#cal-area.loading { opacity: .55; pointer-events: none; }
.slot.busy { animation: pulse 1s ease-in-out infinite; }
#toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--surface-2); color: var(--text); border: 1px solid rgba(180,138,44,.5); border-left: 3px solid var(--gold);
  padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.8); max-width: calc(100vw - 32px);
  transition: opacity .25s, transform .35s var(--ease);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { border-color: rgba(208,106,91,.5); border-left-color: var(--red); }

/* ---------- ordine și claritate ---------- */
[hidden] { display: none !important; }
.page-head { align-items: center; }
.lead-sm { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 560px; }
.page-head .btn { white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: -6px 0 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 12px; border-radius: 4px; border: 1px solid var(--line-2); display: inline-block; }
.sw.free { background: transparent; }
.sw.taken { background: var(--bg-2); }
.sw.off { border-color: #3b2a25; background: repeating-linear-gradient(135deg, #1b1512 0 3px, #2a1d18 3px 6px); }
.sw.booked, .sw.mine { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.new-card { border-color: rgba(180,138,44,.45); margin-bottom: 26px; }
.new-card h2 { margin-bottom: 6px; }
.more { margin-top: 12px; font-size: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.more summary { cursor: pointer; color: var(--muted); font-weight: 500; list-style: none; padding: 2px 0; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " +"; }
.more[open] summary::after { content: " –"; }
.more summary:hover { color: var(--gold-2); }
.more > *:not(summary) { margin-top: 12px; }
.danger-zone { padding-top: 12px; border-top: 1px solid var(--line); }
.danger-zone .btn, .danger-zone button { border-color: rgba(208,106,91,.45); color: var(--red); }
details.past { margin-top: 30px; }
details.past > summary { cursor: pointer; list-style: none; font-family: var(--serif); font-size: 20px; color: var(--muted); padding: 8px 0; }
details.past > summary::-webkit-details-marker { display: none; }
details.past > summary::after { content: "  +"; color: var(--gold-2); }
details.past[open] > summary::after { content: "  –"; }
details.past > summary:hover { color: var(--text); }
.foot-note { margin-top: 36px; font-size: 13px; color: var(--muted); max-width: 640px; }
.empty { color: var(--muted); padding: 18px 0; }
.empty-state { text-align: center; padding: 48px 24px; border: 1px dashed var(--line-2); border-radius: var(--r); background: rgba(255,255,255,.01); }
.empty-state p { color: var(--muted); margin: 0 0 18px; }
.empty-state h2 { margin-bottom: 8px; }
.next-lesson { position: relative; background: linear-gradient(160deg, rgba(180,138,44,.12), rgba(180,138,44,.02) 60%), var(--surface); border: 1px solid rgba(180,138,44,.5); border-radius: 18px; padding: 28px 30px; margin-bottom: 30px; box-shadow: 0 24px 50px -30px rgba(180,138,44,.45); }
.next-lesson .eyebrow { margin-bottom: 8px; }
.next-when { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.4px; line-height: 1.2; margin-bottom: 6px; }
.next-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.next-actions form { margin: 0; }
.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 1px; }
.site-nav a.active .nav-count { background: var(--gold-ink); color: var(--gold-2); }
@media (max-width: 560px) { .next-lesson { padding: 22px 20px; } .next-when { font-size: 24px; } .page-head .top-actions { width: 100%; } .page-head .top-actions .btn { width: 100%; justify-content: center; } }

/* ---------- meditații, istoric, materiale ---------- */
.back-link { display: inline-block; margin-top: 10px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--gold-2); }
.back-link + .page-head { margin-top: 8px; }
.section.first { margin-top: 6px; }
.cal-help { margin: -6px 0 12px; }
.note-preview { margin-top: 8px; font-size: 14px; color: #bdb4a3; border-left: 2px solid var(--gold-deep); padding-left: 10px; }
.note-text { white-space: pre-wrap; margin-top: 8px; font-size: 15px; color: #d8d0c1; line-height: 1.6; }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.card form .check { display: inline-flex; margin-top: 12px; }
.student-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.card-more { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 20px; margin-top: 18px; }
.title-link { display: block; color: var(--text); text-decoration: none; }
.title-link:hover { color: var(--gold-2); }
.tabs { display: flex; gap: 4px; margin: -8px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--gold-2); border-bottom-color: var(--gold); }
.history-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; margin-bottom: 10px; }
.history-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.history-when { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.small-link { font-size: 14px; font-weight: 500; text-decoration: none; }
.small-link:hover { text-decoration: underline; }
details.past .history-item:first-of-type { margin-top: 10px; }
.upload-card .dosar-field { display: block; max-width: 420px; margin: 14px 0; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 26px 20px; text-align: center; transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--gold); background: rgba(180,138,44,.07); }
.drop.busy { border-color: var(--gold-deep); }
.drop > p:first-child { margin: 0 0 14px; color: #bdb4a3; }
.drop-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.drop-actions .btn { cursor: pointer; }
#up-status { margin: 12px 0 0; min-height: 1em; }
.folder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
.folder-head { display: flex; align-items: center; gap: 12px; padding: 13px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.folder-name { font-weight: 600; flex: 1; }
.folder-name::before { content: ""; display: inline-block; width: 16px; height: 12px; margin-right: 10px; border-radius: 2px 3px 3px 3px; background: var(--gold-deep); vertical-align: -1px; box-shadow: 4px -3px 0 -1px var(--gold-deep); }
.folder-head form { margin: 0; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); }
.file-row:first-of-type { border-top: 0; }
.file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text); text-decoration: none; font-weight: 500; }
.file-name:hover { color: var(--gold-2); text-decoration: underline; }
.file-row form { margin: 0; }
.icon-btn { padding: 2px 10px; font-size: 16px; line-height: 1.4; }
@media (max-width: 560px) { .file-row { flex-wrap: wrap; } .file-row .small-text { order: 3; width: 100%; } .folder-head { flex-wrap: wrap; } }
.folder-head .small-text, .file-row .small-text, .form-actions .small-text { margin: 0; }

/* ---------- temă: câte un exercițiu ---------- */
.ex-kind { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.choice .key { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.stepper .choice input { position: absolute; opacity: 0; pointer-events: none; }
.stepper .choice { position: relative; padding: 14px 16px; font-size: 16px; }
.stepper .choices { grid-template-columns: 1fr; gap: 10px; }
.stepper .choice:has(input:checked) .key, .choice.picked .key { border-color: var(--gold); color: var(--gold-2); }
.stepper .ex { display: none; padding: 30px 32px; min-height: 320px; }
.stepper .ex.active { display: block; animation: slide-in .35s var(--ease) both; }
.stepper .ex.active.from-left { animation-name: slide-in-l; }
@keyframes slide-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes slide-in-l { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.stepper .ex-q { font-family: var(--serif); font-size: 22px; line-height: 1.4; margin-bottom: 22px; letter-spacing: -.2px; }
.stepper .ex-q .ex-num { display: none; }
.stepper .ex input:not([type=radio]) { font-size: 18px; padding: 15px 16px; }
.ex.done .choice { cursor: default; pointer-events: none; }
.ex.done .choice:not(.picked):not(.right) { opacity: .5; }
.ex.ok .choice.picked { border-color: var(--green); background: rgba(127,174,140,.1); }
.ex.ok .choice.picked .key { border-color: var(--green); color: var(--green); }
.ex.bad .choice.picked { border-color: var(--red); background: rgba(208,106,91,.08); }
.ex.bad .choice.picked .key { border-color: var(--red); color: var(--red); }
.choice.right { border-color: var(--green) !important; opacity: 1 !important; }
.ex.ok input[readonly] { border-color: var(--green); }
.ex.bad input[readonly] { border-color: var(--red); text-decoration: line-through; text-decoration-color: rgba(208,106,91,.6); }
.ex-actions { margin-top: 22px; }
.feedback { display: none; padding: 14px 16px; border-radius: 12px; font-size: 15px; line-height: 1.5; margin-bottom: 16px; border: 1px solid var(--line-2); }
.feedback.show { display: block; }
.feedback.pop { animation: pop .35s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.ex.ok .feedback { border-color: rgba(127,174,140,.45); background: rgba(127,174,140,.08); }
.ex.ok .feedback b { color: var(--green); }
.ex.bad .feedback { border-color: rgba(208,106,91,.4); background: rgba(208,106,91,.06); }
.ex.bad .feedback > b:first-child { color: var(--red); }
.feedback .right { color: var(--green); }
.feedback .why { display: block; margin-top: 6px; color: #bdb4a3; }
.feedback.warn { border-color: rgba(180,138,44,.4); color: #dccfb2; }
.ex.free .feedback { border-color: rgba(180,138,44,.4); background: rgba(180,138,44,.06); }
.ex-nav { display: flex; align-items: center; gap: 10px; }
.ex-nav .grow { flex: 1; }
.ex-nav .main { min-width: 150px; }
button.link { background: none; border: 0; box-shadow: none; color: var(--muted); padding: 8px 10px; font-weight: 500; }
button.link:hover { color: var(--gold-2); background: none; box-shadow: none; transform: none; }
button.link::after { display: none; }
.hw-top { margin-bottom: 18px; }
.hw-count { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.hw-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.hw-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2)); border-radius: inherit; transition: width .5s var(--ease); }
.hw-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hw-dots .dot { width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 50%; font-size: 12px; font-weight: 600; background: transparent; color: var(--muted); border: 1px solid var(--line-2); box-shadow: none; }
.hw-dots .dot::after { display: none; }
.hw-dots .dot:hover { transform: none; box-shadow: none; background: rgba(255,255,255,.04); border-color: var(--gold-deep); }
.hw-dots .dot.ok { background: rgba(127,174,140,.16); border-color: rgba(127,174,140,.6); color: var(--green); }
.hw-dots .dot.bad { background: rgba(208,106,91,.12); border-color: rgba(208,106,91,.55); color: var(--red); }
.hw-dots .dot.free { background: rgba(180,138,44,.12); border-color: var(--gold-deep); color: var(--gold-2); }
.hw-dots .dot.cur { outline: 2px solid var(--gold); outline-offset: 2px; color: var(--text); }
.result-hero { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; background: linear-gradient(160deg, rgba(180,138,44,.1), transparent 60%), var(--surface); border: 1px solid rgba(180,138,44,.4); border-radius: 18px; padding: 30px 32px; margin-bottom: 10px; animation: pop .5s var(--ease) both; }
.ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--gold-2) calc(var(--p) * 1%), var(--line) 0); }
.ring > span { width: 124px; height: 124px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; }
.ring b { font-family: var(--serif); font-size: 38px; font-weight: 500; line-height: 1; }
.ring small { color: var(--muted); font-size: 13px; margin-top: 6px; }
.result-text { flex: 1; min-width: 220px; }
.result-verdict { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.4px; margin-bottom: 6px; }
.result-text p { margin: 0 0 18px; }
@media (max-width: 560px) {
  .stepper .ex { padding: 22px 18px; min-height: 0; }
  .stepper .ex-q { font-size: 19px; }
  .ex-nav .main { min-width: 0; flex: 1; }
  .result-hero { padding: 24px 20px; gap: 20px; justify-content: center; text-align: center; }
  .hw-dots .dot { width: 28px; height: 28px; }
}
.ex-nav button { white-space: nowrap; }
.history-sum { margin: -4px 0 16px; }

/* ---------- apel video propriu ---------- */
body.call { height: 100vh; height: 100dvh; overflow: hidden; background: #0a0908; }
body.call::before { display: none; }
.prejoin { min-height: 100%; display: grid; place-items: center; padding: 24px; padding-top: max(24px, env(safe-area-inset-top)); overflow-y: auto; height: 100%; }
.pj-card { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 34px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9); }
.pj-video { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #050505; border: 1px solid var(--line); }
.pj-video video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.pj-off { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: #0b0a09; }
.pj-side h1 { font-size: 28px; margin-bottom: 10px; }
.pj-side .eyebrow { margin-bottom: 12px; }
.meter { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 18px 0; }
.meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width .08s linear; }
.pj-toggles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tgl { flex: 1; min-width: 140px; background: transparent; color: var(--text); border: 1px solid var(--line-2); box-shadow: none; font-size: 14px; }
.tgl::after { display: none; }
.tgl.on { border-color: rgba(127,174,140,.5); }
.tgl.off { border-color: rgba(208,106,91,.5); color: var(--red); }
.tgl:hover { background: rgba(255,255,255,.04); box-shadow: none; transform: none; }
button.wide { width: 100%; }
.pj-back { display: block; text-align: center; margin-top: 14px; color: var(--muted); font-size: 14px; }
.end-card { grid-template-columns: 1fr; max-width: 460px; text-align: center; }
.end-card h1 { font-size: 26px; margin: 0; }
.end-card p { margin: 0; }

.call-wrap { height: 100%; display: flex; flex-direction: column; }
.call-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top)); color: var(--text); }
.call-title b { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.call-net { font-size: 13px; color: #e3b45a; background: rgba(180,138,44,.12); border: 1px solid rgba(180,138,44,.4); padding: 4px 10px; border-radius: 999px; }
.stage { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 0 12px; }
.grid-videos { flex: 1; min-width: 0; display: grid; gap: 10px; grid-template-columns: 1fr; grid-auto-rows: 1fr; position: relative; }
.grid-videos.n3, .grid-videos.n4 { grid-template-columns: 1fr 1fr; }
.grid-videos.n5, .grid-videos.n6, .grid-videos.n7, .grid-videos.n8, .grid-videos.n9 { grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; background: #121110; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-height: 0; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.screen video { object-fit: contain; }
.tile.self video { transform: scaleX(-1); }
.tile.self.screen video { transform: none; }
.tile .avatar { position: absolute; inset: 0; display: none; place-items: center; background: radial-gradient(circle at 50% 40%, #1f1c17, #0f0e0c); }
.tile .avatar span { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 32px; color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.tile.cam-off .avatar { display: grid; }
.tile-name { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: #fff; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); padding: 5px 10px; border-radius: 8px; max-width: calc(100% - 20px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mic-x { display: none; width: 14px; height: 14px; flex: none; background: var(--red); -webkit-mask: var(--i-micoff) center/contain no-repeat; mask: var(--i-micoff) center/contain no-repeat; }
.tile.mic-off .mic-x { display: inline-block; }
.tile-wait, .tile-stuck { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; font-size: 14px; color: #ddd; background: rgba(0,0,0,.6); padding: 8px 14px; border-radius: 10px; text-align: center; max-width: 80%; }
.tile.connecting .tile-wait { display: block; }
.tile.stuck .tile-wait { display: none; }
.tile.stuck .tile-stuck { display: block; }
.tile.weak { border-color: rgba(180,138,44,.6); }
/* doi participanți: celălalt mare, tu în colț */
.grid-videos.duo { display: block; }
.grid-videos.duo .tile:not(.self) { position: absolute; inset: 0; }
.grid-videos.duo .tile.self { position: absolute; right: 14px; bottom: 14px; width: 24%; min-width: 130px; max-width: 260px; aspect-ratio: 4 / 3; z-index: 2; border-color: var(--line-2); box-shadow: 0 16px 40px -10px rgba(0,0,0,.9); }
.grid-videos.duo .tile.self .avatar span { width: 48px; height: 48px; font-size: 18px; }
.grid-videos.duo .wait-msg { display: none; }
.wait-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); pointer-events: none; }
.grid-videos.n1 .tile.self { opacity: .9; }
.grid-videos.n2:not(.duo) .wait-msg, .grid-videos.n1 .wait-msg { background: rgba(10,9,8,.55); }
.chat { width: 320px; flex: none; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 11px; font-size: 14px; overflow-wrap: anywhere; }
.msg b { display: block; font-size: 12px; color: var(--gold-2); margin-bottom: 2px; }
.msg.mine { align-self: flex-end; background: rgba(180,138,44,.12); border-color: rgba(180,138,44,.3); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { margin: 0; flex: 1; min-width: 0; }
.chat-form button { padding: 0 14px; }
.controls { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 14px 12px; padding-bottom: max(14px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
.ctl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 10px 12px; background: #1c1a17; color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: none; font-size: 12px; font-weight: 500; }
.ctl::after { display: none; }
.ctl:hover { background: #26231f; transform: none; box-shadow: none; }
.ctl.off { background: rgba(208,106,91,.14); border-color: rgba(208,106,91,.5); color: #f0b5aa; }
.ctl.active { background: rgba(180,138,44,.16); border-color: var(--gold); color: var(--gold-2); }
.ctl.leave { background: var(--red); border-color: var(--red); color: #fff; }
.ctl.end { background: transparent; border-color: rgba(208,106,91,.5); color: var(--red); align-self: stretch; justify-content: center; }
.ctl:disabled { opacity: .4; }
.ic { width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
:root {
  --i-mic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E");
  --i-micoff: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M9 9v2a3 3 0 0 0 5 2.2M15 9.5V6a3 3 0 0 0-5.7-1.3M5 11a7 7 0 0 0 11.5 5.4M19 11a7 7 0 0 1-.6 2.8M12 18v3M3 3l18 18'/%3E%3C/svg%3E");
}
.ic-mic { --m: var(--i-mic); }
.ctl.off .ic-mic { --m: var(--i-micoff); }
.ic-cam { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='2.5' y='6' width='13' height='12' rx='2.5'/%3E%3Cpath d='M15.5 10.5 21 7.5v9l-5.5-3z'/%3E%3C/svg%3E"); }
.ctl.off .ic-cam { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15.5 13.5 21 16.5v-9l-5.5 3M10 6h3a2.5 2.5 0 0 1 2.5 2.5V12M15.5 16A2.5 2.5 0 0 1 13 18H5a2.5 2.5 0 0 1-2.5-2.5v-7A2.5 2.5 0 0 1 5 6M3 3l18 18'/%3E%3C/svg%3E"); }
.ic-screen { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='4' width='19' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4M12 13V8M9.5 10.5 12 8l2.5 2.5'/%3E%3C/svg%3E"); }
.ic-chat { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
.ic-leave { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M3 14.5c5-5 13-5 18 0l-2.5 2.5-3-1.5v-2.5a10 10 0 0 0-7 0v2.5l-3 1.5z'/%3E%3C/svg%3E"); }
.dot-new { position: absolute; top: 6px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-2); }
.tap-sound { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 20; }
@media (max-width: 760px) {
  .pj-card { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .pj-side h1 { font-size: 22px; }
  .stage { padding: 0 8px; }
  .chat { position: fixed; inset: auto 8px 86px 8px; height: 55dvh; width: auto; z-index: 10; }
  .ctl { min-width: 0; flex: 1; padding: 9px 4px; }
  .ctl .lbl { font-size: 11px; white-space: nowrap; }
  .ctl.end { flex-basis: 100%; order: 9; padding: 10px; }
  .grid-videos.n3, .grid-videos.n4 { grid-template-columns: 1fr; }
  .grid-videos.duo .tile.self { width: 30%; min-width: 96px; right: 10px; bottom: 10px; aspect-ratio: 3 / 4; }
  .call-bar { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
}
body.call #toast { top: max(56px, calc(env(safe-area-inset-top) + 48px)); bottom: auto; transform: translate(-50%, -8px); }
body.call #toast.show { transform: translate(-50%, 0); }
.addr-card { padding: 18px 22px; margin-bottom: 18px; } .addr-card .link-row { margin: 8px 0 4px; } .addr-card .small-text { margin: 0; display: block; }

/* ---------- înregistrare ---------- */
.rec-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #ffb4a8; background: rgba(208,106,91,.14); border: 1px solid rgba(208,106,91,.5); padding: 4px 12px; border-radius: 999px; }
.rec-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e5544a; animation: pulse 1.4s ease-in-out infinite; }
.ic-rec { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='4.5' fill='black'/%3E%3C/svg%3E"); }
.ctl.rec.active { background: rgba(229,84,74,.16); border-color: #e5544a; color: #ffb4a8; }
.ctl.rec.active .ic { animation: pulse 1.4s ease-in-out infinite; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 400; line-height: 1.5; color: #bdb4a3; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; cursor: pointer; }
.consent input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--gold); }
.consent:has(input:checked) { border-color: var(--gold); }
.consent-ok { margin: 0 0 14px; color: var(--muted); }
.consent-ok .link { padding: 0 4px; font-size: 13px; text-decoration: underline; }
.consent-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 18px; margin: -6px 0 20px; }
.consent-line form { margin: 0; }
.ok-text { color: var(--green); }
.rec-card { padding: 20px 22px; margin-bottom: 12px; }
.rec-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.rec-card audio { width: 100%; margin: 6px 0 10px; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rec-actions form { margin: 0; }
.transcript { max-height: 320px; overflow-y: auto; font-size: 14px; }
@media (max-width: 760px) { .call-bar { flex-wrap: wrap; } .rec-badge { font-size: 12px; } }
.no-anim { animation: none !important; }
/* fără oglindire: vezi exact ce văd ceilalți */
.tile.self video, .pj-video video { transform: none !important; }
.fix-btn { font-size: 13px; padding: 4px 8px; margin-left: auto; }
.call-bar .fix-btn + .call-net { margin-left: 8px; }
