/* 약달력 웹 MVP — 시니어 친화 고대비 (Accessible & Ethical) */
:root {
  --primary: #0F172A;
  --secondary: #334155;
  --accent: #0369A1;
  --accent-dark: #075985;
  --bg: #F8FAFC;
  --fg: #020617;
  --muted: #E8ECF1;
  --border: #E2E8F0;
  --danger: #DC2626;
  --success: #15803D;
  --warn: #B45309;
  --radius: 14px;
  --font: 'Noto Sans KR', -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 17px; }
html.font-small { font-size: 15px; }
html.font-large { font-size: 20px; }
html.font-xlarge { font-size: 23px; }

/* 고대비 모드 (접근성): 텍스트·테두리·포커스 강도 상향 */
html.hc {
  --fg: #000000;
  --primary: #000000;
  --secondary: #1E293B;
  --accent: #1D4ED8;
  --accent-dark: #1E3A8A;
  --bg: #FFFFFF;
  --muted: #E2E8F0;
  --border: #475569;
  --danger: #B91C1C;
  --success: #166534;
}
html.hc .card, html.hc .dose-item, html.hc .med-item, html.hc .chk-btn,
html.hc .seg button, html.hc .cond-btn, html.hc .field input,
html.hc .field select, html.hc .field textarea { border-width: 2px; }
html.hc :focus-visible { outline: 4px solid #1D4ED8 !important; outline-offset: 2px; }

/* 스킵 링크 (키보드·스크린리더) */
.skip-link {
  position: absolute; left: 0; top: -60px; z-index: 400;
  background: var(--primary); color: #fff; padding: 0.7rem 1.2rem;
  border-radius: 0 0 10px 0; font-weight: 700; text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); font-size: 1rem; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
.view { padding: 1rem 1rem 5.5rem; }
.view.no-tab { padding-bottom: 2rem; }

/* ── 하단 탭 ── */
.tabbar[hidden] { display: none; } /* display:flex가 hidden 속성을 덮지 않도록 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; background: #fff; border-top: 2px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 10px; border: none; background: none;
  color: var(--secondary); font-size: 0.72rem; font-weight: 500;
  min-height: 56px;
}
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--accent); font-weight: 700; }
.tab:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 8px; }

/* ── 공통 컴포넌트 ── */
.page-title { font-size: 1.35rem; font-weight: 700; margin: 0.3rem 0 1rem; }
.card {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 0.9rem;
}
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--secondary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; font-weight: 700; font-size: 1.05rem;
  min-height: 52px; padding: 0 1.2rem; transition: background 0.15s;
  width: 100%;
}
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
a.btn { text-decoration: none; box-sizing: border-box; text-align: center; line-height: 1.35; padding-block: 0.5rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: #fff; color: var(--accent); border: 2px solid var(--accent); }
.btn-ghost { background: var(--muted); color: var(--secondary); }
.btn-danger-ghost { background: #fff; color: var(--danger); border: 2px solid #FECACA; }
.btn-sm { min-height: 42px; font-size: 0.92rem; width: auto; padding: 0 0.9rem; }
.btn:disabled { opacity: 0.45; cursor: default; }

.field { margin-bottom: 0.9rem; }
.field label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.35rem; }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 0.6rem 0.8rem;
  border: 2px solid var(--border); border-radius: 10px; background: #fff;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}
.field .hint { font-size: 0.82rem; color: var(--secondary); margin-top: 0.25rem; }
.field-error { color: var(--danger); font-size: 0.88rem; margin-top: 0.3rem; font-weight: 500; }

.row { display: flex; gap: 0.6rem; }
.row > * { flex: 1; min-width: 0; }
/* 날짜·시간 입력은 브라우저 고유 최소 폭이 커서 375px에서 넘친다 — 칸 폭에 맞춘다 */
.field input[type="date"], .field input[type="time"], .row input[type="time"] { min-width: 0; width: 100%; }

/* 세그먼트 선택 (약 종류, 반복 등) */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1; min-height: 48px; border: 2px solid var(--border); background: #fff;
  border-radius: 10px; font-size: 0.95rem; font-weight: 500; color: var(--secondary);
  white-space: nowrap; padding: 0 0.6rem;
}
.seg button.on { border-color: var(--accent); background: #E0F2FE; color: var(--accent-dark); font-weight: 700; }

/* ── 인증 화면 ── */
.auth-wrap { padding: 3rem 1.5rem 2rem; }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo .mark { font-size: 3rem; }
.auth-logo h1 { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.auth-logo p { color: var(--secondary); font-size: 0.95rem; }
.auth-links { display: flex; justify-content: center; gap: 0.8rem; margin-top: 1.2rem; font-size: 0.92rem; }
.auth-links a { color: var(--secondary); text-decoration: none; font-weight: 500; }
.auth-links a:hover { color: var(--accent); }

/* ── 홈 ── */
.home-head { margin-bottom: 1rem; }
.home-head .date { font-size: 0.95rem; color: var(--secondary); font-weight: 500; }
.home-head h2 { font-size: 1.45rem; font-weight: 700; margin-bottom: 0.5rem; }
.day-nav { display: flex; align-items: center; gap: 0.5rem; }
.day-nav > button {
  width: 48px; height: 48px; flex-shrink: 0;
  border: 2px solid var(--border); border-radius: 10px; background: #fff;
  font-size: 1.3rem; color: var(--secondary);
}
.day-nav-label { flex: 1; text-align: center; }
.day-nav-label .date b { color: var(--accent-dark); }
.today-link {
  border: none; background: none; color: var(--accent); font-size: 0.85rem;
  font-weight: 700; text-decoration: underline; min-height: 32px; padding: 0 0.5rem;
}
.dose-item {
  display: flex; align-items: center; gap: 0.8rem;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 0.9rem; margin-bottom: 0.7rem;
}
.dose-item .info { flex: 1; min-width: 0; }
.dose-item .time { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.dose-item .name { font-weight: 500; }
.dose-item .meta { font-size: 0.82rem; color: var(--secondary); }
/* 버튼 열 고정폭 — 상태가 바뀌어도 카드 레이아웃이 늘었다 줄었다 하지 않음 */
.dose-item .acts { display: flex; flex-direction: column; gap: 6px; flex: 0 0 118px; align-items: stretch; }
.chk-btn {
  width: 100%; min-height: 44px; padding: 0.35rem 0.5rem;
  border-radius: 10px; font-weight: 700; font-size: 0.95rem;
  border: 2px solid var(--border); background: #fff; color: var(--secondary);
  white-space: nowrap;
}
.chk-btn.taken { background: var(--success); border-color: var(--success); color: #fff; }
.chk-btn.skip { min-height: 36px; padding: 0.25rem 0.5rem; font-size: 0.82rem; font-weight: 500; border: none; background: none; text-decoration: underline; }
.chk-btn.skipped {
  background: var(--muted); border-color: var(--muted); color: var(--danger);
  font-weight: 700; text-decoration: none; padding: 0.35rem 0.5rem;
}
.dose-item .meta .reason { color: var(--danger); font-weight: 500; }
.status-badge { font-size: 0.8rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.status-missed { background: #FEE2E2; color: var(--danger); }

.cond-row { display: flex; gap: 0.6rem; }
.cond-btn {
  flex: 1; min-height: 72px; padding: 0.5rem 0.3rem;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 0.92rem; font-weight: 500; color: var(--secondary);
}
.cond-btn .emo { font-size: 1.8rem; }
.cond-btn.on { border-color: var(--accent); background: #E0F2FE; color: var(--accent-dark); font-weight: 700; }
.cond-detail { margin-top: 0.6rem; font-size: 0.9rem; color: var(--secondary); }
.sym-list { display: flex; flex-direction: column; gap: 8px; }
.sym-btn { min-height: 52px; border: 2px solid var(--border); border-radius: 12px; background: #fff; font-size: 1.02rem; font-weight: 500; text-align: left; padding: 0 1rem; }
.sym-btn.on { border-color: var(--accent); background: #E0F2FE; color: var(--accent-dark); font-weight: 700; }
/* 부작용 흐름 2단계: 약 관련 증상 목록과 '약 때문은 아닌 것 같아요'를 구분선으로 분리 */
.sym-sep { height: 1px; background: var(--border); margin: 0.5rem 0; }
.sym-btn.excl { color: var(--secondary); }
.sym-btn.excl.on { border-color: var(--secondary); background: #F1F5F9; color: var(--fg); }
.sym-memo { min-height: 84px; padding: 0.7rem 0.9rem; border: 2px solid var(--accent); border-radius: 12px; font-size: 1rem; font-family: inherit; resize: vertical; }
.sym-memo[hidden] { display: none; }

/* ── 홈 시간대 그룹 ── */
.dose-group { border: 2px solid var(--border); border-radius: var(--radius); padding: 0.8rem; margin-bottom: 0.8rem; background: #fff; }
.dose-group.done { border-color: #BBF7D0; background: #F0FDF4; }
.dg-head { display: flex; align-items: center; gap: 0.6rem; }
.dg-main { flex: 1; min-width: 0; }
.dg-time { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dg-names { font-size: 0.88rem; color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-prog { font-weight: 700; font-size: 1rem; color: var(--secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dose-group.done .dg-prog { color: var(--success); }
.dg-main { cursor: pointer; }
.dg-main:focus-visible, .dg-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.dg-toggle {
  width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 50%;
  background: var(--muted); color: var(--secondary);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dg-toggle svg { width: 22px; height: 22px; transition: transform 0.15s; }
.dg-toggle.open svg { transform: rotate(180deg); }
.dose-group.done .dg-toggle { background: #DCFCE7; color: var(--success); }
html.hc .dg-toggle { border: 2px solid var(--border); }
.dg-all { margin-top: 0.7rem; }
.dg-undo { background: #DCFCE7; color: var(--success); border: 2px solid #BBF7D0; font-weight: 700; }
.dg-body { margin-top: 0.6rem; border-top: 1px solid var(--border); padding-top: 0.4rem; }
.dg-body .dose-item { padding: 0.6rem 0.8rem; margin-bottom: 0.5rem; }
.dg-body .dose-item:last-child { margin-bottom: 0; }

/* ── 약등록 ── */
.med-item {
  display: flex; align-items: center; gap: 0.8rem;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 0.9rem; margin-bottom: 0.7rem;
}
.med-item .info { flex: 1; }
.med-item .name { font-weight: 700; font-size: 1.05rem; }
.med-item .meta { font-size: 0.84rem; color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fab {
  position: fixed; bottom: calc(76px + env(safe-area-inset-bottom)); right: max(16px, calc(50% - 224px));
  width: 60px; height: 60px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 2rem; line-height: 1;
  box-shadow: 0 4px 14px rgba(3, 105, 161, 0.4); z-index: 90;
}
.time-chip { display: inline-flex; align-items: center; gap: 6px; background: #E0F2FE; color: var(--accent-dark); border-radius: 20px; padding: 6px 12px; font-weight: 700; margin: 0 6px 6px 0; font-variant-numeric: tabular-nums; }
.time-chip button { border: none; background: none; color: var(--accent-dark); font-size: 1.1rem; line-height: 1; padding: 2px; }

/* ── 리포트 ── */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin-bottom: 0.9rem; }
.stat-tile { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 0.9rem; text-align: center; }
.stat-tile .num { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-tile .lbl { font-size: 0.85rem; color: var(--secondary); font-weight: 500; }
.stat-tile.hero { grid-column: 1 / -1; background: var(--primary); border-color: var(--primary); color: #fff; }
.stat-tile.hero .lbl { color: #CBD5E1; }
.stat-tile.hero .num { font-size: 2.6rem; }
.stat-tile .sub { font-size: 0.78rem; color: var(--secondary); margin-top: 0.2rem; word-break: keep-all; }
.stat-tile.hero .sub { color: #CBD5E1; }
.stat-tile .unit { font-size: 1rem; font-weight: 500; margin-left: 2px; }
/* 몸 상태 %: 좋음/보통/나쁨 세로 3줄 — 색이 아니라 이모지+글자로 구분 */
.cond-pct { display: flex; flex-direction: column; gap: 2px; text-align: left; margin: 0.2rem 0; }
.cond-pct > div { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; color: var(--secondary); }
.cond-pct b { font-size: 1.1rem; color: var(--fg); font-variant-numeric: tabular-nums; min-width: 3.2em; }

/* 부작용 기록 (리포트 · 공유 조회 공용) */
.sx-count { margin-left: 0.4rem; font-size: 0.82rem; font-weight: 700; color: var(--secondary);
  background: #F1F5F9; border-radius: 999px; padding: 0.1rem 0.5rem; vertical-align: middle; }
.sx-count.on { background: #FEE2E2; color: var(--danger); }
.sx-item { border: 2px solid var(--border); border-radius: 12px; padding: 0.7rem 0.8rem; margin-bottom: 0.6rem; }
.sx-item:last-child { margin-bottom: 0; }
/* 최근 기록만 색으로 띄운다 — 색만으로 구분하지 않도록 '최근' 배지를 함께 붙인다 */
.sx-item.recent { border-color: var(--danger); background: #FEF2F2; }
.sx-item.off { background: #F8FAFC; }
.sx-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.35rem; }
.sx-date { font-weight: 700; font-size: 1rem; }
.sx-ago { font-size: 0.84rem; color: var(--secondary); }
.sx-new { font-size: 0.74rem; font-weight: 700; color: #fff; background: var(--danger);
  border-radius: 999px; padding: 0.1rem 0.45rem; }
.sx-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 0.35rem; }
.sx-tag { font-size: 0.88rem; font-weight: 600; background: #FEE2E2; color: #991B1B;
  border-radius: 8px; padding: 0.15rem 0.5rem; }
.sx-onset { font-size: 0.9rem; color: var(--secondary); }
.sx-text { font-size: 0.9rem; color: var(--fg); margin-top: 0.2rem; word-break: break-word; }
.sx-none { font-size: 0.9rem; color: var(--secondary); }
.sx-banner { background: #FEE2E2; border: 2px solid var(--danger); border-radius: 12px;
  padding: 0.75rem 0.9rem; margin-bottom: 0.9rem; font-size: 1rem; color: #991B1B; }
html.hc .sx-item.recent, html.hc .sx-banner { background: #fff; }
.share-person { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.share-person:last-child { border-bottom: none; }
.share-person .nm { font-weight: 700; }
.share-person .sub { font-size: 0.82rem; color: var(--secondary); }
.share-person .right { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
/* 시각 크기는 유지, 터치 영역만 44px 이상으로 확장 */
.switch input { opacity: 0; position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); z-index: 2; cursor: pointer; margin: 0; }
.switch .track { position: absolute; inset: 0; background: #CBD5E1; border-radius: 30px; transition: background 0.15s; }
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  background: #fff; border-radius: 50%; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.switch input:checked + .track { background: var(--success); }
.switch input:checked + .track::after { transform: translateX(22px); }
.invite-code-box { text-align: center; padding: 1rem; background: var(--muted); border-radius: var(--radius); margin: 0.8rem 0; }
.invite-code-box .code { font-size: 2.2rem; font-weight: 700; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; color: var(--primary); }
.invite-code-box .exp { font-size: 0.85rem; color: var(--secondary); }

/* ── 설정 ── */
.set-row { display: flex; align-items: center; min-height: 56px; gap: 0.8rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: none; }
.set-row .lbl { flex: 1; font-weight: 500; }
.set-row select { min-height: 44px; border: 2px solid var(--border); border-radius: 10px; padding: 0 0.5rem; background: #fff; }

.check-row { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; font-weight: 500; }
.check-row input { width: 24px; height: 24px; accent-color: var(--accent); }

/* ── 휠 피커 시트 (iOS식 다중 열, 2026-09-09) ── */
.picker-root { margin-top: 0.4rem; }
.picker { position: relative; display: flex; height: 180px; }
.picker-band { position: absolute; left: 0; right: 0; top: 72px; height: 36px; background: #E0F2FE; border-radius: 10px; }
html.hc .picker-band { background: #fff; border: 3px solid var(--accent); }
.picker-col { flex: 1; position: relative; height: 180px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; -ms-overflow-style: none; }
.picker-col::-webkit-scrollbar { display: none; }
.picker-item { height: 36px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; font-size: 1.05rem; color: #94A3B8; font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; }
.picker-item.on { color: var(--fg); font-weight: 700; font-size: 1.3rem; }
html.hc .picker-item { color: var(--secondary); }
html.hc .picker-item.on { color: #000; }
.sheet-head { display: flex; align-items: center; gap: 0.3rem; }
.sheet-title { flex: 1; text-align: center; font-weight: 700; font-size: 1.05rem; }
.sheet-btn { border: none; background: none; min-width: 48px; min-height: 44px; font-size: 1.4rem; color: var(--secondary); }
.sheet-btn.done { color: var(--accent); font-weight: 700; font-size: 1rem; }
.sheet-btn:focus-visible { outline: 3px solid var(--accent); border-radius: 8px; }
/* 폼의 요약 필드 — 누르면 시트가 열린다 */
.picker-field { width: 100%; display: flex; align-items: center; gap: 0.5rem; min-height: 56px; padding: 0 0.9rem; border: 2px solid var(--border); border-radius: 12px; background: #fff; text-align: left; font-size: 1rem; }
.picker-field:active { background: var(--muted); }
.picker-field .pf-lbl { color: var(--secondary); font-weight: 500; }
.picker-field .pf-val { margin-left: auto; font-weight: 700; color: var(--accent-dark); font-size: 1.1rem; }
.picker-field .pf-chev { color: var(--secondary); font-size: 1.4rem; line-height: 1; }
.seg.seg-wrap button { flex: 1 1 30%; }
.notice { background: #FEF3C7; border: 2px solid #F59E0B; border-radius: 12px; padding: 0.7rem 0.9rem; margin-bottom: 0.9rem; font-size: 0.92rem; color: #78350F; }
.med-item .med-del { flex: 0 0 auto; }

/* ── 필요시 약 (홈) ── */
.prn-item { margin-bottom: 0.7rem; }
.prn-item .dose-item { margin-bottom: 0; }
.prn-item .chk-btn { border-color: var(--accent); color: var(--accent-dark); }
.prn-logs { margin: 0 0.4rem; border: 1.5px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; padding: 0.4rem 0.6rem; background: #F8FAFC; }
.prn-log { display: flex; align-items: center; gap: 0.5rem; min-height: 36px; font-size: 0.9rem; }
.prn-log .t { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prn-log .n { flex: 1; color: var(--secondary); word-break: break-word; }
.prn-del { border: none; background: var(--muted); color: var(--secondary); width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; flex-shrink: 0; }

/* ── 모달 ── */
.modal-back {
  position: fixed; inset: 0; background: rgba(2, 6, 23, 0.55); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0;
  padding: 1.2rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom));
  max-height: 88dvh; overflow-y: auto;
}
.modal h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.9rem; }
.modal .modal-close { position: sticky; float: right; top: 0; border: none; background: var(--muted); width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; }

/* ── PWA 설치 배너 ── */
.install-banner {
  position: fixed; bottom: calc(76px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 456px;
  display: flex; align-items: center; gap: 0.7rem;
  background: #fff; border: 2px solid var(--accent); border-radius: var(--radius);
  padding: 0.7rem 0.8rem; z-index: 150;
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.18);
}
.install-banner .ib-icon { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
.install-banner .ib-text { flex: 1; font-size: 0.88rem; line-height: 1.4; }
.install-banner .btn { flex: 0 0 auto; }
.install-banner .ib-close {
  border: none; background: none; color: var(--secondary); font-size: 1.3rem;
  min-width: 40px; min-height: 40px; flex-shrink: 0;
}

/* ── 토스트 ── */
.toast {
  position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 0.75rem 1.3rem; border-radius: 12px;
  font-weight: 500; z-index: 300; max-width: 90%; text-align: center;
  animation: toast-in 0.2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.empty { text-align: center; color: var(--secondary); padding: 2rem 1rem; }
.empty .big { font-size: 2.5rem; margin-bottom: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
