/* =========================================================
   스쿨톡톡 공통 조각 v2 — 또렷한 파랑 × 리퀴드 글래스 (docs/design-system.md)
   이름 규칙: .c-이름, 변형 .c-이름--변형, 상태 .is-상태, 유리 .g-*
   내용(카드·목록·입력)은 또렷한 흰색, 떠 있는 층(메뉴·시트·토스트·세그먼트·떠 있는 버튼)만 유리.
   ========================================================= */

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--color-text);
  background: var(--gradient-bg), var(--color-bg);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary-text); }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
code, kbd, samp, pre { font-family: var(--font-body); }  /* 브라우저 기본(모노스페이스) 대신 Pretendard */
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }
b, strong { font-weight: var(--fw-bold); }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
  box-shadow: 0 0 0 1px #fff;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.c-skip {
  position: absolute; left: var(--space-4); top: -60px; z-index: var(--z-toast);
  background: var(--color-primary); color: var(--color-text-on-primary); font-weight: var(--fw-semibold);
  padding: var(--space-2) var(--space-4); border-radius: var(--r-pill); text-decoration: none;
}
.c-skip:focus { top: var(--space-4); }

/* ---------- 아이콘 (Material Symbols Rounded 스프라이트) · 이모지 (Tossface) ---------- */
.i {
  display: inline-block; flex-shrink: 0; vertical-align: middle;
  width: var(--i-size, var(--icon-md)); height: var(--i-size, var(--icon-md));
  fill: currentColor;
}
.i--sm { --i-size: var(--icon-sm); }
.i--lg { --i-size: var(--icon-lg); }
.i--xl { --i-size: var(--icon-xl); }
.emoji, .tossface {
  font-family: var(--font-emoji); font-style: normal; font-weight: 400;
  line-height: 1; letter-spacing: 0; display: inline-block;
}

/* ---------- 리퀴드 글래스 (피그마 Light 레시피: 흰 10%+50%, 안쪽 빛 ±2/2/−2, 흐림 20, 그림자 0·8·12·8%) ---------- */
.g-thin {
  background: var(--glass-thin-bg);
  -webkit-backdrop-filter: var(--glass-filter-thin); backdrop-filter: var(--glass-filter-thin);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: var(--glass-rim-thin), 0 2px 6px rgba(0, 0, 0, .06);
}
.g-regular {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: var(--glass-border);
  box-shadow: var(--glass-rim), var(--shadow-2);
}
.g-thick {
  background: var(--glass-thick-bg);
  -webkit-backdrop-filter: var(--glass-filter-thick); backdrop-filter: var(--glass-filter-thick);
  border: var(--glass-border);
  box-shadow: var(--glass-rim-thick), var(--shadow-3);
}
.g-tinted {
  background: var(--glass-tinted-bg); color: #fff;
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), var(--shadow-blue);
}
.g-dark {
  background: var(--glass-dark-bg); color: #fff;
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), var(--shadow-3);
}

/* ---------- 페이지 뼈대 ---------- */
.l-page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-5) var(--page-x)
           calc(var(--nav-h) + var(--nav-gap) * 2 + var(--safe-bottom) + var(--space-4));
}
.l-stack > * + * { margin-top: var(--space-4); }
.l-stack--lg > * + * { margin-top: var(--space-6); }
.l-row { display: flex; align-items: center; gap: var(--space-2); }
.l-row--between { justify-content: space-between; }
.l-row--wrap { flex-wrap: wrap; }
/* 버튼 두 개: 한 줄에 다 안 들어가면 각각 한 줄씩 꽉 차게 */
.l-row--split { flex-wrap: wrap; }
.l-row--split > * { flex: 1 1 140px; }
.l-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.l-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.u-grow { flex: 1; min-width: 0; }
.u-muted { color: var(--color-text-muted); }
.u-center { text-align: center; }
.u-mt-0 { margin-top: 0 !important; }
.u-num { font-variant-numeric: tabular-nums; }

/* ---------- 머리말 ---------- */
.c-header { padding: var(--space-2) 0 var(--space-5); }
.c-header__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.c-header__title {
  font-size: var(--fs-3xl); line-height: 1.25; font-weight: var(--fw-bold);
  color: var(--color-text-strong); letter-spacing: -0.02em;
}
.c-header__title--sm { font-size: var(--fs-2xl); }
.c-header__tagline {
  margin-top: var(--space-1);
  font-family: var(--font-air); font-size: var(--fs-lg); letter-spacing: 0;
  color: var(--color-text-muted);
}
body[data-page="home"] .c-header__title {
  font-family: var(--font-brand); font-weight: 400; font-size: 32px; letter-spacing: -0.5px;
  color: var(--color-primary-text);
}
.c-back {
  display: inline-flex; align-items: center; gap: 2px; margin-left: -6px;
  min-height: 44px; padding-right: var(--space-3);
  color: var(--color-text-muted); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium);
}

/* ---------- 섹션 제목 ---------- */
.c-section-title {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -0.02em;
  color: var(--color-text-strong);
  margin-bottom: var(--space-3);
}
.c-section-title small { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--color-text-faint); letter-spacing: -0.01em; }
.c-section-title > h2, .c-section-title > h3 { font: inherit; color: inherit; letter-spacing: inherit; }

/* ---------- 버튼 (모두 캡슐) ---------- */
.c-btn {
  --i-size: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--btn-h);
  padding: 0 var(--space-5);
  border-radius: var(--btn-radius);
  font-size: var(--fs-md); font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast), color var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.c-btn:active:not(:disabled) { transform: scale(.97); }
