/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   JEC Design System — Minimal Dark
   토큰만 바꾸면 전체 테마 변경됨
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  /* 배경 계층 */
  --bg:       #0c0c0c;
  --surface:  #141414;
  --surface2: #1c1c1c;

  /* 테두리 */
  --border:   #222;
  --border2:  #333;

  /* 텍스트 */
  --text:     #e6e4de;
  --text-2:   #868480;
  --text-3:   #404040;

  /* 강조색 */
  --teal:     #3a8a6e;
  --teal-bg:  rgba(58,138,110,.1);
  --amber:    #c89a3a;
  --amber-bg: rgba(200,154,58,.1);
  --red:      #b85040;
  --red-bg:   rgba(184,80,64,.1);
  --blue:     #4a7eb5;
  --blue-bg:  rgba(74,126,181,.1);

  /* 스케일 */
  --r:        10px;   /* border-radius 기본 */
  --r-lg:     14px;
  --gap:      14px;
}

/* ── 리셋 ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Apple SD Gothic Neo','Noto Sans KR','Malgun Gothic',sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-y: visible;
  word-break: keep-all;
  overflow-wrap: break-word;
  min-height: 100dvh;
}

/* ── 네비 ── */
nav {
  position: fixed; top:0; left:0; right:0; z-index:100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  background: rgba(12,12,12,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 14px; font-weight: 500; letter-spacing: .04em;
  color: var(--text); text-decoration: none;
}
.nav-logo span { color: var(--text-3); font-weight: 400; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 13px; color: var(--text-3);
  text-decoration: none; letter-spacing: .02em;
  transition: color .15s;
}
.nav-links a:hover  { color: var(--text-2); }
.nav-links a.active { color: var(--text); border-bottom: 1px solid var(--border2); }

/* ── 레이아웃 ── */
.page      { padding-top: 56px; position: relative; }
.container { max-width: 760px; margin: 0 auto; padding: 0 40px; }
section    { padding: 72px 0; border-bottom: 1px solid var(--border); }
section:last-child { border-bottom: none; }

/* ── 타이포그래피 ── */
.label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 16px;
}
h1 {
  font-size: clamp(36px, 6vw, 64px); font-weight: 300;
  letter-spacing: -.02em; line-height: 1.1;
}
h1 em { font-style: normal; color: var(--text-2); }
h2     { font-size: 22px; font-weight: 400; letter-spacing: -.01em; margin-bottom: 32px; }
h3     { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
p      { color: var(--text-2); max-width: 540px; }
.quote {
  font-size: 14px; color: var(--text-2); font-style: italic;
  border-left: 2px solid var(--border2); padding-left: 20px;
  margin-top: 32px; line-height: 1.9;
}

/* ── 카드 ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--border2); }

.card-grid         { display: grid; gap: var(--gap); }
.card-grid.col2    { grid-template-columns: 1fr 1fr; }
.card-grid.col3    { grid-template-columns: 1fr 1fr 1fr; }

/* ── 뱃지 ── */
.badge {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 3px 9px; border-radius: 20px; letter-spacing: .04em;
}
.badge-teal  { background: var(--teal-bg);  color: var(--teal);  border: 1px solid rgba(58,138,110,.2); }
.badge-amber { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(200,154,58,.2); }
.badge-red   { background: var(--red-bg);   color: var(--red);   border: 1px solid rgba(184,80,64,.2); }
.badge-blue  { background: var(--blue-bg);  color: var(--blue);  border: 1px solid rgba(74,126,181,.2); }
.badge-gray  { background: var(--surface2); color: var(--text-2); border: 1px solid var(--border); }

/* ── 구분선 / 행 ── */
.divider   { height: 1px; background: var(--border); margin: 28px 0; }
.row       { display: flex; align-items: baseline; justify-content: space-between; }
.row + .row { margin-top: 12px; }
.row-label { font-size: 13px; color: var(--text-3); }
.row-value { font-size: 13px; color: var(--text-2); }
.row-value.highlight { color: var(--text); }

/* ── 타임라인 ── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute;
  left: 4px; top: 8px; bottom: 8px;
  width: 1px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item::before {
  content: ''; position: absolute;
  left: -22px; top: 7px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border2);
}
.timeline-item.active::before { background: var(--text-2); border-color: var(--text-2); }
.timeline-period { font-size: 11px; color: var(--text-3); letter-spacing: .06em; margin-bottom: 4px; }
.timeline-title  { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.timeline-desc   { font-size: 13px; color: var(--text-3); line-height: 1.8; }

/* ── 태그 ── */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 14px; transition: all .15s; cursor: default;
}
.tag:hover { color: var(--text-2); border-color: var(--border2); }

