:root {
  --navy-950: #071a2c;
  --navy-900: #0b2239;
  --navy-800: #12324f;
  --navy-700: #1b4468;
  --teal-700: #0a6673;
  --teal-600: #0f7c8a;
  --teal-500: #1697a6;
  --gold-600: #9b7623;
  --gold-500: #c8a24a;
  --gold-100: #f7edd3;
  --ink: #12212e;
  --muted: #5d6b7a;
  --muted-2: #8494a3;
  --line: #e3e9ef;
  --line-strong: #d3dde6;
  --surface: #ffffff;
  --bg: #f4f7fa;
  --bg-2: #eef3f7;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 4px 14px rgba(11, 34, 57, 0.06);
  --shadow: 0 16px 40px rgba(11, 34, 57, 0.1);
  --shadow-lg: 0 30px 70px rgba(7, 26, 44, 0.18);
  --font: "Segoe UI", "Inter", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--gold-100);
  color: var(--navy-900);
}

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--navy-900);
  color: #fff;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid rgba(227, 233, 239, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-950));
  color: var(--gold-500);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(7, 26, 44, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.brand-text strong {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--bg-2);
  color: var(--navy-900);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 560px at 88% -10%, rgba(22, 151, 166, 0.38), transparent 62%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 46%, var(--navy-800) 100%);
  color: #fff;
}

.hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 82%);
  pointer-events: none;
}

.hero::after {
  position: absolute;
  top: -170px;
  right: -140px;
  width: 540px;
  height: 540px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
  padding: 82px 0 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--teal-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: var(--gold-500);
}

.hero h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.hero-lead {
  max-width: 58ch;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
}

.hero-search {
  position: relative;
  max-width: 520px;
  margin-top: 32px;
}

.hero-search .search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 22px;
  height: 22px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-search input {
  width: 100%;
  height: 58px;
  padding: 0 20px 0 52px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  font-size: 1rem;
  box-shadow: 0 20px 45px rgba(7, 26, 44, 0.2);
}

.hero-search input::placeholder {
  color: var(--muted-2);
}

.hero-search input:focus {
  outline: 3px solid rgba(200, 162, 74, 0.55);
  outline-offset: 2px;
}

.search-note {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 38px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stat:last-child {
  padding-right: 0;
  border-right: 0;
}

.hero-stat strong {
  color: #fff;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-stat span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  min-height: 360px;
}

.hero-orbit {
  position: absolute;
  inset: 8% 4% 8% 8%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.hero-orbit::before {
  position: absolute;
  top: 12%;
  left: 12%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 6px rgba(200, 162, 74, 0.18);
  content: "";
}

.float-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 190px;
  height: 112px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--navy-900);
  box-shadow: var(--shadow-lg);
}

.float-card span {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.float-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.float-card::after {
  position: absolute;
  bottom: 16px;
  left: 22px;
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: var(--gold-500);
  content: "";
}

.float-1 {
  top: 8%;
  left: 2%;
  transform: rotate(-6deg);
  animation: floaty 7s ease-in-out infinite;
}

.float-2 {
  top: 38%;
  right: 0;
  background: var(--gold-100);
  transform: rotate(4deg);
  animation: floaty 8s ease-in-out 1.2s infinite;
}

.float-3 {
  bottom: 4%;
  left: 16%;
  transform: rotate(-2deg);
  animation: floaty 9s ease-in-out 0.6s infinite;
}

@keyframes floaty {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: 76px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-note span {
  color: var(--navy-900);
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   Class cards
   -------------------------------------------------------------------------- */

.class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.class-card-slot {
  position: relative;
  height: 100%;
}

.class-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 190px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.class-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal-600), var(--gold-500));
  content: "";
  opacity: 0.9;
}