.c-btn:disabled, .c-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.c-btn--primary { background: var(--color-primary); color: var(--color-text-on-primary); box-shadow: var(--shadow-blue); }
.c-btn--primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.c-btn--primary:active:not(:disabled) { background: var(--color-primary-press); }
.c-btn--secondary, .c-btn--soft { background: var(--color-primary-soft); color: var(--color-primary-text); }
.c-btn--secondary:hover:not(:disabled), .c-btn--soft:hover:not(:disabled) { background: var(--blue-100); }
.c-btn--glass {
  color: var(--color-text-strong);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: var(--glass-border);
  box-shadow: var(--glass-rim), var(--shadow-2);
}
.c-btn--glass:hover:not(:disabled) { background: rgba(255, 255, 255, .78); }
.c-btn--ghost { background: transparent; color: var(--color-text); border-color: var(--color-border-strong); }
.c-btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .6); }
.c-btn--danger { background: var(--color-danger-bg); color: var(--color-danger); }
.c-btn--danger:hover:not(:disabled) { background: #FFDDE2; }
.c-btn--lg { min-height: var(--btn-h-lg); font-size: var(--fs-lg); }
.c-btn--sm { --i-size: 18px; min-height: var(--btn-h-sm); padding: 0 var(--space-4); font-size: var(--fs-sm); }
.c-btn--block { display: flex; width: 100%; }
.c-btn--icon { width: var(--btn-h); min-height: var(--btn-h); padding: 0; border-radius: var(--r-circle); --i-size: 22px; }
.c-btn--icon.c-btn--sm { width: var(--btn-h-sm); min-height: var(--btn-h-sm); --i-size: 20px; }
.c-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.c-btn.is-loading > * { visibility: hidden; }
.c-btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite;
}
.c-btn--soft.is-loading::after, .c-btn--secondary.is-loading::after, .c-btn--ghost.is-loading::after,
.c-btn--glass.is-loading::after, .c-btn--danger.is-loading::after { border-color: var(--blue-100); border-top-color: var(--blue-600); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 카드 (내용 = 또렷한 흰색) ---------- */
.c-card {
  background: rgba(255, 255, 255, .96);
  border-radius: var(--card-r);
  padding: var(--card-pad);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(0, 0, 0, .04);
}
.c-card--soft { background: var(--color-primary-soft); box-shadow: none; border-color: transparent; }
.c-card--dreamy, .c-card--hero {
  position: relative; overflow: hidden;
  background: var(--glass-thick-bg), var(--gradient-hero);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: var(--glass-border);
  box-shadow: var(--glass-rim-thick), var(--shadow-2);
}
.c-card--tone { background: var(--tone-bg); border-color: transparent; box-shadow: none; }
.c-card--flush { padding: 0; overflow: hidden; }
.c-card__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--color-text-strong); }
.c-card__desc { margin-top: 2px; font-size: var(--fs-sm); color: var(--color-text-muted); }

/* 기능 카드 — 톤 색 + 큰 Tossface 그림 */
.c-feature {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 1 / 1.08;
  padding: var(--space-4);
  border-radius: var(--r-xl);
  background: var(--tone-bg);
  color: var(--color-text);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--glass-rim), var(--shadow-1);
  border: 1px solid rgba(255, 255, 255, .7);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base);
}
.c-feature:hover { transform: translateY(-2px); box-shadow: var(--glass-rim), var(--shadow-2); }
.c-feature:active { transform: scale(.98); }
.c-feature__icon {
  --i-size: 26px;
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .72); color: var(--tone-ink);
  box-shadow: var(--glass-rim-thin), 0 2px 6px rgba(0, 0, 0, .05);
}
.c-feature__art {
  position: absolute; right: 10px; top: 12px; z-index: 0;
  font-size: 54px; opacity: .95;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .10));
}
.c-feature__body { position: relative; z-index: 1; }
.c-feature__name { display: block; font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: 1.3; color: var(--tone-ink); }
.c-feature__desc { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--color-text-muted); line-height: 1.4; }
.c-feature--wide { aspect-ratio: auto; min-height: 112px; grid-column: 1 / -1; flex-direction: row; align-items: center; gap: var(--space-4); justify-content: flex-start; }

/* ---------- 미니앱 카드 (목록 한 칸 — 기능 카드와 같은 재질, 가로형) ---------- */
.c-miniapp {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--tone-bg);
  color: var(--color-text);
  overflow: hidden;
  box-shadow: var(--glass-rim), var(--shadow-1);
  border: 1px solid rgba(255, 255, 255, .7);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base);
}
.c-miniapp:hover { transform: translateY(-2px); box-shadow: var(--glass-rim), var(--shadow-2); }
.c-miniapp__main {
  position: relative;
  display: flex; align-items: flex-start; gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  color: inherit; text-decoration: none;
  border-radius: inherit;
  transition: transform var(--dur-fast);
}
.c-miniapp__main:active { transform: scale(.985); }
.c-miniapp__shortcuts {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-top: calc(var(--space-2) * -1);
  padding: 0 var(--space-4) var(--space-4);
  list-style: none;
}
.c-miniapp__shortcuts .c-chip {
  --i-size: 16px; min-height: 40px; padding: 0 var(--space-3); gap: 4px;
  background: rgba(255, 255, 255, .82); color: var(--tone-ink); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-decoration: none;
}
.c-miniapp__icon {
  --i-size: 26px;
  position: relative; z-index: 1; flex-shrink: 0;
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .72); color: var(--tone-ink);
  box-shadow: var(--glass-rim-thin), 0 2px 6px rgba(0, 0, 0, .05);
}
.c-miniapp__body { position: relative; z-index: 1; flex: 1; min-width: 0; display: grid; gap: var(--space-1); padding-right: 52px; }
.c-miniapp__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
.c-miniapp__name { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: 1.3; color: var(--tone-ink); }
.c-miniapp__ver { font-size: var(--fs-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.c-miniapp__desc { font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-muted); }
.c-miniapp__badges { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }
.c-miniapp__badges .c-badge { background: rgba(255, 255, 255, .78); color: var(--tone-ink); white-space: normal; }
.c-miniapp__art {
  position: absolute; right: 12px; top: 14px; z-index: 0;
  font-size: 40px; opacity: .95;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .10));
}

