/* 오늘할일 웹 — 디자인 시스템 v2 "형광펜" (DESIGN-ONEULHALIL.md)
   버튼은 잉크, 칠은 형광펜. 옐로는 면·획에만(글자 금지). */
:root {
  --hl: #FFD938;               /* 형광펜 — 칠·긋기 전용 */
  --hl-soft: #FFF4C2;          /* 연한 칠 — 선택·호버 */
  --gold: var(--hl);           /* 과도기 별칭 */
  --ink: #191817;
  --bg: #FBFAF7;               /* 종이 */
  --card: #FFFFFF;
  --side-bg: #F4F2EC;
  --text: #191817;
  --secondary: #75726B;
  --tertiary: #A8A49C;
  --fill: rgba(25,24,23,0.05);
  --row-hover: #F4F3F0;        /* 행 호버 — 불투명(호버 액션 마스크와 한 색) */
  --hairline: rgba(25,24,23,0.09);
  /* 모서리 — **다섯 값뿐.** 3·4·5·6·7·8·9·10·11·12·14·18·20px이 섞여 있었다.
     같은 층·같은 역할인데 값이 달라 눈에는 정렬이 안 맞은 것처럼 보인다. */
  --radius-xs:   4px;    /* 배지·형광펜 칠 */
  --radius-sm:   10px;   /* 보조 버튼·아이콘 버튼·입력 */
  --radius-cta:  14px;   /* 주 버튼 */
  --radius-card: 18px;   /* 카드·패널 */
  /* 원형·캡슐은 50% / 999px 그대로. */

  /* 아이콘 버튼 — **두 치수뿐.** 24·26·28·30·32·38px이 섞여 있었고
     `.mi`에 기본 크기가 없어서 SVG가 버튼을 꽉 채웠다(숨 쉴 틈이 없었다). */
  --tap:    32px;   /* 기본 — 툴바·패널 */
  --tap-sm: 28px;   /* 촘촘한 자리 — 목록 행 안, 리스트 관리 */
  --icon:    18px;  /* 기본 아이콘 */
  --icon-sm: 16px;  /* 작은 버튼 안 */

  /* 그림자는 **세 층뿐**이다. 예전엔 여덟 가지가 제각각이었고(순수 검정과 잉크 틴트가
     섞여) 같은 층인데 깊이가 달라 보였다. 종이 위에 지는 그림자는 잉크색이 자연스럽다. */
  --shadow-1: 0 1px 2px rgba(25,24,23,.04), 0 2px 12px rgba(25,24,23,.05);   /* 카드 */
  --shadow-2: 0 4px 12px rgba(25,24,23,.08), 0 12px 32px rgba(25,24,23,.12); /* 팝오버·메뉴 */
  --shadow-3: 0 8px 24px rgba(25,24,23,.12), 0 24px 64px rgba(25,24,23,.18); /* 모달·패널 */

  /* 여백은 **4의 배수**로. 7·9·11·13px이 섞여 있어 카드마다 안쪽 여백이 달랐다. */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px;

  /* 글자 크기 — **일곱 단계.** 12·13·14가 겹치는 일을 하고 있었다(98곳). */
  --t-caption: 11px;   /* 배지·최소 라벨 */
  --t-small:   12px;   /* 보조 수치·힌트 */
  --t-body:    13px;   /* 목록 보조·설정 */
  --t-base:    14px;   /* 본문 기본 */
  --t-lead:    15px;   /* 할 일 제목 */
  --t-title:   19px;   /* 패널 제목 */
  --t-hero:    26px;   /* 화면 제목 */
  --t-num:     22px;   /* 진행 시간 — 카드의 주인공 */
  /* 이 스케일 밖에 남은 9·10·17·18·19px은 **글자 크기가 아니라 아이콘 치수**다
     (✓ ▶ ‹ › ✕ 같은 문자 글리프를 아이콘으로 쓰는 자리). 서체 크기 단계와 섞지 않는다. */

  /* 굵기 — **넷뿐.** 디자인 시스템의 "두께 두 개" 원칙에 맞춰 600 사용처를 줄였다.
     맑은 고딕(윈도우)에 400·700밖에 없어 500·600이 합성 굵기로 뭉개지던 것도
     Pretendard를 실으면서 함께 풀린다. */
  --w-normal: 400; --w-medium: 500; --w-semi: 600; --w-bold: 700;

  /* Pretendard를 먼저 — **맥과 윈도우가 같은 자소·같은 굵기로 그려진다.**
     예전 스택은 한글이 "Segoe UI"·Roboto를 지나 맑은 고딕까지 밀려 떨어졌다. */
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  /* 없는 굵기를 브라우저가 지어내지 않게 — 위계는 실제 굵기로만 만든다. */
  font-synthesis-weight: none;
}

/* 아이콘은 언제나 제 크기를 갖는다 — 기본이 없으면 SVG가 부모를 꽉 채운다. */
.mi { width: var(--icon); height: var(--icon); flex: none; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* 윈도우의 기본 스크롤바는 두껍고 회색이 튄다 — 얇게, 종이색에 맞춰. */
* { scrollbar-width: thin; scrollbar-color: rgba(25,24,23,.22) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(25,24,23,.18); border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(25,24,23,.30); background-clip: content-box; }
.hidden { display: none !important; }
.muted { color: var(--secondary); }
.small { font-size: var(--t-body); }
button { font-family: inherit; }

/* ── 로그인 ── */
.signin { height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.signin-card { max-width: 340px; text-align: center; }
/* 앱 아이콘 그대로 — 아이콘과 첫 화면이 다른 얼굴이면 다른 앱처럼 보인다. */
.signin-card .mark {
  width: 64px; height: 64px; border-radius: 15px; display: block; margin: 0 auto 18px;
  outline: 1px solid var(--hairline); outline-offset: -1px;
}
.signin-card h1 { font-size: var(--t-hero); font-weight: var(--w-semi); margin-bottom: 10px; }
.signin-card p { font-size: var(--t-lead); line-height: 1.5; margin-bottom: 22px; }
.hint { color: var(--tertiary); font-size: var(--t-body); margin-top: 14px; min-height: 18px; }
.gold-btn {
  background: var(--ink); color: var(--bg); border: none; border-radius: var(--radius-cta);
  font-size: var(--t-lead); font-weight: var(--w-semi); padding: var(--s3) var(--s5); cursor: pointer; width: 100%;
}
.gold-btn:active { opacity: .85; }
.ghost-link { background: none; border: none; color: var(--secondary); font-size: var(--t-base); cursor: pointer; margin-top: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* ── 3칸 레이아웃 ── */
#app { display: flex; height: 100vh; }

/* 사이드바 */
.sidebar {
  width: 220px; flex: none; background: var(--side-bg); border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; padding: 18px 10px 14px;
}
.side-brand { font-size: var(--t-lead); font-weight: var(--w-semi); padding: 4px 10px 16px; display: flex; align-items: center; gap: 8px; }
.side-mark {
  width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink);
  font-size: var(--t-body); font-weight: var(--w-bold); display: flex; align-items: center; justify-content: center;
}
.scopes { display: flex; flex-direction: column; gap: 2px; }
.scope-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer; font-size: var(--t-base); color: var(--text); text-align: left;
}
.scope-item:hover { background: var(--fill); }
.scope-item.active { background: var(--hl-soft); font-weight: var(--w-semi); }
/* 아이콘 자리 — 문자 글리프(▦ ▢ ⚙)를 SVG로 바꾸면서 폭을 고정한다.
   글리프는 서체마다 크기·굵기가 제각각이라 항목마다 들쭉날쭉해 보였다. */
.scope-item .ico {
  width: 18px; height: 18px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--secondary);
}
.scope-item .ico .mi { width: var(--icon-sm); height: var(--icon-sm); }
.scope-item.active .ico { color: var(--ink); }
.scope-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-item .cnt { font-size: var(--t-small); color: var(--tertiary); font-variant-numeric: tabular-nums; }
.scope-sep { height: 1px; background: var(--hairline); margin: 8px 10px; }
.side-add {
  background: none; border: none; color: var(--secondary); font-size: var(--t-body); cursor: pointer;
  text-align: left; padding: 8px 10px; border-radius: var(--radius-sm); margin-top: 2px;
}
.side-add:hover { background: var(--fill); }
.side-spacer { flex: 1; }
.side-account {
  display: flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer;
  padding: 8px 10px; border-radius: var(--radius-sm); text-align: left; width: 100%;
}
.side-account:hover { background: var(--fill); }
.side-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--ink);
  font-size: var(--t-base); font-weight: var(--w-semi); display: flex; align-items: center; justify-content: center; flex: none;
}
.side-account-text { display: flex; flex-direction: column; min-width: 0; }
.side-email { font-size: var(--t-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-sync { font-size: var(--t-caption); color: var(--tertiary); }

/* 가운데 */
.center { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 28px 8px; }
.topbar h1 { font-size: var(--t-hero); font-weight: var(--w-bold); letter-spacing: -0.01em; }
.title-wrap { display: flex; align-items: center; gap: 10px; }
.title-col { display: flex; flex-direction: column; gap: 4px; }
.title-date { font-size: var(--t-body); font-weight: var(--w-medium); color: var(--secondary); }
.title-row { display: flex; align-items: center; gap: 10px; }
.top-actions { display: flex; align-items: center; gap: 4px; position: relative; }
/* ⋯ 메뉴 — 폰의 옵션 메뉴와 같은 묶음 */
.more-menu {
  position: absolute; top: 42px; right: 0; z-index: 40; min-width: 185px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-cta);
  padding: 6px; box-shadow: var(--shadow-2);
}
.more-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: none; cursor: pointer;
  font-size: var(--t-base); color: var(--text); padding: 10px 12px; border-radius: var(--radius-sm);
}
.more-menu .mi { color: var(--secondary); }
.more-menu button:hover { background: var(--fill); }
.more-menu button.on::after { content: " ✓"; color: var(--gold); font-weight: var(--w-bold); }
.mm-sep { height: 1px; background: var(--hairline); margin: 5px 8px; }
.icon-btn { background: none; border: none; color: var(--secondary); width: var(--tap); height: var(--tap); border-radius: var(--radius-sm); cursor: pointer; }
.icon-btn:hover { background: var(--fill); }
.icon-btn.on { color: var(--ink); background: var(--hl-soft); }

.sections { flex: 1; overflow-y: auto; padding: 0 28px 20px; }
/* 스크롤바는 쓸 때만 — 평소엔 종이만 보이게 */
.sections::-webkit-scrollbar, .record-wrap::-webkit-scrollbar, .cal-wrap::-webkit-scrollbar { width: 8px; }
.sections::-webkit-scrollbar-thumb, .record-wrap::-webkit-scrollbar-thumb, .cal-wrap::-webkit-scrollbar-thumb {
  background: transparent; border-radius: 999px;
}
.sections:hover::-webkit-scrollbar-thumb, .record-wrap:hover::-webkit-scrollbar-thumb, .cal-wrap:hover::-webkit-scrollbar-thumb,
.sections.scrolling::-webkit-scrollbar-thumb, .record-wrap.scrolling::-webkit-scrollbar-thumb, .cal-wrap.scrolling::-webkit-scrollbar-thumb {
  background: rgba(25,24,23,0.18);
}
.sections::-webkit-scrollbar-track, .record-wrap::-webkit-scrollbar-track, .cal-wrap::-webkit-scrollbar-track { background: transparent; }
/* 섹션 = 종이 위 카드 한 장 */
.sec-card {
  background: var(--card); border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  padding: var(--s3) var(--s4) var(--s2); margin-top: var(--s3);
}
.sec-card .row:last-child { border-bottom: none; }
.section-label { font-size: var(--t-body); font-weight: var(--w-semi); color: var(--secondary); padding: 0 0 4px; min-height: 34px; display: flex; gap: 6px; align-items: center; cursor: pointer; -webkit-user-select: none; user-select: none; }
.sec-tri {
  width: 16px; height: 16px; color: var(--tertiary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s; flex: none;
}
.sec-tri.open { transform: rotate(90deg); }
.section-label:hover .sec-tri, .section-label:hover { color: var(--ink); }
/* "오늘" 캡션 형광펜 칠 — 살짝 기움, 정적 */
.section-label .gold {
  color: var(--ink); background: var(--hl); border-radius: var(--radius-xs);
  padding: 1px 6px; display: inline-block; transform: rotate(-0.8deg);
}
.section-label .count { color: var(--tertiary); font-size: var(--t-small); font-weight: var(--w-medium); }

.row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--hairline); border-radius: var(--radius-sm); cursor: pointer; }
/* 행은 끄는 손잡이다 — 누른 채 움직이면 글자 선택이 먼저 시작돼 끌기를 가로챈다(웹뷰에서 특히).
   제목을 고칠 땐 입력창이라 선택이 필요하다 — 아래에서 되살린다. */
