/* 오늘 화면 (templates/today.html). 5-1 B: UI_SPEC.md 화면 1 모양. 색·모서리·그림자·간격·글자는 모두 common.css의 토큰(var(--…))만 쓴다 (색 값을 직접 쓰지 않는다).
   마크업·class는 그대로라서 공통 부품(ui-card 등) class를 붙이지 않고, 같은 토큰으로 같은 모양을 만든다:
   맨 위 카드 = 히어로(ui-card-hero 값), 체험 안내 = info 알림 띠, 급식·바로가기 = 카드(ui-card 값), 끼니 이름 = 알약, 🚫 표시 = 위험 알약.
   (🚫 표시 .today-avoid는 .meals-avoid와 같은 규칙이어야 한다: tests/test_today_page.py가 두 규칙을 비교한다.)
   스펙에 없는 상태 안내(불러오는 중·저장본·오류·못 먹는 메뉴 요약)는 색·모서리·여백만 토큰으로 바꾸고 글자 크기는 그대로 둔다.
   누르는 글자("급식 전체 보기"·"내 학교로 바꾸기")와 "내일은 학교 쉬어요"는 16px, 🚫 재료 이름은 14px 굵게 (스펙보다 크게, 5-1 B에서 정함).
   모바일(360px)을 먼저 만들고 넓은 화면은 칸을 늘린다: 768~1023px는 바로가기 2×2, 1024px부터 급식(왼쪽 2) + 바로가기(오른쪽 1) 두 열.
   가로 스크롤이 생기지 않게 고정 너비 대신 %·grid·minmax·clamp를 쓴다. 마우스를 올려야만 보이는 것(hover)은 없다.
   position은 화면 읽기 프로그램용 숨김 글자(.today-sr-only) 하나에만 쓴다. */

[hidden] { display: none !important; } /* display를 정한 요소도 hidden이면 확실히 숨긴다 */

.today-page { max-width: 1040px; }

/* ---------- 맨 위 카드 (히어로): 남색→보라 바탕, 흰 글자(5.7:1 이상), 모서리 24, 안쪽 24, 사이 12 ----------
   "오늘"(h1) · 날짜는 한 줄씩, 학교·학년·반 알약은 한 줄에 나란히(넘치면 다음 줄), 체험 안내는 맨 아래 한 줄 전체 */
.today-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: var(--space-3) var(--space-2);
  min-width: 0;
  padding: var(--space-6);
  border-radius: var(--r-xl);
  background: var(--hero-gradient);
  box-shadow: var(--shadow-hero);
  color: var(--on-primary);
  overflow-wrap: anywhere;
}

.today-hero .today-heading {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

/* 날짜 (Display/Date): 390px 폰부터 30px, 더 좁으면 조금 줄어든다 */
.today-date {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  font-size: clamp(22px, 7.7vw, var(--fs-display));
  font-weight: 700;
  line-height: var(--lh-display);
  overflow-wrap: anywhere;
}

/* 학교 · 학년·반: 반투명 흰 알약 (흰 글자 4.60:1 이상, --hero-chip-bg는 common.css에서 계산해 둔 값) */
.today-school,
.today-class {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--hero-chip-bg);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: var(--lh-label);
  overflow-wrap: anywhere;
}

/* ---------- 첫 방문 기본 설정의 체험 안내 (맨 위 카드 안, 맨 아래): info 알림 띠. 링크는 굵은 밑줄 글자, 누르는 곳 44px ---------- */
.today-demo {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px; /* 안내 글자는 14px 이상 (5-1 D 글자 크기 규칙) */
  line-height: var(--lh-caption);
  overflow-wrap: anywhere;
}

.today-demo-text,
.today-demo-food { margin: 0; }

.today-demo-food { margin-top: var(--space-1); }

.today-demo-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  color: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: var(--lh-label);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.today-demo-link:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- 내일 쉬는 날 안내 (2-3): 맨 위 카드 바로 아래 warn 알림 띠. 그림 + 글자 (색만으로 알리지 않는다). 쉬는 날이 아니면 숨김 ---------- */
.today-off {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-width: 0;
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  background: var(--warning-soft);
  color: var(--warning);
  overflow-wrap: anywhere;
}

.today-off-icon { flex: none; font-size: 20px; line-height: 1; }

.today-off-title {
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  word-break: keep-all; /* 한국어 낱말 중간에서 줄이 바뀌지 않게 */
}

.today-off-reason {
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
}