.class-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.class-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.class-name {
  margin: 0;
  color: var(--navy-900);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.class-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.class-count .icon {
  width: 14px;
  height: 14px;
}

.class-teacher {
  margin: 16px 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.class-teacher.is-muted {
  color: var(--muted-2);
  font-style: italic;
  font-weight: 500;
}

.class-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.class-room {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.class-room .icon {
  width: 15px;
  height: 15px;
  color: var(--teal-600);
}

.card-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--navy-900);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.card-arrow .icon {
  width: 16px;
  height: 16px;
}

.class-card:hover .card-arrow {
  background: var(--navy-900);
  color: #fff;
  transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */

.how-section {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--navy-900);
  color: var(--gold-500);
}

.step-icon .icon {
  width: 22px;
  height: 22px;
}

.step-no {
  position: absolute;
  top: 24px;
  right: 26px;
  color: var(--muted-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.soon-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--gold-600);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.step-card-link {
  display: block;
  color: inherit;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.step-card-link:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.step-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--teal-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.step-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.step-card-link:hover .step-link .icon {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */

.cta-section {
  padding: 0 0 76px;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 44px 46px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(22, 151, 166, 0.35), transparent 62%),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
  box-shadow: var(--shadow);
}

.cta-band h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cta-band p {
  max-width: 52ch;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-950);
  box-shadow: 0 10px 24px rgba(200, 162, 74, 0.25);
}

.btn-gold:hover {
  background: #d6b25c;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Inner page hero
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 36px 0 58px;
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(22, 151, 166, 0.3), transparent 62%),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
}

.page-hero::after {
  position: absolute;
  top: -220px;
  right: -160px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.page-lead {
  max-width: 62ch;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb .icon {
  width: 13px;
  height: 13px;
  opacity: 0.5;
}

.breadcrumb span {
  color: #fff;
  font-weight: 600;
}

.class-page-hero {
  padding-bottom: 64px;
}

.class-hero-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.class-page-hero h1 {
  font-size: clamp(3.4rem, 7vw, 6rem);
  letter-spacing: -0.06em;
}

.class-hero-mark {
  color: rgba(255, 255, 255, 0.07);
  font-size: clamp(7rem, 16vw, 13rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.75;
  pointer-events: none;
  user-select: none;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.meta-pill .icon {
  width: 15px;
  height: 15px;
  color: var(--gold-500);
}

/* --------------------------------------------------------------------------
   Toolbar / search
   -------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.toolbar .search-box {
  width: 100%;
  max-width: 420px;
}

.toolbar-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.toolbar-note span {
  color: var(--navy-900);
  font-weight: 800;
}

.search-box {
  position: relative;
}

.search-box .icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-box input:focus {
  outline: 0;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(22, 151, 166, 0.13);
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.search-box.compact input {
  height: 44px;
}

/* --------------------------------------------------------------------------
   Class page content
   -------------------------------------------------------------------------- */

.class-content {
  padding: 38px 0 80px;
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.panel-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Teacher */

.teacher-panel {
  padding-bottom: 24px;
}

.teacher-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px 0;
}

.teacher-avatar {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-950));
  color: var(--gold-500);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.teacher-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.teacher-role {
  margin: 3px 0 0;
  color: var(--teal-600);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.teacher-subject {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.contact-link:hover {
  color: var(--navy-900);
}

.contact-link .icon {
  width: 14px;
  height: 14px;
  color: var(--teal-600);
}

/* Duty */

.duty-panel {
  padding-bottom: 18px;
}

.duty-list {
  padding: 16px 24px 0;
}

.duty-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.duty-row:last-child {
  border-bottom: 0;
}

.duty-day {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-900);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.duty-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(200, 162, 74, 0.14);
}

.duty-students {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.name-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 600;
}

.muted {
  color: var(--muted-2);
}

/* Students */

.students-panel {
  padding-bottom: 18px;
}

.students-panel .panel-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.student-toolbar {
  padding: 16px 24px 0;
}

.student-toolbar .search-box {
  max-width: 360px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--gold-600);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.student-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 22px;
  margin: 0;
  padding: 10px 24px 0;
  list-style: none;
}

.student-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.student-row:hover {
  background: var(--bg);
}

.student-no {
  width: 28px;
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.student-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.av-0 {
  background: #e4f1f4;
  color: #0a6673;
}

.av-1 {
  background: #f7edd3;
  color: #8a6a1f;
}

.av-2 {
  background: #e8ecf7;
  color: #3c4f8a;
}

.av-3 {
  background: #f6e7e7;
  color: #8a3c3c;
}

.av-4 {
  background: #e8f2e9;
  color: #2f6b3a;
}

.av-5 {
  background: #f0e9f5;
  color: #67408a;
}

.student-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 24px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.privacy-note .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--teal-600);
}

/* Empty state */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state .icon {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  color: var(--muted-2);
}

.empty-state p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.empty-state span {
  margin-top: 4px;
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-top: 54px;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.8fr;
  gap: 40px;
  padding-bottom: 38px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #fff;
}

.footer-brand .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.footer-brand strong {
  display: block;
  font-size: 0.95rem;
}

.footer-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-brand-col p {
  max-width: 46ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  line-height: 1.65;
}

.footer-col h3 {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col a,
.footer-col p {
  display: block;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.footer-col a:hover {
  color: var(--gold-500);
}

.footer-col .icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 4px;
  vertical-align: -3px;
}

.footer-muted {
  color: rgba(255, 255, 255, 0.4) !important;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
}

.footer-bottom p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-hero {
  display: flex;
  min-height: 62vh;
  align-items: center;
}

.error-code {
  margin: 0;
  color: rgba(255, 255, 255, 0.12);
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.85;
}

.error-hero h1 {
  margin: 10px 0 0;
}

.error-hero .btn {
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 64px 0 72px;
  }

  .hero-visual {
    display: none;
  }

  .class-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1180px, calc(100% - 24px));
  }

  .header-inner {
    gap: 8px;
    min-height: 60px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 0.88rem;
  }

  .brand-text strong {
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: normal;
  }

  .brand-text span {
    display: none;
  }

  .site-nav {
    gap: 4px;
  }

  .nav-link {
    padding: 7px 10px;
    font-size: 0.82rem;
    border-radius: 8px;
  }

  .role-pill {
    padding: 5px 9px;
    font-size: 0.74rem;
    gap: 6px;
  }

  .admin-bar-inner {
    padding: 8px 0;
    gap: 8px;
  }

  .admin-bar-status {
    width: 100%;
    justify-content: space-between;
  }

  .admin-bar-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .admin-bar-actions .admin-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    min-height: 38px;
  }

  .hero-grid {
    padding: 44px 0 52px;
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.7rem);
    letter-spacing: -0.035em;
  }

  .hero-lead {
    margin-top: 14px;
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .hero-search {
    margin-top: 24px;
  }

  .hero-search input {
    height: 52px;
    font-size: 0.95rem;
    padding-left: 48px;
    border-radius: 14px;
  }

  .hero-stats {
    gap: 16px;
    margin-top: 28px;
  }

  .hero-stat {
    padding-right: 16px;
  }

  .hero-stat strong {
    font-size: 1.35rem;
  }

  .class-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .class-card {
    min-height: 160px;
    padding: 18px 20px;
    border-radius: 16px;
  }

  .class-name {
    font-size: 1.85rem;
  }

  .class-teacher {
    margin-top: 10px;
    font-size: 0.88rem;
  }

  .class-card-foot {
    padding-top: 14px;
  }

  .step-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .step-card {
    padding: 20px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
  }

  .section-head-right {
    width: 100%;
    justify-content: space-between;
  }

  .section-head-right .panel-edit-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }

  .cta-section {
    padding: 0 0 42px;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 20px;
    border-radius: 18px;
    gap: 18px;
  }

  .cta-band .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Class Page Responsive */
  .class-page-hero {
    padding: 34px 0 38px;
  }

  .class-hero-grid {
    display: block;
  }

  .class-hero-mark {
    display: none;
  }

  .class-page-hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.4rem);
  }

  .class-hero-title-row {
    gap: 10px;
  }

  .hero-rename-btn {
    padding: 6px 12px;
    font-size: 0.74rem;
  }

  .hero-inline-editor {
    width: 100%;
  }

  .hero-inline-editor input {
    flex: 1;
    min-width: 120px;
  }

  .class-page-meta {
    gap: 8px;
    margin-top: 18px;
  }

  .meta-pill {
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .panel {
    border-radius: 16px;
    margin-bottom: 20px;
  }

  .panel-head {
    padding: 18px 20px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .panel-head h2 {
    font-size: 1.12rem;
  }

  .panel-edit-btn {
    padding: 6px 12px;
    font-size: 0.74rem;
  }

  .teacher-profile {
    padding: 20px;
    gap: 14px;
  }

  .teacher-avatar-lg {
    width: 52px;
    height: 52px;
    font-size: 1.05rem;
  }

  .teacher-name {
    font-size: 1.08rem;
  }

  .duty-list {
    padding: 12px 18px 0;
  }

  .duty-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 0;
  }

  .duty-day {
    font-size: 0.82rem;
  }

  .duty-students {
    gap: 5px;
  }

  .name-chip {
    padding: 5px 11px;
    font-size: 0.78rem;
  }

  .student-toolbar {
    padding: 14px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .student-toolbar .search-box {
    max-width: none;
    width: 100%;
  }

  .student-toolbar .search-box input {
    height: 42px;
    font-size: 0.88rem;
  }

  .student-toolbar-meta {
    justify-content: space-between;
    width: 100%;
  }

  .student-list {
    grid-template-columns: 1fr;
    padding: 8px 14px 0;
    gap: 4px;
  }

  .student-row {
    padding: 9px 8px;
    border-radius: 10px;
  }

  .student-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.7rem;
  }

  .student-name {
    font-size: 0.88rem;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
  }

  .privacy-note {
    margin: 14px 16px 0;
    padding-top: 14px;
    font-size: 0.76rem;
  }

  /* QR Page Responsive */
  .qr-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .qr-card {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .qr-card-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .qr-card-actions button {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(1180px, calc(100% - 20px));
  }

  .hero h1 {
    font-size: 1.95rem;
  }

  .hero-stats {
    gap: 14px;
  }

  .hero-stat {
    padding-right: 14px;
  }

  .hero-stat strong {
    font-size: 1.25rem;
  }

  .panel-head,
  .teacher-profile,
  .duty-list,
  .student-toolbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .student-list {
    padding-right: 10px;
    padding-left: 10px;
  }

  .privacy-note {
    margin-right: 14px;
    margin-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   QR codes
   -------------------------------------------------------------------------- */

.qr-hero {
  padding-bottom: 44px;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 24px;
}

.qr-base {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  word-break: break-all;
}

.qr-content {
  padding: 36px 0 80px;
}

.qr-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--gold-500);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
}

.qr-note .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--teal-600);
}

