:root {
  color-scheme: dark;
  --navy: #071521;
  --surface: #101f2c;
  --raised: #152633;
  --line: #2b3d49;
  --text: #f3f7f4;
  --muted: #aebfc9;
  --lime: #b7dc63;
  --green: #3a601d;
  --radius: 20px;
  font-family: "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--text); background: var(--navy); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.topbar { border-bottom: 1px solid #243744; background: #081721; }
.topbar-inner, main, .footer { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.topbar-inner { min-height: 83px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand img { border-radius: 50%; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 22px; line-height: 1.08; letter-spacing: -.6px; }
.brand strong span { color: var(--lime); }
.brand small { color: var(--muted); font-size: 14px; margin-top: 3px; }
.header-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.header-status svg { color: var(--lime); }
main { flex: 1; }
.lobby { position: relative; isolation: isolate; padding: 48px 0 40px; }
.lobby::before {
  content: ""; position: absolute; z-index: -1; inset: 0 -24px auto; height: 410px; pointer-events: none;
  background:
    repeating-radial-gradient(ellipse at 83% 43%, #a5c96a20 0 1px, transparent 2px 20px),
    radial-gradient(ellipse at 76% 36%, #2b492c82, transparent 66%);
  mask-image: radial-gradient(ellipse at 83% 35%, #000 5%, transparent 67%);
}
.intro { position: relative; max-width: 720px; }
.subject { color: var(--lime); font-size: 14px; font-weight: 700; letter-spacing: .12em; margin: 0 0 14px; }
.intro h1 { font-size: clamp(62px, 8.2vw, 112px); letter-spacing: -.09em; line-height: .91; margin: 0 0 23px; font-weight: 750; }
.intro h1 em { font-style: normal; color: var(--lime); }
.intro > p:last-child { font-size: 18px; color: var(--muted); max-width: 500px; line-height: 1.55; margin: 0 0 29px; }
.setup { display: grid; grid-template-columns: 1.28fr 1fr; gap: 16px; align-items: stretch; }
.setup:has(#lobby-preview[hidden]) { grid-template-columns: minmax(0, 530px); }
.preview, .form, .side-panel, .tile { border: 1px solid var(--line); border-radius: var(--radius); }
.preview {
  position: relative; min-height: 260px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 36%, #243c37, #101f2c 68%);
}
.preview video, .tile video { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; }
.preview video, .tile video.local { transform: scaleX(-1); }
.preview-label { position: absolute; top: 15px; left: 16px; font-size: 14px; color: #e0e8e7; padding: 5px 10px; border-radius: 8px; background: #071521dd; }
.preview-placeholder { display: grid; justify-items: center; gap: 13px; font-size: 14px; color: var(--muted); margin-bottom: 25px; }
.preview-icon { display: grid; place-items: center; width: 66px; height: 66px; background: #92b76b22; border: 1px solid #a0bf743d; border-radius: 50%; color: var(--lime); }
.preview-icon svg { width: 28px; height: 28px; }
.preview-controls { position: absolute; bottom: 16px; display: flex; gap: 9px; }
.camera-source { min-height: 44px; max-width: min(205px, 47vw); padding: 0 9px; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: 11px; font: inherit; font-size: 14px; }
.camera-source:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.button, .icon-button, .primary {
  border: 1px solid var(--line); border-radius: 11px; min-height: 44px; background: var(--raised);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; padding: 0 14px;
}
.button:hover, .icon-button:hover { background: #233904; border-color: #7aab49; }
.icon-button { min-width: 44px; padding: 0; }
.device.is-off { color: #efc4c6; }
.device.is-off svg { stroke: #efb1b6; }
.device.is-off::after { content: ""; width: 22px; height: 1.5px; background: #efb1b6; position: absolute; transform: rotate(-42deg); margin-left: -1px; }
.device { position: relative; }
.room-controls .device.is-off::after { left: 13px; }
.form { padding: 24px; background: var(--surface); display: flex; flex-direction: column; justify-content: center; }
.form-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.form-heading h2 { font-size: 26px; letter-spacing: -.05em; margin: 0; }
.form-heading > span { font-size: 14px; font-weight: 650; color: var(--lime); }
label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 650; }
input {
  width: 100%; min-width: 0; min-height: 47px; background: var(--navy); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); padding: 0 12px; font-size: 16px;
}
input::placeholder { color: #a9b7c2; }
#mobile-join-help { color: var(--muted); font-size: 14px; margin-top: 13px; }
#mobile-join-help summary { cursor: pointer; }
#mobile-join-help p { margin: 7px 0 0; }
#password-field { margin-top: 12px; }
.primary { background: var(--lime); color: #14240b; border-color: transparent; }
.primary:hover { background: #c8ee75; }
.form .primary { min-height: 48px; margin-top: 15px; justify-content: space-between; padding-inline: 15px; }
.student-practice { display: grid; justify-items: start; gap: 7px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.student-practice h3 { margin: 0; font-size: 17px; }
.student-practice p { margin: 0; color: var(--muted); line-height: 1.45; font-size: 14px; }
.notice { color: #ffcdce; font-size: 14px; line-height: 1.45; margin: 10px 0 0; overflow-wrap: anywhere; }
.notice.success { color: var(--lime); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.features > div { padding: 15px 16px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 13px; background: #101f2c; }
.features svg { color: var(--lime); }
.features strong, .features small { display: block; }
.features strong { font-size: 15px; }
.features small { color: var(--muted); font-size: 14px; margin-top: 4px; }
.footer { border-top: 1px solid var(--line); padding: 17px 0 20px; color: var(--muted); display: flex; gap: 12px; justify-content: space-between; font-size: 14px; }
.classroom { padding: 26px 0; }
.room-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 19px; }
.room-heading h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.06em; line-height: 1.1; }
.room-heading p { color: var(--lime); margin: 5px 0 0; font-size: 14px; }
.room-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.recording-panel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.recording-panel p { margin: 0; }
.recording-panel[data-phase="recording"] { border-color: #d25f63; }
.recording-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#recording-download { text-decoration: none; }
#practice-mode { color: var(--lime); }
#practice-preview, #test-invitation { color: var(--text); text-decoration: none; }
#local-invitation-note { margin: 0 0 14px; color: var(--muted); }
#invitation-address { flex: 1 1 270px; min-width: 0; }
#open-invitation, #send-whatsapp { text-decoration: none; }
#send-whatsapp { color: var(--lime); }
.student-screens { margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.student-screens-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.student-screens h2 { margin: 0; font-size: 18px; }
#student-screens-empty { margin: 8px 0 0; color: var(--muted); }
.shared-screen-video { display: block; width: 100%; max-height: 70vh; margin-top: 10px; background: #040b11; object-fit: contain; border-radius: 8px; }
.screen-frame { position: relative; }
.meeting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 14px; align-items: stretch; }
.meeting.panel-closed, .meeting.showing-screen { grid-template-columns: minmax(0, 1fr); }
.tiles { min-height: min(50vh, 480px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-content: start; }
.tiles[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.tiles[data-count="2"], .tiles[data-count="3"], .tiles[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) {
  .tiles:has(.tile:nth-child(9)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tile { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, #243f3d, #122431 76%); }
.tiles[data-count="1"] .tile { max-height: 55vh; }
.tile .initials { display: grid; place-items: center; width: clamp(33px, 5vw, 80px); aspect-ratio: 1; border-radius: 50%; color: var(--lime); background: #172a22; font-size: clamp(15px, 2.5vw, 30px); font-weight: 700; }
.tile .caption { position: absolute; inset: auto 7px 7px; display: flex; align-items: center; gap: 5px; }
.tile .caption > span { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; background: #071521e8; border-radius: 7px; padding: 4px 7px; }
.tile .caption svg { width: 15px; height: 15px; color: #ffc1c3; }
.tile.speaking { border-color: var(--lime); outline: 1px solid var(--lime); }
.screen-frame > .tiles {
  position: absolute; inset: 6px 6px auto auto; max-width: calc(100% - 12px); min-height: 0;
  display: flex; gap: 7px; padding: 3px; overflow-x: auto;
}
.screen-frame .tile { flex: 0 0 auto; width: clamp(40px, 7vw, 84px); aspect-ratio: 1; border-radius: 50%; }
.screen-frame .tile .initials { width: 100%; font-size: clamp(14px, 2vw, 24px); }
.screen-frame .tile .caption { inset: auto 0 2px; justify-content: center; }
.screen-frame .tile .caption > span { max-width: 88%; padding: 1px 4px; font-size: 10px; }
.screen-frame .tile .caption svg { display: none; }
.meeting.showing-screen .side-panel { min-height: 180px; height: min(28vh, 260px); }
.side-panel { background: var(--surface); min-height: 360px; height: min(60vh, 560px); overflow: hidden; display: flex; flex-direction: column; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 5px; border-bottom: 1px solid var(--line); padding: 8px; }
.panel-tabs { display: flex; gap: 3px; }
.panel-tabs button { padding: 8px; background: none; border: 0; border-radius: 8px; font-size: 14px; font-weight: 650; }
.panel-tabs button[aria-pressed="true"] { color: var(--lime); background: #304424; }
.panel-tabs button span { margin-left: 4px; }
.panel-header .icon-button { min-width: 35px; min-height: 35px; background: transparent; }
.chat-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.messages, .people-list { margin: 0; padding: 11px; overflow: auto; overscroll-behavior: contain; }
.messages { flex: 1; }
#empty-chat { color: var(--muted); font-size: 14px; margin: 11px 3px; }
.message { padding: 8px; border-radius: 9px; background: var(--raised); margin: 0 0 7px; overflow-wrap: anywhere; }
.message strong { color: var(--lime); font-size: 14px; }
.message p { margin: 4px 0 0; white-space: pre-wrap; font-size: 15px; }
.chat-form { display: flex; align-items: center; gap: 7px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form button { flex-shrink: 0; }
.people-list { list-style: none; }
#people-panel { min-height: 0; overflow: auto; }
#mute-all { margin: 8px; font-size: 14px; }
.people-list li { display: flex; gap: 8px; justify-content: space-between; padding: 9px 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.people-list small { color: var(--muted); font-size: 14px; flex-shrink: 0; }
.people-list .person-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.people-list .person-actions button { min-height: 32px; padding: 0 7px; font-size: 13px; }
.room-controls { position: sticky; bottom: 0; z-index: 1; background: var(--navy); display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 5px; padding-block: 9px; }
.room-controls .leave { border-color: #934d53; background: #492c35; color: #ffd0d3; }
.room-controls .leave:hover { background: #692f3a; }
#unread { background: var(--lime); color: #14240b; border-radius: 20px; min-width: 21px; padding: 1px 4px; font-size: 13px; }
#room-notice { text-align: center; }
@media (max-width: 780px) {
  .topbar-inner, main, .footer { width: calc(100% - 36px); }
  .lobby { padding-top: 35px; }
  .features { gap: 8px; }
  .features > div { align-items: flex-start; flex-direction: column; padding: 11px; gap: 8px; }
  .meeting { grid-template-columns: minmax(0, 1fr); }
  .tiles { min-height: 0; }
  .side-panel { min-height: 250px; height: 34vh; }
  .guest-lobby .intro h1 { font-size: clamp(39px, 11vw, 60px); }
  .guest-lobby .setup { grid-template-columns: minmax(0, 1fr); }
  .guest-lobby .form { order: -1; }
}
@media (max-width: 520px) {
  .topbar-inner { min-height: 68px; }
  .header-status { font-size: 13px; }
  .header-status svg { display: none; }
  .lobby::before { inset-inline: -11px; }
  .intro h1 { font-size: clamp(57px, 16vw, 83px); }
  .setup { grid-template-columns: minmax(0, 1fr); }
  .preview { min-height: 210px; }
  .form { padding: 17px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .features > div { align-items: center; flex-direction: row; padding: 12px; gap: 13px; }
  .room-heading .button, .room-heading .primary { padding-inline: 8px; font-size: 14px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-controls { gap: 5px; }
  .room-controls .button { padding-inline: 8px; font-size: 14px; gap: 5px; }
  .room-controls .device.is-off::after { left: 7px; }
}
