:root {
  color-scheme: light;
  --ink: #202235;
  --muted: #6d6f85;
  --paper: #fff8df;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(32, 34, 53, 0.13);
  --blue: #3d6cf5;
  --pink: #ff5f9e;
  --sun: #ffd166;
  --mint: #60d394;
  --orange: #ff9f1c;
  --red: #ef476f;
  --shadow: 0 26px 70px rgba(54, 42, 110, 0.18);
  --page-background: linear-gradient(135deg, #f8fbff 0%, #fff8ea 50%, #f6fff9 100%);
  --header-top-gap: 14px;
  --header-height: 72px;
  --header-page-gap: 18px;
  --sticky-panel-top: calc(var(--header-top-gap) + 92px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
  background: var(--page-background);
  background-attachment: fixed;
  background-size: 100vw 100vh;
}

body::before {
  content: '';
  position: fixed;
  z-index: 70;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-top-gap) + var(--header-height) + var(--header-page-gap));
  pointer-events: none;
  background: var(--page-background);
  background-attachment: fixed;
  background-size: 100vw 100vh;
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0,
    #000 calc(var(--header-top-gap) + var(--header-height) + (var(--header-page-gap) * 0.25)),
    transparent calc(var(--header-top-gap) + var(--header-height) + (var(--header-page-gap) * 0.75))
  );
  mask-image: linear-gradient(
    180deg,
    #000 0,
    #000 calc(var(--header-top-gap) + var(--header-height) + (var(--header-page-gap) * 0.25)),
    transparent calc(var(--header-top-gap) + var(--header-height) + (var(--header-page-gap) * 0.75))
  );
}

button,
input,
select,
textarea {
  font: inherit;
}

code,
pre,
textarea {
  font-family: 'Cascadia Mono', Consolas, monospace;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1680px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--header-top-gap) 0 7px;
}

.site-header {
  position: sticky;
  z-index: 80;
  top: var(--header-top-gap);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 45px rgba(32, 34, 53, 0.11);
  backdrop-filter: blur(16px);
}

.brand,
.site-nav,
.auth-actions,
.hero-cta,
.hero-secondary-cta,
.about-current-action,
.site-footer a {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #202235;
  color: #fff;
  font-size: 0.86rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  grid-column: 2;
}

.site-nav a,
.auth-actions a {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
}

.site-nav a:hover,
.auth-actions a:hover,
.site-nav a.is-active,
.auth-actions a.is-active {
  background: rgba(61, 108, 245, 0.1);
  color: var(--ink);
}

.auth-actions {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(32, 34, 53, 0.04);
}

.header-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.locale-field {
  display: inline-grid;
  grid-template-columns: auto minmax(124px, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.locale-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.locale-picker {
  position: relative;
  min-width: 138px;
}

.locale-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow: inset 0 0 0 1px rgba(32, 34, 53, 0.12);
}

.locale-trigger::after {
  content: '';
  justify-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.locale-trigger span {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.locale-picker.open .locale-trigger {
  box-shadow: inset 0 0 0 1px rgba(61, 108, 245, 0.45), 0 0 0 5px rgba(61, 108, 245, 0.12);
}

.locale-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(32, 34, 53, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(32, 34, 53, 0.18);
}

.locale-picker.open .locale-menu {
  display: grid;
}

.locale-menu button {
  display: grid;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: left;
}

.locale-menu button:hover,
.locale-menu button[aria-selected="true"] {
  background: rgba(61, 108, 245, 0.12);
  color: var(--blue);
}

.auth-actions a:last-child {
  background: #202235;
  color: #fff;
}

.auth-actions a:last-child.is-active {
  background: var(--blue);
}

.landing-page {
  display: grid;
  gap: 16px;
  align-content: start;
  margin-top: 18px;
}

.page-router {
  flex: 1 1 auto;
  margin-top: var(--header-page-gap);
}

.app-page {
  animation: rise-in 260ms ease both;
}

.app-page[hidden] {
  display: none !important;
}

.app-page.is-active {
  display: grid;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
  animation: rise-in 520ms ease both;
}

.landing-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  min-height: auto;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.72)),
    var(--card);
}

.hero-copy {
  padding: 8px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 6vw, 6.5rem);
  line-height: 0.93;
  letter-spacing: -0.075em;
}

.landing-hero h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 6vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 710px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.48;
}

.hero-cta {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-width: 170px;
  margin-top: 28px;
  padding: 0 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.hero-actions .hero-cta {
  margin-top: 0;
}

.hero-secondary-cta {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-width: 156px;
}

.about-hero {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
}

.about-hero-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.about-proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin-top: 22px;
}

.about-proof-strip span {
  display: grid;
  align-items: center;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.25;
}

.about-current-setup {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.about-current-setup.has-current-setup {
  border-color: rgba(61, 108, 245, 0.28);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.92));
}

.about-current-setup .eyebrow {
  margin-bottom: 0;
}

.about-current-setup strong {
  overflow-wrap: anywhere;
  font-size: 1.02rem;
  line-height: 1.25;
}

.about-current-setup span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.about-current-action {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  min-height: 42px;
  padding: 0 16px;
}

.timetable-preview {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(61, 108, 245, 0.22);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 62px rgba(32, 34, 53, 0.14);
}

.preview-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.preview-top strong {
  font-size: 1.1rem;
}

.preview-top span,
.preview-grid small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.preview-grid {
  display: grid;
  grid-template-columns: 58px repeat(3, minmax(68px, 1fr));
  gap: 7px;
  align-items: stretch;
}

.preview-grid strong,
.preview-grid b,
.preview-grid small {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 12px;
}

.preview-grid strong {
  background: rgba(32, 34, 53, 0.06);
  font-size: 0.82rem;
}

.preview-grid b {
  background: rgba(96, 211, 148, 0.17);
  color: #1f6841;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.landing-section {
  display: grid;
  gap: 22px;
  align-content: center;
  padding: 38px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 52px rgba(32, 34, 53, 0.08);
}

.about-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
}

.about-details-grid .landing-section {
  padding: 22px;
}

.about-details-grid .section-heading h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.5rem);
}

.about-details-grid .audience-grid {
  grid-template-columns: 1fr;
}

.overview-section {
  align-content: start;
}

.about-workflow-section,
.about-reliability-section {
  align-content: start;
}

.overview-grid {
  display: grid;
  gap: 18px;
}

.about-workflow-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.about-workflow-card,
.about-capability-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(32, 34, 53, 0.07);
}

.about-workflow-card {
  grid-column: span 2;
  min-height: 260px;
  padding: 20px;
}

.about-workflow-card:nth-child(-n + 2) {
  grid-column: span 3;
}

.about-card-index,
.about-capability-card span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.about-workflow-card h3,
.about-capability-card h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.about-workflow-card p,
.about-capability-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.about-workflow-card ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.about-workflow-card li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.35;
}

.about-workflow-card li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
}

.about-workflow-card-grid li::before,
.about-workflow-card-output li::before {
  background: var(--blue);
}

.about-workflow-card-rules li::before {
  background: var(--orange);
}

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

.about-capability-card {
  min-height: 190px;
  padding: 20px;
}

.feature-showcase-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 24px;
  align-items: stretch;
  min-height: 330px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.9)),
    #fff;
  box-shadow: 0 18px 48px rgba(32, 34, 53, 0.08);
}

.feature-showcase-copy {
  display: grid;
  gap: 14px;
  align-content: center;
}

.feature-showcase-copy span {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.feature-showcase-copy h3 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.feature-showcase-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.5;
}

.feature-showcase-copy ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.feature-showcase-copy li {
  position: relative;
  padding-left: 20px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.36;
}