.qr-note p {
  margin: 0;
}

.print-title {
  display: none;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  break-inside: avoid;
}

.qr-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.qr-card-head h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.qr-card-head span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.qr-code {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.qr-code svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-url {
  width: 100%;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
  text-align: center;
  word-break: break-all;
}

.qr-card-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
}

.qr-card-actions button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.qr-card-actions button:hover {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: #fff;
}

.qr-card-actions .icon {
  width: 14px;
  height: 14px;
}

.qr-noscript {
  margin: 20px 0 0;
  color: var(--muted);
}

@media (max-width: 1020px) {
  .qr-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .qr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .qr-grid {
    grid-template-columns: 1fr;
  }

  .qr-card {
    padding: 18px;
  }

  .qr-code {
    max-width: 240px;
  }
}

@page {
  size: A4 portrait;
  margin: 10mm;
}

/* --------------------------------------------------------------------------
   Role Gate & Admin Mode
   -------------------------------------------------------------------------- */

html[data-role] .role-gate:not(.is-open) {
  display: none;
}

body.gate-locked {
  overflow: hidden;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.role-pill:hover {
  border-color: var(--navy-800);
  background: var(--bg-2);
}

.role-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
}

.role-pill.is-director {
  border-color: rgba(200, 162, 74, 0.55);
  background: var(--gold-100);
  color: var(--navy-950);
}