.row { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.row .row-title-edit { -webkit-user-select: text; user-select: text; }
.row:hover { background: var(--row-hover); }
.row.selected { background: var(--hl-soft); }
.check {
  width: 21px; height: 21px; border-radius: 50%; border: 1.8px solid var(--tertiary);
  flex: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s; font-size: var(--t-small);
}
.check:hover { border-color: var(--gold); }
.check.done { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.check.pop { animation: pop .38s cubic-bezier(.2,1.6,.4,1); }
/* 완료 순간 — 형광펜이 제목을 좌→우로 긋는다(폰 HighlightStroke) */
/* 폰(HighlightStroke)과 같은 규격: 6px 굵기를 **글자 높이의 정확한 중앙**에.
   예전엔 요소 높이의 52~94%라 line-height 여백만큼 아래로 밀려 "글자 밑에 긋는" 느낌이었다.
   완료 후 상태(.row.done)와도 굵기·위치·색을 맞춘다 — 어긋나면 애니메이션 끝나는 순간 줄이 튄다. */
.row-title.striking {
  background-image: linear-gradient(rgba(255,217,56,.55), rgba(255,217,56,.55));
  background-repeat: no-repeat; background-size: 0% 6px; background-position: 0 50%;
  animation: strike .3s ease-out .12s forwards;
}
@keyframes strike { to { background-size: 100% 6px; } }
.row-bell { color: var(--tertiary); margin-right: 3px; vertical-align: -1px; }
/* 하위 개수 = 접기 토글. 표시였던 것이 버튼이 됐지만 무게는 그대로 둔다(행의 주인공이 아니다). */
.row-count {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--t-caption); color: var(--tertiary); flex: none; font-variant-numeric: tabular-nums;
  background: none; border: none; padding: 3px 4px; margin: -3px 0; cursor: pointer;
  font-family: inherit;
}
.row-count:hover { color: var(--ink); }
.row-count svg { transition: transform .15s ease; }
.row-count.open svg { transform: rotate(90deg); }

/* 하위 할 일 행 — 부모 밑에 한 단 들여쓰고 한 단 작게. 목록에선 체크와 제목만(폰과 동일). */
.subrow {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 41px;   /* 41 = 체크(21) + gap(12) + 행 좌패딩(8) */
  border-bottom: 1px solid var(--hairline);
}
.subrow .check { width: 18px; height: 18px; font-size: 10px; border-width: 1.6px; }
.subrow-title { font-size: var(--t-body); color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subrow.done .subrow-title { text-decoration: line-through; color: var(--tertiary); }

/* 진짜 자식 할 일 행 — 부모 아래 한 단 들여쓰기. 나머지는 보통 행과 똑같다(같은 부품이니까). */
.row.child { margin-left: 33px; }
/* 오늘 끝낸 일 — 남은 일의 무게를 빼앗지 않게 글자는 작고 연하게, 줄은 낮게 */
.done-fold {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 8px; border: none; background: none;
  cursor: pointer; font: inherit; font-size: var(--t-small); color: var(--tertiary); text-align: left;
}
.done-fold:hover { color: var(--secondary); }
.done-fold .sec-tri { margin-left: auto; }
.done-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.done-row .check { width: 18px; height: 18px; font-size: 10px; border-width: 1.6px; flex: none; }
.done-row-title {
  flex: 1; min-width: 0; font-size: var(--t-body); color: var(--tertiary); cursor: pointer;
  text-decoration: line-through; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 들여쓴 슬롯 = "여기 하위로 들어간다" 미리보기 */
.drop-slot.indent { margin-left: 33px; }
@keyframes pop { 0%{transform:scale(1)} 40%{transform:scale(1.28)} 100%{transform:scale(1)} }
.row.leaving { animation: leave .32s ease forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(12px); } }

.row-body { flex: 1; min-width: 0; cursor: pointer; }
.row-title { font-size: var(--t-base); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 취소선 대신 형광펜 스트로크 — 해낸 일엔 줄을 긋는다 */
.row.done .row-title {
  color: var(--tertiary); text-decoration: none;
  width: fit-content; max-width: 100%;
  background-image: linear-gradient(rgba(255,217,56,.55), rgba(255,217,56,.55));
  background-repeat: no-repeat; background-size: 100% 6px; background-position: 0 50%;
}
.row-sub { font-size: var(--t-small); color: var(--tertiary); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { font-size: var(--t-small); color: var(--secondary); background: var(--fill); border-radius: 999px; padding: 3px 9px; flex: none; }
.chip.today { background: var(--gold); color: var(--ink); }
.empty { color: var(--tertiary); font-size: var(--t-base); padding: 40px 8px; }

/* ── FAB — 폰과 같은 배치(위 AI 비서 · 아래 + 빠른 기록) ── */
.fab-wrap {
  position: absolute; right: 24px; bottom: 20px; z-index: 20;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.fab {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.fab-ai {
  background: var(--card); border: 1px solid var(--hairline); gap: 3px;
  box-shadow: var(--shadow-2);
}
.fab-ai .fab-spark { color: var(--ink); display: block; }
.fab-ai .fab-under { width: 17px; height: 4px; border-radius: 999px; background: var(--hl); transform: rotate(-4deg); }
.fab-ai:hover { background: var(--row-hover); }
.fab:active { transform: scale(0.96); }

/* 퀵 입력 카드 — +FAB 위로 떠서 연속 캡처 */
/* 한 박스 캡처 — 틱틱 문법: 모든 것이 박스 하나 안에 산다.
   평소 한 줄, 포커스하면 박스 안 하단에 도구 줄(값=칩, 도구=아이콘, 힌트=오른쪽). */
.add-bar { padding: 14px 0 14px; position: relative; }
.capbox {
  background: var(--card); border: 1.5px solid var(--hairline); border-radius: var(--radius-cta);
  padding: 10px var(--s4);
  box-shadow: var(--shadow-1);   /* 섹션 카드와 같은 층 */
  transition: border-color .15s;
}
.add-bar.expanded .capbox, .capbox:focus-within { border-color: var(--hl); }
.add-bar input#addInput {
  width: 100%; font: inherit; font-size: var(--t-lead); padding: 3px 0;
  border: none; outline: none; background: none; color: var(--text);
}
.add-bar input#addInput::placeholder { color: var(--tertiary); }
.cap-tools { display: none; }
.add-bar.expanded .cap-tools {
  display: flex; align-items: center; gap: 8px;
  padding-top: 8px; margin-top: 6px;
  border-top: 1px solid var(--hairline);
}
/* 퀵 입력 칩 — 명시 조작(선택=형광펜), 리스트는 테두리 칩 */
.qa-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.qa-chip {
  border: none; background: var(--fill); color: var(--secondary); cursor: pointer;
  border-radius: 999px; padding: 5px 11px; font-size: var(--t-small); font-weight: var(--w-medium);
  white-space: nowrap;   /* 줄이 빽빽해지면 이름이 접혀 칩 높이가 들쭉날쭉해진다 */
}
.qa-chip.on { background: var(--hl); color: var(--ink); font-weight: var(--w-semi); }
/* 리스트 칩 — **테두리 캡슐**이 리스트의 시각 언어다(날짜의 채움 캡슐과 구분).
   예전엔 고르면 --hl로 꽉 차서 날짜 칩과 똑같아 보였다. 폰과 같은 규칙으로:
   선택 = 잉크 테두리 + 연한 칠, 글자는 언제나 잉크(옐로 글자 금지). */
.qa-chip.list {
  background: none; border: 1px solid var(--hairline); color: var(--secondary);
  padding: 4px 10px;   /* 테두리 1px만큼 덜어 채움 칩과 높이를 맞춘다 */
}
/* 선택은 **색의 세기**로만 갈린다 — 진한 노랑=날짜, 연한 노랑=리스트.
   잉크 테두리를 두르면 이 줄에서 제일 강한 요소가 리스트가 되어 위계가 뒤집힌다
   (더 중요한 결정은 날짜다). 테두리 굵기를 안 바꾸니 고를 때 줄이 흔들리지도 않는다. */
.qa-chip.list.on {
  background: var(--hl-soft); border-color: rgba(25, 24, 23, 0.18); color: var(--ink);
  font-weight: var(--w-semi);
}
.qa-chip.list:hover { border-color: var(--secondary); }
.qa-tool {
  border: none; background: none; color: var(--secondary); cursor: pointer;
  width: 27px; height: 27px; border-radius: var(--radius-sm); font-size: var(--t-base); line-height: 1;
}
.qa-tool:hover { background: var(--fill); }

.qa-sep { width: 1px; height: 16px; background: var(--hairline); margin: 0 2px; flex: none; }
/* ── 날짜·시간 팝오버(캡처 공용) — 틱틱 구조, 우리 미감(잉크 버튼·형광펜 칠) ── */
.dp {
  position: absolute; left: 14px; top: calc(100% + 6px); z-index: 6;
  width: 296px; background: var(--card); border-radius: var(--radius-cta);
  padding: 12px; box-shadow: var(--shadow-2);
}
.dp-quick { display: flex; gap: 6px; margin-bottom: 10px; }
.dp-quick button {
  flex: 1; padding: 7px 0; font-size: var(--t-body); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); background: none; color: var(--text); cursor: pointer;
}
.dp-quick button:hover { background: var(--fill); }
.dp-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; }
.dp-title { font-size: var(--t-base); font-weight: var(--w-semi); }
.dp-nav { display: flex; gap: 2px; }
.dp-nav button {
  width: 26px; height: 26px; border: none; background: none; border-radius: var(--radius-sm);
  color: var(--secondary); font-size: var(--t-body); cursor: pointer;
}
.dp-nav button:hover { background: var(--fill); color: var(--text); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.dp-grid .dow { text-align: center; font-size: var(--t-caption); color: var(--tertiary); padding: 3px 0 5px; }
.dp-grid .day {
  width: 32px; height: 32px; justify-self: center; padding: 0; border: none; background: none; border-radius: 50%;
  font-size: var(--t-body); color: var(--text); cursor: pointer; position: relative;
}
.dp-grid .day:hover { background: var(--fill); }
.dp-grid .day.oth { color: var(--tertiary); }
.dp-grid .day.today { box-shadow: inset 0 0 0 1.5px var(--hairline); font-weight: var(--w-semi); }
.dp-grid .day.sel { background: var(--hl); color: var(--ink); font-weight: var(--w-semi); box-shadow: none; }
.dp-time {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--hairline); font-size: var(--t-body);
}
.dp-time .lab { color: var(--secondary); flex: 1; }
.dp-time .pill {
  padding: 5px 12px; font-size: var(--t-body); border: 1px solid var(--hairline);
  border-radius: 999px; background: none; color: var(--secondary); cursor: pointer;
}
.dp-time .pill:hover { background: var(--fill); }
.dp-time select {
  padding: 4px 8px; font-size: var(--t-body); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); background: none; color: var(--text); font-family: inherit;
}
.dp-time .switch { flex: none; }
.dp-time .pill.val { color: var(--text); font-weight: var(--w-semi); background: var(--hl-soft); border-color: transparent; }
/* 30분 슬롯 목록 — 네이티브 time 입력 대신(오전/오후 세그먼트 조작이 어색하고 스타일 불가).
   달력 자리를 대신 차지한다 — 창 높이가 그대로라 화면 밖으로 넘치지 않는다. */
.dp-slots { position: relative; height: 348px; overflow-y: auto; }
.dp-slots .slot {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 7px 10px; font-size: var(--t-body); border: none; border-radius: var(--radius-sm);
  background: none; color: var(--text); cursor: pointer; text-align: left;
}
.dp-slots .slot:hover { background: var(--fill); }
.dp-slots .slot.on { background: var(--hl-soft); font-weight: var(--w-semi); }
.dp-slots .slot .tick { color: var(--ink); }
.dp-back {
  width: var(--tap-sm); height: var(--tap-sm); border: none; background: none; border-radius: var(--radius-sm);
  color: var(--secondary); cursor: pointer;
}
.dp-back:hover { background: var(--fill); color: var(--text); }
.dp-time .off {
  width: var(--tap-sm); height: var(--tap-sm); border: none; background: none; border-radius: 50%;
  color: var(--tertiary); cursor: pointer;
}
.dp-time .off:hover { background: var(--fill); color: var(--text); }
/* 알림은 폰이 울린다 — 여기서 설정만 하고 영영 못 받는 일이 없게 정직하게 적는다 */
.dp-note, .d-note-line { font-size: var(--t-caption); color: var(--tertiary); line-height: 1.5; padding: 2px 0 4px; }
.d-note-line { font-size: var(--t-small); padding: 0 0 8px; }
.dp-foot { display: flex; gap: 8px; margin-top: 10px; }
.dp-foot button {
  flex: 1; padding: 8px 0; font-size: var(--t-body); font-weight: var(--w-semi); border: none;
  border-radius: var(--radius-sm); cursor: pointer;
}
.dp-foot .clear { background: none; border: 1px solid var(--hairline); color: var(--secondary); }
.dp-foot .clear:hover { background: var(--fill); }
.dp-foot .done { background: var(--ink); color: var(--bg); }
/* 목적지 힌트 — 도구 줄 오른쪽에 흡수(별도 줄 금지) */
.add-bar .add-hint {
  margin-left: auto; padding: 0; min-height: 0; flex: none; max-width: 45%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 상세 패널 */
.detail {
  width: 320px; flex: none; border-left: 1px solid var(--hairline); overflow-y: auto;
  display: flex; flex-direction: column;
}
.detail-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--tertiary); font-size: var(--t-body); line-height: 1.6; }
.detail-body { padding: 22px 20px 30px; display: flex; flex-direction: column; gap: 0; }
.detail-title {
  width: 100%; border: none; outline: none; font-size: var(--t-title); font-weight: var(--w-semi); color: var(--text);
  background: none; padding: 2px 34px 14px 0;   /* 오른쪽 34px = X 버튼 자리(제목과 겹침 방지) */
  border-bottom: 1px solid var(--hairline);
}
.d-label { font-size: var(--t-small); color: var(--tertiary); padding: 16px 0 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
  border: none; background: var(--fill); color: var(--text); font-size: var(--t-body);
  border-radius: 999px; padding: var(--s2) var(--s3); cursor: pointer;
}
.pill:hover { background: var(--row-hover); }
.pill.on { background: var(--gold); color: var(--ink); font-weight: var(--w-semi); }
.d-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-base); }
.d-row .lab { color: var(--text); display: flex; align-items: center; gap: 8px; }
.d-row input[type="date"], .d-row input[type="time"], .d-row select {
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 5px 8px; font-size: var(--t-body);
  background: var(--bg); color: var(--text); outline: none; font-family: inherit;
}
.d-clear { background: none; border: none; color: var(--tertiary); cursor: pointer; font-size: var(--t-base); padding: 4px; }
.subtask-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.subtask-row .check { width: 18px; height: 18px; font-size: 10px; }
.subtask-row input[type="text"] { flex: 1; border: none; outline: none; font-size: var(--t-base); background: none; color: var(--text); }
.subtask-row.done input[type="text"] { color: var(--secondary); text-decoration: line-through; }
/* 삭제 — 평소엔 없는 듯 있다가 행에 손이 오면 드러난다(줄마다 ✕가 늘어서면 목록이 시끄럽다) */
.sub-del {
  flex: none; border: none; background: none; cursor: pointer;
  color: var(--tertiary); font-size: var(--t-small); line-height: 1; padding: 6px; opacity: 0;
  transition: opacity .15s;
}
.subtask-row:hover .sub-del, .sub-del:focus-visible { opacity: 1; }
.sub-del:hover { color: var(--ink); }
.subtask-add { display: flex; gap: 8px; padding: 8px 0; }
.subtask-add input { flex: 1; border: none; outline: none; font-size: var(--t-base); background: none; color: var(--text); }
.subtask-add input::placeholder { color: var(--tertiary); }
/* 하위 줄 — 값(날짜·시간)은 늘 보이고, 도구(열기·삭제)는 올렸을 때만(목록 행과 같은 규칙) */
.sub-count { color: var(--tertiary); font-weight: var(--w-regular, 400); margin-left: 4px; font-variant-numeric: tabular-nums; }
.subtask-row .sub-when { font-size: var(--t-small); color: var(--tertiary); flex: none; white-space: nowrap; }
.subtask-row .sub-go {
  border: none; background: none; cursor: pointer; color: var(--tertiary);
  width: var(--tap-sm); height: var(--tap-sm); border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s;
}
.subtask-row .sub-go:hover { background: var(--fill); color: var(--text); }
.subtask-row .sub-go .mi { width: var(--icon-sm); height: var(--icon-sm); }
.subtask-row:hover .sub-go, .subtask-row .sub-go:focus-visible { opacity: 1; }
@media (hover: none) { .subtask-row .sub-go, .subtask-row .sub-del { opacity: 1; } }
/* 상위로 돌아가기 — **제목 줄 안에** 둔다. 위에 한 줄을 더 쌓으면 아래 내용이 통째로 밀린다 */
.detail-head { display: flex; align-items: center; gap: 2px; }
.detail-head .detail-title { flex: 1; min-width: 0; }
.d-back {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap-sm); height: var(--tap-sm); margin-left: -6px;
  border: none; background: none; cursor: pointer; color: var(--secondary); border-radius: var(--radius-sm);
}
.d-back:hover { background: var(--fill); color: var(--text); }
.d-back .mi { width: var(--icon); height: var(--icon); }
/* 자식 상세의 "상위 할 일" 줄 — 하위 섹션이 있던 자리 */
.sub-parent {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  border: none; background: none; cursor: pointer; font-family: inherit; text-align: left;
  font-size: var(--t-body); color: var(--text); padding: 9px 0; border-bottom: 1px solid var(--hairline);
}
.sub-parent:hover { color: var(--ink); }
.sub-parent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-parent .mi { width: var(--icon-sm); height: var(--icon-sm); color: var(--tertiary); flex: none; }
/* 메모는 칸이 아니라 글이다 — 안쪽 스크롤 없이 쓴 만큼 늘어난다. 보이지 않는 ::after가 높이를 잡는다 */
.d-note-wrap {
  display: grid; min-height: 4.5em; font-size: var(--t-body); line-height: 1.5;
  margin: -6px -8px; padding: 6px 8px; border-radius: var(--radius-sm);   /* 칠해져도 글자는 제자리 */
}
.d-note-wrap:focus-within { background: var(--fill); }   /* 쓰는 중에만 칸이 보인다 */
.d-note-wrap::after { content: attr(data-value) " "; visibility: hidden; white-space: pre-wrap; overflow-wrap: break-word; }
.d-note, .d-note-wrap::after { grid-area: 1 / 1; min-width: 0; padding: 0; font: inherit; }
.d-note {
  width: 100%; border: none; resize: none; overflow: hidden; outline: none;
  background: none; color: var(--text);
}
.d-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 14px; }
.d-links:empty { display: none; }
.d-link {
  max-width: 100%; font-size: var(--t-small); color: var(--secondary); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.d-link:hover { color: var(--ink); }
.d-delete {
  margin-top: 20px; background: none; border: none; color: var(--tertiary); font-size: var(--t-body);
  cursor: pointer; text-align: left; padding: 8px 0;
}
.d-delete:hover { color: #C0392B; }

/* ── 뷰 공통 ── */
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ── 캘린더 — 데스크탑형 월 그리드(셀 안에 할 일 제목) ── */
.cal-wrap { flex: 1; overflow-y: auto; padding: 6px 28px 20px; display: flex; flex-direction: column; }
/* 시간 격자를 볼 땐 바깥이 스크롤되면 안 된다 — 머리가 밀려 올라간다. */
.cal-wrap.fixed { overflow: hidden; min-height: 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; }
.cal-title { font-size: var(--t-title); font-weight: var(--w-semi); }
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-today-btn { background: var(--fill); border: none; border-radius: var(--radius-sm); padding: var(--s2) var(--s3); font-size: var(--t-body); cursor: pointer; color: var(--text); }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); font-size: var(--t-small); color: var(--secondary); padding: 0 0 6px; }
.cal-weekdays span { padding-left: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; flex: 1; grid-auto-rows: minmax(96px, auto); }
.cal-cell {
  border: 1px solid var(--hairline); background: none; border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  padding: 6px; font-size: var(--t-body); color: var(--text); text-align: left; overflow: hidden;
}
.cal-cell.blank { border: none; }
.cal-cell .num {
  font-size: var(--t-small); color: var(--secondary); width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center; flex: none; margin-bottom: 1px;
}
.cal-cell.today .num { background: var(--hl); border-radius: var(--radius-sm); color: var(--ink); font-weight: var(--w-bold); transform: rotate(-0.8deg); }
.cal-cell.selected:not(.today) .num { background: var(--hl-soft); border-radius: 50%; }
/* 연동 만료 배너 — 조용히 숨기지 않고 정직하게 */
.cal-expired {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--hl-soft); border-radius: var(--radius-cta); padding: 10px 14px; margin-bottom: 12px;
  font-size: var(--t-body); color: var(--text);
}
.cal-expired .warn { font-weight: var(--w-bold); }
#calConnect { color: var(--ink); }
#calConnect.linked { color: var(--secondary); }
/* 7일 아젠다 — 폰 dayGroup/eventRow */
.cal-agenda { padding: 6px 0 30px; }
.ca-head { display: flex; align-items: center; gap: 8px; padding: 18px 0 8px; border-bottom: 1px solid var(--hairline); }
.ca-word { font-size: var(--t-body); font-weight: var(--w-semi); color: var(--tertiary); }
.ca-word.gold { color: var(--ink); background: var(--hl); border-radius: var(--radius-xs); padding: 1px 6px; transform: rotate(-0.8deg); }
.ca-date { font-size: var(--t-body); }
.ca-date.dim { color: var(--secondary); }
.ca-none { font-size: var(--t-body); color: var(--tertiary); padding: 12px 0; }
.ca-ev { display: flex; align-items: center; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--hairline); }
.ca-ev:last-child { border-bottom: none; }
.ca-time { width: 62px; flex: none; font-size: var(--t-small); color: var(--secondary); font-variant-numeric: tabular-nums; }
.ca-dot, .cal-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ca-title { font-size: var(--t-base); color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more {
  font-size: var(--t-caption); color: var(--tertiary); padding: 1px 7px; text-align: left;
  border: none; background: none; border-radius: var(--radius-xs); cursor: pointer; font-family: inherit;
}
.cal-more:hover { background: var(--fill); color: var(--text); }
.cal-caption { font-size: var(--t-small); color: var(--tertiary); padding: 12px 0 4px; display: flex; align-items: center; gap: 10px; }

/* ── 기록 ── */
.record-wrap { flex: 1; overflow-y: auto; padding: 6px 28px 24px; max-width: 560px; }
/* 스코프 칩 — 폰 ScheduleChip과 동일(선택=형광펜 캡슐 + 잉크 글자) */
.rec-chips { display: flex; gap: 8px; padding: 4px 0 2px; }
.rec-chip {
  border: none; background: var(--fill); color: var(--secondary); cursor: pointer;
  border-radius: 999px; padding: 7px 14px; font-size: var(--t-body); font-weight: var(--w-medium);
}
.rec-chip.on { background: var(--hl); color: var(--ink); font-weight: var(--w-semi); }
.rec-summary { font-size: var(--t-base); color: var(--secondary); padding: 18px 0 2px; }
.rec-summary .dim { color: var(--tertiary); }
/* 리스트별 막대 — 폰 listBar(이름/값 위, 트랙 아래, top만 형광펜) */
.rec-bar-row { display: flex; flex-direction: column; gap: 5px; padding: 7px 0; }
.rec-bar-row .rb-head { display: flex; justify-content: space-between; font-size: var(--t-base); color: var(--text); }
.rec-bar-row .rb-head .val { color: var(--secondary); font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.rec-bar-row.top .rb-head .name { font-weight: var(--w-semi); }
.rec-bar-row .rb-track { display: block; height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.rec-bar-row .rb-fill { display: block; height: 100%; border-radius: 999px; background: rgba(168,164,156,.45); }
.rec-bar-row.top .rb-fill { background: var(--hl); }
/* 주간 차트 — 형광펜=최고 기록, 라벨 강조=오늘 */
.rec-week { display: flex; align-items: flex-end; gap: 10px; height: 104px; padding: 8px 0 14px; }
.rec-week .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.rec-week .colbar { width: 100%; max-width: 34px; background: var(--fill); border-radius: 999px; }
.rec-week .col.has .colbar { background: rgba(168,164,156,.45); }
.rec-week .col.top .colbar { background: var(--hl); }
.rec-week .collab { font-size: var(--t-caption); color: var(--tertiary); }
.rec-week .collab.today { color: var(--ink); font-weight: var(--w-bold); }
.rec-metric { display: flex; justify-content: space-between; font-size: var(--t-base); padding: 16px 0 2px; }
.rec-metric .val { color: var(--secondary); font-variant-numeric: tabular-nums; }
/* 완료한 일 행 — 폰 completedRow */
.rec-done-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); cursor: pointer; }
.rec-done-row:last-child { border-bottom: none; }
.rec-done-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rec-done-title { font-size: var(--t-base); }
.rec-done-sub { font-size: var(--t-small); color: var(--secondary); }
.rec-stuck-row { display: flex; justify-content: space-between; align-items: center; font-size: var(--t-base); padding: 9px 0; cursor: pointer; }
.rec-stuck-row .val { font-size: var(--t-small); color: var(--secondary); }
.rec-empty { font-size: var(--t-body); color: var(--tertiary); line-height: 1.7; padding-top: 24px; }
.record-wrap .section-label { padding-top: 20px; }

/* ── 설정 ── */
.settings-wrap { flex: 1; overflow-y: auto; padding: 6px 28px 24px; max-width: 480px; }
.set-card { background: var(--fill); border-radius: var(--radius-card); padding: 16px; margin-bottom: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: var(--t-base); }
.set-hint { font-size: var(--t-small); color: var(--tertiary); padding: 2px 0 6px; padding-left: 28px; }
/* 카드 전체에 걸리는 주석 — 행 힌트와 구분되게 선을 하나 둔다(회색 줄 두 개가 붙어 보이던 자리) */
.set-note {
  font-size: var(--t-small); color: var(--tertiary); margin-top: 6px; padding-top: 9px;
  border-top: 1px solid var(--hairline);
}
/* 폰 SettingsView와 같은 구역 라벨/행 아이콘 */
.set-section-label { font-size: var(--t-body); font-weight: var(--w-semi); color: var(--tertiary); padding: 10px 2px 8px; }
.set-label { display: flex; align-items: center; gap: 10px; }
/* 행 아이콘 — 설정과 상세가 같은 크기·같은 색으로 선다(두 화면이 한 앱으로 읽히게) */
.set-label .mi, .d-row .lab .mi { color: var(--secondary); }
/* font 단축 지정은 크기까지 body(16px)로 되돌려, 링크 행만 2px 크게 그려졌다 — 계열만 물려받는다. */
.set-link { width: 100%; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: var(--t-base); color: var(--text); text-align: left; }
.set-link:hover .set-label { color: var(--ink); }
.set-link .chev { color: var(--tertiary); font-size: 16px; }
/* 되돌릴 수 없는 것 — 실수로 누르지 않게 색으로 구분한다 */
.set-link.danger .set-label, .ask-opt.danger { color: #C0392B; }
a.set-row { text-decoration: none; }
/* 계정 카드 — 폰과 동일(골드 아바타 + 상태 + 동기화 버튼 + 로그아웃) */
.acc-top { display: flex; align-items: center; gap: 14px; }
.acc-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: var(--w-semi); flex: none;
}
.acc-info { min-width: 0; flex: 1; }
.acc-email { font-size: var(--t-lead); font-weight: var(--w-semi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-sync { font-size: var(--t-small); color: var(--tertiary); margin-top: 2px; }
.acc-divider { height: 1px; background: var(--hairline); margin: 14px 0 4px; }
.acc-signout {
  border: none; background: none; cursor: pointer; font-size: var(--t-base); color: var(--text);
  padding: 10px 0 2px; width: 100%; text-align: left;
}
.acc-signout:hover { color: var(--ink); text-decoration: underline; }
/* 의견 보내기 첨부 */
.fb-attach-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0 14px; }
.fb-shots { display: flex; gap: 8px; }
.fb-thumb { position: relative; width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--hairline); }
.fb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-thumb .fb-x {
  position: absolute; top: 1px; right: 1px; border: none; cursor: pointer;
  width: 16px; height: 16px; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; font-size: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.fb-attach {
  border: none; background: var(--fill); border-radius: 999px; cursor: pointer;
  padding: 8px 14px; font-size: var(--t-body); color: var(--secondary);
}
.fb-attach:hover { background: rgba(0,0,0,0.09); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .knob { position: absolute; inset: 0; background: rgba(0,0,0,.15); border-radius: 999px; cursor: pointer; transition: background .15s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .knob { background: var(--hl); }
.switch input:checked + .knob::after { transform: translateX(18px); }

/* ── 로그아웃 등 보조 버튼 ── */

/* 좁은 화면 — 사이드바 축소, 상세는 오버레이 */


/* ── 드래그앤드랍 ── */
/* 들린 행 — 원 크기 그대로 커서를 따라온다(폰과 같은 손맛). 반투명 고스트가 아니다. */
/* 들린 행은 position:fixed로 흐름에서 빠진다(JS가 좌표를 박는다) — 뒤 행들이 올라오고
   벌어진 틈은 착지 슬롯 하나뿐이다. 예전엔 제자리에 둔 채 transform만 걸어 구멍이 둘이었다. */
.row.dragging {
  z-index: 30; cursor: grabbing; pointer-events: none;
  background: var(--card); border-radius: var(--radius-cta);
  box-shadow: var(--shadow-3);
}
.row.dragging .row-acts { display: none; }
body.dragging-row { user-select: none; -webkit-user-select: none; cursor: grabbing; }
/* 놓일 자리 — 선이 아니라 벌어진 틈이 자리를 말한다 */
.drop-slot {
  height: 42px; margin: 3px 0; border-radius: var(--radius-sm);
  background: var(--hl-soft); border: 1px dashed var(--hl);
}
/* 틈은 **하나**다 — 자리를 옮겨 다닌다. 높이를 애니메이션하면 매 프레임 목록 전체가
   다시 계산돼 들썩인다(행이 많을수록 심하다). 그래서 높이·여백에는 전환을 걸지 않고,
   처음 열릴 때와 마지막에 닫힐 때만 짧게 미끄러진다. 들여쓰기(하위로)는 가로라 싸다. */
.drop-slot {
  box-sizing: border-box; overflow: hidden;
  transition: margin-left .14s cubic-bezier(.2, .7, .3, 1);   /* 들여쓰기(가로)만 — 싸다 */
}
/* 처음 열릴 때와 마지막에 닫힐 때만 높이가 미끄러진다(.anim을 그때만 붙인다) */
.drop-slot.anim {
  transition: height .16s cubic-bezier(.2, .7, .3, 1), margin .16s cubic-bezier(.2, .7, .3, 1),
              border-width .16s ease, opacity .12s ease, margin-left .14s cubic-bezier(.2, .7, .3, 1);
}
.drop-slot.opening, .drop-slot.closing { height: 0 !important; margin-top: 0; margin-bottom: 0; border-width: 0; opacity: 0; }
.row[draggable="true"] { cursor: grab; }
.row[draggable="true"]:active { cursor: grabbing; }
.dropping { background: var(--hl-soft) !important; border-radius: var(--radius-sm); }
.section-label.dropping { outline: none; }
.cal-cell.dropping { border-color: var(--hl); }
.scope-item.dropping { background: var(--hl-soft); }
.dropzone {
  border: 1px dashed var(--hairline); border-radius: var(--radius-sm); height: 38px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dropzone:hover { border-color: var(--gold); background: var(--hl-soft); }
.dropzone .dz-hint { font-size: var(--t-small); color: var(--tertiary); }
.dropzone.dropping { border-color: var(--gold); }
/* 섹션 캡션 오른쪽 + — 목록이 길어도 추가 지점은 항상 머리에 */
.sec-plus {
  margin-left: auto; border: none; background: none; cursor: pointer;
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  font-size: 17px; line-height: 1; color: var(--tertiary);
  display: flex; align-items: center; justify-content: center;
}
.sec-plus:hover { color: var(--ink); background: var(--hl-soft); }

/* ── 구글 일정(캘린더 셀) — 할 일(채움)과 구분되는 테두리+색점 ── */
.cal-event {
  display: flex; align-items: center; gap: 5px;
  font-size: var(--t-caption); line-height: 1.3; color: var(--secondary);
  border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 2px 6px;
  white-space: nowrap; overflow: hidden;
}
.cal-event .ev-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.cal-event .ev-title { overflow: hidden; text-overflow: ellipsis; }
.cal-gcal-who { color: var(--secondary); }
.cal-gcal-switch {
  background: none; border: none; font-size: var(--t-small); color: var(--tertiary);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0;
}
.cal-gcal-switch:hover { color: var(--secondary); }

/* ── 진행 중 카드(폰 FocusCard의 데스크탑 판) ── */
.focus-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--fill); border-radius: var(--radius-card); padding: var(--s4); margin-top: var(--s3);
}
/* 카드 전체가 집중 화면으로 가는 문 — 커서·호버로 그렇게 보이게 한다 */
.focus-card { background: var(--card); box-shadow: var(--shadow-1); cursor: pointer; transition: box-shadow .15s; }
.focus-card:hover { box-shadow: var(--shadow-2); }
/* 여럿이 함께 돌 때 — 막지 않고 알려만 준다. 카드 바로 위 한 줄. */
.focus-many { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4);
  font-size: var(--t-small); font-weight: var(--w-medium); color: var(--secondary); }
.focus-many::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hl); }

