:root {
  --ink: #111827;
  --ink-soft: #263245;
  --paper: #f3f0e8;
  --paper-deep: #e9e4d8;
  --white: #fffdf8;
  --blue: #1746d1;
  --blue-dark: #0d2f99;
  --blue-soft: #dfe7ff;
  --orange: #ff5d3a;
  --signal: #d9ff62;
  --green: #168455;
  --muted: #697386;
  --line: rgba(17, 24, 39, 0.16);
  --shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
  --shell: min(1180px, calc(100% - 40px));
  --display: "Space Grotesk", "IBM Plex Sans KR", sans-serif;
  --body: "IBM Plex Sans KR", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(17, 24, 39, 0.07) 0.7px, transparent 0.7px);
  background-size: 6px 6px;
  content: "";
  opacity: 0.35;
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.section-shell,
.header-inner,
.footer-inner {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.92);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--signal);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  transform: rotate(-3deg);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.desktop-nav a {
  position: relative;
  padding: 26px 0;
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 20px;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.header-action:hover {
  background: var(--ink);
  color: white;
}

.header-action-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.school-home {
  padding: 58px 0 72px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.school-home-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 30px;
}

.school-home-heading .section-kicker {
  margin-bottom: 12px;
}

.school-home-heading h1 {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.school-date-block {
  display: grid;
  gap: 5px;
  padding: 0 0 5px 26px;
  border-left: 3px solid var(--blue);
  text-align: right;
}

.school-date-block span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.school-date-block strong {
  font-size: 14px;
}

.dday-board {
  min-height: 104px;
  display: grid;
  grid-template-columns: 145px 1fr;
  background: var(--ink);
  color: white;
  border: 1px solid var(--ink);
}

.dday-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.dday-title h2 {
  font-size: 14px;
}

.live-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px rgba(217, 255, 98, 0.13);
}

.dday-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.dday-item {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.dday-item:last-child {
  border-right: 0;
}

.dday-item span {
  overflow: hidden;
  color: #b8c1cf;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dday-item strong {
  color: var(--signal);
  font-family: var(--display);
  font-size: 25px;
  letter-spacing: -0.04em;
}

.dday-item small {
  color: #8e9aab;
  font-size: 9px;
}

.dday-item.past strong {
  color: #9aa4b3;
}

.loading-card {
  grid-column: 1 / -1;
}

.school-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.92fr;
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.school-panel {
  min-width: 0;
  min-height: 380px;
  padding: 27px;
  background: var(--white);
}

.school-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.school-panel-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-number {
  color: var(--blue);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
}

.school-panel-head p {
  font-size: 13px;
  font-weight: 700;
}

.panel-state,
.data-source {
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.panel-action {
  padding: 5px 8px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.panel-action:hover {
  background: var(--ink);
  color: white;
}

.school-panel > h2 {
  margin-top: 24px;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.school-meal-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  margin-top: 22px;
  list-style: none;
}

.school-meal-list li {
  position: relative;
  padding: 10px 0 10px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.school-meal-list li::before {
  position: absolute;
  top: 16px;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--orange);
  content: "";
}

.today-class-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 22px;
}

.today-class-list .schedule-chip,
.today-class-list .empty-chip {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px;
}

.today-class-list .schedule-chip::first-letter {
  color: var(--blue);
  font-weight: 700;
}

.today-class-list .schedule-chip.free {
  color: var(--muted);
  background: transparent;
}

.today-class-list .empty-chip {
  grid-column: 1 / -1;
  color: var(--muted);
}

.notice-panel {
  background: var(--blue-soft);
}

.notice-list {
  display: grid;
  margin-top: 7px;
}

.notice-item {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 15px 25px 15px 0;
  border-bottom: 1px solid rgba(23, 70, 209, 0.18);
}

.notice-item:last-child {
  border-bottom: 0;
}

.notice-item.important::after {
  position: absolute;
  top: 17px;
  right: 0;
  padding: 2px 5px;
  background: var(--orange);
  color: white;
  content: "중요";
  font-size: 8px;
  font-weight: 700;
}

.notice-item time {
  color: var(--blue);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
}

.notice-item strong {
  font-size: 13px;
  line-height: 1.4;
}

.notice-item p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notice-item a {
  color: var(--blue);
}

.notice-loading,
.notice-empty {
  padding: 25px 0;
  color: var(--muted);
  font-size: 12px;
}

.school-utility-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.school-utility-bar a {
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 17px 23px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  transition: background 0.2s ease, color 0.2s ease;
}

.school-utility-bar a:last-child {
  border-right: 0;
}

.school-utility-bar a:hover {
  background: var(--ink);
  color: white;
}

.school-utility-bar span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.school-utility-bar strong {
  margin-top: 6px;
  font-size: 12px;
}

.school-utility-bar small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% + 80px);
  width: 1px;
  background: var(--line);
  content: "";
}

.hero-grid {
  width: var(--shell);
  min-height: 640px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: 70px;
  padding: 76px 0 82px;
}

.eyebrow {
  display: flex;
  gap: 28px;
  margin-bottom: 34px;
  color: var(--blue);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.hero h1 {
  max-width: 720px;
  font-family: var(--display);
  font-size: clamp(52px, 6.2vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero h1 span {
  display: block;
  color: var(--blue);
}

.hero-description {
  max-width: 630px;
  margin-top: 30px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
}

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

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--blue);
  color: white;
  box-shadow: 7px 7px 0 var(--ink);
}

.button-primary:hover {
  background: var(--blue-dark);
  box-shadow: 4px 4px 0 var(--ink);
}

.button-quiet {
  border-color: var(--line);
  background: transparent;
}

.button-quiet:hover {
  border-color: var(--ink);
  background: var(--white);
}

.button-dark {
  background: var(--ink);
  color: white;
}

.button-dark:hover {
  background: var(--blue);
}

.button-signal {
  background: var(--signal);
  color: var(--ink);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.25);
}

.button-light {
  background: var(--white);
  color: var(--ink);
}

.hero-stats {
  display: flex;
  gap: 42px;
  margin-top: 58px;
}

.hero-stats div {
  display: grid;
  gap: 2px;
}

.hero-stats dt {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.hero-stats dd {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

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

.visual-grid {
  position: absolute;
  inset: 20px -80px -50px 25px;
  background-image:
    linear-gradient(rgba(23, 70, 209, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 70, 209, 0.13) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
}

.signal-orbit {
  position: absolute;
  border: 1px solid var(--blue);
  border-radius: 50%;
}

.signal-orbit::after {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

.signal-orbit-large {
  top: 25px;
  right: 8px;
  width: 360px;
  height: 360px;
  animation: orbit-spin 20s linear infinite;
}

.signal-orbit-large::after {
  top: 52px;
  left: 25px;
}

.signal-orbit-small {
  right: 95px;
  bottom: 18px;
  width: 190px;
  height: 190px;
  border-color: var(--orange);
  animation: orbit-spin 14s linear infinite reverse;
}

.signal-orbit-small::after {
  right: 7px;
  bottom: 42px;
  background: var(--blue);
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

.visual-card {
  position: absolute;
  box-shadow: var(--shadow);
}

.visual-card-main {
  top: 72px;
  left: 22px;
  z-index: 2;
  width: min(365px, 82%);
  min-height: 390px;
  padding: 30px;
  background: var(--blue);
  color: white;
  transform: rotate(-3deg);
}

.visual-label,
.visual-meta,
.visual-card-note > span,
.game-label,
.dialog-kicker {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.visual-code {
  margin-top: 54px;
  color: var(--signal);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
}

.visual-code span {
  color: var(--orange);
}

.visual-card-main h2 {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.visual-progress {
  height: 5px;
  margin-top: 66px;
  background: rgba(255, 255, 255, 0.25);
}

.visual-progress span {
  width: 62%;
  height: 100%;
  display: block;
  background: var(--signal);
}

.visual-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.visual-card-note {
  right: -10px;
  bottom: 42px;
  z-index: 3;
  width: 205px;
  padding: 24px;
  background: var(--signal);
  transform: rotate(4deg);
}

.visual-card-note strong {
  display: block;
  margin-top: 15px;
  font-size: 16px;
  line-height: 1.5;
}

.visual-status {
  position: absolute;
  top: 28px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(22, 132, 85, 0.13);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 9px rgba(22, 132, 85, 0); }
}

.today-strip {
  padding: 74px 0 84px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.strip-heading {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}

.section-kicker {
  color: var(--blue);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.section-kicker.light {
  color: var(--signal);
}

.strip-heading h2,
.section-heading h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.strip-heading > p:last-child {
  color: var(--muted);
  font-size: 13px;
}

.briefing-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.15fr 0.9fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.brief-card {
  min-height: 245px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 27px 25px;
  border-right: 1px solid var(--line);
}

.brief-card:last-child {
  border-right: none;
}

.brief-index {
  color: var(--blue);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
}

.brief-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brief-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.brief-content h3 {
  margin-top: 13px;
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.meal-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 15px;
  list-style: none;
  color: var(--ink-soft);
  font-size: 13px;
}

.meal-preview li::before {
  color: var(--orange);
  content: "· ";
}

.schedule-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.schedule-chip,
.empty-chip {
  padding: 6px 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 11px;
  font-weight: 600;
}

.schedule-chip.free {
  color: var(--muted);
  background: transparent;
}

.text-button {
  display: inline-block;
  margin-top: auto;
  padding-top: 17px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mission-brief {
  background: var(--blue-soft);
}

.mission-brief p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.school-info-section,
.featured-section,
.activities-section,
.games-section {
  padding: 118px 0;
}

.school-info-section {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.school-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.school-info-card {
  min-height: 225px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 28px;
  background: var(--white);
}

.school-info-card:nth-child(2) {
  background: var(--blue-soft);
}

.school-info-card:nth-child(3) {
  background: var(--signal);
}

.school-info-card > span {
  color: var(--blue);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.school-info-card h3 {
  margin-top: 22px;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.school-info-card p {
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.school-info-card a {
  margin-top: auto;
  padding-top: 22px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end;
  gap: 50px;
  margin-bottom: 48px;
}

.section-heading .section-kicker {
  margin-bottom: 13px;
}

.section-heading > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.featured-story {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  min-height: 530px;
  border: 1px solid var(--ink);
  background: var(--white);
}

.featured-art {
  position: relative;
  min-height: 500px;
  overflow: hidden;
}

.featured-art-ai {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 22%, rgba(217, 255, 98, 0.85) 22.5% 23%, transparent 23.5% 34%, rgba(217, 255, 98, 0.5) 34.5% 35%, transparent 35.5%),
    var(--blue);
}

.featured-art-ai::before,
.featured-art-ai::after {
  position: absolute;
  background: var(--signal);
  content: "";
}

.featured-art-ai::before {
  top: -20%;
  bottom: -20%;
  left: 50%;
  width: 1px;
}

.featured-art-ai::after {
  top: 50%;
  right: -20%;
  left: -20%;
  height: 1px;
}

.art-coordinate {
  position: absolute;
  top: 25px;
  left: 25px;
  z-index: 2;
  color: white;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.art-sphere {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 175px;
  height: 175px;
  border: 20px solid var(--orange);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 1px var(--ink);
}

.art-type {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  color: white;
  font-family: var(--display);
  font-size: clamp(46px, 6vw, 82px);
  font-weight: 700;
  line-height: 0.77;
  letter-spacing: -0.08em;
  text-align: center;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
}

.art-number {
  position: absolute;
  right: 25px;
  bottom: 18px;
  z-index: 3;
  color: var(--signal);
  font-family: var(--display);
  font-size: 68px;
  font-weight: 700;
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 55px;
}

.activity-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.type-badge {
  padding: 5px 8px;
  color: var(--ink);
  font-weight: 700;
}

.type-cardnews { background: var(--signal); }
.type-game { background: #ffc8ba; }
.type-quiz { background: var(--blue-soft); }
.type-project { background: #dff4e8; }

.featured-copy h3 {
  margin-top: 28px;
  font-family: var(--display);
  font-size: clamp(36px, 4.5vw, 57px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.featured-copy > p {
  margin-top: 25px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
}

.bookmark-button {
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bookmark-button.saved {
  border-color: var(--blue);
  color: var(--blue);
}

.activities-section {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-button {
  flex: 0 0 auto;
  padding: 9px 15px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.saved-filter {
  margin-left: auto;
}

.saved-filter span {
  min-width: 18px;
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 34px;
  background: var(--line);
  border: 1px solid var(--line);
}

.activity-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--white);
}

.activity-card[hidden] { display: none; }

.activity-thumb {
  position: relative;
  min-height: 235px;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  overflow: hidden;
  color: white;
}

.activity-thumb::before,
.activity-thumb::after {
  position: absolute;
  content: "";
}

.thumb-ai { background: var(--blue); }
.thumb-ai::before {
  top: 30px;
  right: 34px;
  width: 110px;
  height: 110px;
  border: 18px solid var(--signal);
  border-radius: 50%;
}
.thumb-ai::after {
  top: 0;
  bottom: 0;
  left: 48%;
  width: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.thumb-deepfake { background: #191919; }
.thumb-deepfake::before {
  top: 35px;
  left: 50%;
  width: 105px;
  height: 145px;
  border: 2px solid var(--orange);
  border-radius: 50% 50% 46% 46%;
  transform: translateX(-50%);
  box-shadow: 18px 0 0 rgba(23, 70, 209, 0.7), -18px 0 0 rgba(217, 255, 98, 0.45);
}

.thumb-binary { background: var(--orange); }
.thumb-binary::before {
  inset: 20px;
  background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(17, 24, 39, 0.18) 18px 19px);
  border: 1px solid var(--ink);
}

.thumb-data { background: #267457; }
.thumb-data::before {
  top: 30px;
  right: 35px;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(var(--signal) 2px, transparent 2px);
  background-size: 16px 16px;
  transform: rotate(8deg);
}

.thumb-prompt { background: #532b8c; }
.thumb-prompt::before {
  top: 32px;
  right: 28px;
  width: 140px;
  height: 110px;
  border: 1px solid white;
  box-shadow: -13px 13px 0 var(--signal), -26px 26px 0 var(--orange);
}

.thumb-web { background: #e9e4d8; color: var(--ink); }
.thumb-web::before {
  top: 32px;
  right: 32px;
  width: 135px;
  height: 120px;
  border: 2px solid var(--blue);
  background: linear-gradient(var(--blue) 0 18px, transparent 18px);
  box-shadow: -15px 15px 0 var(--orange);
}

.thumb-code {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-size: 46px;
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.06em;
}

.activity-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 7px 8px;
}

.activity-card h3 {
  margin-top: 18px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.activity-card-description {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.activity-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
}

.activity-open {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.card-bookmark {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 19px;
  cursor: pointer;
}

.card-bookmark.saved {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.empty-activities {
  padding: 70px 0;
  color: var(--muted);
  text-align: center;
}

.mission-section {
  padding: 120px 0;
  background: var(--ink);
  color: white;
}

.mission-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 90px;
}

.mission-intro h2 {
  margin-top: 18px;
  font-family: var(--display);
  font-size: clamp(43px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.mission-intro > p:not(.section-kicker) {
  max-width: 450px;
  margin-top: 27px;
  color: #bcc4d1;
  font-size: 15px;
  line-height: 1.8;
}

.streak-display {
  display: grid;
  gap: 4px;
  margin-top: 58px;
  font-family: var(--display);
}

.streak-display > span {
  color: var(--signal);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.streak-display strong {
  font-size: 34px;
  letter-spacing: -0.04em;
}

.mission-card {
  min-height: 470px;
  padding: 42px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 12px 12px 0 var(--blue), 24px 24px 0 var(--signal);
}

.mission-card-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--blue);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.mission-card h3 {
  max-width: 650px;
  margin-top: 52px;
  font-size: clamp(23px, 3vw, 33px);
  line-height: 1.42;
  letter-spacing: -0.035em;
}

.mission-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 35px;
}

.mission-option {
  min-height: 58px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mission-option:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.mission-option.correct {
  border-color: var(--green);
  background: #dcf6e9;
}

.mission-option.wrong {
  border-color: #c53e2b;
  background: #ffe1da;
}

.mission-option:disabled {
  cursor: default;
}

.mission-result {
  min-height: 48px;
  margin-top: 23px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.mission-result strong {
  color: var(--blue);
}

.game-stage {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  min-height: 490px;
  background: var(--orange);
  border: 1px solid var(--ink);
}

.game-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 58px;
}

.game-copy h3 {
  margin-top: 24px;
  font-family: var(--display);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.game-copy p {
  max-width: 430px;
  margin: 24px 0 32px;
  font-size: 14px;
  line-height: 1.75;
}

.binary-game {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 35px;
  padding: 28px;
  background: var(--ink);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.binary-game-head {
  display: flex;
  justify-content: space-between;
  color: var(--signal);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.binary-screen {
  display: grid;
  place-items: center;
  min-height: 245px;
  margin: 25px 0 18px;
  border: 1px solid rgba(217, 255, 98, 0.4);
  background-image: linear-gradient(rgba(217, 255, 98, 0.05) 1px, transparent 1px);
  background-size: 100% 24px;
  text-align: center;
}

.binary-caption {
  align-self: end;
  color: #8c97a7;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.binary-screen strong {
  color: var(--signal);
  font-family: var(--display);
  font-size: clamp(52px, 7vw, 82px);
  letter-spacing: 0.08em;
  text-shadow: 0 0 25px rgba(217, 255, 98, 0.25);
}

.binary-screen p {
  align-self: start;
  color: #aab3c1;
  font-size: 12px;
}

.binary-form {
  display: grid;
  grid-template-columns: 1fr 85px;
}

.binary-form input,
.binary-form button {
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.binary-form input {
  min-width: 0;
  padding: 0 15px;
  background: transparent;
  color: white;
}

.binary-form button {
  background: var(--signal);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.binary-form :disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.submit-section {
  padding: 0 0 110px;
}

.submit-card {
  min-height: 350px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 80px;
  padding: 65px 70px;
  background: var(--blue);
  color: white;
}

.submit-card h2 {
  margin-top: 16px;
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.submit-copy p {
  margin-bottom: 30px;
  color: #dce4ff;
  font-size: 14px;
  line-height: 1.8;
}

.submit-copy .button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.site-footer {
  padding: 55px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand {
  margin-bottom: 18px;
}

.footer-inner > div > p,
.footer-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.footer-meta {
  align-self: end;
  text-align: right;
}

.mobile-nav {
  display: none;
}

dialog {
  max-width: none;
  max-height: none;
  border: 0;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(7, 12, 22, 0.72);
  backdrop-filter: blur(8px);
}

.activity-dialog {
  width: min(760px, calc(100% - 32px));
  padding: 52px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.dialog-activity-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.activity-dialog > h2 {
  max-width: 610px;
  margin-top: 21px;
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.dialog-summary {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.cardnews-viewer {
  margin-top: 35px;
}

.cardnews-slide {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px;
  background: var(--blue);
  color: white;
}

.slide-number {
  color: var(--signal);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.cardnews-slide h3 {
  max-width: 540px;
  font-family: var(--display);
  font-size: clamp(29px, 5vw, 43px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.cardnews-slide p {
  max-width: 570px;
  color: #e0e7ff;
  font-size: 14px;
  line-height: 1.75;
}

.cardnews-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 15px;
}

.cardnews-controls button {
  min-height: 43px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cardnews-controls button:last-child { justify-self: end; }
.cardnews-controls button:disabled { opacity: 0.35; cursor: default; }
.cardnews-controls span { padding: 0 22px; font-size: 12px; font-weight: 700; }

.timetable-dialog {
  width: min(1060px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: 42px;
  background: var(--white);
  overflow: auto;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.dialog-kicker {
  color: var(--blue);
}

.dialog-header h2 {
  margin-top: 7px;
  font-family: var(--display);
  font-size: 36px;
  letter-spacing: -0.05em;
}

.static-close {
  position: static;
  flex: 0 0 auto;
}

.timetable-guide {
  max-width: 720px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.grade-selection-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 27px;
  padding: 18px 20px;
  border: 2px solid #93afff;
  background: var(--blue-soft);
}

.grade-step {
  display: inline-block;
  padding: 4px 8px;
  background: var(--blue);
  color: white;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.grade-selection-copy strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-dark);
  font-size: 17px;
}

.grade-selection-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.grade-field {
  display: grid;
  gap: 5px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 700;
}

.grade-field select {
  min-width: 150px;
  padding: 11px 35px 11px 12px;
  border: 2px solid var(--blue);
  background: white;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.subject-source-status {
  min-height: 20px;
  margin: 10px 0 13px;
  color: var(--muted);
  font-size: 12px;
}

.subject-source-status.error { color: #b42318; }

.timetable-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.personal-timetable {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.personal-timetable th {
  padding: 11px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--blue-dark);
  font-size: 12px;
}

.personal-timetable td {
  padding: 5px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.personal-timetable tr:last-child td,
.personal-timetable tr:last-child th { border-bottom: 0; }
.personal-timetable th:last-child,
.personal-timetable td:last-child { border-right: 0; }

.timetable-input {
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: #f7f7f5;
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}

.timetable-input:focus {
  border-color: var(--blue);
  background: white;
  outline: 2px solid var(--blue-soft);
}

.timetable-input.is-free-period {
  background: #edf0f3;
  color: var(--muted);
  font-weight: 700;
}

.timetable-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.timetable-actions > div {
  display: flex;
  gap: 10px;
}

.timetable-actions p {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.timetable-actions p.success { color: var(--green); font-weight: 700; }
.timetable-actions p.unsaved { color: #a85a00; font-weight: 700; }
.timetable-actions p.error { color: #b42318; font-weight: 700; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 13px 19px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 25px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1020px) {
  .desktop-nav { display: none; }

  .school-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .notice-panel {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .notice-list {
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
  }

  .hero {
    min-height: auto;
  }

  .hero::before { display: none; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-top: 70px;
  }

  .hero-copy { max-width: 800px; }
  .hero-visual { width: min(600px, 100%); margin: 0 auto; }

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

  .mission-brief {
    grid-column: 1 / -1;
    min-height: 205px;
    border-top: 1px solid var(--line);
  }

  .featured-story { grid-template-columns: 1fr 0.9fr; }
  .featured-copy { padding: 38px; }

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

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

  .school-info-card:last-child { grid-column: 1 / -1; }

  .mission-layout {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .mission-intro { max-width: 720px; }

  .game-stage { grid-template-columns: 1fr; }
  .binary-game { min-height: 450px; }
}

@media (max-width: 720px) {
  :root { --shell: min(100% - 28px, 1180px); }

  html { scroll-padding-top: 70px; }

  body { padding-bottom: 72px; }

  .site-header { position: sticky; }
  .header-inner { min-height: 66px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { display: none; }
  .header-action { display: none; }

  .school-home {
    padding: 40px 0 55px;
  }

  .school-home-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
  }

  .school-home-heading h1 {
    font-size: 48px;
  }

  .school-date-block {
    padding: 0 0 0 15px;
    text-align: left;
  }

  .dday-board {
    grid-template-columns: 1fr;
  }

  .dday-title {
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .dday-list {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dday-list::-webkit-scrollbar {
    display: none;
  }

  .dday-item {
    min-width: 180px;
  }

  .loading-card {
    min-width: 100%;
  }

  .school-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .school-panel,
  .notice-panel {
    min-height: 0;
    grid-column: auto;
    padding: 23px 20px;
  }

  .school-meal-list,
  .today-class-list,
  .notice-list {
    grid-template-columns: 1fr;
  }

  .school-utility-bar {
    grid-template-columns: 1fr;
  }

  .school-utility-bar a,
  .school-utility-bar a:last-child {
    min-height: 84px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .school-utility-bar a:last-child {
    border-bottom: 0;
  }

  .hero-grid {
    min-height: auto;
    padding: 56px 0 65px;
  }

  .eyebrow { gap: 14px; margin-bottom: 25px; font-size: 9px; }

  .hero h1 {
    font-size: clamp(40px, 11.5vw, 50px);
    line-height: 1;
  }

  .hero-description {
    font-size: 15px;
    line-height: 1.7;
    word-break: normal;
    overflow-wrap: anywhere;
  }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-stats { justify-content: space-between; gap: 15px; margin-top: 43px; }
  .hero-stats dt { font-size: 24px; }

  .hero-visual { min-height: 420px; }
  .visual-card-main { top: 60px; left: 2px; width: 78%; min-height: 320px; padding: 23px; }
  .visual-card-main h2 { font-size: 28px; }
  .visual-code { margin-top: 40px; }
  .visual-progress { margin-top: 42px; }
  .visual-card-note { right: 0; bottom: 6px; width: 165px; padding: 18px; }
  .visual-card-note strong { font-size: 13px; }
  .signal-orbit-large { width: 280px; height: 280px; }

  .today-strip,
  .school-info-section,
  .featured-section,
  .activities-section,
  .games-section,
  .mission-section { padding: 78px 0; }

  .strip-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .strip-heading > p:last-child { margin-top: 8px; }

  .briefing-grid { grid-template-columns: 1fr; }
  .brief-card { min-height: 215px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brief-card:last-child { border-bottom: 0; }
  .mission-brief { grid-column: auto; border-top: 0; }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 32px;
  }

  .section-heading h2,
  .strip-heading h2 { font-size: 35px; }

  .featured-story { grid-template-columns: 1fr; }
  .featured-art { min-height: 350px; }
  .featured-copy { padding: 32px 25px 38px; }
  .featured-copy h3 { font-size: 38px; }
  .featured-actions { align-items: stretch; flex-direction: column; }

  .filter-bar { margin-right: -14px; padding-right: 14px; }
  .saved-filter { margin-left: 0; }
  .activity-grid { grid-template-columns: 1fr; }

  .school-info-grid { grid-template-columns: 1fr; }
  .school-info-card:last-child { grid-column: auto; }
  .activity-thumb { min-height: 245px; }

  .mission-card { min-height: 0; padding: 27px 22px; box-shadow: 7px 7px 0 var(--blue), 14px 14px 0 var(--signal); }
  .mission-card h3 { margin-top: 35px; font-size: 24px; }
  .mission-options { grid-template-columns: 1fr; }

  .game-copy { padding: 36px 25px; }
  .game-copy h3 { font-size: 40px; }
  .binary-game { min-height: 390px; margin: 0 14px 14px; padding: 18px; }
  .binary-screen { min-height: 215px; }

  .submit-section { padding-bottom: 70px; }
  .submit-card { width: 100%; grid-template-columns: 1fr; gap: 35px; padding: 50px 28px; }
  .submit-card h2 { font-size: 42px; }

  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-meta { align-self: auto; text-align: left; }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    height: calc(68px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.96);
    backdrop-filter: blur(14px);
  }

  .mobile-nav a,
  .mobile-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border: 0;
    background: transparent;
    font-size: 9px;
    font-weight: 700;
  }

  .mobile-nav span { color: var(--blue); font-size: 18px; line-height: 1; }

  .activity-dialog,
  .timetable-dialog {
    width: 100%;
    max-height: 92vh;
    margin: auto 0 0;
    padding: 28px 18px;
  }

  .activity-dialog { min-height: 78vh; }
  .activity-dialog > h2 { padding-right: 35px; }
  .cardnews-slide { min-height: 360px; padding: 27px; }

  .timetable-dialog { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .dialog-header h2 { font-size: 30px; }
  .grade-selection-card { align-items: stretch; flex-direction: column; }
  .grade-field select { width: 100%; }
  .timetable-actions { align-items: stretch; flex-direction: column; }
  .timetable-actions > div { flex-direction: column; }
  .timetable-actions .button { width: 100%; }
  .timetable-actions p { text-align: left; }

  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}