/* ---------- 목록 줄 (토스식) ---------- */
.c-list { display: flex; flex-direction: column; }
.c-list__item {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 60px; padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  color: inherit; text-decoration: none;
}
.c-list__item:last-child { border-bottom: none; }
a.c-list__item:hover .c-list__title, button.c-list__item:hover .c-list__title { color: var(--color-primary-text); }
button.c-list__item { width: 100%; text-align: left; }
.c-list__lead {
  --i-size: 24px;
  display: grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--tone-bg, var(--color-primary-soft)); color: var(--tone-ink, var(--color-primary-text));
}
.c-list__body { flex: 1; min-width: 0; }
.c-list__title { display: block; font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: 1.4; color: var(--color-text-strong); transition: color var(--dur-fast); }
.c-list__meta { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--color-text-faint); }
.c-list__trail { --i-size: 20px; color: var(--grey-500); flex-shrink: 0; }

/* ---------- 칩 ---------- */
.c-chips { display: flex; gap: var(--space-2); overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.c-chips::-webkit-scrollbar { display: none; }
.c-chip {
  --i-size: 18px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 var(--space-4);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .78); border: 1px solid var(--color-border);
  color: var(--color-text-muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); white-space: nowrap;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.c-chip:hover { background: #fff; }
.c-chip[aria-pressed="true"], .c-chip[aria-selected="true"] {
  background: var(--blue-50); border-color: var(--blue-500); color: var(--blue-700); font-weight: var(--fw-semibold);
  box-shadow: inset 0 0 0 0.5px var(--blue-500);
}

/* ---------- 세그먼트 (유리 트랙 + 흰 렌즈) ---------- */
.c-segment {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  padding: 4px; border-radius: var(--r-pill);
  background: rgba(118, 118, 128, .12);
  -webkit-backdrop-filter: var(--glass-filter-thin); backdrop-filter: var(--glass-filter-thin);
  box-shadow: var(--glass-rim-thin);
}
.c-segment__btn {
  min-height: 40px; padding: 0 var(--space-3); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-text-muted); white-space: nowrap;
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-fast), box-shadow var(--dur-base);
}
.c-segment__btn[aria-selected="true"] {
  background: #fff; color: var(--blue-700);
  box-shadow: inset 0 0 0 2px var(--blue-500), var(--shadow-2);
}

/* ---------- 배지 ---------- */
.c-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px var(--space-2); border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1.4; white-space: nowrap;
  background: var(--tone-bg, var(--color-primary-soft)); color: var(--tone-ink, var(--color-primary-text));
  --i-size: 14px;
}

/* ---------- 입력 ---------- */
.c-field { display: flex; flex-direction: column; gap: 6px; }
.c-field__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-text); }
.c-field__hint { font-size: var(--fs-xs); color: var(--color-text-faint); }
.c-field__error { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--color-danger); }
.c-input, .c-textarea, .c-select {
  width: 100%;
  min-height: var(--input-h);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--input-r);
  border: 1px solid var(--color-border-input);
  background: #fff;
  font-size: var(--fs-md);   /* 16px: 아이폰 자동 확대 방지 */
  color: var(--color-text-strong);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.c-input::placeholder, .c-textarea::placeholder { color: var(--grey-500); }
.c-input:focus, .c-textarea:focus, .c-select:focus { outline: none; border-color: var(--color-focus); box-shadow: var(--shadow-glow); }
.c-input[aria-invalid="true"], .c-textarea[aria-invalid="true"] { border-color: var(--color-danger); }
.c-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.c-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--grey-600) 50%), linear-gradient(135deg, var(--grey-600) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: var(--space-10);
}
.c-search { position: relative; }
.c-search .c-input { padding-left: 46px; border-radius: var(--r-pill); }
.c-search > .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--grey-600); pointer-events: none; }
.c-counter { font-size: var(--fs-xs); color: var(--color-text-faint); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 비었음 · 오류 · 불러오는 중 ---------- */
.c-empty {
  --i-size: 40px;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-8) var(--space-4); text-align: center; color: var(--color-text-faint);
  font-size: var(--fs-sm);
}
.c-empty > .i { color: var(--grey-400); }
.c-empty--error > .i { color: var(--color-danger); }
.c-empty__art { font-size: 48px; margin-bottom: var(--space-1); }
.c-skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--grey-100) 0%, var(--grey-50) 50%, var(--grey-100) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  min-height: 16px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 아래 메뉴 (유리 캡슐 + 흰 렌즈) ---------- */
.c-nav {
  position: fixed; left: 50%; bottom: calc(var(--nav-gap) + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: var(--z-nav);
  width: min(calc(100% - var(--space-8)), 380px);
  height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; gap: 2px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--glass-nav-bg);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: var(--glass-border);
  box-shadow: var(--glass-rim), var(--shadow-3);
}
.c-nav__item {
  --i-size: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: 52px; border-radius: var(--r-pill);
  color: var(--grey-700); text-decoration: none; font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: -0.02em;
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-fast), box-shadow var(--dur-base);
}
.c-nav__item:hover { color: var(--grey-900); }
.c-nav__item[aria-current="page"] {
  background: rgba(255, 255, 255, .92); color: var(--blue-700);
  box-shadow: var(--glass-rim-thin), 0 2px 8px rgba(0, 0, 0, .08);
}
.c-nav__item[aria-current="page"] .i { color: var(--blue-500); }