/* 멈춤 = 조용한 상태. 형광펜 칠을 걷고 테두리만 남긴다(돌고 있는 것과 착각하지 않게) */
.focus-card.paused { background: var(--bg); box-shadow: none; border: 1px solid var(--hairline); }
.focus-card.paused .fc-label { background: none; color: var(--tertiary); transform: none; padding: 1px 0; }
.focus-card.paused .fc-time { color: var(--secondary); }
.fc-label { font-size: var(--t-caption); color: var(--ink); font-weight: var(--w-semi); letter-spacing: .04em;
  background: var(--hl); border-radius: var(--radius-xs); padding: 1px 5px; display: inline-block; transform: rotate(-0.8deg); }
.fc-title { font-size: var(--t-lead); font-weight: var(--w-semi); margin: 2px 0; }
.fc-time { font-size: var(--t-num); font-weight: var(--w-semi); font-variant-numeric: tabular-nums; }
.fc-actions { display: flex; gap: 8px; }
.fc-btn { border: none; background: var(--fill); border-radius: var(--radius-sm); padding: var(--s2) var(--s3); font-size: var(--t-body); cursor: pointer; color: var(--text); }
.fc-btn.gold { background: var(--hl); color: var(--ink); font-weight: var(--w-semi); }   /* 완료 = 옐로 면(폰과 동일) */
.fc-remaining { font-size: var(--t-small); color: var(--secondary); font-variant-numeric: tabular-nums; margin-right: 12px; }
.fc-remaining.over { color: #B4453A; }
/* 확인 다이얼로그 — 좁고 가운데 정렬(iOS 알럿 문법). 검은 통버튼이 화면을 지배하지 않게. */
/* 자체 입력창 — 네이티브 prompt를 대신한다(데스크탑 앱에선 그게 안 뜬다). */
.ask-input {
  width: 100%; border: 1px solid var(--hairline); border-radius: var(--radius-cta);
  background: var(--bg); color: var(--text); font-family: inherit;
  font-size: var(--t-base); padding: var(--s3); outline: none;
}
/* 포커스는 테두리 + 링 — 되돌리기 바(.u-input)와 같은 문법으로 "지금 여기 쓴다"를 말한다.
   테두리 색만 바뀌면 밝은 화면에서 거의 안 보인다. */
.ask-input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27, 27, 27, 0.08); }