.role-pill.is-director .role-pill-dot {
  background: var(--gold-600);
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.28);
}

.role-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background:
    radial-gradient(960px 540px at 88% 8%, rgba(22, 151, 166, 0.24), transparent 62%),
    radial-gradient(760px 460px at 8% 92%, rgba(200, 162, 74, 0.16), transparent 60%),
    rgba(7, 26, 44, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.role-gate::before {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  pointer-events: none;
}

.role-gate-card {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 32px 84px rgba(3, 12, 22, 0.5);
  animation: gateIn 0.22s ease-out;
}

@keyframes gateIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.role-gate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 26px;
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.role-gate-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.role-gate-brand .brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-950));
  color: var(--gold-500);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.role-gate-brand strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.role-gate-brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.role-close-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--navy-900);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.role-close-btn:hover {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: #fff;
}

.role-close-btn .icon {
  width: 16px;
  height: 16px;
}

.role-gate-body {
  padding: 30px 28px 28px;
}

.role-gate-head {
  text-align: center;
  margin-bottom: 22px;
}

.role-gate-head h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(1.5rem, 2.8vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.role-gate-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.role-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.role-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.role-option:hover {
  transform: translateY(-2px);
  border-color: var(--teal-600);
  background: #f8fcfd;
  box-shadow: var(--shadow-sm);
}

.role-option.is-director {
  border-color: rgba(200, 162, 74, 0.58);
  background: linear-gradient(155deg, #fffdf7 0%, #fcf5e1 100%);
}

.role-option.is-director:hover {
  border-color: var(--gold-600);
  background: linear-gradient(155deg, #fffcf2 0%, #f8eccd 100%);
}

.role-option.is-current {
  box-shadow: inset 0 0 0 1px var(--teal-600);
}

.role-option.is-director.is-current {
  box-shadow: inset 0 0 0 1px var(--gold-600);
}

.role-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 14px;
}

.role-option-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15, 124, 138, 0.12);
  color: var(--teal-700);
}