/* ── 통계 그리드 ── */
.stat-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.stat-cell   { background: var(--surface); padding: 20px; }
.stat-label  { font-size: 11px; color: var(--text-3); letter-spacing: .06em; margin-bottom: 6px; }
.stat-value  { font-size: 22px; font-weight: 300; color: var(--text); }
.stat-sub    { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ── 코드블록 ── */
.code-block {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 20px;
  font-family: 'SF Mono','Consolas','Courier New',monospace;
  font-size: 12px; color: var(--text-2); line-height: 2; overflow-x: auto;
}
.code-block .k { color: var(--amber); }
.code-block .s { color: var(--teal); }
.code-block .c { color: var(--text-3); }

/* ── 페이드인 ── */
.fi     { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.fi.in  { opacity: 1; transform: none; }

/* ── 파이프라인 리스트 ── */
.pipeline-link {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; cursor: pointer;
}
.pipeline-link:last-child { border-bottom: none; }
.pipeline-link:hover .p-title { color: var(--text-2); }
.pipeline-link:hover .p-arrow { opacity: 1; transform: translateX(0); }
.p-num   { font-size: 11px; color: var(--text-3); letter-spacing: .1em; min-width: 22px; }
.p-body  { flex: 1; min-width: 0; }
.p-title { font-size: 15px; color: var(--text); margin-bottom: 3px; font-weight: 500; transition: color .15s; }
.p-desc  { font-size: 12px; color: var(--text-3); }
.p-arrow { font-size: 12px; color: var(--text-3); opacity: 0; transform: translateX(-6px); transition: all .2s; flex-shrink: 0; }

/* ── 갭 분석 그리드 ── */
.gap-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.gap-col  { background: var(--surface); padding: 24px 20px; }
.gap-col-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.gap-col-label.doing { color: var(--amber); }
.gap-col-label.need  { color: var(--teal); }
.gap-row {
  font-size: 12px; color: var(--text-3);
  margin-bottom: 8px; padding: 5px 8px 5px 14px;
  border-radius: 5px; position: relative;
  display: block; text-decoration: none;
  transition: background .15s, color .15s;
}
.gap-row::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--border2); }
.gap-row.hl { color: var(--text); }
.gap-row.hl::before { background: var(--text-2); }
a.gap-row:hover { background: var(--surface2); color: var(--text-2); }

/* ── 진단 카드 ── */
.diag-link { display: block; text-decoration: none; margin-top: 12px; }
.diag-link .card { transition: border-color .15s; }
.diag-link:hover .card { border-color: var(--border2); }
.diag-link:hover .diag-hint { color: var(--teal); }
.diag-quote { font-size: 17px; font-weight: 300; font-style: italic; color: var(--text); margin-bottom: 10px; }
.diag-hint  { font-size: 11px; color: var(--text-3); margin-top: 14px; transition: color .15s; letter-spacing: .02em; }