.feature-showcase-copy li::before {
  content: "";
  position: absolute;
  top: 0.54em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.feature-visual {
  align-self: stretch;
  min-height: 250px;
  padding: 18px;
  border: 1px solid rgba(61, 108, 245, 0.16);
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 36px rgba(61, 108, 245, 0.1);
}

.setup-visual,
.teacher-visual,
.grid-visual {
  display: grid;
  gap: 12px;
  align-content: center;
}

.setup-visual div,
.teacher-visual div,
.grid-visual div,
.class-visual div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-radius: 14px;
  background: rgba(32, 34, 53, 0.045);
}

.setup-visual strong,
.setup-visual small,
.teacher-visual strong,
.teacher-visual span,
.grid-visual span,
.grid-visual strong,
.class-visual strong,
.class-visual span,
.class-visual b {
  font-size: 0.84rem;
}

.setup-visual small,
.teacher-visual span,
.grid-visual strong,
.class-visual b {
  color: var(--blue);
  font-weight: 900;
}

.excel-visual,
.export-visual {
  display: grid;
  gap: 12px;
  align-content: center;
}

.excel-visual div,
.export-visual div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(32, 34, 53, 0.045);
}

.excel-visual span,
.export-visual span {
  height: 10px;
  border-radius: 999px;
  background: rgba(32, 34, 53, 0.14);
}

.excel-visual span:nth-child(2),
.export-visual span:nth-child(2) {
  width: 78%;
}

.excel-visual span:nth-child(3),
.export-visual span:nth-child(3) {
  width: 58%;
}

.excel-visual strong,
.export-visual strong {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 13px;
  background: rgba(61, 108, 245, 0.1);
  color: var(--blue);
  font-size: 0.82rem;
}

.grid-visual b {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
}

.grid-visual div:nth-child(2) b {
  background: var(--sun);
}

.grid-visual div:nth-child(3) b {
  background: var(--blue);
}

.class-visual {
  display: grid;
  gap: 12px;
  align-content: center;
}

.class-visual > strong {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: 16px;
  background: rgba(61, 108, 245, 0.1);
  color: var(--blue);
  font-size: 1.1rem;
}

.constraint-visual {
  display: grid;
  gap: 12px;
  align-content: center;
}

.constraint-visual span {
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(61, 108, 245, 0.1);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.constraint-visual span:nth-child(2) {
  justify-self: end;
  background: rgba(255, 196, 87, 0.22);
  color: #805200;
}

.constraint-visual span:nth-child(3) {
  background: rgba(96, 211, 148, 0.18);
  color: #1f6841;
}

.constraint-visual div {
  height: 12px;
  border-radius: 999px;
  background: rgba(32, 34, 53, 0.07);
}

.constraint-visual b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.constraint-visual div:nth-of-type(1) b {
  width: 78%;
}

.constraint-visual div:nth-of-type(2) b {
  width: 54%;
}

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

.generate-visual div {
  min-height: 62px;
  border-radius: 12px;
  background: rgba(96, 211, 148, 0.17);
}

.generate-visual div:nth-child(2n) {
  background: rgba(61, 108, 245, 0.11);
}

.generate-visual div:nth-child(5) {
  background: rgba(255, 196, 87, 0.28);
}

.section-heading {
  max-width: 780px;
}

.section-heading > p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.section-heading h2,
.builder-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: 0;
}

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

.landing-card,
.feature-list article,
.steps-flow article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.landing-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 20px;
}

.landing-card span {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.landing-card h3,
.feature-list h3 {
  margin: 0;
  font-size: 1.15rem;
}

.landing-card p,
.feature-list p,
.site-footer p,
.builder-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-list article {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 20px;
}

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

.steps-flow article {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 18px;
}

.steps-flow span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--sun);
  color: #49350a;
  font-weight: 900;
}

.guide-section {
  align-content: start;
}

.guide-use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-use-case-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 420px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(32, 34, 53, 0.07);
}

.guide-use-case-card > span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.guide-use-case-card h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.guide-use-case-card p,
.guide-use-case-card > small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.guide-use-case-card p {
  font-size: 0.96rem;
}

.guide-use-case-card ol {
  display: grid;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-use-case-card li {
  position: relative;
  min-height: 30px;
  padding-left: 38px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.36;
  counter-increment: guide-step;
}

.guide-use-case-card li::before {
  content: counter(guide-step);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 209, 102, 0.58);
  color: #49350a;
  font-size: 0.78rem;
  font-weight: 900;
}

.guide-use-case-card > small {
  align-self: end;
  padding-top: 10px;
  border-top: 1px solid rgba(32, 34, 53, 0.1);
  font-size: 0.86rem;
}

.guide-use-case-subjectWindow li::before,
.guide-use-case-doubleLessons li::before {
  background: rgba(61, 108, 245, 0.12);
  color: var(--blue);
}

.guide-use-case-teacherLimits li::before,
.guide-use-case-reviewFix li::before {
  background: rgba(96, 211, 148, 0.2);
  color: #1f6841;
}

.guide-use-case-classLoad li::before {
  background: rgba(255, 95, 158, 0.13);
  color: #a12b5e;
}

.guide-live-visual {
  position: relative;
  display: grid;
  gap: 9px;
  overflow: hidden;
  min-height: 188px;
  padding: 12px;
  border: 1px solid rgba(32, 34, 53, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 250, 237, 0.92)),
    #fff;
}