.role-option.is-director .role-option-icon {
  background: rgba(200, 162, 74, 0.22);
  color: var(--navy-950);
}

.role-option-icon .icon {
  width: 22px;
  height: 22px;
}

.role-active-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal-600);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.role-active-mark.is-gold {
  background: var(--navy-900);
  color: var(--gold-100);
}

.role-active-mark .icon {
  width: 12px;
  height: 12px;
}

.role-option h3 {
  margin: 0 0 5px;
  color: var(--navy-950);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.role-option p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.role-option-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--teal-700);
  font-size: 0.85rem;
  font-weight: 700;
}

.role-option.is-director .role-option-cta {
  color: var(--navy-950);
}

.role-option-cta .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.role-option:hover .role-option-cta .icon {
  transform: translateX(3px);
}

.role-switch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.role-lock-quick {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.role-lock-quick:hover {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: #fff;
}

.role-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--navy-900);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.role-back-btn:hover {
  border-color: var(--navy-900);
  background: var(--bg-2);
}

.role-back-btn .icon {
  width: 15px;
  height: 15px;
  transform: rotate(180deg);
}

.role-pin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto;
}

.role-pin-field {
  position: relative;
  display: flex;
  align-items: center;
}

.role-pin-icon {
  position: absolute;
  left: 15px;
  color: var(--muted);
  pointer-events: none;
  display: grid;
  place-items: center;
}

.role-pin-field input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.role-pin-field input::placeholder {
  letter-spacing: normal;
  font-weight: 500;
  color: var(--muted-2);
}

.role-pin-field input:focus {
  outline: 0;
  border-color: var(--gold-600);
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.25);
}

.role-pin-field input[aria-invalid="true"] {
  border-color: #d94141;
}

