:root {
  --page: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --hairline: rgba(29, 29, 31, 0.11);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --blue: #0071e3;
  --blue-pressed: #0062c4;
  --class-one: #f4d867;
  --class-one-soft: #fff8d8;
  --class-two: #8edbd1;
  --class-two-soft: #e2f7f4;
  --danger-soft: #fff0ee;
  --danger: #b42318;
  --success: #26734d;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.07);
  --radius-large: 30px;
  --radius-medium: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: var(--page);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 4%, rgba(255, 255, 255, 0.96), transparent 24rem),
    var(--page);
  font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--safe-top);
  border-bottom: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(250, 250, 252, 0.74);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
}

.topbar-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 9px 0 0 color-mix(in srgb, var(--ink) 34%, transparent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  color: #4b4b50;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease;
  border-radius: 999px;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.hero-panel,
.content-section,
.standards-section {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  box-shadow: var(--shadow);
}

.hero-panel {
  min-height: 520px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--radius-large);
}

.hero-panel::after {
  content: "";
  position: absolute;
  top: -100px;
  right: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--class-soft, rgba(0, 113, 227, 0.08));
  filter: blur(4px);
  pointer-events: none;
}

.hero-panel.class-one {
  --class-soft: color-mix(in srgb, var(--class-one) 32%, transparent);
}

.hero-panel.class-two {
  --class-soft: color-mix(in srgb, var(--class-two) 34%, transparent);
}

.hero-topline,
.section-heading-row,
.split-intro {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.class-name {
  margin: 0;
  max-width: 780px;
  font-size: clamp(48px, 9vw, 92px);
  font-weight: 720;
  letter-spacing: -0.052em;
  line-height: 0.98;
  text-wrap: balance;
}

.status-pill {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
  white-space: nowrap;
}

.status-pill.is-normal {
  color: var(--success);
  background: rgba(234, 248, 239, 0.88);
}

.status-pill.is-off {
  color: var(--danger);
  background: var(--danger-soft);
}

.date-toolbar {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin-top: 42px;
  padding: 6px;
  display: grid;
  grid-template-columns: 44px minmax(174px, 1fr) auto 44px;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.date-step,
.quiet-button,
.search-form button,
.error-actions button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 140ms ease, background 180ms ease, color 180ms ease;
}

.date-step {
  color: var(--ink);
  background: transparent;
  font-size: 28px;
  line-height: 1;
}

.date-step:hover,
.quiet-button:hover {
  background: rgba(29, 29, 31, 0.06);
}

.date-step:active,
.quiet-button:active,
.search-form button:active,
.error-actions button:active {
  transform: scale(0.97);
}

.quiet-button {
  padding: 0 14px;
  color: var(--blue);
  background: transparent;
  font-weight: 620;
}

.date-field {
  min-height: 44px;
  padding: 3px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--hairline);
}

.date-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
}

.date-field input {
  min-width: 0;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.schedule-note {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-wrap: pretty;
}

.members-meta {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.week-copy {
  opacity: 0.72;
  white-space: nowrap;
}

.week-copy b {
  font-weight: 560;
}

.members-block {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
}

.section-heading-row h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 630;
}

.leader-summary {
  min-width: 165px;
  text-align: right;
}

.leader-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.leader-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  font-weight: 680;
  text-wrap: balance;
}

.member-list {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-chip {
  min-height: 44px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  font-weight: 560;
}

.member-chip.is-leader {
  border-color: transparent;
  background: var(--class-accent, #e8eef6);
  font-weight: 680;
}

.member-chip small {
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 11px;
  font-weight: 620;
}

.hero-panel.class-one .member-chip.is-leader {
  --class-accent: var(--class-one);
}

.hero-panel.class-two .member-chip.is-leader {
  --class-accent: var(--class-two);
}

.content-section,
.standards-section {
  margin-top: 28px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: var(--radius-large);
}

.section-intro h2,
.standards-copy h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 50px);
  font-weight: 690;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-wrap: balance;
}

.section-intro > p,
.standards-copy > p,
.assignment-rule {
  max-width: 650px;
  margin: 13px 0 0;
  color: var(--muted);
  text-wrap: pretty;
}

.search-form {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-form input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-form input:focus {
  border-color: color-mix(in srgb, var(--blue) 58%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 11%, transparent);
}

.search-form button,
.error-actions button:first-child {
  min-height: 54px;
  padding: 0 24px;
  color: white;
  background: var(--blue);
  font-weight: 650;
}

.search-form button:hover,
.error-actions button:first-child:hover {
  background: var(--blue-pressed);
}

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

.empty-message {
  margin: 0;
  padding: 26px 0 4px;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
}

.result-summary {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.result-list {
  border-top: 1px solid var(--hairline);
}

.result-row {
  padding: 20px 2px;
  display: grid;
  grid-template-columns: minmax(118px, 0.75fr) minmax(150px, 1fr) minmax(170px, 1.4fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--hairline);
}

.result-date strong,
.result-arrangement strong {
  display: block;
  font-weight: 630;
}

.result-date span,
.result-arrangement span,
.result-class {
  color: var(--muted);
  font-size: 13px;
}

.result-state {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--success);
  background: rgba(234, 248, 239, 0.9);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.result-state.is-off {
  color: var(--danger);
  background: var(--danger-soft);
}

.split-intro {
  align-items: end;
}

.assignment-rule {
  max-width: 430px;
  margin: 0;
  text-align: right;
  font-size: 14px;
}

.project-header,
.project-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.65fr) minmax(90px, 0.35fr) minmax(260px, 1.5fr);
  gap: 24px;
}

