/* Wadhwani Premium Ticket V15 — 2026-08-11 */
:root {
  --ink: #17211e;
  --muted: #6d7b76;
  --line: #e2ebe7;
  --surface: #ffffff;
  --page: #f2f7f5;
  --primary: #115d4c;
  --primary-dark: #0a493d;
  --primary-soft: #e8f4f0;
  --success: #147b5a;
  --warning: #a86f14;
  --danger: #bd3f49;
  --cream: #fff3c7;
  --shadow: 0 12px 32px rgba(16, 67, 55, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }

/* ================= MESSENGER / FACEBOOK IN-APP BROWSER FEATURE: BEGIN ================= */
body.browser-check-pending #mainApplication { visibility: hidden; }
body.browser-instruction-active { overflow: hidden; }
.browser-instruction-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  background: var(--page);
}
.browser-instruction-card {
  width: min(100%, 460px);
  padding: clamp(22px, 6vw, 34px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(30, 45, 80, .16);
}
.browser-instruction-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 20px;
  color: #fff;
  background: var(--primary);
  font-size: 2rem;
}
.browser-instruction-heading h1 {
  margin: 5px 0 10px;
  font-size: clamp(1.55rem, 7vw, 2rem);
  line-height: 1.15;
}
.browser-instruction-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
.browser-instruction-steps {
  display: grid;
  gap: 13px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}