/* ---------- 칸 나누기: 화면 내용 사이 16, 칸 제목(Heading 18px) + 오른쪽 바로 가기 글자 ---------- */
.today-section {
  min-width: 0;
  margin-top: var(--space-4);
}

.today-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-3);
}

.today-section-title {
  min-width: 0;
  margin: 0;
  font-size: var(--fs-heading);
  font-weight: 700;
  line-height: var(--lh-heading);
  overflow-wrap: anywhere;
}

.today-section > .today-section-title { margin-bottom: var(--space-3); }

/* "급식 전체 보기" (/meals): 테두리 없는 남색 글자 + ›, 누르는 곳 44px */
.today-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  padding: 0 var(--space-1);
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* 화살표는 꾸밈이라 화면 읽기 프로그램이 읽지 않게 대체 글자를 비운다 (그 문법을 모르는 브라우저는 윗줄을 쓴다) */
.today-more-link::after {
  content: " ›";
  content: " ›" / "";
}

.today-more-link:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------- 상태 안내: 불러오는 중 = info 띠, 저장해 둔 급식 = warn 띠 (글자로도 알린다) ---------- */
.today-message,
.today-stale {
  margin: 0 0 var(--space-3); /* 보일 때만 간격이 생기게 안내 글자에 둔다 (숨기면 빈 줄이 남지 않는다) */
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.today-message { background: var(--primary-soft); color: var(--primary-dark); }

.today-stale { background: var(--warning-soft); color: var(--warning); }

/* 화면에는 안 보이고 화면 읽기 프로그램만 읽는 글자 ("급식을 불러왔어요") */
.today-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 오류 · 학교 없음 ---------- */
.today-error,
.today-noschool {
  border: 1px solid var(--line); /* v2 카드: 1px 선 */
  padding: var(--space-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.today-error { background: var(--danger-soft); box-shadow: none; }

.today-error-text,
.today-noschool p {
  margin: 0 0 var(--space-3);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.today-error-text { color: var(--danger); }

.today-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* 버튼 (primary): 높이 52 이상, 모서리 16, 16px. 폰에서는 칸을 꽉 채우고 넓은 화면에서는 글자만큼 */
.today-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  padding: var(--space-3) var(--space-5);
  border: 0;
  border-radius: var(--r-md);
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: var(--lh-body);
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.today-btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- 못 먹는 재료가 든 메뉴 요약 (급식 맨 위). 🚫 + 글자 (색만으로 알리지 않는다) ---------- */
.today-alert {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--danger);
}

.today-alert-title {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.today-alert-icon { flex: none; }
.today-alert-text { min-width: 0; }

.today-alert-list { margin: var(--space-2) 0 0; padding: 0; list-style: none; }

.today-alert-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-2);
  padding: 6px 0;
  border-top: 1px solid var(--surface);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.today-alert-list li:first-child { border-top: 0; }

.today-alert-meal {
  flex: none;
  padding: 0 var(--space-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.today-alert-menu { min-width: 0; color: var(--text); font-weight: 700; }
.today-alert-names { min-width: 0; font-size: 14px; font-weight: 700; }

/* ---------- 급식 카드 (MealCard): 흰 바탕, 모서리 16, 안쪽 16, 그림자, 테두리 없음 ----------
   중식은 맨 앞 + 줄 간격 12 (스펙 MealRow), 조식·석식은 아래 작은 카드 + 줄 간격 8 (폭이 좁으면 한 줄에 하나) */
.today-card {
  border: 1px solid var(--line); /* v2 카드: 1px 선 */
  min-width: 0;
  padding: var(--space-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.today-others {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

/* 끼니 이름: 알약 (Label 12px) */
.today-meal-title {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 0 var(--space-1);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: var(--lh-label);
  overflow-wrap: anywhere;
}

.today-items { margin: 0; padding: 0; list-style: none; }

/* 메뉴 한 줄 (MealRow): 이름은 왼쪽, 🚫 알약은 오른쪽 (자리가 모자라면 다음 줄로). 아래 1px 선 (마지막 줄은 없음) */
.today-items li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) 0; /* 이름과 알약 사이는 알약의 margin-left(6px, /meals와 같다) */
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.today-items li:last-child { border-bottom: 0; }

.today-card-lunch .today-items li { padding: 12px 0; }

.today-item-name { min-width: 0; }

/* 못 먹는 재료가 든 메뉴 (/meals와 같다): 위험 알약, 🚫 + 재료 이름 14px 굵게 */
.today-items li.has-avoid { font-weight: 700; }

.today-avoid {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  max-width: 100%;
  margin-left: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--r-pill);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  line-height: var(--lh-label);
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.today-avoid-icon { flex: none; }
.today-avoid-names { min-width: 0; }

/* "급식표 정보로만 알려 줘요. 영양 선생님께 확인하세요" */
.today-note {
  margin: var(--space-3) 0 0;
  color: var(--text-sub);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.today-empty {
  border: 1px solid var(--line); /* v2 카드: 1px 선 */
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--text-sub);
  font-size: 15px;
  overflow-wrap: anywhere;
}

/* ---------- 바로가기 (ShortcutTile): 카드, 안쪽 16, 사이 14, 그림 칸 40×40 모서리 10 + 그림 22px, 이름 16px ----------
   폭이 좁으면 2칸, 더 좁으면(320px) 1칸 */
.today-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-links li { min-width: 0; }

.today-link {
  border: 1px solid var(--line); /* v2 카드: 1px 선 */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  height: 100%;
  min-height: 96px;
  padding: var(--space-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: var(--lh-body);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.today-link-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--surface); /* v2: 흰 그림 칸, 그림 색은 바로가기마다 */
  color: var(--primary);
}

/* 탭 아이콘(.tab-icon)을 같이 쓴다: 아래 탭의 알약 여백(common.css)을 지우고 22px로 */
.today-link-icon .tab-icon {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 0;
  background: none;
}

/* v2 바로가기 색: 급식 peach, 일정 sky, 배우기 mint, 못 먹는 재료 rose. 바탕은 연한 색, 흰 그림 칸 안의 그림은 같은 계열 진한 색 (흰 바탕 위 5.2:1 이상), 이름은 --text */
.today-link[href="/meals"] { background: var(--peach-soft); }
.today-link[href="/meals"] .today-link-icon { color: var(--peach-ink); }
.today-link[href="/schedule"] { background: var(--sky-soft); }
.today-link[href="/schedule"] .today-link-icon { color: var(--sky-ink); }
.today-link[href="/study"] { background: var(--mint-soft); }
.today-link[href="/study"] .today-link-icon { color: var(--mint-ink); }
.today-link[href="/ingredients"] { background: var(--rose-soft); }
.today-link[href="/ingredients"] .today-link-icon { color: var(--rose-ink); }

.today-link-label { min-width: 0; max-width: 100%; }

.today-link:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- 태블릿·PC ---------- */
@media (min-width: 768px) {
  .today-btn { width: auto; }
}

/* 768~1023px: 내용 칸 448~703px라 140px 칸이 3+1로 나뉘는 것을 막고 2×2로 */
@media (min-width: 768px) and (max-width: 1023px) {
  .today-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 1024px부터: 급식(왼쪽) + 바로가기(오른쪽) 두 열. 1280px이면 내용 칸 960px = 약 624px + 312px (바로가기 2×2) */
@media (min-width: 1024px) {
  .today-main {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
  }
}

/* ---------- 다가오는 마감 (D-day, 5-4 나): static/today_dday.js가 만들어 급식 칸과 바로가기 칸 사이에 넣는다 ----------
   칸 제목은 .today-section-title(18px), 카드는 공통 .ui-card, 버튼은 공통 .ui-btn(52px)을 마크업 class로 같이 쓴다 (여기에는 .ui-* 규칙을 쓰지 않는다).
   글자 크기(UI_SPEC 5-1 D 규칙): 제목·빈 목록·버튼·입력칸 16px, 남은 날 알약·안내·오류·상태 14px(알약은 굵게, 🚫 알약과 같은 결정), 날짜·칸 이름표 13px.
   남은 날 알약: 늘 글자(D-3 등)가 있고, 3일 안이면 warn 색(5.0:1), 그 밖에는 연한 남색(8.8:1). 지우기는 위험색(4.9:1), 누르는 곳 44×44 이상.
   폰(320px~)에서는 한 줄이 넘치면 다음 줄로 접는다(고정 너비 없음). 1024px부터는 급식(왼쪽, 두 줄 높이) 옆 오른쪽 열에 마감 → 바로가기 순서. */
.dday-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.dday-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dday-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-width: 0;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

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

.dday-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: var(--lh-label);
  overflow-wrap: anywhere;
}

.dday-badge.is-soon {
  background: var(--warning-soft);
  color: var(--warning);
}

.dday-item-title {
  flex: 1 1 8em;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.dday-item-date {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: var(--lh-caption);
}

.dday-remove {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  margin-left: auto;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--danger);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: var(--lh-label);
  overflow-wrap: anywhere;
  cursor: pointer;
}

.dday-empty {
  margin: 0;
  font-size: 16px;
  line-height: var(--lh-body);
}

.dday-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.dday-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.dday-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: var(--lh-caption);
  overflow-wrap: anywhere;
}

/* 입력칸: 1px --border-strong(3.86:1), 모서리 16, 48px. 글자 16px 이상 (아이폰에서 누를 때 화면이 저절로 확대되지 않게) */
.dday-input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: var(--lh-body);
}

.dday-input[aria-invalid="true"] { border-color: var(--danger); }

/* 저장·취소: 칸이 넓으면 나란히, 좁으면(320px) 위아래로 */
.dday-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: var(--space-2);
}

.dday-error {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  line-height: var(--lh-caption);
  overflow-wrap: anywhere;
}

.dday-status {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  line-height: var(--lh-caption);
  overflow-wrap: anywhere;
}

.dday-privacy {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: var(--lh-caption);
  overflow-wrap: anywhere;
}

.dday-remove:focus-visible,
.dday-input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

@media (min-width: 1024px) {
  .dday-host { grid-template-rows: auto 1fr; }
  .dday-host > .today-section:first-child { grid-row: 1 / span 2; }
  .dday-host > .dday-section { grid-column: 2; grid-row: 1; }
  .dday-host > .dday-section + .today-section { grid-column: 2; grid-row: 2; }
}

/* ---------- 오늘의 단어 (F8): static/today_word.js가 #today-word 칸 안을 채운다 ----------
   칸 제목·"단어 배우기" 링크는 오늘 급식 칸과 같은 .today-section-head·.today-section-title·.today-more-link(44px)를 쓰고,
   카드는 공통 .ui-card를 마크업 class로 같이 쓴다 (여기에는 공통 부품 규칙을 쓰지 않는다). 카드 바탕만 연한 파랑(--primary-soft)으로 바꾼다.
   글자: 단어 26~34px 굵게(크게), 읽는 법은 흰 알약 칩 14px(다른 알약과 같은 단계, 읽는 법이 있을 때만 보인다), 뜻 17px 굵게, 불러오지 못함 안내 15px. 색은 토큰만.
   명암비: 단어(--text) 14.5:1, 뜻(--primary-dark) 5.7:1 (연한 파랑 위), 칩 글자(--text-sub) 6.6:1 (흰 칩 위). */
.today-word-card { background: var(--primary-soft); }

.today-word-text {
  margin: 0;
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 700;
  line-height: var(--lh-display);
  overflow-wrap: anywhere;
}

.today-word-reading {
  display: inline-block;
  max-width: 100%;
  margin: var(--space-2) 0 0;
  padding: 2px var(--space-3);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.today-word-meaning {
  margin: var(--space-2) 0 0;
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 700;
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
}

.today-word-error {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

/* 1024px부터: 급식 칸과 같은 왼쪽 열, 급식 바로 아래 (오른쪽 열은 다가오는 마감 → 바로가기 그대로) */
@media (min-width: 1024px) {
  .today-main > .today-word-section { grid-column: 1; }
}

/* ---------- 다가오는 학교 일정: static/today_events.js가 #today-events 칸 안을 채운다 ----------
   칸 제목·"일정 보기" 링크는 오늘 급식 칸과 같은 .today-section-head·.today-section-title·.today-more-link(44px)를, 카드는 공통 .ui-card를 마크업 class로 같이 쓴다.
   한 줄: 날짜(15px, 보조 글자색 6.6:1) · 일정 이름(16px, 원문) · 남은 날 알약(14px 굵게, 연한 파랑 위 남색 5.7:1). 좁으면 다음 줄로 접힌다. 색은 토큰만. */
.today-events-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-events-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-width: 0;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

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

.today-events-date {
  color: var(--text-sub);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.today-events-name {
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.today-events-due {
  padding: 2px var(--space-3);
  border-radius: var(--r-pill);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.today-events-empty {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

/* 1024px부터: 오늘의 단어와 같은 왼쪽 열, 그 바로 아래 */
@media (min-width: 1024px) {
  .today-main > .today-events-section { grid-column: 1; }
}