.panel.narrow.ask-panel {
  width: min(300px, calc(100vw - 48px)); text-align: center; gap: 0;
  padding: 22px 20px 16px; border-radius: var(--radius-card); align-items: stretch;
}
.ask-opts { width: 100%; }
.ask-title { font-size: var(--t-lead); font-weight: var(--w-semi); letter-spacing: -0.01em; }
.ask-desc { font-size: var(--t-body); color: var(--secondary); line-height: 1.5; margin-top: 5px; }
.ask-opts { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.ask-panel.row .ask-opts { flex-direction: row; }
.ask-panel.row .ask-opts > * { flex: 1; }
.ask-opt, .ask-panel.row .ask-cancel {
  border: none; cursor: pointer; text-align: center; font-family: inherit;
  border-radius: var(--radius-cta); padding: 10px 12px; font-size: var(--t-base); font-weight: var(--w-medium);
}
.ask-opt { background: var(--fill); color: var(--text); }
.ask-opt:hover { background: rgba(0,0,0,0.09); }
.ask-opt.primary { background: var(--ink); color: var(--bg); font-weight: var(--w-semi); }
.ask-opt.primary:hover { opacity: 0.9; }
.ask-opt.danger { background: none; color: #C0392B; }
.ask-opt.danger:hover { background: rgba(192,57,43,0.07); }
.ask-panel.row .ask-cancel { background: var(--fill); color: var(--text); }
.ask-panel.row .ask-cancel:hover { background: rgba(0,0,0,0.09); }
.ask-panel:not(.row) .ask-cancel {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: var(--t-body); color: var(--secondary); padding: 12px 0 2px; width: 100%;
}
.ask-panel:not(.row) .ask-cancel:hover { color: var(--text); }

/* AI 비서 — 능력 카드(누르면 입력창에 담긴다) */
/* 기록 탭 고도화 — 타임라인·기간 페이저·시간대·습관 */
.rec-note { font-size: var(--t-small); color: var(--tertiary); margin-top: 4px; }
.rec-tl-row {
  display: flex; align-items: baseline; gap: 10px; padding: 8px 0; cursor: pointer;
}
.rec-tl-row.manual { cursor: default; }
.rec-tl-row:not(.manual):hover .rec-tl-title { text-decoration: underline; }
.rec-tl-time { font-size: var(--t-small); color: var(--secondary); font-variant-numeric: tabular-nums; flex: none; width: 70px; }
.rec-tl-title { font-size: var(--t-body); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-tl-title.dim { color: var(--secondary); font-size: var(--t-small); }
.rec-tl-row .val { font-size: var(--t-small); color: var(--secondary); font-variant-numeric: tabular-nums; }
.rec-run {
  font-size: var(--t-caption); font-weight: var(--w-semi); color: var(--ink);
  background: var(--hl); border-radius: 999px; padding: 2px 8px;
}
.rec-pager { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.rec-pg {
  border: none; background: none; cursor: pointer; color: var(--secondary);
  width: var(--tap); height: var(--tap); border-radius: var(--radius-sm);
}
.rec-pg:hover:not(:disabled) { background: var(--fill); }
.rec-pg:disabled { color: var(--hairline); cursor: default; }
.rec-pg-label { font-size: var(--t-body); font-weight: var(--w-medium); }
.rec-week .col { cursor: pointer; }
.rec-week .col.open .colbar { background: var(--ink); }
.rec-dd { background: var(--fill); border-radius: var(--radius-cta); padding: 12px 14px; margin-top: 8px; }
.rec-dd-head { display: flex; justify-content: space-between; font-size: var(--t-body); font-weight: var(--w-semi); padding-bottom: 4px; }
.rec-dd-head .val { font-weight: 400; font-size: var(--t-small); color: var(--secondary); }
/* 비율 유지 — 점이 동그랗게, 선 굵기가 고르게(viewBox 비율 그대로 축소) */
.rec-trend { width: 100%; height: auto; display: block; margin: 6px 0 2px; }
.rec-trend-foot { display: flex; justify-content: space-between; font-size: var(--t-caption); color: var(--tertiary); }
/* 한 줄 요약 — 숫자를 문장으로. 기록 화면에서 가장 먼저 읽히는 자리 */
.rec-lede { margin: 2px 0 6px; }
.rec-lede p { margin: 0; font-size: var(--t-lead); line-height: 1.55; color: var(--text); word-break: keep-all; }
.rec-lede p.sub { margin-top: 4px; font-size: var(--t-small); color: var(--tertiary); }
.rec-trend-foot .now { color: var(--ink); font-weight: var(--w-medium); }
.rec-tod .todval { font-size: var(--t-caption); color: var(--tertiary); font-variant-numeric: tabular-nums; min-height: 14px; }

.ai-empty-sub { font-size: var(--t-small); color: var(--tertiary); text-align: center; margin-top: 4px; }
.ai-abilities { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.ai-ability {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  border: none; cursor: pointer; text-align: left; font-family: inherit;
  background: var(--fill); border-radius: var(--radius-cta); padding: 11px 14px; width: 100%;
}
.ai-ability:hover { background: rgba(0,0,0,0.08); }
.ai-ab-title { font-size: var(--t-body); font-weight: var(--w-semi); color: var(--text); }
.ai-ab-q { font-size: var(--t-body); color: var(--secondary); line-height: 1.45; }

/* ── 풀스크린 집중(웹) — 폰 FocusScreen 문법: 잉크 다크, 포인트만 형광펜 ── */
.focus-ov {
  position: fixed; inset: 0; z-index: 70; background: #1C1B19;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #F4F2EE;
}
.fo-x {
  position: absolute; top: 18px; right: 22px; background: none; border: none;
  color: rgba(244,242,238,0.55); font-size: 19px; cursor: pointer; padding: 8px;
}
.fo-x:hover { color: rgba(244,242,238,0.85); }
.fo-body { text-align: center; }
.focus-ov .fo-title { font-size: 20px; font-weight: var(--w-semi); max-width: 560px; margin: 0 auto; }
.focus-ov .fo-sub { font-size: var(--t-base); color: rgba(244,242,238,0.5); margin-top: 20px; }
.focus-ov .fo-time {
  font-size: 76px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums;
  margin-top: 4px; letter-spacing: 1px; transition: opacity .15s;
}
.fo-bar {
  width: 340px; height: 8px; border-radius: 999px;
  background: rgba(244,242,238,0.12); margin: 18px auto 0; overflow: hidden;
}
.fo-bar i { display: block; height: 100%; background: var(--hl); border-radius: 999px; width: 0; transition: width .5s linear; }
.fo-paused { font-size: var(--t-body); color: rgba(244,242,238,0.45); margin-top: 14px; }
.fo-actions { display: flex; gap: 12px; margin-top: 44px; }
/* 버리는 문은 나가는 문과 따로, 그리고 낮게. X는 그냥 나가기다. */
.fo-cancel { background: none; border: 0; cursor: pointer; padding: 14px 0 24px;
  font-size: var(--t-body); color: rgba(244,242,238,0.45); font-family: inherit; }
.fo-cancel:hover { color: rgba(244,242,238,0.75); }
.focus-ov .fo-btn {
  border: none; border-radius: var(--radius-cta); padding: 14px 36px; font-size: var(--t-lead); font-weight: var(--w-semi);
  cursor: pointer; background: rgba(244,242,238,0.1); color: #F4F2EE;
}
.focus-ov .fo-btn.paper { background: #F4F2EE; color: var(--ink); }
/* 집중 화면 위에서도 확인 다이얼로그가 보이게 */
#askChoice { z-index: 90; }

/* ── 되돌리기 배너 ── */
.undobar {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #312F2C; color: #fff; border-radius: var(--radius-cta); padding: 11px 16px;
  display: flex; align-items: center; gap: 10px; z-index: 30; font-size: var(--t-base);
  box-shadow: var(--shadow-3);
}
.undobar .u-mark { color: var(--gold); font-weight: var(--w-bold); }
.undobar .u-title { color: #fff; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undobar .u-undo { background: none; border: none; color: var(--gold); font-weight: var(--w-semi); font-size: var(--t-base); cursor: pointer; }
.undobar .u-time { background: rgba(255,255,255,.12); border: none; color: #fff; border-radius: var(--radius-sm); height: 26px; padding: 0 9px; font-size: var(--t-small); cursor: pointer; }

/* ── 캡처 미리보기 힌트 ── */
.add-hint { font-size: var(--t-small); color: var(--tertiary); padding: 6px 4px 0; min-height: 16px; }

/* ── 상세: 시작 버튼 ── */
.d-start {
  margin-top: 18px; width: 100%; border: none; border-radius: var(--radius-cta);
  background: var(--ink); color: var(--bg); font-size: var(--t-lead); font-weight: var(--w-semi);
  padding: 12px; cursor: pointer;
}
.d-start:active { opacity: .85; }

/* ── 개발 채널 표시 ── */
.dev-badge {
  margin-left: 8px; font-size: 10px; font-weight: var(--w-semi); letter-spacing: .06em;
  background: var(--gold); color: var(--ink); border-radius: var(--radius-xs); padding: 2px 6px;
  vertical-align: middle;
}

/* ── 구글 로그인 버튼 (구글 브랜드 가이드: 흰 바탕 + G 로고, 로고 변색 금지) ── */
.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: var(--s3) var(--s5); border-radius: var(--radius-cta);
  background: #fff; border: 1px solid var(--hairline); color: var(--text);
  font-size: var(--t-lead); font-weight: var(--w-semi); cursor: pointer;
}
.google-btn:hover { background: var(--fill); }
.google-btn:active { opacity: .85; }
.g-logo { flex: none; }

/* ── 공용 패널 오버레이 (AI 정리·일정 가져오기·리스트 관리) ── */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,0.32);
  display: flex; align-items: center; justify-content: center;
}
.panel {
  width: min(560px, calc(100vw - 48px));
  max-height: min(680px, calc(100vh - 80px));
  background: var(--card); border-radius: var(--radius-card); padding: 22px 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.panel.narrow { width: min(420px, calc(100vw - 48px)); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; }
.panel-title { font-size: var(--t-title); font-weight: var(--w-semi); }
.panel-sub { font-size: var(--t-small); color: var(--tertiary); margin-top: 3px; }
/* 닫기 ✕ — 패딩이 4/6·6·8로 갈리고 .panel-x엔 호버가 아예 없었다(옆의 .icon-btn과 어긋난다).
   생김새는 아이콘 버튼 하나로 모으고, 자리만 각자 잡는다. */
.panel-x, .detail-close, .fb-x {
  border: none; background: none; font-size: var(--t-lead); color: var(--tertiary);
  cursor: pointer; width: var(--tap); height: var(--tap); border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.panel-x:hover, .detail-close:hover, .fb-x:hover { background: var(--fill); color: var(--secondary); }

/* AI 정리 */
.ai-draft { flex: 1; overflow-y: auto; min-height: 180px; }
/* AI 비서 빈 화면 — 폰 emptyGuide와 동일한 구성 */
.ai-empty { padding: 34px 4px 8px; }
.ai-empty-head { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ai-spark {
  width: 58px; height: 58px; border-radius: 50%; background: var(--hl-soft);
  color: var(--ink); display: flex; align-items: center; justify-content: center;
}
.ai-empty-title { font-size: var(--t-lead); font-weight: var(--w-semi); }
.ai-examples { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; text-align: left; }
.ai-ex-q { font-size: var(--t-base); color: var(--secondary); line-height: 1.5; }
.ai-ex-h { font-size: var(--t-small); color: var(--tertiary); margin-top: 3px; }
.ai-sec { font-size: var(--t-small); font-weight: var(--w-semi); color: var(--tertiary); margin: 14px 0 4px; }
/* 형광펜은 칠이지 글자색이 아니다 — 밝은 배경 위 옐로 글자는 대비도 안 나온다.
   목록의 "오늘" 캡션과 같은 문법으로: 칠 위에 잉크 글자. */
.ai-sec.gold {
  color: var(--ink); background: var(--hl); border-radius: var(--radius-xs);
  padding: 2px 7px; display: inline-block;
}
.ai-item {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--t-base); padding: 9px 0; border-bottom: 1px solid var(--hairline);
}
.ai-item .ai-time { margin-left: auto; font-size: var(--t-small); color: var(--tertiary); }
.ai-item.removed { color: var(--tertiary); text-decoration: line-through; }
/* 완료로 표시될 것 — 지울 것과 시각적으로 갈라야 적용 전에 알아본다(취소선 금지: 지운 게 아니다) */
.ai-item.completed { color: var(--secondary); }
.ai-item.completed::before { content: "✓"; color: var(--ink); margin-right: 6px; font-weight: var(--w-bold); }
.dot-g { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.dot-old { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,0.18); flex: none; }
.ai-say {
  font-size: var(--t-body); line-height: 1.6; color: var(--text);
  background: var(--hl-soft); border-radius: var(--radius-cta); padding: 11px 14px;
}
/* 한 알약 — 입력과 버튼이 같은 그릇에 산다(폰과 같은 문법) */
.ai-input-row {
  display: flex; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--hairline); border-radius: 999px;
  padding: 5px 5px 5px 16px;
}
.ai-input-row:focus-within { border-color: rgba(0,0,0,0.22); }
.ai-input-row textarea {
  flex: 1; resize: none; font: inherit; font-size: var(--t-base);
  border: none; padding: 8px 0; outline: none; background: none;
  max-height: 72px; line-height: 1.45;
}
/* 마이크·보내기 — 잉크 원 + 형광펜(폰 FAB 문법). 비면 마이크, 쓰면 보내기 */
.ai-mic-btn, .ai-send {
  border: none; background: var(--ink); color: var(--hl); border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.ai-mic-btn.on { box-shadow: 0 0 0 4px rgba(255,217,56,0.35); }
.ai-send:disabled { opacity: 0.5; }

/* 일정 가져오기 — 행 전체가 체크 토글, 형광펜 채움=선택 */
.ie-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: var(--t-base); padding: 10px 0; border-bottom: 1px solid var(--hairline);
  -webkit-user-select: none; user-select: none;
}
.ie-row .ie-time { margin-left: auto; font-size: var(--t-small); color: var(--tertiary); font-variant-numeric: tabular-nums; }
.ie-check {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--hairline); color: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--t-small); font-weight: var(--w-semi);
}
.ie-row.on .ie-check { background: var(--hl); border-color: var(--hl); color: var(--ink); }
.ie-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ie-text .ie-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-lists { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0 16px; }

/* 리스트 관리 */
.lm-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-base);
}
.lm-name { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-name:hover { text-decoration: underline; }
.lm-count { font-size: var(--t-small); color: var(--tertiary); font-variant-numeric: tabular-nums; }
.lm-actions { display: flex; gap: 5px; margin-left: auto; }
.lm-btn {
  border: none; background: var(--fill); border-radius: var(--radius-sm);
  width: var(--tap-sm); height: var(--tap-sm); cursor: pointer; color: var(--secondary);
}
.lm-btn:disabled { opacity: 0.3; }
.lm-btn.danger { color: #B4453A; }
.side-add.dim { color: var(--tertiary); font-size: var(--t-small); }

/* 언도바 2단 */
.undobar .u-body { display: flex; flex-direction: column; gap: 1px; }
.undobar .u-title { max-width: 260px; }
.undobar .u-verb { font-size: var(--t-caption); color: rgba(255,255,255,0.55); }
/* 완료 직후 "얼마나 걸렸어요?" — 폰 UndoBar와 같은 2층 구조 */
.undobar { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.undobar .u-first { display: flex; align-items: center; gap: 10px; padding: 11px 16px; }
.undobar .u-body { flex: 1; }
.undobar .u-second {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 10px 16px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.undobar .u-ask { font-size: var(--t-small); color: rgba(255,255,255,0.55); }
.undobar .u-done { font-size: var(--t-small); color: var(--gold); }
.undobar .u-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.undobar .u-time:hover { background: rgba(255,255,255,.2); }
/* 편집 중 안내 — 이미 되는 조작(Tab 하위로)을 그 순간에만 알려준다 */
.row-title.editing { display: flex; align-items: center; gap: 8px; }
.edit-hint { flex: none; font-size: var(--t-caption); color: var(--tertiary); white-space: nowrap; }
/* 목록에서 제목 바로 고치기 — 행의 생김새를 그대로 두고 글자만 입력창으로 */
.row-title-edit {
  width: 100%; border: none; outline: none; background: none;
  font: inherit; color: inherit; padding: 0; margin: 0;
}
/* 완료한 일의 형광펜 칠은 편집 중엔 걷는다 — 글자가 칠에 묻힌다 */
.row-title.editing { background: none; }

/* 하다가 멈춘 일 선반 — 접힌 한 줄이 기본 */
.paused-shelf { background: var(--card); border-radius: var(--radius-card); margin-top: var(--s3); overflow: hidden; }
.ps-head {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; font: inherit;
  padding: var(--s3) var(--s4); color: var(--secondary);
}
.ps-icon { font-size: var(--t-small); }
.ps-label { font-size: var(--t-body); flex: 1; text-align: left; }
.ps-chev { color: var(--tertiary); transition: transform .15s ease; display: inline-block; }
.paused-shelf:not(.open) .ps-chev { transform: rotate(-90deg); }
.paused-shelf:not(.open) .ps-body { display: none; }
.ps-body { padding-bottom: 4px; }
.ps-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer; font: inherit;
  padding: 10px var(--s4); color: var(--text); text-align: left;
}
.ps-row:hover { background: var(--fill); }
.ps-title { flex: 1; font-size: var(--t-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-min { font-size: var(--t-small); color: var(--tertiary); font-variant-numeric: tabular-nums; }
.ps-play { font-size: 10px; color: var(--ink); }

/* "직접" 인라인 입력 — Tauri 웹뷰는 prompt를 지원하지 않아 배너 안에서 받는다 */
.undobar .u-num {
  width: 64px; font: inherit; font-size: var(--t-body); color: #fff;
  background: rgba(255,255,255,.14); border: none; border-radius: var(--radius-sm);
  padding: 5px 8px; outline: none; text-align: right;
}
.undobar .u-num::-webkit-outer-spin-button, .undobar .u-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.undobar .u-chips { align-items: center; }
/* 칸이 곧 지금 값 — 칩은 칸과 값이 같을 때만 칠한다 */
.undobar .u-q { display: flex; align-items: center; gap: 8px; }
.undobar .u-saved { font-size: var(--t-small); color: var(--gold); font-weight: var(--w-semi); }
.undobar .u-saved.pulse { animation: u-pulse .45s ease; }
@keyframes u-pulse { from { opacity: .25; } to { opacity: 1; } }
.undobar .u-time.on { background: var(--gold); color: var(--ink); font-weight: var(--w-semi); }
/* 입력창 — 줄 맨 앞의 진짜 입력칸. 칩은 옆의 가벼운 도우미 */
.undobar .u-q { justify-content: space-between; }
.undobar .u-row { display: flex; align-items: center; gap: 10px; }
.undobar .u-input {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  width: 64px; height: 30px; padding: 0 9px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius-sm); cursor: text; transition: border-color .15s, background .15s;
}
.undobar .u-input:hover { border-color: rgba(255,255,255,.5); }
.undobar .u-input:focus-within { border-color: var(--gold); background: rgba(255,255,255,.1); box-shadow: 0 0 0 3px rgba(255,217,56,.18); }
.undobar .u-input .u-num {
  flex: 1; min-width: 0; width: auto; height: 100%; padding: 0; margin: 0;
  background: none; border: none; border-radius: 0; box-shadow: none; outline: none;
  color: #fff; font-size: var(--t-body); font-weight: var(--w-semi); text-align: left;
  font-variant-numeric: tabular-nums; caret-color: var(--gold);
}
.undobar .u-input .u-num::placeholder { color: rgba(255,255,255,.4); font-weight: 400; }
.undobar .u-input:not(.filled) .u-unit { display: none; }
.undobar .u-input .u-num:focus { background: none; box-shadow: none; }
.undobar .u-unit { font-size: var(--t-small); color: rgba(255,255,255,.55); }
.undobar .u-row .u-chips { gap: 4px; flex-wrap: nowrap; }
.undobar .u-row .u-time { background: none; color: rgba(255,255,255,.7); height: 26px; padding: 0 7px; }
.undobar .u-row .u-time:hover { background: rgba(255,255,255,.1); color: #fff; }
.undobar .u-row .u-time.on { background: rgba(255,217,56,.16); color: var(--gold); font-weight: var(--w-semi); }
/* 남은 시간 바 — 맨 위, 좌우 여백을 둔 캡슐.
   폭을 꽉 채우면 배너의 둥근 모서리에서 각지게 끊겨 "잘린 띠"로 보인다. */
.undobar .u-bar {
  height: 3px; margin: 10px 16px 2px; border-radius: 999px;
  background: rgba(255,255,255,.10); overflow: hidden;
}
.undobar .u-bar > i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--gold);
  transform-origin: left; animation: u-drain linear forwards;
}
@keyframes u-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .undobar .u-bar > i { animation: none; } }

/* 설정 — 단축키 표기 */
.set-key {
  font-family: inherit; font-size: var(--t-small); color: var(--secondary);
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  padding: 3px 8px; white-space: nowrap;
}

/* 설정 — 값 선택 행(할 일 기본값) */
.set-select {
  border: none; background: none; font: inherit; font-size: var(--t-body);
  color: var(--secondary); cursor: pointer; text-align: right;
  padding: 2px 0; outline: none; max-width: 55%;
}
.set-select:focus { color: var(--text); }

/* 설정 의견 보내기 */
.fb-text {
  width: 100%; min-height: 84px; resize: vertical; font: inherit; font-size: var(--t-base);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 10px 12px;
  margin: 8px 0; outline: none;
}
.fb-text:focus { border-color: var(--gold); }

/* 상세 달력 도구 버튼 */
.pill.cal-tool { padding: 7px 11px; }

/* 데스크탑 연결 완료 배너 */
.pair-done {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: #312F2C; color: #fff; font-size: var(--t-base); font-weight: var(--w-semi);
  border-radius: var(--radius-cta); padding: 12px 20px; z-index: 60;
  box-shadow: var(--shadow-3);
}
/* 링크는 잉크 글자 + 형광펜 밑줄 — 옐로 글자는 종이색 위에서 안 읽힌다 */
.pair-link {
  display: inline-block; margin-top: 10px; color: var(--ink);
  font-weight: var(--w-semi); text-decoration: underline; text-decoration-color: var(--hl);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}

/* ── 데스크탑 연결 전용 페이지 ── */
.pair-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px;
}
.pair-card { text-align: center; max-width: 380px; }
.pair-card .mark {
  width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 50%;
  background: var(--gold); color: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: var(--w-bold);
}
.pair-card h1 { font-size: var(--t-hero); font-weight: var(--w-bold); }
.pair-sub { font-size: var(--t-lead); color: var(--secondary); line-height: 1.7; margin-top: 12px; }
.pair-note { font-size: var(--t-body); color: var(--tertiary); margin-top: 18px; }
.pair-spin {
  width: 22px; height: 22px; margin: 22px auto 0;
  border: 3px solid var(--fill); border-top-color: var(--gold); border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 연결 확인 — 무엇을·어느 계정에 붙이는지 보고 직접 누르게 한다(피싱 링크 방어) */
.pair-actions { display: flex; gap: 10px; margin-top: 24px; }
.pair-btn {
  flex: 1; padding: var(--s3) var(--s5); font-size: var(--t-lead); font-weight: var(--w-semi); font-family: inherit;
  border: none; border-radius: var(--radius-cta); cursor: pointer;
  background: var(--ink); color: var(--bg);
}
.pair-btn.ghost { background: none; border: 1px solid var(--hairline); color: var(--secondary); }
.pair-btn.ghost:hover { background: var(--fill); }
/* 계정 바꾸기 — 주된 선택(연결/취소)보다 한 단 낮은 위계로. 자주 쓸 길은 아니지만 없으면 막힌다. */
.pair-link {
  display: block; margin: 14px auto 0; padding: 6px 10px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: var(--t-body); color: var(--secondary);
  text-decoration: underline; text-underline-offset: 3px;
}
.pair-link:hover { color: var(--ink); }

/* ── 데스크탑 UX 개편 ── */
/* 중앙 컬럼: 읽기 좋은 폭 */
.view { max-width: 720px; margin: 0 auto; width: 100%; }
.topbar { max-width: 720px; margin: 0 auto; width: 100%; }

/* 제목 위계 */

/* 상세: 선택 시에만 등장 */
.detail { display: none; }
.detail.open { display: block; }
.detail-close { position: absolute; top: var(--s3); right: var(--s3); }
.detail-body { position: relative; }

/* 행 호버 액션 */
.row { position: relative; }
.row-acts {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: none; gap: 4px; padding-left: 8px;
  background: var(--row-hover);   /* 행 호버색과 한 색 — 흰 띠 금지 */
  border-radius: var(--radius-sm);
}
.row:hover .row-acts { display: flex; }
/* 들린 행에는 호버 액션을 띄우지 않는다 — :hover 규칙이 뒤에 있어 이기므로 여기서 다시 눌러준다.
   (끌고 있는 카드에 ▶ ↰ ✕ 가 떠 있으면 "지금 뭘 하는 중인지"가 흐려진다.) */
.row.dragging .row-acts, .row.dragging:hover .row-acts { display: none !important; }
.row.selected .row-acts { background: var(--hl-soft); }
.ra {
  border: none; background: var(--fill); border-radius: var(--radius-sm);
  width: var(--tap-sm); height: var(--tap-sm); cursor: pointer; color: var(--secondary);
}
.ra:hover { background: rgba(0,0,0,0.1); }
.ra.danger:hover { background: #F6E3E1; color: #B4453A; }

/* 선택 행 표시(키보드 탐색) */
.row.selected { background: var(--hl-soft); border-radius: var(--radius-sm); }

/* 사이드바 리스트 점 — 글자 불릿 대신 균일한 점 */
.ldot { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: var(--radius-xs); background: var(--fill); color: var(--secondary);
  font-size: var(--t-caption); font-weight: var(--w-semi); font-style: normal; }
.scope-item.active .ldot { background: var(--hl); color: var(--ink); }

/* 넓은 모니터 — 컬럼을 살짝 풀어 표류감 줄이기 */
@media (min-width: 1600px) {
  .view, .topbar { max-width: 840px; }
}






/* 입력줄 박스를 여백선(28px)에 — 제목·셰브론과 같은 0선. 박스만 풀폭으로 튀어나오던 것 수정 */
.add-bar { margin: 0 28px; }

/* 계정 전환 안내 — 목록이 갑자기 비는 이유를 한 번 말해준다 */
.acct-switch {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 12px;
  background: var(--hl-soft); border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: var(--t-body); color: var(--ink);
}
.acct-switch button {
  margin-left: auto; border: none; background: none; cursor: pointer;
  font: inherit; font-weight: var(--w-semi); color: var(--ink);
}

/* 오늘 일정 가져오기 — 안내가 아니라 목록의 한 줄이다. 칠하지 않는다 */
.import-line { display: flex; align-items: center; margin: 0 0 10px; color: var(--secondary); }
.import-line button { border: none; background: none; color: inherit; cursor: pointer; font: inherit; }
.il-go {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 6px 8px;
  border-radius: var(--radius-sm); font-size: var(--t-body); text-align: left;
}
.il-hide { width: var(--tap); height: var(--tap); flex: none; color: var(--tertiary); border-radius: var(--radius-sm); }
.il-go:hover, .il-hide:hover { background: var(--fill); color: var(--ink); }
.il-go .mi, .il-hide .mi { width: var(--icon-sm); height: var(--icon-sm); flex: none; }

/* ── 캘린더 화면 정비 (2026-09-12) ── */

/* 2) 연결 패널의 해제·다시 로그인 — 스타일이 아예 없어 브라우저 기본 버튼(27×20, 볼록 테두리)이었다. */
.stale-act {
  border: none; background: var(--fill); color: var(--secondary); cursor: pointer;
  font-family: inherit; font-size: var(--t-small); font-weight: var(--w-medium);
  height: var(--tap-sm); padding: 0 var(--s3); border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.stale-act:hover { background: var(--row-hover); color: var(--text); }
.stale-act.danger { color: #B4453A; }
.stale-act.danger:hover { background: #F6E3E1; color: #B4453A; }

/* 3) 토글은 행 오른쪽 끝에 — 이름 바로 옆에 붙어 행마다 위치가 달랐다. */
.lm-row .switch { margin-left: auto; }
.lm-row > span:first-child { min-width: 0; }
#gcalBody .lm-row .mi { color: #B4453A; width: var(--icon-sm); height: var(--icon-sm); }

/* 4) 연결 안 됐는데 체크 표시가 늘 떠 있었다. */
#calConnect:not(.linked) #calConnectMark { display: none; }

/* 6) 만료 배너의 경고 아이콘 */
.cal-expired .mi { color: #B4453A; width: var(--icon-sm); height: var(--icon-sm); }

/* 7) 헤더 — 오늘(32)과 일·주·월(27)의 높이가 달라 한 줄이 삐뚤어 보였다. 아이콘 버튼과 같은 32로. */
.cal-today-btn { height: var(--tap); padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
.cal-views { height: var(--tap); align-items: stretch; }
.cal-view-btn { display: inline-flex; align-items: center; }

/* ── 커스텀 입력 부품 — 운영체제가 그리던 드롭다운·날짜·시간·툴팁을 대신한다 ── */
.cx-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important; overflow: hidden !important;
}
.cx-field {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  height: var(--tap-sm); padding: 0 var(--s2) 0 var(--s3);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text); cursor: pointer;
  font-family: inherit; font-size: var(--t-body); transition: background .15s, border-color .15s;
}
.cx-field:hover { background: var(--row-hover); }
.cx-field[aria-expanded="true"] { border-color: var(--ink); }
.cx-field .cx-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-field.empty .cx-val { color: var(--secondary); }
.cx-field .mi { width: var(--icon-sm); height: var(--icon-sm); color: var(--secondary); }
.set-row .cx-field { margin-left: auto; max-width: 55%; }

.cx-pop {
  position: fixed; z-index: 200; padding: 6px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius-cta); box-shadow: var(--shadow-2);
}
.cx-menu { min-width: 160px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; }
.cx-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  border: none; background: none; cursor: pointer; text-align: left;
  font-family: inherit; font-size: var(--t-body); color: var(--text);
  padding: var(--s2) 10px; border-radius: var(--radius-sm);
}
.cx-opt:hover, .cx-opt:focus-visible { background: var(--fill); outline: none; }
.cx-opt.on { font-weight: var(--w-semi); }
.cx-opt .mi, .cx-time .slot .mi { width: var(--icon-sm); height: var(--icon-sm); color: var(--ink); }
.cx-date { width: 280px; padding: 10px; }
.cx-date .day:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.cx-time { width: 200px; }
.cx-time .dp-slots { height: 300px; }
.cx-time .slot:focus-visible { background: var(--fill); outline: none; }

/* 숫자 입력 — 크롬·웹킷의 화살표는 이미 숨겼다. 다른 엔진에서도 같게. */
.undobar .u-num { -moz-appearance: textfield; appearance: textfield; }

.cx-tip {
  position: fixed; z-index: 300; pointer-events: none; max-width: 260px;
  background: var(--ink); color: var(--bg); font-size: var(--t-caption); line-height: 1.35;
  padding: 5px var(--s2); border-radius: var(--radius-xs); box-shadow: var(--shadow-2);
  opacity: 0; transition: opacity .15s;
}
.cx-tip.show { opacity: 1; }

/* ── 할 일 입력줄·날짜 팝오버 (2026-09-12) ── */
/* 값 칩 — 시간·알림·반복. 날짜(진한 노랑)보다 한 단계 약한 연한 칠 + 아이콘. 정했을 때만 나타난다. */
.qa-chip.val { display: inline-flex; align-items: center; gap: 4px; background: var(--hl-soft); color: var(--ink); }
.qa-chip.val .mi { width: 14px; height: 14px; color: var(--ink); }
.qa-chip.list.pick { display: inline-flex; align-items: center; gap: 4px; }
.qa-chip.list.pick .mi { width: 14px; height: 14px; color: var(--secondary); }
/* 추가 버튼 — 오른쪽 안내 문구 자리. 적은 게 있을 때만 눌린다. */
.qa-add {
  margin-left: auto; flex: none; border: none; cursor: pointer; font-family: inherit;
  background: var(--ink); color: var(--bg); font-size: var(--t-small); font-weight: var(--w-semi);
  height: var(--tap-sm); padding: 0 var(--s3); border-radius: var(--radius-sm); transition: background .15s;
}
/* 흐린 상태는 opacity가 아니라 **색으로** 만든다. 데스크탑 웹뷰(WebKit)는 반투명 버튼을 따로 합성하면서
   아래 가장자리 한 줄을 원래 색(잉크)으로 남겨, 버튼 밑에 검은 밑줄이 그어진 것처럼 보였다. */
.qa-add:disabled { background: color-mix(in srgb, var(--ink) 30%, var(--card)); cursor: default; }

/* 팝오버 행 — 시간·알림·반복을 같은 모양으로. 오른쪽에 현재 값. */
.dp-rows { display: flex; flex-direction: column; margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--hairline); }
.dp-row {
  display: flex; align-items: center; gap: var(--s2); width: 100%; text-align: left;
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: var(--t-body); color: var(--text); padding: var(--s2) 6px; border-radius: var(--radius-sm);
}
.dp-row:hover, .dp-row:focus-visible { background: var(--fill); outline: none; }
.dp-row > .mi:first-child { width: var(--icon-sm); height: var(--icon-sm); color: var(--secondary); }
.dp-row .lab { flex: 1; }
.dp-row .val { color: var(--secondary); }
.dp-row .val.set { color: var(--ink); font-weight: var(--w-semi); }
.dp-row .val + .mi { width: 14px; height: 14px; color: var(--tertiary); }
.dp-slots.short { height: auto; max-height: 348px; }
.dp-slots .slot .mi { width: var(--icon-sm); height: var(--icon-sm); color: var(--ink); }
.dp-slots .slot:focus-visible { background: var(--fill); outline: none; }

/* ── 상세 패널 행 정비 (2026-09-12) ──
   스위치에 폭(44px)을 줬는데 표시 방식이 인라인이라 폭이 먹지 않았다 — 상세 패널처럼
   일반 줄 안에 두면 폭 0으로 찌그러져 손잡이만 패널 밖으로 삐져나왔다. */
.switch { display: inline-block; vertical-align: middle; }
/* 행 높이를 오른쪽 버튼이 정하던 탓에 시간 51·알림 40·반복 47px로 들쭉날쭉했다. 한 높이로. */
.d-row { min-height: 44px; padding-top: var(--s1); padding-bottom: var(--s1); }
.d-row > span:last-child { display: inline-flex; align-items: center; gap: 6px; }
/* 언제·리스트 칩 — 35px로 아래 행 버튼보다 컸다. 30px로. */
.detail .pill { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; }
.detail .pill.cal-tool { padding: 0 9px; }
.detail .pill.cal-tool .mi { width: var(--icon-sm); height: var(--icon-sm); }
/* "날짜 지우기"는 날짜 선택지가 아니라 동작이다 — 채움 없는 글자 버튼으로 구분한다. */
.pill.ghost { background: none; color: var(--secondary); padding: 0 6px; }
.pill.ghost:hover { background: var(--fill); color: var(--text); }

/* 3) 언제 칩 아래 — 위쪽 라벨 간격(16px)과 맞춘다. 8px뿐이라 칩이 아래 행 목록에 끼어든 것처럼 보였다. */
#dDateRow + .d-row { margin-top: var(--s2); }

/* 할 일 추가의 달력 버튼 — 상세 패널과 같은 모양으로. 같은 그림인데 여기선 배경 없는 회색 18px,
   상세에선 채운 캡슐 안 검정 16px이라 서로 다른 아이콘처럼 보였다. 옆의 오늘·내일 칩과 같은 캡슐로. */
.qa-tool {
  width: auto; height: 25px; padding: 0 9px; border-radius: 999px;
  background: var(--fill); color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
}
.qa-tool:hover { background: var(--row-hover); }
.qa-tool .mi { width: var(--icon-sm); height: var(--icon-sm); }

/* ── 반복 설정(맞춤) — 구글 캘린더 "반복 설정" 창의 구성, 우리 토큰으로 ── */
.panel.narrow.rp-panel {
  width: min(360px, calc(100vw - 32px)); padding: 22px 22px 16px; gap: 0;
  border-radius: var(--radius-card); align-items: stretch; text-align: left;
}
.rp-title { font-size: var(--t-title); font-weight: var(--w-semi); letter-spacing: -0.01em; margin-bottom: var(--s5); }
.rp-lab { font-size: var(--t-body); color: var(--secondary); }
.rp-line { display: flex; align-items: center; gap: var(--s2); }
.rp-line > .rp-lab { margin-right: var(--s2); }
.rp-sec { margin-top: var(--s5); }
.rp-sec > .rp-lab { margin-bottom: var(--s3); }
.rp-num {
  display: inline-flex; align-items: stretch; height: 34px; flex: none;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--bg); overflow: hidden;
}
.rp-num:focus-within { border-color: var(--ink); }
.rp-num input {
  width: 40px; border: none; background: none; outline: none; text-align: center;
  font-family: inherit; font-size: var(--t-base); color: var(--text); font-variant-numeric: tabular-nums;
}
.rp-step { display: flex; flex-direction: column; border-left: 1px solid var(--hairline); }
.rp-step button {
  flex: 1; width: 22px; padding: 0; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--secondary);
}
.rp-step button:hover { background: var(--fill); color: var(--text); }
.rp-step button + button { border-top: 1px solid var(--hairline); }
.rp-step .mi { width: 12px; height: 12px; }
.rp-step button:first-child .mi { transform: rotate(180deg); }
.rp-days { display: flex; justify-content: space-between; gap: 4px; }
.rp-day {
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--fill); color: var(--text); font-family: inherit; font-size: var(--t-body);
  transition: background .15s;
}
.rp-day:hover { background: var(--row-hover); }
.rp-day.on { background: var(--gold); color: var(--ink); font-weight: var(--w-semi); }
.rp-ends { display: flex; flex-direction: column; gap: var(--s1); }
.rp-end { display: flex; align-items: center; min-height: 38px; }
.rp-radio {
  display: inline-flex; align-items: center; gap: 10px; min-width: 84px; padding: 4px 0;
  border: none; background: none; cursor: pointer; font-family: inherit; font-size: var(--t-base); color: var(--text);
}
.rp-radio .dot { position: relative; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--tertiary); }
.rp-radio.on .dot { border-color: var(--ink); }
.rp-radio.on .dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink); }
.rp-arg { display: inline-flex; align-items: center; gap: var(--s2); transition: opacity .15s; }
.rp-arg.off { opacity: .45; }
.rp-unit { font-size: var(--t-body); color: var(--secondary); }
.rp-foot { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s6); }
.rp-foot button {
  border: none; border-radius: var(--radius-sm); padding: 9px 18px; cursor: pointer;
  font-family: inherit; font-size: var(--t-base);
}
.rp-cancel { background: none; color: var(--secondary); }
.rp-cancel:hover { background: var(--fill); color: var(--text); }
.rp-ok { background: var(--ink); color: var(--bg); font-weight: var(--w-semi); }
.rp-ok:hover { opacity: .9; }
#dRepeat { max-width: 220px; }