/* ---------- 알림 (토스트, 어두운 유리) ---------- */
.c-toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--nav-gap) * 2 + var(--safe-bottom));
  z-index: var(--z-toast);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  width: min(calc(100% - var(--space-8)), 420px); pointer-events: none;
}
.c-sheet > .c-toast-wrap {
  position: absolute; left: 50%;
}
.c-toast {
  --i-size: 20px;
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5); border-radius: var(--r-pill);
  background: var(--glass-dark-bg); color: #fff; font-size: var(--fs-sm); font-weight: var(--fw-medium);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), var(--shadow-3);
  animation: toast-in var(--dur-slow) var(--ease-spring);
}
.c-toast--error { background: var(--color-danger); }
.c-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: all var(--dur-base); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ---------- 아래에서 올라오는 창 (유리 시트) ---------- */
.c-sheet {
  border: none; padding: 0; margin: auto auto 0;
  width: 100%; max-width: var(--page-max); max-height: 90dvh;
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .86));
  -webkit-backdrop-filter: var(--glass-filter-thick); backdrop-filter: var(--glass-filter-thick);
  color: var(--color-text);
  box-shadow: var(--glass-rim-thick), 0 -8px 40px rgba(0, 0, 0, .12);
}
.c-sheet[open] { animation: sheet-in var(--dur-slow) var(--ease-out); }
/* 열릴 때 시트 자체에 초점을 둔다 (화면읽기가 제목을 읽고, Tab으로 안의 버튼으로 간다) — 시트 둘레에는 초점 테두리를 그리지 않는다 */
.c-sheet:focus, .c-sheet:focus-visible {
  outline: none; border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  box-shadow: var(--glass-rim-thick), 0 -8px 40px rgba(0, 0, 0, .12);
}
.c-sheet::backdrop { background: rgba(25, 31, 40, .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes sheet-in { from { transform: translateY(48px); opacity: 0; } }
.c-sheet__inner { position: relative; display: flex; flex-direction: column; max-height: 90dvh; }
.c-sheet__grab { display: block; width: 36px; height: 5px; margin: 8px auto 0; border-radius: var(--r-pill); background: var(--grey-300); }
.c-sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-2) var(--space-5);
}
.c-sheet__title { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--color-text-strong); letter-spacing: -0.02em; }
.c-sheet__body { padding: var(--space-2) var(--space-5) calc(var(--space-6) + var(--safe-bottom)); overflow-y: auto; }
.c-sheet__foot {
  display: flex; gap: var(--space-2);
  padding: var(--space-3) var(--space-5) calc(var(--space-4) + var(--safe-bottom));
  border-top: 1px solid var(--color-border);
}
.c-sheet__foot .c-btn { flex: 1; }
.c-sheet__foot--wrap { flex-wrap: wrap; }