.guide-live-top {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(24px, 1fr) minmax(16px, 0.45fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.guide-live-top strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-live-top span {
  height: 8px;
  border-radius: 999px;
  background: rgba(32, 34, 53, 0.1);
}

.guide-live-top span:last-child {
  background: rgba(61, 108, 245, 0.16);
}

.guide-live-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.guide-live-toolbar span,
.guide-live-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid rgba(32, 34, 53, 0.1);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.guide-live-action {
  background: rgba(61, 108, 245, 0.1);
  color: var(--blue);
}

.guide-live-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.guide-live-fields > span {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(32, 34, 53, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.guide-live-fields em,
.guide-live-timeline em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-live-fields strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-live-timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
}

.guide-live-timeline span {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.guide-live-timeline b {
  display: block;
  height: 30px;
  border-radius: 7px;
  background: rgba(96, 211, 148, 0.22);
}

.guide-live-timeline span:nth-child(n + 4) b {
  background: rgba(255, 209, 102, 0.38);
}

.guide-slot-row,
.guide-day-row,
.guide-double-row,
.guide-load-row,
.guide-review-grid,
.guide-review-alert {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(32, 34, 53, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.guide-slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px;
}

.guide-slot-row span {
  flex: 1 1 92px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.guide-slot-row b,
.guide-day-row b,
.guide-double-row b {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 8px;
  background: rgba(239, 71, 111, 0.12);
  color: #a92648;
  font-size: 0.72rem;
}

.guide-day-row,
.guide-double-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

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

.guide-day-row b {
  background: rgba(96, 211, 148, 0.2);
  color: #1f6841;
}

.guide-load-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 8px;
}

.guide-load-row span,
.guide-load-row strong,
.guide-review-grid span,
.guide-review-grid b,
.guide-review-alert strong,
.guide-review-alert small {
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-load-row strong {
  display: grid;
  place-items: center;
  min-height: 24px;
  border-radius: 7px;
  background: rgba(61, 108, 245, 0.1);
  color: var(--blue);
}

.guide-double-row span {
  display: block;
  min-height: 28px;
  border-radius: 8px;
  background: rgba(32, 34, 53, 0.07);
}

.guide-review-grid {
  display: grid;
  grid-template-columns: minmax(48px, 0.58fr) repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 8px;
}

.guide-review-grid span,
.guide-review-grid b {
  display: grid;
  align-items: center;
  min-height: 26px;
  padding: 0 7px;
  border-radius: 7px;
}

.guide-review-grid span {
  color: var(--muted);
  font-weight: 900;
}

.guide-review-grid b {
  background: rgba(96, 211, 148, 0.16);
  color: #1f6841;
}

.guide-review-alert {
  display: grid;
  gap: 3px;
  padding: 9px;
  border-color: rgba(239, 71, 111, 0.28);
  background: rgba(239, 71, 111, 0.08);
}

.guide-review-alert strong {
  color: #a92648;
}

.guide-review-alert small {
  color: var(--muted);
}

.guide-focus {
  z-index: 1;
  animation: guideFocus 7.2s ease-in-out infinite;
  animation-delay: var(--guide-delay, 0s);
}

.guide-focus::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(61, 108, 245, 0.62);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  animation: guideFocusRing 7.2s ease-in-out infinite;
  animation-delay: var(--guide-delay, 0s);
}

.guide-delay-1 {
  --guide-delay: 0s;
}

.guide-delay-2 {
  --guide-delay: 1.2s;
}

.guide-delay-3 {
  --guide-delay: 2.4s;
}

.guide-delay-4 {
  --guide-delay: 3.6s;
}

@keyframes guideFocus {
  0%,
  24%,
  100% {
    transform: translateY(0);
    box-shadow: none;
  }

  7%,
  15% {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(61, 108, 245, 0.18);
  }
}

@keyframes guideFocusRing {
  0%,
  24%,
  100% {
    opacity: 0;
    transform: scale(0.98);
  }

  7%,
  15% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-focus,
  .guide-focus::after {
    animation: none;
  }

  .guide-focus::after {
    opacity: 1;
    transform: none;
  }
}

.builder-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 52px rgba(32, 34, 53, 0.08);
}

.builder-heading {
  display: grid;
  align-content: center;
  gap: 10px;
  max-width: 860px;
}

.builder-status {
  box-shadow: none;
}

.compliance-page {
  align-content: start;
  gap: 22px;
  margin-top: 18px;
}

.compliance-heading {
  max-width: 960px;
}

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

.compliance-card {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 38px rgba(32, 34, 53, 0.08);
}

.compliance-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.compliance-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.65fr) minmax(150px, 0.7fr) minmax(0, 1.05fr);
  gap: 24px;
  align-content: center;
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #202235;
  color: #fff;
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 14px;
}

.footer-brand > strong,
.footer-brand .footer-contact strong {
  margin-bottom: 8px;
}

.footer-brand > strong {
  margin-bottom: 0;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.site-footer a {
  font-weight: 900;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.88rem;
}

.api-card,
.workspace-card,
.coach-card,
.result,
.step-card,
.step-button {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.api-card {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.8), rgba(255, 255, 255, 0.78)),
    var(--card);
}

.api-card span,
.api-card small {
  color: var(--muted);
}

.api-card strong {
  overflow-wrap: anywhere;
}

.wizard-layout {
  display: grid;
  grid-template-columns: 260px minmax(820px, 1fr) 340px;
  gap: 20px;
  align-items: start;
  margin-top: 0;
}

.builder-page {
  align-content: start;
}

.stepper {
  position: sticky;
  top: var(--sticky-panel-top);
  display: grid;
  gap: 10px;
}

.step-button {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 3px 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: 20px;
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.step-button:hover {
  transform: translateY(-2px) rotate(-0.4deg);
}

.step-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.step-button.pending:disabled {
  opacity: 1;
}

.step-button:disabled:hover {
  transform: none;
}

.step-button span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f0f2ff;
  color: var(--blue);
  font-weight: 900;
}

.step-button strong {
  font-size: 0.95rem;
}

.step-button small {
  color: var(--muted);
  font-size: 0.78rem;
}

.step-button.active {
  border-color: rgba(61, 108, 245, 0.42);
  background: linear-gradient(135deg, #ffffff, #edf3ff);
}

.step-button.done span {
  background: var(--mint);
  color: #102618;
}

.step-button.pending {
  border-color: rgba(255, 159, 28, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 242, 209, 0.88));
}

.step-button.pending span {
  background: rgba(255, 159, 28, 0.24);
  color: #8a4b00;
}

.step-button.invalid {
  border-color: rgba(239, 71, 111, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 236, 242, 0.88));
}

.step-button.invalid span {
  background: rgba(239, 71, 111, 0.18);
  color: #9a2543;
}

.wizard {
  min-width: 0;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: slide-in 260ms ease both;
}

.step-card {
  padding: clamp(22px, 4vw, 42px);
  border-radius: 38px;
  background: #fff;
}

.step-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--sun);
  color: #49350a;
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(255, 159, 28, 0.22);
}

.step-heading h2 {
  margin: 18px 0 10px;
  font-size: clamp(2.1rem, 4vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.step-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
}

.wizard-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

label {
  display: grid;
  gap: 7px;
}

label.wide,
.schedule-setup-picker,
.grid-builder,
.primary-action {
  grid-column: 1 / -1;
}

.schedule-setup-picker {
  display: grid;
  gap: 14px;
}

.grid-manager {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.grid-list {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}

.grid-tab {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: start;
  gap: 8px;
  min-width: 132px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-align: left;
}

.grid-tab-select {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.grid-tab.is-active {
  border-color: rgba(61, 108, 245, 0.7);
  background: rgba(61, 108, 245, 0.1);
}

.grid-list span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.grid-remove {
  align-self: center;
  justify-self: end;
}

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

.grid-select-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
  position: relative;
}

.grid-select-field > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.grid-select-field:has(.search-select.open) {
  z-index: 40;
}

.excel-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
}

.excel-actions .ghost-action {
  min-height: 42px;
  padding: 0 16px;
}

.template-step {
  display: grid;
  grid-column: 1 / -1;
  gap: 18px;
}

.template-step-copy {
  display: grid;
  gap: 12px;
  max-width: 780px;
  color: var(--muted);
  line-height: 1.55;
}

.template-step-copy p,
.template-step-copy ul {
  margin: 0;
}

.template-step-copy ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.template-actions {
  margin-top: 2px;
}

.selected-template-file {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.selected-template-file[hidden] {
  display: none;
}

.file-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: rgba(34, 139, 92, 0.12);
  color: #1d7d54;
  font-size: 0.78rem;
  font-weight: 900;
}

.selected-template-file div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.selected-template-file strong {
  font-size: 0.86rem;
}

.selected-template-file span:last-child {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-template-file .icon-remove {
  justify-self: end;
}

.combo-field {
  position: relative;
  z-index: 1;
}

.combo-field.open {
  z-index: 40;
}

.combo-menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  gap: 4px;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(32, 34, 53, 0.16);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(32, 34, 53, 0.18);
}

.combo-field.open .combo-menu {
  display: grid;
}

.combo-option {
  display: grid;
  gap: 3px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.combo-option:hover {
  background: rgba(61, 108, 245, 0.12);
}

.combo-option-create {
  border-top: 1px solid var(--line);
  background: #f7fcf9;
  color: #1d8f55;
}

.combo-option-create:hover {
  background: rgba(96, 211, 148, 0.18);
}

.combo-option-selected {
  background: rgba(61, 108, 245, 0.1);
  box-shadow: inset 3px 0 0 var(--blue);
}

.combo-empty {
  display: grid;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.combo-option strong {
  font-size: 0.92rem;
  font-weight: 900;
}

.combo-option small {
  color: var(--muted);
  font-size: 0.78rem;
}

label span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  box-shadow: inset 0 0 0 1px rgba(32, 34, 53, 0.09);
}

select {
  appearance: none;
  padding-right: 42px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 22px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 17px) 50% / 6px 6px no-repeat,
    #fff;
}

input,
select {
  min-height: 50px;
  padding-left: 15px;
}

input {
  padding-right: 15px;
}

textarea {
  min-height: 150px;
  resize: vertical;
  padding: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(61, 108, 245, 0.45), 0 0 0 5px rgba(61, 108, 245, 0.12);
}

.field-invalid,
.builder-invalid {
  border-color: transparent !important;
  box-shadow: inset 0 0 0 1px rgba(239, 71, 111, 0.7), 0 0 0 5px rgba(239, 71, 111, 0.1);
}

.school-day-picker.builder-invalid {
  padding: 8px;
  border-radius: 18px;
}

.primary-action,
.ghost-action {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.primary-action {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  box-shadow: 0 18px 34px rgba(61, 108, 245, 0.24);
}

.ghost-action {
  padding: 0 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
}

.ghost-action.next {
  background: #202235;
  color: #fff;
}

.primary-action:hover,
.ghost-action:not(:disabled):hover {
  transform: translateY(-2px);
}

.icon-action:not(:disabled):hover {
  background: #fff;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(32, 34, 53, 0.18);
}

.setup-modal[hidden] {
  display: none;
}

.setup-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.setup-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 34, 53, 0.36);
  backdrop-filter: blur(4px);
}

