:root {
  --ink: #2f2f3a;
  --ink-2: #6b6b7b;
  --ink-3: #9a9aab;
  --line: #ece9f3;
  --card: rgba(255, 255, 255, 0.86);
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --late: #e11d48;
  --ok: #059669;
  --radius: 18px;
  --shadow: 0 2px 14px rgba(120, 100, 160, 0.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  background: var(--bg, linear-gradient(135deg, #eaf6df 0%, #f7f6ea 30%, #fdf1ea 60%, #f1ecfd 100%));
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--ink);
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 10px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(167, 139, 250, .18); }
.hidden { display: none !important; }
.grow { flex: 1; }
.sub { color: var(--ink-3); font-size: 13px; font-weight: 400; }
.hint { color: var(--ink-3); font-size: 13px; line-height: 1.6; margin: 8px 0 12px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 28px 20px 60px; }

/* 상단 */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.site { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -.3px; cursor: pointer; }
.today { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.top-right { display: flex; align-items: center; gap: 12px; position: relative; }
.cheer { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 13px; box-shadow: var(--shadow); white-space: nowrap; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; background: var(--c);
  font-size: 20px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.15);
  box-shadow: 0 4px 16px rgba(120, 100, 160, .18);
}
.menu { position: absolute; right: 0; top: 62px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(80,60,120,.15); min-width: 190px; z-index: 30; overflow: hidden; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 11px 16px; border: 0; background: none; font-size: 14px; }
.menu a:hover, .menu button:hover { background: #f7f5fc; }
.menu-who { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.menu-who span { color: var(--ink-3); font-size: 12px; }

/* 메뉴 알약 */
.nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px;
  background: rgba(255,255,255,.75); border: 1px solid transparent; font-size: 14px; box-shadow: var(--shadow);
  transition: transform .1s, background .15s;
}
.pill:hover { background: #fff; transform: translateY(-1px); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pill .cnt { color: var(--ink-3); font-size: 12px; margin-left: 4px; }
.pill.on { background: color-mix(in srgb, var(--c) 45%, white); font-weight: 700; border-color: color-mix(in srgb, var(--c) 70%, white); }
.pill.on .dot { display: none; }
.pill.on .cnt { background: #fff; color: var(--ink); border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.nav-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

/* 페이지 */
.page-head h2 { font-size: 22px; margin: 0 0 6px; font-weight: 800; }
.page-head .sub { font-size: 14px; color: var(--ink-2); margin: 0 0 16px; line-height: 1.55; }
.card { background: var(--card); border: 1px solid #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 16px; backdrop-filter: blur(6px); }
.card h3 { margin: 0 0 14px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card h4 { margin: 18px 0 8px; font-size: 14px; }
.empty { color: var(--ink-3); text-align: center; padding: 30px 10px; font-size: 14px; }
.empty.small { padding: 12px; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; }
.grid2 { margin-bottom: 16px; }

.btn { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 14px; white-space: nowrap; transition: filter .15s; }
.btn:hover { filter: brightness(.97); }
.btn.primary { background: linear-gradient(135deg, #a78bfa, #8b5cf6); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(139, 92, 246, .25); }
.btn.danger { color: var(--late); }
.btn.big { padding: 13px; font-size: 15px; width: 100%; }
.btn.full { width: 100%; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; white-space: nowrap; }
.mini:hover { background: #f7f5fc; }
.mini.danger { color: var(--late); }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; }
.chip:hover { background: #f7f5fc; }
.tag { display: inline-block; background: #f1edfb; color: #6d4fc2; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.tag.late { background: #ffe4ea; color: var(--late); }
.tag.ok { background: #dcfce7; color: var(--ok); }
.tag.soft { background: #f4f4f7; color: var(--ink-2); font-weight: 500; }
.badge { background: #fde68a; color: #92400e; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; margin-left: 6px; vertical-align: middle; }

/* 날짜 이동 */
.hl { background: #fde68a; color: #92400e; font-weight: 800; border-radius: 6px; padding: 1px 7px; }

/* 진행 막대 */
.prog { margin-bottom: 14px; }
.prog-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.prog-top b { color: var(--ink); }
.bar { height: 8px; background: #f1eef8; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #86efac, #34d399); border-radius: 99px; transition: width .4s; }

/* 할 일 입력 */
.priv-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; cursor: pointer; user-select: none; }
.priv-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }

/* 할 일 목록 */
.todos { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; align-items: flex-start; gap: 12px; padding: 13px 4px; border-bottom: 1px dashed var(--line); }
.todo:last-child { border-bottom: 0; }
.chk { position: relative; flex: none; margin-top: 1px; cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.chk span { display: block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfc7e6; background: #fff; transition: all .15s; }
.chk input:checked + span { background: var(--accent-2); border-color: var(--accent-2); }
.chk input:checked + span::after { content: ''; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.chk input:disabled { cursor: default; }
.chk input:focus-visible + span { box-shadow: 0 0 0 3px rgba(167, 139, 250, .3); }
.t-body { flex: 1; min-width: 0; }
.t-text { font-size: 15px; line-height: 1.45; word-break: break-word; }
.t-text.editable { cursor: text; border-radius: 6px; }
.t-text.editable:hover { background: #faf8fe; }
.todo.done .t-text { color: var(--ink-3); text-decoration: line-through; }
.t-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 5px; font-size: 12px; color: var(--ink-3); align-items: center; }
.ts.ok { color: var(--ok); font-weight: 600; }
.t-actions { display: flex; align-items: center; gap: 2px; flex: none; }

/* 주간 */
.ev-chip { display: inline-block; background: color-mix(in srgb, var(--c) 35%, white); border-left: 3px solid var(--c); border-radius: 6px; padding: 2px 8px; font-size: 12px; margin: 2px 4px 2px 0; }
.ev-strip { margin-bottom: 14px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

/* 진행현황 */
.ring-card { background: var(--card); border: 1px solid #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; display: flex; align-items: center; gap: 16px; }
.ring { --p: 0; width: 74px; height: 74px; border-radius: 50%; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), #f1eef8 0); display: grid; place-items: center; }
.ring span { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; }
.bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bstack { flex: 1; width: 100%; max-width: 26px; position: relative; }
.bstack i { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 6px 6px 3px 3px; }
.b-total { background: #ede9fe; }
.b-done { background: linear-gradient(180deg, #a78bfa, #8b5cf6); }
.bcol span { font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.25; }
.bcol span.is-today { color: var(--accent); font-weight: 800; }
.legend { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.lg-total { background: #ede9fe; }
.lg-done { background: #8b5cf6; }
.cnt-big { margin-left: auto; font-size: 22px; color: var(--late); }
.simple { list-style: none; padding: 0; margin: 0; }
.simple li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 1.5; }
.simple li:last-child { border-bottom: 0; }

/* 달력 */
.cal-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-card { padding: 14px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { text-align: center; font-size: 13px; color: var(--ink-2); padding: 6px 0 10px; font-weight: 600; }
.cal-head .sat, .cal-num.sat { color: #3b82f6; }
.cal-head .sun, .cal-num.sun { color: #ef4444; }
.cal-grid { gap: 4px; }
.cal-cell { min-height: 108px; background: #fff; border-radius: 12px; padding: 6px 7px; cursor: pointer; border: 1px solid #f3f0f9; transition: border-color .15s, transform .1s; overflow: hidden; }
.cal-cell:hover { border-color: var(--accent-2); }
.cal-cell.out { opacity: .45; }
.cal-cell.today { border: 2px solid var(--accent-2); background: #fbf9ff; }
.cal-num { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cal-ev { font-size: 11.5px; background: color-mix(in srgb, var(--c) 35%, white); border-left: 3px solid var(--c); border-radius: 4px; padding: 2px 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-todo { font-size: 11px; color: var(--ink-2); margin-bottom: 3px; }
.cal-todo.all { color: var(--ok); font-weight: 700; }
.cal-more { font-size: 11px; color: var(--ink-3); }
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev-list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.ev-list li:last-child { border-bottom: 0; }
.ev-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; margin-top: 5px; }
.ev-date { color: var(--ink-2); font-size: 13px; min-width: 92px; }
.ev-memo { color: var(--ink-2); font-size: 13px; margin-top: 4px; white-space: pre-wrap; }

/* 메모장 */
.memo-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.memo-list ul { list-style: none; margin: 12px 0 0; padding: 0; max-height: 60vh; overflow: auto; }
.memo-item { padding: 10px 12px; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.memo-item b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.memo-item:hover { background: #faf8fe; }
.memo-item.on { background: #fef9c3; }
.memo-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.memo-title { width: 100%; font-size: 18px; font-weight: 700; border: 0; padding: 6px 2px; background: transparent; }
.memo-title:focus { box-shadow: none; }
.memo-body { width: 100%; min-height: 50vh; resize: vertical; line-height: 1.7; border: 0; background: #fffef5; padding: 14px; margin: 6px 0 8px; }

/* 팀원 보기 */
.people { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.person { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.75); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 14px; box-shadow: var(--shadow); border: 1px solid transparent; }
.person:first-child { padding-left: 14px; }
.person.on { border-color: var(--accent-2); background: #fff; font-weight: 700; }
.person .sub { font-size: 12px; }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--c, #c4b5fd); color: #fff; font-weight: 800; display: inline-grid; place-items: center; font-size: 13px; flex: none; }
.av.sm { width: 24px; height: 24px; font-size: 12px; vertical-align: middle; margin-right: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 9px 16px; border-radius: 12px 12px 0 0; font-size: 14px; color: var(--ink-2); }
.tab.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 -2px 8px rgba(120,100,160,.06); }
.pcard { display: block; transition: transform .12s; }
.pcard:hover { transform: translateY(-2px); }
.pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pc-head .av { width: 38px; height: 38px; font-size: 16px; }
.pc-foot { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: 13px; }
.pc-todo { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* 관리 */
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row input { flex: 1; min-width: 130px; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--ink-3); font-weight: 600; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px dashed var(--line); white-space: nowrap; }
.tbl tr.off td { color: var(--ink-3); }
.tbl .acts { display: flex; gap: 4px; justify-content: flex-end; }
.tbl.grants td:not(:first-child), .tbl.grants th:not(:first-child) { text-align: center; width: 130px; }
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; max-width: 360px; }
.sw { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw span { position: absolute; inset: 0; background: #e5e1ef; border-radius: 99px; transition: .2s; }
.sw span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: .2s; }
.sw input:checked + span { background: var(--accent-2); }
.sw input:checked + span::after { transform: translateX(18px); }
.swatches { display: flex; gap: 8px; margin-bottom: 16px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.card > input, .card > .btn { display: block; margin-bottom: 10px; }
.card > input { width: 100%; }

/* 모달 */
.modal-wrap { position: fixed; inset: 0; background: rgba(40, 30, 70, .28); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 20px; padding: 22px 24px; width: min(480px, 100%); max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(60, 40, 110, .25); }
.modal h3 { margin: 0 0 12px; font-size: 18px; }
.modal h4 { margin: 16px 0 6px; font-size: 14px; }
.modal > input, .modal > textarea { width: 100%; margin-bottom: 10px; }
.modal-foot { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.quick { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cat input { display: none; }
.cat span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.cat input:checked + span { background: color-mix(in srgb, var(--c) 50%, white); border-color: var(--c); font-weight: 700; }
@keyframes fade { from { opacity: 0; } }

/* 로그인 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: min(400px, 100%); text-align: center; padding: 34px 30px; }
.login .logo { font-size: 40px; }
.login h1 { margin: 6px 0 6px; font-size: 26px; font-weight: 800; }
.login .sub { margin-bottom: 20px; line-height: 1.6; font-size: 14px; }
.login input { width: 100%; margin-bottom: 10px; padding: 12px 16px; }

/* 알림 */
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { background: #2f2f3a; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .3s, transform .3s; }
.toast.err { background: #e11d48; }
.toast.out { opacity: 0; transform: translateY(8px); }

.foot { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 30px; }

/* ─── v2 ─── */
/* 페이지 머리: 왼쪽 제목, 오른쪽 ‹ 오늘 › */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head h2 { font-size: 30px; letter-spacing: -.5px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.page-head .sub { margin: 0; }
.ph-right { flex: none; padding-bottom: 2px; }
.who { color: var(--ink-2); font-weight: 700; font-size: 22px; }
.badge { font-size: 13px; padding: 4px 11px; margin: 0; font-weight: 700; }
.badge.blue { background: #e3ecfb; color: #3d5a99; }
.badge.green { background: #e2f3e4; color: #2f6b3c; }
.badge.pink { background: #fde4e7; color: #b4384a; }
.title-pick { position: relative; cursor: pointer; border-radius: 8px; }
.title-pick:hover { background: rgba(255,255,255,.6); }
.hidden-picker { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.head-nav { display: flex; gap: 8px; align-items: center; }
.circle-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid #fff; background: rgba(255,255,255,.9); font-size: 20px; color: var(--ink-2); box-shadow: var(--shadow); line-height: 1; }
.pill-btn { border: 1px solid var(--line); background: rgba(255,255,255,.95); border-radius: 999px; padding: 11px 20px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.pill-btn.sm { padding: 6px 14px; font-size: 13px; box-shadow: none; }
.circle-btn:hover, .pill-btn:hover { background: #fff; filter: brightness(.98); }
.dark-btn { background: #2f323a; color: #fff; border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.dark-btn:hover { background: #1f2128; }
.dark-btn.sm { padding: 7px 16px; font-size: 13px; }
.dark-btn.lg { padding: 15px 28px; font-size: 16px; }
.txt-btn { border: 0; background: none; color: var(--ink-3); font-size: 14px; padding: 6px 8px; border-radius: 8px; }
.txt-btn:hover { color: var(--ink); background: #f5f3f9; }

/* 끝낸 일 / 남은 일 / 진행률 */
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { background: rgba(255,255,255,.9); border: 1px solid #fff; border-radius: 999px; padding: 10px 20px; color: var(--ink-3); font-size: 15px; box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 6px; }
.stat b { color: var(--ink); font-size: 19px; }
.stat .hl { font-size: 15px; padding: 3px 10px; border-radius: 999px; background: #fdf0c4; color: #a16207; }

/* 할 일 입력 (제목 + 메모) */
.add-box { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: #fff; border-radius: 22px; padding: 8px 8px 8px 20px; margin-bottom: 14px; transition: border-color .15s, box-shadow .15s; }
.add-box:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(167, 139, 250, .15); }
.add-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.add-fields input, .add-fields textarea { border: 0; padding: 4px 0; background: transparent; box-shadow: none !important; width: 100%; }
.add-fields input { font-size: 16px; padding-top: 8px; }
.add-fields textarea { font-size: 13px; color: var(--ink-2); resize: none; overflow: hidden; line-height: 1.5; min-height: 0; padding-bottom: 6px; }
.add-fields textarea::placeholder { color: #c3c0cc; }

/* 할 일 줄 */
.todo { padding: 16px 4px; }
.t-memo { font-size: 13px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.t-meta { gap: 4px 10px; font-size: 13px; margin-top: 6px; }
.t-meta .ok { color: var(--ok); font-weight: 600; }
.t-actions { gap: 4px; }
.todo.editing .t-body { display: flex; flex-direction: column; gap: 2px; }
.edit-box { margin-bottom: 0; }
.lock { font-size: 11px; }

/* 주간: 요일 카드 */
.notice { display: flex; align-items: center; gap: 6px; background: #fff7e0; border: 1px solid #fde9b0; border-radius: 16px; padding: 12px 18px; font-size: 14px; margin-bottom: 16px; color: #8a5a00; }
.notice span { margin-left: auto; font-weight: 600; }
.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.wk-card { --tint: #eef2fb; min-height: 360px; border-radius: 22px; padding: 18px 16px; border: 1px solid #fff; box-shadow: var(--shadow);
  background: linear-gradient(180deg, var(--tint) 0%, rgba(255,255,255,.92) 26%, rgba(255,255,255,.96) 100%); }
.wk-0 { --tint: #e6edfb; } .wk-1 { --tint: #e5f3e7; } .wk-2 { --tint: #fdeee2; } .wk-3 { --tint: #efeafb; }
.wk-4 { --tint: #fde7eb; } .wk-5 { --tint: #e2f4ef; } .wk-6 { --tint: #f1f1ee; }
.wk-card.is-today { border: 2px solid #f3cfa6; box-shadow: 0 6px 22px rgba(243, 160, 90, .15); }
.wk-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,.04); margin-bottom: 4px; }
.wk-day { font-size: 18px; }
.wk-day:hover { text-decoration: underline; }
.wk-cnt { color: var(--ink-3); font-size: 15px; }
.wk-empty { color: var(--ink-3); padding: 12px 0; }
.todo.compact { padding: 10px 0; gap: 10px; border-bottom: 0; }
.todo.compact .t-text { font-size: 14px; }
.todo.compact .t-memo { font-size: 12px; }
.todo.compact .chk span { width: 20px; height: 20px; }
.todo.compact .chk input:checked + span::after { left: 7px; top: 3px; width: 5px; height: 10px; }

/* 밀린 업무 */
.od-group + .od-group { margin-top: 18px; }
.od-head { display: flex; align-items: center; gap: 12px; padding: 6px 4px 8px; }
.od-head b { font-size: 19px; }
.od-head .tag { font-size: 14px; padding: 3px 12px; border-radius: 999px; }

/* 진행현황 */
.big-num { font-size: 24px; font-weight: 800; margin: 4px 0; }
.bars.month { gap: 3px; }
.bars.month .bstack { max-width: 18px; }
.bars.month span { font-size: 10px; }
.bcol span.sun { color: #ef4444; }

/* 일정 라벨 */
.cat span { display: inline-flex; align-items: center; gap: 6px; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cat-x { border: 0; background: none; color: var(--ink-3); font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.cat-x:hover { color: var(--late); }
.cat-add { border: 1px dashed #cfc7e6; background: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--accent); }
.label-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; background: #faf8fe; border-radius: 14px; padding: 10px; margin-top: 4px; }
.label-form input { flex: 1; min-width: 140px; padding: 8px 12px; }
.swatches.small { margin: 0; gap: 5px; }
.swatches.small .swatch { width: 24px; height: 24px; border-width: 2px; }
.time-row { display: flex; gap: 6px; align-items: center; }
.time-row input { flex: 1; }

@media (max-width: 1180px) {
  .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-card { min-height: 220px; }
}
@media (max-width: 760px) {
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h2 { font-size: 24px; }
  .ph-right { align-self: stretch; }
  .head-nav { justify-content: flex-end; }
  .circle-btn { width: 40px; height: 40px; }
  .pill-btn { padding: 9px 16px; }
  .wk-grid { grid-template-columns: 1fr; }
  .wk-card { min-height: 0; }
  .add-box { flex-wrap: wrap; padding: 10px 12px; border-radius: 18px; }
  .add-fields { flex-basis: 100%; }
  .add-box .dark-btn { margin-left: auto; }
  .t-actions { flex-direction: column; align-items: flex-end; gap: 0; }
  .stat { padding: 8px 14px; font-size: 13px; }
}

/* 모바일 */
@media (max-width: 760px) {
  .wrap { padding: 18px 14px 50px; }
  .cheer { display: none; }
  .avatar { width: 44px; height: 44px; font-size: 17px; }
  .site { font-size: 22px; }
  .pill { padding: 7px 12px; font-size: 13px; }
  .grid2, .grid3, .memo-layout { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .cal-cell { min-height: 64px; padding: 4px; border-radius: 8px; }
  .cal-ev { font-size: 10px; padding: 1px 3px; }
  .cal-todo { font-size: 10px; }
  .ev-date { min-width: 70px; }
}

/* 라벨 색 직접 고르기 */
.swatch.custom { position: relative; overflow: hidden; cursor: pointer; background: conic-gradient(#fda4af, #fde047, #86efac, #67e8f9, #a5b4fc, #f9a8d4, #fda4af); }
.swatch.custom[data-c] { background: var(--c); }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }

/* ─── 배경 스킨: 테두리 색을 배경에 맞춤 ─── */
.card, .ring-card, .stat, .wk-card:not(.is-today), .circle-btn, .pill-btn, .person, .cheer { border-color: var(--edge-soft, #fff); }
.pill { border-color: var(--edge-soft, transparent); }
.avatar { border-color: var(--edge-soft, #fff); }
.add-box, .cal-cell { border-color: var(--edge-soft, var(--line)); }
.add-box:focus-within { border-color: var(--edge, var(--accent-2)); }
.cal-cell.today { border-color: var(--edge, var(--accent-2)); }

/* 스킨 고르기 */
.skins { display: flex; flex-wrap: wrap; gap: 14px 10px; margin-bottom: 18px; }
.skin { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; padding: 0; }
.skin-dot { display: block; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
  border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 8px rgba(80,60,120,.08); transition: transform .12s; }
.skin:hover .skin-dot { transform: scale(1.06); }
.skin.on .skin-dot { box-shadow: 0 0 0 2.5px var(--ink); }
.skin-name { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.skin.on .skin-name { color: var(--ink); font-weight: 700; }
.skin-dot.big { width: 64px; height: 64px; background: linear-gradient(135deg, var(--a), var(--b)); }
.skin-custom { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: rgba(255,255,255,.6); border-radius: 18px; padding: 14px 16px; }
.sk-color { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.sk-color input { width: 44px; height: 36px; padding: 2px; border-radius: 10px; cursor: pointer; }
.sk-color input:disabled { opacity: .35; cursor: default; }

.lbl.wide { max-width: none; }

/* 임시 비밀번호 안내 */
.pw-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; border-radius: 16px; padding: 13px 18px; font-size: 14px; margin: -10px 0 22px; }
.pw-banner b { margin-left: auto; }
.pw-banner:hover { background: #ffe4e6; }

/* 일정: 시작·종료 (날짜 + 시각) */
.when { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px 10px; align-items: center; margin-bottom: 10px; }
.when-l { font-size: 13px; color: var(--ink-2); padding-right: 4px; }
.when input { width: 100%; min-width: 0; }
.time-box { position: relative; display: block; }
.time-box input { padding-right: 30px; }
.time-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-3); font-size: 16px; line-height: 1; padding: 4px; border-radius: 6px; }
.time-x:hover { color: var(--ink); background: #f5f3f9; }

/* 필수 칸이 비었을 때 */
.invalid { border-color: #f43f5e !important; box-shadow: 0 0 0 3px rgba(244, 63, 94, .15) !important; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* 일정 추가 + 버튼 */
.plus-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #2f323a; color: #fff; font-size: 26px; font-weight: 300; line-height: 1; display: inline-grid; place-items: center; padding-bottom: 3px; box-shadow: 0 4px 12px rgba(47, 50, 58, .2); }
.plus-btn:hover { background: #1f2128; }
.modal .priv-toggle { display: flex; margin-top: 6px; }

/* 탭 처음 안내 (한 번만) */
.tip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,.8); border: 1px dashed var(--edge, #cfc7e6); border-radius: 14px; padding: 10px 12px 10px 16px; font-size: 14px; color: var(--ink-2); line-height: 1.55; animation: fade .3s; max-width: 760px; }
.tip span { flex: 1; min-width: 200px; }
.txt-btn.inline { padding: 2px 6px; font-size: 13px; color: var(--accent); }

/* 아이콘 버튼 (휴지통 · 고정) */
.icon-btn { width: 34px; height: 34px; border: 0; background: none; border-radius: 10px; display: inline-grid; place-items: center; color: var(--ink-3); font-size: 15px; padding: 0; }
.icon-btn:hover { background: #f5f3f9; color: var(--ink); }
.icon-btn.trash:hover { color: var(--late); background: #fff1f2; }
.icon-btn.pin { opacity: .35; filter: grayscale(1); }
.icon-btn.pin:hover { opacity: .8; }
.icon-btn.pin.on { opacity: 1; filter: none; }

/* 처음 로그인 안내 */
.welcome { position: relative; margin: -6px 0 22px; padding: 18px 22px; border: 1px solid var(--edge, #e9e2fb); background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(245,240,255,.9)); }
.welcome h3 { margin-bottom: 10px; }
.welcome ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.welcome-x { position: absolute; top: 10px; right: 10px; font-size: 20px; }

/* 팀 업무: 전체 팀원 / 팀원별 */
.main-tabs { margin-bottom: 14px; }
.main-tabs .tab { font-size: 15px; padding: 10px 18px; }
.seg { display: inline-flex; gap: 4px; background: rgba(255,255,255,.7); border: 1px solid var(--edge-soft, var(--line)); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.seg-btn { padding: 7px 16px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.seg-btn.on { background: #2f323a; color: #fff; font-weight: 700; }
.cell-bar { display: flex; flex-direction: column; gap: 5px; min-width: 120px; font-size: 13px; color: var(--ink-2); }

/* 팀 업무: 전체 · 일간/주간 */
.main-tabs .tab { display: inline-flex; align-items: center; gap: 6px; }
.main-tabs .tab .av.sm { margin: 0; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.tm-grid .card { margin: 0; }
.tm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tm-head .sub { font-size: 13px; }
.tm-cnt { margin-left: auto; color: var(--ink-3); font-size: 14px; }
.tm-week { margin-bottom: 26px; }
.tm-week .tm-head { margin-bottom: 10px; padding: 0 4px; }
.wk-grid.small .wk-card { min-height: 150px; padding: 14px 12px; }
.wk-grid.small .wk-day { font-size: 15px; }

/* 이번·오늘(파랑) · 지난(초록) · 다음(핑크) 표시 */
.badge.past { background: #e2f3e4; color: #2f6b3c; }
.badge.future { background: #fde4ec; color: #b23a64; }


/* 루틴 업무 */
.card-tools { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.rt-list li.on { background: #faf8fe; border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.rt-list li { align-items: center; }
.rt-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; padding: 2px; border: 1px solid transparent; border-radius: 12px; }
.rt-quick { margin-left: auto; display: inline-flex; }
.modal .when.single { grid-template-columns: auto 1fr; max-width: 260px; }