.role-pin-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.role-pin-toggle:hover,
.role-pin-toggle.is-active {
  background: var(--bg-2);
  color: var(--navy-900);
}

.role-pin-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fdf2f2;
  border: 1px solid #f5b8b8;
  color: #8f1f1f;
  font-size: 0.83rem;
  font-weight: 700;
  text-align: center;
}

.role-pin-submit {
  width: 100%;
  cursor: pointer;
}

.is-shaking {
  animation: shake 0.32s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

/* Admin Bar */

.admin-bar {
  border-bottom: 1px solid rgba(200, 162, 74, 0.38);
  background: linear-gradient(90deg, var(--navy-950) 0%, var(--navy-800) 60%, #163d5e 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(7, 26, 44, 0.14);
}

.admin-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 0;
}

.admin-bar-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-size: 0.74rem;
  font-weight: 800;
}

.admin-bar-badge .icon {
  width: 13px;
  height: 13px;
}

.admin-bar-note {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
}

.admin-bar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.admin-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.admin-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-btn .icon {
  width: 14px;
  height: 14px;
}

/* Inline Admin Controls */

.meta-pill-action {
  border-color: rgba(200, 162, 74, 0.45);
  background: rgba(200, 162, 74, 0.16);
  color: #f9e8bc;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.meta-pill-action:hover {
  border-color: var(--gold-500);
  background: rgba(200, 162, 74, 0.3);
}

.hero-inline-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-inline-editor input {
  width: 140px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.78rem;
  gap: 6px;
}

.btn-sm .icon {
  width: 14px;
  height: 14px;
}

.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-soft:hover {
  border-color: var(--navy-800);
  background: var(--bg-2);
}

.panel-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--navy-900);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.panel-edit-btn:hover {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: #fff;
}

.panel-edit-btn.is-gold {
  border-color: rgba(200, 162, 74, 0.6);
  background: var(--gold-100);
  color: var(--navy-950);
}

.panel-edit-btn.is-gold:hover {
  border-color: var(--gold-500);
  background: var(--gold-500);
}

.panel-edit-btn.is-done {
  border-color: var(--teal-600);
  background: var(--teal-600);
  color: #fff;
}

.panel-edit-btn .icon {
  width: 13px;
  height: 13px;
}

.inline-edit-form {
  padding: 18px 24px 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input,
.add-student-box input,
.duty-day-input,
.duty-add-input,
.student-inline-edit input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
}

.field input:focus,
.add-student-box input:focus,
.duty-day-input:focus,
.duty-add-input:focus,
.student-inline-edit input:focus {
  outline: 0;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(22, 151, 166, 0.14);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* Duty Editor */

.duty-edit-list {
  padding: 14px 24px 0;
}

.duty-edit-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.duty-edit-row:last-child {
  border-bottom: 0;
}

.duty-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.duty-edit-day-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.duty-day-input {
  max-width: 220px;
  height: 36px;
  font-weight: 700;
}

.name-chip-edit {
  padding-right: 6px;
  gap: 6px;
}

.chip-remove-btn {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 34, 57, 0.08);
  color: var(--muted);
  cursor: pointer;
}

.chip-remove-btn:hover {
  background: #d94141;
  color: #fff;
}

.chip-remove-btn .icon {
  width: 11px;
  height: 11px;
}

.duty-add-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.duty-add-input {
  flex: 1;
  min-width: 0;
  height: 36px;
}

.duty-edit-footer {
  padding: 12px 24px 4px;
}

/* Students Editor */

.students-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.add-student-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 24px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.add-student-box input {
  flex: 1 1 160px;
}

.student-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: #fff;
}

.icon-btn-save:hover {
  border-color: var(--teal-600);
  background: var(--teal-600);
}

.icon-btn-danger:hover {
  border-color: #c93b3b;
  background: #c93b3b;
  color: #fff;
}

.icon-btn .icon {
  width: 14px;
  height: 14px;
}