.setup-modal-card {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.setup-modal-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.3rem;
  font-weight: 950;
}

.setup-modal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.setup-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.mini-card {
  margin: 10px 0 24px;
  padding: 18px;
  border: 1px dashed rgba(61, 108, 245, 0.36);
  border-radius: 24px;
  background: #fff;
}

.mini-card h3 {
  margin-bottom: 14px;
}

.tag-builder,
.limitation-builder,
.teacher-builder,
.class-builder {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(61, 108, 245, 0.2);
  border-radius: 24px;
  background: #fff;
  overflow: visible;
}

.teacher-builder-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.teacher-builder-top h3 {
  margin-bottom: 0;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.teacher-tabs {
  display: grid;
  gap: 10px;
}

.teacher-row-shell {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  overflow: visible;
}

.teacher-row-shell.active {
  border-color: rgba(61, 108, 245, 0.42);
  background: #fff;
  box-shadow: 0 14px 28px rgba(61, 108, 245, 0.12);
}

.teacher-row-shell.builder-invalid {
  border-color: rgba(239, 71, 111, 0.52) !important;
  background: rgba(239, 71, 111, 0.05);
  box-shadow: inset 0 0 0 1px rgba(239, 71, 111, 0.48), 0 10px 24px rgba(239, 71, 111, 0.1);
}

.teacher-row-shell.builder-invalid .teacher-row-name {
  color: #9a2543;
}

.teacher-tab {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.6fr) auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.class-tab {
  grid-template-columns: minmax(150px, 1.1fr) minmax(220px, 1.4fr) auto;
}

.class-tab.has-remove {
  grid-template-columns: minmax(150px, 1.1fr) minmax(220px, 1.4fr) auto 24px;
}

.class-tab .icon-remove {
  justify-self: end;
}

.teacher-row-name {
  color: var(--ink);
  font-weight: 900;
}

.teacher-row-subjects {
  color: var(--muted);
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-row-limits {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.34);
  color: #65460a;
  font-size: 0.84rem;
  font-weight: 900;
}

.lesson-count-badge {
  background: rgba(96, 211, 148, 0.16);
  color: #1f6841;
}

.icon-remove,
.teacher-tab small {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 71, 111, 0.16);
  color: #9a2543;
  font-size: 0;
}

.icon-remove::before,
.icon-remove::after,
.teacher-tab small::before,
.teacher-tab small::after {
  content: '';
  position: absolute;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: #9a2543;
}

.icon-remove::before,
.teacher-tab small::before {
  transform: rotate(45deg);
}

.icon-remove::after,
.teacher-tab small::after {
  transform: rotate(-45deg);
}

.teacher-editor {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  border-top: 1px dashed rgba(61, 108, 245, 0.3);
  border-radius: 0;
  background: #fff;
}

.class-editor {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  border-top: 1px dashed rgba(61, 108, 245, 0.3);
  border-radius: 0;
  background: #fff;
  overflow: visible;
}

.teacher-editor-slot .teacher-editor {
  padding: 16px;
}

.teacher-editor-slot .class-editor {
  padding: 16px;
}

.subject-constraint-list {
  display: grid;
  gap: 10px;
}

.subject-constraint-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.subject-constraint-row:has(.search-select.open) {
  position: relative;
  z-index: 20;
}

.subject-constraint-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(140px, 0.7fr) minmax(220px, 1fr) 32px;
  gap: 10px;
  align-items: end;
}

.constraint-select-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.subject-constraint-main label,
.subject-constraint-fields label {
  display: grid;
  gap: 6px;
}

.constraint-select-field > span,
.subject-constraint-main label span,
.subject-constraint-fields label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.subject-constraint-main select,
.subject-constraint-main input,
.subject-constraint-main .search-select-trigger,
.subject-constraint-fields input[type="number"] {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
}

.subject-constraint-main > .icon-remove {
  align-self: end;
  margin-bottom: 5px;
}

.subject-constraint-fields {
  display: grid;
  gap: 10px;
}

.subject-constraint-choice-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
}

.subject-constraint-choice-group.field-invalid {
  border-color: transparent !important;
}

.validation-message {
  display: none;
  margin: 10px 0 0;
  color: #9a2543;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.field-invalid > .validation-message {
  display: block;
}

input.field-invalid + .validation-message {
  display: block;
}

.subject-slot-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

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

.tag-input-label {
  display: grid;
  gap: 8px;
}

.tag-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 48px;
  align-items: center;
  padding: 10px;
  border: 1px dashed rgba(61, 108, 245, 0.24);
  border-radius: 18px;
  background: #fff;
}

.subject-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(96, 211, 148, 0.9), rgba(255, 209, 102, 0.75));
  color: #182118;
  font-weight: 900;
}

.subject-tag span {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
}

.subject-tag span::before,
.subject-tag span::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 1.8px;
  border-radius: 999px;
  background: #182118;
}

.subject-tag span::before {
  transform: rotate(45deg);
}

.subject-tag span::after {
  transform: rotate(-45deg);
}

.student-builder,
.load-builder {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(61, 108, 245, 0.2);
  border-radius: 24px;
  background: #fff;
  overflow: visible;
}

.student-list {
  display: grid;
  gap: 8px;
  min-height: 48px;
}

.student-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.student-row span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-row.empty {
  grid-template-columns: 1fr;
  color: var(--muted);
  border-style: dashed;
}

.student-row.empty span {
  color: var(--muted);
  font-weight: 700;
}

.load-list {
  display: grid;
  gap: 10px;
}

.load-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1.2fr) 140px 32px;
  gap: 10px;
  align-items: start;
  position: relative;
  z-index: 1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.load-row:has(.search-select.open) {
  z-index: 20;
}

.load-row.builder-invalid {
  border-color: rgba(239, 71, 111, 0.52) !important;
  background: rgba(239, 71, 111, 0.04);
}

.search-select {
  position: relative;
  min-width: 0;
}

.load-row .icon-remove {
  margin-top: 9px;
}

.time-picker {
  position: relative;
  min-width: 0;
}

.time-picker.open {
  z-index: 60;
}

.search-select-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow: inset 0 0 0 1px rgba(32, 34, 53, 0.12);
}