.browser-instruction-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  color: var(--ink);
  line-height: 1.48;
}
.browser-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}
.browser-menu-symbol {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 25px;
  margin: 0 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  font-size: 1.35rem;
  line-height: 1;
  vertical-align: middle;
}
.browser-instruction-actions { display: grid; gap: 10px; }
.browser-instruction-actions .btn { min-height: 52px; border-radius: 14px; font-weight: 750; }
.browser-copy-confirmation {
  min-height: 24px;
  margin: 13px 0 0;
  color: var(--success);
  font-size: .9rem;
  font-weight: 700;
  text-align: center;
}
.browser-copy-confirmation.is-error { color: var(--danger); }
.browser-instruction-note {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}
@media (max-width: 420px) {
  .browser-instruction-screen { place-items: start center; }
  .browser-instruction-card { border-radius: 21px; }
  .browser-instruction-icon { width: 56px; height: 56px; border-radius: 17px; font-size: 1.75rem; }
}
/* ================== MESSENGER / FACEBOOK IN-APP BROWSER FEATURE: END ================== */

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 100; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 4vw; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.brand { border: 0; background: transparent; display: inline-flex; align-items: center; gap: .7rem; text-align: left; color: var(--ink); padding: 0; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--primary); font-weight: 800; letter-spacing: -.03em; }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand small { color: var(--muted); font-size: .75rem; margin-top: .1rem; }
.topbar-actions { display: flex; align-items: center; gap: .55rem; }
.live-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .62rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: .78rem; }
.live-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: blink 1.8s infinite; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); display: inline-grid; place-items: center; }
.icon-btn.soft { background: var(--page); }
.profile-btn { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .55rem .8rem; display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); }
.screen { padding: 24px 4vw 42px; }
.compact-wrap { width: min(980px, 100%); margin: 0 auto; }
.registration-wrap { width: min(820px, 100%); }
.intro-row, .panel-head, .fac-head, .batch-board-head, .roster-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.55rem, 4vw, 2.25rem); margin-bottom: .35rem; letter-spacing: -.035em; }
h2 { font-size: 1.2rem; margin-bottom: .25rem; }
h3 { font-size: 1rem; margin-bottom: .2rem; }
p { color: var(--muted); margin-bottom: 0; }
.eyebrow { color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; }
.stepper { display: flex; align-items: center; justify-content: center; margin: 22px auto; max-width: 470px; }
.step { display: grid; place-items: center; gap: .25rem; color: var(--muted); min-width: 62px; }
.step span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.step small { font-size: .72rem; }
.step.active { color: var(--primary); }
.step.active span, .step.done span { color: #fff; background: var(--primary); border-color: var(--primary); }
.step-line { width: 80px; height: 1px; background: var(--line); margin-bottom: 1.25rem; }
.form-label { font-weight: 650; color: #30384b; }
.form-label span { color: var(--danger); }
.form-control, .form-select { border-radius: 12px; border-color: #d9dde6; min-height: 46px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(17,93,76,.14); }
.form-tip { display: flex; gap: .65rem; align-items: flex-start; background: var(--primary-soft); color: #38456d; padding: .8rem .9rem; border-radius: 13px; margin-bottom: 1rem; font-size: .88rem; }
.form-tip i { color: var(--primary); }
.consent { display: flex; gap: .65rem; align-items: flex-start; color: #4d5566; font-size: .9rem; }
.btn { border-radius: 12px; font-weight: 650; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.student-summary { margin: 1rem 0; padding: .8rem .9rem; border-radius: 14px; background: var(--page); display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .86rem; color: var(--muted); }
.student-summary strong { color: var(--ink); }
.date-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.date-card { position: relative; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 1rem; color: var(--ink); overflow: hidden; }
.date-card::after { content: ""; position: absolute; inset: auto 0 0; height: var(--fill, 0%); background: var(--fill-color, rgba(21,127,91,.10)); z-index: 0; transition: height .2s; }
.date-card > * { position: relative; z-index: 1; }
.date-card.active { border: 2px solid var(--primary); padding: calc(1rem - 1px); }
.date-card:disabled { opacity: .74; cursor: not-allowed; }
.date-card.full { color: #7c2630; border-color: #efb7bd; --fill-color: rgba(194,58,70,.16); }
.date-card .day { font-size: .78rem; color: var(--muted); }
.date-card strong { display: block; font-size: 1.15rem; margin-top: .1rem; }
.date-card .capacity { display: flex; justify-content: space-between; gap: .5rem; margin-top: .7rem; font-size: .78rem; }
.date-card .full-label { display: inline-flex; margin-top: .55rem; padding: .22rem .48rem; border-radius: 999px; background: #ffe6e8; color: var(--danger); font-size: .7rem; font-weight: 800; }
.schedule-empty { min-height: 150px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.schedule-empty i { font-size: 2rem; color: #aab1bf; }
.slot-groups { display: grid; gap: 1rem; margin-top: 1rem; }
.group-title { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.group-title span { font-weight: 750; }
.group-title span i { color: var(--primary); margin-right: .35rem; }
.group-title small { color: var(--muted); }
.slot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.slot-btn { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: .8rem; text-align: left; color: var(--ink); }
.slot-btn strong, .slot-btn small { display: block; }
.slot-btn small { color: var(--muted); margin-top: .2rem; font-size: .72rem; }
.slot-btn.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(17,93,76,.14); background: var(--primary-soft); }
.slot-btn:disabled { background: #f2f3f6; color: #9aa0ad; cursor: not-allowed; }
.slot-btn.full { background: #fff0f1; color: var(--danger); border-color: #efc5ca; }
.selection-bar { position: sticky; bottom: 10px; margin-top: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .75rem; box-shadow: 0 12px 30px rgba(25,40,70,.14); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.selection-bar small, .selection-bar strong { display: block; }
.student-home-wrap { display: grid; gap: 14px; }
.my-card { border-radius: 24px; padding: 22px; color: #fff; background: var(--primary); box-shadow: 0 18px 45px rgba(10,73,61,.18); }
.my-card-head, .my-card-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.my-card .eyebrow { color: rgba(255,255,255,.74); }
.my-card h1 { margin-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .32rem .62rem; font-size: .72rem; font-weight: 800; background: #edf1ff; color: var(--primary); white-space: nowrap; }
.my-card .status-pill { background: rgba(255,255,255,.16); color: #fff; }
.my-card-body { display: grid; grid-template-columns: 1fr 1.7fr; gap: 1rem; align-items: end; margin: 1.3rem 0; }
.queue-block small, .queue-block span { display: block; color: rgba(255,255,255,.72); }
.queue-block strong { display: block; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1; letter-spacing: -.04em; margin: .25rem 0; }
.queue-block span { font-size: .78rem; word-break: break-all; }
.fact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.fact-grid > div { min-height: 72px; display: flex; align-items: center; gap: .55rem; padding: .7rem; border-radius: 14px; background: rgba(255,255,255,.12); }
.fact-grid i { font-size: 1.1rem; }
.fact-grid small, .fact-grid strong { display: block; }
.fact-grid small { color: rgba(255,255,255,.7); font-size: .7rem; }
.fact-grid strong { font-size: .82rem; }
.my-card-actions { justify-content: flex-start; }
.my-card .btn-light { color: var(--primary); }
.call-card, .late-card { border-radius: 20px; padding: 18px; border: 1px solid; background: #fff; }
.call-card { border-color: #f0d49a; background: #fffaf0; animation: callGlow 1.4s infinite alternate; }
.call-copy, .late-head { display: flex; align-items: flex-start; gap: .8rem; }
.call-icon, .late-head > span { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.call-icon { color: #8a5b00; background: #ffe8ad; }
.late-card { border-color: #f0c1c6; background: #fff7f7; }
.late-head > span { color: var(--danger); background: #ffe6e8; }
.response-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.response-note { margin-top: .8rem; padding: .65rem .75rem; border-radius: 12px; background: #fff; color: var(--ink); }
.available-reschedule { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .5rem; margin: .8rem 0; }
.available-reschedule button { border: 1px solid #efc5ca; border-radius: 12px; background: #fff; padding: .65rem; text-align: left; }
.queue-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .75rem; color: var(--muted); margin: .75rem 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: .28rem; }
.dot.pending { background: #9ca3af; }.dot.ongoing { background: #287866; }.dot.completed { background: #18a06e; }
.participant-list, .fac-roster { display: grid; gap: .45rem; max-height: 410px; overflow: auto; padding-right: .2rem; }
.participant-row { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: .65rem; align-items: center; padding: .68rem .75rem; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.participant-row .number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--page); font-size: .74rem; font-weight: 800; }
.participant-row .name strong, .participant-row .name small { display: block; }
.participant-row .name small { color: var(--muted); font-size: .72rem; }
.participant-row.owner { border-color: #68a693; background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(17,93,76,.12), 0 0 22px rgba(17,93,76,.16); animation: ownerGlow 1.8s ease-in-out infinite alternate; }
.you-badge { display: inline-flex; margin-left: .35rem; border-radius: 999px; background: var(--primary); color: #fff; padding: .12rem .38rem; font-size: .62rem; vertical-align: middle; }
.row-status { border-radius: 999px; padding: .25rem .5rem; font-size: .66rem; font-weight: 800; background: #f0f1f4; color: #626977; }
.row-status.ongoing { background: #e5f3ee; color: #135d4c; }.row-status.completed { background: #e5f7f0; color: var(--success); }.row-status.called { background: #fff1cc; color: #8a5b00; }.row-status.no_show { background: #ffe6e8; color: var(--danger); }
.empty-list { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.student-footer-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.link-button { border: 0; background: transparent; color: var(--muted); font-size: .82rem; }
.facilitator-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 22px; width: min(1380px,100%); margin: 0 auto; }
.fac-sidebar { align-self: start; position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; min-height: calc(100vh - 116px); display: flex; flex-direction: column; }
.fac-sidebar nav { display: grid; gap: .4rem; margin: 1.3rem 0; flex: 1; }
.fac-nav { border: 0; border-radius: 12px; background: transparent; padding: .7rem .75rem; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; text-align: left; color: #555e70; }
.fac-nav.active { background: var(--primary-soft); color: var(--primary); font-weight: 750; }
.fac-nav b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: #ffe6e8; color: var(--danger); font-size: .65rem; }
.fac-main { min-width: 0; }
.fac-filter-bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin: 1rem 0; }
.segmented { display: inline-flex; gap: .2rem; padding: .25rem; border: 1px solid var(--line); background: #fff; border-radius: 13px; }
.segmented button { border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: .55rem .75rem; font-weight: 650; white-space: nowrap; }
.segmented button.active { background: var(--primary); color: #fff; }
.batch-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .55rem; margin-bottom: 1rem; }
.batch-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: .8rem; text-align: left; }
.batch-card strong, .batch-card small { display: block; }
.batch-card small { color: var(--muted); font-size: .72rem; margin-top: .2rem; }
.batch-card.active { border-color: var(--primary); background: var(--primary-soft); }
.batch-card.full { border-color: #efc5ca; }
.fac-content-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.8fr); gap: 1rem; }
.search-input { max-width: 230px; }
.fac-roster { margin-top: .9rem; }
.fac-roster .participant-row { cursor: pointer; }
.fac-roster .participant-row.selected { border-color: var(--primary); background: var(--primary-soft); }
.selected-card { align-self: start; position: sticky; top: 92px; }
.empty-selection { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty-selection i { font-size: 2rem; color: #a7afbd; }
.selected-head { display: flex; justify-content: space-between; gap: .5rem; }
.selected-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; margin: 1rem 0; }
.selected-meta > div { border-radius: 12px; background: var(--page); padding: .65rem; }
.selected-meta small, .selected-meta strong { display: block; }
.selected-meta small { color: var(--muted); font-size: .68rem; }
.selected-meta strong { font-size: .78rem; margin-top: .2rem; }
.action-stack { display: grid; gap: .5rem; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.response-history { margin-top: .8rem; padding: .7rem; border-radius: 12px; background: var(--page); color: #535b6d; font-size: .8rem; }
.message-list { display: grid; gap: .7rem; }
.message-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .8rem; }
.message-item p { margin-top: .4rem; color: var(--ink); }
.compact-modal .modal-content, .modal-content { border: 0; border-radius: 22px; }
.qr-frame { width: 224px; height: 224px; margin: 0 auto 1rem; padding: 12px; border: 1px solid var(--line); border-radius: 18px; display: grid; place-items: center; background: #fff; }
.qr-frame img, .qr-frame canvas { max-width: 100%; height: auto !important; }
.qr-queue { display: block; font-size: 1.8rem; }
.qr-schedule { margin: .75rem 0; padding: .6rem; border-radius: 12px; background: var(--page); }
.scanner-box { position: relative; border-radius: 16px; background: #10131a; aspect-ratio: 4/3; overflow: hidden; }
.scanner-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border: 2px solid rgba(255,255,255,.85); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.divider { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .75rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.toast { border: 0; border-radius: 14px; box-shadow: var(--shadow); }
@keyframes blink { 50% { opacity: .35; } }
@keyframes callGlow { from { box-shadow: 0 0 0 rgba(183,121,31,0); } to { box-shadow: 0 0 22px rgba(183,121,31,.22); } }
@keyframes ownerGlow { from { box-shadow: 0 0 0 2px rgba(17,93,76,.08), 0 0 12px rgba(17,93,76,.08); } to { box-shadow: 0 0 0 2px rgba(17,93,76,.18), 0 0 24px rgba(17,93,76,.20); } }
@media (max-width: 980px) {
  .facilitator-layout { grid-template-columns: 1fr; }
  .fac-sidebar { position: static; min-height: auto; flex-direction: row; align-items: center; gap: .8rem; }
  .fac-sidebar > div { display: none; }
  .fac-sidebar nav { display: flex; margin: 0; flex: 1; }
  .fac-sidebar .btn { width: auto !important; }
  .selected-card { position: static; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 14px; }
  .profile-btn span, .live-pill { display: none; }
  .screen { padding: 16px 12px 32px; }
  .surface { border-radius: 18px; padding: 16px; }
  .intro-row, .panel-head, .fac-head, .roster-head { align-items: flex-start; }
  .slot-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .my-card { border-radius: 20px; padding: 17px; }
  .my-card-body { grid-template-columns: 1fr; }
  .queue-block strong { font-size: 2.5rem; }
  .fact-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .fact-grid > div { display: block; min-height: 75px; }
  .fact-grid i { display: block; margin-bottom: .35rem; }
  .my-card-actions .btn { flex: 1; }
  .response-grid { grid-template-columns: 1fr; }
  .fac-filter-bar { align-items: stretch; flex-direction: column; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1; }
  .batch-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fac-content-grid { grid-template-columns: 1fr; }
  .search-input { max-width: 145px; }
  .selected-card { order: -1; }
  .fac-sidebar { position: sticky; top: 68px; z-index: 90; padding: .45rem; border-radius: 14px; }
  .fac-sidebar nav { gap: .2rem; }
  .fac-nav { padding: .55rem; grid-template-columns: 22px minmax(0,1fr) auto; }
  .fac-sidebar .btn { font-size: 0; width: 40px !important; height: 40px; padding: 0; }
  .fac-sidebar .btn i { font-size: 1rem; margin: 0 !important; }
}
@media (max-width: 520px) {
  .brand strong { font-size: .9rem; }
  .date-grid { grid-template-columns: 1fr; }
  .intro-row { display: block; }
  .intro-row .btn { margin-top: .7rem; }
  .step-line { width: 44px; }
  .fact-grid { gap: .35rem; }
  .fact-grid > div { padding: .55rem; }
  .participant-row { grid-template-columns: 40px minmax(0,1fr) auto; padding: .58rem; }
  .participant-row .number { width: 36px; height: 36px; }
  .available-reschedule { grid-template-columns: 1fr; }
  .selection-bar { align-items: stretch; flex-direction: column; }
  .selection-bar .btn { width: 100%; }
  .fac-head { display: block; }
  .fac-actions { display: flex; gap: .4rem; margin-top: .7rem; }
  .message-item { grid-template-columns: 1fr; }
}


/* ================= MINIMAL GREEN UI ENHANCEMENT: BEGIN ================= */
body { background: var(--page); letter-spacing: -.005em; }
.topbar {
  height: 76px;
  padding: 0 clamp(15px, 4vw, 34px);
  background: rgba(255, 255, 255, .97);
  border-bottom-color: #e8efec;
  box-shadow: 0 1px 0 rgba(11, 65, 53, .02);
}
.brand { gap: 12px; }
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #176b58, #0d5143);
  font-size: 1rem;
}
.brand strong { font-size: 1rem; font-weight: 800; }
.brand small { font-size: .82rem; }
.live-pill { display: none; }
.icon-btn, .profile-btn {
  min-width: 46px;
  height: 46px;
  border-radius: 15px;
  border-color: var(--line);
  background: #fff;
}
.screen { padding-top: 16px; }
.compact-wrap { width: min(900px, 100%); }
.student-home-wrap { width: min(700px, 100%); gap: 16px; }
.surface { border-radius: 24px; border-color: var(--line); box-shadow: none; }
.eyebrow { color: var(--primary); letter-spacing: .14em; }
.btn { min-height: 44px; border-radius: 14px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: #79a99a; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.form-control, .form-select { border-radius: 14px; border-color: var(--line); background-color: #fbfdfc; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(17,93,76,.12); }

.registration-wrap { width: min(760px, 100%); }
.intro-row { margin-bottom: 4px; }
.stepper { margin: 16px auto; }
.form-tip { background: var(--primary-soft); color: #355d52; }
.date-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.date-card {
  min-height: 132px;
  border-radius: 20px;
  border-color: var(--line);
  padding: 14px;
  box-shadow: none;
}
.date-card:hover:not(:disabled) { border-color: #89b7a9; transform: translateY(-1px); }
.date-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(17,93,76,.10); }
.date-card.today { background: #fbfffd; }
.today-label, .smart-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 7px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.date-card .day { margin-top: 6px; }
.date-card .capacity { align-items: end; }
.slot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slot-btn {
  min-height: 92px;
  border-radius: 17px;
  border-color: var(--line);
  padding: 12px;
}
.slot-btn.recommended { border-color: #94bcae; background: #f7fcfa; }
.slot-btn.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(17,93,76,.10); }
.smart-label { margin-bottom: 7px; font-size: .6rem; }
.selection-bar { border-radius: 18px; box-shadow: 0 10px 26px rgba(16,67,55,.12); }

.my-card {
  overflow: hidden;
  padding: 0;
  border-radius: 28px;
  background: var(--primary);
  box-shadow: 0 16px 34px rgba(10,73,61,.16);
}
.my-card-head { padding: 20px 18px 6px; align-items: flex-start; }
.my-card .eyebrow { color: #d3ece4; }
.my-card h1 { margin-top: 4px; font-size: clamp(1.55rem, 7vw, 2.05rem); }
.my-card .status-pill {
  color: #6d4c00;
  background: var(--cream);
  padding: 8px 13px;
  font-size: .75rem;
}
.my-card-body { display: block; margin: 0; padding: 10px 18px 18px; }
.queue-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 5px 0 14px;
}
.queue-title-row span { color: rgba(255,255,255,.88); font-size: .92rem; }
.queue-title-row strong {
  color: #fff;
  font-size: clamp(2.35rem, 11vw, 3.45rem);
  line-height: .95;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.student-account-id {
  display: block;
  margin: -7px 0 14px;
  color: rgba(255,255,255,.62);
  font-size: .72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.fact-grid > div {
  min-height: 86px;
  display: flex;
  align-items: center;
  padding: 11px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.11);
}
.fact-grid small { color: rgba(255,255,255,.78); font-size: .72rem; }
.fact-grid strong { margin-top: 4px; color: #fff; font-size: .9rem; line-height: 1.25; }
.my-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 11px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(3,45,37,.18);
}
.my-card-actions .btn { min-height: 42px; }
.my-card-actions .btn-primary { color: var(--primary); background: #fff; border-color: #fff; }
.my-card-actions .btn-light { color: #fff; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.28); }
.my-card-actions .btn-light:hover { background: rgba(255,255,255,.16); }

.batch-board { padding: 0; overflow: hidden; }
.batch-board-head { padding: 19px 19px 12px; align-items: center; }
.batch-board-head h2 { margin-top: 3px; font-size: 1.18rem; }
.line-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 0 13px 12px;
}
.line-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 45px;
  border: 0;
  border-radius: 14px;
  color: #6b7974;
  background: #f1f5f3;
  font-size: .84rem;
  font-weight: 750;
}
.line-tabs button b { font-size: .78rem; }
.line-tabs button.active { color: var(--primary); background: var(--primary-soft); }
.queue-legend { display: none; }
.participant-list {
  max-height: 354px;
  gap: 0;
  overflow-y: auto;
  padding: 0;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
}
.participant-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 74px;
  gap: 11px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}
.participant-row .number {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1rem;
}
.participant-row .name strong { font-size: .97rem; }
.participant-row .name small { margin-top: 3px; font-size: .8rem; }
.participant-meta { text-align: right; }
.participant-meta > strong { display: block; color: var(--ink); font-size: .88rem; }
.participant-meta .row-status { display: inline-flex; margin-top: 4px; }
.participant-row.owner {
  position: relative;
  border-color: transparent;
  background: linear-gradient(90deg, #e9f7f2, #f7fcfa);
  box-shadow: inset 4px 0 0 var(--primary);
  animation: ownerGreenGlow 1.8s ease-in-out infinite alternate;
}
.you-badge { background: var(--primary); }
.row-status.ongoing { color: var(--primary); background: var(--primary-soft); }
.empty-list { min-height: 150px; display: grid; place-items: center; }
.student-footer-actions { margin-top: -4px; }
#studentHomeScreen #changeStudentAccountButton { display: none; }

.fac-sidebar, .selected-card, .roster-card { box-shadow: none; }
.fac-nav.active, .batch-card.active, .fac-roster .participant-row.selected { color: var(--primary); background: var(--primary-soft); }
.segmented button.active { background: var(--primary); }
.batch-card { border-radius: 16px; }
.browser-instruction-icon { background: var(--primary); }

@keyframes ownerGreenGlow {
  from { box-shadow: inset 4px 0 0 var(--primary), 0 0 0 rgba(17,93,76,0); }
  to { box-shadow: inset 4px 0 0 var(--primary), 0 0 18px rgba(17,93,76,.16); }
}

@media (max-width: 760px) {
  .topbar { height: 76px; padding: 0 15px; }
  .screen { padding: 16px 9px 26px; }
  .student-home-wrap { gap: 16px; }
  .my-card { border-radius: 27px; }
  .my-card-head { padding: 19px 17px 5px; }
  .my-card-body { padding: 8px 17px 17px; }
  .my-card-actions { padding: 10px 13px 13px; }
  .fact-grid > div { min-height: 84px; }
  .batch-board-head { padding: 18px 18px 11px; }
  .participant-row { padding-inline: 17px; }
  .date-grid {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2px 1px 8px;
  }
  .date-card { flex: 0 0 min(76vw, 230px); scroll-snap-align: start; }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .brand strong { font-size: .96rem; }
  .brand small { font-size: .77rem; }
  .brand-mark { width: 47px; height: 47px; }
  .topbar-actions { gap: 8px; }
  .icon-btn { width: 46px; }
  .queue-title-row strong { font-size: 2.7rem; }
  .fact-grid > div { padding: 10px 8px; }
  .fact-grid strong { font-size: .83rem; }
  .line-tabs { padding-inline: 12px; }
  .line-tabs button { gap: 3px; font-size: .78rem; }
  .participant-row { grid-template-columns: 43px minmax(0, 1fr) auto; padding: 10px 14px; }
  .participant-row .number { width: 36px; height: 36px; }
}
/* ================== MINIMAL GREEN UI ENHANCEMENT: END ================== */


/* ================= GOOGLE APPS SCRIPT CONNECTION: BEGIN ================= */
.app-loading {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--page);
  transition: opacity .2s ease, visibility .2s ease;
}
.app-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.app-loading-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: min(100%, 390px);
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.loading-mark {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 15px;
  color: #fff;
  background: var(--primary);
  font-weight: 850;
}
.app-loading-card strong,
.app-loading-card small { display: block; }
.app-loading-card strong { font-size: .92rem; }
.app-loading-card small { margin-top: 2px; color: var(--muted); font-size: .76rem; }
.app-loading-card .spinner-border { color: var(--primary); }
.is-busy { pointer-events: none; opacity: .7; }
.connection-error-card {
  width: min(100%, 480px);
  margin: 40px auto;
  padding: 22px;
  border: 1px solid #efc5ca;
  border-radius: 20px;
  background: #fff7f7;
  text-align: center;
}
/* ================== GOOGLE APPS SCRIPT CONNECTION: END ================== */

/* ================= CUTE BOOTSTRAP + WATERCOLOR CAPACITY UI: BEGIN ================= */
:root {
  --cute-mint: #dff6ee;
  --cute-sky: #e6f3ff;
  --cute-lilac: #eee9ff;
  --cute-peach: #fff0dd;
  --cute-rose: #ffe4e8;
  --cute-yellow: #fff7cf;
  --soft-border: #dce9e4;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 4%, rgba(209, 242, 230, .72), transparent 28rem),
    radial-gradient(circle at 94% 10%, rgba(230, 239, 255, .72), transparent 25rem),
    #f5faf8;
}

.app-shell { min-height: 100dvh; }
.topbar {
  border-bottom: 1px solid rgba(17, 93, 76, .08);
  box-shadow: 0 8px 28px rgba(21, 64, 53, .05);
}

.surface,
.modal-content,
.fac-sidebar {
  border-color: var(--soft-border);
  box-shadow: 0 14px 36px rgba(17, 74, 59, .07);
}

.registration-wrap .surface {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
}

.form-control,
.form-select {
  border-width: 1.5px;
  background-color: #fbfefd;
}
.form-control:hover,
.form-select:hover { border-color: #b7d4ca; }
.form-control-lg { min-height: 54px; }

.btn-soft-primary {
  color: var(--primary);
  border: 1px solid #c8e0d8;
  background: var(--primary-soft);
}
.btn-soft-primary:hover,
.btn-soft-primary:focus {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.availability-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #d7ebe4;
  border-radius: 16px;
  background: linear-gradient(135deg, #f2fbf7, #f8fcff);
}
.availability-toolbar > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
}
.availability-toolbar strong { font-size: .88rem; }
.availability-toolbar small {
  grid-column: 2;
  color: var(--muted);
  font-size: .73rem;
}
.availability-dot {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #27a47a;
  box-shadow: 0 0 0 5px rgba(39, 164, 122, .12);
}

.schedule-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 84px;
  margin: 12px 0;
  border: 1px dashed #bcd8ce;
  border-radius: 18px;
  color: var(--primary);
  background: #f8fcfa;
  font-size: .88rem;
  font-weight: 700;
}
.date-grid.is-loading,
.slot-groups.is-loading { opacity: .45; pointer-events: none; }

/* Water-fill cards: the fill rises as registered seats increase. */
.watercolor-card {
  --water-level: 0%;
  --water-color-1: rgba(201, 239, 226, .72);
  --water-color-2: rgba(224, 247, 239, .84);
  --water-delay: 0s;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.watercolor-card::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: auto -8% 0;
  height: var(--water-level);
  min-height: 0;
  border-radius: 42% 48% 0 0 / 14px 18px 0 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.34), transparent 27%),
    radial-gradient(circle at 72% 30%, rgba(255,255,255,.24), transparent 31%),
    linear-gradient(145deg, var(--water-color-1), var(--water-color-2));
  opacity: .92;
  transition: height .45s cubic-bezier(.2,.8,.2,1), background .25s ease;
}
.watercolor-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -10%;
  width: 120%;
  height: 20px;
  bottom: calc(var(--water-level) - 10px);
  background:
    radial-gradient(18px 8px at 18px 10px, var(--water-color-1) 68%, transparent 72%) 0 0 / 36px 20px repeat-x;
  opacity: .72;
  animation: watercolorWave 5.5s linear infinite;
  animation-delay: var(--water-delay);
  transition: bottom .45s cubic-bezier(.2,.8,.2,1);
}
.watercolor-card.capacity-empty::before,
.watercolor-card.capacity-empty::after { opacity: 0; }
.watercolor-card.capacity-low {
  --water-color-1: rgba(197, 239, 226, .76);
  --water-color-2: rgba(222, 247, 239, .86);
}
.watercolor-card.capacity-medium {
  --water-color-1: rgba(218, 210, 255, .70);
  --water-color-2: rgba(236, 232, 255, .86);
}
.watercolor-card.capacity-high {
  --water-color-1: rgba(255, 218, 178, .76);
  --water-color-2: rgba(255, 239, 218, .90);
}
.watercolor-card.capacity-full {
  --water-color-1: rgba(255, 190, 199, .78);
  --water-color-2: rgba(255, 225, 230, .92);
}
.watercolor-card > * { position: relative; z-index: 2; }
.watercolor-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #8ebdac;
  box-shadow: 0 12px 25px rgba(17, 93, 76, .10);
}
.watercolor-card.active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(17,93,76,.12), 0 12px 24px rgba(17,93,76,.09) !important;
}

.date-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.date-card {
  min-height: 144px;
  border: 1.5px solid var(--soft-border);
  background: rgba(255,255,255,.94);
}
.date-card .capacity { font-weight: 650; }
.date-card .full-label {
  color: #9a3340;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(189,63,73,.18);
}

.slot-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}
.slot-btn {
  min-height: 126px;
  padding: 14px;
  border: 1.5px solid var(--soft-border);
  background: rgba(255,255,255,.95);
}
.slot-btn:disabled { opacity: .72; }
.slot-time-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 11px;
  color: var(--primary);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(17,93,76,.10);
}
.slot-btn strong { font-size: .92rem; }
.slot-btn small { min-height: 20px; }
.smart-label {
  color: #694f00;
  background: var(--cute-yellow);
  border: 1px solid rgba(168,111,20,.16);
}

.capacity-meter {
  height: 7px;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 0 0 1px rgba(17,93,76,.06);
}
.capacity-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  opacity: .72;
}
.capacity-high .capacity-meter > span { background: #d58932; }
.capacity-full .capacity-meter > span { background: var(--danger); opacity: .86; }

.group-title {
  padding: 0 2px;
  color: #30443e;
}
.group-title > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.selection-bar {
  border-color: #cce2da;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}

/* Student list is intentionally snapshot-based; refresh is manual. */
.batch-board-head::after {
  content: "Snapshot list";
  align-self: center;
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #6b7974;
  background: #f0f5f3;
  font-size: .65rem;
  font-weight: 800;
  white-space: nowrap;
}
.batch-board-head .icon-btn { flex: 0 0 auto; }

.auto-access-note {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: .68rem;
  font-weight: 750;
}

@keyframes watercolorWave {
  from { transform: translateX(0); }
  to { transform: translateX(36px); }
}

@media (max-width: 767.98px) {
  .screen { padding-inline: 10px; }
  .registration-wrap { width: 100%; }
  .surface { padding: 16px; border-radius: 20px; }
  .availability-toolbar { align-items: stretch; flex-direction: column; }
  .availability-toolbar .btn { width: 100%; }
  .date-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x mandatory;
  }
  .date-card {
    flex: 0 0 min(78vw, 240px);
    scroll-snap-align: start;
  }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-btn { min-height: 120px; }
  .batch-board-head::after { display: none; }
}

@media (max-width: 420px) {
  .intro-row h1 { font-size: 1.55rem; }
  .stepper { transform: scale(.94); transform-origin: center; }
  .slot-grid { gap: 8px; }
  .slot-btn { min-height: 116px; padding: 12px; }
  .slot-btn strong { font-size: .84rem; }
  .availability-toolbar { padding: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .watercolor-card,
  .watercolor-card::before,
  .watercolor-card::after { animation: none !important; transition: none !important; }
}
/* ================== CUTE BOOTSTRAP + WATERCOLOR CAPACITY UI: END ================== */


/* ================= BOTANICAL PASTEL MOBILE EXPERIENCE: BEGIN ================= */
/*
  Final visual layer. The palette borrows the sample's calm green and soft
  pastels, while the composition remains purpose-built for this scheduler.
*/
:root {
  --ink: #17372f;
  --muted: #71817c;
  --line: #dce9e4;
  --surface: #fffefa;
  --page: #f4f8f5;
  --primary: #0f6754;
  --primary-dark: #084d3f;
  --primary-bright: #2c8b70;
  --primary-soft: #e2f3ed;
  --success: #1f8a65;
  --warning: #b57519;
  --danger: #b94a59;
  --cream: #fff2bf;
  --pastel-mint: #dff3eb;
  --pastel-sky: #e2f0f7;
  --pastel-lilac: #ece8f8;
  --pastel-peach: #f9e7dc;
  --pastel-rose: #f9e2e6;
  --shadow-sm: 0 8px 24px rgba(20, 72, 59, .07);
  --shadow: 0 18px 48px rgba(20, 72, 59, .10);
  --shadow-strong: 0 24px 60px rgba(8, 77, 63, .18);
}

html {
  background: #edf5f1;
  scroll-behavior: smooth;
}

body.botanical-theme {
  min-width: 280px;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at -4% 2%, rgba(205, 236, 225, .92) 0, transparent 29rem),
    radial-gradient(circle at 102% 9%, rgba(229, 225, 247, .80) 0, transparent 25rem),
    radial-gradient(circle at 76% 100%, rgba(249, 228, 215, .74) 0, transparent 30rem),
    var(--page);
  font-family: ui-rounded, "SF Pro Rounded", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.botanical-theme::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: radial-gradient(rgba(15, 103, 84, .22) .65px, transparent .65px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 62%);
}

::selection { color: #fff; background: var(--primary); }

:where(button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(44, 139, 112, .32) !important;
  outline-offset: 3px;
}

.topbar {
  height: 74px;
  padding-inline: max(18px, calc((100vw - 1400px) / 2));
  border-bottom: 1px solid rgba(15, 103, 84, .10);
  background: rgba(255, 254, 250, .88);
  box-shadow: 0 8px 32px rgba(21, 67, 55, .055);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}

.brand { gap: 11px; border-radius: 16px; }
.brand-mark,
.loading-mark {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #268a70 0%, var(--primary) 52%, var(--primary-dark) 100%);
  box-shadow: 0 9px 20px rgba(15, 103, 84, .22), inset 0 1px 0 rgba(255,255,255,.26);
}
.brand-mark::after,
.loading-mark::after {
  content: "";
  position: absolute;
  width: 29px;
  height: 29px;
  top: -13px;
  right: -11px;
  border-radius: 50%;
  background: rgba(255,255,255,.20);
}
.brand strong { color: #12362d; font-weight: 850; letter-spacing: -.02em; }
.brand small { color: #71817c; }

.icon-btn,
.profile-btn {
  border-color: rgba(15, 103, 84, .12);
  background: rgba(255,255,255,.76);
  box-shadow: 0 5px 14px rgba(20,72,59,.055);
  transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}
.icon-btn:hover,
.profile-btn:hover {
  color: var(--primary);
  border-color: rgba(15, 103, 84, .30);
  background: #fff;
  transform: translateY(-1px);
}

.screen { padding-top: 22px; }
.compact-wrap { width: min(960px, 100%); }
.registration-wrap { width: min(790px, 100%); }

.registration-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: center;
  min-height: 184px;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(15, 103, 84, .11);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 241, 188, .90) 0 44px, transparent 45px),
    radial-gradient(circle at 81% 116%, rgba(231, 224, 249, .92) 0 105px, transparent 106px),
    linear-gradient(132deg, rgba(224, 244, 237, .98), rgba(249, 252, 248, .98) 58%, rgba(226, 240, 247, .94));
  box-shadow: var(--shadow-sm);
}
.registration-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 170px;
  top: -94px;
  left: 46%;
  border: 24px solid rgba(255,255,255,.48);
  border-radius: 50%;
}
.registration-hero .intro-copy { max-width: 570px; }
.registration-hero h1 {
  max-width: 600px;
  margin: 6px 0 8px;
  color: #103c31;
  font-size: clamp(1.75rem, 4.5vw, 2.65rem);
  line-height: 1.05;
}
.registration-hero p { max-width: 540px; color: #57716a; line-height: 1.55; }
.registration-hero > .btn {
  align-self: flex-start;
  min-width: 104px;
  border: 1px solid rgba(15,103,84,.13);
  background: rgba(255,255,255,.76);
  box-shadow: 0 8px 20px rgba(15,103,84,.08);
  backdrop-filter: blur(8px);
}
.registration-hero > .btn:hover { color: var(--primary); background: #fff; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.hero-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid rgba(15,103,84,.10);
  border-radius: 999px;
  color: #42675e;
  background: rgba(255,255,255,.60);
  font-size: .72rem;
  font-weight: 750;
}
.hero-chips i { color: var(--primary); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .145em;
}

.stepper {
  width: min(100%, 500px);
  margin: 17px auto 19px;
  padding: 9px 12px 7px;
  border: 1px solid rgba(15,103,84,.08);
  border-radius: 22px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 8px 20px rgba(15,103,84,.035);
  backdrop-filter: blur(8px);
}
.step { min-width: 66px; }
.step span {
  width: 34px;
  height: 34px;
  border: 1.5px solid #cfe0da;
  box-shadow: 0 4px 10px rgba(15,103,84,.05);
}
.step.active span,
.step.done span {
  background: linear-gradient(145deg, var(--primary-bright), var(--primary));
  box-shadow: 0 7px 16px rgba(15,103,84,.22);
}
.step small { font-weight: 700; }
.step-line {
  flex: 1 1 58px;
  width: auto;
  max-width: 92px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, #d5e5df, #c9ddd6);
}

.surface {
  border: 1px solid rgba(15,103,84,.10);
  background: rgba(255,254,250,.94);
  box-shadow: var(--shadow-sm);
}
#detailsPanel,
#schedulePanel { padding: clamp(18px, 3vw, 27px); }

.form-tip {
  border: 1px solid rgba(15,103,84,.08);
  background: linear-gradient(120deg, var(--pastel-mint), #eef9f5);
}
.form-tip i {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: -3px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
}
.form-label { margin-bottom: .42rem; color: #29483f; font-size: .88rem; font-weight: 750; }
.form-control,
.form-select {
  min-height: 50px;
  border: 1.5px solid #d5e4df;
  border-radius: 15px;
  color: var(--ink);
  background-color: rgba(251,254,252,.94);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-control::placeholder { color: #a0ada9; }
.form-control:hover,
.form-select:hover { border-color: #a9cbbf; }
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-bright);
  background-color: #fff;
  box-shadow: 0 0 0 .24rem rgba(44,139,112,.12);
}
.form-control:disabled,
.form-select:disabled { color: #91a09b; background-color: #f0f4f2; }
.form-text { color: #7c8d87; font-size: .76rem; }
.consent {
  min-height: 46px;
  padding: 11px 12px;
  border: 1px dashed #c8ddd5;
  border-radius: 14px;
  background: #f8fbf9;
}
.form-check-input { flex: 0 0 auto; width: 1.12rem; height: 1.12rem; margin-top: .12rem; }
.form-check-input:checked { border-color: var(--primary); background-color: var(--primary); }

.btn {
  min-height: 46px;
  border-radius: 14px;
  font-weight: 750;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn-primary {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-bright), var(--primary));
  box-shadow: 0 10px 22px rgba(15,103,84,.18);
}
.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--primary-dark);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 26px rgba(15,103,84,.23);
}
.btn-light { color: #3d5e55; border-color: #d9e5e1; background: #fff; }
.btn-outline-primary { color: var(--primary); border-color: #8fbbae; }

.panel-head { align-items: center; }
.panel-head p { line-height: 1.45; }
.student-summary {
  border: 1px solid #dce9e4;
  background: linear-gradient(120deg, #f6faf8, #fbfcfa);
}
.availability-toolbar {
  border-color: rgba(44,139,112,.14);
  background: linear-gradient(120deg, rgba(226,243,237,.88), rgba(226,240,247,.68));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.availability-dot { background: #2da57e; box-shadow: 0 0 0 5px rgba(45,165,126,.12); }

.date-grid { gap: 12px; }
.date-card,
.slot-btn {
  border-color: rgba(15,103,84,.13);
  color: var(--ink);
  background: rgba(255,254,250,.93);
  box-shadow: 0 7px 18px rgba(24,77,63,.045);
}
.date-card { min-height: 150px; padding: 16px; }
.date-card .day { color: #75847f; font-weight: 650; }
.date-card strong { color: #183d33; }
.date-card .capacity { color: #5f746e; }
.date-card .capacity span:last-child { color: var(--primary); font-weight: 800; }
.date-card.active,
.slot-btn.active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(15,103,84,.11), 0 14px 28px rgba(15,103,84,.10) !important;
}
.date-card.active::marker,
.slot-btn.active::marker { color: var(--primary); }
.today-label,
.smart-label {
  border-color: rgba(15,103,84,.10);
  color: var(--primary);
  background: rgba(255,255,255,.68);
}

.slot-groups { gap: 19px; }
.group-title {
  margin-bottom: 9px;
  padding: 0 3px;
}
.group-title span { color: #2a4b42; }
.group-title span i {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--pastel-peach);
}
.slot-groups section:nth-child(2) .group-title span i { background: var(--pastel-lilac); }
.slot-btn { min-height: 128px; }
.slot-time-icon {
  color: var(--primary);
  border-color: rgba(15,103,84,.09);
  background: rgba(255,255,255,.65);
  box-shadow: 0 4px 12px rgba(20,72,59,.05);
}
.slot-btn strong { color: #1d4037; }
.slot-btn small { color: #687c76; line-height: 1.35; }
.slot-btn.recommended { border-color: #e1bd5c; }
.slot-btn .smart-label { color: #74580a; background: rgba(255,245,199,.86); }
.slot-btn:disabled { filter: grayscale(.12); }

.watercolor-card.capacity-low {
  --water-color-1: rgba(199, 235, 223, .80);
  --water-color-2: rgba(225, 245, 237, .92);
}
.watercolor-card.capacity-medium {
  --water-color-1: rgba(216, 210, 242, .78);
  --water-color-2: rgba(235, 231, 248, .94);
}
.watercolor-card.capacity-high {
  --water-color-1: rgba(247, 216, 195, .82);
  --water-color-2: rgba(252, 235, 222, .94);
}
.watercolor-card.capacity-full {
  --water-color-1: rgba(244, 196, 204, .86);
  --water-color-2: rgba(250, 224, 228, .96);
}
.capacity-meter { height: 6px; background: rgba(255,255,255,.68); }
.capacity-meter > span { background: linear-gradient(90deg, #5bb89b, var(--primary)); }

.selection-bar {
  bottom: max(10px, env(safe-area-inset-bottom));
  border: 1px solid rgba(15,103,84,.16);
  background: rgba(255,254,250,.93);
  box-shadow: 0 18px 40px rgba(8,77,63,.16);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}
.selection-bar small { color: var(--muted); }
.selection-bar strong { color: #173d33; }

.my-card {
  position: relative;
  isolation: isolate;
  background: linear-gradient(145deg, #17735e 0%, var(--primary) 52%, #084b3d 100%);
  box-shadow: var(--shadow-strong);
}
.my-card::before,
.my-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.my-card::before {
  width: 190px;
  height: 190px;
  top: -105px;
  right: -58px;
  border: 28px solid rgba(255,242,191,.12);
}
.my-card::after {
  width: 140px;
  height: 140px;
  bottom: -94px;
  left: 34%;
  background: rgba(236,232,248,.08);
}
.my-card .status-pill { color: #684f00; background: var(--cream); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.fact-grid > div { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.11); }
.my-card-actions { background: rgba(3,45,37,.20); }

.call-card { border-color: #ebd293; background: linear-gradient(135deg, #fff9e8, #fffdf7); }
.late-card { border-color: #efc4ca; background: linear-gradient(135deg, #fff4f5, #fffafa); }
.batch-board { border-radius: 24px; }
.line-tabs button { min-height: 46px; }
.line-tabs button.active { box-shadow: inset 0 0 0 1px rgba(15,103,84,.08); }
.participant-row { transition: background .16s ease, box-shadow .16s ease; }
.participant-row .number { color: var(--primary); background: var(--pastel-mint); }
.participant-row.owner { background: linear-gradient(90deg, #e1f3ed, #f7fbf8); }

.fac-sidebar,
.selected-card,
.roster-card { border-color: rgba(15,103,84,.10); background: rgba(255,254,250,.94); }
.fac-nav { min-height: 46px; }
.fac-nav.active { box-shadow: inset 0 0 0 1px rgba(15,103,84,.08); }
.segmented { border-color: rgba(15,103,84,.11); background: rgba(255,255,255,.70); box-shadow: var(--shadow-sm); }
.segmented button.active { background: linear-gradient(135deg, var(--primary-bright), var(--primary)); box-shadow: 0 7px 16px rgba(15,103,84,.16); }
.batch-card { min-height: 74px; border-color: rgba(15,103,84,.11); box-shadow: 0 6px 16px rgba(20,72,59,.04); }
.batch-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(15,103,84,.08); }
.message-item { border-color: rgba(15,103,84,.10); box-shadow: var(--shadow-sm); }

.modal-content {
  overflow: hidden;
  border: 1px solid rgba(15,103,84,.10);
  border-radius: 26px;
  background: #fffefa;
  box-shadow: 0 26px 70px rgba(12,54,44,.20);
}
.modal-header { padding: 20px 22px 15px; border-bottom-color: #e5eeea; }
.modal-body { padding: 20px 22px; }
.modal-footer { padding: 14px 22px 20px; border-top-color: #e5eeea; }
.btn-close { border-radius: 10px; }
.qr-frame { border: 8px solid var(--pastel-mint); box-shadow: inset 0 0 0 1px rgba(15,103,84,.10); }
.qr-schedule { border: 1px solid #dce9e4; background: linear-gradient(120deg, var(--pastel-mint), #f3f8f5); }
.toast { border: 1px solid rgba(15,103,84,.10); background: #fffefa; }

.browser-instruction-screen,
.app-loading { background:
  radial-gradient(circle at 10% 8%, rgba(207,237,226,.82), transparent 21rem),
  radial-gradient(circle at 96% 92%, rgba(232,226,247,.84), transparent 22rem),
  var(--page); }
.browser-instruction-card,
.app-loading-card { border-color: rgba(15,103,84,.11); background: rgba(255,254,250,.95); box-shadow: var(--shadow-strong); }

@media (hover: hover) and (pointer: fine) {
  .date-card:hover:not(:disabled),
  .slot-btn:hover:not(:disabled),
  .batch-card:hover,
  .fac-nav:hover { transform: translateY(-2px); }
}

@media (max-width: 980px) {
  .facilitator-layout { gap: 16px; }
}

@media (max-width: 767.98px) {
  body.botanical-theme {
    background:
      radial-gradient(circle at -12% 0, rgba(205,236,225,.96) 0, transparent 19rem),
      radial-gradient(circle at 112% 16%, rgba(231,226,248,.78) 0, transparent 17rem),
      #f5f8f5;
  }
  body.botanical-theme::before { opacity: .18; background-size: 16px 16px; }
  .topbar {
    height: 66px;
    padding: 8px max(11px, env(safe-area-inset-right)) 8px max(11px, env(safe-area-inset-left));
    border-radius: 0 0 20px 20px;
  }
  .brand { min-width: 0; gap: 9px; }
  .brand-mark { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; }
  .brand > span:last-child { min-width: 0; }
  .brand strong,
  .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand strong { font-size: .91rem; }
  .brand small { font-size: .69rem; }
  .topbar-actions { flex: 0 0 auto; gap: 6px; }
  .icon-btn,
  .profile-btn { min-width: 42px; width: 42px; height: 42px; padding: 0; border-radius: 13px; }

  .screen { padding: 13px 10px calc(28px + env(safe-area-inset-bottom)); }
  .registration-hero {
    min-height: 0;
    margin-bottom: 13px;
    padding: 20px;
    border-radius: 24px;
    background:
      radial-gradient(circle at 96% 4%, rgba(255,242,191,.86) 0 35px, transparent 36px),
      radial-gradient(circle at 93% 114%, rgba(231,225,248,.88) 0 76px, transparent 77px),
      linear-gradient(138deg, rgba(222,243,236,.98), rgba(249,252,248,.98) 72%);
  }
  .registration-hero::before { width: 100px; height: 100px; top: -68px; left: 52%; border-width: 16px; }
  .registration-hero h1 { max-width: 430px; font-size: clamp(1.6rem, 7.5vw, 2.05rem); line-height: 1.08; }
  .registration-hero p { max-width: 440px; font-size: .9rem; }
  .hero-chips { margin-top: 14px; }

  body.registration-schedule-mode .registration-hero {
    display: flex;
    min-height: 0;
    margin-bottom: 10px;
    padding: 13px 14px;
    border-radius: 19px;
    background: linear-gradient(130deg, rgba(222,243,236,.98), rgba(246,251,248,.98));
  }
  body.registration-schedule-mode .registration-hero::before { display: none; }
  body.registration-schedule-mode .registration-hero .eyebrow { font-size: .61rem; }
  body.registration-schedule-mode .registration-hero h1 {
    margin: 2px 0 0;
    font-size: 1.04rem;
    line-height: 1.2;
  }
  body.registration-schedule-mode .registration-hero p,
  body.registration-schedule-mode .registration-hero .hero-chips { display: none; }
  body.registration-schedule-mode .registration-hero > .btn {
    align-self: center;
    min-width: 88px;
    min-height: 40px;
    margin: 0 0 0 auto;
    padding-inline: 10px;
    font-size: .75rem;
  }

  .stepper { margin: 12px auto 14px; padding-inline: 7px; border-radius: 19px; }
  .step { min-width: 58px; }
  .step span { width: 32px; height: 32px; }
  .step-line { flex-basis: 35px; margin-inline: -1px; }

  #detailsPanel,
  #schedulePanel,
  .surface { padding: 17px; border-radius: 22px; }
  #studentForm .row { --bs-gutter-x: .85rem; --bs-gutter-y: .9rem; }
  .form-control,
  .form-select { min-height: 52px; font-size: 16px; }
  .form-control-lg { min-height: 56px; }
  .form-tip { padding: 11px; line-height: 1.45; }

  .panel-head { align-items: flex-start; }
  .panel-head > div { min-width: 0; }
  .panel-head h2 { font-size: 1.17rem; }
  .panel-head p { font-size: .83rem; }
  .panel-head > .btn { flex: 0 0 auto; min-height: 40px; }
  .student-summary { margin-block: 12px; }
  .availability-toolbar { margin: 12px 0; padding: 12px; border-radius: 16px; }
  .availability-toolbar .btn { min-height: 42px; }

  .date-grid {
    margin-inline: -2px;
    padding: 3px 2px 12px;
    scrollbar-width: none;
    scroll-padding-inline: 2px;
  }
  .date-grid::-webkit-scrollbar,
  .segmented::-webkit-scrollbar,
  .batch-strip::-webkit-scrollbar { display: none; }
  .date-card {
    flex-basis: min(82vw, 275px);
    min-height: 146px;
    border-radius: 21px;
    scroll-snap-align: center;
  }
  .date-card:first-child { scroll-snap-align: start; }
  .slot-groups { margin-top: 14px; }
  .slot-grid { gap: 9px; }
  .slot-btn { min-height: 130px; padding: 13px; border-radius: 18px; }
  .slot-time-icon { width: 32px; height: 32px; margin-bottom: 8px; }
  .selection-bar {
    bottom: calc(7px + env(safe-area-inset-bottom));
    margin-inline: -4px;
    padding: 11px;
    border-radius: 18px;
  }

  .student-home-wrap { gap: 13px; }
  .my-card { border-radius: 25px; }
  .my-card-head { padding: 18px 17px 5px; }
  .my-card-body { padding: 8px 17px 16px; }
  .queue-title-row { align-items: center; }
  .queue-title-row strong { font-size: clamp(2.35rem, 12vw, 3rem); }
  .fact-grid { gap: 7px; }
  .fact-grid > div { min-height: 78px; padding: 9px 8px; border-radius: 14px; }
  .fact-grid strong { overflow-wrap: anywhere; }
  .my-card-actions { padding: 10px 12px 12px; }
  .call-card,
  .late-card { border-radius: 20px; }
  .batch-board { padding: 0; border-radius: 22px; }
  .batch-board-head { padding: 17px 16px 11px; }
  .line-tabs { gap: 6px; padding: 0 10px 10px; }
  .line-tabs button { padding-inline: 6px; border-radius: 13px; }
  .participant-row { min-height: 70px; padding-inline: 14px; }

  #facilitatorScreen { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
  .facilitator-layout { display: block; }
  .fac-sidebar {
    position: fixed;
    z-index: 1050;
    inset: auto 9px calc(8px + env(safe-area-inset-bottom)) 9px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 7px;
    min-height: 0;
    padding: 7px;
    border: 1px solid rgba(15,103,84,.14);
    border-radius: 20px;
    background: rgba(255,254,250,.91);
    box-shadow: 0 18px 45px rgba(8,77,63,.20);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
  }
  .fac-sidebar > div { display: none; }
  .fac-sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    min-width: 0;
    margin: 0;
  }
  .fac-nav {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1px;
    min-height: 52px;
    padding: 6px 4px;
    border-radius: 14px;
    text-align: center;
  }
  .fac-nav i { font-size: 1.03rem; }
  .fac-nav span { display: block; font-size: .65rem; line-height: 1.1; }
  .fac-nav b { position: absolute; top: 4px; right: calc(50% - 25px); }
  .fac-sidebar .btn {
    align-self: stretch;
    width: 48px !important;
    height: auto;
    min-height: 52px;
    border-radius: 14px;
    font-size: 0;
  }
  .fac-sidebar .btn i { margin: 0 !important; font-size: 1.05rem; }
  .fac-head { gap: 10px; }
  .fac-head h1 { font-size: 1.5rem; }
  .fac-actions { flex: 0 0 auto; }
  .fac-actions .btn { padding-inline: 11px; font-size: .8rem; }
  .fac-filter-bar { gap: 9px; }
  .segmented { width: 100%; padding: 4px; overflow-x: auto; }
  .segmented button { flex: 0 0 auto; min-height: 42px; padding: 8px 12px; }
  #dayPartTabs button { flex: 1 1 0; }
  .batch-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x mandatory;
  }
  .batch-card { flex: 0 0 min(58vw, 190px); scroll-snap-align: start; }
  .fac-content-grid { gap: 12px; }
  .selected-card { order: 0; }
  .roster-card { padding: 16px; }
  .roster-head { gap: 8px; }
  .search-input { width: 42%; max-width: 165px; }
  .fac-roster .participant-row { border-radius: 14px; }

  .modal-dialog-centered { align-items: flex-end; min-height: calc(100% - 1rem); }
  .modal-dialog { margin: .5rem; }
  .modal-content { max-height: calc(100dvh - .5rem - env(safe-area-inset-top)); border-radius: 26px 26px 18px 18px; }
  .modal-header { padding: 18px 18px 13px; }
  .modal-body { padding: 18px; overflow-y: auto; }
  .modal-footer { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  .toast-container { right: 0 !important; left: 0 !important; padding: 10px !important; }
  .toast { width: 100%; }
}

@media (max-width: 575.98px) {
  .registration-hero { display: grid; grid-template-columns: 1fr; }
  .registration-hero > .btn { min-height: 42px; margin-top: 14px; }
  .hero-chips span { font-size: .68rem; }
  .step small { font-size: .67rem; }
  .panel-head > .btn { padding-inline: 10px; }
  .selection-bar { align-items: stretch; }
  .selection-bar .btn { width: 100%; }
  .message-item { gap: 12px; }
  .message-item .btn { width: 100%; }
}

@media (max-width: 390px) {
  .brand small { display: none; }
  .registration-hero { padding: 18px; }
  .registration-hero h1 { font-size: 1.55rem; }
  .hero-chips { gap: 5px; }
  .hero-chips span { padding-inline: 8px; }
  .stepper { transform: none; }
  .step-line { flex-basis: 22px; }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .slot-btn { min-height: 128px; padding: 11px 10px; }
  .slot-btn strong { font-size: .8rem; line-height: 1.3; }
  .slot-btn small { font-size: .67rem; }
  .smart-label { padding-inline: 6px; font-size: .55rem; }
  .fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact-grid > div { min-height: 58px; }
  .my-card-actions { grid-template-columns: 1fr; }
  .line-tabs button { font-size: .72rem; }
  .participant-row { grid-template-columns: 40px minmax(0,1fr); }
  .participant-row .participant-meta,
  .participant-row > .row-status { grid-column: 2; justify-self: start; text-align: left; }
  .fac-head { display: block; }
  .fac-actions { margin-top: 10px; }
  .fac-actions .btn:first-child { flex: 1; }
  .roster-head { display: block; }
  .search-input { width: 100%; max-width: none; margin-top: 10px; }
}

@media (max-width: 330px) {
  .fact-grid { grid-template-columns: 1fr; }
  .my-card-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* ================== BOTANICAL PASTEL MOBILE EXPERIENCE: END ================== */


/* ================= STUDENT ID PRIVACY + PLAYFUL SCENE: BEGIN ================= */
body.botanical-theme {
  isolation: isolate;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 6%, rgba(192, 235, 219, .94) 0, transparent 25rem),
    radial-gradient(circle at 94% 14%, rgba(220, 213, 247, .86) 0, transparent 24rem),
    radial-gradient(circle at 78% 94%, rgba(255, 221, 199, .82) 0, transparent 29rem),
    linear-gradient(145deg, #f4faf7 0%, #f8f7fc 52%, #fff8f2 100%);
}

.app-shell {
  position: relative;
  z-index: 2;
}

.ambient-scene {
  position: fixed;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-curve {
  position: absolute;
  border-radius: 48% 52% 45% 55%;
  filter: blur(.2px);
}
.ambient-curve-one {
  width: min(52vw, 720px);
  height: min(38vw, 480px);
  top: 8%;
  left: -22%;
  border: clamp(34px, 5vw, 76px) solid rgba(84, 184, 151, .10);
  transform: rotate(-17deg);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}
.ambient-curve-two {
  width: min(46vw, 620px);
  height: min(43vw, 560px);
  right: -18%;
  bottom: -15%;
  border: clamp(36px, 6vw, 82px) solid rgba(148, 125, 210, .09);
  transform: rotate(24deg);
  animation: ambientDrift 22s ease-in-out -6s infinite alternate-reverse;
}

.ambient-star {
  position: absolute;
  color: rgba(199, 147, 43, .33);
  font-size: clamp(1.25rem, 2.2vw, 2.15rem);
  filter: drop-shadow(0 4px 8px rgba(181,117,25,.10));
  animation: starTwinkle 3.8s ease-in-out infinite;
}
.ambient-star-one { top: 19%; right: 9%; }
.ambient-star-two { bottom: 21%; left: 8%; animation-delay: -1.7s; }

.floating-friend {
  position: absolute;
  width: 112px;
  height: 94px;
  border: 2px solid rgba(255,255,255,.70);
  border-radius: 46% 54% 48% 52% / 54% 51% 49% 46%;
  box-shadow: 0 22px 46px rgba(37,82,69,.12), inset 0 2px 0 rgba(255,255,255,.58);
  opacity: .78;
  animation: friendFloat 6.4s ease-in-out infinite;
}
.floating-friend-mint {
  left: -25px;
  top: 31%;
  background: linear-gradient(145deg, #bde9d9, #75c9ad);
  transform: rotate(8deg);
}
.floating-friend-lilac {
  right: -22px;
  bottom: 14%;
  background: linear-gradient(145deg, #ddd4f5, #ad9cde);
  transform: rotate(-9deg);
  animation-delay: -2.8s;
}
.friend-ear {
  position: absolute;
  z-index: -1;
  width: 31px;
  height: 31px;
  top: -13px;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 50% 50% 44% 56%;
  background: inherit;
}
.friend-ear-left { left: 10px; transform: rotate(-24deg); }
.friend-ear-right { right: 10px; transform: rotate(24deg); }
.friend-eye {
  position: absolute;
  width: 8px;
  height: 12px;
  top: 34px;
  border-radius: 999px;
  background: #26483f;
  transform-origin: center;
  animation: friendBlink 5.2s infinite;
}
.friend-eye-left { left: 34px; }
.friend-eye-right { right: 34px; }
.friend-cheek {
  position: absolute;
  width: 15px;
  height: 8px;
  top: 52px;
  border-radius: 50%;
  background: rgba(255,151,159,.43);
}
.friend-cheek-left { left: 18px; }
.friend-cheek-right { right: 18px; }
.friend-smile {
  position: absolute;
  width: 25px;
  height: 13px;
  top: 48px;
  left: 50%;
  border-bottom: 3px solid #31544a;
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%);
}

.registration-hero {
  background:
    radial-gradient(circle at 93% 17%, rgba(255, 237, 164, .92) 0 47px, transparent 48px),
    radial-gradient(circle at 82% 118%, rgba(220, 212, 248, .94) 0 112px, transparent 113px),
    linear-gradient(132deg, rgba(213, 242, 232, .98), rgba(250, 253, 248, .98) 57%, rgba(222, 238, 250, .96));
  box-shadow: 0 20px 44px rgba(36,92,75,.10);
}
.surface,
.fac-sidebar,
.modal-content {
  background:
    linear-gradient(145deg, rgba(255,255,255,.97), rgba(255,253,248,.94)),
    var(--surface);
}

.student-id-field {
  position: relative;
}
.student-id-field > i {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 16px;
  color: var(--primary);
  font-size: 1.05rem;
  transform: translateY(-50%);
  pointer-events: none;
}
.student-id-field .form-control {
  padding-left: 46px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .045em;
  font-weight: 750;
}
.student-id-field .form-control::placeholder {
  letter-spacing: .025em;
  font-weight: 550;
}
.was-validated .student-id-field:has(.form-control:invalid) ~ .invalid-feedback { display: block; }
.was-validated .student-id-field:has(.form-control:valid) .form-control {
  border-color: var(--success);
  background-image: none;
}

.student-id-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 15px;
  padding: 10px 11px 10px 13px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
}
.student-id-display span { min-width: 0; }
.student-id-display small,
.student-id-display strong { display: block; }
.student-id-display small {
  margin-bottom: 2px;
  color: rgba(255,255,255,.68);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.student-id-display strong {
  overflow: hidden;
  color: #fff;
  font-size: clamp(.93rem, 3.8vw, 1.1rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.student-id-eye {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 13px;
  color: #fff;
  background: rgba(255,255,255,.11);
  transition: transform .16s ease, background .16s ease;
}
.student-id-eye:hover { background: rgba(255,255,255,.20); transform: translateY(-1px); }
.student-id-eye[aria-pressed="true"] { color: #5b4600; background: var(--cream); }

.participant-id-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.participant-id-line::before {
  content: "ID";
  padding: 1px 4px;
  border-radius: 5px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: .55rem;
  font-weight: 850;
}

.selected-student-id {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(15,103,84,.10);
  border-radius: 9px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: .76rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.qr-student-id {
  width: fit-content;
  min-width: 220px;
  margin: 12px auto;
  padding: 9px 15px;
  border: 1px solid #cfe3db;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--pastel-mint), #f4fbf8);
}
.qr-student-id small,
.qr-student-id strong { display: block; }
.qr-student-id small {
  color: var(--muted);
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.qr-student-id strong {
  margin-top: 2px;
  color: var(--primary-dark);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

@keyframes ambientDrift {
  from { translate: -1.5% -1%; rotate: -2deg; }
  to { translate: 2% 2%; rotate: 3deg; }
}
@keyframes friendFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -15px; }
}
@keyframes friendBlink {
  0%, 44%, 48%, 100% { transform: scaleY(1); }
  46% { transform: scaleY(.12); }
}
@keyframes starTwinkle {
  0%, 100% { opacity: .35; transform: scale(.86) rotate(-8deg); }
  50% { opacity: .82; transform: scale(1.12) rotate(7deg); }
}

@media (max-width: 767.98px) {
  body.botanical-theme {
    background:
      radial-gradient(circle at -8% 2%, rgba(191, 234, 218, .96) 0, transparent 18rem),
      radial-gradient(circle at 109% 18%, rgba(222, 214, 247, .82) 0, transparent 17rem),
      radial-gradient(circle at 68% 104%, rgba(255, 225, 205, .72) 0, transparent 18rem),
      linear-gradient(155deg, #f5faf7, #f8f7fc 57%, #fff9f4);
  }
  .ambient-curve-one { width: 420px; height: 280px; top: 20%; left: -300px; border-width: 48px; }
  .ambient-curve-two { width: 370px; height: 330px; right: -265px; bottom: -7%; border-width: 54px; }
  .ambient-star-one { top: 16%; right: 4%; }
  .ambient-star-two { bottom: 16%; left: 3%; }
  .floating-friend {
    width: 74px;
    height: 62px;
    opacity: .48;
  }
  .floating-friend-mint { left: -31px; top: 39%; }
  .floating-friend-lilac { right: -30px; bottom: 11%; }
  .friend-ear { width: 21px; height: 21px; top: -9px; }
  .friend-ear-left { left: 7px; }
  .friend-ear-right { right: 7px; }
  .friend-eye { width: 5px; height: 8px; top: 23px; }
  .friend-eye-left { left: 23px; }
  .friend-eye-right { right: 23px; }
  .friend-cheek { width: 10px; height: 6px; top: 35px; }
  .friend-cheek-left { left: 12px; }
  .friend-cheek-right { right: 12px; }
  .friend-smile { width: 17px; height: 9px; top: 32px; border-bottom-width: 2px; }
  .student-id-display { margin-top: 1px; }
  .selected-student-id { max-width: 100%; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-curve,
  .ambient-star,
  .floating-friend,
  .friend-eye { animation: none !important; }
}
/* ================== STUDENT ID PRIVACY + PLAYFUL SCENE: END ================== */

/* ================= ON-DEMAND LOADING MASCOT: BEGIN ================= */
body.process-loading-active { overflow: hidden; }

.app-loading {
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(12, 38, 32, .34);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.app-loading-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  width: min(100%, 520px);
  min-height: 205px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 30px;
  background:
    radial-gradient(circle at 14% 15%, rgba(223,246,238,.95), transparent 42%),
    radial-gradient(circle at 90% 90%, rgba(238,233,255,.80), transparent 45%),
    rgba(255,254,250,.98);
  box-shadow: 0 28px 80px rgba(8, 38, 31, .28);
  overflow: hidden;
}

.loading-character-scene {
  position: relative;
  width: 145px;
  height: 145px;
  display: grid;
  place-items: center;
}

.loading-character-shadow {
  position: absolute;
  left: 30px;
  right: 26px;
  bottom: 11px;
  height: 18px;
  border-radius: 50%;
  background: rgba(14, 87, 70, .14);
  filter: blur(3px);
  animation: loadingShadow 1.25s ease-in-out infinite;
}

.loading-character {
  position: relative;
  width: 112px;
  height: 124px;
  animation: loadingBounce 1.25s ease-in-out infinite;
  transform-origin: 50% 100%;
}

.loading-character-body {
  position: absolute;
  left: 15px;
  top: 30px;
  width: 82px;
  height: 86px;
  border: 3px solid #176552;
  border-radius: 46% 46% 42% 42% / 44% 44% 54% 54%;
  background: linear-gradient(145deg, #bcebdc 0%, #dff8ef 58%, #fff7d9 100%);
  box-shadow: inset -9px -10px 0 rgba(17,93,76,.06), 0 9px 20px rgba(17,93,76,.12);
  z-index: 3;
}

.loading-ear {
  position: absolute;
  top: 10px;
  width: 31px;
  height: 50px;
  border: 3px solid #176552;
  border-radius: 55% 55% 45% 45%;
  background: #dff8ef;
  z-index: 1;
}
.loading-ear::after {
  content: "";
  position: absolute;
  inset: 8px 7px 10px;
  border-radius: inherit;
  background: #ffd8df;
}
.loading-ear-left { left: 21px; transform: rotate(-16deg); animation: loadingEarLeft 1.25s ease-in-out infinite; }
.loading-ear-right { right: 21px; transform: rotate(16deg); animation: loadingEarRight 1.25s ease-in-out infinite; }

.loading-eye {
  position: absolute;
  top: 31px;
  width: 7px;
  height: 10px;
  border-radius: 999px;
  background: #173e35;
  animation: loadingBlink 3.2s infinite;
}
.loading-eye-left { left: 22px; }
.loading-eye-right { right: 22px; }
.loading-cheek {
  position: absolute;
  top: 48px;
  width: 12px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244, 143, 157, .42);
}
.loading-cheek-left { left: 12px; }
.loading-cheek-right { right: 12px; }
.loading-smile {
  position: absolute;
  left: 50%;
  top: 46px;
  width: 16px;
  height: 10px;
  border: 2px solid #176552;
  border-top: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%);
}

.loading-arm {
  position: absolute;
  top: 57px;
  width: 27px;
  height: 12px;
  border: 3px solid #176552;
  border-radius: 999px;
  background: #ccefe4;
  z-index: -1;
}
.loading-arm-left { left: -17px; transform: rotate(24deg); }
.loading-arm-right { right: -17px; transform-origin: left center; animation: loadingWave .7s ease-in-out infinite alternate; }

.loading-paper {
  position: absolute;
  right: -1px;
  bottom: 9px;
  width: 38px;
  height: 44px;
  padding: 10px 7px;
  border: 2px solid #176552;
  border-radius: 9px;
  background: #fffefa;
  box-shadow: 0 6px 12px rgba(17,93,76,.12);
  z-index: 4;
  transform: rotate(7deg);
  animation: loadingPaper 1.25s ease-in-out infinite;
}
.loading-paper i {
  display: block;
  height: 3px;
  margin-bottom: 5px;
  border-radius: 999px;
  background: #9cd8c5;
}
.loading-paper i:nth-child(2) { width: 76%; }
.loading-paper i:nth-child(3) { width: 54%; }

.loading-spark {
  position: absolute;
  color: #f0b83a;
  font-size: 18px;
  animation: loadingSpark 1.4s ease-in-out infinite;
}
.loading-spark-one { left: 2px; top: 21px; }
.loading-spark-two { right: 1px; top: 4px; animation-delay: .35s; }

.loading-copy { min-width: 0; }
.loading-copy .eyebrow { display: block; margin-bottom: 7px; }
.app-loading-card .loading-copy strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  line-height: 1.25;
}
.app-loading-card .loading-copy small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

.loading-dots {
  display: inline-flex;
  gap: 6px;
  margin-top: 15px;
}
.loading-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: loadingDot .9s ease-in-out infinite;
}
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }

.live-pill span { animation: none; box-shadow: 0 0 0 4px rgba(20,123,90,.10); }

@keyframes loadingBounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}
@keyframes loadingShadow {
  0%, 100% { transform: scaleX(1); opacity: .72; }
  50% { transform: scaleX(.76); opacity: .42; }
}
@keyframes loadingWave {
  from { transform: rotate(-8deg); }
  to { transform: rotate(-48deg); }
}
@keyframes loadingEarLeft {
  0%, 100% { transform: rotate(-16deg); }
  50% { transform: rotate(-22deg); }
}
@keyframes loadingEarRight {
  0%, 100% { transform: rotate(16deg); }
  50% { transform: rotate(23deg); }
}
@keyframes loadingPaper {
  0%, 100% { transform: rotate(7deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-4px); }
}
@keyframes loadingSpark {
  0%, 100% { transform: scale(.75) rotate(0); opacity: .45; }
  50% { transform: scale(1.15) rotate(25deg); opacity: 1; }
}
@keyframes loadingBlink {
  0%, 45%, 52%, 100% { transform: scaleY(1); }
  48%, 50% { transform: scaleY(.12); }
}
@keyframes loadingDot {
  0%, 100% { transform: translateY(0); opacity: .35; }
  50% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 560px) {
  .app-loading-card {
    grid-template-columns: 1fr;
    gap: 8px;
    width: min(100%, 390px);
    padding: 20px 20px 24px;
    text-align: center;
  }
  .loading-character-scene { width: 130px; height: 128px; margin: 0 auto; }
  .loading-character { transform: scale(.92); }
  .loading-copy .eyebrow { margin-top: 2px; }
  .loading-dots { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-character,
  .loading-character-shadow,
  .loading-ear,
  .loading-arm-right,
  .loading-paper,
  .loading-spark,
  .loading-eye,
  .loading-dots i { animation: none !important; }
}
/* ================== ON-DEMAND LOADING MASCOT: END ================== */


/* ================= FACILITATOR STUDENT SLIDE-UP SHEET: BEGIN ================= */
.fac-content-grid {
  grid-template-columns: minmax(0, 1fr);
}

.roster-open-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed rgba(15, 103, 84, .22);
  border-radius: 13px;
  color: #526a62;
  background: rgba(232, 244, 240, .66);
  font-size: .78rem;
}
.roster-open-hint i {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 1rem;
}

.fac-roster .participant-row {
  position: relative;
  width: 100%;
  padding-right: 42px;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.fac-roster .participant-row:hover,
.fac-roster .participant-row:focus-visible {
  border-color: rgba(15, 103, 84, .38);
  background: #f7fcfa;
  box-shadow: 0 8px 20px rgba(15, 103, 84, .07);
  transform: translateY(-1px);
}
.participant-open-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  color: var(--primary);
  font-size: .86rem;
  transform: translateY(-50%);
  opacity: .72;
}

.facilitator-student-modal {
  padding: 0 !important;
}
.facilitator-student-modal.fade .modal-dialog,
.facilitator-student-modal.show .modal-dialog {
  transform: none !important;
}
.facilitator-student-modal .modal-dialog {
  display: flex;
  align-items: flex-end;
  width: min(100%, 640px);
  max-width: 640px;
  min-height: 100%;
  margin: 0 auto;
}
.facilitator-student-modal .modal-content {
  width: 100%;
  max-height: min(88dvh, 760px);
  overflow: hidden;
  border: 1px solid rgba(15, 103, 84, .14);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  background:
    radial-gradient(circle at 89% 10%, rgba(224, 231, 255, .82) 0 58px, transparent 59px),
    linear-gradient(145deg, rgba(255,255,255,.99), rgba(255,253,248,.98));
  box-shadow: 0 -24px 70px rgba(12, 54, 44, .23);
  transform: translateY(105%);
  transition: transform .3s cubic-bezier(.22, .86, .29, 1);
  will-change: transform;
}
.facilitator-student-modal.show .modal-content {
  transform: translateY(0);
}
.facilitator-student-modal .modal-content.is-dragging {
  transition: none !important;
}
.facilitator-student-modal .student-sheet-body {
  padding: 4px 22px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.student-sheet-drag-zone {
  display: grid;
  place-items: center;
  min-height: 34px;
  cursor: grab;
  touch-action: pan-x;
}
.student-sheet-drag-zone:active { cursor: grabbing; }
.student-sheet-handle {
  display: block;
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: #cbd8d3;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
}
.student-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.student-sheet-toolbar .btn-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background-color: rgba(242, 247, 245, .92);
  background-size: 11px;
  opacity: .8;
}
.facilitator-student-modal .selected-card {
  position: relative;
  top: auto;
}
.facilitator-student-modal .selected-head {
  align-items: flex-start;
  gap: 14px;
}
.facilitator-student-modal .selected-head h2 {
  margin-bottom: 6px;
  font-size: clamp(1.25rem, 5vw, 1.72rem);
  overflow-wrap: anywhere;
}
.facilitator-student-modal .selected-student-id {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(15,103,84,.12);
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: .82rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.facilitator-student-modal .selected-head .status-pill {
  flex: 0 0 auto;
  min-width: 76px;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
}
.facilitator-student-modal .selected-meta {
  gap: 9px;
  margin: 18px 0;
}
.facilitator-student-modal .selected-meta > div {
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(15,103,84,.06);
  border-radius: 15px;
  background: rgba(242, 247, 245, .88);
}
.facilitator-student-modal .selected-meta strong {
  margin-top: 5px;
  font-size: .83rem;
  overflow-wrap: anywhere;
}
.facilitator-student-modal .action-stack {
  gap: 9px;
}
.facilitator-student-modal .action-stack .btn {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 800;
}
.facilitator-student-modal .response-history {
  margin-top: 13px;
  padding: 12px;
  border: 1px solid rgba(15,103,84,.06);
  border-radius: 14px;
  background: rgba(242, 247, 245, .88);
  line-height: 1.55;
}
.student-sheet-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .72rem;
  text-align: center;
}

@media (max-width: 575.98px) {
  .facilitator-student-modal .modal-dialog {
    width: 100%;
    max-width: none;
  }
  .facilitator-student-modal .modal-content {
    max-height: 91dvh;
    border-radius: 28px 28px 0 0;
  }
  .facilitator-student-modal .student-sheet-body {
    padding-inline: 18px;
  }
  .facilitator-student-modal .selected-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .facilitator-student-modal .selected-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .facilitator-student-modal .selected-head .status-pill {
    min-width: 68px;
    padding-inline: 9px;
  }
  .facilitator-student-modal .selected-meta {
    gap: 6px;
  }
  .facilitator-student-modal .selected-meta > div {
    min-height: 76px;
    padding: 9px;
  }
  .facilitator-student-modal .selected-meta strong {
    font-size: .75rem;
  }
  .facilitator-student-modal .action-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .facilitator-student-modal .modal-content {
    transition-duration: .01ms !important;
  }
}
/* ================== FACILITATOR STUDENT SLIDE-UP SHEET: END ================== */

/* ================= LIVE SCHEDULE UI + RESPONSIVE POLISH: BEGIN ================= */
:root {
  --live-green: #16a36f;
  --live-blue: #2e7acb;
  --live-amber: #c88716;
  --live-red: #c84c58;
}

body.botanical-theme {
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 226, 157, .34), transparent 24rem),
    radial-gradient(circle at 93% 18%, rgba(188, 226, 217, .52), transparent 29rem),
    linear-gradient(180deg, #f8fcfa 0%, #eef7f3 46%, #f7faf9 100%);
  background-attachment: fixed;
}

.topbar {
  border-bottom: 1px solid rgba(15, 103, 84, .10);
  box-shadow: 0 8px 28px rgba(15, 74, 61, .055);
}

.live-pill {
  display: inline-flex;
  min-height: 34px;
  padding: 6px 11px;
  gap: 8px;
  border-color: rgba(15, 103, 84, .13);
  color: #48635b;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 7px 22px rgba(15, 74, 61, .07);
  font-weight: 750;
  white-space: nowrap;
}
.live-pill span { animation: none; }
.live-pill .live-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #9aa9a4;
  box-shadow: 0 0 0 4px rgba(154, 169, 164, .13);
}
.live-pill #liveSyncText {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1;
}
.live-pill.is-connected .live-dot { background: var(--live-green); box-shadow: 0 0 0 4px rgba(22, 163, 111, .14); }
.live-pill.is-syncing .live-dot { background: var(--live-blue); box-shadow: 0 0 0 4px rgba(46, 122, 203, .14); animation: livePulse .9s ease-in-out infinite; }
.live-pill.is-warning .live-dot { background: var(--live-amber); box-shadow: 0 0 0 4px rgba(200, 135, 22, .14); }
.live-pill.is-offline .live-dot { background: var(--live-red); box-shadow: 0 0 0 4px rgba(200, 76, 88, .14); }

.live-sync-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(22, 163, 111, .13);
  border-radius: 999px;
  color: #32705d;
  background: rgba(232, 247, 240, .82);
  font-size: .76rem;
  font-weight: 750;
}
.live-sync-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-green);
  box-shadow: 0 0 0 0 rgba(22, 163, 111, .36);
  animation: livePulseRing 1.8s ease-out infinite;
}
.facilitator-live-note { margin-top: 10px; }

.registration-hero,
.my-card,
.surface,
.fac-sidebar {
  border-color: rgba(15, 103, 84, .10);
}

.my-card {
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, .18), transparent 16rem),
    linear-gradient(145deg, #0d725c 0%, #105947 52%, #173f37 100%);
  box-shadow: 0 22px 54px rgba(11, 74, 60, .19);
}
.my-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -74px;
  bottom: -108px;
  border: 30px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
  pointer-events: none;
}
.my-card > * { position: relative; z-index: 1; }

.facilitator-layout { max-width: 1500px; margin-inline: auto; }
.fac-main { padding: 4px; }
.fac-head {
  padding: clamp(17px, 2.4vw, 25px);
  border: 1px solid rgba(15, 103, 84, .10);
  border-radius: 24px;
  background:
    radial-gradient(circle at 95% -20%, rgba(255, 218, 140, .32), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(238,248,244,.96));
  box-shadow: 0 14px 40px rgba(15, 74, 61, .075);
}
.fac-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.fac-actions .btn { min-height: 44px; }

.fac-filter-bar {
  padding: 12px;
  border: 1px solid rgba(15, 103, 84, .09);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 28px rgba(15, 74, 61, .045);
  backdrop-filter: blur(12px);
}

.batch-strip { align-items: stretch; }
.batch-card {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  min-height: 88px;
  padding: 13px 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.batch-card:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(15, 74, 61, .10); }
.batch-card.active {
  border-color: rgba(15, 103, 84, .62);
  background: linear-gradient(145deg, #f8fffc, #e7f5f0);
  box-shadow: 0 0 0 3px rgba(15, 103, 84, .08), 0 15px 32px rgba(15, 74, 61, .10);
}
.batch-card.current { border-color: rgba(46, 122, 203, .48); }
.batch-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.batch-card-top strong { position: relative; z-index: 2; }
.current-batch-badge {
  position: relative;
  z-index: 2;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--live-blue);
  font-size: .58rem;
  letter-spacing: .08em;
}
.batch-fill {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: var(--batch-fill, 0%);
  max-height: 100%;
  background: linear-gradient(180deg, rgba(42, 159, 122, .035), rgba(42, 159, 122, .16));
  transition: height .45s ease;
}
.batch-card.full .batch-fill { background: linear-gradient(180deg, rgba(200, 76, 88, .03), rgba(200, 76, 88, .16)); }

.roster-card {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(15, 74, 61, .075);
}
.fac-roster,
.participant-list { scrollbar-color: rgba(15, 103, 84, .25) transparent; }
.participant-row {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 103, 84, .10);
  box-shadow: 0 5px 15px rgba(15, 74, 61, .035);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.fac-roster .participant-row:hover,
.fac-roster .participant-row:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(15, 103, 84, .32);
  box-shadow: 0 10px 24px rgba(15, 74, 61, .08);
}
.participant-row.newly-added {
  border-color: rgba(22, 163, 111, .56);
  background: linear-gradient(90deg, rgba(221, 250, 238, .95), rgba(255,255,255,.96));
  animation: newRowArrival 1.05s ease both;
}
.participant-row.newly-added::after {
  content: "NEW";
  position: absolute;
  top: 6px;
  right: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--live-green);
  font-size: .52rem;
  font-weight: 900;
  letter-spacing: .08em;
}

@keyframes livePulse {
  0%, 100% { transform: scale(.82); opacity: .68; }
  50% { transform: scale(1.12); opacity: 1; }
}
@keyframes livePulseRing {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 111, .35); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 111, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 111, 0); }
}
@keyframes newRowArrival {
  from { opacity: 0; transform: translateY(-8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .live-pill { max-width: 210px; }
  .fac-head { display: block; }
  .fac-actions { justify-content: flex-start; margin-top: 14px; }
  .fac-actions .btn { flex: 1 1 145px; }
}

@media (max-width: 620px) {
  .topbar { height: 68px; }
  .brand-mark { width: 42px; height: 42px; border-radius: 14px; }
  .brand strong { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand small { display: none; }
  .live-pill { padding: 6px 8px; max-width: 118px; }
  .live-pill #liveSyncText { overflow: hidden; text-overflow: ellipsis; }
  .profile-btn span { display: none; }
  .fac-head { padding: 17px 15px; border-radius: 20px; }
  .fac-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .fac-actions .btn:first-child { grid-column: 1 / -1; }
  .fac-filter-bar { padding: 9px; }
  .batch-card { min-width: 150px; }
  .batch-board-head { align-items: flex-start; }
  .live-sync-note { max-width: 100%; }
}

@media (max-width: 390px) {
  .live-pill { display: none; }
  .fac-actions { grid-template-columns: 1fr; }
  .fac-actions .btn:first-child { grid-column: auto; }
  .participant-row.newly-added::after { top: 4px; right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .live-sync-pulse,
  .live-pill.is-syncing .live-dot,
  .participant-row.newly-added { animation: none !important; }
  .batch-card,
  .batch-fill,
  .participant-row { transition: none !important; }
}
/* ================== LIVE SCHEDULE UI + RESPONSIVE POLISH: END ================== */


/* ================= ROSTER NAME / TIME / QUEUE LAYOUT — V3 =================
   Left: exact sequence number
   Center: student name with scheduled time underneath
   Right: queue number with status underneath
   Student IDs are intentionally not rendered in roster rows.
========================================================================== */
.participant-row.roster-layout-row {
  grid-template-columns: 48px minmax(0, 1fr) minmax(86px, auto) !important;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px 16px;
}

.fac-roster .participant-row.roster-layout-row {
  padding-right: 16px;
}

.roster-layout-row .number {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 900;
}

.roster-layout-row .name {
  min-width: 0;
}

.roster-layout-row .name strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.roster-layout-row .participant-time {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 650;
  line-height: 1.25;
}

.roster-layout-row .participant-time::before {
  content: "Time: ";
  color: #7f918a;
  font-weight: 700;
}

.roster-layout-row .participant-meta {
  display: grid;
  grid-column: auto !important;
  justify-items: end;
  justify-self: end !important;
  gap: 7px;
  min-width: 82px;
  text-align: right !important;
}

.roster-layout-row .participant-queue-number {
  display: block;
  color: var(--primary-dark);
  font-size: .88rem;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
}

.roster-layout-row .row-status {
  justify-self: end;
  white-space: nowrap;
}

/* No Student ID or extra open icon inside the compact roster card. */
.roster-layout-row .participant-id-line,
.roster-layout-row .participant-open-icon {
  display: none !important;
}

@media (max-width: 620px) {
  .participant-row.roster-layout-row {
    grid-template-columns: 42px minmax(0, 1fr) minmax(74px, auto) !important;
    gap: 10px;
    min-height: 70px;
    padding: 10px 12px;
  }

  .fac-roster .participant-row.roster-layout-row {
    padding-right: 12px;
  }

  .roster-layout-row .number {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: .92rem;
  }

  .roster-layout-row .name strong {
    font-size: .93rem;
  }

  .roster-layout-row .participant-time {
    margin-top: 4px;
    font-size: .73rem;
  }

  .roster-layout-row .participant-meta {
    grid-column: auto !important;
    justify-self: end !important;
    min-width: 72px;
    text-align: right !important;
  }

  .roster-layout-row .participant-queue-number {
    font-size: .79rem;
  }

  .roster-layout-row .row-status {
    padding: .25rem .5rem;
    font-size: .68rem;
  }
}

@media (max-width: 380px) {
  .participant-row.roster-layout-row {
    grid-template-columns: 38px minmax(0, 1fr) minmax(68px, auto) !important;
    gap: 8px;
    padding-inline: 9px;
  }

  .roster-layout-row .number {
    width: 36px;
    height: 36px;
  }

  .roster-layout-row .participant-time::before {
    content: "";
  }
}


/* ================= SMART MANUAL-REFRESH + FORMAL CONTROL POLISH ================= */
.live-sync-note .live-sync-pulse,
.live-pill .live-dot {
  animation: none !important;
}
.live-pill.is-idle .live-dot {
  background: #7c8e88;
}
.capacity-closed {
  color: var(--danger) !important;
  font-weight: 800;
}
.date-card.full:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: linear-gradient(145deg, #fff7f7, #ffe9eb);
}
.date-card.full:disabled .capacity-meter span {
  width: 100% !important;
}
.btn {
  min-height: 40px;
  padding: .58rem .92rem;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
}
.btn-sm {
  min-height: 34px;
  padding: .42rem .72rem;
  font-size: .82rem;
}
.btn-lg {
  min-height: 48px;
  padding: .72rem 1.05rem;
  font-size: .98rem;
}
.fac-actions .btn {
  min-width: 132px;
}
.action-stack {
  gap: 10px;
}
.action-stack > .btn,
.action-row .btn {
  min-height: 44px;
}
.action-row {
  gap: 10px;
}
.fac-head h1,
.my-card h1 {
  line-height: 1.18;
}
.fac-head p,
.batch-board-head p {
  line-height: 1.5;
}
@media (max-width: 620px) {
  .btn {
    min-height: 40px;
    font-size: .86rem;
    padding-inline: .78rem;
  }
  .my-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .my-card-actions #rescheduleButton {
    grid-column: 1 / -1;
  }
  .fac-actions .btn {
    min-width: 0;
  }
  .action-row {
    grid-template-columns: 1fr 1fr;
  }
}
/* ================= END SMART MANUAL-REFRESH + FORMAL CONTROL POLISH ============= */

/* ================= FRESH LOGIN + OFFLINE CHARACTER — V4 ================= */
body.offline-modal-active { overflow: hidden; }

.auth-screen {
  min-height: calc(100dvh - 68px);
  display: grid;
  place-items: center;
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: clamp(36px, 7vw, 72px);
}
.auth-layout { width: min(100%, 540px); margin: 0 auto; }
.auth-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 6vw, 38px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0%, rgba(126, 211, 189, .22), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(203, 182, 244, .18), transparent 36%),
    #fff;
}
.auth-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -105px;
  right: -74px;
  border: 22px solid rgba(17, 93, 76, .07);
  border-radius: 50%;
}
.auth-heading { position: relative; z-index: 2; margin: 10px 0 24px; text-align: center; }
.auth-heading h1 { margin: 5px 0 9px; font-size: clamp(1.7rem, 6vw, 2.35rem); }
.auth-heading p { max-width: 450px; margin: 0 auto; line-height: 1.65; }
.auth-character {
  position: relative;
  width: 104px;
  height: 92px;
  margin: 0 auto 4px;
  animation: authFloat 3.2s ease-in-out infinite;
}
.auth-character-face {
  position: absolute;
  inset: 14px 15px 8px;
  border: 3px solid rgba(10, 73, 61, .12);
  border-radius: 42% 42% 46% 46%;
  background: linear-gradient(145deg, #8fe1c3, #55b894);
  box-shadow: 0 14px 30px rgba(17, 93, 76, .18);
}
.auth-character-face i {
  position: absolute;
  top: 31px;
  width: 7px;
  height: 10px;
  border-radius: 50%;
  background: #15362d;
  animation: authBlink 4s infinite;
}
.auth-character-face i:first-child { left: 21px; }
.auth-character-face i:nth-child(2) { right: 21px; }
.auth-character-face b {
  position: absolute;
  left: 50%;
  top: 48px;
  width: 22px;
  height: 10px;
  transform: translateX(-50%);
  border-bottom: 3px solid #15362d;
  border-radius: 0 0 50% 50%;
}
.auth-character-ear {
  position: absolute;
  top: 4px;
  width: 29px;
  height: 36px;
  border-radius: 70% 30% 55% 45%;
  background: #78cfaf;
}
.auth-character-ear-left { left: 15px; transform: rotate(-24deg); }
.auth-character-ear-right { right: 15px; transform: scaleX(-1) rotate(-24deg); }
.auth-character-card {
  position: absolute;
  right: -1px;
  bottom: 1px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 11px;
  color: #fff;
  background: #7053b8;
  box-shadow: 0 8px 18px rgba(67, 45, 126, .22);
  transform: rotate(8deg);
  animation: authCardWave 2.4s ease-in-out infinite;
}
.auth-id-field .form-control { padding-left: 47px; }
.auth-card .form-label { margin-bottom: 8px; }
.login-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.45;
}
.login-feedback.is-success { color: #0c6044; background: #e9f8f1; border-color: #bde6d4; }
.login-feedback.is-info { color: #34558c; background: #eef4ff; border-color: #ccdafa; }
.login-feedback.is-warning { color: #7c5315; background: #fff7df; border-color: #ead59b; }
.login-feedback.is-danger { color: #8f2e38; background: #fff0f2; border-color: #edc1c7; }
.facilitator-password-panel, .register-from-login { margin-top: 18px; }
.facilitator-match-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid #bfe4d5;
  border-radius: 15px;
  background: #eefaf5;
}
.facilitator-match-banner > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  background: var(--primary);
  font-size: 1.15rem;
}
.facilitator-match-banner small, .facilitator-match-banner strong { display: block; }
.facilitator-match-banner small { color: var(--muted); font-size: .75rem; }
.password-field { position: relative; }
.password-field > i {
  position: absolute;
  z-index: 2;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
}
.password-field .form-control { padding-left: 46px; padding-right: 52px; }
.password-field button {
  position: absolute;
  z-index: 2;
  right: 6px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 40px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
}
.register-from-login {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px dashed #9abeb1;
  border-radius: 17px;
  background: rgba(237, 248, 244, .78);
}
.register-from-login > div { display: flex; align-items: center; gap: 11px; }
.register-from-login > div > span {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--primary);
  background: #dff2eb;
}
.register-from-login strong, .register-from-login small { display: block; }
.register-from-login small { margin-top: 2px; color: var(--muted); }
.fresh-data-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}
.fresh-data-note i { color: var(--primary); font-size: 1rem; }

.offline-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  background:
    radial-gradient(circle at 15% 16%, rgba(125, 220, 188, .23), transparent 28%),
    radial-gradient(circle at 86% 82%, rgba(189, 164, 239, .25), transparent 30%),
    rgba(242, 247, 245, .97);
  backdrop-filter: blur(13px);
}
.offline-card {
  width: min(100%, 450px);
  padding: clamp(24px, 6vw, 38px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 30px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 30px 90px rgba(25, 52, 45, .2);
  text-align: center;
  animation: offlineCardIn .42s cubic-bezier(.2,.85,.25,1.1) both;
}
.offline-card h1 { margin: 6px 0 10px; }
.offline-card p { margin-bottom: 22px; line-height: 1.65; }
.offline-card > small { display: block; margin-top: 14px; color: var(--muted); font-size: .78rem; }
.offline-connection-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -8px 0 18px;
  color: #6d5c2a;
  font-size: .84rem;
  font-weight: 750;
}
.offline-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d59f35;
  box-shadow: 0 0 0 5px rgba(213,159,53,.14);
  animation: offlineStatusPulse 1.7s ease-in-out infinite;
}
.connection-banner {
  position: fixed;
  z-index: 4800;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 620px);
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid rgba(142, 91, 20, .24);
  border-radius: 18px;
  background: rgba(255, 249, 230, .97);
  color: #5b451f;
  box-shadow: 0 18px 48px rgba(55, 43, 20, .2);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}
.connection-banner-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #f5df9d;
  color: #7d5a17;
  font-size: 1.05rem;
}
.connection-banner strong,
.connection-banner small { display: block; }
.connection-banner strong { font-size: .88rem; }
.connection-banner small { margin-top: 2px; color: #7a6842; font-size: .74rem; line-height: 1.3; }
.connection-banner button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid rgba(125,90,23,.22);
  border-radius: 11px;
  background: #fff;
  color: #6e5018;
  font-size: .78rem;
  font-weight: 800;
}
body.offline-view-mode #loginForm button[type="submit"],
body.offline-view-mode #facilitatorPasswordForm button[type="submit"],
body.offline-view-mode #studentForm button[type="submit"],
body.offline-view-mode #registerFromLoginButton,
body.offline-view-mode #modalRegisterStudentButton,
body.offline-view-mode #existingRegistrationLoginButton,
body.offline-view-mode #confirmRegistrationButton,
body.offline-view-mode #confirmRescheduleButton,
body.offline-view-mode #sendMessageButton,
body.offline-view-mode #callAlertResponseGrid button,
body.offline-view-mode #callStudentButton,
body.offline-view-mode #markOngoingButton,
body.offline-view-mode #markCompleteButton,
body.offline-view-mode #markNoShowButton,
body.offline-view-mode #saveAppointmentSettingsButton,
body.offline-view-mode #addAppointmentDateButton,
body.offline-view-mode #clearAppointmentDatesButton,
body.offline-view-mode [data-remove-open-date],
body.offline-view-mode #refreshAvailabilityButton,
body.offline-view-mode #refreshStudentTopButton,
body.offline-view-mode #refreshFacilitatorButton {
  pointer-events: none;
  opacity: .48;
  cursor: not-allowed;
}
.offline-character-scene { position: relative; width: 230px; height: 178px; margin: -2px auto 8px; }
.offline-cloud {
  position: absolute;
  border-radius: 999px;
  background: #edf3f1;
  filter: drop-shadow(0 12px 16px rgba(48, 79, 70, .08));
}
.offline-cloud::before, .offline-cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.offline-cloud-back { width: 120px; height: 42px; left: 9px; top: 53px; opacity: .76; animation: cloudDrift 4s ease-in-out infinite; }
.offline-cloud-back::before { width: 55px; height: 55px; left: 21px; bottom: 4px; }
.offline-cloud-back::after { width: 42px; height: 42px; right: 17px; bottom: 4px; }
.offline-cloud-front { width: 142px; height: 48px; right: 0; top: 72px; background: #e4edeb; animation: cloudDrift 4.6s ease-in-out -.8s infinite reverse; }
.offline-cloud-front::before { width: 63px; height: 63px; left: 25px; bottom: 3px; }
.offline-cloud-front::after { width: 48px; height: 48px; right: 18px; bottom: 3px; }
.offline-mascot { position: absolute; z-index: 3; left: 50%; top: 18px; width: 112px; height: 125px; transform: translateX(-50%); animation: offlineMascotBob 2.6s ease-in-out infinite; }
.offline-face {
  position: absolute;
  left: 15px;
  top: 22px;
  width: 82px;
  height: 88px;
  border: 4px solid rgba(62, 50, 105, .09);
  border-radius: 44% 44% 48% 48%;
  background: linear-gradient(145deg, #cbb6f4, #9d7ee0);
  box-shadow: 0 16px 30px rgba(95, 65, 160, .18);
}
.offline-ear { position: absolute; z-index: 0; top: 10px; width: 34px; height: 43px; border-radius: 70% 30% 60% 40%; background: #b99ce9; }
.offline-ear-left { left: 14px; transform: rotate(-22deg); }
.offline-ear-right { right: 14px; transform: scaleX(-1) rotate(-22deg); }
.offline-eye { position: absolute; top: 36px; width: 8px; height: 11px; border-radius: 50%; background: #332653; animation: offlineBlink 3.7s infinite; }
.offline-eye-left { left: 22px; }
.offline-eye-right { right: 22px; }
.offline-cheek { position: absolute; top: 51px; width: 13px; height: 7px; border-radius: 50%; background: rgba(255, 164, 182, .58); }
.offline-cheek-left { left: 12px; }
.offline-cheek-right { right: 12px; }
.offline-mouth { position: absolute; left: 50%; top: 59px; width: 19px; height: 10px; transform: translateX(-50%); border-top: 3px solid #463566; border-radius: 50% 50% 0 0; }
.offline-arm { position: absolute; z-index: 4; top: 71px; width: 38px; height: 15px; border-radius: 999px; background: #a98cdf; }
.offline-arm-left { left: -3px; transform: rotate(25deg); animation: offlineWaveLeft 1.8s ease-in-out infinite; }
.offline-arm-right { right: -4px; transform: rotate(-28deg); }
.offline-wifi { position: absolute; z-index: 5; right: -24px; top: 12px; width: 49px; height: 49px; border: 3px solid #fff; border-radius: 15px; background: #fff0d6; box-shadow: 0 9px 22px rgba(89, 63, 25, .15); transform: rotate(8deg); animation: wifiWobble 1.7s ease-in-out infinite; }
.offline-wifi i { position: absolute; left: 50%; border: 3px solid #a66d13; border-bottom: 0; border-left-color: transparent; border-right-color: transparent; border-radius: 50% 50% 0 0; transform: translateX(-50%); }
.offline-wifi i:first-child { top: 8px; width: 31px; height: 15px; }
.offline-wifi i:nth-child(2) { top: 15px; width: 21px; height: 11px; }
.offline-wifi i:nth-child(3) { top: 22px; width: 10px; height: 7px; }
.offline-wifi b { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); color: #b34a4f; font-size: .72rem; }
.offline-shadow { position: absolute; left: 50%; bottom: 17px; width: 98px; height: 18px; transform: translateX(-50%); border-radius: 50%; background: rgba(41, 64, 58, .13); animation: offlineShadow 2.6s ease-in-out infinite; }
.offline-spark { position: absolute; z-index: 5; color: #d59f35; font-size: 1.2rem; animation: offlineSpark 2.3s ease-in-out infinite; }
.offline-spark-one { left: 22px; top: 15px; }
.offline-spark-two { right: 20px; bottom: 36px; animation-delay: -.9s; }

.my-card-actions .btn, .fac-actions .btn { min-height: 42px; padding: .58rem .82rem; font-size: .88rem; }
#studentLogoutButton { border-color: rgba(255,255,255,.58); color: #fff; background: rgba(255,255,255,.08); }
#studentLogoutButton:hover { color: var(--primary-dark); background: #fff; }
#studentIdNumber[readonly] { background: #f1f7f4; color: #23483e; cursor: not-allowed; }

@keyframes authFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes authBlink { 0%,42%,46%,100% { transform: scaleY(1); } 44% { transform: scaleY(.08); } }
@keyframes authCardWave { 0%,100% { transform: rotate(8deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-5px); } }
@keyframes offlineCardIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes cloudDrift { 0%,100% { transform: translateX(-4px); } 50% { transform: translateX(6px); } }
@keyframes offlineMascotBob { 0%,100% { transform: translateX(-50%) translateY(0) rotate(-1deg); } 50% { transform: translateX(-50%) translateY(-9px) rotate(1deg); } }
@keyframes offlineShadow { 0%,100% { transform: translateX(-50%) scaleX(1); opacity: .14; } 50% { transform: translateX(-50%) scaleX(.78); opacity: .08; } }
@keyframes offlineBlink { 0%,44%,48%,100% { transform: scaleY(1); } 46% { transform: scaleY(.05); } }
@keyframes offlineWaveLeft { 0%,100% { transform: rotate(25deg); transform-origin: right center; } 50% { transform: rotate(48deg); transform-origin: right center; } }
@keyframes wifiWobble { 0%,100% { transform: rotate(8deg); } 50% { transform: rotate(-7deg); } }
@keyframes offlineSpark { 0%,100% { opacity: .35; transform: scale(.75) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(18deg); } }
@keyframes offlineStatusPulse { 0%,100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }

@media (max-width: 620px) {
  .auth-screen { padding: 18px 14px 34px; place-items: start center; }
  .auth-card { padding: 24px 18px; border-radius: 24px; }
  .auth-character { transform: scale(.9); margin-bottom: -2px; }
  .offline-card { padding: 24px 18px; border-radius: 24px; }
  .offline-character-scene { transform: scale(.88); margin-top: -12px; margin-bottom: -3px; }
  .connection-banner { grid-template-columns: auto minmax(0, 1fr); }
  .connection-banner button { grid-column: 1 / -1; width: 100%; }
  .my-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fac-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .fac-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-character, .auth-character-card, .offline-card, .offline-cloud, .offline-mascot,
  .offline-arm-left, .offline-wifi, .offline-shadow, .offline-spark, .offline-eye, .offline-status-dot { animation: none !important; }
}
/* ================= END FRESH LOGIN + OFFLINE CHARACTER — V4 ================= */

.d-none { display: none !important; }
.offline-card > .btn { width: 100%; }

/* ========================================================================== */
/* Friendly responsive portal, fresh facilitator selections, and audio prompt */
/* V5 — 2026-08-07                                                         */
/* ========================================================================== */
.portal-control.d-none { display: none !important; }
#topLogoutButton { color: #a83f48; }
#topLogoutButton:hover { border-color: #efc3c8; background: #fff0f1; color: #8f3039; }
.compact-browser-card { text-align: center; }
.compact-browser-card .browser-instruction-icon { margin-inline: auto; }
.compact-browser-card .browser-instruction-actions { margin-top: 22px; }

.device-gate-wrap {
  width: min(560px, 100%);
  min-height: calc(100dvh - 150px);
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.device-gate-card {
  width: 100%;
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
  overflow: hidden;
}
.device-gate-card h1 { max-width: 430px; margin: 8px auto 10px; }
.device-gate-card p { max-width: 410px; margin: 0 auto 22px; line-height: 1.6; }
.device-gate-character {
  position: relative;
  width: 170px;
  height: 150px;
  margin: 0 auto 8px;
  animation: deviceCharacterFloat 2.8s ease-in-out infinite;
}
.device-face {
  position: absolute;
  left: 50%;
  top: 24px;
  width: 94px;
  height: 94px;
  transform: translateX(-50%);
  border-radius: 42% 42% 47% 47%;
  background: linear-gradient(145deg, #d5c0f8, #ad91e3);
  box-shadow: inset 0 -7px 0 rgba(87, 57, 135, .09), 0 18px 35px rgba(87, 57, 135, .18);
}
.device-ear { position: absolute; z-index: -1; top: 17px; width: 38px; height: 50px; border-radius: 70% 30% 60% 40%; background: #b79ce7; }
.device-ear-left { left: 30px; transform: rotate(-24deg); }
.device-ear-right { right: 30px; transform: scaleX(-1) rotate(-24deg); }
.device-face i { position: absolute; top: 37px; width: 8px; height: 12px; border-radius: 50%; background: #30234e; animation: deviceBlink 3.8s infinite; }
.device-face i:first-child { left: 25px; }
.device-face i:nth-child(2) { right: 25px; }
.device-face b { position: absolute; left: 50%; top: 58px; width: 22px; height: 11px; transform: translateX(-50%); border-bottom: 3px solid #493664; border-radius: 0 0 50% 50%; }
.device-phone {
  position: absolute;
  right: 13px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 76px;
  border: 5px solid #fff;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(160deg, #1a705c, #0d5143);
  box-shadow: 0 13px 28px rgba(15, 81, 67, .22);
  font-size: 1.8rem;
  transform: rotate(8deg);
  animation: devicePhoneWiggle 2.2s ease-in-out infinite;
}

.fac-friendly-overview {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 18px 0;
  padding: 17px 20px;
  border: 1px solid #dfeae6;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(232, 246, 241, .96), rgba(250, 247, 255, .96));
  box-shadow: 0 14px 34px rgba(23, 71, 59, .07);
  overflow: hidden;
}
.fac-friendly-character { position: relative; width: 105px; height: 91px; margin-inline: auto; animation: facFriendlyBob 3s ease-in-out infinite; }
.fac-friendly-face {
  position: absolute;
  left: 9px;
  top: 10px;
  width: 73px;
  height: 73px;
  border-radius: 44% 44% 48% 48%;
  background: linear-gradient(145deg, #a9e2d1, #72c4ad);
  box-shadow: inset 0 -5px 0 rgba(15, 91, 72, .08), 0 11px 22px rgba(22, 103, 82, .13);
}
.fac-friendly-ear { position: absolute; top: 3px; width: 29px; height: 36px; border-radius: 70% 30% 60% 40%; background: #82ceb9; }
.fac-friendly-ear.left { left: 7px; transform: rotate(-25deg); }
.fac-friendly-ear.right { left: 58px; transform: scaleX(-1) rotate(-25deg); }
.fac-friendly-face i { position: absolute; top: 28px; width: 6px; height: 9px; border-radius: 50%; background: #194c40; }
.fac-friendly-face i:first-child { left: 19px; }
.fac-friendly-face i:nth-child(2) { right: 19px; }
.fac-friendly-face b { position: absolute; left: 50%; top: 45px; width: 17px; height: 9px; transform: translateX(-50%); border-bottom: 3px solid #24584d; border-radius: 0 0 50% 50%; }
.fac-friendly-clipboard { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 45px; height: 53px; border: 4px solid #fff; border-radius: 12px; color: #7557a9; background: #eee6fb; box-shadow: 0 9px 18px rgba(82, 62, 118, .14); font-size: 1.25rem; transform: rotate(7deg); }
.fac-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fac-summary-grid > div { display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-height: 72px; padding: 11px 13px; border: 1px solid rgba(211, 228, 222, .9); border-radius: 16px; background: rgba(255,255,255,.82); }
.fac-summary-grid > div > span { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: var(--primary); background: var(--primary-soft); font-size: 1.15rem; }
.fac-summary-grid small { align-self: end; color: var(--muted); font-size: .72rem; font-weight: 700; }
.fac-summary-grid strong { align-self: start; font-size: 1.2rem; line-height: 1.15; }

.fac-selection-loading .fac-filter-bar,
.fac-selection-loading #facBatchStrip { opacity: .58; pointer-events: none; }
.fac-selection-loading #facBatchStrip { position: relative; }
.fac-selection-loading #facBatchStrip::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(17, 93, 76, .18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.batch-card.ended { border-style: dashed; background: #f5f6f6; color: #707c78; }
.batch-card.ended:not(:disabled):hover { border-color: #b7c3bf; background: #f0f3f2; }
.batch-card.ended:disabled { opacity: .55; cursor: not-allowed; }
.ended-batch-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border-radius: 999px; color: #676f6d; background: #e5e9e8; font-size: .62rem; letter-spacing: .04em; }
.slot-btn.started, .slot-btn.ended { border-style: dashed; filter: saturate(.7); }
.slot-btn.started { background: #fff8e9; }
.slot-btn.ended { background: #f1f3f3; }

.volume-prompt-card { overflow: hidden; background: linear-gradient(165deg, #ffffff, #f5fbf8); }
.volume-prompt-card .modal-body { padding: 30px 26px 26px; }
.volume-prompt-card h2 { margin: 6px 0 8px; font-size: clamp(1.35rem, 4vw, 1.75rem); }
.volume-prompt-card p { max-width: 350px; margin: 0 auto 20px; }
.volume-prompt-actions { display: grid; gap: 9px; }
.volume-character { position: relative; width: 170px; height: 145px; margin: -5px auto 5px; animation: volumeCharacterBob 2.7s ease-in-out infinite; }
.volume-face { position: absolute; left: 50%; top: 24px; width: 88px; height: 88px; transform: translateX(-50%); border-radius: 43% 43% 48% 48%; background: linear-gradient(145deg, #ffe5a6, #efbd58); box-shadow: inset 0 -6px 0 rgba(132, 85, 13, .08), 0 15px 30px rgba(132, 85, 13, .14); }
.volume-ear { position: absolute; z-index: -1; top: 17px; width: 34px; height: 43px; border-radius: 70% 30% 60% 40%; background: #f4c96f; }
.volume-ear-left { left: 33px; transform: rotate(-24deg); }
.volume-ear-right { right: 33px; transform: scaleX(-1) rotate(-24deg); }
.volume-face i { position: absolute; top: 34px; width: 7px; height: 11px; border-radius: 50%; background: #563d1b; animation: deviceBlink 3.9s infinite; }
.volume-face i:first-child { left: 23px; }
.volume-face i:nth-child(2) { right: 23px; }
.volume-face b { position: absolute; left: 50%; top: 55px; width: 20px; height: 10px; transform: translateX(-50%); border-bottom: 3px solid #66491f; border-radius: 0 0 50% 50%; }
.volume-bell { position: absolute; right: 10px; bottom: 6px; display: grid; place-items: center; width: 58px; height: 58px; border: 5px solid #fff; border-radius: 18px; color: #fff; background: linear-gradient(145deg, #1a735d, #0f5748); box-shadow: 0 11px 24px rgba(15, 87, 72, .2); font-size: 1.55rem; transform: rotate(8deg); animation: bellRing 1.7s ease-in-out infinite; }
.volume-wave { position: absolute; right: -3px; bottom: 23px; width: 25px; height: 25px; border: 3px solid #2f8d75; border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; opacity: .7; transform: rotate(45deg); animation: volumeWave 1.7s ease-out infinite; }
.volume-wave.wave-two { right: -16px; bottom: 13px; width: 43px; height: 43px; animation-delay: .28s; }

@keyframes deviceCharacterFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-9px) rotate(1deg); } }
@keyframes devicePhoneWiggle { 0%,100% { transform: rotate(8deg); } 50% { transform: rotate(1deg) translateY(-3px); } }
@keyframes deviceBlink { 0%,44%,48%,100% { transform: scaleY(1); } 46% { transform: scaleY(.06); } }
@keyframes facFriendlyBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes volumeCharacterBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes bellRing { 0%,100% { transform: rotate(8deg); } 25% { transform: rotate(-7deg); } 50% { transform: rotate(12deg); } 75% { transform: rotate(1deg); } }
@keyframes volumeWave { 0% { opacity: 0; transform: rotate(45deg) scale(.65); } 45% { opacity: .75; } 100% { opacity: 0; transform: rotate(45deg) scale(1.2); } }

@media (max-width: 850px) {
  .fac-friendly-overview { grid-template-columns: 1fr; padding: 16px; }
  .fac-friendly-character { display: none; }
  .fac-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fac-summary-grid > div { grid-template-columns: 1fr; grid-template-rows: auto auto auto; text-align: center; gap: 4px; }
  .fac-summary-grid > div > span { grid-row: auto; margin-inline: auto; }
}
@media (max-width: 520px) {
  .fac-summary-grid { gap: 7px; }
  .fac-summary-grid > div { min-height: 104px; padding: 9px 5px; }
  .fac-summary-grid > div > span { width: 36px; height: 36px; }
  .device-gate-wrap { min-height: calc(100dvh - 120px); }
  .device-gate-card { padding: 26px 19px; border-radius: 24px; }
  .device-gate-character { transform: scale(.9); margin-top: -9px; margin-bottom: -4px; }
}
@media (prefers-reduced-motion: reduce) {
  .device-gate-character, .device-phone, .fac-friendly-character, .volume-character, .volume-bell, .volume-wave,
  .device-face i, .volume-face i { animation: none !important; }
}

/* ================= ADMIN DASHBOARD + AFTERNOON THEME V6 ================= */
.course-abbr,
.message-course {
  display: inline-block;
  margin-left: .35rem;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .015em;
  white-space: nowrap;
}

.floating-message-button {
  position: fixed;
  z-index: 1040;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 17px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 16px 36px rgba(10,73,61,.28);
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.floating-message-button:hover,
.floating-message-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(10,73,61,.34);
}
.floating-message-button.active { filter: saturate(1.18) brightness(1.06); }
.floating-message-button > i { font-size: 1.12rem; }
.floating-message-button b {
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border-radius: 999px;
  color: #7d2631;
  background: #ffe8eb;
  font-size: .7rem;
  line-height: 1;
}

.dashboard-heading,
.message-page-heading { margin-bottom: 18px; }
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dashboard-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 26px rgba(18,70,58,.06);
}
.dashboard-kpi > span {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.18rem;
}
.dashboard-kpi small,
.dashboard-kpi strong { display: block; }
.dashboard-kpi small { color: var(--muted); font-size: .75rem; }
.dashboard-kpi strong { margin-top: 3px; font-size: clamp(1.15rem, 2.5vw, 1.55rem); line-height: 1.15; }

.dashboard-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, .75fr);
  gap: 16px;
  align-items: start;
}
.dashboard-chart-card { padding: 20px; }
.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 750;
  white-space: nowrap;
}
.dashboard-legend i {
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #6bc2aa);
}
.college-chart { display: grid; gap: 12px; }
.college-chart-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 2.1fr) 58px;
  gap: 12px;
  align-items: center;
}
.college-chart-label {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
}
.college-chart-label > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: .72rem;
  font-weight: 850;
}
.college-chart-label strong,
.college-chart-label small,
.college-chart-value strong,
.college-chart-value small { display: block; }
.college-chart-label strong { font-size: .88rem; }
.college-chart-label small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: .67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.college-chart-track {
  position: relative;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f0;
}
.college-chart-track > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--college-bar, 0%);
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #6bc2aa);
  box-shadow: 0 4px 12px rgba(17,93,76,.18);
  transition: width .45s ease;
}
.college-chart-value { text-align: right; }
.college-chart-value strong { font-size: 1rem; }
.college-chart-value small { color: var(--muted); font-size: .66rem; }

.dashboard-insight-column { display: grid; gap: 12px; }
.smart-insight-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 128px;
  padding: 17px;
}
.smart-insight-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #7a55a5;
  background: #efe6fb;
  font-size: 1.18rem;
}
.smart-insight-card small,
.smart-insight-card strong { display: block; }
.smart-insight-card small { color: var(--muted); font-size: .72rem; }
.smart-insight-card strong { margin-top: 5px; font-size: .95rem; line-height: 1.5; }

.message-section-block { margin-bottom: 22px; }
.message-section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}
.message-section-title > span {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
}
.message-section-title h2 { margin-bottom: 2px; }
.message-section-title p { font-size: .8rem; }
.call-response-item {
  grid-template-columns: 1fr;
  border-left: 4px solid var(--primary);
}
.message-item h3 { margin: 3px 0 4px; }
.message-item small { color: var(--muted); }
.message-item em {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .7rem;
  font-style: normal;
}

/* Warm sunset palette when the facilitator chooses Afternoon. */
body.fac-afternoon-theme {
  --primary: #b75a32;
  --primary-dark: #7e3550;
  --primary-soft: #fff0e6;
  --page: #fff7ef;
  --line: #f0d7c8;
  background:
    radial-gradient(circle at 82% 10%, rgba(238,139,87,.19), transparent 27%),
    radial-gradient(circle at 13% 72%, rgba(132,79,139,.12), transparent 30%),
    linear-gradient(180deg, #fff7ef 0%, #fdf2ed 55%, #f8eef5 100%);
}
body.fac-afternoon-theme .topbar {
  border-bottom-color: rgba(183,90,50,.16);
  background: rgba(255,248,241,.93);
}
body.fac-afternoon-theme #facilitatorScreen .fac-sidebar,
body.fac-afternoon-theme #facilitatorScreen .surface,
body.fac-afternoon-theme #facilitatorScreen .dashboard-kpi,
body.fac-afternoon-theme #facilitatorScreen .batch-card,
body.fac-afternoon-theme #facilitatorScreen .participant-row {
  border-color: rgba(183,90,50,.16);
}
body.fac-afternoon-theme #facilitatorScreen .fac-friendly-overview {
  background: linear-gradient(135deg, rgba(255,230,199,.9), rgba(240,214,235,.78));
}
body.fac-afternoon-theme #facilitatorScreen .fac-friendly-face {
  background: linear-gradient(145deg, #ffc780, #eb8c68);
}
body.fac-afternoon-theme #facilitatorScreen .fac-friendly-ear { background: #efa06f; }
body.fac-afternoon-theme #facilitatorScreen .batch-card.active,
body.fac-afternoon-theme #facilitatorScreen .fac-nav.active,
body.fac-afternoon-theme #facilitatorScreen .participant-row.selected {
  background: linear-gradient(135deg, #fff0e4, #f8e9f1);
}
body.fac-afternoon-theme .floating-message-button {
  background: linear-gradient(135deg, #cf6f3e, #813c62);
  box-shadow: 0 16px 36px rgba(126,53,80,.28);
}
body.fac-afternoon-theme .college-chart-track > span,
body.fac-afternoon-theme .dashboard-legend i {
  background: linear-gradient(90deg, #c96a3d, #a95f8a);
}

@media (max-width: 1050px) {
  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-content-grid { grid-template-columns: 1fr; }
  .dashboard-insight-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .floating-message-button {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: 50px;
    min-height: 50px;
    padding: 0;
    justify-content: center;
  }
  .floating-message-button > span { display: none; }
  .floating-message-button b {
    position: absolute;
    top: -5px;
    right: -4px;
  }
  .dashboard-kpi-grid { gap: 9px; }
  .college-chart-row { grid-template-columns: minmax(125px, 1fr) minmax(80px, 1.45fr) 45px; gap: 8px; }
}

@media (max-width: 580px) {
  .dashboard-kpi-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-kpi { min-height: 96px; padding: 12px; gap: 9px; }
  .dashboard-kpi > span { width: 39px; height: 39px; flex-basis: 39px; }
  .dashboard-insight-column { grid-template-columns: 1fr; }
  .dashboard-card-head { display: block; }
  .dashboard-legend { margin-top: 7px; }
  .college-chart-row { grid-template-columns: minmax(112px, 1fr) minmax(62px, 1fr) 39px; }
  .college-chart-label { grid-template-columns: 25px minmax(0, 1fr); gap: 6px; }
  .college-chart-label > span { width: 25px; height: 25px; border-radius: 8px; }
  .college-chart-label small { display: none; }
  .message-page-heading { align-items: center; }
  .message-page-heading .btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .college-chart-track > span,
  .floating-message-button { transition: none !important; }
}
/* ================= END ADMIN DASHBOARD + AFTERNOON THEME V6 ================= */

/* V7 student alarm + ongoing/completed experience */
.student-ongoing-wrap,
.student-completed-wrap { display: grid; gap: 16px; }
.ongoing-hero-card {
  background: linear-gradient(145deg, #f8fff9, #edf9f2);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15,74,61,.08);
}
.ongoing-mini-topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ongoing-mini-profile { display:flex; align-items:center; gap:12px; }
.ongoing-avatar { width:52px; height:52px; display:grid; place-items:center; border-radius:16px; background:#e7f3ed; color:var(--primary); font-size:1.75rem; }
.ongoing-mini-profile small { display:block; color:var(--muted); letter-spacing:.08em; font-weight:800; }
.ongoing-mini-profile strong { display:block; font-size:1.05rem; }
.ongoing-mini-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
.ongoing-mini-facts > div,
.completed-schedule-pill { padding:12px 14px; border-radius:16px; background:#fff; border:1px solid rgba(15,103,84,.08); }
.ongoing-mini-facts small { display:block; color:var(--muted); margin-bottom:4px; }
.ongoing-mini-facts strong { display:block; }
.ongoing-message-card,
.completed-card { text-align:center; border-radius:24px; box-shadow:0 18px 40px rgba(15,74,61,.08); }
.ongoing-message-icon,
.completed-icon { width:74px; height:74px; margin:0 auto 14px; display:grid; place-items:center; border-radius:22px; background:linear-gradient(145deg,#e8f7ef,#dff4e8); color:var(--primary); font-size:2rem; }
.ongoing-list-card { border-radius:24px; box-shadow:0 18px 40px rgba(15,74,61,.08); }
.ongoing-list-card .participant-row.owner { border-color:rgba(15,103,84,.28); background:linear-gradient(145deg,#f5fdfa,#e6f6ef); }
.ongoing-list-card .course-abbr { color:var(--muted); font-weight:700; margin-left:6px; }
.completed-card {
  padding:36px 28px;
  background: radial-gradient(circle at top, rgba(15,103,84,.08), transparent 48%), linear-gradient(160deg, #fffef8, #f8fffb);
}
.completed-card h1 { margin-bottom:10px; }
.completed-copy { max-width:620px; margin:0 auto 16px; }
.completed-quote { margin:22px auto 0; max-width:540px; font-size:1.05rem; font-style:italic; color:#2d5f55; }
.completed-note { margin-top:18px; font-size:.9rem; color:var(--muted); }

.call-alert-content { border-radius:28px; border:1px solid rgba(226,193,98,.42); box-shadow:0 28px 64px rgba(24,46,40,.18); overflow:hidden; }
.call-alert-content .modal-body { padding:22px; background:linear-gradient(180deg,#fffef8,#fbf7eb); }
.call-alert-header { display:flex; gap:16px; align-items:flex-start; }
.call-alert-badge { width:56px; height:56px; display:grid; place-items:center; border-radius:18px; background:#f8e8a7; color:#8a6512; font-size:1.35rem; flex:0 0 auto; }
.call-alert-header h2 { margin-bottom:6px; font-size:1.8rem; }
.call-alert-header p { font-size:1rem; line-height:1.55; }
.response-grid-modal { display:grid; gap:12px; margin-top:20px; }
.response-grid-modal .btn { min-height:56px; border-radius:16px; font-weight:800; font-size:1rem; }

.batch-card.completed-batch .batch-fill,
.batch-card .completed-progress-fill { background:linear-gradient(180deg, rgba(54, 176, 116, .06), rgba(54, 176, 116, .24)); }
.batch-card.completed-batch { border-color:rgba(44, 150, 101, .35); background:linear-gradient(145deg,#f5fff8,#e8f8ee); }

@media (max-width: 768px) {
  .ongoing-mini-topbar { flex-direction:column; align-items:flex-start; }
  .ongoing-mini-facts { grid-template-columns:1fr; }
  .call-alert-header { flex-direction:column; }
  .call-alert-badge { margin-bottom:2px; }
}

/* V8 dynamic appointment settings + completed progress */
.batch-card .completed-progress-fill,
.batch-card.completed-batch .batch-fill {
  background: #fff1a8 !important;
}
.batch-card.completed-batch {
  border-color: #e7ce68 !important;
  background: #fffdf1 !important;
}
.batch-card.completed-batch.active {
  box-shadow: 0 0 0 3px rgba(213, 181, 54, .14), 0 15px 32px rgba(111, 86, 16, .08);
}

#facDateTabs button.closed-date {
  opacity: .7;
  border-style: dashed;
}
#facDateTabs button.closed-date small {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(120,120,120,.09);
  color: var(--muted);
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.appointment-settings-card {
  border: 1px solid rgba(15, 103, 84, .12);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(19, 62, 52, .18);
}
.appointment-settings-card .modal-header,
.appointment-settings-card .modal-body,
.appointment-settings-card .modal-footer {
  background: #fff;
}
.settings-field-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdfc;
}
.settings-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}
.capacity-stepper {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: stretch;
}
.capacity-stepper button {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 800;
}
.capacity-stepper button:hover { background: var(--primary-soft); }
.capacity-stepper input { min-height: 48px; font-weight: 800; font-size: 1.05rem; }
.appointment-date-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 13px;
}
.schedule-date-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.schedule-date-manager-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.35;
}
.appointment-date-change-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.appointment-date-change-status.has-changes { color: #9a6814; }
.expired-date-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #ead9aa;
  border-radius: 12px;
  background: #fffaf0;
  color: #755b22;
  font-size: .78rem;
  line-height: 1.4;
}
.open-date-chip-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.open-date-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 103, 84, .14);
  border-radius: 15px;
  background: #eef8f3;
  color: #24584b;
  font-size: .82rem;
}
.open-date-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--primary);
}
.open-date-copy strong,
.open-date-copy small { display: block; }
.open-date-copy strong { color: #234f44; font-size: .84rem; }
.open-date-copy small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.open-date-chip button {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(181,65,76,.16);
  border-radius: 10px;
  background: #fff4f5;
  color: #a33d48;
  font-size: .74rem;
  font-weight: 800;
}
.settings-empty-date {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
  font-size: .88rem;
}
.settings-empty-date i { margin-bottom: 3px; color: #b07a1b; font-size: 1.3rem; }
.settings-empty-date strong { color: #5d584a; }
.settings-empty-date small { max-width: 360px; font-size: .76rem; line-height: 1.4; }
.settings-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.settings-preview > span {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  column-gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--primary-soft);
}
.settings-preview > span > i {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--primary);
}
.settings-preview small { color: var(--muted); }
.settings-preview strong { font-size: 1.05rem; }

@media (max-width: 640px) {
  .appointment-date-add-row { grid-template-columns: 1fr; }
  .schedule-date-manager-head { display: grid; }
  .schedule-date-manager-head .btn { width: 100%; }
  .open-date-chip { grid-template-columns: auto minmax(0, 1fr); }
  .open-date-chip button { grid-column: 1 / -1; width: 100%; }
  .settings-preview { grid-template-columns: 1fr; }
}


/* V9 registration duplicate-name feedback */
.name-check-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #efc1c5;
  border-radius: 14px;
  background: #fff6f6;
  color: #96323a;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.45;
}
.call-alert-content {
  background: linear-gradient(180deg, #fffdf7 0%, #fffaf0 100%);
}
.call-alert-header p {
  line-height: 1.65;
}

/* ================= V10 PWA INSTALL GATE + SCHEDULE ALARM ================= */
body.install-gate-active { overflow: hidden; }
.install-gate-screen {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 230, 163, .45), transparent 26%),
    radial-gradient(circle at 86% 86%, rgba(76, 166, 136, .16), transparent 30%),
    #f2f7f5;
}
.install-gate-card {
  width: min(100%, 500px);
  padding: clamp(24px, 6vw, 36px);
  border: 1px solid rgba(15,103,84,.12);
  border-radius: 30px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 28px 70px rgba(22,73,61,.15);
}
.install-app-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 24px;
  background: #0f6754;
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.12);
}
.install-app-icon span { color: #fff; font-size: 1.65rem; font-weight: 900; letter-spacing: -.04em; }
.install-gate-card h1 { margin: 7px 0 10px; }
.install-gate-card > p { line-height: 1.6; }
.install-benefits { display: grid; gap: 10px; margin: 22px 0; }
.install-benefits > div {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdfc;
}
.install-benefits i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.1rem;
}
.install-benefits strong,
.install-benefits small { display: block; }
.install-benefits small { margin-top: 2px; color: var(--muted); line-height: 1.35; }
.install-manual-instructions {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff8df;
  color: #5f5125;
  font-size: .9rem;
}
.install-manual-instructions ol { margin: 9px 0 0; padding-left: 1.25rem; }
.install-manual-instructions li + li { margin-top: 5px; }
.install-status { min-height: 22px; margin-top: 12px; color: var(--muted); font-size: .86rem; text-align: center; }

.schedule-alert-content {
  overflow: hidden;
  border: 1px solid rgba(222,184,79,.42);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(31,55,49,.20);
}
.schedule-alert-content .modal-body {
  padding: 24px;
  background: linear-gradient(180deg, #fffdf5, #fff9e8);
}
.schedule-alert-header { display: flex; align-items: flex-start; gap: 15px; }
.schedule-alert-badge {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #7d641a;
  background: #f8e6a7;
  font-size: 1.4rem;
  animation: scheduleBellPulse 1.6s ease-in-out infinite;
}
.schedule-alert-header h2 { margin-bottom: 6px; font-size: 1.55rem; }
.schedule-alert-header p { line-height: 1.55; }
.schedule-alert-summary {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(166,126,27,.15);
  border-radius: 15px;
  background: rgba(255,255,255,.78);
  color: #5b4b1f;
  font-weight: 800;
  text-align: center;
}
@keyframes scheduleBellPulse {
  0%,100% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-6deg) scale(1.04); }
  65% { transform: rotate(6deg) scale(1.04); }
}

.completed-uninstall-card {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(15,103,84,.12);
  border-radius: 20px;
  background: #f7fbf9;
  text-align: left;
}
.completed-uninstall-head { display: flex; align-items: center; gap: 12px; }
.completed-uninstall-head > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.15rem;
}
.completed-uninstall-head small,
.completed-uninstall-head strong { display: block; }
.completed-uninstall-head small { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.completed-uninstall-card ol { margin: 16px 0 10px; padding-left: 1.3rem; }
.completed-uninstall-card li + li { margin-top: 7px; }
.completed-uninstall-note { display: block; color: var(--muted); line-height: 1.45; }

@media (max-width: 520px) {
  .install-gate-screen { place-items: start center; }
  .install-gate-card { border-radius: 24px; }
  .schedule-alert-header { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .schedule-alert-badge { animation: none; }
}

/* ================= V11 INSTALL PROGRESS + FRESH LOGIN ================= */
.install-progress-panel {
  margin: 18px 0 16px;
  padding: 14px;
  border: 1px solid rgba(15,103,84,.12);
  border-radius: 17px;
  background: #f8fbfa;
}
.install-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 800;
}
.install-progress-head strong { color: var(--primary); }
.install-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9e5;
}
.install-progress-track > span {
  display: block;
  width: var(--install-progress, 15%);
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .5s ease;
}
.install-progress-steps {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
  margin-top: 11px;
}
.install-progress-steps > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 750;
}
.install-progress-steps > span.active,
.install-progress-steps > span.done { color: var(--primary); }
.install-progress-steps > span.done i { color: var(--success); }
.fresh-login-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: #315c52;
  font-size: .82rem;
  line-height: 1.45;
}
.fresh-login-note i { color: var(--primary); margin-top: 1px; }

@media (max-width: 420px) {
  .install-progress-steps > span { font-size: .62rem; }
}

@media (prefers-reduced-motion: reduce) {
  .install-progress-track > span { transition: none; }
}

/* ================= V13 BROWSER-ONLY TICKET FLOW ================= */
.ticket-only-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  padding-top: clamp(6px, 2vw, 18px);
}

.student-ticket-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 67, 55, .12);
  padding: clamp(20px, 4vw, 30px);
}

.student-ticket-card::before,
.student-ticket-card::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  top: 48%;
  border-radius: 50%;
  background: var(--page);
  border: 1px solid var(--line);
  z-index: 2;
}
.student-ticket-card::before { left: -18px; }
.student-ticket-card::after { right: -18px; }

.student-ticket-card.ticket-upcoming { border-top: 5px solid var(--primary); }
.student-ticket-card.ticket-ongoing { border-top: 5px solid #b37810; }
.student-ticket-card.ticket-complete { border-top: 5px solid var(--success); }
.student-ticket-card.ticket-expired { border-top: 5px solid var(--danger); }

.ticket-topline,
.ticket-main,
.ticket-live-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ticket-reference { display: block; margin-top: 4px; color: var(--muted); }
.ticket-status-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  background: var(--primary-soft);
  color: var(--primary);
}
.ticket-status-badge.status-ongoing { background: #fff2cf; color: #83590b; }
.ticket-status-badge.status-complete { background: #e7f6ef; color: var(--success); }
.ticket-status-badge.status-expired { background: #fff0f1; color: var(--danger); }

.ticket-main {
  align-items: stretch;
  margin: 24px 0;
  padding: 22px 0;
  border-top: 1px dashed #cfded8;
  border-bottom: 1px dashed #cfded8;
}
.ticket-identity { min-width: 0; flex: 1; }
.ticket-identity > small { color: var(--muted); font-weight: 750; letter-spacing: .1em; }
.ticket-queue-number {
  display: block;
  margin: 5px 0 14px;
  color: var(--primary);
  font-size: clamp(2.4rem, 10vw, 4.4rem);
  line-height: .95;
  letter-spacing: -.055em;
}
.ticket-identity h1 { margin-bottom: 5px; }
.ticket-identity p { font-size: .86rem; }

.ticket-qr-wrap {
  flex: 0 0 184px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  background: #f7faf9;
  border: 1px solid var(--line);
}
.ticket-qr { min-width: 156px; min-height: 156px; display: grid; place-items: center; }
.ticket-qr img, .ticket-qr canvas { width: 156px !important; height: 156px !important; }
.ticket-qr-wrap small { color: var(--muted); font-size: .68rem; text-align: center; }

.ticket-schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ticket-schedule-grid > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--page);
}
.ticket-schedule-grid i { color: var(--primary); font-size: 1.05rem; }
.ticket-schedule-grid small,
.ticket-schedule-grid strong { display: block; }
.ticket-schedule-grid small { color: var(--muted); font-size: .68rem; }
.ticket-schedule-grid strong { font-size: .84rem; line-height: 1.35; }

.ticket-live-row {
  justify-content: flex-start;
  margin-top: 16px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: .78rem;
}
.ticket-live-row #studentLiveStatus { flex: 1; }
.ticket-refresh-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
}

.ticket-state-message {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 17px;
  background: #fff8e8;
  border: 1px solid #efd7a5;
}
.ticket-state-message > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ffe7ad;
  color: #855900;
}
.ticket-state-message strong,
.ticket-state-message small { display: block; }
.ticket-state-message small { margin-top: 3px; color: var(--muted); }
.ticket-expired-message { background: #fff7f7; border-color: #efc5ca; }
.ticket-expired-message > span { background: #ffe6e8; color: var(--danger); }
.ticket-complete-message { background: #f0faf5; border-color: #bee1d1; }
.ticket-complete-message > span { background: #dff3e9; color: var(--success); }

@media (max-width: 640px) {
  .student-ticket-card { border-radius: 22px; padding: 18px; }
  .ticket-topline { align-items: flex-start; }
  .ticket-main { display: grid; }
  .ticket-qr-wrap { width: 100%; grid-template-columns: auto 1fr; justify-items: start; align-items: center; }
  .ticket-qr { min-width: 132px; min-height: 132px; }
  .ticket-qr img, .ticket-qr canvas { width: 132px !important; height: 132px !important; }
  .ticket-schedule-grid { grid-template-columns: 1fr; }
  .ticket-state-message { grid-template-columns: 42px minmax(0, 1fr); }
  .ticket-state-message .btn { grid-column: 1 / -1; width: 100%; }
}
/* ================= END V13 BROWSER-ONLY TICKET FLOW ================= */


/* ================= V14 PREMIUM TICKET + IDENTITY GATES ================= */
.premium-ticket {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(21, 86, 69, .18);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 0%, rgba(239, 208, 126, .28), transparent 31%),
    linear-gradient(145deg, #0b443a 0%, #0f6754 43%, #164f46 100%);
  box-shadow: 0 28px 70px rgba(8, 61, 51, .22), 0 6px 20px rgba(8, 61, 51, .10);
  color: #fff;
}
.premium-ticket::before, .premium-ticket::after { content: ""; position: absolute; width: 38px; height: 38px; top: 55%; border-radius: 50%; background: var(--page); z-index: 6; transform: translateY(-50%); }
.premium-ticket::before { left: -19px; }
.premium-ticket::after { right: -19px; }
.premium-ticket-glow { position: absolute; inset: -35% auto auto 60%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.08); filter: blur(4px); pointer-events: none; }
.premium-ticket-watermark { position: absolute; right: 24px; bottom: -22px; color: rgba(255,255,255,.045); font-size: clamp(7rem, 26vw, 14rem); font-weight: 950; line-height: 1; letter-spacing: -.12em; pointer-events: none; }
.ticket-premium-head { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 20px 22px 14px; }
.ticket-brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ticket-mini-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid rgba(255,255,255,.32); border-radius: 14px; background: rgba(255,255,255,.11); box-shadow: inset 0 1px rgba(255,255,255,.22); font-weight: 900; letter-spacing: -.04em; }
.ticket-brand-lockup small, .ticket-brand-lockup strong { display: block; }
.ticket-brand-lockup small { color: rgba(255,255,255,.65); font-size: .64rem; font-weight: 850; letter-spacing: .12em; }
.ticket-brand-lockup strong { margin-top: 2px; font-size: .98rem; }
.premium-ticket .ticket-status-badge { border: 1px solid rgba(255,255,255,.26); background: rgba(255,255,255,.13); color: #fff; backdrop-filter: blur(10px); box-shadow: inset 0 1px rgba(255,255,255,.18); }
.ticket-premium-body { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(180px,.55fr); gap: clamp(18px, 4vw, 38px); align-items: center; padding: 18px 24px 25px; }
.premium-ticket .ticket-identity { min-width: 0; }
.ticket-label { display: block; color: rgba(255,255,255,.62); font-size: .7rem; font-weight: 850; letter-spacing: .14em; }
.premium-ticket .ticket-queue-number { display: block; margin: 4px 0 14px; color: #ffeca9; font-size: clamp(2.6rem, 10vw, 5.3rem); font-weight: 950; line-height: .93; letter-spacing: -.065em; text-shadow: 0 8px 28px rgba(0,0,0,.14); }
.premium-ticket .ticket-identity h1 { margin: 0 0 5px; color: #fff; font-size: clamp(1.25rem, 4vw, 1.9rem); letter-spacing: -.025em; }
.premium-ticket .ticket-identity p { color: rgba(255,255,255,.72); }
.ticket-reference-line { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.78); font-size: .76rem; }
.ticket-qr-shell { position: relative; width: min(100%, 196px); margin-inline: auto; padding: 13px 13px 10px; border: 1px solid rgba(255,255,255,.26); border-radius: 24px; background: #fff; box-shadow: 0 18px 32px rgba(0,0,0,.16); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.ticket-qr-shell.is-unlocked { box-shadow: 0 20px 38px rgba(0,0,0,.20), 0 0 0 5px rgba(255,236,169,.13); }
.ticket-qr-shell .ticket-qr { position: relative; z-index: 1; display: grid; place-items: center; min-height: 156px; transition: filter .25s ease, opacity .25s ease, transform .25s ease; }
.ticket-qr-shell.is-locked .ticket-qr { filter: blur(13px) grayscale(1) contrast(.65); opacity: .20; transform: scale(.96); pointer-events: none; user-select: none; }
.ticket-qr-security-grid { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: repeating-linear-gradient(45deg, rgba(15,103,84,.28) 0 5px, rgba(255,255,255,.1) 5px 10px); }
.ticket-qr-shell.is-locked .ticket-qr-security-grid { opacity: .68; }
.ticket-qr-lock { position: absolute; inset: 9px; z-index: 4; display: none; place-items: center; align-content: center; gap: 4px; padding: 14px; border-radius: 18px; text-align: center; color: #103f37; background: rgba(250,249,239,.88); backdrop-filter: blur(7px); }
.ticket-qr-shell.is-locked .ticket-qr-lock { display: grid; }
.ticket-qr-lock > span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; border-radius: 50%; color: #fff; background: #0f6754; box-shadow: 0 7px 18px rgba(15,103,84,.25); }
.ticket-qr-lock strong { font-size: .8rem; letter-spacing: .12em; }
.ticket-qr-lock small { max-width: 140px; color: #63726d; font-size: .69rem; line-height: 1.3; }
.ticket-qr-caption { position: relative; z-index: 5; display: block; margin-top: 8px; color: #6d7b76; font-size: .66rem; font-weight: 750; text-align: center; }
.ticket-perforation { position: relative; z-index: 3; height: 1px; margin: 0 24px; border-top: 1px dashed rgba(255,255,255,.28); }
.ticket-perforation span { position: absolute; left: 50%; top: 50%; width: 56px; height: 5px; transform: translate(-50%,-50%); border-radius: 999px; background: rgba(255,255,255,.08); }
.premium-schedule-grid { position: relative; z-index: 2; padding: 19px 24px 12px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.premium-schedule-grid > div { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.075); color: #fff; backdrop-filter: blur(8px); }
.premium-schedule-grid i { color: #ffeca9; }
.premium-schedule-grid small { color: rgba(255,255,255,.58); }
.premium-schedule-grid strong { color: #fff; }
.premium-live-row { position: relative; z-index: 2; margin: 8px 24px 18px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: rgba(255,255,255,.76); }
.premium-live-row .ticket-refresh-btn { color: #fff; background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.16); }
.premium-ticket .ticket-state-message { position: relative; z-index: 3; margin: 12px 24px 18px; color: var(--ink); }
.ticket-footer-security { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid rgba(255,255,255,.10); color: rgba(255,255,255,.52); font-size: .66rem; font-weight: 750; letter-spacing: .04em; }
.ticket-footer-security i { margin-right: 5px; }
.premium-ticket.ticket-complete { background: radial-gradient(circle at 90% 0%, rgba(197,255,226,.18), transparent 31%), linear-gradient(145deg,#0c493c,#176b55 55%,#0f5c49); }
.premium-ticket.ticket-expired { background: radial-gradient(circle at 90% 0%, rgba(255,226,203,.16), transparent 31%), linear-gradient(145deg,#523330,#71453d 55%,#5d3934); }
.identity-check-content { border: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 26px 70px rgba(27,57,48,.20); }
.identity-check-content .modal-body { padding: 30px; }
.identity-modal-icon { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 22px; color: #fff; background: linear-gradient(145deg,#0f6754,#2a8d74); box-shadow: 0 14px 30px rgba(15,103,84,.20); font-size: 1.7rem; }
.identity-modal-icon.existing { background: linear-gradient(145deg,#805f13,#b78b24); box-shadow: 0 14px 30px rgba(128,95,19,.20); }
.identity-check-content h2 { margin: 7px 0 9px; font-size: 1.35rem; }
.identity-check-content p { line-height: 1.55; }
@media (max-width: 700px) {
  .premium-ticket { border-radius: 24px; }
  .ticket-premium-head { padding: 17px 17px 10px; align-items: flex-start; }
  .ticket-brand-lockup small { display: none; }
  .ticket-premium-body { grid-template-columns: 1fr; padding: 16px 18px 22px; }
  .ticket-qr-shell { width: 184px; }
  .premium-schedule-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 18px; }
  .premium-live-row, .premium-ticket .ticket-state-message { margin-left: 18px; margin-right: 18px; }
  .ticket-footer-security { padding-left: 18px; padding-right: 18px; }
}


/* ================= COMPLETED TICKET FLIP V15 ================= */
.ticket-flip-shell {
  overflow: visible;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  perspective: 1500px;
}
.ticket-flip-shell::before,
.ticket-flip-shell::after { display: none; }
.ticket-flip-inner {
  position: relative;
  width: 100%;
  min-height: 620px;
  transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.22,.7,.2,1);
}
.ticket-flip-shell.is-flipped .ticket-flip-inner { transform: rotateY(180deg); }
.ticket-flip-shell.ticket-flip-arrival .ticket-flip-inner { animation: completedTicketArrival 1.05s cubic-bezier(.18,.72,.18,1) both; }
.ticket-face {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(21,86,69,.18);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(8,61,51,.22), 0 6px 20px rgba(8,61,51,.10);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.ticket-front-face {
  transform: rotateY(0deg);
  background: radial-gradient(circle at 90% 0%, rgba(239,208,126,.28), transparent 31%), linear-gradient(145deg,#0b443a 0%,#0f6754 43%,#164f46 100%);
}
.ticket-flip-shell.ticket-expired .ticket-front-face { background: radial-gradient(circle at 90% 0%, rgba(255,226,203,.16), transparent 31%), linear-gradient(145deg,#523330,#71453d 55%,#5d3934); }
.ticket-back-face {
  display: flex;
  flex-direction: column;
  transform: rotateY(180deg);
  color: #fff;
  background:
    radial-gradient(circle at 12% 6%, rgba(255,238,174,.26), transparent 25%),
    radial-gradient(circle at 88% 86%, rgba(117,222,184,.18), transparent 28%),
    linear-gradient(145deg,#083d34 0%,#0c5b49 48%,#0a463b 100%);
}
.ticket-front-face::before,
.ticket-front-face::after,
.ticket-back-face::before,
.ticket-back-face::after {
  content: "";
  position: absolute;
  width: 38px;
  height: 38px;
  top: 55%;
  border-radius: 50%;
  background: var(--page);
  z-index: 10;
  transform: translateY(-50%);
}
.ticket-front-face::before,
.ticket-back-face::before { left: -19px; }
.ticket-front-face::after,
.ticket-back-face::after { right: -19px; }
.completed-ticket-orbit { position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; pointer-events: none; }
.completed-ticket-orbit-one { width: 330px; height: 330px; right: -150px; top: -150px; box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.018); }
.completed-ticket-orbit-two { width: 240px; height: 240px; left: -130px; bottom: -120px; box-shadow: 0 0 0 28px rgba(255,236,169,.025); }
.completed-ticket-watermark { position: absolute; right: -12px; bottom: 40px; color: rgba(255,255,255,.035); font-size: clamp(4rem,18vw,9rem); font-weight: 950; letter-spacing: -.09em; transform: rotate(-8deg); pointer-events: none; }
.completed-ticket-topline { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 22px 24px; border-bottom: 1px solid rgba(255,255,255,.11); }
.completed-mini-mark { color: #164f46; background: #ffeca9; border-color: rgba(255,236,169,.75); }
.completed-ticket-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.12); font-size: .7rem; font-weight: 900; letter-spacing: .08em; }
.completed-ticket-content { position: relative; z-index: 2; display: grid; justify-items: center; align-content: center; flex: 1; padding: 34px clamp(22px,6vw,58px) 30px; text-align: center; }
.completed-ticket-seal { display: grid; place-items: center; width: 100px; height: 100px; margin-bottom: 22px; border: 1px solid rgba(255,236,169,.45); border-radius: 50%; background: rgba(255,255,255,.08); box-shadow: 0 18px 44px rgba(0,0,0,.16), inset 0 0 0 9px rgba(255,255,255,.035); }
.completed-ticket-seal span { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; color: #114c40; background: linear-gradient(145deg,#fff4bf,#efd47f); box-shadow: 0 10px 28px rgba(0,0,0,.18); font-size: 2.2rem; }
.completed-ticket-eyebrow { color: #ffeca9; font-size: .69rem; font-weight: 900; letter-spacing: .16em; }
.completed-ticket-content h1 { max-width: 760px; margin: 8px 0 10px; color: #fff; font-size: clamp(1.8rem,5vw,3rem); letter-spacing: -.04em; }
.completed-ticket-content > p { max-width: 680px; color: rgba(255,255,255,.78); font-size: clamp(.92rem,2.4vw,1.05rem); line-height: 1.7; }
.completed-ticket-content .completed-ticket-closing { margin-top: 8px; color: rgba(255,255,255,.68); }
.completed-ticket-summary { width: min(100%,720px); display: grid; grid-template-columns: .75fr 1.45fr 1fr; gap: 10px; margin-top: 26px; }
.completed-ticket-summary > div { min-width: 0; padding: 13px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: rgba(255,255,255,.075); backdrop-filter: blur(8px); text-align: left; }
.completed-ticket-summary small, .completed-ticket-summary strong { display: block; }
.completed-ticket-summary small { color: rgba(255,255,255,.52); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.completed-ticket-summary strong { margin-top: 4px; color: #fff; font-size: .79rem; line-height: 1.35; overflow-wrap: anywhere; }
.completed-return-note { display: inline-flex; align-items: center; gap: 9px; max-width: 720px; margin-top: 18px; padding: 10px 13px; border: 1px solid rgba(255,236,169,.18); border-radius: 999px; color: rgba(255,255,255,.72); background: rgba(255,236,169,.07); font-size: .74rem; }
.completed-return-note i { color: #ffeca9; }
.completed-ticket-footer { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 12px; padding: 16px 24px 19px; border-top: 1px solid rgba(255,255,255,.10); color: rgba(255,255,255,.50); font-size: .66rem; font-weight: 750; letter-spacing: .04em; }
@keyframes completedTicketArrival {
  0% { transform: rotateY(0deg) scale(.985); }
  44% { transform: rotateY(96deg) scale(.97); }
  100% { transform: rotateY(180deg) scale(1); }
}
@media (max-width:700px) {
  .ticket-flip-inner, .ticket-face { min-height: 730px; }
  .ticket-face { border-radius: 24px; }
  .completed-ticket-topline { padding: 18px; align-items: flex-start; }
  .completed-ticket-topline .ticket-brand-lockup small { display: none; }
  .completed-ticket-badge { font-size: .62rem; }
  .completed-ticket-content { padding: 28px 18px 24px; }
  .completed-ticket-seal { width: 88px; height: 88px; }
  .completed-ticket-seal span { width: 62px; height: 62px; }
  .completed-ticket-summary { grid-template-columns: 1fr; }
  .completed-ticket-summary > div { text-align: center; }
  .completed-return-note { border-radius: 16px; align-items: flex-start; text-align: left; }
  .completed-ticket-footer { padding: 15px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticket-flip-inner { transition: none; }
  .ticket-flip-shell.ticket-flip-arrival .ticket-flip-inner { animation: none; }
}
/* ================= END COMPLETED TICKET FLIP V15 ================= */

/* ================== 10-MINUTE CAPACITY ROTATIONS + PRINTING V17: BEGIN ================== */
.ticket-qr-shell.is-locked .ticket-qr,
.ticket-qr-shell .ticket-qr {
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  user-select: auto !important;
}
.ticket-qr-lock { display: none !important; }
.ticket-qr-caption { color: #315c52; font-weight: 800; }
.premium-schedule-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rotation-panel {
  margin: -2px 0 16px;
  padding: 14px;
  border: 1px solid rgba(15, 103, 84, .13);
  border-radius: 20px;
  background: linear-gradient(145deg, #fbfefc, #f0f8f4);
  box-shadow: 0 12px 30px rgba(18, 82, 66, .06);
}
.rotation-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.rotation-panel-head strong,
.rotation-panel-head small { display: block; }
.rotation-panel-head strong { margin-top: 3px; color: var(--ink); }
.rotation-panel-head small { color: var(--muted); }
.rotation-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}
.rotation-card {
  min-height: 76px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.rotation-card:hover { transform: translateY(-1px); border-color: rgba(15, 103, 84, .35); }
.rotation-card.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(15, 103, 84, .10); }
.rotation-card.current { border-color: #d2a72f; }
.rotation-card.ended:not(.active) { opacity: .68; }
.rotation-card span { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.rotation-card strong,
.rotation-card small { display: block; }
.rotation-card strong { font-size: .87rem; }
.rotation-card small { margin-top: 7px; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.rotation-card b { padding: 2px 6px; border-radius: 999px; color: #6f5310; background: #fff0a9; font-size: .58rem; letter-spacing: .06em; }

.facilitator-student-modal .selected-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-preview { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.print-registration-modal .modal-content { border: 1px solid rgba(15,103,84,.14); border-radius: 24px; overflow: hidden; }
.print-modal-summary { padding: 11px 13px; border-radius: 13px; color: #315c52; background: #eef8f3; }
.print-scope-grid { display: grid; gap: 9px; }
.print-scope-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}
.print-scope-card > i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--primary); background: var(--primary-soft); font-size: 1.1rem; }
.print-scope-card strong,
.print-scope-card small { display: block; }
.print-scope-card small { margin-top: 3px; color: var(--muted); }
.print-scope-card.active { border-color: var(--primary); background: #f4fbf7; box-shadow: 0 0 0 3px rgba(15,103,84,.09); }

@media (max-width: 920px) {
  .premium-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .premium-schedule-grid > div:first-child { grid-column: 1 / -1; }
  .facilitator-student-modal .selected-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .rotation-panel-head { display: block; }
  .rotation-panel-head > small { margin-top: 5px; }
  .rotation-strip { grid-template-columns: repeat(6, minmax(132px, 1fr)); }
  .facilitator-student-modal .selected-meta { grid-template-columns: 1fr; }
  .settings-preview { grid-template-columns: 1fr 1fr; }
}
/* ================== 10-MINUTE CAPACITY ROTATIONS + PRINTING V17: END ================== */

/* ================== RESPONSIVE + OFFLINE UI RELIABILITY V19: BEGIN ================== */
html {
  width: 100%;
  overflow-x: hidden;
  scroll-padding-top: 82px;
}
body {
  width: 100%;
  min-width: 280px;
  overflow-x: hidden;
}
img, canvas, video { max-width: 100%; }
button, a, input, select, textarea { touch-action: manipulation; }
.app-shell, main, .screen, .compact-wrap, .facilitator-layout, .fac-main,
.fac-head, .fac-filter-bar, .fac-content-grid, .surface, .modal-content { min-width: 0; }
.topbar { width: 100%; max-width: 100vw; }
.brand, .brand > span:last-child, .topbar-actions { min-width: 0; }
.fac-actions .btn, .selection-bar .btn, .modal-footer .btn { white-space: normal; }
.slot-btn strong, .batch-card strong, .rotation-card strong,
.ticket-schedule-grid strong, .open-date-copy strong { overflow-wrap: anywhere; }
.date-card, .slot-btn, .batch-card, .rotation-card, .print-scope-card {
  -webkit-tap-highlight-color: transparent;
}
.date-card:focus-visible, .slot-btn:focus-visible, .batch-card:focus-visible,
.rotation-card:focus-visible, .print-scope-card:focus-visible, .fac-nav:focus-visible {
  outline: 3px solid rgba(15, 103, 84, .25);
  outline-offset: 2px;
}
.appointment-settings-modal .modal-dialog { width: min(100% - 24px, 620px); }
.appointment-settings-modal .modal-content { display: flex; flex-direction: column; }
.appointment-settings-modal .modal-body { min-height: 0; }
.appointment-settings-modal .modal-footer {
  flex: 0 0 auto;
  border-top: 1px solid rgba(15, 103, 84, .08) !important;
  background: rgba(255, 255, 255, .98) !important;
}
.open-date-copy { min-width: 0; }
.open-date-copy small { overflow-wrap: anywhere; }
.rotation-strip, .batch-strip, .segmented, .date-grid {
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.ticket-premium-head, .ticket-footer-security, .completed-ticket-footer { min-width: 0; }
.ticket-brand-lockup { overflow: hidden; }
.ticket-brand-lockup > div { min-width: 0; }
.ticket-brand-lockup strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-status-badge { white-space: nowrap; }

@media (max-width: 767.98px) {
  .topbar {
    min-height: 68px;
    height: auto;
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .brand { flex: 1 1 auto; max-width: calc(100% - 96px); }
  .brand > span:last-child { max-width: 100%; }
  .topbar-actions { flex: 0 0 auto; }
  .screen { width: 100%; }

  .fac-head { overflow: hidden; }
  .fac-actions { width: 100%; }
  .fac-actions .btn { min-width: 0; }
  .fac-filter-bar > * { min-width: 0; }
  .rotation-strip { scroll-snap-type: x proximity; }
  .rotation-card { scroll-snap-align: start; }
  .roster-card { overflow: visible; }
  .fac-roster { max-height: min(48dvh, 480px); padding-right: 0; }

  body.facilitator-portal-active.connection-banner-active #facilitatorScreen {
    padding-bottom: calc(172px + env(safe-area-inset-bottom));
  }
  body.facilitator-portal-active.connection-banner-active .connection-banner {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .modal-dialog {
    width: auto;
    max-width: none;
    margin: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }
  .modal-dialog-centered { min-height: calc(100% - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .modal-content { max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .modal-header { gap: 12px; }
  .modal-header > div { min-width: 0; }
  .modal-title { overflow-wrap: anywhere; }
  .modal-footer { position: sticky; bottom: 0; z-index: 3; flex-wrap: wrap; background: #fff; }
  .modal-footer > .btn { flex: 1 1 140px; }
  .appointment-settings-modal .modal-dialog { width: auto; }
  .appointment-settings-modal .modal-content { max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }

  .selection-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .selection-bar > div { min-width: 0; }
  .selection-bar strong { overflow-wrap: anywhere; }

  .premium-ticket { max-width: 100%; }
  .ticket-premium-head { flex-wrap: wrap; }
  .ticket-premium-head .ticket-status-badge { margin-left: auto; }
  .premium-ticket .ticket-queue-number { overflow-wrap: anywhere; }
  .ticket-footer-security, .completed-ticket-footer { flex-wrap: wrap; }
  .completed-ticket-content { overflow-y: auto; overscroll-behavior: contain; }
}

@media (max-width: 430px) {
  .topbar { gap: 7px; }
  .brand { max-width: calc(100% - 92px); gap: 7px; }
  .brand-mark { flex-basis: 40px; width: 40px; height: 40px; }
  .brand strong { max-width: 100%; font-size: .86rem; }
  .topbar-actions { gap: 4px; }
  .icon-btn, .profile-btn { min-width: 40px; width: 40px; height: 40px; }

  .auth-screen { padding-inline: 10px; }
  .auth-card { padding: 22px 16px; }
  .fresh-login-note { font-size: .76rem; }
  .surface, #detailsPanel, #schedulePanel { padding: 15px; }

  .fac-actions { grid-template-columns: 1fr; }
  .fac-actions .btn:first-child { grid-column: auto; }
  .rotation-strip { grid-template-columns: repeat(6, minmax(126px, 1fr)); }
  .rotation-card { min-height: 82px; }
  .dashboard-kpi-grid { grid-template-columns: 1fr; }
  .dashboard-kpi { min-height: 82px; }
  .college-chart-row { grid-template-columns: minmax(100px, 1fr) minmax(54px, 1fr) 36px; }

  .selection-bar { grid-template-columns: 1fr; }
  .selection-bar .btn { width: 100%; }
  .ticket-premium-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .ticket-premium-head .ticket-status-badge { min-width: 0; padding-inline: 9px; font-size: .64rem; }
  .ticket-brand-lockup strong { font-size: .88rem; }
  .ticket-footer-security, .completed-ticket-footer { display: grid; grid-template-columns: 1fr; }
  .offline-character-scene { width: 210px; }
}

@media (max-width: 350px) {
  .brand strong { font-size: .8rem; }
  .slot-grid { grid-template-columns: 1fr; }
  .slot-btn { min-height: 106px; }
  .ticket-premium-head { grid-template-columns: 1fr; }
  .ticket-premium-head .ticket-status-badge { justify-self: start; margin-left: 0; }
  .appointment-settings-card .modal-header,
  .appointment-settings-card .modal-body,
  .appointment-settings-card .modal-footer { padding-inline: 13px; }
}
/* =================== RESPONSIVE + OFFLINE UI RELIABILITY V19: END =================== */

/* ================= ALL-SCREEN TICKET + FACILITATOR DESKTOP V20: BEGIN ================= */
.ticket-only-wrap { width: min(960px, 100%); }
.premium-ticket, .ticket-face { max-width: 100%; }
.ticket-premium-body, .premium-schedule-grid, .premium-live-row,
.ticket-state-message, .completed-ticket-summary { min-width: 0; }
.premium-schedule-grid > div, .completed-ticket-summary > div { min-width: 0; }
.premium-schedule-grid strong, .completed-ticket-summary strong { overflow-wrap: anywhere; }

#facilitatorScreen .facilitator-layout { width: min(1660px, 100%); }
#facilitatorScreen .fac-main { width: 100%; min-width: 0; }
#facilitatorScreen .fac-head > div,
#facilitatorScreen .fac-friendly-overview,
#facilitatorScreen .fac-summary-grid,
#facilitatorScreen .roster-head > div { min-width: 0; }
#facilitatorScreen .fac-filter-bar { min-width: 0; }
#facilitatorScreen #facDateTabs { min-width: 0; overflow-x: auto; }
#facilitatorScreen #dayPartTabs { flex: 0 0 auto; }
#facilitatorScreen .batch-strip,
#facilitatorScreen .rotation-strip { width: 100%; min-width: 0; }
#facilitatorScreen .roster-card { min-width: 0; }
#facilitatorScreen .fac-roster { min-height: 180px; }

@media (min-width: 1500px) {
  #facilitatorScreen { padding-inline: clamp(24px, 3vw, 52px); }
  #facilitatorScreen .facilitator-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 28px; }
  #facilitatorScreen .fac-head { grid-template-columns: minmax(300px, .75fr) minmax(780px, 1.7fr); }
  #facilitatorScreen .fac-actions { grid-template-columns: repeat(5, minmax(132px, 1fr)); }
  #facilitatorScreen .batch-strip { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
}

@media (min-width: 1200px) {
  #facilitatorScreen .facilitator-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
  #facilitatorScreen .fac-sidebar { top: 92px; min-height: calc(100dvh - 118px); }
  #facilitatorScreen .fac-head {
    display: grid;
    grid-template-columns: minmax(270px, .78fr) minmax(560px, 1.45fr);
    align-items: start;
    gap: 24px;
  }
  #facilitatorScreen .fac-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(148px, 1fr));
    width: 100%;
    margin: 0;
  }
  #facilitatorScreen .fac-actions .btn { width: 100%; min-width: 0; }
  #facilitatorScreen .fac-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  #facilitatorScreen .fac-roster { max-height: min(54dvh, 650px); }
  #facilitatorScreen .roster-head { align-items: center; }
  #facilitatorScreen .search-input { width: min(32vw, 330px); max-width: 330px; }
}

@media (min-width: 1500px) {
  #facilitatorScreen .facilitator-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 28px; }
  #facilitatorScreen .fac-head { grid-template-columns: minmax(300px, .75fr) minmax(780px, 1.7fr); }
  #facilitatorScreen .fac-actions { grid-template-columns: repeat(5, minmax(128px, 1fr)); }
}

@media (min-width: 981px) and (max-width: 1199.98px) {
  #facilitatorScreen .facilitator-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
  #facilitatorScreen .fac-head { display: block; }
  #facilitatorScreen .fac-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
    margin-top: 16px;
  }
  #facilitatorScreen .fac-actions .btn { width: 100%; min-width: 0; }
  #facilitatorScreen .fac-filter-bar { align-items: stretch; }
  #facilitatorScreen #facDateTabs { flex: 1 1 auto; }
  #facilitatorScreen .rotation-strip { grid-template-columns: repeat(6, minmax(136px, 1fr)); }
}

@media (min-width: 768px) and (max-width: 980px) {
  #facilitatorScreen { padding-inline: 18px; }
  #facilitatorScreen .fac-sidebar { width: 100%; }
  #facilitatorScreen .fac-head { display: block; }
  #facilitatorScreen .fac-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin-top: 15px;
  }
  #facilitatorScreen .fac-actions .btn { width: 100%; min-width: 0; }
  #facilitatorScreen .fac-filter-bar { flex-direction: column; align-items: stretch; }
  #facilitatorScreen #dayPartTabs { width: 100%; }
  #facilitatorScreen #dayPartTabs button { flex: 1 1 0; }
  #facilitatorScreen .batch-strip { grid-template-columns: repeat(4, minmax(150px, 1fr)); overflow-x: auto; }
}

@media (max-width: 700px) {
  .ticket-only-wrap { padding-top: 0; }
  .ticket-flip-inner, .ticket-face { min-height: 780px; }
  .ticket-front-face, .ticket-back-face {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .ticket-premium-body { gap: 14px; }
  .ticket-qr-shell { width: min(174px, 62vw); }
  .ticket-qr-shell .ticket-qr { min-height: 146px; }
  .ticket-qr img, .ticket-qr canvas { width: 146px !important; height: 146px !important; }
  .premium-schedule-grid > div { min-height: 66px; }
}

@media (max-width: 430px) {
  .ticket-flip-inner, .ticket-face { min-height: 860px; }
  .ticket-premium-head { padding: 15px 15px 9px; }
  .ticket-premium-body { padding: 14px 16px 19px; }
  .premium-ticket .ticket-queue-number { font-size: clamp(2.25rem, 16vw, 3.4rem); }
  .premium-schedule-grid { padding: 15px; gap: 8px; }
  .premium-live-row, .premium-ticket .ticket-state-message { margin-inline: 15px; }
  .ticket-footer-security { padding-inline: 15px; }
  .completed-ticket-content { padding-inline: 16px; }
}

@media (max-width: 350px) {
  .ticket-flip-inner, .ticket-face { min-height: 930px; }
  .ticket-mini-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .ticket-qr-shell { width: min(160px, 70vw); }
  .ticket-qr-shell .ticket-qr { min-height: 132px; }
  .ticket-qr img, .ticket-qr canvas { width: 132px !important; height: 132px !important; }
}

@media (max-height: 700px) and (max-width: 767.98px) {
  .screen { padding-top: 9px; }
  .registration-hero { padding-block: 15px; }
  .modal-dialog { align-items: flex-end; }
}
/* ================== ALL-SCREEN TICKET + FACILITATOR DESKTOP V20: END ================== */

/* ================= REGISTERED TICKET FLUID LAYOUT V21: BEGIN =================
   The ticket faces share a CSS grid cell instead of relying on fixed heights.
   This lets the card grow with a long student name, course, or expiry notice
   on every screen size while preserving the completed-ticket flip. */
#studentHomeScreen,
#studentHomeScreen .ticket-only-wrap,
#studentHomeScreen .ticket-flip-shell {
  min-width: 0;
}

#studentHomeScreen .ticket-only-wrap {
  width: min(960px, 100%);
  max-width: 100%;
}

#studentHomeScreen .ticket-flip-shell {
  width: 100%;
  max-width: 100%;
}

#studentHomeScreen .ticket-flip-inner {
  display: grid;
  width: 100%;
  min-height: 0;
}

#studentHomeScreen .ticket-face {
  position: relative;
  inset: auto;
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#studentHomeScreen .ticket-premium-body {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 196px);
}

#studentHomeScreen .ticket-qr-shell {
  --ticket-qr-size: 156px;
  inline-size: min(100%, calc(var(--ticket-qr-size) + 30px));
  max-inline-size: 100%;
}

#studentHomeScreen .ticket-qr-shell .ticket-qr {
  min-inline-size: var(--ticket-qr-size);
  min-block-size: var(--ticket-qr-size);
}

#studentHomeScreen .ticket-qr img,
#studentHomeScreen .ticket-qr canvas {
  inline-size: var(--ticket-qr-size) !important;
  block-size: var(--ticket-qr-size) !important;
  max-inline-size: 100%;
  object-fit: contain;
}

#studentHomeScreen .ticket-reference-line,
#studentHomeScreen .ticket-live-row,
#studentHomeScreen .ticket-footer-security,
#studentHomeScreen .ticket-state-message,
#studentHomeScreen .ticket-schedule-grid > div {
  min-width: 0;
}

#studentHomeScreen .ticket-reference-line {
  max-width: 100%;
  align-items: flex-start;
  white-space: normal;
}

#studentHomeScreen .ticket-reference-line span,
#studentHomeScreen #studentLiveStatus,
#studentHomeScreen .ticket-schedule-grid > div > span,
#studentHomeScreen .ticket-state-message > div,
#studentHomeScreen .ticket-footer-security > span,
#studentHomeScreen .completed-return-note,
#studentHomeScreen .completed-return-note span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#studentHomeScreen .ticket-schedule-grid > div > i,
#studentHomeScreen .ticket-state-message > span,
#studentHomeScreen .ticket-refresh-btn {
  flex: 0 0 auto;
}

#studentHomeScreen .ticket-state-message .btn {
  max-width: 100%;
  white-space: normal;
  text-wrap: balance;
}

@media (max-width: 800px) {
  #studentHomeScreen .ticket-premium-body {
    grid-template-columns: minmax(0, 1fr);
  }

  #studentHomeScreen .ticket-qr-shell {
    --ticket-qr-size: clamp(132px, 30vw, 146px);
    justify-self: center;
    margin-inline: auto;
  }
}

@media (min-width: 601px) and (max-width: 920px) {
  /* Keep the four schedule details balanced on tablets. */
  #studentHomeScreen .premium-schedule-grid > div:first-child {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  #studentHomeScreen .premium-schedule-grid {
    /* Keep Date, Time, College, and Course as a compact 2 × 2 grid. */
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #studentHomeScreen .ticket-state-message {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  #studentHomeScreen .ticket-state-message .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  #studentHomeScreen .ticket-footer-security,
  #studentHomeScreen .completed-ticket-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  /* A static mobile face avoids a nested, fixed-height scroll container. */
  body.student-portal-active:not(.process-loading-active):not(.offline-modal-active):not(.browser-instruction-active):not(.install-gate-active):not(.modal-open) {
    overflow-y: auto;
    touch-action: pan-y;
  }

  #studentHomeScreen {
    overflow: visible;
    overscroll-behavior-y: auto;
  }

  #studentHomeScreen .ticket-flip-inner {
    display: block;
    height: auto;
    max-height: none;
    min-height: 0;
    transform: none !important;
    transition: none;
  }

  #studentHomeScreen .ticket-face {
    display: none;
    position: relative;
    inset: auto;
    height: auto;
    max-height: none;
    min-height: 0;
    transform: none !important;
    overflow: visible;
  }

  #studentHomeScreen .ticket-front-face {
    display: block;
  }

  #studentHomeScreen .ticket-flip-shell.is-flipped .ticket-front-face {
    display: none;
  }

  #studentHomeScreen .ticket-flip-shell.is-flipped .ticket-back-face {
    display: flex;
  }
}

@media (max-width: 390px) {
  #studentHomeScreen .ticket-premium-head,
  #studentHomeScreen .completed-ticket-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #studentHomeScreen .ticket-premium-head .ticket-status-badge,
  #studentHomeScreen .completed-ticket-badge {
    justify-self: start;
    margin-left: 0;
  }

  #studentHomeScreen .ticket-qr-shell {
    --ticket-qr-size: clamp(116px, 40vw, 132px);
  }

  #studentHomeScreen .ticket-reference-line {
    border-radius: 14px;
  }
}

@media (max-width: 320px) {
  #studentHomeScreen .ticket-premium-head { padding-inline: 13px; }
  #studentHomeScreen .ticket-premium-body { padding-inline: 13px; }
  #studentHomeScreen .premium-schedule-grid { padding-inline: 13px; }
  #studentHomeScreen .premium-live-row,
  #studentHomeScreen .premium-ticket .ticket-state-message { margin-inline: 13px; }
  #studentHomeScreen .ticket-footer-security { padding-inline: 13px; }
}
/* ================== REGISTERED TICKET FLUID LAYOUT V21: END ================== */