.project-header {
  margin-top: 34px;
  padding: 0 2px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.project-list {
  border-top: 1px solid var(--hairline);
}

.project-row {
  padding: 24px 2px;
  align-items: start;
  border-bottom: 1px solid var(--hairline);
}

.project-row h3,
.project-row p {
  margin: 0;
}

.project-row h3 {
  font-size: 18px;
  font-weight: 650;
}

.project-people {
  color: var(--blue);
  font-weight: 650;
}

.project-standard {
  color: #45454a;
  text-wrap: pretty;
}

.standards-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(360px, 1.2fr);
  gap: clamp(36px, 8vw, 100px);
  color: white;
  background: rgba(25, 25, 27, 0.93);
  border-color: rgba(255, 255, 255, 0.08);
}

.standards-copy .eyebrow,
.standards-copy > p {
  color: rgba(255, 255, 255, 0.62);
}

.standards-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: standards;
}

.standards-list li {
  counter-increment: standards;
  min-height: 60px;
  padding: 17px 0;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  text-wrap: pretty;
}

.standards-list li::before {
  content: counter(standards, decimal-leading-zero);
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.page-footer {
  padding: 34px 4px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}

.page-footer p {
  margin: 0;
}

.error-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(245, 245, 247, 0.72);
  -webkit-backdrop-filter: blur(26px) saturate(130%);
  backdrop-filter: blur(26px) saturate(130%);
}

.error-dialog[hidden] {
  display: none;
}

.error-card {
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 26px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

.error-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.error-card > p:not(.eyebrow) {
  color: var(--muted);
}

.error-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-actions button {
  padding: 0 18px;
}

.error-help {
  margin: 18px 0 0;
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

body.is-ready .reveal {
  opacity: 1;
  transform: none;
  transition: opacity 650ms cubic-bezier(0.2, 0.75, 0.25, 1), transform 650ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

body.is-ready .reveal:nth-of-type(2) { transition-delay: 70ms; }
body.is-ready .reveal:nth-of-type(3) { transition-delay: 120ms; }
body.is-ready .reveal:nth-of-type(4) { transition-delay: 170ms; }

@media (max-width: 760px) {
  .topbar-inner {
    width: 100%;
    min-height: 58px;
    padding-left: 16px;
    gap: 14px;
  }

  .brand {
    font-size: 14px;
  }

  .brand-mark {
    width: 10px;
    height: 10px;
    box-shadow: 7px 0 0 color-mix(in srgb, var(--ink) 34%, transparent);
  }

  .nav-links {
    padding-right: 16px;
  }

  .nav-links a {
    padding: 0 9px;
    font-size: 13px;
  }

  .page-shell {
    width: min(100% - 24px, 600px);
    padding: 20px 0 48px;
  }

  .hero-panel,
  .content-section,
  .standards-section {
    border-radius: 24px;
  }

  .hero-panel {
    min-height: auto;
    padding: 27px 22px 28px;
  }

  .hero-topline {
    display: block;
  }

  .class-name {
    padding-right: 0;
    font-size: clamp(48px, 16vw, 68px);
  }

  .status-pill {
    width: fit-content;
    margin-top: 20px;
  }

  .date-toolbar {
    width: 100%;
    margin-top: 28px;
    grid-template-columns: 44px minmax(0, 1fr) 54px 44px;
  }

  .date-field {
    padding-inline: 6px;
  }

  .date-field input {
    width: 132px;
    font-size: 14px;
  }

  .quiet-button {
    padding-inline: 8px;
  }

  .members-block {
    margin-top: 22px;
    padding: 22px 18px;
  }

  .section-heading-row {
    display: block;
  }

  .leader-summary {
    margin-top: 15px;
    text-align: left;
  }

  .member-list {
    gap: 8px;
  }

  .member-chip {
    padding-inline: 13px;
  }

  .content-section,
  .standards-section {
    margin-top: 14px;
    padding: 30px 22px;
  }

  .split-intro {
    display: block;
  }

  .assignment-rule {
    margin-top: 16px;
    text-align: left;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .result-row {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
  }

  .result-class,
  .result-arrangement {
    grid-column: 1 / -1;
  }

  .result-state {
    grid-column: 2;
    grid-row: 1;
  }

  .project-header {
    display: none;
  }

  .project-list {
    margin-top: 28px;
  }

  .project-row {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }

  .project-standard {
    grid-column: 1 / -1;
    margin-top: 6px !important;
  }

  .standards-section {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .page-footer {
    display: block;
  }

  .page-footer p + p {
    margin-top: 6px;
  }
}

@media (max-width: 390px) {
  .date-toolbar {
    grid-template-columns: 40px minmax(0, 1fr) 48px 40px;
  }

  .date-field input {
    width: 122px;
  }

  .members-meta {
    align-items: flex-start;
    font-size: 12px;
  }
}

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