.search-select-trigger::after {
  content: '';
  justify-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.search-select-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select-trigger.placeholder {
  color: var(--muted);
}

.search-select.open .search-select-trigger {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(61, 108, 245, 0.45), 0 0 0 5px rgba(61, 108, 245, 0.12);
}

.search-select.field-invalid {
  box-shadow: none;
}

.search-select.field-invalid .search-select-trigger {
  box-shadow: inset 0 0 0 1px rgba(239, 71, 111, 0.7), 0 0 0 5px rgba(239, 71, 111, 0.1);
}

.time-picker.open .search-select-trigger {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(61, 108, 245, 0.45), 0 0 0 5px rgba(61, 108, 245, 0.12);
}

.time-picker.disabled .search-select-trigger,
.time-picker-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  background: rgba(32, 34, 53, 0.04);
  color: var(--muted);
  transform: none;
}

.search-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(32, 34, 53, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(32, 34, 53, 0.18);
}

.search-select.open .search-select-menu {
  display: grid;
}

.time-picker.open .search-select-menu {
  display: grid;
  z-index: 70;
}

.time-picker-menu {
  min-width: 156px;
}

.time-spinner {
  display: grid;
  grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
  gap: 6px;
  align-items: center;
}

.time-column {
  display: grid;
  gap: 4px;
  max-height: 180px;
  overflow: auto;
  scrollbar-width: none;
  scroll-snap-type: y proximity;
  padding: 2px;
}

.time-column::-webkit-scrollbar {
  display: none;
}

.time-column button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  scroll-snap-align: center;
}

.time-column button:hover {
  background: rgba(61, 108, 245, 0.12);
}

.time-column button.selected {
  background: rgba(61, 108, 245, 0.14);
  color: var(--blue);
}

.time-column button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
  background: transparent;
  color: var(--muted);
}

.time-column button:disabled:hover {
  background: transparent;
}

.time-separator {
  color: var(--muted);
  font-weight: 900;
}

.search-select-input {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
}

.search-select-options {
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
}

.search-select-options button,
.search-select-empty {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.search-select-options button:hover {
  background: rgba(61, 108, 245, 0.12);
}

.search-select-options button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  background: rgba(32, 34, 53, 0.05);
  color: var(--muted);
}

.search-select-options button:disabled:hover {
  background: rgba(32, 34, 53, 0.05);
}

.search-select-options button.filtered-out {
  display: none;
}

.search-select-empty {
  display: grid;
  align-items: center;
  color: var(--muted);
}

.load-row input,
.load-row select,
.block-row .search-select-trigger,
.limitation-row .search-select-trigger {
  min-height: 42px;
  border-radius: 14px;
}

.limitation-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.limitation-heading h3 {
  margin-bottom: 0;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.limitation-list {
  display: grid;
  gap: 10px;
}

.limitation-row {
  position: relative;
  overflow: visible;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.limitation-row:has(.time-picker.open),
.limitation-row:has(.search-select.open) {
  z-index: 50;
}

.limitation-summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, auto) auto 24px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.limitation-summary::-webkit-details-marker {
  display: none;
}

.limitation-title {
  color: var(--ink);
  font-weight: 900;
}

.limitation-meta {
  justify-self: end;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.limitation-fields {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.limitation-main-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 116px 116px;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.limitation-row input,
.limitation-row select,
.limitation-row .search-select {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
}

.limitation-main-row input[type="time"] {
  min-width: 0;
  padding: 0 8px;
}

.time-field {
  min-height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.time-field::-webkit-calendar-picker-indicator {
  margin-right: 2px;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
}

.time-field::-webkit-calendar-picker-indicator:hover {
  background: rgba(61, 108, 245, 0.1);
}

.day-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.limitation-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.limitation-days .day-chip,
.limitation-days .day-chip span {
  width: 100%;
}

.day-chip {
  display: inline-flex;
}

.day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-chip span {
  display: grid;
  place-items: center;
  text-align: center;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.day-chip input:checked + span {
  border-color: rgba(61, 108, 245, 0.4);
  background: rgba(61, 108, 245, 0.12);
  color: var(--blue);
}

.affected-lessons {
  display: inline-grid;
  justify-self: end;
  place-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.34);
  color: #65460a;
  font-size: 0.84rem;
  font-weight: 900;
}

.limitation-row .remove-block {
  justify-self: start;
  min-width: 120px;
}

.limitation-remove {
  justify-self: end;
}

.grid-builder {
  display: grid;
  gap: 16px;
}

.school-day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.school-day-chip {
  display: inline-flex;
}

.school-day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.school-day-chip span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.school-day-chip span:hover {
  transform: scale(1.015);
  box-shadow: 0 10px 24px rgba(61, 108, 245, 0.1);
}

.school-day-chip input:checked + span {
  border-color: rgba(61, 108, 245, 0.45);
  background: linear-gradient(135deg, #eff4ff, #ffffff);
  color: var(--blue);
}

.day-editor {
  display: grid;
  gap: 16px;
  padding: 22px 26px 24px;
  border: 1px solid rgba(61, 108, 245, 0.2);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.48);
}

.day-editor-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 4px;
}

.day-editor-top h3 {
  margin-bottom: 0;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.switch {
  display: inline-flex;
  grid-auto-flow: column;
  gap: 10px;
  align-items: center;
  width: fit-content;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: rgba(32, 34, 53, 0.18);
  transition: background 160ms ease;
}

.switch span::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 14px rgba(32, 34, 53, 0.16);
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--mint);
}

.switch input:checked + span::after {
  transform: translateX(26px);
}

.switch strong {
  font-size: 0.9rem;
}

.block-list {
  display: grid;
  gap: 10px;
}

.block-row {
  display: grid;
  grid-template-columns: 150px minmax(190px, 1fr) 140px 140px 32px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.block-row input,
.block-row select {
  min-height: 42px;
  border-radius: 14px;
}

.remove-block {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 71, 111, 0.14);
  color: #9a2543;
  font-weight: 900;
}

.grid-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.grid-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sidecar {
  position: sticky;
  top: var(--sticky-panel-top);
  display: grid;
  gap: 16px;
}

.workspace-card,
.coach-card,
.result {
  border-radius: 28px;
  padding: 20px;
}

.coach-card h2 {
  margin-bottom: 8px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.coach-card p {
  color: var(--muted);
}

.workspace-card {
  position: relative;
  z-index: 20;
}

.workspace-card .eyebrow {
  margin-bottom: 10px;
}

.progress-shell {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 34, 53, 0.1);
}

.progress-bar {
  width: 8.33%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--blue), var(--pink));
  transition: width 220ms ease;
}

.progress-label {
  margin: 10px 0 0;
  font-size: 0.86rem;
  font-weight: 900;
}

.result.empty p {
  margin-bottom: 0;
}

.tip-list {
  display: grid;
  gap: 10px;
}