/* ---------- 진행 막대 · 고리 ---------- */
.c-progress { height: 8px; border-radius: var(--r-pill); background: var(--grey-200); overflow: hidden; }
.c-progress__bar { height: 100%; border-radius: inherit; background: var(--blue-500); transition: width var(--dur-slow) var(--ease-out); }
.c-ring { position: relative; width: 200px; height: 200px; margin: 0 auto; }
.c-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.c-ring__track { fill: none; stroke: var(--grey-200); stroke-width: 14; }
.c-ring__value { fill: none; stroke: url(#ringGradient); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset var(--dur-slow) var(--ease-out); }
.c-ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.c-ring__num { font-size: 40px; font-weight: var(--fw-heavy); line-height: 1; color: var(--color-text-strong); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.c-ring__sub { margin-top: var(--space-1); font-size: var(--fs-xs); color: var(--color-text-faint); }

/* ---------- 슬라이더 ---------- */
.c-range { width: 100%; accent-color: var(--blue-600); min-height: 44px; }  /* 누르는 칸 44 이상 */

/* ---------- 말풍선 (에이전트 대화) ---------- */
.c-chat { display: flex; flex-direction: column; gap: var(--space-3); }
.c-bubble {
  max-width: 86%; padding: var(--space-3) var(--space-4);
  border-radius: var(--r-lg); font-size: var(--fs-sm); line-height: 1.65; white-space: pre-wrap;
}
.c-bubble--bot { align-self: flex-start; background: #fff; color: var(--color-text); border-bottom-left-radius: 6px; box-shadow: var(--shadow-1); }
.c-bubble--me { align-self: flex-end; background: var(--color-primary); color: #fff; border-bottom-right-radius: 6px; }
.c-bubble--typing { display: inline-flex; gap: 4px; }
.c-bubble--typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-300); animation: bob 1s infinite; }
.c-bubble--typing span:nth-child(2) { animation-delay: .15s; }
.c-bubble--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

/* AI 답 Markdown (static/js/components/markdown.js가 허용한 요소만 만든다) */
.c-bubble--md { white-space: normal; overflow-wrap: anywhere; }
.c-bubble--md > * + * { margin-top: var(--space-2); }
.c-bubble--md h3, .c-bubble--md h4 { font-size: var(--fs-md); font-weight: var(--fw-bold); line-height: 1.45; color: var(--color-text-strong); }
.c-bubble--md h4 { font-size: var(--fs-sm); }
.c-bubble--md * + h3, .c-bubble--md * + h4 { margin-top: var(--space-3); }
.c-bubble--md strong { font-weight: var(--fw-bold); color: var(--color-text-strong); }
.c-bubble--md ul, .c-bubble--md ol { display: grid; gap: var(--space-1); padding-left: var(--space-5); }
.c-bubble--md ul { list-style: disc; }
.c-bubble--md ol { list-style: decimal; }
.c-bubble--md li > ul, .c-bubble--md li > ol, .c-bubble--md li > p { margin-top: var(--space-1); }
.c-bubble--md li::marker { color: var(--color-primary-text); font-weight: var(--fw-semibold); }
.c-bubble--md code { padding: 1px 6px; border-radius: 6px; background: var(--color-surface-sunken); font-size: .92em; }
.c-bubble--md pre { padding: var(--space-3); border-radius: var(--r-sm); background: var(--color-surface-sunken); white-space: pre-wrap; overflow-x: auto; }
.c-bubble--md pre code { padding: 0; background: none; font-size: var(--fs-xs); line-height: 1.6; }
.c-bubble--md blockquote { padding-left: var(--space-3); border-left: 3px solid var(--blue-200); color: var(--color-text-muted); }
.c-bubble--md hr { border: 0; border-top: 1px solid var(--color-border); }
.c-bubble--md a { color: var(--color-primary-text); text-decoration: underline; text-underline-offset: 3px; }
.c-bubble--md .md-host { font-size: var(--fs-xs); color: var(--color-text-muted); }
.c-bubble--md .md-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--r-sm); }
.c-bubble--md .md-table:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.c-bubble--md table { min-width: 100%; border-collapse: collapse; font-size: var(--fs-xs); line-height: 1.5; }
.c-bubble--md th, .c-bubble--md td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.c-bubble--md th { background: var(--color-surface-sunken); font-weight: var(--fw-semibold); white-space: nowrap; }
.c-bubble--md tbody tr:last-child td { border-bottom: 0; }
.c-bubble__tools { display: flex; justify-content: flex-end; margin-top: var(--space-2); }
.c-bubble__tools .c-btn { --i-size: 16px; min-height: 32px; padding: 0 var(--space-3); font-size: var(--fs-xs); }

/* ---------- 구분선 · 인용 ---------- */
.c-divider { height: 1px; background: var(--color-border); border: 0; margin: var(--space-4) 0; }
.c-quote {
  position: relative; padding: var(--space-6) var(--space-5) var(--space-5);
  font-family: var(--font-air); font-size: var(--fs-xl); line-height: 1.6; letter-spacing: 0; color: var(--grey-800);
}
.c-quote::before {
  content: "“"; position: absolute; left: var(--space-3); top: -10px;
  font-family: var(--font-body); font-weight: var(--fw-heavy); font-size: 64px; color: var(--blue-200); line-height: 1;
}

/* ---------- 나타나기 ---------- */
.a-rise { animation: rise var(--dur-slow) var(--ease-out) both; }
.a-rise:nth-child(2) { animation-delay: 40ms; } .a-rise:nth-child(3) { animation-delay: 80ms; }
.a-rise:nth-child(4) { animation-delay: 120ms; } .a-rise:nth-child(5) { animation-delay: 160ms; }
.a-rise:nth-child(6) { animation-delay: 200ms; } .a-rise:nth-child(7) { animation-delay: 240ms; }
.a-rise:nth-child(8) { animation-delay: 280ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (min-width: 600px) {
  :root { --page-x: var(--space-6); }
}

/* ---------- 웃음꽃 (꽃잎 5장 = 하루 루틴 5개) ---------- */
.c-flower { display: block; overflow: visible; }
.c-flower__petal {
  fill: rgba(255, 255, 255, .6); stroke: var(--blue-200); stroke-width: 1.4; stroke-dasharray: 3 3;
  transform-box: fill-box; transform-origin: 50% 100%;
  transition: fill var(--dur-slow), stroke var(--dur-slow);
}
.c-flower__petal.is-on { fill: var(--petal); stroke: rgba(255, 255, 255, .95); stroke-dasharray: none; }
.c-flower__petal.is-new { animation: petal-in 700ms var(--ease-spring) both; }
.c-flower__core { fill: var(--petal-core); stroke: #fff; stroke-width: 2; }
.c-flower__face { fill: none; stroke: var(--grey-900); stroke-width: 1.6; stroke-linecap: round; }
.c-flower.is-full { animation: bloom 900ms var(--ease-spring); }
.c-flower--sway { animation: sway 6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes petal-in { from { transform: scale(.15); opacity: 0; } }
@keyframes bloom { 0% { transform: scale(.85) rotate(-8deg); } 60% { transform: scale(1.08) rotate(4deg); } 100% { transform: none; } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* 꽃 터지는 효과 */
.c-confetti { position: fixed; inset: 0; z-index: var(--z-toast); pointer-events: none; }

/* ---------- 바로가기 (아이콘 4칸) ---------- */
.c-apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4) var(--space-2); }
.c-app {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  color: var(--color-text); text-decoration: none; font-size: var(--fs-xs); font-weight: var(--fw-medium); text-align: center; line-height: 1.3;
}
.c-app__icon {
  --i-size: 28px;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: var(--r-lg);
  background: var(--tone-bg); color: var(--tone-ink);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--glass-rim), var(--shadow-1);
  transition: transform var(--dur-base) var(--ease-spring);
}
.c-app:hover .c-app__icon { transform: translateY(-2px); }
.c-app:active .c-app__icon { transform: scale(.94); }

/* ---------- D-day 배지 ---------- */
.c-dday {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 60px; height: 30px; padding: 0 var(--space-2); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums;
  color: var(--blue-700); background: var(--blue-50);
}
.c-dday.is-today { background: var(--color-primary); color: #fff; }
.c-dday.is-soon { background: var(--t-orange-bg); color: var(--t-orange-ink); }

/* ---------- 작은 알림 줄 (예: NEIS 일부만 보임) ---------- */
.c-notice {
  --i-size: 18px;
  display: flex; gap: var(--space-2); align-items: flex-start;
  padding: var(--space-3); border-radius: var(--r-sm);
  background: var(--color-warn-bg); color: var(--color-warn); font-size: var(--fs-xs); font-weight: var(--fw-medium); line-height: 1.5;
}
.c-notice > .i { margin-top: 0; }

/* ---------- 단계 점 (온보딩) ---------- */
.c-steps { display: flex; justify-content: center; gap: 6px; }
.c-steps span { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--grey-300); transition: all var(--dur-base); }
.c-steps span.is-on { width: 24px; background: var(--blue-500); }

/* ---------- 큰 선택 버튼 (학년·반·알레르기) ---------- */
.c-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: var(--space-2); }
.c-pick__btn {
  min-height: 52px; border-radius: var(--r-md); background: var(--grey-100);
  border: 2px solid transparent; font-size: var(--fs-md); font-weight: var(--fw-medium); color: var(--color-text);
  transition: background-color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.c-pick__btn:active { transform: scale(.96); }
.c-pick__btn[aria-pressed="true"] { background: var(--blue-50); border-color: var(--blue-500); color: var(--blue-700); font-weight: var(--fw-bold); }
.c-pick--wide { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }

/* ---------- 씨앗 캡슐 ---------- */
.c-seeds {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 var(--space-3) 0 10px;
  border-radius: var(--r-pill); text-decoration: none;
  background: var(--t-yellow-bg); color: var(--t-yellow-ink); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255, 255, 255, .8); box-shadow: var(--glass-rim-thin);
}
.c-seeds .emoji { font-size: 18px; }

/* ---------- PC에서 옆에 띄우는 안내 (폰으로 열기 QR) — 두꺼운 유리 ---------- */
.c-aside { display: none; }
@media (min-width: 1100px) {
  :root { --shell-shift: calc((var(--aside-w) + var(--shell-gap)) / 2); }
  .l-page {
    position: relative; left: var(--shell-shift);  /* transform을 쓰면 안쪽 고정 요소가 틀어져서 left로 옮긴다 */
    min-height: 100dvh;
    background: rgba(255, 255, 255, .35);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .6), 0 30px 80px rgba(25, 31, 40, .08);
  }
  .c-nav { left: calc(50% + var(--shell-shift)); }
  .c-toast-wrap { left: calc(50% + var(--shell-shift)); }
  .c-aside {
    position: fixed; top: 50%; z-index: 1;
    left: calc(50% + var(--shell-shift) - var(--page-max) / 2 - var(--shell-gap) - var(--aside-w));
    transform: translateY(-50%);
    width: var(--aside-w); display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
    padding: var(--space-8) var(--space-6); text-align: center;
    border-radius: var(--r-2xl);
    background: var(--glass-thick-bg);
    -webkit-backdrop-filter: var(--glass-filter-thick); backdrop-filter: var(--glass-filter-thick);
    border: var(--glass-border);
    box-shadow: var(--glass-rim-thick), var(--shadow-3);
  }
  .c-aside__brand { font-family: var(--font-brand); font-size: var(--fs-3xl); color: var(--color-primary-text); line-height: 1.05; }
  .c-aside__tagline { font-family: var(--font-air); font-size: var(--fs-lg); color: var(--color-text-muted); }
  .c-aside img { width: 172px; height: 172px; border-radius: var(--r-md); background: #fff; padding: 8px; box-shadow: var(--shadow-1); }
  .c-aside__hint { font-size: var(--fs-sm); color: var(--color-text-muted); }
  .c-aside__petals { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: var(--space-1); }
  .c-aside__petals li { --i-size: 14px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: var(--fw-semibold); color: var(--grey-900); background: var(--petal); }
}

/* ---------- 화면 넘어갈 때 부드럽게 (지원하는 브라우저만) ---------- */
@view-transition { navigation: auto; }
.c-nav { view-transition-name: main-nav; }
::view-transition-old(root) { animation: 160ms ease-out both vt-out; }
::view-transition-new(root) { animation: 240ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .c-flower--sway { animation: none; }
}

/* ---------- 급식 한 끼 ---------- */
.c-meal { display: flex; flex-direction: column; gap: var(--space-3); }
.c-meal__warn {
  --i-size: 18px;
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border-radius: var(--r-sm);
  background: var(--color-danger-bg); color: var(--color-danger); font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}
.c-meal__list { display: flex; flex-direction: column; }
.c-meal__dish { --i-size: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-2); padding: 8px 0; border-bottom: 1px solid var(--grey-100); }
.c-meal__dish:last-child { border-bottom: 0; }
.c-meal__dish > .i { align-self: center; color: var(--color-danger); }
.c-meal__name { font-size: var(--fs-md); color: var(--color-text-strong); }
.c-meal__allergy { font-size: 12px; color: var(--color-text-faint); }
.c-meal__dish.is-warn .c-meal__name { color: var(--color-danger); font-weight: var(--fw-semibold); }
.c-meal__dish.is-warn .c-meal__allergy { color: var(--color-danger); }
.c-meal__kcal { --i-size: 16px; display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: var(--fs-xs); color: var(--color-text-faint); font-variant-numeric: tabular-nums; }