/* ── 사이드바 리스트 끌어서 순서 바꾸기 — 옆 항목은 transform으로 비킨다 ── */
#scopes .scope-item[data-list-id] {
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
  transition: transform .18s cubic-bezier(.2, .7, .3, 1), background .15s;
}
#scopes .scope-item.list-dragging {
  position: relative; z-index: 5; transition: none; cursor: grabbing;
  background: var(--card); box-shadow: var(--shadow-2);
}
#scopes .scope-item.list-dragging.list-settling { transition: transform .15s cubic-bezier(.2, .7, .3, 1); }
body.dragging-list, body.dragging-list * { cursor: grabbing !important; }
body.dragging-list #scopes .scope-item:not(.list-dragging):hover { background: none; }

/* 지난 할 일 제안 — **입력 카드 안**. 밖에 두면 검색 결과나 섹션 제목처럼 읽힌다.
   줄 전체가 눌리는 영역이고, ↩ 표식이 "넣기"라는 뜻을 준다. */
.qa-suggest { display: flex; flex-direction: column; gap: 1px; margin: 6px 0 2px; }
.qa-sg {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: var(--t-base); color: var(--text); padding: 8px 10px; border-radius: var(--radius-sm);
}
.qa-sg:hover, .qa-sg.on, .qa-sg:focus-visible { background: var(--fill); outline: none; }
.qa-sg .ret { flex: none; font-size: var(--t-small); color: var(--tertiary); }
.qa-sg.on .ret { color: var(--ink); }
.qa-sg .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-sg .meta { flex: none; font-size: var(--t-small); color: var(--tertiary); font-variant-numeric: tabular-nums; }
.qa-sg .meta b { color: var(--ink); font-weight: var(--w-semi); }

