/* =====================================================================
 * TimeLine — 아이폰 글래스 느낌
 * 반투명 유리 카드(뒤 배경이 흐리게 비침) + 둥근 모서리 + 원형 체크
 * 카드 모서리는 아이폰 알림 카드처럼 크게(22px), 버튼·칩은 알약 모양
 * ===================================================================== */
:root {
  --primary: #0a84ff;            /* iOS 시스템 파랑 */
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --purple: #5e5ce6;
  --text: #1c1c1e;
  --text-2: #3a3a3c;
  --muted: #8e8e93;

  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-line: rgba(60, 60, 67, 0.12);
  --blur: saturate(180%) blur(22px);
  --shadow: 0 8px 30px rgba(17, 24, 39, 0.10);

  --r-card: 22px;     /* 카드 모서리 (아이폰 알림 카드 비율) */
  --r-ctl: 14px;      /* 입력칸·버튼 */
  --sidebar-w: 240px;
  --header-h: 60px;
  --cell-w: 64px;
  --name-w: 76px;
  --row-h: 60px;
  --today: rgba(10, 132, 255, 0.10);
  --weekend: rgba(255, 69, 58, 0.05);
  --sleep: rgba(94, 92, 230, 0.10);
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Pretendard', 'Apple SD Gothic Neo', sans-serif; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  color: var(--text); overflow: hidden;
  /* 유리 뒤로 비칠 배경 (부드러운 하늘·노을 그라데이션) */
  background:
    radial-gradient(1200px 700px at 10% -10%, #c7d8ff 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 0%, #ffd9e8 0%, transparent 55%),
    radial-gradient(900px 700px at 60% 110%, #c9f2e6 0%, transparent 60%),
    linear-gradient(180deg, #eef2f8 0%, #f6f3ee 100%);
  background-attachment: fixed;
}
button { font: inherit; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ===== 왼쪽 탭 ===== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  display: flex; flex-direction: column; z-index: 1000;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-right: 1px solid var(--glass-border);
  padding-left: env(safe-area-inset-left, 0px);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.sidebar-header { padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--glass-line); }
.sidebar-logo { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.9); box-shadow: 0 2px 8px rgba(0,0,0,0.10); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.sidebar-title { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.sidebar-version { font-size: 11px; color: var(--muted); margin-top: 3px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 16px;
  border: none; border-radius: 14px; background: none; text-align: left; font-size: 15px; color: var(--text-2);
  transition: background 0.2s;
}
.nav-item:hover { background: rgba(255,255,255,0.6); }
.nav-item.active { background: rgba(255,255,255,0.9); color: var(--primary); font-weight: 600; box-shadow: 0 2px 10px rgba(10,132,255,0.15); }
.nav-item-icon { width: 22px; text-align: center; font-size: 17px; }
.sidebar-footer { padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--glass-line); display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #0a84ff, #64d2ff); color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--muted); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ===== 본 화면 ===== */
.main { margin-left: var(--sidebar-w); height: 100%; display: flex; flex-direction: column; min-width: 0; }
.main-header {
  position: relative; flex-shrink: 0;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 16px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.45);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-line);
  z-index: 50;
}
.menu-toggle { display: none; width: 44px; height: 44px; border: none; background: none; font-size: 1.35rem; border-radius: 50%; }
.menu-toggle:hover { background: rgba(255,255,255,0.7); }
.page-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.4px; }
.save-status { margin-left: auto; font-size: 0.75rem; color: #248a3d; white-space: nowrap; opacity: 0; transition: opacity 0.4s ease; }
.save-status.show { opacity: 1; }
.account-slot { font-size: 0.75rem; padding: 6px 10px; border-radius: 14px; background: rgba(255,255,255,0.7); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--muted); white-space: nowrap; }
.account-slot.ready { color: #248a3d; }
.main-body { flex: 1; overflow: auto; padding: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); -webkit-overflow-scrolling: touch; }
.view { display: none; }
.view.active { display: block; }

/* 날짜 이동 */
.date-nav { display: flex; align-items: center; gap: 6px; }
.dn-btn { width: 38px; height: 38px; border: none; border-radius: 50%; background: rgba(255,255,255,0.75); box-shadow: 0 1px 4px rgba(0,0,0,0.08); color: var(--text-2); }
.dn-date { height: 38px; padding: 0 14px; border: none; border-radius: 19px; background: rgba(255,255,255,0.9); box-shadow: 0 1px 4px rgba(0,0,0,0.08), inset 0 0 0 1.5px var(--primary); font-weight: 700; white-space: nowrap; }
.dn-date.not-today { box-shadow: 0 1px 4px rgba(0,0,0,0.08), inset 0 0 0 1.5px var(--orange); }
.dn-today { height: 38px; padding: 0 14px; border: none; border-radius: 19px; background: var(--primary); color: #fff; font-weight: 700; }

/* 달력 */
.cal-pop { position: absolute; top: calc(100% + 6px); right: 12px; z-index: 1100; width: 344px; max-width: calc(100vw - 24px); padding: 12px; border-radius: var(--r-card);
  background: rgba(255,255,255,0.85); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: 0 18px 50px rgba(0,0,0,0.18); }
.cal-pop[hidden] { display: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font-weight: 700; font-size: 1.05rem; }
.cal-nav { width: 44px; height: 40px; border: none; background: none; font-size: 1.5rem; border-radius: 50%; color: var(--primary); }
.cal-grid { display: grid; grid-template-columns: 34px repeat(7, 1fr); row-gap: 2px; text-align: center; }
.cal-wk-head { background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 700; border-radius: 8px 8px 0 0; padding: 6px 0; }
.cal-wk { color: #b0b4bd; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--glass-line); }
.cal-dow { font-size: 0.78rem; color: var(--muted); padding: 6px 0; }
.cal-day { position: relative; height: 40px; border: none; background: none; border-radius: 50%; font-size: 0.95rem; }
.cal-day:hover { background: rgba(10,132,255,0.08); }
.cal-day.other { color: #c7c7cc; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.cal-day.sel { background: var(--primary); color: #fff; font-weight: 700; }
.cal-day.has::after { content: ''; position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--orange); }
.cal-day.sel.has::after { background: #fff; }
.cal-foot { margin-top: 8px; font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cal-dot-sample { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); display: inline-block; }

/* ===== 카드 ===== */
.card {
  border-radius: var(--r-card); padding: 16px 16px 14px; margin-bottom: 14px;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
.card h2 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card h2 .sub-hint { font-size: 0.72rem; font-weight: 400; color: var(--muted); }

/* 원형 체크 (iOS 미리알림 느낌) */
.round-check {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #c7c7cc; background: rgba(255,255,255,0.8);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all 0.18s ease;
}
.round-check::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px) scale(0); transition: transform 0.18s ease; }
.round-check:checked { background: var(--primary); border-color: var(--primary); }
.round-check:checked::after { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.habit .round-check:checked { background: var(--green); border-color: var(--green); }

/* 공통 입력·버튼 */
.text-input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: none; border-radius: var(--r-ctl); background: rgba(255,255,255,0.75); outline: none; font-size: 16px; box-shadow: inset 0 0 0 1px var(--glass-line); }
.text-input:focus { box-shadow: inset 0 0 0 2px var(--primary); background: #fff; }
.add-item-btn { margin-top: 10px; width: 100%; min-height: 44px; border: none; border-radius: var(--r-ctl); background: rgba(10,132,255,0.10); color: var(--primary); font-weight: 600; }
.add-item-btn:hover { background: rgba(10,132,255,0.16); }
.item-del { width: 34px; height: 34px; border: none; background: none; color: #aeaeb2; font-size: 1rem; border-radius: 50%; flex-shrink: 0; }
.item-del:hover { background: rgba(255,69,58,0.12); color: var(--red); }
.drag-handle { color: #aeaeb2; cursor: grab; padding: 0 2px; user-select: none; font-size: 1.1rem; }
.pill { min-height: 34px; padding: 0 14px; border: none; border-radius: 17px; background: rgba(255,255,255,0.8); box-shadow: inset 0 0 0 1px var(--glass-line); font-size: 0.85rem; }
.pill.active { background: var(--primary); color: #fff; box-shadow: none; font-weight: 600; }

/* ===== 오늘 플래너 (메인) =====
 * 좁은 화면: Priority → 시간순 → 체크리스트 → 메모
 * 넓은 화면: [Priority | 시간순] / [메모 | 체크리스트]
 */
/* 외출 루틴(위, 그리드 밖) → 메모·스케치 → 체크리스트: 메모를 가운데에 둬서 📎 합성(메모를 체크리스트로 끌기) 동선을 짧게 */
.planner-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "notes" "checklist" "schedule"; }
.area-priority { grid-area: priority; }
.area-schedule { grid-area: schedule; min-width: 0; }
.area-notes { grid-area: notes; }
.area-checklist { grid-area: checklist; }

/* 🔁 매일 습관 */
.habit-list { display: flex; flex-wrap: wrap; gap: 8px; }
.habit { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 22px; background: rgba(255,255,255,0.7); box-shadow: inset 0 0 0 1px var(--glass-line); transition: background 0.2s; }
.habit.done { background: rgba(48,209,88,0.16); box-shadow: inset 0 0 0 1px rgba(48,209,88,0.35); }
.habit-text { width: 6.5em; min-height: 36px; border: none; background: transparent; outline: none; font-size: 16px; }
.habit.done .habit-text { color: #248a3d; font-weight: 600; }
.habit .item-del { width: 30px; height: 30px; }
.habit-add { width: auto; padding: 0 16px; }

/* 🚀 Priority */
.priority-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.priority-label { font-weight: 700; min-width: 28px; color: var(--primary); }

/* ✅ 체크리스트 */
.checklist-container { display: flex; flex-direction: column; gap: 6px; }
.checklist-item { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-radius: var(--r-ctl); background: rgba(255,255,255,0.6); }
.checklist-item .text-input { background: transparent; box-shadow: none; }
.checklist-item .text-input:focus { background: rgba(255,255,255,0.9); }
.checklist-item.completed .text-input { text-decoration: line-through; color: var(--muted); }
.checklist-empty { color: var(--muted); font-size: 0.85rem; padding: 4px 2px; }

/* 💡 메모: 글씨 / 스케치 */
.note-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.floating-textarea { width: 100%; min-height: 200px; padding: 12px 14px; border: none; border-radius: var(--r-ctl); resize: vertical; outline: none; background: rgba(255,255,255,0.7); box-shadow: inset 0 0 0 1px var(--glass-line); line-height: 1.6; font-size: 16px; }
.sketch-wrap { position: relative; width: 100%; height: 280px; border-radius: var(--r-ctl); overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--glass-line); }
.sketch-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sketch-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--glass-line); }
.swatch.active { box-shadow: 0 0 0 2.5px var(--primary); }

/* ===== 시간 격자 (메인의 시간순 + 📊 타임라인) ===== */
.tl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(118,118,128,0.12); }
.seg button { min-height: 34px; padding: 0 14px; border: none; background: none; border-radius: 9px; color: var(--text-2); font-size: 0.88rem; }
.seg button.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.week-nav { display: inline-flex; align-items: center; gap: 6px; }
.week-nav button { min-width: 40px; min-height: 36px; border: none; border-radius: 18px; background: rgba(255,255,255,0.8); box-shadow: inset 0 0 0 1px var(--glass-line); }
.week-nav .today-btn { padding: 0 14px; background: var(--primary); color: #fff; box-shadow: none; font-weight: 600; }
.week-title { font-weight: 700; padding: 0 4px; }
.chip-tray { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip-tray .hint { font-size: 0.8rem; color: var(--muted); align-self: center; }
.chip { padding: 7px 12px; border-radius: 16px; background: rgba(10,132,255,0.12); color: var(--primary); font-size: 0.85rem; cursor: grab; user-select: none; }
.chip.done { opacity: 0.45; text-decoration: line-through; }

.tl-scroll { overflow: auto; border-radius: 16px; background: rgba(255,255,255,0.55); box-shadow: inset 0 0 0 1px var(--glass-line); -webkit-overflow-scrolling: touch; }
.tl-grid { display: grid; grid-template-columns: var(--name-w) repeat(24, var(--cell-w)); width: max-content; }
.tl-head, .tl-name, .tl-cell { border-right: 1px solid rgba(60,60,67,0.07); border-bottom: 1px solid rgba(60,60,67,0.07); }
.tl-head { position: sticky; top: 0; z-index: 5; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 0.74rem; font-weight: 600; color: var(--text-2); background: rgba(246,247,250,0.95); }
.tl-head.corner { left: 0; z-index: 6; }
.tl-head.now { background: var(--primary); color: #fff; }
.tl-head.sleep { color: var(--purple); }
.tl-name { position: sticky; left: 0; z-index: 4; height: var(--row-h); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; background: rgba(255,255,255,0.95); }
.tl-name small { font-weight: 400; color: var(--muted); font-size: 0.7rem; }
.tl-name.weekend { color: var(--red); }
.tl-name.today { background: #e8f2ff; }
.tl-cell { height: var(--row-h); padding: 3px; display: flex; flex-direction: column; gap: 2px; }
.tl-cell.weekend { background: var(--weekend); }
.tl-cell.today { background: var(--today); }
.tl-cell.now { background: rgba(10,132,255,0.20); }
.tl-cell.sleep { background: repeating-linear-gradient(135deg, var(--sleep) 0 6px, rgba(94,92,230,0.03) 6px 12px); }
.tl-cell.sleep-first::before { content: attr(data-sleep); font-size: 0.66rem; color: var(--purple); font-weight: 600; white-space: nowrap; overflow: visible; }
.tl-cell.drag-over { box-shadow: inset 0 0 0 2px var(--primary); background: rgba(10,132,255,0.12); }
.tl-lane { position: relative; z-index: 2; pointer-events: none; }
.task-bar { position: absolute; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none;
  border-radius: 8px; color: #fff; font-size: 0.7rem; line-height: 1.15; overflow: hidden; display: flex; align-items: center;
  cursor: grab; box-shadow: 0 1px 4px rgba(0,0,0,0.18); min-width: 6px; }
.task-bar:active { cursor: grabbing; }
.bar-label { flex: 1; min-width: 0; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label b { font-weight: 700; opacity: 0.85; }
.rz { width: 10px; align-self: stretch; flex-shrink: 0; cursor: ew-resize; position: relative; }
.rz::after { content: ''; position: absolute; top: 30%; bottom: 30%; left: 4px; width: 2px; border-radius: 1px; background: rgba(255,255,255,0.7); }
.task-bar.c0 { background: #0a84ff; }
/* 같은 시간에 겹치면 색을 바꾼다 */
.task-bar.c1 { background: #ff9f0a; }
.task-bar.c2 { background: #bf5af2; }
.task-bar.c3 { background: #30d158; }
.task-bar.c4 { background: #ff375f; }
.task-bar.dragging { opacity: 0.85; box-shadow: 0 6px 16px rgba(0,0,0,0.25); z-index: 3; }

/* ===== 설정 ===== */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { min-height: 44px; padding: 0 18px; border: none; border-radius: 22px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn-save { background: var(--green); color: #fff; }
.btn-load { background: var(--primary); color: #fff; }
.btn-reset { background: rgba(255,255,255,0.85); box-shadow: inset 0 0 0 1px var(--glass-line); }
.help { color: var(--muted); font-size: 0.85rem; margin-top: 10px; line-height: 1.6; }
.set-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.set-row label { min-width: 90px; font-weight: 600; }
.set-row select { min-height: 40px; padding: 0 12px; border: none; border-radius: 12px; background: rgba(255,255,255,0.85); box-shadow: inset 0 0 0 1px var(--glass-line); font-size: 16px; }

/* ===== 반응형 =====
 * 600px 미만(휴대폰, 접은 폴더블): 탭 숨김 + ☰
 * 600~839px(펼친 폴더블, 태블릿 세로): 탭 항상 표시, 조금 좁게
 * 840px 이상(태블릿 가로, 컴퓨터): 탭 항상 표시, 4분할
 */
@media (min-width: 600px) and (max-width: 839px) { :root { --sidebar-w: 200px; } }
@media (min-width: 840px) {
  .planner-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "notes schedule" "checklist schedule"; align-items: start; gap: 14px; }
  .planner-grid .card { margin-bottom: 0; }
}
@media (max-width: 599px) {
  :root { --cell-w: 56px; --name-w: 56px; --r-card: 20px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.active { display: block; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-body { padding: 12px; }
  .page-title { display: none; }
  .save-status { font-size: 0; }
  .save-status::before { content: attr(data-short); font-size: 0.95rem; }
  .dn-btn { width: 34px; height: 34px; }
  .dn-date { padding: 0 10px; font-size: 0.88rem; height: 34px; }
  .dn-today { padding: 0 10px; height: 34px; }
  .account-slot { display: none; }           /* 휴대폰: 자리 부족 → 탭 아래쪽에 표시 */
  .rz { width: 14px; }                       /* 손가락으로 잡기 쉽게 */
}
/* 유리 효과를 못 쓰는 브라우저: 불투명하게 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .sidebar, .main-header, .cal-pop { background: rgba(255,255,255,0.95); }
}

/* ===== 계정 연동 · 스케치 일정 ===== */
.fb-setup { margin-top: 14px; }
.fb-setup summary { cursor: pointer; font-weight: 600; color: var(--primary); min-height: 36px; display: flex; align-items: center; }
.fb-setup ol { padding-left: 20px; margin: 6px 0 10px; }
.fb-setup code { background: rgba(118,118,128,0.12); padding: 1px 5px; border-radius: 6px; font-size: 0.85em; }
.sketch-drag { cursor: grab; display: inline-flex; align-items: center; }
.bar-thumb { height: 100%; max-height: 40px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: #fff; margin-right: 4px; flex-shrink: 0; }
.task-bar.has-img { background: #5e5ce6; }
.float-view { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,0.30); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fadeIn 0.2s ease; }
.float-view[hidden] { display: none; }
.float-card { max-width: min(92vw, 720px); max-height: 86vh; display: flex; flex-direction: column; padding: 10px 10px 12px; border-radius: 26px;
  background: rgba(255,255,255,0.78); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border);
  box-shadow: 0 24px 70px rgba(0,0,0,0.30); animation: popIn 0.25s cubic-bezier(.2,.9,.3,1.2); }
.float-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 8px 10px; font-weight: 600; font-size: 0.9rem; }
.float-card img { max-width: 100%; max-height: calc(86vh - 60px); object-fit: contain; border-radius: 18px; background: #fff; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 2100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 22px; color: #fff; font-size: 0.9rem; font-weight: 600; white-space: nowrap;
  background: rgba(28,28,30,0.78); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transition: all 0.3s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

/* ===== 과거 시간은 아주 연하게 (지금부터가 눈에 띄게) ===== */
.tl-cell.past { background: rgba(240,240,244,0.65) !important; }
.tl-cell.past.sleep { background: repeating-linear-gradient(135deg, rgba(94,92,230,0.04) 0 6px, transparent 6px 12px) !important; }
.tl-head.past { color: #c7c7cc; }
.tl-name.past { color: #aeaeb2; }
.task-bar.past { opacity: 0.35; filter: saturate(0.4); }
.task-bar .bell { margin-left: 2px; font-size: 0.65rem; }

/* 일정 창 (알림 설정) */
.float-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 6px 2px; min-width: min(80vw, 360px); }
.float-body .row-title { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.alert-chip { min-height: 36px; padding: 0 14px; border: none; border-radius: 18px; background: rgba(255,255,255,0.85); box-shadow: inset 0 0 0 1px var(--glass-line); font-size: 0.88rem; }
.alert-chip.on { background: var(--orange); color: #fff; box-shadow: none; font-weight: 600; }

/* ☀️ 기상 확인 배너 */
.wake-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: linear-gradient(135deg, rgba(255,214,10,0.25), rgba(255,159,10,0.18)); }
.wake-banner[hidden] { display: none; }
.wake-banner .msg { flex: 1; min-width: 200px; font-weight: 600; }
.sleep-log { margin-top: 10px; font-size: 0.85rem; color: var(--text-2); line-height: 1.7; }
input[type="time"].text-input { flex: 0 0 auto; }

/* 🧭 오늘의 태도 · 습관 완료 안내 */
.attitude-card #attitude-input { width: 100%; font-size: 17px; font-weight: 600; }
/* 🚪 다 챙겼어요: 누르면 펼치기/접기. 접혔을 때는 챙긴 항목이 한줄명언 아래 작은 알약으로 */
.habit-done-msg { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 10px; padding: 12px 14px; border: 0; border-radius: 16px; text-align: left; font: inherit;
  background: rgba(48,209,88,0.14); color: #1d6b31; line-height: 1.5; animation: pop .35s ease; cursor: pointer; touch-action: manipulation; }
.habit-done-msg .quote { font-size: 14px; color: #3a5a44; }
.done-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 1rem; }
.done-hint { flex: none; font-size: 0.72rem; font-weight: 600; opacity: 0.75; white-space: nowrap; }
.done-minis { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.done-mini { font-size: 10.5px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 9px; background: rgba(48,209,88,0.18); color: #1d6b31; white-space: nowrap; animation: shrinkIn .35s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes shrinkIn { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
.habit-card.collapsed .habit-head h2 .sub-hint { display: none; }
.habit-card.collapsed .habit-done-msg { margin-top: 2px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* 📦 미룬 일 */
.late-badge { flex: none; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 12px; background: rgba(255,159,10,0.16); color: #b25e00; white-space: nowrap; }
.late-badge.hot { background: rgba(255,59,48,0.14); color: #c4261d; }
.checklist-item.carried { opacity: .4; }
.carried-tag { flex: none; font-size: 12px; color: var(--muted, #888); white-space: nowrap; }
.carry-card { border: 1px solid rgba(255,159,10,0.35); }
.carry-card h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.carry-all { margin-left: auto; }
.carry-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--glass-line); }
.carry-text { flex: 1; min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
.carry-row .pill { flex: none; min-height: 36px; }
.carry-row .pill.go { background: rgba(10,132,255,0.14); color: #0a64c2; font-weight: 600; }
.carry-row .pill.hold { background: rgba(142,142,147,0.16); }
.held-toggle { margin-top: 8px; border: none; background: none; font-size: 14px; color: var(--muted, #777); padding: 6px 0; cursor: pointer; }

/* 🌙 저녁 회고 */
#view-review.active { display: flex; flex-direction: column; gap: 14px; }
#view-review .card { margin: 0; }
.review-attitude { font-weight: 600; background: rgba(10,132,255,0.08); }
.top3-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-top: 1px solid var(--glass-line); }
.top3-row:first-child { border-top: none; }
.top3-text { flex: 1 1 180px; font-size: 16px; font-weight: 600; }
.top3-text.empty { color: #aaa; font-weight: 400; }
.top3-seg { display: flex; gap: 4px; background: rgba(120,120,128,0.12); border-radius: 12px; padding: 3px; }
.top3-seg button { border: none; background: transparent; border-radius: 9px; padding: 8px 10px; font-size: 14px; min-height: 36px; cursor: pointer; }
.top3-seg button.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); font-weight: 700; }
#review-line { width: 100%; font-size: 17px; }
.review-two { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 840px) { .review-two { grid-template-columns: 1fr 1fr; } }
.review-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.review-item .text-input { flex: 1; min-width: 0; }
.review-dot { flex: none; }

/* 일정 막대: 평소엔 제목만, 끌 때만 시각 표시 (짧은 막대에서 제목이 가려지지 않게) */
.bar-label b { display: none; }
.task-bar.dragging .bar-label b { display: inline; }
.task-bar.dragging { z-index: 5; }
/* 👆 손가락 끌기 */
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; margin: -46px 0 0 -20px; max-width: 70vw; padding: 8px 12px; border-radius: 14px; background: rgba(28,28,30,0.88); color: #fff; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.drag-ghost span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drag-ghost.ok { background: rgba(10,132,255,0.95); }
.drag-ghost b { flex: none; }
.drag-handle, .chip, #note-handle, #sketch-handle { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
@media (pointer: coarse) {
  .drag-handle, .chip, #note-handle, #sketch-handle { touch-action: none; }
  .drag-handle { padding: 10px 8px; margin: -6px -2px; font-size: 1.3rem; }
  .rz { width: 18px; }
}
.tl-cell.drag-over { background: rgba(10,132,255,0.22) !important; }
/* 📦 미룬 일 탭 */
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #ff9f0a; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.carry-card { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.carry-sum { flex: 1 1 200px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.carry-view { display: flex; flex-direction: column; gap: 14px; }
.carry-view .card { margin: 0; }
.carry-group { font-size: 13px; font-weight: 700; color: var(--muted, #888); padding: 10px 0 2px; }

/* 💾 저장 위치 */
.store-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; flex-wrap: wrap; }
.store-k { flex: none; width: 7.5em; font-weight: 600; }
.store-v { flex: 1 1 200px; color: var(--muted, #666); overflow-wrap: anywhere; }
.fs-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(10,132,255,0.08); }
.fs-banner span { flex: 1 1 200px; }

/* hidden 속성은 항상 숨김 (display를 준 카드에도) */
[hidden] { display: none !important; }

/* 😴 수면 시간 휠 (아래에서 올라오는 시트) */
.tl-cell.sleep { cursor: pointer; }
.sheet { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,0.28); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { width: 100%; max-width: 460px; background: rgba(250,250,252,0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(0,0,0,0.15); animation: sheetUp .25s ease; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 10px; }
.sheet-btn { border: none; background: none; font-size: 17px; color: var(--primary, #0a84ff); padding: 8px 4px; min-height: 44px; cursor: pointer; }
.sheet-btn.primary { font-weight: 700; }
.sheet-btn:disabled { color: #c7c7cc; }
.wheels { display: flex; gap: 12px; }
.wheel-col { flex: 1; text-align: center; }
.wheel-label { font-size: 13px; color: var(--muted, #888); margin-bottom: 4px; font-weight: 600; }
.wheel { position: relative; height: 220px; overflow-y: scroll; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); border-radius: 12px; }
.wheel-col { position: relative; }
.wheel-col::after { content: ''; position: absolute; left: 0; right: 0; bottom: 88px; height: 44px; border-radius: 10px; background: rgba(120,120,128,0.12); pointer-events: none; }
.wheel::-webkit-scrollbar { display: none; }
.wheel-pad { height: 88px; }
.wheel-item { height: 44px; line-height: 44px; scroll-snap-align: center; font-size: 19px; color: #8e8e93; cursor: pointer; transition: color .15s, font-size .15s; }
.wheel-item.on { color: #1c1c1e; font-size: 22px; font-weight: 600; }
.sheet-sum { text-align: center; margin-top: 12px; font-size: 15px; font-weight: 600; }
.sheet-sum.bad { color: #ff3b30; }
.sc-dl { display: inline-block; margin: 6px 0; text-decoration: none; }
.store-path { font-weight: 600; color: #1c1c1e; }

/* 🎨 Priority 순위 파스텔 색 (#1 분홍 · #2 노랑 · #3 하늘) — Priority 칸과 연결된 체크리스트가 같은 색 */
:root { --p1: #ffe3ea; --p1-line: #f7b6c6; --p1-ink: #b4365a; --p2: #fff3cc; --p2-line: #f1d77c; --p2-ink: #8a6400; --p3: #dff0ff; --p3-line: #a9d2f5; --p3-ink: #2a6aa3; }
.priority-item { border-radius: 14px; padding: 4px 6px; transition: box-shadow .15s, transform .15s; }
.priority-item.p1 { background: var(--p1); } .priority-item.p1 .priority-label { color: var(--p1-ink); }
.priority-item.p2 { background: var(--p2); } .priority-item.p2 .priority-label { color: var(--p2-ink); }
.priority-item.p3 { background: var(--p3); } .priority-item.p3 .priority-label { color: var(--p3-ink); }
.priority-item .p-input { background: rgba(255,255,255,0.75); }
.priority-item.drop-target { box-shadow: 0 0 0 2px var(--primary, #0a84ff); transform: scale(1.02); }
.checklist-item.p1 { background: var(--p1); box-shadow: inset 0 0 0 1px var(--p1-line); }
.checklist-item.p2 { background: var(--p2); box-shadow: inset 0 0 0 1px var(--p2-line); }
.checklist-item.p3 { background: var(--p3); box-shadow: inset 0 0 0 1px var(--p3-line); }
.prio-tag { flex: none; font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 8px; background: rgba(255,255,255,0.8); }
.checklist-item.p1 .prio-tag { color: var(--p1-ink); } .checklist-item.p2 .prio-tag { color: var(--p2-ink); } .checklist-item.p3 .prio-tag { color: var(--p3-ink); }

/* ⏱ 기기 시계 */
.now-clock { font-size: 13px; font-weight: 700; color: var(--muted, #777); font-variant-numeric: tabular-nums; padding: 0 2px; }

/* 시간순 일정 막대도 순위 색 (Priority·체크리스트와 같은 파스텔) */
.task-bar.p1 { background: var(--p1); color: var(--p1-ink); box-shadow: inset 0 0 0 1.5px var(--p1-line); }
.task-bar.p2 { background: var(--p2); color: var(--p2-ink); box-shadow: inset 0 0 0 1.5px var(--p2-line); }
.task-bar.p3 { background: var(--p3); color: var(--p3-ink); box-shadow: inset 0 0 0 1.5px var(--p3-line); }
.task-bar.p1 .rz::after, .task-bar.p2 .rz::after, .task-bar.p3 .rz::after { background: rgba(0,0,0,0.25); }

/* 📎 합성: 메모·스케치를 붙인 칸은 테두리가 두꺼워지고, 📎 버튼을 누르면 붙인 것이 보인다 */
.priority-item.has-attach, .checklist-item.has-attach { box-shadow: inset 0 0 0 3px #8b7fd6; }
.priority-item.p1.has-attach, .checklist-item.p1.has-attach { box-shadow: inset 0 0 0 3px var(--p1-ink); }
.priority-item.p2.has-attach, .checklist-item.p2.has-attach { box-shadow: inset 0 0 0 3px var(--p2-ink); }
.priority-item.p3.has-attach, .checklist-item.p3.has-attach { box-shadow: inset 0 0 0 3px var(--p3-ink); }
.priority-item.attach-over, .checklist-item.attach-over { outline: 2px dashed var(--primary, #0a84ff); outline-offset: 2px; transform: scale(1.02); }
.attach-badge { flex: none; border: 0; font: inherit; font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 12px;
  background: rgba(255,255,255,0.9); color: #4b3fa6; cursor: pointer; white-space: nowrap; min-height: 28px; }
.attach-badge[hidden] { display: none; }
.attach-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,0.75); }
.attach-note { white-space: pre-wrap; word-break: break-word; line-height: 1.5; font-size: 0.95rem; }
.float-card img.attach-img { max-height: 50vh; width: auto; max-width: 100%; }
.attach-off { align-self: flex-end; }
.float-card .float-body { overflow-y: auto; }

/* 🏆 순위 정하기: 체크 동그라미가 숫자 동그라미로 바뀌고, 누른 차례대로 1·2·3 */
.area-checklist h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rank-btn { flex: none; font-weight: 700; }
.rank-btn.on { background: #ffd60a; color: #5a4300; }
.rank-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: -2px 0 10px; padding: 8px 10px; border-radius: 14px; background: #fff8d6; font-size: 0.85rem; font-weight: 600; color: #6b5200; }
.rank-bar[hidden] { display: none; }
.rank-acts { display: flex; gap: 6px; }
.rank-dot { display: none; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px dashed #c9b25a; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: #fff; color: #6b5200; }
.ranking .rank-dot { display: flex; }
.ranking .round-check, .ranking .drag-handle, .ranking .item-del, .ranking .attach-badge, .ranking .prio-tag, .ranking .late-badge { display: none; }
.ranking .checklist-item { cursor: pointer; }
.ranking .checklist-item .text-input { pointer-events: none; }
.ranking .checklist-item.carried { pointer-events: none; }
.ranking .checklist-item.rk1 .rank-dot { border: 0; background: var(--p1-ink); color: #fff; }
.ranking .checklist-item.rk2 .rank-dot { border: 0; background: var(--p2-ink); color: #fff; }
.ranking .checklist-item.rk3 .rank-dot { border: 0; background: var(--p3-ink); color: #fff; }

/* 🔁 습관 요일 나누기 */
.habit-day-note { margin-top: 8px; font-size: 0.78rem; color: var(--muted); }
.habit-day-note[hidden] { display: none; }
.habit-days { display: flex; flex-direction: column; gap: 10px; }
/* 🔁 습관 요일: 아이폰 한 손 터치 — 버튼 44px 이상, 좁은 폭에서는 7칸이 폭에 맞게 나눠짐 */
.hd-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--glass-line); }
.hd-row:first-child { border-top: 0; }
.hd-head { display: flex; align-items: center; gap: 8px; }
.hd-name { flex: 1 1 auto; font-weight: 600; font-size: 0.95rem; }
.hd-sum { font-size: 0.8rem; color: var(--muted); }
.hd-picker { display: flex; flex-direction: column; gap: 8px; }
.hd-quick { display: flex; gap: 6px; }
.hd-preset { flex: 1 1 0; min-height: 44px; border-radius: 14px; border: 0; font: inherit; font-size: 0.9rem; font-weight: 600; background: rgba(120,120,128,0.12); color: var(--text-2); cursor: pointer; touch-action: manipulation; }
.hd-preset.on { background: rgba(10,132,255,0.16); color: var(--primary, #0a84ff); box-shadow: inset 0 0 0 1.5px var(--primary, #0a84ff); }
.hd-chips { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 4px; max-width: 420px; }
.hd-chip { min-width: 44px; height: 44px; border-radius: 22px; border: 0; font: inherit; font-size: 0.95rem; font-weight: 700; background: rgba(120,120,128,0.12); color: var(--muted); cursor: pointer; touch-action: manipulation; }
.hd-chip.on { background: var(--primary, #0a84ff); color: #fff; }
.hd-chip.wk:not(.on) { color: #d0605a; }
@media (max-width: 360px) { .hd-chips { gap: 2px; } .hd-chip { min-width: 0; } .hd-chips { grid-template-columns: repeat(7, 1fr); } }
/* 오늘 플래너: [오늘 요일만 / 전체 보기] */
.habit-head { display: flex; align-items: center; gap: 8px; }
.habit-head h2 { flex: 1 1 auto; margin-bottom: 0; }
.habit-all-toggle { min-height: 44px; padding: 0 14px; white-space: nowrap; }
.habit-all-toggle.on { background: rgba(10,132,255,0.16); color: var(--primary, #0a84ff); }
.habit-card .habit-list { margin-top: 10px; }
.habit.rest { opacity: 0.5; }
.habit.rest .round-check { cursor: not-allowed; }
.hd-pill { min-height: 36px; padding: 0 10px; border: 0; border-radius: 18px; font: inherit; font-size: 0.8rem; font-weight: 600; background: rgba(10,132,255,0.10); color: var(--primary, #0a84ff); white-space: nowrap; cursor: pointer; }
.hd-pill.open { background: var(--primary, #0a84ff); color: #fff; }
.habit-day-editor { flex: 1 1 100%; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,0.85); box-shadow: inset 0 0 0 1.5px rgba(10,132,255,0.35); }
.hd-editor-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-2); }

/* 🎨 스케치: 아이폰 길게 누르기 메뉴·글자 선택이 뜨지 않게 */
.sketch-wrap, .sketch-wrap canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* 📅 시간순 보기 설정 · 두 줄 · 😴 수면 막대 */
.tl-opts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; font-size: 0.82rem; color: var(--text-2); }
.tl-opts label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.tl-opts input { width: 18px; height: 18px; accent-color: var(--purple, #5e5ce6); }
.tl-grid.two-rows .tl-head.seg2, .tl-grid.two-rows .tl-head.seg2.corner { border-top: 2px solid rgba(60,60,67,0.15); }
.tl-grid.two-rows .tl-name small { font-size: 0.62rem; }
.tl-grid.two-rows .tl-head { font-size: 0.7rem; }
.task-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.task-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sleep-block { position: absolute; top: 4px; bottom: 4px; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  border-radius: 12px; background: rgba(94,92,230,0.13); box-shadow: inset 0 0 0 1.5px rgba(94,92,230,0.45); display: flex; align-items: flex-start; cursor: pointer; }
.sleep-block.dragging { background: rgba(94,92,230,0.24); }
.sleep-label { flex: 1; min-width: 0; padding: 4px 6px; font-size: 0.66rem; font-weight: 700; color: var(--purple, #5e5ce6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.sg { flex: none; width: 16px; align-self: stretch; cursor: ew-resize; position: relative; }
.sg::after { content: ''; position: absolute; top: 50%; left: 50%; width: 5px; height: 26px; margin: -13px 0 0 -2.5px; border-radius: 3px; background: rgba(94,92,230,0.7); }
.sg[hidden] { display: none; }
:root { --name-w2: 52px; }
.tl-grid.two-rows .tl-head { font-size: 0.66rem; padding: 0; }
.tl-grid.two-rows .bar-label { font-size: 0.62rem; }
.dn-today { white-space: nowrap; }

/* 📴 맥(iCloud)에 못 올린 것이 있음 · ✨ 새 버전 띠 */
.sync-badge { margin-left: auto; font-size: 0.85rem; padding: 2px 6px; border-radius: 10px; background: rgba(255,159,10,0.15); }
.sync-badge:not([hidden]) + .save-status { margin-left: 6px; }
.update-banner { display: block; width: 100%; margin-bottom: 12px; border: none; text-align: center; font-weight: 600; color: var(--primary); background: rgba(10,132,255,0.10); cursor: pointer; }
.update-banner[hidden] { display: none; }

/* ❓ 설명 글은 화면에서 빼고 머리줄 ? 설명서로 (data-manual) */
[data-manual] { display: none !important; }
.help-btn { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; font-weight: 800; font-size: 0.95rem; background: rgba(255,255,255,0.8); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--text-2); }
.man-sec { padding: 10px 2px; border-top: 1px solid var(--glass-line); }
.man-sec:first-child { border-top: 0; padding-top: 2px; }
.man-h { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.man-p { font-size: 0.88rem; line-height: 1.6; color: var(--text-2); }
.float-card .float-body { max-width: min(92vw, 560px); }

/* 🕐 12시간제 머리글: AM/PM은 오전·오후 첫 칸에만 작게 */
.tl-head.has-ampm { flex-direction: column; gap: 0; line-height: 1; }
.tl-head .ampm { font-style: normal; font-size: 0.56rem; font-weight: 800; letter-spacing: 0.2px; opacity: 0.75; margin-bottom: 1px; }

/* 🚪 다 챙기면 초록 한 줄만 (상자 속 상자 없이) */
.habit-done-msg { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
.habit-card.collapsed { padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.habit-card.collapsed .habit-head { display: none; }
.habit-card.collapsed .habit-done-msg { margin: 0; min-height: 48px; padding: 12px 16px; border-radius: var(--r-card); font-size: 1rem; }

/* 💡 메모 접기 */
.notes-fold { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(120,120,128,0.12); color: var(--text-2); font-size: 0.9rem; margin-left: 6px; }
.area-notes h2 { flex-wrap: nowrap; }
.area-notes h2 > span:first-child { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.area-notes.folded h2 { margin-bottom: 0; }

/* 📅 월간 */
.tl-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mc-dow { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.mc-dow.wk { color: var(--red); }
.mc-day { min-height: 92px; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px; border: 0; border-radius: 10px; text-align: left; overflow: hidden;
  background: rgba(255,255,255,0.6); box-shadow: inset 0 0 0 1px var(--glass-line); font: inherit; cursor: pointer; }
.mc-num { font-size: 0.78rem; font-weight: 700; padding: 0 2px; }
.mc-day.wk .mc-num { color: var(--red); }
.mc-day.other { opacity: 0.4; }
.mc-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.mc-day.sel .mc-num { color: #fff; background: var(--primary); border-radius: 8px; align-self: flex-start; padding: 0 5px; }
.mc-ev { display: block; font-size: 0.64rem; line-height: 1.25; padding: 2px 4px; border-radius: 5px; background: rgba(10,132,255,0.14); color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-ev.p1 { background: var(--p1); color: var(--p1-ink); } .mc-ev.p2 { background: var(--p2); color: var(--p2-ink); } .mc-ev.p3 { background: var(--p3); color: var(--p3-ink); }
.mc-more { font-size: 0.62rem; color: var(--muted); padding: 0 4px; }
@media (max-width: 599px) { .mc-day { min-height: 74px; padding: 3px 2px; } .mc-ev { font-size: 0.58rem; padding: 1px 3px; } .tl-month { gap: 3px; } }

/* 🌙 Top3 리뷰: 완료 체크 · 내일로 · 못함(취소선) · ＋ 한 줄 요약 */
.top3-row { display: flex; flex-direction: column; gap: 6px; }
.top3-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top3-main .top3-text { flex: 1 1 140px; display: flex; flex-direction: column; }
.top3-tag { font-size: 0.72rem; font-weight: 600; color: var(--orange); }
.top3-acts { display: flex; gap: 6px; margin-left: auto; }
.top3-acts .pill { min-height: 36px; padding: 0 12px; }
.top3-acts .pill:disabled { opacity: 0.35; }
.top3-plus { width: 36px; padding: 0 !important; font-weight: 800; }
.top3-tmr.on { background: rgba(255,159,10,0.22); color: #b25e00; font-weight: 700; }
.top3-miss.on { background: rgba(255,69,58,0.18); color: #c4261d; font-weight: 700; }
.top3-plus.on { background: rgba(10,132,255,0.14); color: var(--primary); }
.st-miss .top3-text { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.st-done .top3-text { color: var(--green); }
.top3-note { margin-left: 34px; width: calc(100% - 34px); font-size: 15px; }
/* 휴대폰 머리줄: ◀ 날짜 시계 ▶ 오늘 ? 가 한 줄에 들어가게 */
@media (max-width: 599px) {
  .date-nav { gap: 4px; min-width: 0; }
  .help-btn { width: 32px; height: 32px; }
  .dn-date { padding: 0 8px; }
  .now-clock { font-size: 12px; padding: 0; }
  .dn-today { padding: 0 9px; }
}
@media (max-width: 380px) { .now-clock { display: none; } }
@media (max-width: 599px) {
  .mc-t { display: none; }
  .mc-ev { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
}

/* 💡 메모 제목줄: 아이폰에서 ✏️ 글씨·🎨 스케치가 두 줄로 꺾여 아래로 늘어나던 것 (2026-11-29) */
.seg button { white-space: nowrap; }
.area-notes h2 .seg { flex: none; }
@media (max-width: 380px) { .area-notes h2 .seg button { padding: 0 10px; } }
/* 파일 고르기 칸: display:none이면 아이폰 사파리가 열지 않을 때가 있어 화면 밖에 투명하게 둔다 */
.file-hidden { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }

/* ===== 🎨 할 일 색 팔레트 (2026-11-29): 1·2·3위 색(--p1~3)은 설정에서 고르고 JS가 이 팔레트를 가리키게 함 ===== */
:root { --c-pink: #ffe3ea; --c-pink-line: #f7b6c6; --c-pink-ink: #b4365a; --c-yellow: #fff3cc; --c-yellow-line: #f1d77c; --c-yellow-ink: #8a6400; --c-sky: #dff0ff; --c-sky-line: #a9d2f5; --c-sky-ink: #2a6aa3; --c-mint: #dcf7ec; --c-mint-line: #9fe0c4; --c-mint-ink: #1f7a55; --c-lavender: #ece6ff; --c-lavender-line: #c7b9f5; --c-lavender-ink: #5b45b0; --c-peach: #ffe8d9; --c-peach-line: #f6c09d; --c-peach-ink: #a2501d; --c-lime: #eef8d5; --c-lime-line: #cfe596; --c-lime-ink: #4f6b12; --c-gray: #ececef; --c-gray-line: #cfcfd6; --c-gray-ink: #4a4a52; }
.checklist-item.col-pink { background: var(--c-pink); box-shadow: inset 0 0 0 1px var(--c-pink-line); }
.task-bar.col-pink, .mc-ev.col-pink { background: var(--c-pink); color: var(--c-pink-ink); box-shadow: inset 0 0 0 1.5px var(--c-pink-line); }
.sw-pink { background: var(--c-pink); box-shadow: inset 0 0 0 1.5px var(--c-pink-line); color: var(--c-pink-ink); }
.checklist-item.col-yellow { background: var(--c-yellow); box-shadow: inset 0 0 0 1px var(--c-yellow-line); }
.task-bar.col-yellow, .mc-ev.col-yellow { background: var(--c-yellow); color: var(--c-yellow-ink); box-shadow: inset 0 0 0 1.5px var(--c-yellow-line); }
.sw-yellow { background: var(--c-yellow); box-shadow: inset 0 0 0 1.5px var(--c-yellow-line); color: var(--c-yellow-ink); }
.checklist-item.col-sky { background: var(--c-sky); box-shadow: inset 0 0 0 1px var(--c-sky-line); }
.task-bar.col-sky, .mc-ev.col-sky { background: var(--c-sky); color: var(--c-sky-ink); box-shadow: inset 0 0 0 1.5px var(--c-sky-line); }
.sw-sky { background: var(--c-sky); box-shadow: inset 0 0 0 1.5px var(--c-sky-line); color: var(--c-sky-ink); }
.checklist-item.col-mint { background: var(--c-mint); box-shadow: inset 0 0 0 1px var(--c-mint-line); }
.task-bar.col-mint, .mc-ev.col-mint { background: var(--c-mint); color: var(--c-mint-ink); box-shadow: inset 0 0 0 1.5px var(--c-mint-line); }
.sw-mint { background: var(--c-mint); box-shadow: inset 0 0 0 1.5px var(--c-mint-line); color: var(--c-mint-ink); }
.checklist-item.col-lavender { background: var(--c-lavender); box-shadow: inset 0 0 0 1px var(--c-lavender-line); }
.task-bar.col-lavender, .mc-ev.col-lavender { background: var(--c-lavender); color: var(--c-lavender-ink); box-shadow: inset 0 0 0 1.5px var(--c-lavender-line); }
.sw-lavender { background: var(--c-lavender); box-shadow: inset 0 0 0 1.5px var(--c-lavender-line); color: var(--c-lavender-ink); }
.checklist-item.col-peach { background: var(--c-peach); box-shadow: inset 0 0 0 1px var(--c-peach-line); }
.task-bar.col-peach, .mc-ev.col-peach { background: var(--c-peach); color: var(--c-peach-ink); box-shadow: inset 0 0 0 1.5px var(--c-peach-line); }
.sw-peach { background: var(--c-peach); box-shadow: inset 0 0 0 1.5px var(--c-peach-line); color: var(--c-peach-ink); }
.checklist-item.col-lime { background: var(--c-lime); box-shadow: inset 0 0 0 1px var(--c-lime-line); }
.task-bar.col-lime, .mc-ev.col-lime { background: var(--c-lime); color: var(--c-lime-ink); box-shadow: inset 0 0 0 1.5px var(--c-lime-line); }
.sw-lime { background: var(--c-lime); box-shadow: inset 0 0 0 1.5px var(--c-lime-line); color: var(--c-lime-ink); }
.checklist-item.col-gray { background: var(--c-gray); box-shadow: inset 0 0 0 1px var(--c-gray-line); }
.task-bar.col-gray, .mc-ev.col-gray { background: var(--c-gray); color: var(--c-gray-ink); box-shadow: inset 0 0 0 1.5px var(--c-gray-line); }
.sw-gray { background: var(--c-gray); box-shadow: inset 0 0 0 1.5px var(--c-gray-line); color: var(--c-gray-ink); }
.task-bar[class*=" col-"] .rz::after { background: rgba(0,0,0,0.25); }
.color-dot { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; padding: 0; background: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.color-dot i { width: 16px; height: 16px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1.5px var(--glass-line); background: conic-gradient(#ff9ab3, #ffd76a, #8cc8ff, #7ee8b8, #c3b3ff, #ff9ab3); opacity: 0.55; }
.color-dot.has i { opacity: 1; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-btn { min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: 22px; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.swatch-btn.on { outline: 2.5px solid var(--primary); outline-offset: 2px; }
.swatch-btn.none { background: rgba(120,120,128,0.12); color: var(--muted); }
.swatch-btn.sm { min-width: 32px; height: 32px; border-radius: 16px; padding: 0; }
.color-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--glass-line); flex-wrap: wrap; }
.color-row:first-child { border-top: 0; }
.color-row .cr-label { flex: 1 1 120px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.color-sub { font-size: 0.82rem; font-weight: 700; color: var(--muted); margin: 14px 0 4px; }

/* ⚡ 할 일 즐겨찾기 */
.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row .add-item-btn { margin-top: 0; flex: 1 1 auto; }
.quick-btn { flex: none; width: 48px; min-height: 44px; border: 0; border-radius: var(--r-ctl); background: rgba(255,214,10,0.18); font-size: 1.15rem; }
.quick-btn.on { background: #ffd60a; }
.quick-tray { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-chip { min-height: 38px; padding: 0 14px; border: 0; border-radius: 19px; font: inherit; font-size: 0.9rem; font-weight: 600; background: rgba(255,214,10,0.18); color: var(--text); cursor: pointer; }
.quick-empty { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quick-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }

/* ⚙️ 접히는 설정 카드 (기본 접힘) */
details.set-fold > summary { list-style: none; cursor: pointer; }
details.set-fold > summary::-webkit-details-marker { display: none; }
details.set-fold > summary h2 { margin-bottom: 0; }
details.set-fold > summary h2::after { content: '펼치기 ▾'; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
details.set-fold[open] > summary h2 { margin-bottom: 12px; }
details.set-fold[open] > summary h2::after { content: '접기 ▴'; }

/* 📅 시간순 줄 수 · ⇕ 줄 높이 */
.seg-rows button { min-height: 30px; padding: 0 10px; font-size: 0.8rem; }
.row-resize { display: flex; align-items: center; justify-content: center; gap: 6px; height: 26px; margin-top: 4px; border-radius: 10px; font-size: 0.72rem; color: var(--muted);
  background: rgba(120,120,128,0.08); cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
.row-resize::before { content: ''; width: 36px; height: 4px; border-radius: 2px; background: currentColor; opacity: 0.5; }
.tl-grid.tall .bar-label { white-space: normal; overflow: hidden; line-height: 1.2; padding: 3px 2px; align-self: stretch; display: flex; align-items: center; word-break: keep-all; overflow-wrap: normal; text-overflow: clip; }
.tl-grid.tall .task-bar { align-items: stretch; }
.color-row.p1 .prio-tag { background: var(--p1); color: var(--p1-ink); } .color-row.p2 .prio-tag { background: var(--p2); color: var(--p2-ink); } .color-row.p3 .prio-tag { background: var(--p3); color: var(--p3-ink); }

/* 🧯 앱 파일을 다 못 받았을 때 띠 (index.html 불러오기 감시) */
.boot-fail { position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 3000; display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px; border-radius: 18px; background: #2c2c2e; color: #fff; box-shadow: 0 12px 40px rgba(0,0,0,0.5); font-size: 0.9rem; }
.boot-fail span { color: #c7c7cc; font-size: 0.8rem; }
.boot-fail button { align-self: flex-start; min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: #4f46e5; color: #fff; font-weight: 700; font-size: 0.95rem; }

/* 🎲 자동 색 체크 */
.auto-color { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 14px; background: rgba(120,120,128,0.08); cursor: pointer; }
.auto-color input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.auto-color span { display: flex; flex-direction: column; gap: 3px; }
.auto-color small { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }

/* 🚪 외출 루틴 요일 고르기: 작게 (2026-11-29 "모바일에서 너무 큼") — 이름·요약·빠른 선택을 한 줄에, 요일 7칸은 32px */
.habit-days { gap: 0; }
.hd-row { gap: 6px; }
.hd-head { flex-wrap: wrap; gap: 6px; }
.hd-name { flex: 1 1 auto; font-size: 0.9rem; }
.hd-sum { font-size: 0.72rem; }
.hd-picker { gap: 6px; }
.hd-quick { gap: 4px; }
.hd-preset { flex: none; min-height: 28px; padding: 0 10px; border-radius: 14px; font-size: 0.76rem; }
.hd-chips { grid-template-columns: repeat(7, 32px); gap: 4px; max-width: none; }
.hd-chip { min-width: 0; width: 32px; height: 32px; border-radius: 16px; font-size: 0.8rem; }
.hd-picker { flex-direction: row; flex-wrap: wrap; align-items: center; }
@media (max-width: 360px) { .hd-chips { grid-template-columns: repeat(7, 30px); gap: 3px; } .hd-chip { width: 30px; height: 30px; } }
/* 설정 요일 줄: [이름·요약 | 매일 평일 주말] 한 줄 + [월~일] 한 줄 = 두 줄로 */
.hd-row { flex-direction: row; flex-wrap: wrap; align-items: center; }
.hd-row .hd-head { flex: 1 1 90px; min-width: 0; }
.hd-row .hd-picker { display: contents; }
.hd-row .hd-quick { flex: none; }
.hd-row .hd-chips { flex: 1 1 100%; }

/* ✅ 체크한 할 일의 일정: 끝낸 것처럼 아주 투명하게 (2026-11-29) */
.task-bar.done { opacity: 0.22; filter: saturate(0.4); }
.task-bar.done.dragging { opacity: 0.6; }
.mc-ev.done { opacity: 0.35; text-decoration: line-through; }

/* ⏱ 체크리스트 → 일정 넣기 */
.sched-btn { flex: none; min-width: 34px; height: 30px; padding: 0 6px; border: 0; border-radius: 15px; background: rgba(120,120,128,0.12); color: var(--muted); font: inherit; font-size: 0.72rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.sched-btn.has { color: var(--text); background: rgba(120,120,128,0.2); }
.ranking .sched-btn, .ranking .color-dot { display: none; }
.sched-title { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-wheels { gap: 6px; }
.sched-wheels .wheel-col.wide { flex: 1.7; }
.sched-wheels .wheel-item { font-size: 17px; }
.sched-wheels .wheel-item.on { font-size: 20px; }
.sched-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.sched-del { color: var(--red); }

/* 📅 시간순 제목줄: [캘린더 연동] [기상 알약] */
.sched-head-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cal-sync-btn { font-weight: 700; white-space: nowrap; }

/* ↶ 실행취소 · 📦 미룬 일 들어가기 (설정) */
.undo-btn { font-weight: 700; white-space: nowrap; }
.undo-btn:disabled { opacity: 0.35; }
.carry-entry { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.carry-entry-t { font-weight: 700; font-size: 0.98rem; }
.carry-entry-s { flex: 1 1 auto; font-size: 0.8rem; color: var(--muted); }
.carry-entry-go { font-weight: 700; color: var(--muted); }
.carry-back { margin-bottom: 10px; }

/* 휴대폰: 시간순 제목줄 단추는 아이콘만 (↶ 📅) — 이름은 길게 누르면 보이는 title로 */
@media (max-width: 599px) { .sched-head-acts .btn-lbl { display: none; } .sched-head-acts .undo-btn, .sched-head-acts .cal-sync-btn { min-width: 38px; padding: 0 10px; } }

/* ===== 🌱 셀프어퍼메이션 (회고 탭 카드 + 전용 화면, 2026-11-29) ===== */
#view-review .affirm-entry { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; flex-wrap: wrap; }
.affirm-entry-t { font-weight: 700; font-size: 0.98rem; }
.affirm-entry-s { flex: 1 1 160px; font-size: 0.82rem; color: var(--muted); }
.affirm-entry-go { font-weight: 700; color: var(--muted); }
.affirm-entry.due { box-shadow: inset 0 0 0 1.5px rgba(48,209,88,0.55); }
.affirm-entry.due .affirm-entry-s { color: #1f9d48; font-weight: 600; }
.affirm-view .card { margin-bottom: 14px; }
.affirm-p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 8px; }
.affirm-p.muted { color: var(--muted); font-size: 0.82rem; }
.affirm-cycle-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; margin: 4px 0 12px; }
.link-btn { border: none; background: none; color: var(--primary); font-weight: 600; font-size: 0.85rem; min-height: 36px; padding: 0 4px; cursor: pointer; }
.affirm-primary { width: 100%; min-height: 48px; border: none; border-radius: var(--r-ctl); background: var(--primary); color: #fff; font-weight: 700; font-size: 1rem; }
.affirm-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 2px; border: none; border-top: 1px solid var(--glass-line); background: none; text-align: left; }
.affirm-row-t { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.affirm-row-d { font-size: 0.8rem; color: var(--muted); }
.affirm-row-go { font-weight: 700; color: var(--muted); }
.affirm-title { width: 100%; margin-bottom: 10px; font-weight: 600; }
.affirm-tip { font-size: 0.85rem; line-height: 1.5; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: rgba(48,209,88,0.10); }
.affirm-steps { display: flex; width: 100%; margin-bottom: 8px; }
.affirm-steps button { flex: 1 1 0; min-height: 40px; padding: 0 6px; }
details.affirm-area > summary { list-style: none; cursor: pointer; }
details.affirm-area > summary::-webkit-details-marker { display: none; }
details.affirm-area > summary h2 { margin-bottom: 0; }
details.affirm-area > summary h2::after { content: '▾'; font-size: 0.8rem; color: var(--muted); }
details.affirm-area[open] > summary h2 { margin-bottom: 10px; }
details.affirm-area[open] > summary h2::after { content: '▴'; }
.affirm-area h2 > span:first-child { flex: 1 1 auto; }
.affirm-mark { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.affirm-mark.ok { color: #1f9d48; }
.affirm-q { margin: 0 0 10px 18px; font-size: 0.82rem; line-height: 1.55; color: var(--text-2); }
.affirm-text { display: block; width: 100%; min-height: 64px; padding: 10px 12px; margin-bottom: 10px; border: none; border-radius: var(--r-ctl); resize: vertical; outline: none; font-size: 16px; line-height: 1.55;
  background: rgba(255,255,255,0.75); box-shadow: inset 0 0 0 1px var(--glass-line); }
.affirm-text:focus { box-shadow: inset 0 0 0 2px var(--primary); background: #fff; }
.affirm-label { font-size: 0.8rem; font-weight: 700; color: var(--text-2); margin: 4px 0 6px; }
.affirm-quote { font-size: 0.88rem; font-weight: 600; padding: 8px 12px; margin-bottom: 10px; border-radius: 12px; background: rgba(10,132,255,0.08); overflow-wrap: anywhere; }
.affirm-quote.empty { color: var(--muted); font-weight: 400; }
.affirm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.affirm-add { margin: 0 0 14px; }
.affirm-nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 4px 0 10px; }
.affirm-nav .pill { min-height: 44px; }
.affirm-nav .affirm-primary { width: auto; flex: 1 1 auto; }
.affirm-del { color: var(--red); }
.affirm-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.affirm-thumb { position: relative; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: rgba(0,0,0,0.05); }
.affirm-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.affirm-thumb.add { display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1.5px dashed var(--glass-line); font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.affirm-thumb-del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: none; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.8rem; }
.affirm-body { font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 10px; }
.affirm-body.empty { color: var(--muted); font-size: 0.85rem; }
.affirm-two { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 8px; }
@media (min-width: 600px) { .affirm-two { grid-template-columns: 1fr 1fr; } }
.affirm-col { padding: 8px 10px; border-radius: 12px; background: rgba(120,120,128,0.08); }
.affirm-col .affirm-body { margin-bottom: 0; }
.affirm-col-h { font-size: 0.72rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.affirm-picks { display: flex; gap: 10px; flex-wrap: wrap; }
.affirm-pick { display: flex; align-items: center; gap: 6px; flex: 1 1 200px; font-size: 0.85rem; font-weight: 600; }
.affirm-pick select { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 10px; border: none; border-radius: 12px; background: rgba(255,255,255,0.85); box-shadow: inset 0 0 0 1px var(--glass-line); font-size: 16px; }

/* ===== 🌤 날씨 (플래너 날씨 줄 · 외출 루틴 알약 · 날씨 화면, 2026-11-29) ===== */
.planner-weather { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 6px; padding: 10px 8px; border: none; border-radius: 16px; background: var(--glass); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.planner-weather[hidden] { display: none; }
.planner-weather + .attitude-card { padding-top: 16px; }
.pw-icon { font-size: 2rem; line-height: 1; flex: none; }
.pw-temp { font-size: 2rem; font-weight: 700; letter-spacing: -1px; flex: none; }
.pw-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pw-line { font-size: 0.8rem; font-weight: 600; overflow-wrap: anywhere; }
.pw-outfit { font-weight: 500; opacity: 0.9; }
.pw-sub { font-size: 0.88rem; font-weight: 600; }
.habit-weather { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.habit-weather[hidden], .habit-card.collapsed .habit-weather { display: none; }
.wx-hint { font-weight: 700; }
.wx-hint.wx-umbrella { background: rgba(10,132,255,0.14); color: #0a64c2; }
.wx-hint.wx-mask { background: rgba(255,159,10,0.16); color: #b26a00; }
.weather-view .card { margin-bottom: 14px; }
.wx-msg { font-size: 0.82rem; color: var(--muted); margin: -4px 0 10px; }
.wx-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wx-acts .pill { min-height: 40px; }
.wx-q { flex: 1 1 160px; min-height: 40px; }
.wx-results { display: flex; flex-direction: column; margin-top: 10px; }
.wx-result { min-height: 44px; padding: 0 6px; border: none; border-top: 1px solid var(--glass-line); background: none; text-align: left; font-size: 0.95rem; }
.wx-big { display: flex; align-items: center; gap: 12px; }
.wx-big-icon { font-size: 3.4rem; line-height: 1; }
.wx-big-temp { font-size: 3.4rem; font-weight: 700; letter-spacing: -2px; }
.wx-big-text { font-size: 1rem; font-weight: 600; margin: 4px 0 12px; }
.wx-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.wx-fact { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(120,120,128,0.08); }
.wx-fact-k { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.wx-fact-v { font-size: 1rem; font-weight: 700; }
.wx-outfit-main { font-size: 1.15rem; font-weight: 700; }
.wx-outfit-sub { font-size: 0.78rem; color: var(--muted); margin: 2px 0 8px; }
.wx-outfit-extra { font-size: 0.88rem; font-weight: 600; padding: 6px 0; border-top: 1px solid var(--glass-line); }
.wx-hours { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wx-hours::-webkit-scrollbar { display: none; }
.wx-hour { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 14px; }
.wx-hour.now { background: rgba(120,120,128,0.10); }
.wx-h-t { font-size: 0.7rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.wx-h-i { font-size: 1.3rem; }
.wx-h-temp { font-size: 0.95rem; font-weight: 700; }
.wx-h-pop { font-size: 0.68rem; color: var(--muted); min-height: 1em; }
.wx-h-pop.hi, .wx-d-pop.hi { color: #0a84ff; font-weight: 700; }
.wx-day { display: grid; grid-template-columns: 64px 30px 38px 36px 1fr 36px; align-items: center; gap: 6px; min-height: 44px; border-top: 1px solid var(--glass-line); cursor: pointer; }
.wx-d-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.wx-d-i { font-size: 1.2rem; text-align: center; }
.wx-d-pop { font-size: 0.75rem; color: var(--muted); }
.wx-d-min { text-align: right; color: var(--muted); font-weight: 600; }
.wx-d-max { font-weight: 700; }
.wx-d-track { position: relative; height: 6px; border-radius: 3px; background: rgba(120,120,128,0.16); }
.wx-d-fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: 3px; background: linear-gradient(90deg, #64d2ff, #ffd60a, #ff9f0a); }
.wx-air { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wx-air-box { padding: 10px 12px; border-radius: 14px; background: rgba(120,120,128,0.08); }
.wx-air-name { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.wx-air-v { font-size: 1.8rem; font-weight: 700; margin: 2px 0 4px; }
.wx-air-sub { font-size: 0.72rem; color: var(--muted); margin-top: 6px; }
.wx-grade { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 0.78rem; font-weight: 700; color: #fff; background: #8e8e93; }
.wx-grade.g0 { background: #0a84ff; } .wx-grade.g1 { background: #30d158; } .wx-grade.g2 { background: #ff9f0a; } .wx-grade.g3 { background: #ff453a; }
.wx-note { font-size: 0.72rem; color: var(--muted); line-height: 1.5; margin: 8px 2px 0; }
.pw-place { font-size: 0.78rem; opacity: 0.85; }

/* ===== 👤 누가 쓰나요? (처음 여는 기기, 2026-11-29) ===== */
body.picking-user .sidebar, body.picking-user .main, body.picking-user .tabbar { display: none; }
.user-pick { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.user-pick-card { width: 100%; max-width: 420px; padding: 24px 20px; border-radius: 26px; background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.up-logo { font-size: 2.4rem; text-align: center; }
.user-pick-card h2 { text-align: center; font-size: 1.25rem; margin: 6px 0 8px; }
.up-p, .up-note, .up-wait { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.up-note { font-size: 0.75rem; margin: 12px 0 0; }
.up-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.up-user { min-height: 50px; padding: 0 16px; border: none; border-radius: 14px; background: rgba(120,120,128,0.12); text-align: left; font-size: 1rem; font-weight: 600; }
.up-user.cur { box-shadow: inset 0 0 0 2px var(--primary); }
.up-new { display: flex; gap: 8px; flex-wrap: wrap; }
.up-new .text-input { flex: 1 1 160px; }
.up-go { min-height: 44px; padding: 0 16px; border: none; border-radius: var(--r-ctl); background: var(--primary); color: #fff; font-weight: 700; }
.up-new-h { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }
.up-warn { font-size: 0.82rem; line-height: 1.5; padding: 10px 12px; border-radius: 12px; background: rgba(255,159,10,0.14); margin-bottom: 10px; }
.up-restore { display: block; margin-top: 10px; padding: 10px 0; font-size: 0.85rem; font-weight: 600; color: var(--primary); cursor: pointer; }
.user-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