/* ---------- 아래쪽 안내 문서 링크 (처리방침 · 디자인 규칙) ---------- */
.c-legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 var(--space-2); font-size: var(--fs-xs); color: var(--color-text-muted); }
.c-legal a { min-height: 44px; display: inline-flex; align-items: center; color: var(--color-text-muted); text-underline-offset: 3px; }
.c-legal a:hover { color: var(--color-text-strong); }
.c-legal a[aria-current="page"] { color: var(--color-primary-text); font-weight: var(--fw-semibold); text-decoration: none; }

/* ---------- 구글 로그인 버튼 (구글 브랜드 규정: 흰 바탕, #747775 테두리, 표준 색 G 로고) ---------- */
.c-gbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 16px 0 12px; border-radius: var(--r-pill);
  background: #fff; border: 1px solid #747775; color: #1f1f1f; text-decoration: none;
  font-family: var(--font-body);  /* 구글 규정 글꼴은 Google Sans Medium — 앱 글꼴 통일 원칙에 따라 Pretendard Medium (G 로고·색·테두리는 규정 그대로) */
  font-size: 15px; font-weight: 500; letter-spacing: 0;
  transition: background-color var(--dur-fast), box-shadow var(--dur-fast);
}
.c-gbtn:hover { background: #f8f8f8; box-shadow: 0 1px 3px rgba(60, 64, 67, .2); }
.c-gbtn:active { background: #f1f1f1; }
.c-gbtn img { width: 20px; height: 20px; flex-shrink: 0; }
.c-gbtn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ---------- 켜기/끄기 스위치 (role="switch") ---------- */
.c-switch { display: flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.c-switch b { display: block; font-size: var(--fs-md); color: var(--color-text-strong); }
.c-switch small { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--color-text-muted); line-height: 1.45; }
.c-switch input {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; order: 2;
  position: relative; width: 52px; height: 32px; border-radius: var(--r-pill);
  background: var(--grey-500); cursor: pointer; transition: background-color var(--dur-base);
}
.c-switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform var(--dur-base) var(--ease-spring);
}
.c-switch input:checked { background: var(--blue-600); }
.c-switch input:checked::after { transform: translateX(20px); }

/* ---------- 투표 선택지 · 결과 막대 ---------- */
.c-options { display: flex; flex-direction: column; gap: var(--space-2); }
.c-option {
  --i-size: 18px;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: var(--space-2); width: 100%;
  min-height: 52px; padding: var(--space-2) var(--space-4);
  border-radius: var(--r-md); border: 2px solid transparent;
  background: var(--grey-100); color: var(--color-text-strong);
  font-size: var(--fs-md); font-weight: var(--fw-semibold); text-align: left;
  transition: background-color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
button.c-option:hover { background: var(--grey-200); }
button.c-option:active { transform: scale(.98); }
.c-option__fill {
  position: absolute; inset: 0 auto 0 0; z-index: -1; width: var(--pct, 0%);
  background: var(--tone-bg, var(--blue-100)); border-radius: inherit;
  transition: width var(--dur-slow) var(--ease-out);
}
.c-option.is-top .c-option__fill { background: var(--tone-strong, var(--blue-200)); opacity: .55; }
.c-option__label { flex: 1; min-width: 0; }
.c-option__pct { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.c-option__n { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.c-option.is-mine { border-color: var(--blue-500); }
.c-option.is-mine > .i { color: var(--blue-600); }

/* ---------- 위기 안내 시트 (1388 · 109) ---------- */
.c-crisis__lead { font-size: var(--fs-md); line-height: 1.7; color: var(--color-text); }
.c-crisis__lead .emoji { display: block; font-size: 32px; margin-bottom: var(--space-2); }
.c-crisis__call {
  display: flex; align-items: center; gap: var(--space-3); min-height: 68px;
  padding: var(--space-3) var(--space-4); border-radius: var(--r-lg);
  background: var(--tone-bg); color: var(--tone-ink); text-decoration: none;
}
.c-crisis__call .c-list__lead { background: #fff; color: var(--tone-ink); }
.c-crisis__call b { display: block; font-size: var(--fs-lg); }
.c-crisis__call small { display: block; font-size: var(--fs-sm); color: var(--color-text-muted); }
.c-crisis__urgent { --i-size: 18px; display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-danger); }
.c-crisis__urgent a { color: inherit; }

/* ---------- 웃음꽃 꾸밈 (꽃술 색·표정·정원 장식) ---------- */
.c-flower__shade { fill: var(--grey-900); stroke: none; }
.c-bloom-wrap { position: relative; display: grid; place-items: center; }
.c-bloom-wrap__deco {
  position: absolute; z-index: 1; font-size: 28px; pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .12));
  animation: deco-float 5s ease-in-out infinite;
}
.c-bloom-wrap__deco:nth-of-type(1) { left: 4%; top: 6%; }
.c-bloom-wrap__deco:nth-of-type(2) { right: 4%; top: 16%; animation-delay: -1.7s; }
.c-bloom-wrap__deco:nth-of-type(3) { right: 12%; bottom: 2%; animation-delay: -3.4s; }
@keyframes deco-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .c-bloom-wrap__deco { animation: none; } }

/* 목록 앞 칸에 Tossface 그림 */
.c-list__lead .emoji { font-size: 24px; }

/* ---------- 유리를 못 쓰거나 줄이고 싶을 때 → 불투명 ---------- */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .g-thin, .g-regular, .g-thick, .c-nav, .c-sheet, .c-btn--glass, .c-aside, .c-card--dreamy, .c-card--hero { background: rgba(255, 255, 255, .96); }
  .c-toast, .g-dark { background: #2B323C; }
  .c-segment { background: var(--grey-200); }
}
@media (prefers-reduced-transparency: reduce) {
  .g-thin, .g-regular, .g-thick, .c-nav, .c-sheet, .c-btn--glass, .c-aside, .c-card--dreamy, .c-card--hero {
    background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .c-toast, .g-dark { background: #2B323C; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .c-segment { background: var(--grey-200); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* 게스트 정책 안내: 기존 디자인 토큰 위에 얇은 공용 컴포넌트 */
.c-guest-notice {display:grid;gap:var(--space-3);border:1px solid var(--color-border);background:var(--color-surface-soft);border-radius:var(--r-xl)}
.c-guest-notice__head {display:flex;align-items:center;gap:var(--space-2);color:var(--color-primary-text);font-size:var(--fs-lg)}
.c-guest-notice p {color:var(--color-text-muted);font-size:var(--fs-sm);line-height:1.65;margin:0}
.c-guest-notice .c-btn {justify-self:start}

/* Mind Care · 계정/DB와 독립된 호흡 리듬 조각 */
.c-breathe { display:grid; gap:var(--space-4); overflow:hidden; }
.c-breathe__intro { display:flex; align-items:center; gap:var(--space-3); }
.c-breathe__icon { display:grid; place-items:center; flex:0 0 48px; height:48px; border-radius:var(--r-md); background:var(--blue-50); color:var(--color-primary-text); }
.c-breathe__stage { position:relative; display:grid; justify-items:center; align-content:center; gap:var(--space-2); min-height:196px; isolation:isolate; }
.c-breathe__orb { position:absolute; z-index:-1; width:152px; height:152px; border-radius:50%; background:radial-gradient(circle at 28% 28%,var(--white),var(--blue-100) 55%,var(--blue-200)); box-shadow:0 12px 36px rgb(49 130 246 / 12%); transition:transform 3.8s ease-in-out; }
.c-breathe[data-phase="in"] .c-breathe__orb { transform:scale(1.13); }
.c-breathe[data-phase="out"] .c-breathe__orb { transform:scale(.91); transition-duration:5.8s; }
.c-breathe__phase { font-weight:var(--fw-semibold); color:var(--color-text-strong); text-align:center; background:var(--white); border-radius:var(--r-pill); padding:var(--space-2) var(--space-3); max-width:min(90%,320px); }
.c-breathe__time { font-size:var(--fs-lg); font-variant-numeric:tabular-nums; font-weight:var(--fw-bold); color:var(--color-primary-text); }
.c-breathe__progress { display:block; width:100%; height:8px; border:0; border-radius:var(--r-pill); overflow:hidden; accent-color:var(--color-primary); background:var(--grey-200); }
.c-breathe__progress::-webkit-progress-bar { background:var(--grey-200); }
.c-breathe__progress::-webkit-progress-value { background:var(--color-primary); border-radius:var(--r-pill); }
.c-breathe__progress::-moz-progress-bar { background:var(--color-primary); border-radius:var(--r-pill); }
@media (prefers-reduced-motion: reduce) {
  .c-breathe__orb { transition:none !important; transform:none !important; }
}
.c-breathe[data-motion="off"] .c-breathe__orb { transition:none; transform:none; }

/* Community Preview — 실제 게시글을 불러오지 않는 게스트용 안내 조각 */
.c-community-invite { position:relative; overflow:hidden; padding:clamp(24px,5vw,44px); display:grid; gap:var(--space-4); }
.c-community-invite::after { content:""; position:absolute; inset:auto -44px -80px auto; width:200px; height:200px; border-radius:50%; background:radial-gradient(circle,var(--blue-100),transparent 68%); opacity:.48; pointer-events:none; }
.c-community-invite__eyebrow { display:inline-flex; align-items:center; gap:var(--space-2); color:var(--color-primary-text); font-size:var(--fs-xs); font-weight:var(--fw-bold); letter-spacing:.08em; }
.c-community-invite__title { position:relative; font-size:clamp(24px,5vw,35px); line-height:1.35; letter-spacing:-.035em; color:var(--color-text-strong); word-break:keep-all; }
.c-community-invite__title span { display:block; color:var(--color-primary-text); }
.c-community-invite p { position:relative; max-width:52ch; color:var(--color-text-muted); line-height:1.7; }
.c-community-invite .c-field__hint { font-size:var(--fs-xs); }
.c-preview-grid { align-items:stretch; }
.c-preview-board { display:flex; gap:var(--space-3); align-items:flex-start; min-width:0; padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--r-xl); background:var(--color-surface); }
.c-preview-board__icon { display:grid; flex:none; place-items:center; width:46px; height:46px; color:var(--t-blue-ink); background:var(--t-blue-bg); border-radius:var(--r-md); }
.c-preview-board[data-tone="green"] .c-preview-board__icon { color:var(--t-green-ink); background:var(--t-green-bg); }
.c-preview-board[data-tone="sky"] .c-preview-board__icon { color:var(--t-sky-ink); background:var(--t-sky-bg); }
.c-preview-board[data-tone="orange"] .c-preview-board__icon { color:var(--t-orange-ink); background:var(--t-orange-bg); }
.c-preview-board__copy h3 { font-size:var(--fs-lg); font-weight:var(--fw-bold); color:var(--color-text-strong); }
.c-preview-board__copy p { margin-top:var(--space-1); font-size:var(--fs-sm); line-height:1.55; color:var(--color-text-muted); }
.c-community-invite__cta { max-width:640px; margin-inline:auto; }
@media (prefers-reduced-motion: reduce) { .c-community-invite::after { animation:none !important; } }

/* 비동기 상태/실패 복구 조각: UI를 잠그지 않고 다음 행동을 안내한다. */
.c-async-status { margin-block:var(--space-2); font-size:var(--fs-sm); color:var(--color-text-muted); min-height:1.5em; }
.c-retry-state { display:grid; justify-items:center; gap:var(--space-3); border-radius:var(--r-xl); border:1px solid var(--color-border); background:var(--color-surface); text-align:center; padding:var(--space-6) var(--space-4); }
.c-retry-state__icon { display:grid; place-items:center; width:48px; height:48px; border-radius:var(--r-md); background:var(--t-blue-bg); color:var(--t-blue-ink); }
.c-retry-state h3 { font-size:var(--fs-lg); font-weight:var(--fw-bold); color:var(--color-text-strong); }
.c-retry-state p { max-width:40ch; font-size:var(--fs-sm); line-height:1.65; color:var(--color-text-muted); }
.c-retry-state .c-btn { margin-top:var(--space-2); }

/* 로그인 준비 중: 클릭되지 않는 상태를 시각적으로 분명히 */
.c-gbtn[aria-disabled="true"] { cursor:default; opacity:.58; filter:grayscale(.3); box-shadow:none; pointer-events:none; }

/* 따뜻한 안전 가이드: 긴 규칙 문장을 훑어보기 쉬운 컴포넌트로 */
.c-guidance { display:flex; gap:var(--space-4); align-items:flex-start; border-radius:var(--r-xl); }
.c-guidance__icon { display:grid; flex:none; place-items:center; width:44px; height:44px; border-radius:var(--r-md); background:var(--t-blue-bg); color:var(--t-blue-ink); }
.c-guidance__copy { display:grid; min-width:0; gap:var(--space-2); }
.c-guidance__copy h2 { font-size:var(--fs-lg); color:var(--color-text-strong); font-weight:var(--fw-bold); line-height:1.4; }
.c-guidance__copy p, .c-guidance__rules { color:var(--color-text-muted); font-size:var(--fs-sm); line-height:1.65; }
.c-guidance__rules { display:grid; gap:var(--space-1); margin-top:var(--space-1); }
.c-guidance__rules li { position:relative; padding-left:var(--space-4); }
.c-guidance__rules li::before { content:'•'; position:absolute; left:0; color:var(--color-primary-text); font-weight:var(--fw-bold); }
@media (max-width:400px) { .c-guidance { gap:var(--space-3); } .c-guidance__icon { width:36px; height:36px; } }
