:root {
  --navy: #12305f;
  --navy-2: #1d4a8f;
  --ink: #1d2433;
  --muted: #5d6779;
  --line: #dfe4ec;
  --bg: #f3f6fa;
  --card: #ffffff;
  --green: #16a34a;
  --green-dark: #11803a;
  --amber: #b7791f;
  --amber-bg: #fdf6e7;
  --red: #c53030;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

a { color: var(--navy-2); }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 24px;
  background: #fff;
  border-bottom: 3px solid var(--navy);
  color: var(--navy);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 80px; width: auto; display: block; }
.brand-text { font-size: 19px; font-weight: 700; color: var(--navy); padding-left: 12px; border-left: 2px solid var(--line); }
.topnav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.topnav a { color: var(--navy); text-decoration: none; opacity: .9; }
.topnav a:hover { opacity: 1; text-decoration: underline; }
.greeting { color: var(--muted); }
.logout { border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}
.admin { max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; }

.page-head h1 { margin: 0 0 4px; font-size: 26px; color: var(--navy); }
.page-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.date-line { margin: 0 0 20px; color: var(--muted); }
.section-title { margin: 28px 0 12px; font-size: 18px; color: var(--navy); }

/* ---------- Lesson cards ---------- */
.lesson-card, .empty-card, .side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 32, 64, .04);
}
.lesson-card.status-open { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.lesson-card.status-finished { opacity: .75; }
.lesson-card.upcoming { padding: 14px 20px; }

.lesson-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lesson-head h2, .lesson-head h3 { margin: 0; font-size: 20px; }
.lesson-head h3 { font-size: 16px; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-waiting { background: var(--amber-bg); color: var(--amber); }
.pill-open { background: #e7f7ed; color: var(--green-dark); }
.pill-finished { background: #eef1f5; color: var(--muted); }

.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 14px 0 18px; }
.lesson-meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lesson-meta dd { margin: 2px 0 0; font-weight: 600; }

.upcoming-line { margin: 6px 0 0; color: var(--muted); }

.join-btn {
  display: inline-block;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  background: #e4e8ef;
  color: var(--muted);
  cursor: not-allowed;
}
.join-btn.live {
  background: var(--green);
  color: #fff;
  cursor: pointer;
  animation: pulse 1.8s ease-out infinite;
}
.join-btn.live:hover { background: var(--green-dark); }
.countdown { font-variant-numeric: tabular-nums; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,.55); }
  70%  { box-shadow: 0 0 0 16px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
@media (prefers-reduced-motion: reduce) { .join-btn.live { animation: none; } }

.notice { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--amber-bg); color: #7a5212; }
.finished { margin: 0; color: var(--muted); font-weight: 600; }

.roster { margin-top: 14px; font-size: 14px; color: var(--muted); }
.roster summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.roster p { margin: 6px 0 0; }

.toby-card { display: flex; align-items: center; gap: 22px; }
.toby-card .toby { width: 120px; height: auto; flex-shrink: 0; }
.toby-hello { border-color: #f6b26b; background: #fffaf3; }
.toby-hello .toby { mix-blend-mode: multiply; }
.gate-toby { width: 150px; height: auto; margin-bottom: 6px; }
.empty-card h2 { margin: 0 0 6px; font-size: 19px; }
.empty-card p { margin: 0; color: var(--muted); }

/* ---------- Sidebar ---------- */
.side-col { position: sticky; top: 20px; align-self: start; }
.side-card h2 { margin: 0 0 6px; font-size: 16px; color: var(--navy); }
.side-note { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.side-link {
  display: block;
  padding: 11px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--navy);
}
.side-link::after { content: " ↗"; color: var(--muted); font-weight: 400; }
.side-link:hover { border-color: var(--navy-2); background: #f5f8fd; }
.tips { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.tips li { margin-bottom: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--navy);
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--navy-2); }
.btn-outline { background: #fff; color: var(--navy); }
.btn-outline:hover { background: #f5f8fd; }
.btn-small { padding: 6px 12px; font-size: 14px; }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #fdf0f0; }

/* ---------- Gate ---------- */
.gate { display: grid; place-items: center; min-height: 70vh; padding: 24px 16px; }
.gate-card {
  max-width: 460px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.gate-card h1 { margin: 0 0 10px; font-size: 22px; color: var(--navy); }
.gate-card p { color: var(--muted); }
.gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Admin ---------- */
.flash { padding: 12px 14px; border-radius: 10px; background: #e7f7ed; color: var(--green-dark); }
.errors { padding: 12px 16px; border-radius: 10px; background: #fdf0f0; color: var(--red); margin-bottom: 16px; }
.errors p { margin: 4px 0; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.inactive td { color: var(--muted); }
.ok { color: var(--green-dark); font-weight: 600; }
.warn { color: var(--amber); font-weight: 600; }

.manager-list { list-style: none; margin: 0 0 14px; padding: 0; }
.manager-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.manager-list form { margin: 0; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }

.class-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid label, .form-grid fieldset { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.span-2 { grid-column: span 2; }
.form-grid small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=url], input[type=time], input[type=date], input[type=number], input[type=search], select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-weight: 400;
  background: #fff;
}
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.day-picks { display: flex; gap: 8px; flex-wrap: wrap; }
.day-pick input { position: absolute; opacity: 0; }
.day-pick span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-weight: 600;
}
.day-pick input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.day-pick input:focus-visible + span { outline: 2px solid var(--navy-2); outline-offset: 2px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }

.student-picker { margin-top: 22px; }
.pick-count { margin-left: 8px; font-weight: 400; color: var(--muted); }
.student-picker input[type=search] { width: 100%; margin-bottom: 10px; }
.student-list {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.student-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.student-row:last-child { border-bottom: 0; }
.student-row small { margin-left: auto; color: var(--muted); text-transform: uppercase; font-size: 11px; }
.student-row input:disabled + span { color: #a3abb8; }

.form-actions { margin-top: 20px; }
.danger-zone { margin-top: 18px; text-align: right; }
.managers { margin-top: 8px; max-width: 560px; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; padding: 20px 16px 40px; }
  .admin { padding: 20px 16px 40px; }
  .side-col { position: static; }
  .topbar { padding: 12px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .join-btn { font-size: 17px; }
  .toby-card .toby { width: 84px; }
  .brand-logo { height: 56px; }
  .brand-text { font-size: 16px; }
}

/* ---------- v2: navigation ---------- */
.topnav a.active { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.wide { max-width: 1560px; margin: 0 auto; padding: 24px 24px 48px; }
.month-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 13px; }
.legend .chip { display: inline-block; }
.legend-note { color: var(--muted); }

/* ---------- Group colours ---------- */
.g0 { --gc: #0f766e; --gb: #ccfbf1; }
.g1 { --gc: #5b21b6; --gb: #ede9fe; }
.g2 { --gc: #9a3412; --gb: #ffedd5; }
.g3 { --gc: #9d174d; --gb: #fce7f3; }
.g4 { --gc: #1e40af; --gb: #dbeafe; }
.g5 { --gc: #3f6212; --gb: #ecfccb; }
.g6 { --gc: #92400e; --gb: #fef3c7; }
.g7 { --gc: #155e75; --gb: #cffafe; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--gc, var(--navy)); margin-right: 8px; vertical-align: 1px; }

/* ---------- Calendar ---------- */
.room-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.room-cal { padding: 14px; margin: 0; }
.room-cal h2 { margin: 0 0 10px; font-size: 17px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-head { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-bottom: 2px; }
.cal-cell { min-height: 74px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: #fff; overflow: hidden; }
.cal-blank { border: 0; background: transparent; }
.cal-past { background: #f8fafc; }
.cal-past .chip { opacity: .6; }
.cal-today { border: 2px solid var(--navy-2); }
.cal-day { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 2px 2px; }
.cal-today .cal-day { color: var(--navy-2); }
.cal-holiday { display: block; font-size: 11px; font-weight: 700; color: var(--red); margin-bottom: 2px; }
.cal-more { margin: 10px 0 0; text-align: right; font-size: 14px; }

.chip {
  display: block;
  margin: 2px 0;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  background: var(--gb, #eef1f5);
  color: var(--gc, var(--ink));
}
a.chip:hover { filter: brightness(.95); outline: 1px solid var(--gc, var(--navy)); }
.chip-inline { display: inline-block; margin-right: 4px; }
.chip-flag { box-shadow: inset 3px 0 0 #f59e0b; }
.chip-ghost { background: #f1f5f9; color: var(--muted); text-decoration: line-through; font-weight: 400; }
.chip-cancel { background: #fde8e8; color: #b42318; border: 1px solid #f04438; }

.pulse { animation: redpulse 1.5s ease-in-out infinite; }
@keyframes redpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 68, 56, .55); }
  50%      { box-shadow: 0 0 0 5px rgba(240, 68, 56, 0); }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* ---------- Notices ---------- */
.notice-list { display: grid; gap: 8px; margin-bottom: 16px; }
.notice-red { margin: 0 0 10px; padding: 12px 14px; border-radius: 10px; background: #fde8e8; color: #b42318; border: 1px solid #f04438; }
.notice-list .notice-red { margin: 0; }
.lesson-card .notice { margin-bottom: 12px; }
.manage-link { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; }

.week-list { padding: 8px 18px; }
.week-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.week-row:last-child { border-bottom: 0; }
.week-row.is-off { color: var(--muted); text-decoration: line-through; }
.week-when { font-weight: 700; min-width: 190px; }
.week-note { flex-basis: 100%; padding-left: 21px; font-size: 13px; color: var(--red); text-decoration: none; }

/* ---------- Admin forms ---------- */
.class-form + .class-form, .class-form + section, section + .class-form { margin-top: 18px; }
.form-title { margin: 0 0 12px; font-size: 18px; color: var(--navy); }
.class-form h3 { margin: 18px 0 8px; font-size: 15px; }
.slots { margin-top: 20px; }
.slot-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.slot-row select { min-width: 90px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; }
label.inline input { width: 80px; }
.member-list { margin-bottom: 8px; }
.member-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member-name { font-weight: 600; }
.stack-form { display: grid; gap: 8px; margin-bottom: 10px; }
.change-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.change-grid .class-form { margin: 0; }
.room-row { display: grid; grid-template-columns: 140px 1fr 1.4fr; gap: 8px; margin-bottom: 8px; }
.room-row input { width: 100%; }
input[type=email] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.attendance { display: flex; flex-wrap: wrap; gap: 8px; }
.att { padding: 6px 10px; border-radius: 8px; background: #eef1f5; font-size: 14px; }
.att-yes { background: #e7f7ed; color: var(--green-dark); }
.att-no { background: #fde8e8; color: #b42318; }

@media (max-width: 1100px) {
  .room-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .wide { padding: 16px 12px 40px; }
  .change-grid { grid-template-columns: 1fr; }
  .room-row { grid-template-columns: 1fr; }
  .cal-cell { min-height: 54px; }
  .chip { font-size: 10px; padding: 1px 3px; }
}

/* ---------- v3: access, rooms, activity log ---------- */
.room-row { grid-template-columns: 120px 1fr 1fr 1.3fr; }
.room-row input[type=password] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; width: 100%; }
.room-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.room-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.room-card { display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.room-card form { margin: 0; }
.pw { font-size: 15px; padding: 6px 10px; background: #fffaf3; border: 1px dashed #f6b26b; border-radius: 8px; word-break: break-all; }
.log-filters { margin-bottom: 16px; }
.log-table td { white-space: normal; vertical-align: top; }
.log-table td:first-child { white-space: nowrap; }
.log-details { min-width: 320px; }
@media (max-width: 860px) {
  .room-cards { grid-template-columns: 1fr; }
  .room-head { display: none; }
}

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; }

/* =====================================================================
   v5: same look as the kids site (kids.brandenglish.edu.vn)
   Fonts Baloo 2 + Nunito, navy/lime palette, rounded cards, pill buttons.
   ===================================================================== */
:root {
  --navy: #1d3d9a;
  --navy-2: #2f5fd0;
  --navy-dark: #142b6e;
  --lime: #8cc63f;
  --lime-dark: #5f9a1c;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #dbe4f3;
  --bg: #f2f8ff;
  --green: #8cc63f;
  --green-dark: #5f9a1c;
  --radius: 22px;
}
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 210, 63, .25) 0 120px, transparent 121px),
    radial-gradient(circle at 92% 30%, rgba(31, 181, 173, .18) 0 160px, transparent 161px),
    radial-gradient(circle at 20% 95%, rgba(240, 98, 146, .15) 0 140px, transparent 141px),
    #f2f8ff;
  background-attachment: fixed;
}
h1, h2, h3, .brand-text, .form-title, .section-title, .join-btn, .btn, .pill, .topnav a {
  font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif;
}
h1, h2, h3 { font-weight: 800; color: var(--navy); }

/* top bar */
.topbar {
  background: #fff; border-bottom: 3px solid var(--lime); padding: 8px 20px;
  position: sticky; top: 0; z-index: 10;
}
.brand-logo { height: 56px; }
.brand-text { font-weight: 800; font-size: 20px; color: var(--navy); border-left-color: var(--line); }
.topnav { gap: 18px; }
.topnav a { color: var(--navy); font-weight: 700; font-size: 17px; text-decoration: none; opacity: 1; }
.topnav a.active { text-decoration: none; box-shadow: inset 0 -3px 0 var(--lime); }
.greeting { color: var(--muted); font-weight: 600; }
.logout { border: 0; border-radius: 999px; background: #eef2fb; padding: 8px 16px; color: var(--navy); }

/* hero banner */
.hero-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 24px 0; }
.hero {
  display: grid; grid-template-columns: 1fr 170px; align-items: end; gap: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff;
  border-radius: 26px; padding: 22px 26px 0; overflow: hidden;
}
.hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.hero h1 { color: #fff; margin: 0; font-size: 2rem; line-height: 1.15; }
.hero-bubble {
  position: relative; background: #fff; color: var(--navy); font-family: 'Baloo 2', sans-serif;
  font-weight: 800; font-size: 1.1rem; line-height: 1.3; padding: 12px 18px; border-radius: 18px; max-width: 420px;
}
.hero-bubble::before {
  content: ""; position: absolute; left: -9px; top: 50%; transform: translateY(-50%);
  border: 9px solid transparent; border-right-color: #fff; border-left: 0;
}
.hero-date { margin: 10px 0 14px; opacity: .9; font-weight: 600; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-stat { background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 6px 14px; font-weight: 800; font-family: 'Baloo 2', sans-serif; }
.hero-stat-red { background: #e53935; }
.hero-toby {
  width: 170px; height: 190px; border-radius: 85px 85px 0 0; background: #fff;
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.hero-toby img { height: 180px; width: auto; display: block; }
.layout { padding-top: 22px; }

/* cards */
.lesson-card, .empty-card, .side-card, .class-form, .table-wrap, .gate-card {
  border-radius: var(--radius); border: 3px solid transparent; box-shadow: 0 5px 0 var(--line);
}
.lesson-card { border-color: var(--line); }
.lesson-card.status-open { border-color: var(--lime); box-shadow: 0 5px 0 var(--lime-dark); }
.lesson-card.status-off { border-color: #f4b4b4; }
.lesson-head h2 { font-size: 1.45rem; }
.lesson-meta dt { font-family: 'Nunito', sans-serif; font-weight: 700; }
.toby-card .toby { mix-blend-mode: multiply; }
.pill { font-size: 13px; padding: 4px 12px; }
.pill-open { background: #eaf6dc; color: var(--lime-dark); }

/* buttons */
.join-btn {
  border-radius: 999px; min-height: 58px; font-size: 1.25rem; font-weight: 800;
  background: #eef2fb; color: var(--muted);
}
.join-btn.live { background: var(--lime); color: #fff; box-shadow: 0 4px 0 var(--lime-dark); animation: kidspulse 1.8s ease-out infinite; }
.join-btn.live:hover { background: #7fb735; }
.join-btn.live:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lime-dark); }
@keyframes kidspulse {
  0%   { box-shadow: 0 4px 0 var(--lime-dark), 0 0 0 0 rgba(140, 198, 63, .6); }
  70%  { box-shadow: 0 4px 0 var(--lime-dark), 0 0 0 16px rgba(140, 198, 63, 0); }
  100% { box-shadow: 0 4px 0 var(--lime-dark), 0 0 0 0 rgba(140, 198, 63, 0); }
}
@media (prefers-reduced-motion: reduce) { .join-btn.live { animation: none; } }
.btn {
  border-radius: 999px; border: 0; background: var(--navy); color: #fff; font-weight: 800;
  box-shadow: 0 4px 0 var(--navy-dark); padding: 10px 22px;
}
.btn:hover { background: var(--navy-2); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy-dark); }
.btn-outline { background: #fff; color: var(--navy); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.btn-outline:hover { background: #f5f8fd; }
.btn-danger { background: #fff; color: #c0352b; border: 2px solid #f4b4b4; box-shadow: 0 4px 0 #f4b4b4; }
.btn-small { padding: 6px 14px; font-size: 15px; }
.side-link { border: 3px solid var(--line); border-radius: 18px; color: var(--navy); font-family: 'Baloo 2', sans-serif; font-weight: 700; }
.side-link:hover { border-color: var(--lime); background: #fff; }

/* notices: same as the kids "Late!" banner */
.notice-red {
  background: #fde7e7; border: 2px solid #f4b4b4; color: #b3261e; border-radius: 18px;
  font-weight: 700; padding: 12px 16px;
}
.notice-red::before { content: "\23F0  "; }
.notice { border-radius: 18px; }

/* forms */
input[type=text], input[type=url], input[type=time], input[type=date], input[type=number],
input[type=search], input[type=email], input[type=password], select {
  border: 2px solid var(--line); border-radius: 14px; font-family: 'Nunito', sans-serif;
}
input:focus, select:focus { outline: none; border-color: var(--lime); }
.flash { border-radius: 18px; background: #eaf6dc; color: var(--lime-dark); font-weight: 700; }
.errors { border-radius: 18px; }

/* calendar */
.cal-cell { border-radius: 12px; border-width: 2px; }
.cal-today { border-color: var(--lime); border-width: 3px; }
.cal-today .cal-day { color: var(--lime-dark); }

@media (max-width: 860px) {
  .hero-wrap { padding: 16px 16px 0; }
}
@media (max-width: 560px) {
  .hero { grid-template-columns: 1fr 110px; padding: 18px 16px 0; }
  .hero h1 { font-size: 1.45rem; }
  .hero-bubble { font-size: 1rem; }
  .hero-bubble::before { display: none; }
  .hero-toby { width: 110px; height: 130px; }
  .hero-toby img { height: 122px; }
  .brand-logo { height: 44px; }
}

/* import from the Vocabulary site */
.import-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.import-grid .class-form { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.import-grid .btn { align-self: flex-start; }
.import-names { margin: 0; font-size: 15px; color: var(--muted); }

/* bilingual "How it works" */
.tips .vi { display: block; margin-top: 4px; color: #4b5563; font-style: italic; }
.vi-title { color: var(--muted); font-weight: 600; font-size: .85em; }
.tips li { margin-bottom: 12px; }