/* ── 프로젝트 카드 ── */
.project-card-link { text-decoration: none; display: block; }
.project-card-link .card { transition: border-color .15s, transform .15s; }
.project-card-link:hover .card { border-color: var(--border2); transform: translateY(-2px); }
.project-icon { font-size: 18px; margin-bottom: 12px; color: var(--text-3); }
.project-name { font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.project-sub  { font-size: 12px; color: var(--text-3); line-height: 1.7; }
.project-tag  { font-size: 11px; color: var(--teal); margin-top: 12px; opacity: 0; transition: opacity .15s; }
.project-card-link:hover .project-tag { opacity: 1; }

/* ── hero 메타 ── */
.hero-meta { display: flex; gap: 36px; margin-top: 36px; flex-wrap: wrap; }
.meta-item .key { font-size: 10px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
.meta-item .val { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ── 탭 (todo/notes) ── */
.page-tabs { display:flex; border-bottom:1px solid var(--border); margin-bottom:36px; }
.page-tab {
  padding:12px 24px; font-size:13px; color:var(--text-3);
  cursor:pointer; background:none; border:none;
  border-bottom:2px solid transparent;
  font-family:inherit; transition:color .15s, border-color .15s;
  margin-bottom:-1px;
}
.page-tab:hover { color:var(--text); }
.page-tab.active { color:var(--text); border-bottom-color:var(--amber); }

/* ── 필터 버튼 (diary/gallery) ── */
.filter-bar { display:flex; align-items:center; gap:12px; padding:20px 0 32px; flex-wrap:wrap; }
.filter-btn {
  font-size:12px; padding:5px 14px; border-radius:20px;
  background:none; border:1px solid var(--border);
  color:var(--text-3); cursor:pointer; font-family:inherit;
  transition:all .15s; flex-shrink:0;
}
.filter-btn:hover { border-color:var(--border2); color:var(--text); }
.filter-btn.active { background:var(--surface2); border-color:var(--amber); color:var(--amber); }
.diary-search {
  margin-left:auto; font-size:12px; background:none;
  border:1px solid var(--border); border-radius:20px;
  padding:6px 14px; color:var(--text-2); font-family:inherit;
  outline:none; width:160px; transition:border-color .15s;
}
.diary-search:focus { border-color:var(--border2); }

/* ── 통계 행 (diary) ── */
.stats-row { display:flex; gap:32px; margin-bottom:8px; flex-wrap:wrap; }
.stat-num { font-size:28px; font-weight:300; color:var(--text); letter-spacing:-.02em; }
.stat-label { font-size:11px; color:var(--text-3); letter-spacing:.06em; margin-top:2px; }

/* ── 일기 엔트리 ── */
.diary-list { display:flex; flex-direction:column; }
.diary-entry { display:grid; grid-template-columns:110px 1fr; gap:28px; padding:36px 0; border-bottom:1px solid var(--border); }
.diary-entry:last-child { border-bottom:none; }
.de-side { text-align:right; position:sticky; top:80px; align-self:start; }
.de-day { font-size:36px; font-weight:200; color:var(--text); line-height:1; }
.de-ym, .de-dow { font-size:11px; color:var(--text-3); }
.de-ym { margin-top:6px; }
.de-mood { font-size:22px; margin-top:10px; }
.de-body { min-width:0; }
.de-schedule {
  display:inline-flex; align-items:center; gap:6px;
  font-size:11px; color:var(--amber);
  background:var(--amber-bg); border:1px solid rgba(200,154,58,.25);
  border-radius:20px; padding:3px 12px; margin-bottom:12px;
}
.de-title { font-size:18px; font-weight:300; color:var(--text); margin-bottom:10px; letter-spacing:-.01em; }
.de-text { font-size:14px; color:var(--text-2); line-height:1.95; white-space:pre-wrap; word-break:break-word; }
.de-tags { display:flex; gap:6px; flex-wrap:wrap; margin-top:14px; }
.de-tag { font-size:11px; color:var(--text-3); background:var(--surface2); border:1px solid var(--border); border-radius:20px; padding:3px 11px; }
.de-photos { display:flex; gap:6px; margin-top:16px; overflow-x:auto; padding-bottom:4px; }
.de-photo { width:84px; height:84px; border-radius:8px; flex-shrink:0; object-fit:cover; cursor:pointer; border:1px solid var(--border); transition:all .15s; }
.de-photo:hover { border-color:var(--border2); transform:scale(1.04); }
.de-link { display:inline-block; margin-top:14px; font-size:12px; color:var(--amber); text-decoration:none; opacity:.8; transition:opacity .15s; }
.de-link:hover { opacity:1; }
.empty-diary { text-align:center; padding:80px 0; color:var(--text-3); font-size:14px; line-height:1.8; }
.empty-diary a { color:var(--amber); text-decoration:none; }

/* ── 라이트박스 ── */
#lightbox { position:fixed; inset:0; z-index:900; background:rgba(5,5,5,.96); display:none; align-items:center; justify-content:center; }
#lightbox.open { display:flex; }
#lb-img { max-width:90vw; max-height:84vh; object-fit:contain; border-radius:4px; }
.lb-close {
  position:fixed; top:20px; right:24px;
  width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15);
  color:rgba(255,255,255,.7); font-size:18px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.lb-close:hover { background:rgba(255,255,255,.15); color:#fff; }

/* ── 목표 (goals) ── */
.goal-item { display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--border); }
.goal-item:last-child { border-bottom:none; }
.goal-check { width:18px; height:18px; border:1px solid var(--border2); border-radius:5px; flex-shrink:0; margin-top:2px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .15s, border-color .15s; }
.goal-check.done { background:var(--teal); border-color:var(--teal); }
.goal-check.done::after { content:'✓'; font-size:10px; color:#fff; }
.goal-text { font-size:14px; color:var(--text); line-height:1.5; min-width:0; }
.goal-sub { font-size:12px; color:var(--text-3); margin-top:4px; line-height:1.6; }
.prog-bar { height:3px; background:var(--border); border-radius:2px; overflow:hidden; margin-bottom:8px; }
.prog-fill { height:100%; background:var(--teal); border-radius:2px; transition:width .4s; }
.category-header { font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--text-3); margin-bottom:14px; margin-top:36px; display:flex; align-items:center; gap:12px; }
.category-header:first-child { margin-top:0; }
.category-header::after { content:''; flex:1; height:1px; background:var(--border); }
.goal-dday { display:inline-block; font-size:10px; padding:1px 7px; border-radius:4px; font-weight:500; letter-spacing:.04em; margin-left:8px; background:var(--amber-bg); color:var(--amber); }
.goal-dday.today { background:var(--blue-bg); color:var(--blue); }
.goal-dday.over  { background:var(--red-bg); color:var(--red); }
.goal-priority-btn { font-size:10px; padding:2px 8px; border-radius:20px; border:1px solid var(--border); background:none; color:var(--text-3); cursor:pointer; font-family:inherit; flex-shrink:0; margin-top:2px; transition:all .15s; line-height:1.6; }
.goal-priority-btn.urgent { background:var(--red-bg); border-color:rgba(184,80,64,.4); color:var(--red); }
.goal-priority-btn.high { background:var(--amber-bg); border-color:rgba(200,154,58,.4); color:var(--amber); }
.goal-actions { display:flex; gap:6px; align-items:flex-start; flex-shrink:0; margin-top:2px; opacity:0; transition:opacity .15s; pointer-events:none; }
.goal-item:hover .goal-actions { opacity:1; pointer-events:auto; }
.goal-edit-btn, .goal-del-btn { font-size:11px; padding:2px 7px; border-radius:6px; border:1px solid var(--border); background:none; color:var(--text-3); cursor:pointer; font-family:inherit; flex-shrink:0; transition:all .15s; line-height:1.6; }
.goal-edit-btn:hover { border-color:var(--amber); color:var(--amber); }
.goal-del-btn:hover { border-color:var(--red); color:var(--red); }
.section-head { display:flex; align-items:baseline; gap:16px; margin-bottom:8px; }
.btn-add-goal { font-size:11px; padding:3px 12px; border-radius:20px; border:1px solid var(--border); background:none; color:var(--text-3); cursor:pointer; font-family:inherit; flex-shrink:0; transition:all .15s; line-height:1.6; margin-left:auto; }
.btn-add-goal:hover { border-color:var(--teal); color:var(--teal); }
.goal-item.editing .goal-view { display:none; }
.goal-item.editing .goal-edit-form { display:flex; }
.goal-view { display:flex; flex:1; min-width:0; gap:14px; align-items:flex-start; }
.goal-edit-form { display:none; flex-direction:column; gap:7px; flex:1; min-width:0; padding:4px 0; }
.goal-edit-form input, .goal-edit-form select { font-size:12px; font-family:inherit; background:var(--surface); border:1px solid var(--border2); border-radius:7px; padding:6px 10px; color:var(--text); outline:none; box-sizing:border-box; width:100%; }
.goal-edit-form input:focus, .goal-edit-form select:focus { border-color:var(--teal); }
.goal-edit-row { display:flex; gap:7px; }
.goal-edit-row input, .goal-edit-row select { flex:1; min-width:0; }
.goal-edit-btns { display:flex; gap:7px; margin-top:2px; }
.goal-edit-btns button { flex:1; padding:7px; border-radius:8px; border:none; font-size:12px; font-family:inherit; font-weight:500; cursor:pointer; transition:opacity .15s; }
.btn-inline-save { background:var(--teal); color:#111; }
.btn-inline-cancel { background:var(--surface); color:var(--text-2); border:1px solid var(--border) !important; }
.btn-inline-save:hover, .btn-inline-cancel:hover { opacity:.8; }

/* ── 메모/할일 (todo) ── */
.notes-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:20px; flex-wrap:wrap; }
.notes-search { flex:1; min-width:160px; padding:9px 14px; background:var(--surface); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:13px; font-family:inherit; outline:none; transition:border-color .2s; }
.notes-search:focus { border-color:var(--amber); }
.btn-new { padding:9px 18px; background:var(--amber); color:#111; border:none; border-radius:8px; font-size:13px; font-family:inherit; font-weight:500; cursor:pointer; white-space:nowrap; flex-shrink:0; }
.btn-new:hover { opacity:.85; }
.notes-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:12px; }
.note-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:18px; cursor:pointer; transition:border-color .2s, transform .15s; position:relative; }
.note-card:hover { border-color:var(--border2); transform:translateY(-2px); }
.note-card.pinned { border-color:rgba(200,154,58,.4); }
.note-pin { position:absolute; top:12px; right:12px; font-size:13px; opacity:.5; }
.note-card.pinned .note-pin { opacity:1; }
.note-title { font-size:14px; color:var(--text); font-weight:500; margin-bottom:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding-right:20px; }
.note-preview { font-size:12px; color:var(--text-3); line-height:1.7; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.note-date { font-size:11px; color:var(--text-3); margin-top:12px; }
.note-empty { text-align:center; padding:60px 0; color:var(--text-3); font-size:14px; line-height:2; }
#note-modal { display:none; position:fixed; inset:0; z-index:900; background:rgba(0,0,0,.7); backdrop-filter:blur(6px); align-items:center; justify-content:center; padding:20px; }
#note-modal.open { display:flex; }
.note-editor { background:var(--surface); border:1px solid var(--border2); border-radius:16px; width:100%; max-width:640px; max-height:85vh; display:flex; flex-direction:column; overflow:hidden; }
.editor-header { display:flex; align-items:center; gap:10px; padding:16px 20px; border-bottom:1px solid var(--border); }
.editor-title-input { flex:1; background:none; border:none; color:var(--text); font-size:16px; font-family:inherit; font-weight:500; outline:none; }
.editor-title-input::placeholder { color:var(--text-3); }
.editor-body-input { flex:1; padding:18px 20px; background:none; border:none; resize:none; color:var(--text-2); font-size:14px; font-family:inherit; line-height:1.8; outline:none; min-height:200px; }
.editor-footer { display:flex; align-items:center; justify-content:space-between; padding:12px 20px; border-top:1px solid var(--border); gap:10px; flex-wrap:wrap; }
.editor-actions { display:flex; gap:8px; }
.btn-ghost { padding:7px 14px; background:none; border:1px solid var(--border); border-radius:7px; color:var(--text-3); font-size:12px; font-family:inherit; cursor:pointer; transition:all .15s; }
.btn-ghost:hover { color:var(--text); border-color:var(--border2); }
.btn-del { padding:7px 14px; background:none; border:1px solid rgba(184,80,64,.3); border-radius:7px; color:var(--red); font-size:12px; font-family:inherit; cursor:pointer; }
.btn-save { padding:7px 18px; background:var(--amber); border:none; border-radius:7px; color:#111; font-size:12px; font-family:inherit; font-weight:500; cursor:pointer; }
.todo-toolbar { display:flex; gap:10px; margin-bottom:20px; flex-wrap:wrap; }
.todo-date-filter, .todo-cat-filter { padding:9px 14px; background:var(--surface); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:13px; font-family:inherit; outline:none; }
.todo-cat-filter { flex:1; min-width:100px; }
.todo-add-form { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px; margin-bottom:20px; display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.todo-text-input { flex:1; min-width:180px; padding:9px 14px; background:var(--surface2); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:14px; font-family:inherit; outline:none; }
.todo-text-input:focus { border-color:var(--amber); }
.todo-meta { display:flex; gap:8px; flex-wrap:wrap; }
.todo-meta input, .todo-meta select { padding:8px 12px; background:var(--surface2); border:1px solid var(--border); border-radius:7px; color:var(--text); font-size:12px; font-family:inherit; outline:none; }
.todo-meta input[type="date"] { min-width:130px; }
.todo-sections { display:flex; flex-direction:column; gap:28px; }
.todo-group-label { font-size:11px; color:var(--text-3); letter-spacing:.1em; text-transform:uppercase; margin-bottom:10px; display:flex; align-items:center; gap:10px; }
.todo-group-label::after { content:''; flex:1; height:1px; background:var(--border); }
.todo-item { display:flex; align-items:flex-start; gap:12px; padding:13px 0; border-bottom:1px solid var(--border); }
.todo-item:last-child { border-bottom:none; }
.todo-check { width:18px; height:18px; border:1px solid var(--border2); border-radius:5px; flex-shrink:0; margin-top:1px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .15s, border-color .15s; }
.todo-check.done { background:var(--teal); border-color:var(--teal); }
.todo-check.done::after { content:'✓'; font-size:10px; color:#fff; }
.todo-check.high { border-color:var(--red); }
.todo-check.done.high { background:var(--red); border-color:var(--red); }
.todo-content { flex:1; min-width:0; }
.todo-text { font-size:14px; color:var(--text); line-height:1.5; transition:opacity .2s; }
.todo-text.done { opacity:.35; text-decoration:line-through; }
.todo-sub { display:flex; gap:10px; margin-top:4px; flex-wrap:wrap; }
.todo-date-badge { font-size:11px; color:var(--text-3); }
.todo-date-badge.overdue { color:var(--red); }
.todo-date-badge.today-badge { color:var(--amber); }
.todo-cat-badge { font-size:11px; color:var(--text-3); background:var(--surface2); border-radius:4px; padding:1px 6px; }
.todo-priority-badge { font-size:10px; border-radius:4px; padding:1px 7px; font-weight:500; flex-shrink:0; }
.todo-priority-badge.high { background:var(--red-bg); color:var(--red); }
.todo-priority-badge.normal { background:var(--surface2); color:var(--text-3); }
.done-group-toggle { cursor:pointer; user-select:none; display:flex; align-items:center; gap:6px; }
.done-group-toggle .toggle-arrow { font-size:10px; transition:transform .2s; }
.done-group-toggle.collapsed .toggle-arrow { transform:rotate(-90deg); }
.done-group-body { overflow:hidden; transition:max-height .25s ease; }
.done-group-body.collapsed { max-height:0 !important; }
.todo-del { background:none; border:none; cursor:pointer; color:var(--text-3); font-size:16px; line-height:1; padding:2px 4px; flex-shrink:0; opacity:0; transition:opacity .15s; }
.todo-item:hover .todo-del { opacity:1; }
.todo-del:hover { color:var(--red); }
.todo-empty { text-align:center; padding:40px 0; color:var(--text-3); font-size:13px; }
.cal-link-banner { display:flex; align-items:center; justify-content:space-between; background:rgba(200,154,58,.06); border:1px solid rgba(200,154,58,.2); border-radius:10px; padding:12px 16px; margin-bottom:24px; text-decoration:none; color:inherit; transition:border-color .2s; }
.cal-link-banner:hover { border-color:rgba(200,154,58,.5); }
.cal-link-text { font-size:13px; color:var(--text-2); }
.cal-link-arr  { font-size:13px; color:var(--amber); }

/* ── 모바일 추가 ── */
@media(max-width:640px) {
  .gap-wrap { grid-template-columns:1fr; }
  .hero-meta { gap:20px; }
  .notes-grid { grid-template-columns:1fr; }
  .page-tab { padding:10px 16px; font-size:12px; }
  .todo-add-form { flex-direction:column; }
  .todo-text-input { min-width:unset; }
}
@media(max-width:700px) {
  .diary-entry { grid-template-columns:1fr; gap:14px; padding:28px 0; }
  .de-side { position:static; text-align:left; display:flex; align-items:baseline; gap:10px; }
  .de-day { font-size:26px; }
  .de-mood { margin-top:0; font-size:18px; }
  .diary-search { margin-left:0; width:100%; }
}

/* ── 푸터 ── */
footer {
  text-align: center; padding: 40px 0 56px;
  font-size: 12px; color: var(--text-3); letter-spacing: .04em;
  border-top: 1px solid var(--border);
}

/* ── 모바일 (≤ 640px) ── */
@media (max-width: 640px) {
  nav {
    padding: 0 16px;
    height: auto; flex-wrap: wrap;
    padding-top: 12px; padding-bottom: 10px; gap: 8px;
  }
  .nav-links {
    width: 100%; display: flex; gap: 0;
    overflow-x: auto; scrollbar-width: none;
    border-top: 1px solid var(--border); padding-top: 8px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { font-size: 12px; white-space: nowrap; padding: 4px 10px; flex-shrink: 0; }
  .page      { padding-top: 90px; }
  .container { padding: 0 16px; }
  section    { padding: 48px 0; }
  h1         { font-size: 32px; }
  h2         { font-size: 20px; margin-bottom: 24px; }
  .card-grid.col2, .card-grid.col3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .gap-wrap { grid-template-columns: 1fr; }
  .hero-meta { gap: 20px; }
}

/* ── 태블릿 (641 ~ 1024px) ── */
@media (min-width: 641px) and (max-width: 1024px) {
  nav        { padding: 0 24px; }
  .container { padding: 0 24px; }
  .card-grid.col3 { grid-template-columns: 1fr 1fr; }
}