/* ── 좁은 창(≤900px) — **반응형은 파일 맨 끝에 둔다.** ──
   예전엔 이 블록이 파일 중간에 있어서, 뒤에 오는 같은 명시도의 규칙들에게 계속 졌다
   (미디어 쿼리는 명시도를 올려주지 않는다). 그래서 "리스트 관리" 버튼처럼
   접히기로 한 것이 안 접혔다. 순서가 곧 규칙이다. */
@media (max-width: 900px) {
  .sidebar { width: 64px; padding: 14px 6px; }
  .side-brand { justify-content: center; padding-bottom: 12px; }
  .side-brand :not(.side-mark) { display: none; }
  .scope-item .name, .scope-item .cnt, .side-account-text { display: none; }
  /* "+ 새 리스트"까지 통째로 숨겼더니 좁은 창에선 리스트를 만들 길이 앱 어디에도
     없었다(리스트 관리 패널에도 추가 버튼이 없다). 이름만 접고 기호는 남긴다. */
  .sidebar .side-add { justify-content: center; padding-left: 0; padding-right: 0; font-size: 0; }
  .sidebar .side-add::before { content: "+"; font-size: var(--t-title); line-height: 1; color: var(--secondary); }
  .sidebar .side-add.dim::before { content: "⋯"; }
  .detail { position: fixed; right: 0; top: 0; bottom: 0; background: var(--bg); box-shadow: var(--shadow-3); z-index: 5; transform: translateX(100%); transition: transform .25s ease; }
  .detail.open { transform: translateX(0); }
}