.tip-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(61, 108, 245, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.tip-card strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.tip-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.result.success {
  border-color: rgba(96, 211, 148, 0.55);
}

.result.failure {
  border-color: rgba(239, 71, 111, 0.55);
}

.result-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.result-top span {
  font-size: 1.2rem;
  font-weight: 900;
}

.result-top strong {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(96, 211, 148, 0.22);
}

.failure .result-top strong {
  background: rgba(239, 71, 111, 0.18);
}

.result-route {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.result-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.schedule-step-card {
  min-height: auto;
}

.generated-schedule,
.generated-schedule-placeholder {
  grid-column: 1 / -1;
}

.generated-schedule .schedule-view,
.generated-schedule-placeholder .empty-schedule {
  margin-top: 0;
}

.schedule-view {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.schedule-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(96, 211, 148, 0.42);
  border-radius: 18px;
  background: rgba(96, 211, 148, 0.14);
}

.schedule-export-action {
  min-height: 40px;
  padding: 0 16px;
}

.schedule-summary span:first-of-type {
  margin-left: auto;
}

.schedule-tabs,
.schedule-entity-tabs {
  display: grid;
  gap: 12px;
}

.schedule-tab-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.schedule-entity-list {
  flex-wrap: wrap;
  max-height: 148px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.schedule-tab-list::-webkit-scrollbar {
  display: none;
}

.schedule-entity-list::-webkit-scrollbar {
  display: block;
  width: 8px;
}

.schedule-entity-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(32, 34, 53, 0.18);
}

.schedule-tab-list button {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.schedule-entity-list button {
  max-width: min(220px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-mode-list button {
  min-width: 150px;
}

.schedule-tab-list button:hover {
  border-color: rgba(32, 34, 53, 0.24);
  color: var(--ink);
}

.workspace-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.progress-workspace-picker {
  margin: 0;
}

.workspace-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow: inset 0 0 0 1px rgba(32, 34, 53, 0.12);
}

.workspace-trigger::after {
  content: '';
  justify-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.workspace-trigger span {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-picker.open .workspace-trigger {
  box-shadow: inset 0 0 0 1px rgba(61, 108, 245, 0.45), 0 0 0 5px rgba(61, 108, 245, 0.12);
}

.workspace-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  width: 100%;
  min-width: 0;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(32, 34, 53, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(32, 34, 53, 0.18);
}

.workspace-picker.open .workspace-menu {
  display: grid;
}

.workspace-selectors {
  display: grid;
  gap: 10px;
}

.workspace-selectors .combo-field {
  min-width: 0;
}

.workspace-selectors .combo-field::after {
  content: '';
  position: absolute;
  right: 13px;
  bottom: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  pointer-events: none;
  transform: rotate(45deg);
}

.workspace-selectors input {
  min-height: 44px;
  padding-left: 12px;
  padding-right: 36px;
  border-radius: 14px;
  font-weight: 400;
  cursor: text;
  background: #fff;
}

.workspace-selectors .combo-field.open input {
  box-shadow: inset 0 0 0 1px rgba(61, 108, 245, 0.45), 0 0 0 5px rgba(61, 108, 245, 0.12);
}

.workspace-selectors .combo-menu {
  max-height: 220px;
  padding: 8px;
  overflow: auto;
}

.workspace-menu .combo-option strong {
  font-weight: 400;
}

.workspace-menu .combo-option small {
  font-weight: 400;
}

.schedule-tab-list button.is-active {
  border-color: rgba(96, 211, 148, 0.72);
  background: rgba(96, 211, 148, 0.16);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(47, 126, 83, 0.1);
}

.schedule-tab-panel,
.schedule-entity-panel {
  display: none;
}

.schedule-tab-panel.is-active,
.schedule-entity-panel.is-active {
  display: block;
}

.schedule-summary strong {
  font-size: 1rem;
  font-weight: 900;
}

.schedule-summary span,
.schedule-day-title span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.schedule-class {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.schedule-class h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.schedule-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.grid-overview-expand {
  flex: 0 0 auto;
}

.schedule-days {
  display: grid;
  gap: 8px;
}

.unplaced-lessons {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(239, 71, 111, 0.28);
  border-radius: 16px;
  background: rgba(239, 71, 111, 0.06);
}

.unplaced-lessons-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.unplaced-lessons-heading strong {
  font-size: 0.9rem;
  font-weight: 900;
}

.unplaced-lessons-heading span {
  color: #9a2543;
  font-size: 0.78rem;
  font-weight: 900;
}

.unplaced-lesson-list {
  display: grid;
  gap: 8px;
}

.unplaced-lesson-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(239, 71, 111, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.unplaced-lesson-main {
  display: grid;
  gap: 3px;
}

.unplaced-lesson-main strong {
  font-size: 0.9rem;
  font-weight: 900;
}

.unplaced-lesson-main span,
.unplaced-lesson-main small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.unplaced-lesson-card ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.unplaced-lesson-card li {
  color: #9a2543;
  font-size: 0.78rem;
  line-height: 1.35;
}

.generated-schedule .schedule-days {
  --schedule-day-count: 7;
  grid-template-columns: repeat(var(--schedule-day-count, 7), minmax(150px, 1fr));
  min-width: calc(var(--schedule-day-count, 7) * 150px);
  align-items: start;
}

.schedule-grid-table {
  display: grid;
  grid-template-columns: 92px repeat(var(--schedule-day-count, 7), minmax(142px, 1fr));
  min-width: calc(92px + (var(--schedule-day-count, 7) * 142px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.schedule-grid-heading,
.schedule-grid-slot-axis,
.schedule-grid-cell {
  min-width: 0;
  border-right: 1px solid rgba(32, 34, 53, 0.08);
  border-bottom: 1px solid rgba(32, 34, 53, 0.08);
}

.schedule-grid-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  background: rgba(32, 34, 53, 0.04);
}

.schedule-grid-time-heading,
.schedule-grid-day-heading strong,
.schedule-grid-day-heading span,
.schedule-grid-slot-axis strong,
.schedule-grid-slot-axis span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.schedule-grid-day-heading strong {
  color: #202235;
}

.schedule-grid-slot-axis {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 74px;
  padding: 8px;
  background: rgba(32, 34, 53, 0.03);
}

.schedule-grid-slot-axis span {
  line-height: 1.25;
}

.schedule-grid-cell {
  display: grid;
  align-content: stretch;
  gap: 5px;
  min-height: 74px;
  padding: 6px;
}

.grid-overview-section {
  overflow: visible;
}

.grid-overview-stack {
  display: grid;
  gap: 14px;
}

.grid-overview-day-block {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.grid-overview-day-title {
  margin: 0;
  color: #202235;
  font-size: 0.9rem;
  font-weight: 950;
}

.grid-overview-table {
  display: grid;
  grid-template-columns: var(--grid-overview-class-width, 64px) repeat(var(--grid-overview-columns), minmax(74px, 1fr));
  min-width: calc(var(--grid-overview-class-width, 64px) + (var(--grid-overview-columns) * 74px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.grid-overview-wide-table {
  grid-template-columns: var(--grid-overview-class-width, 64px) repeat(var(--grid-overview-columns), minmax(118px, 1fr));
  min-width: calc(var(--grid-overview-class-width, 64px) + (var(--grid-overview-columns) * 118px));
}

.grid-overview-corner,
.grid-overview-class-heading,
.grid-overview-class-cell,
.grid-overview-day-heading,
.grid-overview-slot-heading,
.grid-overview-cell {
  min-width: 0;
  border-right: 1px solid rgba(32, 34, 53, 0.08);
  border-bottom: 1px solid rgba(32, 34, 53, 0.08);
}

.grid-overview-corner,
.grid-overview-class-heading,
.grid-overview-class-cell {
  position: sticky;
  left: 0;
  z-index: 3;
}

.grid-overview-corner,
.grid-overview-class-heading {
  display: grid;
  place-items: center start;
  min-height: 38px;
  padding: 5px 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.grid-overview-day-heading {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 10px;
  background: rgba(32, 34, 53, 0.04);
  color: #202235;
  font-size: 0.82rem;
  font-weight: 900;
}

.grid-overview-slot-heading {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 38px;
  padding: 5px 6px;
  background: rgba(32, 34, 53, 0.03);
}

.grid-overview-slot-heading strong,
.grid-overview-slot-heading span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.2;
}

.grid-overview-class-cell {
  display: grid;
  align-content: center;
  min-height: 48px;
  padding: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-overview-cell {
  display: grid;
  align-content: stretch;
  gap: 4px;
  min-height: 48px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.46);
}

.grid-overview-cell.has-lesson {
  background: rgba(96, 211, 148, 0.07);
}

.grid-overview-lesson {
  display: grid;
  align-content: start;
  gap: 1px;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid rgba(47, 126, 83, 0.22);
  border-radius: 8px;
  background: rgba(96, 211, 148, 0.16);
}

.grid-overview-lesson strong,
.grid-overview-lesson span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-overview-lesson strong {
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
}

.grid-overview-lesson span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.grid-overlay-open {
  overflow: hidden;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 12, 24, 0.72);
}

.grid-overlay-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: #f8fafc;
}

.grid-overlay-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.grid-overlay-toolbar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-overlay-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.grid-overlay-actions .ghost-action {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
}

.grid-overlay-actions [data-grid-overlay-scale] {
  min-width: 48px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.grid-overlay-viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  cursor: grab;
}

.grid-overlay-viewport:focus {
  outline: none;
}

.grid-overlay-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.grid-overlay-canvas {
  width: max-content;
  transform-origin: 0 0;
}

.teacher-schedule-section {
  overflow-x: auto;
}

.teacher-grid-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.teacher-grid-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--grid-border);
  border-radius: 999px;
  background: var(--grid-bg);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.teacher-grid-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--grid-accent);
}

.teacher-timeline {
  display: grid;
  grid-template-columns: 92px repeat(var(--schedule-day-count, 7), minmax(142px, 1fr));
  min-width: calc(92px + (var(--schedule-day-count, 7) * 142px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.teacher-time-range,
.teacher-timeline-day {
  min-width: 0;
  border-right: 1px solid rgba(32, 34, 53, 0.08);
}

.teacher-time-range {
  position: relative;
  min-height: calc(var(--teacher-track-height, 640px) + 62px);
  padding: 52px 8px 10px;
  background: rgba(32, 34, 53, 0.03);
}

.teacher-time-axis {
  position: relative;
  height: var(--teacher-track-height, 640px);
}

.teacher-time-axis::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 8px;
  width: 1px;
  background: rgba(32, 34, 53, 0.12);
}

.teacher-time-axis span {
  position: absolute;
  right: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.teacher-time-axis span::after {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  width: 8px;
  height: 1px;
  background: rgba(32, 34, 53, 0.18);
}

.teacher-timeline-day {
  display: grid;
  grid-template-rows: 42px minmax(var(--teacher-track-height, 640px), 1fr);
  background: rgba(255, 255, 255, 0.46);
}

.teacher-timeline-day-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(32, 34, 53, 0.08);
  background: rgba(32, 34, 53, 0.04);
}

.teacher-timeline-day-title strong {
  color: #202235;
  font-size: 0.72rem;
  font-weight: 900;
}

.teacher-timeline-day-title span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.teacher-timeline-track {
  position: relative;
  min-height: var(--teacher-track-height, 640px);
  margin: 10px;
  overflow: hidden;
  border: 1px solid rgba(32, 34, 53, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.teacher-timeline-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.teacher-timeline-limitation {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
  border: 0;
  border-left: 5px solid currentColor;
  color: #9a2543;
  background: rgba(239, 71, 111, 0.16);
}

.teacher-timeline-limitation.is-limited {
  color: #65460a;
  background: rgba(255, 209, 102, 0.26);
}

.teacher-timeline-limitation strong,
.teacher-timeline-limitation span,
.teacher-timeline-limitation small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-timeline-limitation strong {
  font-size: 0.82rem;
  font-weight: 900;
}

.teacher-timeline-limitation span,
.teacher-timeline-limitation small {
  font-size: 0.7rem;
  font-weight: 800;
}

.teacher-timeline-lesson {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
  border: 0;
  border-left: 5px solid var(--grid-accent);
  border-radius: 0;
  background: var(--grid-bg);
}

.teacher-timeline-lesson.has-tooltip {
  padding-right: 34px;
}

.teacher-timeline-lesson.schedule-soft-missed {
  border-top-color: rgba(255, 209, 102, 0.76);
  border-right-color: rgba(255, 209, 102, 0.76);
  border-bottom-color: rgba(255, 209, 102, 0.76);
}

.teacher-timeline-lesson strong,
.teacher-timeline-lesson span,
.teacher-timeline-lesson small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-timeline-lesson strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.teacher-timeline-lesson span {
  color: var(--grid-accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.teacher-timeline-lesson small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.schedule-day {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.schedule-day-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.schedule-day-title strong {
  font-size: 0.9rem;
  font-weight: 900;
}

.schedule-lessons {
  display: grid;
  gap: 6px;
}

.schedule-slot {
  display: grid;
  gap: 5px;
  min-height: 96px;
}

.schedule-slot-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  min-height: 18px;
}

.schedule-slot-label strong,
.schedule-slot-label span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.schedule-slot-label span {
  text-align: right;
}

.schedule-slot-content {
  display: grid;
  gap: 5px;
  min-height: 68px;
}

.schedule-lesson {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(96, 211, 148, 0.18);
  border: 1px solid rgba(47, 126, 83, 0.28);
}

.schedule-lesson.has-tooltip {
  padding-right: 34px;
}

.schedule-lesson.schedule-soft-missed {
  border-color: rgba(255, 209, 102, 0.76);
  background: rgba(255, 209, 102, 0.16);
}

.schedule-lesson.schedule-soft-missed .schedule-lesson-reason-trigger {
  background: rgba(255, 209, 102, 0.36);
  color: #65460a;
}

.schedule-lesson.schedule-soft-missed .schedule-lesson-reason-trigger:hover,
.schedule-lesson.schedule-soft-missed .schedule-lesson-reason-trigger:focus-visible {
  background: rgba(255, 209, 102, 0.48);
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.2);
}

.schedule-lesson-reason-trigger {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(61, 108, 245, 0.12);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.schedule-lesson-reason-trigger:hover,
.schedule-lesson-reason-trigger:focus-visible {
  background: rgba(61, 108, 245, 0.2);
  box-shadow: 0 0 0 4px rgba(61, 108, 245, 0.14);
}

.schedule-lesson-blocked {
  place-items: center;
  border-color: rgba(239, 71, 111, 0.38);
  background: rgba(239, 71, 111, 0.08);
}

.schedule-lesson-blocked .schedule-blocked-trigger {
  background: rgba(239, 71, 111, 0.16);
  color: #9a2543;
}

.schedule-lesson-blocked span {
  color: #9a2543;
}

.schedule-lesson-blocked .schedule-blocked-trigger:hover,
.schedule-lesson-blocked .schedule-blocked-trigger:focus-visible {
  background: rgba(239, 71, 111, 0.24);
  box-shadow: 0 0 0 4px rgba(239, 71, 111, 0.14);
}

.schedule-lesson-avoid {
  place-items: center;
  border-color: rgba(255, 209, 102, 0.76);
  background: rgba(255, 209, 102, 0.16);
}

.schedule-lesson-avoid .schedule-avoid-trigger {
  background: rgba(255, 209, 102, 0.36);
  color: #65460a;
}

.schedule-lesson-avoid span {
  color: #65460a;
}

.schedule-lesson-avoid .schedule-avoid-trigger:hover,
.schedule-lesson-avoid .schedule-avoid-trigger:focus-visible {
  background: rgba(255, 209, 102, 0.48);
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.2);
}

.schedule-floating-tooltip {
  position: fixed;
  z-index: 2147483647;
  display: grid;
  gap: 7px;
  width: min(280px, 78vw);
  padding: 10px 12px;
  border: 1px solid rgba(32, 34, 53, 0.14);
  border-radius: 12px;
  background: #202235;
  color: #fff;
  box-shadow: 0 18px 42px rgba(32, 34, 53, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.schedule-floating-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.schedule-floating-tooltip strong {
  color: #fff;
  font-size: 0.78rem;
}

.schedule-floating-tooltip ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 16px;
}

.schedule-floating-tooltip li {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.74rem;
  line-height: 1.35;
}

.schedule-lesson-empty {
  place-items: center;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.38);
}

.schedule-lesson-empty span {
  text-align: center;
  color: rgba(34, 36, 54, 0.42);
  font-size: 0.78rem;
  font-weight: 900;
}

.schedule-lesson strong,
.schedule-lesson span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.schedule-lesson strong {
  font-size: 0.78rem;
  line-height: 1.18;
  font-weight: 900;
}

.schedule-lesson span,
.schedule-lesson small,
.empty-schedule p {
  color: var(--muted);
}

.schedule-lesson span {
  font-size: 0.72rem;
  line-height: 1.2;
  font-weight: 800;
}

.schedule-lesson small {
  font-size: 0.68rem;
  line-height: 1.2;
  font-weight: 800;
}

.empty-schedule {
  padding: 12px;
  border: 1px solid rgba(255, 209, 102, 0.72);
  border-radius: 18px;
  background: rgba(255, 209, 102, 0.16);
}

.empty-schedule strong {
  font-weight: 900;
}

.empty-schedule p {
  margin: 6px 0 0;
  line-height: 1.4;
}

.generated-schedule.failure {
  border: 0;
  background: transparent;
}

details {
  margin-top: 14px;
}

summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

pre {
  max-height: 46vh;
  margin: 12px 0 0;
  padding: 14px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(32, 34, 53, 0.06);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.84rem;
  line-height: 1.45;
}

.checklist {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.check-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.check-row span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(32, 34, 53, 0.1);
}

.check-row.done span {
  background: var(--mint);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.45);
}

.check-row.pending {
  border-color: rgba(255, 159, 28, 0.42);
  background: rgba(255, 242, 209, 0.58);
}

.check-row.pending span {
  background: rgba(255, 159, 28, 0.34);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.45);
}

.check-row small {
  color: var(--muted);
}

.review-note {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 209, 102, 0.36);
}

.identity-note {
  grid-column: 1 / -1;
  display: grid;
  padding: 18px;
  border: 1px solid rgba(96, 211, 148, 0.34);
  border-radius: 20px;
  background: rgba(96, 211, 148, 0.14);
}

.setup-overview {
  display: grid;
  gap: 14px;
}

.setup-overview-heading .eyebrow {
  margin: 0;
}

.setup-overview-stats,
.setup-overview-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.setup-overview-stat,
.setup-overview-section,
.setup-overview-load {
  min-width: 0;
  border: 1px solid rgba(32, 34, 53, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.setup-overview-stat {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.setup-overview-stat span,
.setup-overview-list span,
.setup-overview-load span,
.setup-overview-section p {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-overview-stat strong {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 950;
}

.setup-overview-section {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.setup-overview-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.setup-overview-list,
.setup-overview-loads,
.setup-overview-grid-times {
  display: grid;
  align-content: start;
  gap: 6px;
}

.setup-overview-class-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.setup-overview-class-tabs button {
  display: grid;
  gap: 2px;
  min-width: 96px;
  padding: 8px 10px;
  border: 1px solid rgba(32, 34, 53, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  text-align: left;
}

.setup-overview-class-tabs button.is-active {
  border-color: rgba(61, 108, 245, 0.42);
  background: #fff;
  box-shadow: 0 8px 18px rgba(61, 108, 245, 0.12);
}

.setup-overview-class-tabs span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-overview-class-tabs strong {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.setup-overview-active-class {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed rgba(32, 34, 53, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.setup-overview-active-class div {
  display: grid;
  min-width: 0;
}

.setup-overview-active-class strong,
.setup-overview-active-class span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-overview-active-class strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.setup-overview-active-class span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.setup-overview-active-class b {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  white-space: nowrap;
}

.setup-overview-grid-time {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(32, 34, 53, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.setup-overview-grid-time strong,
.setup-overview-grid-time span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-overview-grid-time strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 950;
}

.setup-overview-grid-time span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.setup-overview-list div,
.setup-overview-load {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.setup-overview-list strong,
.setup-overview-load b {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 950;
  white-space: nowrap;
}

.setup-overview-load {
  padding: 8px 10px;
}

.setup-overview-load strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-submitting {
  opacity: 0.72;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(18px) rotate(0.3deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@media (max-width: 1180px) {
  .hero,
  .landing-hero,
  .about-hero,
  .builder-section,
  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .stepper,
  .sidecar {
    position: static;
  }

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

  .feature-showcase-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

  .guide-use-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-workflow-card,
  .about-workflow-card:nth-child(-n + 2) {
    grid-column: auto;
  }

  .about-proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-capability-grid {
    grid-template-columns: 1fr;
  }

  .feature-showcase-copy {
    align-content: start;
  }

  .audience-grid,
  .about-details-grid,
  .steps-flow,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .feature-list article {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 18px, 1440px);
    padding: 10px 0;
  }

  .hero,
  .landing-section,
  .builder-section,
  .site-footer,
  .step-card {
    border-radius: 26px;
    padding: 18px;
  }

  .site-header {
    position: static;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .site-nav {
    grid-column: auto;
  }

  .brand,
  .site-nav,
  .header-actions,
  .auth-actions {
    justify-content: center;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .workspace-picker {
    width: 100%;
  }

  .workspace-menu {
    left: 0;
    right: 0;
    width: 100%;
  }

  .landing-hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 4.2rem);
  }

  .landing-hero h1 {
    font-size: clamp(2.3rem, 12vw, 3.8rem);
  }

  .preview-grid {
    grid-template-columns: 48px repeat(3, minmax(54px, 1fr));
  }

  .preview-grid strong,
  .preview-grid b,
  .preview-grid small {
    min-height: 42px;
    font-size: 0.72rem;
  }

  .feature-showcase-card {
    padding: 18px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .primary-action,
  .hero-actions .ghost-action,
  .about-current-action {
    width: 100%;
  }

  .about-proof-strip,
  .about-workflow-grid,
  .guide-use-case-grid,
  .compliance-grid {
    grid-template-columns: 1fr;
  }

  .about-workflow-card,
  .about-capability-card,
  .guide-use-case-card {
    min-height: auto;
    padding: 18px;
  }

  .guide-live-fields,
  .guide-live-fields.guide-live-two {
    grid-template-columns: 1fr;
  }

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

  .guide-load-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .guide-load-row span:nth-child(2) {
    display: none;
  }

  .feature-showcase-copy ul {
    grid-template-columns: 1fr;
  }

  .feature-visual {
    min-height: 210px;
  }

  .stepper,
  .wizard-form,
  .block-row,
  .teacher-tab,
  .student-row,
  .load-row,
  .limitation-row,
  .subject-constraint-main,
  .tag-input-row,
  .teacher-name-grid {
    grid-template-columns: 1fr;
  }

  .limitation-summary {
    grid-template-columns: 1fr;
    padding-right: 14px;
    padding-top: 56px;
  }

  .limitation-main-row {
    grid-template-columns: 1fr 1fr;
    padding-right: 0;
  }

  .limitation-main-row select {
    grid-column: 1 / -1;
  }

  .limitation-days {
    grid-template-columns: repeat(4, minmax(42px, 1fr));
    padding-right: 0;
  }

  .teacher-row-limits {
    justify-self: start;
  }

  .teacher-row-subjects {
    text-align: left;
  }

  .setup-overview-stats,
  .setup-overview-columns,
  .setup-overview-load {
    grid-template-columns: 1fr;
  }

  .limitation-meta,
  .affected-lessons {
    justify-self: start;
  }

  .day-editor-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .limitation-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-builder-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .step-card {
    min-height: auto;
  }

  .check-row {
    grid-template-columns: 32px 1fr;
  }

  .check-row small {
    grid-column: 2;
  }
}