.student-inline-edit {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.student-inline-edit input {
  flex: 1 1 110px;
  min-width: 0;
  height: 34px;
}

/* Admin Class Management & Rename */

.section-head-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.add-class-panel {
  margin: 0 0 24px;
  padding: 22px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.add-class-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.add-class-head h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 1.08rem;
  font-weight: 800;
}

.add-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.class-card-slot.is-director .class-card-head {
  padding-right: 38px;
}

.class-card-del {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.class-card-del:hover {
  border-color: #c93b3b;
  background: #c93b3b;
  color: #fff;
}

.class-card-del .icon {
  width: 14px;
  height: 14px;
}

.class-hero-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.hero-rename-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid rgba(200, 162, 74, 0.48);
  border-radius: 999px;
  background: rgba(200, 162, 74, 0.16);
  color: #f9e8bc;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-rename-btn:hover {
  border-color: var(--gold-500);
  background: rgba(200, 162, 74, 0.3);
}

.hero-rename-btn .icon {
  width: 14px;
  height: 14px;
}

/* Toasts */

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: var(--navy-900);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn 0.2s ease-out;
}

.toast-error {
  background: #8a2424;
  border-color: rgba(255, 180, 180, 0.35);
}

.toast-action {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .role-gate {
    padding: 12px;
  }

  .role-gate-top {
    padding: 16px 18px;
  }

  .role-gate-body {
    padding: 22px 18px;
  }

  .role-options,
  .field-grid,
  .add-class-grid {
    grid-template-columns: 1fr;
  }

  .role-pill {
    padding: 6px 10px;
    font-size: 0.76rem;
  }

  .inline-edit-form,
  .duty-edit-list,
  .duty-edit-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .add-student-box {
    margin-left: 18px;
    margin-right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .role-gate-card,
  .toast,
  .is-shaking {
    animation: none !important;
  }

  .role-option,
  .role-option-cta .icon,
  .toast.is-leaving {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .hero-search,
  .search-note,
  .student-toolbar,
  .privacy-note,
  .card-arrow,
  .cta-section,
  .how-section,
  .skip-link,
  .role-gate,
  .role-pill,
  .admin-bar,
  .panel-edit-btn,
  .meta-pill-action,
  .student-actions,
  .add-student-box,
  .hero-inline-editor,
  .inline-edit-form,
  .toast-container {
    display: none !important;
  }

  .hero,
  .page-hero {
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }

  .hero::before,
  .hero::after,
  .page-hero::after {
    display: none !important;
  }

  .container {
    width: 100%;
  }

  .panel,
  .class-card {
    border: 1px solid #ddd;
    box-shadow: none;
    break-inside: avoid;
  }

  .student-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .class-page-hero h1 {
    font-size: 2.5rem;
  }

  .meta-pill {
    border-color: #ddd;
    color: #000;
  }

  .meta-pill .icon {
    color: #000;
  }

  .qr-hero,
  .qr-note,
  .no-print,
  .qr-card-actions,
  .qr-noscript,
  .qr-base {
    display: none !important;
  }

  .qr-content {
    padding: 0;
  }

  .print-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4mm;
    padding-bottom: 2mm;
    border-bottom: 1px solid #ddd;
  }

  .print-title strong {
    font-size: 12pt;
  }

  .print-title span {
    color: #555;
    font-size: 9pt;
  }

  .qr-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5mm;
  }

  .qr-card {
    display: flex;
    width: 48%;
    height: 83mm;
    padding: 4mm;
    border: 1px dashed #aaa;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .qr-card:nth-child(6n) {
    break-after: page;
    page-break-after: always;
  }

  .qr-card-head {
    margin-bottom: 2mm;
  }

  .qr-card-head h2 {
    font-size: 18pt;
  }

  .qr-card-head span {
    color: #444;
    font-size: 9pt;
  }

  .qr-code {
    width: 56mm;
    height: 56mm;
    max-width: none;
    aspect-ratio: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .qr-url {
    margin-top: 2mm;
    color: #444;
    font-size: 6pt;
    line-height: 1.25;
  }
}