/* ── 누를 수 있으면 눌리는 것처럼 보인다 ──
   커서와 호버 배경이 없으면 사용자는 그게 버튼인 줄 모른다. 규칙으로 못 박는다.
   (달력 칸은 커서조차 없었다 — 눌러서 날짜를 고르는 자리인데.) */
.cal-cell, .ca-ev, .rec-tl-row, .rec-done-row, .rec-stuck-row, .ie-row {
  cursor: pointer;
  transition: background .15s;
}
.cal-cell:hover, .ca-ev:hover, .rec-tl-row:hover,
.rec-done-row:hover, .rec-stuck-row:hover, .ie-row:hover { background: var(--row-hover); }
/* 오늘·선택된 날은 제 색을 지킨다 — 호버가 덮으면 어디를 골랐는지 사라진다. */
.cal-cell.selected:hover { background: var(--hl-soft); }

/* ── 아이콘 버튼 — 규격을 한자리에서 건다 ──
   글리프를 SVG로 바꾸면서 드러난 문제다. `.mi`에 기본 크기가 없어 SVG가 버튼을
   꽉 채웠고(그림에서 화살표가 상자에 닿아 있었다), 버튼 자체도 24·26·28·30·32·38px로
   여섯 가지였다. 치수는 둘, 아이콘은 둘, 여백은 그 차이에서 저절로 나온다. */
.icon-btn, .panel-x, .detail-close, .fb-x, .lm-btn,
.ra, .rec-pg, .dp-back, .dp-time .off, .sub-del, .d-clear {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1;
}
/* 촘촘한 자리(28px)에는 한 단계 작은 아이콘 — 32px 버튼과 같은 여백이 남는다. */
.lm-btn .mi, .ra .mi, .dp-back .mi, .dp-time .off .mi,
.sub-del .mi, .d-clear .mi { width: var(--icon-sm); height: var(--icon-sm); }
/* 이 둘은 패딩으로 크기를 잡고 있었다 — 다른 아이콘 버튼과 같은 상자를 준다. */
.sub-del, .d-clear { width: var(--tap-sm); height: var(--tap-sm); border-radius: var(--radius-sm); }
.d-clear:hover { background: var(--fill); }

/* ── 캘린더: 시간 격자(일·주) — 구글 설계 ──
   머리(요일·종일)는 고정하고 몸통만 스크롤한다. 24시간을 다 그리되 처음 보이는 건
   지금 시각 주변이라 빈 새벽을 마주하지 않는다. */
.cal-views { display: inline-flex; background: var(--fill); border-radius: var(--radius-sm); padding: 2px; margin-left: var(--s2); }
.cal-view-btn {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: var(--t-small); font-weight: var(--w-medium); color: var(--secondary);
  padding: var(--s1) var(--s3); border-radius: var(--radius-xs);
}
.cal-view-btn.on { background: var(--card); color: var(--ink); font-weight: var(--w-semi); box-shadow: var(--shadow-1); }

.cal-time { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ct-gutter { width: 54px; flex: none; font-size: var(--t-caption); color: var(--secondary); }
#ctTZ { display: flex; align-items: flex-end; justify-content: center; padding-bottom: var(--s1); }

.ct-head { display: flex; border-bottom: 1px solid var(--hairline); }
.ct-days, .ct-allday-days { display: flex; flex: 1; }
.ct-day { flex: 1; text-align: center; padding: var(--s2) 0; cursor: pointer; border-left: 1px solid var(--hairline); }
/* 일 뷰는 열이 하나뿐이라 가운데 정렬이 화면 한복판에 떠 보인다 — 왼쪽에 붙인다. */
.ct-days.single .ct-day { text-align: left; padding-left: var(--s3); }
.ct-days.single .ct-date { margin-inline: 0; text-align: center; }
.ct-dow { font-size: var(--t-caption); color: var(--secondary); }
.ct-date {
  font-size: var(--t-title); font-weight: var(--w-medium); margin-top: 2px;
  width: 34px; height: 34px; line-height: 34px; border-radius: 50%; margin-inline: auto;
}
/* 오늘은 원으로 — 구글과 같다. 우리 색은 형광펜이다. */
.ct-day.today .ct-date { background: var(--hl); color: var(--ink); font-weight: var(--w-semi); }
.ct-day.today .ct-dow { color: var(--ink); font-weight: var(--w-medium); }
.ct-day.today, .ct-ad-cell.today { background: rgba(255,217,56,0.05); }

/* 종일은 시간 격자와 섞으면 하루의 모양이 안 읽힌다 — 위에 따로 눕힌다. */
.ct-allday { display: flex; border-bottom: 1px solid var(--hairline); min-height: 26px; }
.ct-allday .ct-gutter { display: flex; align-items: center; justify-content: center; }
.ct-ad-cell { flex: 1; min-width: 0; overflow: hidden; border-left: 1px solid var(--hairline);
  padding: 2px 3px; display: flex; flex-direction: column; gap: 2px; }
.ct-ad-ev {
  font-size: var(--t-caption); color: var(--ink); border-radius: var(--radius-xs);
  padding: 2px var(--s2); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.ct-body { display: flex; flex: 1; overflow-y: auto; min-height: 0; }
.ct-hours { position: relative; }
.ct-hour { position: relative; text-align: right; padding-right: var(--s2); }
/* 라벨은 그 시각의 선에 걸터앉는다 — 칸 가운데 있으면 어느 선인지 헷갈린다. */
.ct-hour::after { content: ""; position: absolute; top: 0; right: 0; }
.ct-hour { color: var(--secondary); font-size: var(--t-caption); transform: translateY(-0.6em); }

.ct-cols { display: flex; flex: 1; }
.ct-col { flex: 1; position: relative; border-left: 1px solid var(--hairline); }
.ct-line { position: absolute; left: 0; right: 0; height: 1px; background: var(--hairline); }
.ct-col.today { background: rgba(255,217,56,0.05); }

.ct-ev {
  position: absolute; border-radius: var(--radius-xs); background: var(--card);
  border: 1px solid var(--hairline); border-left: 3px solid var(--hl);
  padding: 2px var(--s1) 2px 5px; overflow: hidden; cursor: pointer;
  font-size: var(--t-caption); line-height: 1.3; box-shadow: var(--shadow-1);
  /* **넘치면 자른다.** 줄바꿈을 허용했더니 좁은 블록에서 한 글자씩 세로로 쪼개졌다.
     구글도 좁으면 제목을 잘라낸다 — 읽히지 않는 세로 글자보다 잘린 제목이 낫다. */
  display: flex; flex-wrap: wrap; gap: 0 4px; align-content: flex-start;
  white-space: nowrap;
}
.ct-ev > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* 나란히 놓여 좁아진 블록은 시간을 접는다 — 제목이 먼저다. */
.ct-ev.narrow .ct-ev-time { display: none; }
/* 30분보다 짧은 블록은 한 줄만 들어간다 — 제목을 그 한 줄에 밀어 넣는다. */
.ct-ev.short { align-items: center; padding-top: 0; padding-bottom: 0; }
.ct-ev:hover { box-shadow: var(--shadow-2); z-index: 2; }
.ct-ev-time { color: var(--secondary); margin-right: 4px; }
.ct-ev-title { color: var(--text); font-weight: var(--w-medium); }

/* 지금 이 순간 — 오늘 열에만. */
.ct-now { position: absolute; left: 0; right: 0; height: 2px; background: #C0392B; z-index: 3; }
.ct-now::before {
  content: ""; position: absolute; left: -4px; top: -3px;
  width: 8px; height: 8px; border-radius: 50%; background: #C0392B;
}

/* 일정 상세 — 위쪽 띠 색이 그 일정의 캘린더를 말한다. */
.ev-panel { border-top: 3px solid var(--hl); gap: var(--s3); }
.evd-title { font-size: var(--t-title); font-weight: var(--w-semi); line-height: 1.35; }
.ev-rows { display: flex; flex-direction: column; gap: var(--s2); }
.ev-row { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-base); color: var(--text); }
.ev-row .mi { color: var(--secondary); }
.ev-notes { font-size: var(--t-body); color: var(--secondary); line-height: 1.55; white-space: pre-wrap; max-height: 180px; overflow-y: auto; }
.ev-acts { display: flex; flex-direction: column; gap: var(--s2); }
/* 보조 버튼 — 확인창 전용 클래스(.ask-cancel)를 빌려 썼더니 .ask-panel 밖이라 스타일이 하나도
   안 붙어 브라우저 기본 회색 막대가 됐다. 위의 주 버튼과 같은 높이로 짝을 맞춘다. */
.ev-open {
  width: 100%; border: none; cursor: pointer; font-family: inherit;
  background: var(--fill); color: var(--text);
  font-size: var(--t-lead); font-weight: var(--w-medium);
  padding: var(--s3) var(--s5); border-radius: var(--radius-cta);
  transition: background .15s;
}
.ev-open:hover { background: var(--row-hover); }

/* 클로드 연결 끊기 — 설정 안에서만 쓰는 작은 글자 버튼(로그아웃과 같은 결) */
.mcp-off {
  border: none; background: none; cursor: pointer;
  font-size: var(--t-small); color: var(--tertiary); padding: 4px 0;
}
.mcp-off:hover { color: var(--danger, #C0392B); text-decoration: underline; }

/* 입력을 받는 알럿 — 묻기만 하는 알럿(300px)보다 조금 넓다. 리스트 이름이 길면 답답해진다.
   제목은 가운데 정렬을 유지하되 패널과 같은 크기로 — 15px는 본문과 같아 제목으로 안 읽혔다. */
.panel.narrow.ask-panel.input { width: min(340px, calc(100vw - 48px)); }
.ask-panel.input .ask-title { font-size: var(--t-title); }
.ask-panel.input .ask-input { margin-top: 14px; }
/* 주 버튼은 검정을 유지하되 한 단 낮춘다 — 좁은 알럿에서 통버튼이 화면을 지배하지 않게
   (원래 주석이 말하던 바인데 입력형에서는 반대로 되어 있었다). */
.ask-panel.input .ask-opt.primary { padding: 9px 12px; }

/* 클로드 연결 안내 — 바깥 페이지와 같은 내용을 앱 안에서 본다 */
.how-step { border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 14px 16px; margin-bottom: 12px; }
.how-head { font-size: var(--t-small); font-weight: var(--w-semi); color: var(--secondary); margin-bottom: 8px; }
.how-step ol { margin: 0 0 10px; padding-left: 18px; font-size: var(--t-body); }
.how-step li { margin: 3px 0; }
.how-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  background: var(--fill); border-radius: var(--radius-sm); padding: 9px 11px;
  word-break: break-all; user-select: all; line-height: 1.5;
}
.how-copy {
  width: 100%; margin-top: 8px; border: none; cursor: pointer; font-family: inherit;
  border-radius: var(--radius-cta); padding: 9px 12px; font-size: var(--t-base);
  font-weight: var(--w-medium); background: var(--fill); color: var(--text);
}
.how-copy:hover { background: rgba(0,0,0,0.09); }
.how-note { font-size: var(--t-body); color: var(--secondary); margin-top: 4px; }

/* 연결 안내 — "뭐가 되는지"가 먼저다 */
.how-why { font-size: var(--t-body); color: var(--secondary); margin-bottom: 10px; }
.how-asks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.how-ask {
  background: var(--hl-soft); border-radius: var(--radius-cta); padding: 10px 14px;
  font-size: var(--t-lead); color: var(--text);
}
.how-more {
  display: block; text-align: center; margin-top: 12px; padding: 8px 0;
  font-size: var(--t-body); color: var(--secondary); text-decoration: none;
}
.how-more:hover { color: var(--text); text-decoration: underline; }

/* 유료 기능이 잠긴 자리 — 담백하게. 결제를 재촉하지 않는다(앱스토어 규정이기도 하다) */
.locked { padding: 28px 24px; text-align: center; }
.locked-title { font-size: var(--t-lead); font-weight: var(--w-semi); margin-bottom: 6px; }
.locked-desc { font-size: var(--t-body); color: var(--secondary); line-height: 1.5; }

/* 설정의 유료 플랜 — 브라우저에서만 보인다 */
.plan-row { display: flex; gap: var(--s2); margin-top: var(--s3); }
.plan-btn {
  flex: 1; background: none; color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-cta);
  font-size: var(--t-base); font-weight: var(--w-semi); padding: var(--s3) var(--s2); cursor: pointer;
}
.plan-btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.plan-btn:active { opacity: .85; }

/* 구독을 멈춘 뒤 한 번 묻는 화면 — 붙잡는 화면이 아니라 묻는 화면이다 */
.ca-reasons { display: flex; flex-wrap: wrap; gap: 7px; }
.ca-reason {
  border: 1px solid var(--hairline); background: none; color: var(--text); cursor: pointer;
  font-family: inherit; font-size: var(--t-base); padding: 8px 13px; border-radius: 999px;
}
.ca-reason:hover { border-color: var(--secondary); }
.ca-reason.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.ca-text {
  width: 100%; border: 1px solid var(--hairline); border-radius: var(--radius-cta);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: var(--t-base);
  padding: var(--s3); outline: none; resize: none;
}
.ca-text:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27, 27, 27, 0.08); }
.ca-row { display: flex; gap: 8px; align-items: center; }
.ca-skip {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: var(--t-body); color: var(--secondary); padding: 12px 4px;
}
.ca-skip:hover { color: var(--text); }
.ca-send { flex: 1; }
