/* Weekly Tracker — Figma 08 CALENDAR MOOD 기준 */
:root {
  --ink: #0b0c0e;
  --ink-2: #61636e;
  --mute: #9ea1ab;
  --line: #e5e7eb;
  --line-strong: #d4d6de;
  --surface: #f9f9fa;
  --now: #f53836;

  --blue: #2694f5;   --blue-bg: #def2ff;
  --pink: #ed639e;   --pink-bg: #ffe5f2;
  --purple: #7d6ee3; --purple-bg: #ebe8ff;
  --orange: #f5942e; --orange-bg: #fff0db;
  --green: #5eab59;  --green-bg: #e8f7e0;

  --gutter: 46px;
  --hour: 33px;
  --row-min: 33px;
  --fs-cell: 8.5px;
  --fs-day: 14px;
  --fs-dow: 8.5px;
  --fs-time: 7.5px;
  --radius-chip: 7px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-num: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Pretendard Variable", system-ui, sans-serif;
}

@media (min-width: 720px) {
  :root {
    --gutter: 104px;
    --hour: 40px;
    --row-min: 40px;
    --fs-cell: 12px;
    --fs-day: 18px;
    --fs-dow: 11px;
    --fs-time: 10px;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--font-num); font-size: 13px; font-weight: 700; }
.tabs { display: flex; gap: 4px; }
.tab { height: 38px; padding: 0 16px; border-radius: 13px; font-size: 13px; font-weight: 600; color: var(--mute); border: 1px solid transparent; }
.tab.is-on { color: var(--ink); background: #fff; border-color: var(--line-strong); }
.tab-count { font-size: 11px; color: var(--blue); margin-left: 2px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.sync { font-size: 11px; color: var(--mute); }
.sync.err { color: var(--now); }
.icon-btn { width: 32px; height: 32px; border-radius: 16px; font-size: 16px; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface); }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1280px; margin: 0 auto; padding-bottom: 96px; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 8px; }
  .layout.no-panel { grid-template-columns: minmax(0, 1fr); }
  .panel-toggle, .panel-close { display: none; }
}
.view { padding: 0 20px; min-width: 0; }

/* week head */
.week-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 22px 0 16px; flex-wrap: wrap; }
.week-meta { margin: 0 0 10px; font-family: var(--font-num); font-size: 10px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; white-space: pre; }
.week-range { margin: 0; font-family: var(--font-num); font-size: 29px; font-weight: 700; letter-spacing: -.01em; }
@media (min-width: 720px) { .week-range { font-size: 36px; } .week-meta { font-size: 12px; } }
.week-actions { display: flex; align-items: center; gap: 6px; }
.pill-btn { height: 34px; min-width: 34px; padding: 0 12px; border-radius: 17px; background: var(--surface); font-size: 13px; font-weight: 600; }
.pill-group { display: inline-flex; align-items: center; height: 38px; padding: 0 6px; border-radius: 19px; background: var(--surface); }
.pill-icon { width: 32px; height: 32px; font-size: 16px; }
.pill-icon.plus { font-size: 24px; line-height: 1; }

/* sheet grid */
.sheet { position: relative; --cols: 7; }
.grid-row { display: grid; grid-template-columns: var(--gutter) repeat(var(--cols), minmax(0, 1fr)); }
.days { padding-bottom: 10px; }
/* 날짜 아래 한 줄을 두껍게: 세로선은 이 줄 아래에서 시작 */
.allday { border-bottom: 1px solid var(--mute); margin-left: var(--gutter); grid-template-columns: repeat(var(--cols), minmax(0, 1fr)) !important; }
.allday > div:first-child { display: none; }
.allday .chips { grid-column: 1 / -1 !important; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: default; }
.day .dow { font-size: var(--fs-dow); font-weight: 500; color: var(--mute); }
.day .num { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 11px; font-family: var(--font-num); font-size: var(--fs-day); font-weight: 600; }
@media (min-width: 720px) { .day .num { width: 38px; height: 38px; border-radius: 13px; } }
.day.is-today .num { background: var(--ink); color: #fff; }
.day.is-weekend .dow { color: #c3c5cc; }

.allday { min-height: 0; padding: 0 0 6px; }
.allday:has(.chip) { padding-top: 2px; }
.allday .chips { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); row-gap: 4px; }
.chip { height: 18px; margin: 0 3px; padding: 0 6px; border-radius: var(--radius-chip); font-size: 7.5px; font-weight: 500; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 720px) { .chip { height: 22px; font-size: 11px; } }

/* time area */
.time-area { position: relative; display: grid; grid-template-columns: var(--gutter) repeat(var(--cols), minmax(0, 1fr)); }
.time-labels { position: relative; }
.time-label { position: absolute; right: 6px; transform: translateY(10px); font-family: var(--font-num); font-size: var(--fs-time); color: var(--mute); white-space: nowrap; }
.col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hour); }
.col:last-child { border-right: 1px solid var(--line); }
.col:hover { background-color: #fcfcfd; }
.event { position: absolute; left: 3px; right: 3px; overflow: hidden; cursor: pointer; }
/* 일정 블록: 위쪽 색 선 (좁은 7일 칸에서 글자 폭을 지키려고 왼쪽 막대 대신) */
.event { border-top: 2px solid currentColor; border-radius: 3px; padding: 4px 5px; }
.event .ev-title { font-size: var(--fs-cell); font-weight: 600; line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; }
.event .ev-sub { font-size: calc(var(--fs-cell) - 1px); opacity: .75; margin-top: 2px; font-family: var(--font-num); }
.event.is-gcal { cursor: default; }
.now-line { position: absolute; left: var(--gutter); right: 0; height: 1px; background: var(--now); z-index: 3; pointer-events: none; }
.now-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--now); top: -3px; transform: translateX(-3.5px); }
.time-collapsed { position: absolute; right: 6px; bottom: 6px; z-index: 4; font-size: 10px; color: var(--ink-2); background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; cursor: pointer; }

/* 시간 영역과 트랙은 같은 세로선으로 이어지고, 경계는 진한 선 하나 */
.boundary { display: none; }
.tracks { border-top: 1px solid var(--line-strong); }

/* tracks */
.track-row { display: grid; grid-template-columns: var(--gutter) repeat(var(--cols), minmax(0, 1fr)); min-height: var(--row-min); border-bottom: 1px solid var(--line); }
.track-row:first-child { border-top: 0; }
.track-head { display: flex; align-items: flex-start; gap: 8px; padding-top: 12px; min-width: 0; cursor: pointer; }
.track-icon { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-num); font-size: 8.5px; font-weight: 600; flex: none; }
@media (min-width: 720px) { .track-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; } .track-head { padding-left: 8px; } }
.track-name { display: none; }
@media (min-width: 720px) { .track-name { display: block; font-size: 12px; font-weight: 600; line-height: 1.3; padding-top: 7px; padding-right: 8px; min-width: 0; overflow-wrap: anywhere; word-break: keep-all; } .time-label { right: 10px; } }
.cell { position: relative; border-left: 1px solid var(--line); padding: 5px 4px 10px; min-width: 0; cursor: text; }
.cell:last-child { border-right: 1px solid var(--line); }
.cell:hover { background-color: #fcfcfd; }
.cell.is-today { background-color: #fbfbfc; }
.entry { display: flex; align-items: flex-start; gap: 4px; padding: 2px 1px; font-size: var(--fs-cell); font-weight: 500; line-height: 1.3; border-radius: 4px; cursor: pointer; }
.entry:hover { background: var(--surface); }
.entry .txt { min-width: 0; overflow-wrap: anywhere; word-break: keep-all; }
.entry.is-done .txt { color: var(--ink); }
.check { flex: none; width: 13px; height: 13px; border-radius: 4px; border: 1px solid var(--mute); background: #fff; display: grid; place-items: center; color: #fff; font-size: 9px; font-weight: 700; line-height: 1; margin-top: 0; }
@media (min-width: 720px) { .check { width: 16px; height: 16px; border-radius: 5px; font-size: 11px; } }
.check.on::after { content: "✓"; }
.tag { display: inline-block; font-size: calc(var(--fs-cell) - 1.5px); line-height: 1.5; color: var(--ink-2); background: var(--surface); border-radius: 4px; padding: 0 4px; white-space: nowrap; vertical-align: 1px; margin-right: 2px; }
.add-track { margin: 14px 0 0 var(--gutter); font-size: 12px; font-weight: 600; color: var(--mute); padding: 6px 10px; border-radius: 10px; }
.add-track:hover { background: var(--surface); color: var(--ink); }
.empty-tracks { grid-column: 1 / -1; padding: 22px 0 6px var(--gutter); font-size: 12px; color: var(--mute); }

/* side panel */
.panel { min-width: 0; }
.panel-inner { padding: 22px 20px 20px; }
@media (min-width: 1024px) {
  .panel { border-left: 1px solid var(--line); }
  .panel-inner { position: sticky; top: 52px; max-height: calc(100vh - 60px); overflow: auto; }
}
@media (max-width: 1023px) {
  .panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(11,12,14,.08); max-height: 75vh; overflow: auto; transform: translateY(105%); transition: transform .22s ease; }
  .panel.open { transform: translateY(0); }
}
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.panel-sub { margin: 22px 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.must-list { list-style: none; margin: 0; padding: 0; }
.must-list li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.must-list .when { margin-left: auto; font-size: 11px; color: var(--mute); white-space: nowrap; font-family: var(--font-num); }
.must-list .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.must-empty { font-size: 12px; color: var(--mute); padding: 6px 0; }
.memo { width: 100%; min-height: 120px; border: 0; border-radius: 12px; background: var(--surface); padding: 12px; font-size: 13px; resize: vertical; outline: none; }

/* lists (inbox / project) */
.list-head { padding: 22px 0 10px; }
.list-head h1 { margin: 0; font-family: var(--font-num); font-size: 29px; font-weight: 700; }
.help { margin: 6px 0 0; font-size: 12px; color: var(--mute); font-weight: 400; }
.list-sub { margin: 28px 0 6px; font-size: 14px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.list-sub .help { margin: 0; }
.quick-add input { width: 100%; height: 48px; border: 0; border-radius: 14px; background: var(--surface); padding: 0 16px; font-size: 15px; outline: none; }
.plain-list, .track-list { list-style: none; margin: 8px 0 0; padding: 0; }
.plain-list li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.plain-list .meta { margin-left: auto; font-size: 11px; color: var(--mute); }
.plain-list .src { font-size: 10px; color: var(--blue); background: var(--blue-bg); padding: 1px 6px; border-radius: 6px; }
.list-empty { padding: 14px 0; font-size: 13px; color: var(--mute); }
.track-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.track-list .track-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.track-list .t-name { font-size: 15px; font-weight: 600; }
.track-list .t-sub { font-size: 12px; color: var(--mute); margin-top: 3px; }
.track-list .t-sub.stale { color: var(--orange); }
.track-list .chev { margin-left: auto; color: var(--mute); }
.done-tracks { margin-top: 26px; }
.done-tracks summary { font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }

.detail-head { display: flex; align-items: center; gap: 12px; padding: 18px 0 8px; }
.detail-head .track-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
.detail-head h1 { margin: 0; font-size: 24px; }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.flow-week { margin-top: 22px; }
.flow-week h3 { margin: 0 0 6px; font-size: 12px; color: var(--ink-2); font-family: var(--font-num); font-weight: 600; }
.flow-day { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.flow-day .d { font-size: 12px; color: var(--mute); font-family: var(--font-num); padding-top: 2px; }
.flow-day .entry { font-size: 14px; }
.flow-day .check { width: 16px; height: 16px; border-radius: 5px; font-size: 11px; }

/* bottom bar (Figma nav) */
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(68px + env(safe-area-inset-bottom)); padding: 0 20px env(safe-area-inset-bottom); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.seg-nav { display: flex; gap: 4px; }
.seg { width: 70px; height: 34px; border-radius: 12px; font-size: 11px; font-weight: 600; color: var(--mute); border: 1px solid transparent; }
.seg.is-on { color: var(--ink); border-color: var(--line-strong); background: #fff; }
.fab { width: 48px; height: 48px; border-radius: 24px; background: var(--ink); color: #fff; font-size: 27px; line-height: 1; }

/* modal / popover */
.scrim { position: fixed; inset: 0; background: rgba(11,12,14,.18); z-index: 50; }
.modal { position: fixed; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 20px 60px rgba(11,12,14,.18); padding: 0 24px 22px; }
@media (max-width: 719px) { .modal { top: auto; bottom: 0; transform: translateX(-50%); border-radius: 22px 22px 0 0; width: 100vw; padding-bottom: calc(22px + env(safe-area-inset-bottom)); } }
.m-top { display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; height: 56px; border-bottom: 1px solid var(--line); margin: 0 -24px 14px; padding: 0 18px; }
.m-top h2 { margin: 0; text-align: center; font-size: 15px; font-weight: 700; }
.m-top .m-left { color: var(--ink-2); font-size: 14px; text-align: left; }
.m-top .m-right { color: var(--blue); font-weight: 700; font-size: 14px; text-align: right; }
.segctl { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-radius: 12px; padding: 3px; margin-bottom: 18px; }
.segctl button { height: 32px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.segctl button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(11,12,14,.08); }
.field-label { display: block; font-size: 11px; color: var(--ink-2); margin: 0 0 8px; }
.field-input { width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--surface); padding: 0 16px; font-size: 15px; outline: none; margin-bottom: 8px; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; border-bottom: 1px solid var(--line); font-size: 14px; }
.form-row label { color: var(--ink); }
.form-row input, .form-row select { border: 0; background: transparent; text-align: right; font-size: 14px; color: var(--ink-2); outline: none; max-width: 60%; }
.form-row input[type=color] { width: 36px; height: 28px; padding: 0; }
.field-area { width: 100%; min-height: 90px; border: 0; border-radius: 14px; background: var(--surface); padding: 12px 16px; font-size: 14px; outline: none; margin-top: 16px; resize: vertical; }
.danger { display: block; margin: 18px auto 0; color: var(--now); font-size: 13px; font-weight: 600; }
.btn { height: 44px; padding: 0 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn-row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.note { font-size: 12px; color: var(--mute); line-height: 1.5; margin: 8px 0 0; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; }
.swatch.is-on { border-color: var(--ink); }

.popover { position: absolute; z-index: 45; width: 240px; background: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(11,12,14,.16); padding: 10px; }
.popover input { width: 100%; height: 38px; border: 0; background: var(--surface); border-radius: 10px; padding: 0 10px; font-size: 13px; outline: none; }
.popover .segctl { margin: 0 0 8px; }
.popover .segctl button { height: 26px; font-size: 12px; }
.popover .hint { font-size: 10px; color: var(--mute); margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 70; background: var(--ink); color: #fff; font-size: 13px; padding: 10px 16px; border-radius: 12px; }

/* Project 보드: 트랙을 펼쳐서 한 번에 */
.cal-filter { display: flex; gap: 6px; margin: 4px 0 14px; flex-wrap: wrap; }
.cal-filter button { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.cal-filter button.is-on { background: var(--ink); color: #fff; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 10px; background: #fff; min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.card-head .track-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.card-head .t-name { font-size: 15px; font-weight: 700; }
.card-head .t-sub { font-size: 11px; color: var(--mute); margin-top: 2px; }
.card-head .t-sub.stale { color: var(--orange); }
.card-head .chev { margin-left: auto; color: var(--mute); font-size: 18px; }
.card-sec { margin-top: 12px; font-size: 10px; font-weight: 600; color: var(--mute); letter-spacing: .02em; }
.card ul { list-style: none; margin: 4px 0 0; padding: 0; }
.card li { display: flex; align-items: flex-start; gap: 7px; padding: 5px 0; font-size: 13px; cursor: pointer; border-radius: 6px; }
.card li:hover { background: var(--surface); }
.card li .when { margin-left: auto; font-size: 10px; color: var(--mute); white-space: nowrap; font-family: var(--font-num); padding-top: 2px; }
.card li .when.late { color: var(--now); }
.card li .check { width: 15px; height: 15px; border-radius: 5px; margin-top: 1px; }
.card .rec { color: var(--ink-2); }
.card .none { font-size: 12px; color: var(--mute); padding: 4px 0; cursor: default; }
.card input.card-add { width: 100%; height: 34px; border: 0; border-radius: 10px; background: var(--surface); padding: 0 10px; font-size: 12px; margin-top: 8px; outline: none; }

/* 루틴 트랙: 낮은 줄 + 칸마다 체크 하나 */
.track-row.is-routine { min-height: 28px; }
.track-row.is-routine .track-head { padding-top: 3px; align-items: center; }
.track-row.is-routine .track-icon { width: 22px; height: 22px; border-radius: 7px; }
@media (min-width: 720px) { .track-row.is-routine .track-name { padding-top: 0; } }
.track-row.is-routine .cell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; }
.check.routine { cursor: pointer; }
.check.routine:not(.on) { border-style: dashed; }
.pin { color: var(--orange); font-size: calc(var(--fs-cell) - 1px); flex: none; }

/* 이번 주 꼭 */
.must-list li.done span:not(.check):not(.when) { color: var(--mute); text-decoration: line-through; }
.must-list .unpin { margin-left: 6px; color: var(--orange); font-size: 13px; flex: none; }
.must-list .when { margin-left: auto; }
.must-input { width: 100%; height: 38px; border: 0; border-radius: 10px; background: var(--surface); padding: 0 12px; font-size: 13px; margin-top: 10px; outline: none; }

/* Archive */
.note-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.note-list li { border: 1px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; }
.note-list li:hover { background: #fcfcfd; }
.n-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.n-body { font-size: 12px; color: var(--ink-2); margin-top: 6px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.n-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--mute); margin-top: 10px; }
.n-meta a { color: var(--blue); text-decoration: none; }
.inbox-card { background: #fcfcfd; }
.card .src, .plain-list .src { font-size: 10px; color: var(--blue); background: var(--blue-bg); padding: 1px 6px; border-radius: 6px; }
.streak { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.streak .sd { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; color: var(--mute); background: var(--surface); }
.streak .sd.on { color: #fff; }
.streak b { margin-left: auto; font-size: 12px; font-family: var(--font-num); }

/* 태그 (아이젠하워 + 사용자 태그) */
.tag.eis { font-weight: 600; }
.tag-picker { padding: 14px 0; border-bottom: 1px solid var(--line); }
.tp-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tp { height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--ink-2); }
.tp.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tp.eis.is-on { font-weight: 700; }
.tp-input { width: 100%; height: 36px; border: 0; border-radius: 10px; background: var(--surface); padding: 0 12px; font-size: 13px; outline: none; }

/* 보기 전환(월/7일/3일/1일)은 캘린더 헤더에, 하단 바는 앱 메뉴(캘린더/프로젝트/아카이브) */
.head-nav { display: flex; background: var(--surface); border-radius: 13px; padding: 2px; margin-right: 4px; }
.head-nav .seg { width: 40px; height: 30px; border-radius: 11px; }
.head-nav .seg.is-on { border-color: transparent; box-shadow: 0 1px 3px rgba(11,12,14,.08); }
@media (min-width: 720px) { .head-nav .seg { width: 52px; } }
.bottombar .tabs { gap: 6px; }
}

/* 트랙 칸 정리: 칸 안쪽 여백 0, 항목 한 줄 = 시간 칸 높이, 항목 사이 구분선은 칸 폭 전체 */
.cell { padding: 0; display: flex; flex-direction: column; }
.entry { box-sizing: border-box; min-height: var(--row-min); margin: 0; padding: 0 6px; gap: 6px; align-items: center; border-radius: 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry .txt { padding: 4px 0; }
@media (max-width: 719px) { .entry { padding: 0 3px; gap: 3px; } }
.entry.is-record .txt { color: var(--ink-2); }
.bullet { flex: none; width: 5px; height: 5px; border-radius: 50%; background: #c3c5cc; margin: 0 4px 0 4px; }
@media (max-width: 719px) { .bullet { width: 4px; height: 4px; margin: 0 1px; } }
.track-head { padding-top: 0; align-items: center; height: var(--row-min); min-height: 0; }
.track-head .track-icon { width: 22px; height: 22px; border-radius: 7px; }
@media (min-width: 720px) { .track-head .track-icon { width: 24px; height: 24px; } .track-name { padding-top: 0 !important; } }
.track-row.is-routine .cell { padding: 0 6px; min-height: 28px; justify-content: center; }
.track-row.is-routine .track-head { height: 28px; }

.pill-btn { white-space: nowrap; }
.week-actions { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
@media (max-width: 719px) {
  .week-actions { justify-content: flex-start; }
  .entry { gap: 3px; }
}

/* 드래그 */
.event { touch-action: auto; }
.event .ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; cursor: ns-resize; }
@media (hover: hover) { .event { cursor: grab; } }
.event.dragging { opacity: .85; box-shadow: 0 6px 18px rgba(11,12,14,.15); z-index: 5; cursor: grabbing; }
.drag-ghost { position: fixed; z-index: 80; pointer-events: none; background: #fff; box-shadow: 0 6px 18px rgba(11,12,14,.18); border-radius: 6px; border: 0 !important; opacity: .95; }
.drag-src { opacity: .35; }
.cell.drop { background-color: var(--blue-bg) !important; }

/* 월 미리보기 */
.mini-month { margin-bottom: 22px; }
.mm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-family: var(--font-num); font-size: 13px; font-weight: 700; }
.mm-nav { width: 26px; height: 26px; border-radius: 13px; color: var(--ink-2); }
.mm-nav:hover { background: var(--surface); }
.mm-row { display: grid; grid-template-columns: repeat(7, 1fr); border-radius: 9px; }
.mm-row.is-cur { background: var(--surface); }
.mm-dow span { text-align: center; font-size: 10px; color: var(--mute); padding: 2px 0 4px; }
.mm-d { position: relative; height: 28px; font-family: var(--font-num); font-size: 12px; border-radius: 8px; }
.mm-d:hover { background: #eceef1; }
.mm-d.out { color: #c3c5cc; }
.mm-d.today { background: var(--ink); color: #fff; }
.mm-d.busy::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: var(--blue); transform: translateX(-50%); }
.mm-d.today.busy::after { background: #fff; }

/* 프로젝트: 보기 전환 + 캘린더 줄 */
.proj-bar { margin: 2px 0 10px; }
.view-seg { display: inline-grid; width: 220px; margin: 0; }
.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.filter-row .cal-filter { margin: 0; flex: 1; }
.cal-filter .cdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.cal-filter button.is-on .cdot { box-shadow: 0 0 0 1.5px #fff; }
.cal-filter .add-cal { background: transparent; border: 1px dashed var(--line-strong); color: var(--mute); }
.board.eisen { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.t-from { font-size: 10px; margin-left: 4px; }

/* 아카이브: 주간 메모 항목 */
.n-kind { font-size: 10px; font-weight: 600; color: var(--purple); margin-bottom: 4px; }
.memo-item { background: #fcfbff; }

/* 모바일 7일 칸(약 44px): 체크 위, 글자 아래로 쌓아 한 글자씩 끊기지 않게. 칸 안 태그는 숨김(편집창·패널에서 보임) */
@media (max-width: 719px) {
  #trackRows .entry:not(.is-record) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 4px 3px; }
  #trackRows .entry .txt { padding: 0; word-break: keep-all; }
  #trackRows .entry .tag { display: none; }
  #trackRows .entry .pin { position: absolute; right: 2px; }
  #trackRows .entry { position: relative; }
}

/* ---- 2026-11-16 정리 ---- */
/* 미니 달력: 오늘·날짜는 정사각형 */
.mm-d { height: 30px; border-radius: 0; background: none !important; display: grid; place-items: center; }
.mm-d > i, .mm-d { font-style: normal; }
.mm-d::before { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 8px; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: -1; }
.mm-d { z-index: 0; }
.mm-d:hover::before { background: #eceef1; }
.mm-d.today { color: #fff; }
.mm-d.today::before { background: var(--ink); }
.mm-d.busy::after { bottom: 1px; }

/* 트랙 칸: 위·왼쪽 정렬 */
.entry { align-items: flex-start; padding-top: 0; }
.entry .check { margin-top: calc((var(--row-min) - 1px - 13px) / 2); }
@media (min-width: 720px) { .entry .check { margin-top: calc((var(--row-min) - 1px - 16px) / 2); } }
.entry .txt { padding: calc((var(--row-min) - 1px - 1.3em) / 2) 0; }
.entry .bullet { margin-top: calc((var(--row-min) - 1px - 5px) / 2); }
.track-head { align-items: flex-start; padding-top: calc((var(--row-min) - 24px) / 2); height: auto; }
.track-row.is-routine .cell { justify-content: flex-start; align-items: center; flex-direction: row; }
.track-row.is-routine .track-head { padding-top: 3px; }
@media (max-width: 719px) {
  #trackRows .entry:not(.is-record) { justify-content: flex-start; padding-top: 6px; }
  #trackRows .entry .check { margin-top: 0; }
}

/* 접힌 시간 영역: 6시간 높이 창 안에서 스크롤 */
.time-area.collapsed { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* 1) Smooth tab: 미끄러지는 선택 표시 */
.has-slider { position: relative; isolation: isolate; }
.has-slider > .slider { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 12px; background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 1px 3px rgba(11,12,14,.06); transition: transform .32s cubic-bezier(.3,1.35,.5,1), width .32s cubic-bezier(.3,1.35,.5,1), opacity .2s; pointer-events: none; }
.segctl.has-slider > .slider, .head-nav.has-slider > .slider { border: 0; border-radius: 9px; }
.has-slider > .is-on { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
.has-slider > button { transition: color .2s; }

/* 2) 체크 팝 */
@keyframes check-pop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 65% { transform: scale(.92); } 100% { transform: scale(1); } }
.check.pop { animation: check-pop .38s cubic-bezier(.3,1.4,.5,1); }
.check.on::after { animation: tick-in .25s ease-out; }
@keyframes tick-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.entry.is-done .txt { transition: color .3s; }

/* 3) Morph popover: 편집창·빠른 추가·패널이 부드럽게 */
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.94); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes sheet-in { from { transform: translate(-50%, 30px); opacity: .4; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes pop-small { from { opacity: 0; transform: scale(.92) translateY(-4px); } to { opacity: 1; transform: none; } }
.modal:not(.hidden) { animation: pop-in .26s cubic-bezier(.3,1.3,.5,1); }
@media (max-width: 719px) { .modal:not(.hidden) { animation: sheet-in .28s cubic-bezier(.3,1.2,.5,1); } }
.popover:not(.hidden) { animation: pop-small .2s cubic-bezier(.3,1.4,.5,1); transform-origin: top left; }
.scrim:not(.hidden) { animation: fade-in .2s; }
@keyframes fade-in { from { opacity: 0; } }
.panel { transition: transform .3s cubic-bezier(.3,1.2,.5,1); }

/* 4) Undo 토스트 */
.toast { display: flex; align-items: center; gap: 12px; animation: toast-in .28s cubic-bezier(.3,1.4,.5,1); }
.toast.out { animation: toast-out .2s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 8px); } }
.undo-btn { display: inline-flex; align-items: center; gap: 4px; color: #8fc7ff; font-weight: 700; font-size: 13px; }
.undo-ico { display: inline-block; transition: transform .45s cubic-bezier(.3,1.3,.5,1); }
.undo-btn:hover .undo-ico { transform: rotate(-40deg); }
.undo-btn.spin .undo-ico { transform: rotate(-360deg); }
@media (min-width: 720px) { .toast { bottom: 96px; } }

/* 5) 저장 상태: 도는 원 → ✓ */
.sync { display: inline-flex; align-items: center; gap: 5px; transition: opacity .4s; }
.sync.idle { opacity: .55; }
.sync .sp { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #d4d6de; border-top-color: var(--ink-2); animation: spin .7s linear infinite; }
.sync .ok { color: var(--green); font-weight: 700; animation: check-pop .4s cubic-bezier(.3,1.4,.5,1); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 중요도별: 아이젠하워 2×2 매트릭스 */
.board.eisen { display: block; }
.matrix { display: grid; grid-template-columns: 22px 1fr 1fr; grid-template-rows: auto 1fr 1fr; gap: 10px; }
.mx-corner { }
.mx-axis { font-size: 11px; font-weight: 700; color: var(--ink-2); text-align: center; padding: 2px 0; }
.mx-side { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; justify-self: center; }
.quad { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; min-height: 220px; display: flex; flex-direction: column; border-top: 3px solid var(--q-fg); }
.quad-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.quad-name { font-size: 15px; font-weight: 700; color: var(--q-fg); }
.quad-name .pen { font-size: 11px; opacity: 0; transition: opacity .2s; }
.quad-name:hover .pen { opacity: .7; }
.quad-hint { font-size: 11px; color: var(--mute); }
.quad ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.quad li { display: flex; align-items: flex-start; gap: 7px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.quad li:last-child { border-bottom: 0; }
.quad li .when { margin-left: auto; font-size: 10px; color: var(--mute); white-space: nowrap; font-family: var(--font-num); padding-top: 2px; }
.quad li .when.late { color: var(--now); }
.quad li .check { width: 15px; height: 15px; border-radius: 5px; margin-top: 1px; }
.quad .none { color: var(--mute); font-size: 12px; cursor: default; }
@media (max-width: 719px) {
  .matrix { grid-template-columns: 18px 1fr 1fr; gap: 6px; }
  .quad { padding: 10px; min-height: 160px; border-radius: 14px; }
  .quad li { font-size: 12px; }
  .quad .card-add { font-size: 11px; }
  .quad li .when { display: none; }
}
.quad input.card-add { width: 100%; height: 34px; border: 0; border-radius: 10px; background: var(--surface); padding: 0 10px; font-size: 12px; margin-top: 8px; outline: none; }
.matrix { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr); }
.quad { min-width: 0; }
.quad li > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.mx-side { transform: none; text-orientation: upright; letter-spacing: 2px; }
@media (max-width: 719px) {
  .matrix { grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1fr); }
  .quad-hint { display: none; }
  #trackRows .entry.is-record { padding-top: 6px; }
  #trackRows .entry.is-record .bullet { margin-top: 5px; }
}

/* ===== 트랙 칸 최종 규칙 (2026-11-16, 이 블록이 위의 트랙 규칙보다 우선) =====
   줄노트처럼: 한 항목 = 한 줄(--line-h), 가로줄은 모든 칸에 같은 간격으로 이어진다.
   웹은 한 줄 말줄임(전체 내용은 마우스 올리면), 모바일은 두 줄 높이에 체크 위·글자 아래. */
:root { --line-h: 33px; }
@media (min-width: 720px) { :root { --line-h: 40px; } }
@media (max-width: 719px) { :root { --line-h: 52px; } }

#trackRows .track-row { min-height: var(--line-h); align-items: stretch; }
#trackRows .track-head { height: var(--line-h); padding: 0 0 0 0; align-items: center; gap: 8px; }
@media (min-width: 720px) { #trackRows .track-head { padding-left: 8px; } }
#trackRows .track-name { padding: 0 !important; line-height: 1.2; font-size: 12px; }
#trackRows .cell {
  padding: 0; display: block; min-height: var(--line-h);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line-h) - 1px), var(--line) calc(var(--line-h) - 1px), var(--line) var(--line-h));
  background-position: 0 0;
}
#trackRows .track-row > .cell:last-child { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line-h) - 1px), var(--line) calc(var(--line-h) - 1px), var(--line) var(--line-h)); }
/* 행 마지막 줄은 행 경계선이 대신하므로 셀 배경 줄은 행 높이에 맞춰 잘린다 */
#trackRows .entry {
  display: flex; align-items: center; gap: 6px; height: var(--line-h); min-height: 0;
  padding: 0 8px; margin: 0; border: 0; border-radius: 0; flex-direction: row;
}
#trackRows .entry .txt { padding: 0; min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#trackRows .entry .check, #trackRows .entry .bullet { margin: 0; }
#trackRows .entry .bullet { margin: 0 4px 0 4px; }
#trackRows .entry:hover { background: rgba(11,12,14,.03); }
@media (max-width: 719px) {
  #trackRows .entry { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 0 3px; }
  #trackRows .entry.is-record { flex-direction: row; align-items: center; gap: 2px; }
  #trackRows .entry .txt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; flex: none; width: 100%; }
  #trackRows .entry.is-record .txt { width: auto; flex: 1; }
  #trackRows .entry .bullet { margin: 0 1px 0 0; }
}
/* 루틴 줄은 얇게 */
#trackRows .track-row.is-routine { min-height: 30px; }
#trackRows .track-row.is-routine .track-head { height: 30px; }
#trackRows .track-row.is-routine .cell { min-height: 30px; display: flex; align-items: center; padding: 0 8px; background-image: none; }
@media (max-width: 719px) { #trackRows .track-row.is-routine .cell { padding: 0 3px; } }

/* 체크 팝은 방금 누른 체크만 (다른 체크가 다시 그려질 때 깜박이지 않게) */
.check.on::after { animation: none; }
.check.pop.on::after { animation: tick-in .25s ease-out; }

/* 접힌 시간 영역: 스크롤바 숨김 (세로선 위치가 트랙과 어긋나지 않게) */
.time-area.collapsed { scrollbar-width: none; }
.time-area.collapsed::-webkit-scrollbar { display: none; }

/* 미니 달력: 점까지 들어가는 정사각형 */
.mm-d { height: 34px; }
.mm-d::before { width: 30px; height: 30px; }
.mm-d.busy::after { bottom: 5px; }
.mm-d { padding-bottom: 3px; }

/* 색 바가 위에 붙는 요소(일정 블록, 매트릭스 칸): 모서리는 모두 둥글게, 진한 바는 둥근 모서리 안쪽에서 짧고 곧게 */
.event { border-radius: 6px !important; border-top: 0 !important; }
.event::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: currentColor; }
.quad { border-radius: 18px !important; border-top: 1px solid var(--line) !important; position: relative; }
.quad::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: var(--q-fg); border-radius: 18px 18px 0 0; }
@media (max-width: 719px) { .quad { border-radius: 14px !important; } .quad::before { left: 14px; right: 14px; } .event { border-radius: 4px !important; } .event::before { left: 4px; right: 4px; } }
#trackRows .track-row { border-bottom: 0; }
#trackRows .track-row.is-routine .cell { border-bottom: 1px solid var(--line); }
.quad.drop { background: var(--q-bg); }
.quad li { user-select: none; }
#trackRows .entry .tag { flex: none; margin: 0; }
#trackRows .entry .txt { flex: 0 1 auto; }
#trackRows .entry .txt { flex: 1 1 auto; min-width: 3em; }
#trackRows .entry .tags { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; display: flex; gap: 3px; }
@media (max-width: 719px) { #trackRows .entry .tags { display: none; } }

/* 트랙: 루틴 체크도 한 줄을 차지 (다른 항목과 섞이지 않게) */
#trackRows .track-row.is-routine .cell { display: block; padding: 0; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, var(--line) 29px, var(--line) 30px); border-bottom: 0; }
#trackRows .routine-line { height: 30px; display: flex; align-items: center; padding: 0 8px; }
@media (max-width: 719px) { #trackRows .routine-line { padding: 0 3px; } }
#trackRows .track-row.is-routine .entry { height: var(--line-h); }
#trackRows .event { overflow: hidden; }
/* 일정 블록: 시간선·세로선에서 살짝 띄워서 */
.event { left: 4px !important; right: 4px !important; }
.event::before { border-radius: 6px 6px 0 0; }

/* ── 종일·여러 날 일정 막대 ── */
.allday { position: relative; }
.allday .allday-label { display: none; }
@media (min-width: 720px) {
  .allday { margin-left: 0 !important; grid-template-columns: var(--gutter) repeat(var(--cols), minmax(0, 1fr)) !important; }
  .allday > .allday-label { display: flex !important; align-items: flex-start; justify-content: flex-end; padding: 6px 8px 0 0; font-size: 10px; color: var(--sub, #9aa0a6); }
  .allday .chips { grid-column: 2 / -1 !important; }
}
.allday .chips { grid-auto-rows: auto; row-gap: 3px; padding: 4px 0 2px; }
.allday:not(:has(.span-bar)) .chips { padding: 0; }
.span-bar { position: relative; height: 20px; margin: 0 4px; padding: 0 7px; border-radius: 6px; font-size: 9px; font-weight: 600; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; cursor: pointer; min-width: 0; }
.span-bar .bar-title { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.span-bar .bar-time { font-weight: 500; opacity: .75; flex: none; }
.span-bar .bar-cont { flex: none; opacity: .6; font-weight: 500; }
.span-bar.cont-l { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 4px; }
.span-bar.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 4px; justify-content: flex-start; }
.span-bar.cont-r .bar-cont { margin-left: auto; }
.span-bar:hover { filter: brightness(.97); }
@media (min-width: 720px) { .span-bar { height: 24px; font-size: 12px; padding: 0 9px; } }
@media (max-width: 719px) { .span-bar .bar-time { display: none; } .span-bar { margin: 0 2px; padding: 0 4px; } }

/* 편집기: 종일 스위치, 날짜+시간 한 줄 */
.form-row.dt-row input[type="date"] { flex: 1.3; min-width: 0; }
.form-row.dt-row input[type="time"] { flex: 1; min-width: 0; }
#edForm.is-allday .dt-row input[type="time"] { display: none; }
.switch { position: relative; display: inline-block; width: 36px; height: 22px; margin-left: auto; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line, #e5e7eb); border-radius: 22px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + span { background: var(--ink, #111); }
.switch input:checked + span::after { transform: translateX(14px); }
.form-row.dt-row { justify-content: flex-end; gap: 8px; }
.form-row.dt-row > label { margin-right: auto; }
.form-row.dt-row input { max-width: none; flex: none !important; }

/* ===== 트랙 v3 (2026-11-16) — 이 블록이 위 트랙 규칙을 모두 덮는다 =====
   모든 줄(루틴 포함)이 같은 높이 --line-h. 가로줄은 칸 배경으로만 그어서 모든 칸에서 이어진다.
   체크와 글머리표는 같은 크기 상자에 넣어 글자 시작점이 맞는다. */
:root { --line-h: 48px; --mark: 13px; }
@media (min-width: 720px) { :root { --line-h: 36px; --mark: 16px; } }
#trackRows .track-row, #trackRows .track-row.is-routine { min-height: var(--line-h); border: 0; align-items: stretch; }
#trackRows .track-row .cell, #trackRows .track-row.is-routine .cell {
  display: block; padding: 0; min-height: var(--line-h); border-bottom: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line-h) - 1px), var(--line) calc(var(--line-h) - 1px), var(--line) var(--line-h));
}
#trackRows .track-head, #trackRows .track-row.is-routine .track-head {
  height: var(--line-h); padding: 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0;
  box-shadow: inset 0 -1px 0 var(--line);
}
#trackRows .track-icon { width: 22px; height: 22px; border-radius: 7px; font-size: 9px; }
@media (min-width: 720px) {
  #trackRows .track-head { justify-content: flex-start; padding: 0 10px 0 8px; }
  #trackRows .track-icon { width: 24px; height: 24px; font-size: 11px; }
  #trackRows .track-name { display: block; padding: 0 !important; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* 한 줄 */
#trackRows .entry, #trackRows .routine-line, #trackRows .track-row.is-routine .entry {
  height: var(--line-h); margin: 0; border: 0; border-radius: 0; min-height: 0;
  display: flex; flex-direction: row; align-items: center; gap: 7px; padding: 0 10px;
}
#trackRows .entry:hover { background: rgba(11,12,14,.03); }
#trackRows .entry .check, #trackRows .routine-line .check { width: var(--mark); height: var(--mark); margin: 0; flex: none; }
#trackRows .entry .bullet { width: var(--mark); height: var(--mark); margin: 0; flex: none; background: none; border-radius: 0; position: relative; }
#trackRows .entry .bullet::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #c3c5cc; }
#trackRows .entry .txt { flex: 1 1 auto; min-width: 0; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
#trackRows .entry.is-record .txt { color: var(--ink-2); }
#trackRows .entry .tags { flex: 0 3 auto; min-width: 0; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10.5px; color: var(--mute); }
#trackRows .entry .pdot { flex: none; width: 6px; height: 6px; border-radius: 50%; }
/* 모바일: 표시(체크·점) 위, 글자 두 줄 아래 — 할 일·기록 같은 모양 */
@media (max-width: 719px) {
  #trackRows .entry, #trackRows .track-row.is-routine .entry { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px; padding: 6px 3px 0; position: relative; }
  #trackRows .entry .bullet { height: var(--mark); width: 7px; }
  #trackRows .entry .bullet::after { width: 4px; height: 4px; margin: -2px 0 0 -2px; left: 2px; }
  #trackRows .entry .txt { flex: none; width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 12px; font-size: 9.5px; word-break: break-all; }
  #trackRows .entry .tags { display: none; }
  #trackRows .entry .pdot { position: absolute; top: 9px; right: 4px; width: 5px; height: 5px; }
  #trackRows .routine-line { padding: 0 3px; justify-content: flex-start; }
}
@media (max-width: 719px) {
  #trackRows .entry.is-record { flex-direction: column; align-items: flex-start; gap: 3px; }
  #trackRows .entry.is-record .txt { width: 100%; flex: none; }
}
#trackRows .entry.is-record .bullet { margin: 0; }
@media (max-width: 719px) { #trackRows .entry .txt { word-break: keep-all; overflow-wrap: anywhere; } }

/* ===== 2026-11-16 (4) ===== */
/* 오늘 열: 시간표도 트랙처럼 연한 회색 */
#timeArea .col.is-today { background-color: #fbfbfc; }
/* 여러 날 일정 조각: 이어지는 쪽은 모서리 각지게, 위 색 선은 첫날만 */
.event.is-multi.cont-top { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.event.is-multi.cont-top::before { display: none; }
.event.is-multi.cont-bottom { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.event.is-multi { cursor: pointer; }

/* 트랙 머리: 위·왼쪽 정렬, 트랙 사이 경계선은 진하게 */
#trackRows .track-row { position: relative; }
#trackRows .track-row + .track-row::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: #d5d8de; z-index: 1; pointer-events: none; }
#trackRows .track-head, #trackRows .track-row.is-routine .track-head {
  height: auto; align-self: stretch; align-items: flex-start; justify-content: flex-start; box-shadow: none;
  padding: calc((var(--line-h) - 24px) / 2) 0 0 6px;
}
@media (max-width: 719px) { #trackRows .track-head, #trackRows .track-row.is-routine .track-head { padding: 6px 0 0 4px; } }
@media (min-width: 720px) { #trackRows .track-head, #trackRows .track-row.is-routine .track-head { padding-left: 8px; padding-right: 10px; } #trackRows .track-name { align-self: center; } #trackRows .track-head { align-items: flex-start; } #trackRows .track-head .track-name { height: 24px; line-height: 24px; align-self: flex-start; } }
#trackRows .track-icon { font-size: 13px; }
@media (min-width: 720px) { #trackRows .track-icon { font-size: 14px; } }

/* 할 일·기록 보기 창 */
.ev-view { padding: 4px 2px 6px; }
.ev-main { display: flex; gap: 10px; align-items: flex-start; }
.ev-main .check { width: 20px; height: 20px; border-radius: 6px; margin-top: 2px; cursor: pointer; font-size: 13px; }
.ev-main .bullet { width: 20px; height: 20px; flex: none; position: relative; background: none; margin: 2px 0 0; }
.ev-main .bullet::after { content: ""; position: absolute; left: 7px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: #c3c5cc; }
.ev-text { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.ev-text.is-done { color: var(--mute); text-decoration: line-through; }
.ev-meta { display: grid; grid-template-columns: 56px 1fr; gap: 10px 8px; margin: 18px 0 0; font-size: 13px; }
.ev-meta dt { color: var(--mute); }
.ev-meta dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-meta .pdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.track-icon.sm { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; }
.ev-note { margin-top: 16px; padding: 12px 14px; background: var(--surface); border-radius: 12px; font-size: 13px; line-height: 1.6; white-space: normal; }

/* 트랙 아이콘 고르기 */
.icon-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 4px 0 10px; }
.icon-pick button { height: 34px; border-radius: 9px; background: var(--surface); font-size: 17px; }
.icon-pick button:hover { background: #ececf0; }

/* 프로젝트 루틴 요일: 눌러서 체크 */
.streak .sd { cursor: pointer; border: 0; font-family: inherit; transition: transform .15s; }
.streak .sd:hover { transform: scale(1.08); }
.streak .sd:active { transform: scale(.94); }

/* 중요도별 매트릭스: 색 바를 카드 안쪽 위에 딱 붙이고, 옆 축 글자는 옆으로 눕혀서 */
.quad { overflow: hidden; border: 1px solid var(--line) !important; }
.quad::before { top: 0 !important; left: 0 !important; right: 0 !important; border-radius: 0 !important; height: 3px; }
.matrix .mx-side { writing-mode: vertical-rl; transform: rotate(180deg); text-orientation: mixed; letter-spacing: 0; white-space: nowrap; font-size: 11px; }
.matrix .mx-axis:not(.mx-side) { padding-bottom: 6px; }
@media (max-width: 719px) { .quad::before { left: 0 !important; right: 0 !important; } }

/* 헤더 아이콘 버튼 (접기·프라이버시) */
#expandBtn, #privacyBtn { display: inline-grid; place-items: center; }
#privacyBtn.is-on { background: var(--ink); color: #fff; }

/* 프라이버시 설정 */
.pv-list { margin-top: 6px; }
.pv-row { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.pv-row input { margin-left: auto; width: 18px; height: 18px; accent-color: var(--ink); }
.pv-row .cdot { width: 8px; height: 8px; border-radius: 50%; }

/* 아카이브 폴더 */
#noteFilter .folder { display: inline-flex; align-items: center; gap: 5px; }
#noteFilter .fd-ico { width: 13px; height: 10px; border-radius: 2px; background: currentColor; opacity: .35; position: relative; display: inline-block; }
#noteFilter .fd-ico::before { content: ""; position: absolute; left: 0; top: -2px; width: 6px; height: 3px; border-radius: 2px 2px 0 0; background: currentColor; }
#noteFilter .cnt { font-size: 10px; opacity: .55; font-family: var(--font-num); }
#noteFilter .tagchip { color: var(--ink-2); }
.n-folder { font-size: 11px; color: var(--ink-2); background: var(--surface); border-radius: 6px; padding: 1px 6px; }

/* ===== 일기 ===== */
.diary-head .segctl { margin-right: 4px; }
.diary-spread { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 8px; }
@media (min-width: 720px) { .diary-spread { grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 12px 32px -18px rgba(0,0,0,.12); overflow: hidden; } }
.dpage { position: relative; padding: 4px 0 12px 0; }
@media (min-width: 720px) {
  .dpage { padding: 28px 36px 32px 64px; }
  .dpage.right { padding-left: 64px; border-left: 1px solid var(--line); box-shadow: inset 14px 0 18px -16px rgba(0,0,0,.12); }
  .dpage.left { box-shadow: inset -14px 0 18px -16px rgba(0,0,0,.10); }
}
.dp-side { display: none; }
@media (min-width: 720px) { .dp-side { display: block; position: absolute; left: 22px; top: 50%; transform: translateY(-50%) rotate(-90deg); transform-origin: center; font-size: 13px; font-style: italic; color: #b7bac2; letter-spacing: .02em; white-space: nowrap; width: 0; display: flex; justify-content: center; } }
.dp-top { display: flex; align-items: center; gap: 10px; height: 44px; border-top: 1px solid var(--ink-2); border-bottom: 1px solid var(--ink-2); padding: 0 8px; }
.ring { width: 11px; height: 11px; border-radius: 50%; border: 1.3px solid #8b8f99; flex: none; background: #fff; }
.dp-title { flex: 1; border: 0; outline: none; font: inherit; font-size: 13px; font-weight: 600; background: transparent; min-width: 0; }
.dp-row { display: grid; grid-template-columns: 64px 1fr; border-bottom: 1px solid var(--ink-2); min-height: 92px; }
.dp-date { display: flex; flex-direction: column; align-items: center; padding-top: 10px; border-right: 1px solid var(--ink-2); }
.dpage.left .dp-date { border-right: 3px double var(--ink-2); }
.dp-date b { font-family: var(--font-num); font-size: 17px; font-weight: 500; line-height: 1.1; }
.dp-date span { font-size: 10px; color: var(--mute); margin-top: 2px; }
.dp-row.is-today .dp-date b { background: var(--ink); color: #fff; border-radius: 7px; padding: 2px 5px; }
.dp-text { border: 0; outline: none; resize: none; font: inherit; font-size: 13px; line-height: 22px; padding: 10px 12px; background: transparent; min-height: 90px;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #f2f3f5 31px, #f2f3f5 32px); background-position: 0 0; }
.dp-text:focus { background-color: #fcfcfd; }
@media (max-width: 719px) { .dp-row { grid-template-columns: 52px 1fr; min-height: 84px; } .dp-text { font-size: 14px; } }

.daily { max-width: 640px; margin: 8px auto 0; }
@media (min-width: 720px) { .daily { border: 1px solid var(--line); border-radius: 18px; padding: 24px 40px 32px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 12px 32px -18px rgba(0,0,0,.12); } }
.dl-top { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 8px; flex-wrap: wrap; }
.ring.mood { width: 26px; height: 26px; display: grid; place-items: center; font-size: 15px; cursor: pointer; }
.ring.mood.has { border-color: transparent; background: var(--surface); }
.dl-allday { font-size: 12px; font-weight: 600; background: var(--blue-bg); color: var(--blue); border-radius: 6px; padding: 3px 8px; }
.dl-import { margin-left: auto; font-size: 12px; }
.dl-import:disabled { opacity: .4; cursor: default; }
.dl-line { position: relative; display: grid; grid-template-columns: 34px 1fr; align-items: end; height: 40px; }
.dl-h { font-family: var(--font-num); font-size: 11px; color: var(--mute); text-align: right; padding-right: 10px; transform: translateY(6px); }
.dl-in { height: 32px; border: 0; border-bottom: 1px solid #9ea2ab; outline: none; font: inherit; font-size: 14px; padding: 0 4px; background: transparent; border-radius: 0; min-width: 0; }
.dl-in:focus { border-bottom-color: var(--ink); background: #fcfcfd; }
.dl-evs { position: absolute; right: 0; bottom: 8px; display: flex; gap: 4px; pointer-events: none; max-width: 55%; overflow: hidden; }
.dl-ev { font-size: 10.5px; color: var(--blue); background: var(--blue-bg); border-radius: 5px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
/* 하단 메뉴 4개: 모바일에서 줄바꿈 없이 */
.tab { white-space: nowrap; }
@media (max-width: 719px) {
  .bottombar .tabs { gap: 2px; flex: 1; min-width: 0; }
  .bottombar .tab { padding: 0 10px; font-size: 13px; }
  .bottombar .tab .tab-count { margin-left: 1px; }
}
@media (max-width: 380px) { .bottombar .tab { padding: 0 8px; font-size: 12px; } }
.dp-text { line-height: 32px; padding: 0 12px; background-position: 0 0; min-height: 96px; }
.dp-row { min-height: 97px; }
@media (max-width: 719px) {
  .diary-head .week-actions { flex-wrap: nowrap; gap: 6px; }
  .diary-head .segctl button { padding: 0 12px; }
  .dp-row { min-height: 97px; }
}
@media (max-width: 719px) { .diary-head .segctl { width: auto; flex: none; } .diary-head .segctl button { flex: none; } }
/* 옆 축: 세로쓰기 대신 가로 글자 (칸 위쪽에 맞춤) */
.matrix { grid-template-columns: 52px minmax(0,1fr) minmax(0,1fr) !important; }
.matrix .mx-side { writing-mode: horizontal-tb !important; transform: none !important; align-self: start !important; justify-self: start; padding-top: 18px; text-align: left; font-size: 11px; color: var(--ink-2); }
@media (max-width: 719px) { .matrix { grid-template-columns: 30px minmax(0,1fr) minmax(0,1fr) !important; } .matrix .mx-side { font-size: 10px; padding-top: 12px; white-space: normal; word-break: keep-all; } }

/* ===== 2026-11-16 (5) ===== */
/* 모바일 바텀시트: 딤(scrim)보다 위에 */
@media (max-width: 719px) { .panel { z-index: 55; } }

/* 중요도별: 위 색 바 대신 '중요' 줄(1·2번 칸)을 형광펜처럼 연하게 칠해서 구분 */
.quad::before { display: none !important; }
.quad { border: 1px solid var(--line) !important; background: #fff; }
.quad.q1, .quad.q2 { background: var(--q-bg); border-color: transparent !important; }
.quad.q1 input.card-add, .quad.q2 input.card-add { background: rgba(255,255,255,.7); }
.quad.q1 li, .quad.q2 li { border-bottom-color: rgba(11,12,14,.06); }
.quad.drop { box-shadow: inset 0 0 0 2px var(--q-fg); }

/* 일기: 펼침면 세로줄 양쪽 모두 2줄 */
.dpage .dp-date, .dpage.left .dp-date, .dpage.right .dp-date { border-right: 3px double var(--ink-2); }
@media (min-width: 720px) { .dpage, .dpage.right { padding-left: 40px; padding-right: 40px; } }

/* 데일리 펼침면 */
.daily-spread .daily-page { padding-top: 22px; }
@media (max-width: 719px) { .daily-spread .daily-page { padding-top: 4px; } }
.dl-top { border-bottom: 1px solid var(--ink-2); padding-bottom: 10px; margin-bottom: 4px; }
.dl-date { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-num); margin-right: 4px; }
.dl-date b { font-size: 20px; font-weight: 600; }
.dl-date i { font-style: normal; font-size: 18px; color: var(--mute); }
.dl-date span { font-size: 11px; color: var(--mute); margin-left: 2px; }
.dl-date.is-today b { color: var(--ink); }
.dl-date.is-today span { color: #fff; background: var(--ink); border-radius: 5px; padding: 1px 5px; }

/* 월 보기 */
.month-view { margin-top: 6px; }
.mv-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 11px; color: var(--mute); text-align: left; padding: 0 0 6px; border-bottom: 1px solid var(--mute); }
.mv-head span { padding-left: 8px; }
.mv-head .wkend, .mv-cell.wkend .mv-num { color: #b7bac2; }
.mv-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: calc(100vh - 260px); min-height: 520px; }
.mv-cell { position: relative; display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; padding: 6px 4px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; min-width: 0; overflow: hidden; cursor: pointer; font: inherit; }
.mv-cell:nth-child(7n) { border-right: 0; }
.mv-cell:hover { background: #fcfcfd; }
.mv-cell.today { background: #fbfbfc; }
.mv-cell.out { background: #fcfcfd; }
.mv-cell.out .mv-num, .mv-cell.out .mv-ev { opacity: .45; }
.mv-num { font-family: var(--font-num); font-size: 13px; font-weight: 600; padding: 0 4px 2px; }
.mv-cell.today .mv-num { align-self: flex-start; background: var(--ink); color: #fff; border-radius: 7px; padding: 1px 6px; }
.mv-ev { display: flex; align-items: center; gap: 4px; font-size: 11px; line-height: 18px; height: 18px; padding: 0 4px; border-radius: 5px; white-space: nowrap; overflow: hidden; min-width: 0; }
.mv-ev.is-bar { font-weight: 600; }
.mv-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.mv-t { font-family: var(--font-num); opacity: .7; flex: none; }
.mv-tt { overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--ink); }
.mv-ev.is-bar .mv-tt { color: inherit; }
.mv-more, .mv-task { font-size: 10.5px; color: var(--mute); padding: 0 4px; }
.mv-dots { display: none; }
@media (max-width: 719px) {
  .mv-grid { height: auto; min-height: 0; grid-auto-rows: 64px; }
  .mv-cell { padding: 5px 2px; align-items: center; }
  .mv-num { font-size: 12px; padding: 0 0 2px; }
  .mv-cell.today .mv-num { align-self: center; }
  .mv-ev, .mv-more, .mv-task { display: none; }
  .mv-dots { display: flex; gap: 3px; justify-content: center; }
  .mv-dots i { width: 5px; height: 5px; border-radius: 50%; }
}
/* 월 보기에선 시간표 접기 버튼 숨김 */
#view-week[data-span="month"] #expandBtn { display: none; }
/* 1일·3일 보기: 요일 헤더 눌러 1일로 */
#dayHeader .day[data-goday] { cursor: pointer; }
#view-week[data-span="1"] #dayHeader .day { cursor: default; }
.quad.q1, .quad.q2 { background: color-mix(in srgb, var(--q-bg) 45%, #fff); }

/* ===== 2026-11-16 (6) ===== */
/* 반응형: 화면이 넓어지면 같이 넓어짐 */
.layout { max-width: none; }
.view { padding: 0 clamp(16px, 2.6vw, 44px); }
@media (min-width: 1024px) { .layout { grid-template-columns: minmax(0, 1fr) clamp(280px, 22vw, 360px); } }

/* 바텀시트(1023px 이하): 딤보다 위 */
@media (max-width: 1023px) { .panel { z-index: 55 !important; } }

/* 트랙 칸 여백 줄이기 */
#trackRows .entry, #trackRows .routine-line, #trackRows .track-row.is-routine .entry { padding: 0 6px; gap: 5px; }
@media (max-width: 719px) { #trackRows .entry, #trackRows .track-row.is-routine .entry { padding: 6px 2px 0; gap: 3px; } #trackRows .routine-line { padding: 0 2px; } }

/* 접힌 시간표: 지금으로 이동 버튼 */
.sheet { position: relative; }
.now-jump { position: absolute; z-index: 6; height: 22px; padding: 0 7px 0 6px; border-radius: 11px; background: #fff; border: 1px solid var(--line-strong); font-size: 10.5px; font-weight: 600; color: var(--now); display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 2px 6px rgba(11,12,14,.08); }
.now-jump i { width: 6px; height: 6px; border-radius: 50%; background: var(--now); }
.now-jump:hover { background: #fff5f5; }

/* 프라이버시 켜짐: 검정 네모 대신 연한 강조 */
#privacyBtn.is-on { background: #fff1e6; color: #e8590c; box-shadow: inset 0 0 0 1px #ffd8b8; }

/* 중요도별: 칸 전체가 아니라 제목에만 형광펜처럼 얇게 */
.quad.q1, .quad.q2 { background: #fff !important; border: 1px solid var(--line) !important; }
.quad.q1 input.card-add, .quad.q2 input.card-add { background: var(--surface); }
.quad.q1 .quad-name, .quad.q2 .quad-name { background: linear-gradient(transparent 58%, var(--q-bg) 58%, var(--q-bg) 92%, transparent 92%); padding: 0 3px; margin-left: -3px; }

/* 아카이브: 입력창은 아래에 (하단 메뉴 위에 붙어 있음) */
.note-bottom { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); margin-top: 16px; z-index: 5; }
.note-bottom input { box-shadow: 0 6px 20px -8px rgba(11,12,14,.18); background: #fff; border: 1px solid var(--line-strong); }

/* 일기: 캘린더와 같은 선 (그리드 = --line, 머리 = --mute) */
.dp-top { border-top: 1px solid var(--mute); border-bottom: 1px solid var(--mute); }
.dp-row { border-bottom: 1px solid var(--line); }
.dpage .dp-date, .dpage.left .dp-date, .dpage.right .dp-date { border-right: 3px double var(--line-strong); }
.dp-text { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #f3f4f6 31px, #f3f4f6 32px); }
.dl-top { border-bottom: 0; padding-bottom: 6px; margin-bottom: 0; }
.dp-top.dl-title { margin-bottom: 6px; }
.dl-in { border-bottom: 1px solid var(--line); }
.dl-in:focus { border-bottom-color: var(--mute); }
.dl-h { color: var(--mute); }
.dl-import.is-on { background: var(--ink); color: #fff; }
/* 일정 불러오면: 줄 가운데를 나눠 왼쪽 일정, 오른쪽 내용 */
.dl-line.split { grid-template-columns: 34px minmax(0, 0.9fr) minmax(0, 1.1fr); }
.dl-evcol { display: flex; gap: 4px; align-items: center; height: 32px; border-bottom: 1px solid var(--line); border-right: 1px dashed var(--line-strong); padding-right: 6px; overflow: hidden; min-width: 0; }
.dl-ev { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; opacity: 1; }
.dl-ev b { font-family: var(--font-num); font-weight: 500; opacity: .75; }
.dl-line.split .dl-in { padding-left: 10px; }
.dl-alldays { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 0 2px 34px; }
.dl-evs { display: none; }

/* 1일 보기: 왼쪽 시간별 일정, 오른쪽 트랙 카드 (Figma 05 1 Day) */
.day-split, .day-left { display: contents; }
.day-col-head, .day-right { display: none; }
.sheet.is-day #dayHeader, .sheet.is-day .boundary, .sheet.is-day #trackRows { display: none; }
.sheet.is-day .day-split { display: grid; grid-template-columns: minmax(0, 1fr) clamp(130px, 32%, 360px); gap: 0; }
.sheet.is-day .day-left { display: block; position: relative; min-width: 0; padding-right: 14px; }
.sheet.is-day .day-right { display: block; border-left: 1px solid var(--line); padding-left: 12px; min-width: 0; }
.sheet.is-day .day-col-head { display: block; margin: 8px 0 8px; font-size: 11px; font-weight: 600; color: var(--mute); }
.sheet.is-day #allDayRow { margin-bottom: 4px; }
.dt-card { background: var(--surface); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.dt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dt-head .track-icon { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
.dt-head b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 5px 0; cursor: pointer; min-width: 0; }
.dt-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dt-row .check { width: 14px; height: 14px; flex: none; }
.dt-row .done { color: var(--mute); text-decoration: line-through; }
.dt-row .bullet { width: 14px; height: 14px; flex: none; position: relative; background: none; }
.dt-row .bullet::after { content: ""; position: absolute; left: 5px; top: 5px; width: 4px; height: 4px; border-radius: 50%; background: #c3c5cc; }
.dt-row.is-record span:last-child { color: var(--ink-2); }
.dt-add { margin-top: 4px; font-size: 11.5px; color: var(--mute); padding: 4px 0; }
.dt-add:hover { color: var(--ink); }
@media (max-width: 719px) { .dt-card { padding: 10px 9px; border-radius: 13px; } .dt-head .track-icon { width: 22px; height: 22px; } .dt-head b { font-size: 12px; } .dt-row { font-size: 11.5px; } .sheet.is-day .day-left { padding-right: 8px; } .sheet.is-day .day-right { padding-left: 8px; } }

/* 월 보기: 칸 = 일정 추가, 숫자 = 1일 보기 */
.mv-cell { cursor: copy; }
.mv-num { border: 0; background: none; cursor: pointer; align-self: flex-start; border-radius: 7px; font: inherit; font-family: var(--font-num); font-size: 13px; font-weight: 600; }
.mv-num:hover { background: var(--surface); }
@media (max-width: 719px) { .mv-num { align-self: center; } }

/* 월 보기 오른쪽: 루틴 모아보기 */
.rt-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rt-head .track-icon { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
.rt-head b { font-size: 13px; }
.rt-cnt { margin-left: auto; font-family: var(--font-num); font-size: 15px; font-weight: 700; }
.rt-cnt i { font-style: normal; font-size: 11px; color: var(--mute); font-weight: 500; }
.rt-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rt-d { aspect-ratio: 1; border: 0; border-radius: 7px; background: var(--surface); font-size: 10px; font-family: var(--font-num); color: var(--mute); cursor: pointer; }
.rt-d.on { color: #fff; font-weight: 600; }
.rt-d.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.rt-d.future { opacity: .45; }

/* 설정: 캘린더 목록 */
.cal-set { border-top: 1px solid var(--line); }
.cal-set-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14px; text-align: left; background: none; }
.cal-set-row .cdot { width: 9px; height: 9px; border-radius: 50%; }
.cal-set-row .cnt { margin-left: auto; font-size: 11px; color: var(--mute); }
.cal-set-row .chev { color: var(--mute); }
.cal-set-row.add { color: var(--ink-2); font-weight: 600; font-size: 13px; }
.rt-grid { grid-template-columns: repeat(7, 30px); justify-content: space-between; gap: 5px 0; }
.rt-d { width: 30px; height: 30px; aspect-ratio: auto; }
.quad.q1 .quad-name, .quad.q2 .quad-name { width: fit-content; flex: none; display: inline-block; padding: 0 4px; margin-left: -4px;
  background: linear-gradient(transparent 50%, color-mix(in srgb, var(--q-fg) 20%, transparent) 50%, color-mix(in srgb, var(--q-fg) 20%, transparent) 90%, transparent 90%); }
.quad.q1 .quad-name, .quad.q2 .quad-name { background: none !important; padding: 0; margin-left: 0; }
.quad.q1 .qn-t, .quad.q2 .qn-t { padding: 0 3px; margin-left: -3px; background: linear-gradient(transparent 55%, color-mix(in srgb, var(--q-fg) 22%, transparent) 55%, color-mix(in srgb, var(--q-fg) 22%, transparent) 88%, transparent 88%); }

/* ===== 2026-11-16 (7) ===== */
/* 그리드 오른쪽 끝 세로선 없음 (월 보기처럼 열린 끝) */
.col:last-child, .cell:last-child { border-right: 0 !important; }
/* 마지막 트랙 아래에도 경계선 (트랙 이름 칸까지) */
#trackRows .track-row:last-child::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: #d5d8de; z-index: 1; pointer-events: none; }
/* 1일 보기: 오늘 열 회색 없음 */
.sheet.is-day #timeArea .col.is-today { background-color: transparent; }
.dt-empty { font-size: 13px; color: var(--mute); padding: 20px 4px; line-height: 1.8; }

/* 월 보기 오늘: 정사각형 */
.mv-cell.today .mv-num { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; border-radius: 7px; }

/* 프라이버시 켜짐: 다른 헤더 버튼과 같은 결(흰 바탕 + 테두리) + 작은 점 */
#privacyBtn.is-on { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 3px rgba(11,12,14,.06); position: relative; }
#privacyBtn.is-on::after { content: ""; position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--now); }

/* 중요도별: 제목 글자 전체를 형광펜으로, 안내 문구 대신 개수만 */
.quad.q1 .qn-t, .quad.q2 .qn-t { padding: 1px 5px; margin-left: -5px; border-radius: 4px; background: color-mix(in srgb, var(--q-fg) 16%, transparent) !important; }
.quad-hint { font-family: var(--font-num); }
.quad li.done span:not(.check) { color: var(--mute); text-decoration: line-through; }

/* 프로젝트 옵션: 좌우 보기·완료 보기 */
.proj-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.board-opts { display: flex; align-items: center; gap: 10px; }
.board-opts .pill-icon { display: grid; place-items: center; border-radius: 10px; background: var(--surface); }
.board-opts .pill-icon.hidden { display: none; }
.done-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.done-toggle .switch { margin-left: 0; }
#projectBoard.row-layout { display: flex !important; overflow-x: auto; gap: 12px; padding-bottom: 12px; scroll-snap-type: x mandatory; grid-template-columns: none !important; }
#projectBoard.row-layout > .card { flex: 0 0 clamp(260px, 30vw, 340px); scroll-snap-align: start; }
@media (max-width: 719px) { #projectBoard.row-layout > .card { flex-basis: 82vw; } }

/* 트랙 흐름 화면 */
.detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow-wh { display: flex; align-items: baseline; gap: 8px; margin: 26px 0 8px; font-size: 13px; font-weight: 600; }
.flow-wh b { font-family: var(--font-num); }
.flow-wh span { color: var(--ink-2); font-weight: 500; }
.flow-wh i { font-style: normal; font-size: 11px; color: #fff; background: var(--ink); border-radius: 6px; padding: 1px 6px; }
.flow-day { display: grid !important; grid-template-columns: 64px 1fr; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.flow-day .d { display: flex; align-items: baseline; gap: 5px; height: 32px; align-items: center; font-size: 12px; color: var(--ink-2); }
.flow-day .d b { font-family: var(--font-num); font-weight: 600; color: var(--ink); }
.flow-items { min-width: 0; }
.flow-item { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px; border-radius: 8px; cursor: pointer; font-size: 14px; min-width: 0; }
.flow-item:hover { background: var(--surface); }
.flow-item .check { width: 16px; height: 16px; flex: none; margin: 0; }
.flow-item .bullet { width: 16px; height: 16px; flex: none; position: relative; background: none; margin: 0; }
.flow-item .bullet::after { content: ""; position: absolute; left: 6px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: #c3c5cc; }
.flow-item .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.flow-item .txt.done { color: var(--mute); text-decoration: line-through; }
.flow-item.is-record .txt { color: var(--ink-2); }
.flow-item .chip, .flow-item .tag { flex: none; align-self: center; vertical-align: middle; margin: 0; }
.fw-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--mute); }
.fw-cell { min-height: 96px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0 8px; cursor: copy; min-width: 0; }
.fw-cell:first-child { border-left: 0; }
.fw-cell.is-today { background: #fbfbfc; }
.fw-d { display: flex; align-items: baseline; gap: 4px; padding: 2px 8px 4px; font-size: 11px; color: var(--mute); }
.fw-d b { font-family: var(--font-num); font-size: 13px; color: var(--ink); }
.fw-cell .flow-item { font-size: 12.5px; padding: 0 6px; min-height: 30px; gap: 5px; }
.fw-cell .flow-item .chip, .fw-cell .flow-item .tag { display: none; }
@media (max-width: 719px) {
  .fw-cell { min-height: 72px; } .fw-d { padding: 2px 3px; flex-direction: column; gap: 0; }
  .fw-cell .flow-item { padding: 2px; font-size: 10px; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; margin-bottom: 4px; }
  .fw-cell .flow-item .txt { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
  .fw-cell .flow-item .check, .fw-cell .flow-item .bullet { width: 12px; height: 12px; }
}

/* ===== 일기: 캘린더와 같은 결 — 바깥 테두리·그림자 없이, 가운데 세로선만 ===== */
@media (min-width: 720px) {
  .diary-spread { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent; }
  .dpage, .dpage.right { padding: 8px 0 24px; }
  .dpage.left { padding-right: 28px; box-shadow: none; }
  .dpage.right { padding-left: 28px; border-left: 1px solid var(--line); box-shadow: none; }
}
.diary-book { position: relative; }
@media (min-width: 720px) { .diary-book { padding-right: 46px; } }
/* 책갈피 인덱스 클립: 펼침면 오른쪽에 쌓임 */
.index-tabs { position: absolute; right: 0; top: 52px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.ix-tab { width: 40px; height: 34px; border-radius: 0 9px 9px 0; font-family: var(--font-num); font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: inset 3px 0 0 rgba(255,255,255,.6); transition: transform .15s; }
.ix-tab:hover { transform: translateX(3px); }
.ix-tab.more { background: var(--surface); color: var(--ink-2); }
@media (max-width: 719px) { .index-tabs { display: none; } }
.bm-btn { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 7px; color: #d4d6de; flex: none; }
.bm-btn:hover { color: var(--ink-2); background: var(--surface); }
.bm-btn.on { color: #f08c00; }
.dp-date .bm-btn { margin-top: 6px; opacity: 0; }
.dp-row:hover .dp-date .bm-btn, .dp-date .bm-btn.on { opacity: 1; }
@media (hover: none) { .dp-date .bm-btn { opacity: 1; } }
.dp-row.is-marked .dp-date b { color: #f08c00; }
.dl-top .bm-btn { order: 0; }

/* 데일리: 시간 | 일정 | 내용 세 열. 내용은 한 덩어리 글상자(드래그로 여러 줄 복사) */
.dl-grid { --lh: 40px; display: grid; grid-template-columns: 34px minmax(0, 1fr); position: relative; }
.dl-grid.split { grid-template-columns: 34px minmax(0, .9fr) minmax(0, 1.1fr); }
.dl-hours span { display: flex; align-items: flex-end; justify-content: flex-end; height: var(--lh); padding: 0 10px 6px 0; font-family: var(--font-num); font-size: 11px; color: var(--mute); }
.dl-evcol2 { border-right: 1px dashed var(--line-strong); }
.dl-evline { height: var(--lh); display: flex; align-items: flex-end; gap: 4px; padding: 0 6px 5px 0; border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; user-select: text; }
.dl-evline .dl-ev { font-size: 11.5px; padding: 2px 7px; }
.dl-ta { display: block; width: 100%; height: calc(var(--lh) * var(--rows)); resize: none; border: 0; outline: none; font: inherit; font-size: 14px; color: var(--ink); background: transparent; overflow: hidden; padding: 0 6px; white-space: pre; overflow-wrap: normal;
  line-height: var(--lh);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--lh) - 1px), var(--line) calc(var(--lh) - 1px), var(--line) var(--lh)); }
.dl-grid.split .dl-ta { padding-left: 10px; }
.dl-ta:focus { background-color: #fcfcfd; }

/* 책갈피 모아보기 */
.marks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 8px; }
.mark-card { position: relative; display: flex; gap: 12px; padding: 14px 14px 14px 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; overflow: hidden; }
.mark-card:hover { border-color: var(--line-strong); }
.mk-clip { flex: none; width: 46px; display: grid; place-items: center; align-self: flex-start; height: 34px; border-radius: 0 9px 9px 0; font-family: var(--font-num); font-size: 12px; font-weight: 700; }
.mk-body { min-width: 0; flex: 1; }
.mk-date { font-size: 11px; color: var(--mute); font-family: var(--font-num); }
.mk-title { font-size: 15px; font-weight: 700; margin-top: 2px; }
.mk-text { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mk-hours { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); }
.mk-hours i { font-style: normal; font-family: var(--font-num); color: var(--mute); display: inline-block; width: 22px; }
.mark-card .bm-btn { position: absolute; top: 10px; right: 10px; }

/* ===== 2026-11-16 (8) ===== */
/* ‹ 오늘 › 한 덩어리 */
.nav-group { display: inline-flex; align-items: center; height: 34px; padding: 0 3px; border-radius: 17px; background: var(--surface); }
.nav-group button { height: 28px; min-width: 28px; padding: 0 8px; border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--ink); }
.nav-group button:hover { background: #fff; box-shadow: 0 1px 3px rgba(11,12,14,.06); }
.nav-group.hidden { display: none; }

/* 프라이버시 켜짐: 둥근 흰 버튼 (다른 선택된 버튼과 같은 모양) */
.pill-group .pill-icon { border-radius: 12px; }
#privacyBtn.is-on { border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line-strong), 0 1px 3px rgba(11,12,14,.06); }
#privacyBtn.is-on::after { top: 5px; right: 5px; }

/* 완료: 제목만 줄, 행은 살짝 흐리게. 미완료 → 완료 사이 구분선 */
.quad li.done span:not(.check) { text-decoration: none !important; color: inherit; }
.quad li.done, .card li.done { opacity: .55; }
.quad li.done .li-t, .card li.done .li-t { text-decoration: line-through; color: var(--mute); }
.quad li:not(.done) + li.done { border-top: 1px dashed var(--line-strong) !important; margin-top: 4px; padding-top: 8px; }

/* 아카이브 입력창: 화면 아래(하단 메뉴 바로 위)에 고정 */
#archPane { padding-bottom: 80px; }
.note-bottom { position: fixed !important; left: 0; right: 0; bottom: calc(80px + env(safe-area-inset-bottom)); margin: 0 auto; width: min(720px, calc(100% - 32px)); z-index: 25; }
@media (min-width: 1024px) { .layout.no-panel .note-bottom { width: min(720px, calc(100% - 64px)); } }

/* 일기: 테두리 있는 책 모양으로 되돌림 (웹), 앱은 테두리 없음 */
@media (min-width: 720px) {
  .diary-spread { border: 1px solid var(--line) !important; border-radius: 18px !important; background: #fff !important; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 12px 32px -18px rgba(0,0,0,.12) !important; overflow: hidden; }
  .diary-spread .dpage, .diary-spread .dpage.right, .diary-spread .daily-page, .diary-spread .daily-page.right { padding: 24px 32px 28px !important; }
  .diary-spread .dpage.right { border-left: 1px solid var(--line); box-shadow: inset 14px 0 18px -16px rgba(0,0,0,.10) !important; }
  .diary-spread .dpage.left { box-shadow: inset -14px 0 18px -16px rgba(0,0,0,.08) !important; }
  /* 캘린더도 같은 테두리 */
  #view-week .sheet, #view-week .month-view { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 14px 16px 10px 4px; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 12px 32px -18px rgba(0,0,0,.12); }
  #view-week .month-view { padding: 10px 12px 0; overflow: hidden; }
  #view-week .now-jump { margin-left: 4px; }
}
.diary-book { padding-right: 0; }
@media (min-width: 720px) { .diary-book { padding-right: 40px; } }

/* 책갈피 = 금속 인덱스 클립 (실버·골드·코퍼·로즈·샴페인), 가운데 창이 뚫린 모양 */
.index-tabs { right: 0; top: 64px; gap: 6px; }
.ix-tab { position: relative; width: 38px; height: 34px; border-radius: 0 8px 8px 0; display: grid; place-items: center; color: #3a3a3a; font-family: var(--font-num); font-size: 11px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.18); transform-origin: left center; }
.ix-tab span { position: relative; z-index: 1; margin-left: 6px; text-shadow: 0 1px 0 rgba(255,255,255,.55); }
.ix-tab::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 7px; border-radius: 0 3px 3px 0; background: rgba(0,0,0,.18); box-shadow: inset 1px 0 2px rgba(0,0,0,.25); }
.ix-tab:hover { transform: translateX(3px); }
.m-silver { background: linear-gradient(160deg, #f4f5f7 0%, #c9ccd2 38%, #eef0f2 55%, #b3b7be 100%); }
.m-gold { background: linear-gradient(160deg, #fbf0c8 0%, #d8b25a 40%, #f3dc95 58%, #b8913c 100%); }
.m-copper { background: linear-gradient(160deg, #f6d2b8 0%, #c8835a 40%, #edb995 58%, #a3613d 100%); }
.m-rose { background: linear-gradient(160deg, #f8e0dc 0%, #d39d95 40%, #f1c9c2 58%, #b47b73 100%); }
.m-champagne { background: linear-gradient(160deg, #f8efe0 0%, #d6c3a2 40%, #efe2c9 58%, #b9a37e 100%); }
.ix-tab.more { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 10px; }
.ix-tab.more::before { display: none; }
.ix-tab.more span { margin: 0; }
.mk-clip { width: 50px; height: 34px; color: #3a3a3a; font-size: 11px; }
.now-line { height: 0; border-top: 1.5px solid var(--now); background: none; }
.now-line .now-dot { top: -4.5px; }

/* ===== 2026-11-16 (9) ===== */
/* 설정 등 모달: 스크롤 막대 숨김 */
.modal { scrollbar-width: none; }
.modal::-webkit-scrollbar { display: none; }

/* 캘린더 테두리 없음 */
@media (min-width: 720px) {
  #view-week .sheet, #view-week .month-view { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; background: transparent !important; }
  #view-week .month-view { padding: 0 !important; }
}

/* 일기: 바깥 테두리 없이, 가운데만 책처럼 접힌 그림자 */
@media (min-width: 720px) {
  .diary-spread { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; overflow: visible; position: relative; }
  .diary-spread .dpage, .diary-spread .dpage.right, .diary-spread .daily-page, .diary-spread .daily-page.right { padding: 4px 36px 24px !important; }
  .diary-spread .dpage.left { padding-left: 0 !important; box-shadow: none !important; background: linear-gradient(to left, rgba(11,12,14,.055), rgba(11,12,14,0) 44px); }
  .diary-spread .dpage.right { padding-right: 0 !important; border-left: 0 !important; box-shadow: none !important; background: linear-gradient(to right, rgba(11,12,14,.07), rgba(11,12,14,0) 36px); }
  .diary-spread::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(to bottom, transparent, rgba(11,12,14,.12) 8%, rgba(11,12,14,.12) 92%, transparent); pointer-events: none; }
}

/* 책갈피: 한 가지 색, 은은한 무광 */
.ix-tab, .ix-tab.m-silver, .ix-tab.m-gold, .ix-tab.m-copper, .ix-tab.m-rose, .ix-tab.m-champagne {
  background: linear-gradient(180deg, #d9d6d0, #cdc9c2) !important; color: #55524c;
  box-shadow: 0 1px 1.5px rgba(0,0,0,.12) !important; }
.ix-tab span { text-shadow: none; }
.ix-tab::before { background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.ix-tab.more { background: var(--surface) !important; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line) !important; }

/* 상단 머리 통일: 작은 메타 + 큰 제목 + 오른쪽 버튼 (캘린더·프로젝트·일기·아카이브 공통) */
.week-head { min-height: 96px; align-items: flex-end; }
.week-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-actions .board-opts { gap: 8px; }
.week-actions .board-opts .pill-icon { width: 34px; height: 34px; border-radius: 17px; background: var(--surface); }
.week-actions .done-toggle { height: 34px; padding: 0 10px 0 12px; border-radius: 17px; background: var(--surface); }
.filter-row { margin-top: 0; }
#archPane .cal-filter { margin-bottom: 14px; }
.search-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--surface); color: var(--mute); }
.search-pill input { border: 0; outline: none; background: transparent; font: inherit; font-size: 13px; color: var(--ink); width: 140px; }
.search-pill.wide { flex: 1; min-width: 0; }
.search-pill.wide input { width: 100%; }
.pill-icon.is-on { background: #fff; box-shadow: 0 0 0 1px var(--line-strong); border-radius: 12px; }
#diarySearchBtn { display: grid; place-items: center; }
.diary-search { display: flex; gap: 8px; align-items: center; margin: -4px 0 14px; flex-wrap: wrap; }
.diary-search.hidden { display: none; }
.date-jump { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border-radius: 17px; background: var(--surface); font-size: 12px; color: var(--ink-2); }
.date-jump input { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); }
.search-hits { list-style: none; margin: 0; padding: 0; }
.search-hits li { display: grid; grid-template-columns: 90px 80px 1fr; gap: 10px; align-items: baseline; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.search-hits li:hover { background: var(--surface); }
.sh-date { font-family: var(--font-num); font-size: 12px; color: var(--ink-2); }
.sh-where { font-size: 11px; color: var(--mute); }
.sh-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sh-text mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 719px) { .search-hits li { grid-template-columns: 1fr; gap: 2px; } .search-pill input { width: 100px; } }

/* ===== 2026-11-16 (10) ===== */
/* 일기 가운데: 줄이 접힘선까지 이어지고, 그림자는 펼침면 전체에 한 장으로 */
@media (min-width: 720px) {
  .diary-book { padding-right: 0 !important; }
  .diary-spread .dpage.left, .diary-spread .daily-page.left { padding: 4px 0 24px 0 !important; background: none !important; }
  .diary-spread .dpage.right, .diary-spread .daily-page.right { padding: 4px 0 24px 0 !important; background: none !important; }
  .diary-spread { column-gap: 0; }
  .diary-spread::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 48px); width: 96px; pointer-events: none; z-index: 1;
    background: linear-gradient(to right, rgba(11,12,14,0) 0%, rgba(11,12,14,.035) 35%, rgba(11,12,14,.075) 50%, rgba(11,12,14,.035) 65%, rgba(11,12,14,0) 100%); }
  .diary-spread::after { background: rgba(11,12,14,.10) !important; }
  /* 접힘선 쪽 글자 여백 */
  .diary-spread .dpage.left .dp-text, .diary-spread .daily-page.left .dl-ta { padding-right: 28px; }
  .diary-spread .dpage.right .dp-top, .diary-spread .daily-page.right .dl-top, .diary-spread .daily-page.right .dp-top { padding-left: 28px; }
  .diary-spread .dpage.right .dp-date, .diary-spread .daily-page.right .dl-hours { padding-left: 20px; box-sizing: content-box; }
  .diary-spread .dpage.left .dp-top, .diary-spread .daily-page.left .dl-top { padding-right: 28px; }
}
.index-tabs { display: none !important; }

/* 데일리 열 너비: 시간 | 일정(좁게) | 내용(넓게) */
.dl-grid.split { grid-template-columns: 34px minmax(0, 32%) minmax(0, 1fr); }
@media (max-width: 719px) { .dl-grid.split { grid-template-columns: 26px minmax(0, 36%) minmax(0, 1fr); } }
.dl-evline { cursor: copy; position: relative; }
.dl-evline .dl-plus { margin-left: auto; color: var(--mute); font-size: 14px; opacity: 0; transition: opacity .15s; }
.dl-evline:hover .dl-plus { opacity: 1; }
.dl-ev { border: 0; font-family: inherit; cursor: pointer; }
.dl-ev:hover { filter: brightness(.96); }
.nav-group button { white-space: nowrap; }
@media (max-width: 719px) { .diary-head .segctl button { padding: 0 10px; } .nav-group button { padding: 0 6px; } }

/* ===== 2026-11-16 (11) ===== */
/* 일기 펼침면: 이전 모습(양쪽 페이지 안쪽 여백 + 가운데 접힘 그림자)으로, 위·아래는 서서히 사라지게 */
@media (min-width: 720px) {
  .diary-spread .dpage.left, .diary-spread .daily-page.left { padding: 4px 36px 24px 0 !important; }
  .diary-spread .dpage.right, .diary-spread .daily-page.right { padding: 4px 0 24px 36px !important; }
  .diary-spread .dpage.left .dp-text, .diary-spread .daily-page.left .dl-ta { padding-right: 6px; }
  .diary-spread .dpage.right .dp-top, .diary-spread .daily-page.right .dl-top, .diary-spread .daily-page.right .dp-top,
  .diary-spread .dpage.left .dp-top, .diary-spread .daily-page.left .dl-top { padding-left: 8px; padding-right: 0; }
  .diary-spread .dpage.right .dp-date, .diary-spread .daily-page.right .dl-hours { padding-left: 0; }
  .diary-spread::before { left: calc(50% - 40px); width: 80px;
    background: linear-gradient(to right, rgba(11,12,14,0), rgba(11,12,14,.05) 45%, rgba(11,12,14,.08) 50%, rgba(11,12,14,.05) 55%, rgba(11,12,14,0));
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%); }
  .diary-spread::after { background: linear-gradient(to bottom, transparent 0, rgba(11,12,14,.10) 90px, rgba(11,12,14,.10) calc(100% - 90px), transparent 100%) !important; }
}
/* 책갈피 강조: 파란색 */
.bm-btn.on { color: var(--blue); }
.dp-row.is-marked .dp-date b { color: var(--blue); }
.dp-row.is-today.is-marked .dp-date b { color: #fff; }
/* 책갈피 모아보기: 아카이브 카드처럼 내용만 */
.mark-card { padding: 16px 44px 16px 16px; display: block; }
.mk-clip { display: none; }
.mk-date { color: var(--blue); font-weight: 600; }

/* 일기: ‹ 오늘 › 자리 유지(책갈피·검색일 때 흐리게만) */
#diaryNav.is-off { visibility: hidden; }
/* 펼침면 접힘 그림자 더 연하게 */
@media (min-width: 720px) {
  .diary-spread::before { left: calc(50% - 32px); width: 64px;
    background: linear-gradient(to right, rgba(11,12,14,0), rgba(11,12,14,.022) 45%, rgba(11,12,14,.04) 50%, rgba(11,12,14,.022) 55%, rgba(11,12,14,0)) !important; }
  .diary-spread::after { background: linear-gradient(to bottom, transparent 0, rgba(11,12,14,.07) 90px, rgba(11,12,14,.07) calc(100% - 90px), transparent 100%) !important; }
}
.week-meta { line-height: 16px; height: 16px; }
.week-range { line-height: 1.15; }

/* ===== 2026-11-16 (13) ===== */
/* 캘린더: 스크롤해도 메뉴(머리)와 날짜 줄은 위에 고정 */
#view-week .week-head { position: sticky; top: 53px; z-index: 12; background: #fff; }
#view-week #dayHeader { position: sticky; top: calc(53px + var(--wh-h, 96px)); z-index: 11; background: #fff; }
/* 일기 머리: 좁을 때 돋보기는 오른쪽 끝 */
@media (max-width: 719px) {
  .diary-head .week-actions { width: 100%; }
  .diary-head .week-actions > .pill-group:last-child { margin-left: auto; }
}
/* 아카이브: 검색은 칩 줄 오른쪽 끝 */
.arch-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.arch-row .cal-filter { flex: 1; min-width: 0; margin: 0 !important; }
.arch-row .search-pill { flex: none; }
@media (max-width: 719px) { .arch-row { flex-wrap: wrap; } .arch-row .search-pill { width: 100%; } .arch-row .search-pill input { width: 100%; } }
/* 책갈피 미리보기 */
.day-preview { padding: 4px 2px 8px; }
.dp-line { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; margin: 4px 0 10px; }
.dp-week { font-size: 12px; color: var(--ink-2); margin: 0 0 12px; }
.dp-sec { font-size: 11px; font-weight: 600; color: var(--mute); margin: 16px 0 6px; }
.dp-body { margin: 0; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.dp-hours { list-style: none; margin: 0; padding: 0; }
.dp-hours li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dp-hours i { font-style: normal; font-family: var(--font-num); color: var(--mute); width: 22px; text-align: right; flex: none; }
.mark-card { cursor: zoom-in; }
/* 모바일은 화면이 좁아 날짜 줄만 고정 */
@media (max-width: 719px) {
  #view-week .week-head { position: static; }
  #view-week #dayHeader { top: 53px; }
}

/* ===== 2026-11-16 (14) ===== */
/* 월/7일/3일/1일: 선택된 칸에 테두리 */
.head-nav.has-slider > .slider { border: 1px solid var(--line-strong) !important; box-shadow: 0 1px 3px rgba(11,12,14,.06); }
.head-nav .seg.is-on { box-shadow: 0 0 0 1px var(--line-strong), 0 1px 3px rgba(11,12,14,.06); }
.segctl.has-slider > .slider { border: 1px solid var(--line-strong) !important; }

/* 캘린더 검색 */
#calSearch { margin: 0 0 12px; }
#calResults { margin-top: 4px; }
#calSearchBtn, #privacyBtn, #expandBtn { display: inline-grid; place-items: center; }

/* 드롭다운: 앱 디자인 */
.dd { position: relative; display: inline-block; min-width: 0; }
.form-row .dd { margin-left: auto; }
.dd > select { display: none !important; }
.dd-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 14px; border-radius: 17px; background: var(--surface); font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); max-width: 240px; }
.dd-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn svg { flex: none; color: var(--mute); transition: transform .2s; }
.dd.open .dd-btn { background: #fff; box-shadow: 0 0 0 1px var(--line-strong); }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; min-width: 100%; width: max-content; max-width: 280px; max-height: 260px; overflow: auto; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 12px 32px -8px rgba(11,12,14,.22); scrollbar-width: none; animation: dd-in .16s ease-out; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-menu::-webkit-scrollbar { display: none; }
.dd-opt { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; font: inherit; font-size: 14px; color: var(--ink); white-space: nowrap; }
.dd-opt:hover { background: var(--surface); }
.dd-opt.on { font-weight: 700; background: var(--surface); }
.dd-opt.on::after { content: "✓"; float: right; margin-left: 14px; color: var(--blue); }
.dd-opt.add { color: var(--blue); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 4px; }

/* 주간일기 칸: 3줄 고정 */
.dp-cell { min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 720px) { .dp-text { height: 96px !important; min-height: 96px !important; overflow: hidden; } }
@media (max-width: 719px) { .dp-text { min-height: 96px; overflow: hidden; } }
.dp-row { min-height: 97px; }
.dp-date .ph-btn { opacity: 0; margin-top: 2px; }
.dp-row:hover .dp-date .ph-btn { opacity: 1; }
@media (hover: none) { .dp-date .ph-btn { opacity: .7; } }

/* 데일리: 마지막 시간 아래로 줄이 늘어남 */
.dl-grid { --extra: 0; }
.dl-hours { padding-bottom: calc(var(--lh) * var(--extra)); }
.dl-evcol2 { padding-bottom: calc(var(--lh) * var(--extra)); }
.dl-ta { height: calc(var(--lh) * var(--rows)); }

/* 사진 */
.ph-btn { color: var(--mute); }
.ph-btn:hover { color: var(--ink); }
.dl-title .ph-btn { margin-left: auto; }
.ph-strip { display: flex; gap: 4px; padding: 2px 10px 6px; overflow-x: auto; scrollbar-width: none; }
.ph-strip::-webkit-scrollbar { display: none; }
.ph-th { flex: none; width: 34px; height: 34px; border-radius: 7px; overflow: hidden; background: var(--surface); padding: 0; }
.ph-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-strip.big { padding: 6px 0 10px; gap: 6px; }
.ph-strip.big .ph-th { width: 72px; height: 72px; border-radius: 10px; }
.mark-card .ph-strip { padding: 8px 0 0; }
.photo-view { display: grid; place-items: center; padding: 6px 0 4px; }
.photo-view img { max-width: 100%; max-height: 70vh; border-radius: 12px; }
.danger-txt { color: var(--now) !important; }
/* 주간일기 칸 사진: 칸 높이는 그대로, 오른쪽 아래에 작게 */
.dp-cell { position: relative; }
.dp-cell .ph-strip { position: absolute; right: 6px; bottom: 6px; padding: 0; gap: 3px; max-width: 50%; }
.dp-cell .ph-th { width: 26px; height: 26px; border-radius: 6px; box-shadow: 0 0 0 1px #fff, 0 1px 3px rgba(0,0,0,.15); }
/* 주간일기 한 칸 = 정확히 3줄 높이, 날짜 칸 버튼은 가로로 */
@media (min-width: 720px) { .dp-row { height: 97px; min-height: 97px !important; } }
@media (max-width: 719px) { .dp-row { height: auto; min-height: 97px !important; } }
.dp-date { display: grid !important; grid-template-columns: 1fr 1fr; justify-items: center; align-content: start; row-gap: 0; overflow: hidden; }
.dp-date b, .dp-date span { grid-column: 1 / -1; }
.dp-date .bm-btn { width: 20px; height: 20px; margin-top: 6px !important; }
.dp-date .bm-btn svg { width: 12px; height: 12px; }

/* ===== 2026-11-16 (15) ===== */
/* 주간일기: 사진 한 장 = 칸 맨 앞 3줄 높이 정사각형, 글 칸은 그만큼 좁아짐 */
.dp-cell { flex-direction: row !important; align-items: stretch; }
.dp-cell .dp-text { flex: 1; min-width: 0; }
.wk-photo { flex: none; width: 88px; height: 88px; margin: 4px 0 4px 6px; border-radius: 10px; overflow: hidden; padding: 0; background: var(--surface); }
.wk-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-add { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--mute); background: #fff; box-shadow: 0 0 0 1px var(--line); opacity: 0; transition: opacity .15s; z-index: 1; }
.dp-row:hover .wk-add, .wk-add:focus { opacity: 1; }
@media (hover: none) { .wk-add { opacity: .6; } }
@media (max-width: 719px) { .wk-photo { width: 80px; height: 80px; margin: 8px 0 8px 6px; } }
/* 날짜 칸 책갈피는 원래 크기 */
.dp-date { display: flex !important; flex-direction: column; align-items: center; }
.dp-date .bm-btn { width: 24px; height: 24px; margin-top: 6px !important; }
.dp-date .bm-btn svg { width: 13px; height: 13px; }

/* 데일리 사진: 아래 일정 칩과 같은 시작선(시간 칸 34px 다음), 최대 5장 */
.daily-page .ph-strip.big { padding: 6px 0 10px 34px; }
@media (max-width: 719px) { .daily-page .ph-strip.big { padding-left: 26px; } }
.ph-add-btn { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--mute); flex: none; }
.ph-add-btn:hover { background: var(--surface); color: var(--ink); }

/* 트랙 흐름 주간: 한 주씩 넘김 + 날짜 없음 칸 */
.fw-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 8px; }
.fw-nav .flow-wh { margin: 0; }
.fw-grid.with-undated { grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.2fr); }
.fw-undated { background: var(--surface); border-left: 1px solid var(--line-strong) !important; }
.fw-undated .fw-d span { font-weight: 600; color: var(--ink-2); }
@media (max-width: 719px) {
  .fw-grid.with-undated { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .fw-undated { grid-column: 1 / -1; grid-row: 1; min-height: 0 !important; border-left: 0 !important; padding: 4px 6px 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
  .fw-undated .fw-d { flex-direction: row !important; gap: 4px; padding: 0 4px 0 0; }
  .fw-undated .flow-item { flex-direction: row !important; align-items: center !important; margin: 0 !important; }
}

/* 트랙별 좌우 보기: 스크롤 막대 숨김(휠·드래그로 넘김) */
#projectBoard.row-layout { scrollbar-width: none; padding-bottom: 4px; }
#projectBoard.row-layout::-webkit-scrollbar { display: none; }

/* ===== 2026-11-16 (16) 바인더 ===== */
#binderDrawerBtn { display: inline-grid; place-items: center; }
#diaryMode { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
#diaryMode::-webkit-scrollbar { display: none; }
#diaryMode button { white-space: nowrap; }
/* 모음 속지: 책·영화 카드 */
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px 14px; margin-top: 8px; }
@media (max-width: 719px) { .bd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; } }
.bd-add { min-height: 120px; border-radius: 14px; border: 1.5px dashed var(--line-strong); color: var(--ink-2); font-weight: 600; font-size: 13px; background: transparent; }
.bd-add:hover { background: var(--surface); }
.bd-grid .bd-add { aspect-ratio: 3 / 4; height: auto; }
.bd-card { cursor: pointer; min-width: 0; }
.bd-cover { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: transform .2s; }
.bd-card:hover .bd-cover { transform: translateY(-2px); }
.bd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-cover span { font-size: 34px; font-weight: 700; color: var(--line-strong); }
.bd-info { padding: 8px 2px 0; }
.bd-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-by { font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.bd-stars { display: flex; gap: 1px; margin-top: 4px; }
.bd-stars svg { fill: var(--line); }
.bd-stars svg.on { fill: #f5b301; }
.bd-memo { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bd-date { font-size: 11px; color: var(--mute); margin-top: 3px; font-family: var(--font-num); }
/* 노트 */
.bd-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 8px; }
.bd-notes .bd-add { min-height: 150px; }
.bd-note { min-height: 150px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; background: #fff;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, #f3f4f6 27px, #f3f4f6 28px); background-position: 0 58px; }
.bd-note:hover { border-color: var(--line-strong); }
.bd-note .mk-date { color: var(--mute); font-weight: 500; }
.bd-note .mk-text { -webkit-line-clamp: 4; line-height: 28px; margin-top: 4px; }
/* 편집 창 */
.bd-form-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.bd-form-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bd-form-main .form-row { padding-top: 6px; }
.bd-cover-pick { flex: none; width: 96px; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1.5px dashed var(--line-strong); display: grid; place-items: center; font-size: 12px; color: var(--ink-2); font-weight: 600; padding: 0; }
.bd-cover-pick img { width: 100%; height: 100%; object-fit: cover; }
.bd-title-in { font-size: 17px; font-weight: 700; }
.bd-rate { margin-left: auto; display: inline-flex; gap: 2px; }
.bd-rate button { padding: 2px; }
.bd-rate svg { fill: var(--line); }
.bd-rate button.on svg { fill: #f5b301; }
.bd-long { width: 100%; min-height: 50vh; border: 0; outline: none; resize: vertical; font: inherit; font-size: 15px; line-height: 32px; padding: 0 4px; margin-top: 8px; background: transparent;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--line) 31px, var(--line) 32px); background-attachment: local; }
.bd-form.is-long .bd-title-in { margin-bottom: 4px; }
/* 속지 서랍 */
.bd-row { align-items: center; }
.bd-row > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bd-row small { font-size: 12px; color: var(--mute); }
.bd-row .switch { margin-left: auto; }
.bd-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--surface); display: grid; place-items: center; color: var(--ink-2); flex: none; }
/* 바인더 메뉴: 켠 속지 수만큼 늘어남 */
#diaryMode { display: inline-flex !important; width: auto !important; }
#diaryMode > button { flex: none; padding: 0 14px; }
@media (max-width: 719px) {
  #diaryMode { flex: 0 0 100%; }
  #diaryMode > button { flex: 1 0 auto; padding: 0 10px; }
}
@media (max-width: 719px) { .diary-head .week-actions { flex-wrap: wrap !important; } }
.bd-note { background: linear-gradient(#fff, #fff) top / 100% 62px no-repeat, repeating-linear-gradient(to bottom, transparent 0, transparent 27px, #f3f4f6 27px, #f3f4f6 28px) 0 6px / 100% 100% #fff; }
.bd-note .mk-text { position: relative; top: 2px; }

/* ===== 2026-11-16 (17) 바인더 메뉴 정리 · 노트 페이지 · 리뷰 ===== */
.sub-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 17px; background: var(--surface); height: 34px; align-items: center; }
.sub-seg.hidden { display: none; }
.sub-seg button { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.sub-seg button.is-on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }

/* 노트: 한 장씩 */
.np-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 0; }
.np-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; flex-wrap: wrap; }
.np-bar .nav-group button:disabled { opacity: .3; }
.np-design { font-size: 12px; color: var(--mute); }
.np-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.np-page { max-width: 820px; margin: 0 auto; }
.np-title { width: 100%; border: 0; outline: none; font: inherit; font-size: 22px; font-weight: 700; padding: 6px 4px 10px; border-bottom: 1px solid var(--mute); background: transparent; }
.np-lined { display: block; width: 100%; min-height: 480px; border: 0; outline: none; resize: none; font: inherit; font-size: 15px; line-height: 36px; padding: 0 4px; background: transparent; overflow: hidden;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, var(--line) 35px, var(--line) 36px); }
.np-strip { display: flex; gap: 8px; overflow-x: auto; padding: 22px 0 8px; scrollbar-width: none; max-width: 820px; margin: 0 auto; }
.np-strip::-webkit-scrollbar { display: none; }
.np-thumb { position: relative; flex: none; width: 92px; height: 64px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 7px 8px; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.np-thumb span { font-family: var(--font-num); font-size: 10px; color: var(--mute); }
.np-thumb b { font-size: 11.5px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.np-thumb.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.np-thumb i { position: absolute; top: 0; right: 8px; width: 8px; height: 12px; background: var(--blue); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%); }
/* 만다라트 */
.mandal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px auto 0; max-width: 640px; }
.mb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: 10px; background: var(--line); }
.mb.core { background: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.mc { aspect-ratio: 1; border: 0; outline: none; resize: none; font: inherit; font-size: 12px; line-height: 1.3; text-align: center; padding: 6px 4px; background: #fff; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; word-break: keep-all; overflow-wrap: anywhere; }
textarea.mc { display: block; padding-top: calc(50% - 16px); }
.mc:focus { background: #fcfcfd; box-shadow: inset 0 0 0 1.5px var(--ink); }
.mc.sub { background: var(--blue-bg); font-weight: 600; color: var(--ink); }
.mc.goal { background: var(--ink); color: #fff; font-weight: 700; }
.mc.goal::placeholder { color: rgba(255,255,255,.6); }
@media (max-width: 719px) { .mandal { gap: 3px; } .mb { gap: 1px; padding: 1px; border-radius: 6px; } .mc { font-size: 8.5px; padding: 2px; border-radius: 3px; } textarea.mc { padding-top: calc(50% - 10px); } }
/* 새 페이지 디자인 고르기 */
.np-designs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.np-design-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; text-align: left; background: #fff; }
.np-design-card:hover { border-color: var(--ink); }
.np-design-card small { font-size: 11.5px; color: var(--mute); }
.np-prev { height: 90px; border-radius: 8px; margin-bottom: 6px; background: var(--surface); }
.np-prev.lined { background: repeating-linear-gradient(to bottom, var(--surface) 0, var(--surface) 13px, var(--line-strong) 13px, var(--line-strong) 14px); }
.np-prev.mandalart { background: conic-gradient(from 0deg, transparent 0 0), linear-gradient(var(--surface), var(--surface)); background-image: linear-gradient(90deg, transparent 32%, var(--line-strong) 32% 34%, transparent 34% 66%, var(--line-strong) 66% 68%, transparent 68%), linear-gradient(transparent 32%, var(--line-strong) 32% 34%, transparent 34% 66%, var(--line-strong) 66% 68%, transparent 68%), radial-gradient(circle at center, var(--ink) 0 7px, transparent 8px); }
/* 리뷰 */
.rv-kinds { margin: 0 0 14px !important; }
.bd-cover { position: relative; }
.bd-kind { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.9); color: var(--ink-2); }

/* ===== 2026-11-16 (18) ===== */
/* 바인더 머리: 줄바꿈 없이 그리드로 칸을 고정 → 탭을 바꿔도 메뉴가 안 움직임 */
.diary-head .week-actions { display: contents; }
.diary-head #diaryNav.is-off { display: none; }
/* 넓을 때: 한 줄 [제목 | 주간/데일리 | ‹오늘› | 메뉴 | 서랍·검색] */
@media (min-width: 1000px) {
  .diary-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; column-gap: 0; align-items: end; }
  .diary-head > div:first-child { grid-column: 1; grid-row: 1; min-width: 0; }
  .diary-head #diarySub { grid-column: 2; grid-row: 1; margin: 0 8px 0 0; }
  .diary-head #diaryNav { grid-column: 3; grid-row: 1; margin: 0 8px 0 0; }
  .diary-head #diaryMode { grid-column: 4; grid-row: 1; margin: 0 8px 0 0; }
  .diary-head .week-actions > .pill-group:last-child { grid-column: 5; grid-row: 1; margin: 0; }
}
/* 좁을 때: 제목 줄 오른쪽에 서랍·검색, 다음 줄 메뉴, 그 아래 주간/데일리·‹오늘› */
@media (max-width: 999px) {
  .diary-head { display: grid; grid-template-columns: auto auto 1fr auto; column-gap: 6px; row-gap: 12px; align-items: center; }
  .diary-head > div:first-child { grid-column: 1 / 4; grid-row: 1; min-width: 0; }
  .diary-head .week-actions > .pill-group:last-child { grid-column: 4; grid-row: 1; align-self: end; margin: 0 0 4px; }
  .diary-head #diaryMode { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin: 0; }
  .diary-head #diarySub, .diary-head #diaryNav { grid-row: 3; margin: 0; }
}
@media (max-width: 719px) { .diary-head #diaryMode { justify-self: stretch; width: 100%; } }

.mv-grid { min-height: 0; } /* 높이는 JS(fitMonth)가 화면 높이에 맞춤 */
/* 월 보기(모바일): 점 대신 일정 이름을 칸 안에 바로 (하단 여백도 채움) */
@media (max-width: 719px) {
  .mv-grid { min-height: 0; grid-auto-rows: auto; }
  .mv-cell { align-items: stretch; padding: 4px 2px; gap: 2px; }
  .mv-cell .mv-num { align-self: center; }
  .mv-ev, .mv-more, .mv-task, .mv-num { flex: none; }
  .mv-ev { display: flex; font-size: 9.5px; height: 15px; line-height: 15px; padding: 0 3px; border-radius: 3px; gap: 0; background: var(--bg); }
  .mv-ev .mv-dot, .mv-ev .mv-t { display: none; }
  .mv-ev .mv-tt { color: inherit; text-overflow: clip; }
  .mv-more, .mv-task { display: block; font-size: 9px; padding: 0 2px; white-space: nowrap; overflow: hidden; }
  .mv-dots { display: none; }
}

/* ===== 2026-11-16 (19) ===== */
/* 1일 접기(줌 아웃): 가로줄도 3시간마다 */
#timeArea.zoom-out .col { background-size: 100% calc(var(--hour) * 3); }
/* 끌어서 순서 바꾸기 */
.sort-ghost { opacity: .92; transform: rotate(-1.5deg); box-shadow: 0 10px 28px rgba(11,12,14,.18); border-radius: 16px; }
.sort-src { opacity: .25; }
body.is-sorting, body.is-sorting * { cursor: grabbing !important; user-select: none; }
.card .card-head[data-open] { cursor: grab; }
.np-thumb { cursor: grab; touch-action: pan-x; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* 중요도 매트릭스: 끌 때 미리보기는 작은 알약 */
.drag-ghost.li-ghost { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; font-size: 13px; list-style: none; background: #fff; box-shadow: 0 8px 22px rgba(11,12,14,.16); transform: rotate(-1.5deg); }
.drag-ghost.li-ghost .when, .drag-ghost.li-ghost .t-from { display: none; }
.drag-ghost.li-ghost > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.drag-ghost.li-ghost .check { flex: none; }
/* 노트: 페이지 번호로 가기, 미리보기 줄은 위 */
.np-jump { display: inline-flex; align-items: center; gap: 3px; padding: 0 2px; font-family: var(--font-num); font-size: 13px; font-weight: 600; }
.np-jump input { width: 30px; height: 26px; border: 0; border-radius: 7px; background: #fff; text-align: center; font: inherit; color: var(--ink); padding: 0; }
.np-jump input:focus { outline: 1px solid var(--ink); }
.np-jump span { color: var(--mute); font-weight: 500; white-space: nowrap; }
.np-strip { padding: 2px 2px 10px; margin: 0 auto 10px; }
.np-del { color: var(--mute); }
.np-del:hover { color: #d64545; }
.np-bar, .np-strip { max-width: 820px; margin-left: auto; margin-right: auto; }
.np-del { width: 34px; height: 34px; border-radius: 999px; background: var(--surface); display: grid; place-items: center; }
/* ===== 2026-11-17 (21) 아카이브 → 바인더 안 ===== */
.rv-item .n-kind { color: var(--orange, #e8893a); }
.rv-by { font-weight: 400; color: var(--mute); font-size: .9em; margin-left: 4px; }
.rv-stars { color: #f5b301; letter-spacing: 1px; }
#archReviews { margin-top: 4px; }
#archPane .arch-row { margin-top: 2px; }
/* 아카이브 메모 크게 보기 */
.memo-view-range { margin: 0 0 10px; font-size: 12px; color: var(--mute); font-family: var(--font-num); }
.memo-view { width: 100%; min-height: 220px; border: 0; background: var(--surface); border-radius: 14px; padding: 14px 16px; font: inherit; font-size: 15px; line-height: 1.7; resize: vertical; }
.memo-view:focus { outline: 1px solid var(--line-strong); }
.memo-go { margin-top: 12px; width: 100%; justify-content: center; height: 40px; }
/* ===== 2026-11-17 (24) 로그인 화면 ===== */
#loginGate { position: fixed; inset: 0; z-index: 200; background: #fff; display: grid; place-items: center; padding: 24px; }
.lg-card { width: 100%; max-width: 360px; text-align: center; }
.lg-meta { font-family: var(--font-num); font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--mute); }
.lg-card h1 { font-size: 34px; letter-spacing: -0.02em; margin: 10px 0 12px; }
.lg-card p { color: var(--mute); font-size: 14px; line-height: 1.6; margin: 0 0 28px; }
.lg-btn { display: flex; justify-content: center; min-height: 44px; }
.lg-err { color: #d64545 !important; font-size: 13px !important; margin: 14px 0 0 !important; }
.lg-local { margin-top: 22px; border: 0; background: none; color: var(--mute); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* 설정: 구글 캘린더 목록(보이기 스위치) */
.gcal-row { cursor: pointer; }
.gcal-row .switch { margin-left: auto; }
.gc-tag { font-size: 10px; color: var(--mute); font-weight: 500; margin-left: 4px; }
.icon-btn { display: inline-grid; place-items: center; }
#settingsBtn svg { transition: transform .4s cubic-bezier(.3,.7,.3,1); }
#settingsBtn:hover svg { transform: rotate(45deg); }
/* 구글 캘린더 다시 연결(토큰 만료 시) */
.g-reconnect { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: #fff4e5; color: #b25e09; font-size: 12px; font-weight: 600; margin-right: 6px; white-space: nowrap; }
.g-reconnect .g-dot { width: 6px; height: 6px; border-radius: 50%; background: #f08c00; }
.g-reconnect:disabled { opacity: .5; }
@media (max-width: 719px) { .g-reconnect { font-size: 11px; padding: 0 9px; } .topbar .sync span:not(.sp):not(.ok) { display: none; } }
.dd-group { padding: 10px 12px 4px; font-size: 11px; font-weight: 600; color: var(--mute); }
.g-mark { margin-left: 4px; font-size: 9px; font-weight: 700; color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 3px; line-height: 13px; }
/* 트랙 칸: 마우스를 올리면 마지막 줄 오른쪽 끝에 작은 + (자리 차지 없음). 터치 기기는 항목 보기 창의 "이 칸에 추가" */
#trackRows .cell { position: relative; }
#trackRows .cell-plus { position: absolute; right: 6px; top: calc(var(--n, 1) * var(--line-h) - var(--line-h) / 2 - 10px); width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); color: var(--mute); font-size: 14px; line-height: 1; display: none; place-items: center; z-index: 1; }
@media (hover: hover) { #trackRows .cell:hover .cell-plus { display: grid; } #trackRows .cell-plus:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--ink-2); } }
.popover input + .segctl { margin: 8px 0 0; }
/* 색: 12가지 — 줄바꿈 */
.swatches { flex-wrap: wrap; justify-content: flex-end; max-width: 236px; }
.cdot-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; margin: -6px -4px -6px -6px; border-radius: 50%; background: none; }
.cdot-btn:hover { background: var(--surface); }
.cdot-btn .cdot { width: 11px; height: 11px; }
.gc-pal { justify-content: flex-start; max-width: none; padding: 10px 2px 12px; border-bottom: 1px solid var(--line); gap: 8px; align-items: center; }
.gc-pal .swatch { width: 22px; height: 22px; }
.gc-reset { font-size: 11px; color: var(--mute); padding: 0 8px; height: 24px; border-radius: 999px; background: var(--surface); }
.ev-addsame { margin-top: 16px; width: 100%; justify-content: center; }
/* ===== 2026-11-17 (25) 루틴 묶음: 루틴 하나 = 얇은 줄 하나, 맨 아래 "+ 루틴" ===== */
#trackRows .rt-group-head { height: 26px; display: flex; align-items: flex-end; padding: 0 0 4px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--mute); border-bottom: 1px solid var(--line); }
#trackRows .track-row.is-habit { min-height: 30px; border-bottom: 0; }
#trackRows .track-row.is-habit .track-head.hb-head { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 8px; text-align: left; background: none; border-bottom: 1px solid var(--line); min-width: 0; cursor: pointer; }
#trackRows .hb-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; }
#trackRows .hb-name { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#trackRows .track-row.is-habit .cell.hb-cell { min-height: 30px; height: 30px; display: flex; align-items: center; padding: 0 10px; background-image: none; border-bottom: 1px solid var(--line); }
#trackRows .hb-cell .check { width: var(--mark); height: var(--mark); margin: 0; }
#trackRows .hb-off { width: 4px; height: 4px; border-radius: 50%; background: var(--line); margin-left: calc(var(--mark) / 2 - 2px); }
#trackRows .rt-add { color: var(--mute); }
#trackRows .rt-add .hb-name { color: var(--mute); font-weight: 600; }
#trackRows .rt-add:hover .hb-name, #trackRows .rt-add:hover .hb-plus { color: var(--ink); }
#trackRows .hb-plus { width: 7px; text-align: center; font-size: 13px; font-weight: 600; color: var(--mute); }
#trackRows .rt-add-fill { border-bottom: 1px solid var(--line); }
@media (max-width: 719px) {
  #trackRows .track-row.is-habit .track-head.hb-head { padding: 0 3px; gap: 3px; }
  #trackRows .hb-dot { display: none; }
  #trackRows .hb-name { font-size: 9px; line-height: 1.15; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; }
  #trackRows .track-row.is-habit .cell.hb-cell { padding: 0 3px; }
  #trackRows .rt-group-head { padding-left: 3px; }
}
/* 습관 편집 */
.hb-edit { margin-top: 6px; }
.hb-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hb-in { grid-column: 1; border: 0; background: var(--surface); border-radius: 10px; height: 36px; padding: 0 10px; font: inherit; font-size: 14px; min-width: 0; }
.hb-tools { grid-column: 2; grid-row: 1; display: flex; gap: 2px; }
.hb-tools button { width: 28px; height: 28px; border-radius: 8px; color: var(--mute); font-size: 13px; }
.hb-tools button:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.hb-tools button:disabled { opacity: .3; }
.hb-days { grid-column: 1 / -1; display: flex; gap: 4px; }
.hb-d { flex: 1; height: 28px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--mute); }
.hb-d.on { background: var(--ink); color: #fff; }
.hb-addbtn { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 8px 2px; }
.hb-cardname { font-size: 11px; color: var(--mute); margin: 8px 0 4px; }
.sd.skip, .rt-d.skip { opacity: .25; pointer-events: none; background: none; }
.popover .hb-days { margin-top: 8px; } .popover .hb-d { height: 26px; font-size: 11px; }
/* 색 12개 = 6개씩 두 줄로 고르게 */
.swatches { display: grid; grid-template-columns: repeat(6, 24px); gap: 8px 10px; justify-content: end; max-width: none; }
.gc-pal.swatches { display: flex; }
/* 마지막 트랙 줄 아래 선: 루틴 묶음 위 선으로 확실히 (있던 선과 겹치게 -1px) */
#trackRows .rt-group { margin-top: -1px; border-top: 1px solid var(--line); position: relative; }
/* 루틴 그날 메모 */
#trackRows .hb-cell { gap: 6px; cursor: text; min-width: 0; }
#trackRows .hb-memo { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (hover: hover) { #trackRows .hb-cell[data-hb]:not(.has-memo):hover::after { content: "+ 메모"; font-size: 11px; color: var(--mute); opacity: .6; } }
@media (max-width: 719px) { #trackRows .hb-memo { display: none; } #trackRows .hb-cell.has-memo::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--mute); margin-left: auto; } }
.dt-memo { margin-left: auto; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
/* 색 두 줄일 때 위아래 선과 붙지 않게 여백 */
.form-row:has(.swatches) { padding-top: 12px; padding-bottom: 12px; height: auto; min-height: 0; align-items: center; }
/* 할 일·기록 메모 */
.ev-memo { width: 100%; margin-top: 14px; border: 0; background: var(--surface); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.6; resize: none; min-height: 44px; overflow: hidden; }
.ev-memo:focus { outline: 1px solid var(--line-strong, var(--line)); background: #fff; }
#trackRows .entry .note-ico { flex: none; color: #8a8f98; margin-left: 2px; }
@media (max-width: 719px) { #trackRows .entry .note-ico { position: absolute; top: 5px; right: 2px; width: 13px; height: 13px; } }
@media (hover: hover) { #trackRows .is-habit[data-sort-id] .hb-head { cursor: grab; } }
.drag-ghost.sort-pill { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; background: #fff; white-space: nowrap; }
.drag-ghost.sort-pill .hb-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
#trackRows .is-habit.sort-src { opacity: 1; background: var(--surface); }
#trackRows .is-habit.sort-src > * { opacity: .35; }
.popover .qa-memo { display: block; width: 100%; margin-top: 6px; border: 0; background: var(--surface); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 12px; line-height: 1.5; resize: none; outline: none; min-height: 32px; max-height: 140px; overflow-y: auto; color: var(--ink); }
.popover .qa-memo::placeholder { color: var(--mute); }
.popover .qa-memo + .segctl { margin: 8px 0 0; }
#trackRows .rt-group-head { gap: 8px; }
#trackRows .rt-cal { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; letter-spacing: 0; text-transform: none; }
#trackRows .rt-cal-dot { width: 6px; height: 6px; border-radius: 50%; }
.drag-ghost.sort-pill .track-icon { width: 22px; height: 22px; font-size: 12px; border-radius: 7px; display: inline-grid; place-items: center; }
@media (hover: hover) { #trackRows .is-track .track-head { cursor: grab; } }
#trackRows .is-track.sort-src { opacity: 1; background: var(--surface); }
#trackRows .is-track.sort-src > * { opacity: .35; }
/* 바인더 머리 아이콘 버튼: 모두 가운데 정렬 */
.pill-group .pill-icon { display: grid; place-items: center; }
/* 노트 분류 칩 */
.np-cats { max-width: 820px; margin: 0 auto 10px; }
.np-cats .cnt { font-size: 10px; opacity: .55; font-family: var(--font-num); }
.np-catbtn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 15px; background: var(--surface); font-size: 12px; color: var(--mute); }
.np-catbtn.on { color: var(--ink); font-weight: 600; }
/* 하단 Archive 탭: 바인더 메뉴·서랍·책갈피는 숨김(검색만) */
#view-diary.is-archive #diaryMode, #view-diary.is-archive #diarySub, #view-diary.is-archive #binderMarksBtn, #view-diary.is-archive #binderDrawerBtn, #view-diary.is-archive #diaryNav { display: none !important; }
/* 비밀 문구 화면 */
.vault-gate .lg-card p b { color: var(--ink); }
.vault-gate .vg-in { display: block; width: 100%; margin: 0 0 10px; text-align: center; }
.vg-keep { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--mute); margin: 6px 0 18px; }
.lg-start { width: 100%; height: 46px; border: 0; border-radius: 23px; background: var(--ink); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.lg-start:disabled { opacity: .5; }
.vault-note { font-size: 12px; color: var(--mute); margin: 10px 0 0; }
.vg-code { margin-top: 12px; }
.vg-code.hidden { display: none; }
.vault-code { margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--surface); }
.vault-code code { display: block; font-family: var(--font-num), monospace; font-size: 13px; line-height: 1.6; word-break: break-all; color: var(--ink); }
/* 노트: 칩·바·미리보기·페이지를 제목과 같은 왼쪽 줄에 맞춤(넓은 화면에서 가운데 떠 보이지 않게) */
#diaryBody .np-cats, #diaryBody .np-bar, #diaryBody .np-strip, #diaryBody .np-page { max-width: 960px; margin-left: 0; margin-right: 0; }
#diaryBody .np-empty { align-items: flex-start; padding: 40px 0; max-width: 960px; }
/* 중간 폭(720~999): 메뉴가 두 칸뿐이라 제목 줄 오른쪽(아이콘 앞)에 둠 */
@media (min-width: 720px) and (max-width: 999px) {
  .diary-head > div:first-child { grid-column: 1 / 3; }
  .diary-head #diaryMode { grid-column: 3; grid-row: 1; justify-self: end; align-self: end; margin: 0 0 4px; }
  .diary-head #diarySub, .diary-head #diaryNav { grid-row: 2; }
}
/* 중요도 매트릭스: 칸 높이는 각 줄 내용만큼(한 칸이 길다고 위 칸까지 늘어나지 않게), 긴 칸은 안에서 스크롤 */
.matrix { grid-template-rows: auto auto auto; align-items: start; }
.quad { min-height: 160px; }
.quad ul { flex: 1 1 auto; max-height: min(48vh, 440px); overflow-y: auto; scrollbar-width: thin; }
.quad .card-add { margin-top: 8px; }
@media (max-width: 719px) { .quad ul { max-height: none; } }
/* 네 칸 높이를 똑같이 고정, 넘치는 할 일은 칸 안에서 스크롤 */
@media (min-width: 720px) {
  .matrix { grid-template-rows: auto 1fr 1fr; align-items: stretch; }
  .quad { height: clamp(220px, calc((100vh - 330px) / 2), 420px); min-height: 0; }
  .quad ul { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
}
.quad .card-add, .quad .quad-head { flex: none; }
/* 리뷰 상태(예정/진행 중/다 함) */
.rv-status { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.rv-status button { height: 30px; padding: 0 12px; border-radius: 15px; background: var(--surface); font-size: 12px; color: var(--ink-2); }
.rv-status button.is-on { background: var(--ink); color: #fff; }
.rv-status .cnt { font-size: 10px; opacity: .6; font-family: var(--font-num); }
.rv-st { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 8px; margin-bottom: 4px; }
.rv-st.st-plan { background: #eef0f3; color: #61636e; }
.rv-st.st-doing { background: #def2ff; color: #2694f5; }
.rv-st.st-done { background: #e8f7e0; color: #4f9a4a; }
.rv-st-pick { margin: 14px 0 4px; }
.fd-kind { margin-bottom: 14px; }
.fd-review.hidden { display: none; }
/* 스크롤바: 평소엔 숨기고 마우스를 올린 곳만 얇게 */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: rgba(11, 12, 14, .22) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
:hover::-webkit-scrollbar-thumb { background: rgba(11, 12, 14, .22); }
.rv-verb-pick { margin: 14px 0 0; }
/* 반복 주기 */
.rep .rep-freq { margin-bottom: 10px; }
.rep-p.hidden { display: none; }
.rep-monthly, .rep-yearly { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.rep-monthly select, .rep-yearly select { height: 36px; border: 0; border-radius: 10px; background: var(--surface); padding: 0 10px; font: inherit; }
/* 네 칸 모두 제목 하이라이트(긴급·기타도) */
.quad.q3 .qn-t, .quad.q4 .qn-t { padding: 1px 5px; margin-left: -5px; border-radius: 4px; background: color-mix(in srgb, var(--q-fg) 16%, transparent) !important; }
.popover.pop-wide { width: 280px; }
.popover .rep { margin-top: 8px; }
.popover .rep .segctl button { height: 26px; font-size: 12px; }
.popover .rep-monthly, .popover .rep-yearly { font-size: 12px; }
.qh-more { border: 0; background: none; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* 빈 줄 펼치기 */
#trackRows .hide-bar { padding: 10px 0 4px; }
#trackRows .hide-bar button { border: 0; background: none; font: inherit; font-size: 12px; color: var(--mute); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
#trackRows .hide-bar button:hover { background: var(--surface); color: var(--ink-2); }
/* 숨긴 빈 줄 표시(구글 시트처럼 얇은 줄 + 작은 화살표) */
#trackRows .hid-mark { position: relative; height: 9px; cursor: pointer; }
#trackRows .hid-line { position: absolute; left: 0; right: 0; top: 4px; border-top: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); }
#trackRows .hid-btn { position: absolute; left: 6px; top: -6px; height: 20px; min-width: 20px; padding: 0 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 10px; color: var(--mute); line-height: 18px; cursor: pointer; z-index: 2; }
#trackRows .hid-mark:hover .hid-btn { color: var(--ink); border-color: var(--line-strong, #c9ccd3); }
#trackRows .hid-mark.open .hid-line { box-shadow: none; }
/* 루틴 묶음: 줄마다 "+ 루틴" 대신 머리 오른쪽 작은 + */
#trackRows .rt-group-head { position: relative; }
#trackRows .rt-plus { margin-left: auto; margin-right: 6px; width: 20px; height: 20px; border: 0; border-radius: 6px; background: none; font-size: 15px; line-height: 18px; color: var(--mute); cursor: pointer; }
#trackRows .rt-plus:hover { background: var(--surface); color: var(--ink); }
/* 종일 줄: 접기 버튼, 끌기 */
.allday-label .ad-fold { border: 0; background: none; font: inherit; font-size: inherit; color: inherit; cursor: pointer; padding: 2px 4px; border-radius: 6px; display: inline-flex; align-items: center; gap: 3px; }
.allday-label .ad-fold:hover { background: var(--surface); color: var(--ink); }
.allday-label .ad-fold span { font-size: 9px; }
@media (hover: hover) { #allDayRow .span-bar { cursor: grab; } }
#allDayRow .span-bar.dragging { opacity: .75; box-shadow: 0 4px 12px rgba(11,12,14,.15); cursor: grabbing; }
/* 빈 트랙 접기 줄: 트랙 목록 끝에 한 줄 */
#trackRows .empty-toggle .et-head { border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--mute); gap: 6px; }
#trackRows .empty-toggle .et-head:hover { color: var(--ink); }
#trackRows .empty-toggle .et-ico { width: 22px; text-align: center; font-size: 10px; }
#trackRows .empty-toggle .et-name { font-size: 12px; font-weight: 600; }
#trackRows .empty-toggle .et-fill { display: flex; align-items: center; padding: 0 12px; min-width: 0; }
#trackRows .empty-toggle .et-names { font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#trackRows .empty-toggle { min-height: 34px; }
#trackRows .is-empty .track-head { opacity: .55; }
@media (max-width: 719px) { #trackRows .empty-toggle .et-name { font-size: 10px; } #trackRows .empty-toggle .et-ico { width: auto; } }
/* 루틴 묶음 머리: 이번에 없는 루틴 펼치기 */
#trackRows .rt-hid { margin-left: auto; border: 0; background: none; font: inherit; font-size: 10.5px; font-weight: 500; letter-spacing: 0; color: var(--mute); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
#trackRows .rt-hid:hover { background: var(--surface); color: var(--ink); }
#trackRows .rt-hid + .rt-plus { margin-left: 2px; }
/* 넓은 화면에선 오른쪽 패널이 늘 보이므로 닫기(X)가 필요 없음 — 좁은 화면 아래에서 올라오는 패널에서만 */
@media (min-width: 1024px) { .panel .panel-close, #panelClose { display: none !important; } }
/* 주를 넘어 이어지는 종일 막대도 모서리는 둥글게(이어짐은 ‹ › 로만 표시) */
.span-bar.cont-l { border-top-left-radius: 6px; border-bottom-left-radius: 6px; margin-left: 3px; }
.span-bar.cont-r { border-top-right-radius: 6px; border-bottom-right-radius: 6px; margin-right: 3px; }
/* 트랙 아이콘: 이모지가 아래로 처지지 않게(윈도우 이모지 글꼴 여백) 가운데 맞춤 */
#trackRows .track-icon, .card-head .track-icon, .dt-head .track-icon { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", var(--font-num), sans-serif; line-height: 1; }
/* 빈 트랙 줄: ▸는 아이콘 칸 가운데, 글자는 트랙 이름 줄에 맞춤, 위아래 가운데 */
#trackRows .empty-toggle { min-height: 0; height: 36px; align-items: stretch; }
#trackRows .empty-toggle .et-head { height: 100%; display: flex; align-items: center; gap: 8px; padding-top: 0; padding-bottom: 0; }
#trackRows .empty-toggle .et-ico { width: 24px; flex: none; display: grid; place-items: center; font-size: 9px; line-height: 1; }
#trackRows .empty-toggle .et-name { line-height: 1; }
#trackRows .empty-toggle .et-fill { height: 100%; display: flex; align-items: center; }
#trackRows .empty-toggle .et-names { line-height: 1; }
@media (max-width: 719px) { #trackRows .empty-toggle { height: 44px; } #trackRows .empty-toggle .et-ico { width: 22px; } #trackRows .empty-toggle .et-head { gap: 2px; flex-direction: column; justify-content: center; align-items: flex-start; } }
/* 덩어리 구분: 트랙 / 빈 트랙 / 루틴(캘린더별) 사이에 띄움 + 묶음 머리 또렷하게 */
#trackRows .rt-group { margin-top: 22px; border-top: 0; }
#trackRows .rt-group + .rt-group { margin-top: 14px; }
#trackRows .rt-group-head { height: 30px; padding: 0 0 6px 8px; align-items: flex-end; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); border-bottom: 1px solid var(--line-strong, #c9ccd3); }
#trackRows .rt-group-head .rt-cal { font-weight: 600; color: var(--ink-2); }
#trackRows .rt-group-head .rt-cal-dot { width: 7px; height: 7px; }
#trackRows .empty-toggle { margin-top: 0; }
@media (max-width: 719px) { #trackRows .rt-group { margin-top: 16px; } #trackRows .rt-group-head { padding-left: 3px; } }
#trackRows > .track-row:has(+ .rt-group) { border-bottom: 1px solid var(--line); }
/* 월 보기: 여러 날 일정은 얇은 띠로 이어 보이게 */
.mv-strip { height: 14px; line-height: 14px; font-size: 10px; font-weight: 600; margin: 0 -4px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.mv-strip.s { margin-left: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; padding-left: 4px; }
.mv-strip.e { margin-right: 0; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.mv-strip-more { font-size: 9.5px; color: var(--mute); padding: 0 4px; line-height: 12px; flex: none; }
.mv-cell.out .mv-strip { opacity: .45; }
@media (max-width: 719px) { .mv-strip { height: 6px; font-size: 0; margin: 0 -2px; } .mv-strip span { display: none; } .mv-strip-more { display: none; } }
.mv-cell > * { flex: none; }
/* 월 보기: 여러 날 일정 막대(주마다 칸을 가로질러, 최대 2줄) */
.mv-strip, .mv-strip-more { display: none; }
.mv-cell .mv-lanes { display: block; height: calc(var(--lanes, 0) * 18px); flex: none; }
.mv-bar { position: relative; z-index: 2; align-self: start; margin: calc(30px + var(--lane) * 18px) 5px 0; height: 16px; line-height: 16px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; pointer-events: auto; }
.mv-bar.out { opacity: .45; }
.mv-bar:hover { filter: brightness(.97); }
@media (max-width: 719px) {
  .mv-bar { margin: calc(26px + var(--lane) * 7px) 1px 0; height: 5px; padding: 0; font-size: 0; border-radius: 3px; }
  .mv-cell .mv-lanes { height: calc(var(--lanes, 0) * 7px); }
}
/* 월 보기 위 기간 줄 */
.mv-period { margin: 0 0 14px; }
.mvp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mvp-fold, .mvp-more { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.mvp-fold span { color: var(--mute); font-weight: 500; margin-left: 2px; }
.mvp-more { font-weight: 500; color: var(--mute); margin-left: auto; }
.mvp-fold:hover, .mvp-more:hover { background: var(--surface); color: var(--ink); }
.mvp-grid { position: relative; display: grid; row-gap: 4px; padding: 2px 0; }
.mvp-bar { position: relative; z-index: 1; height: 18px; line-height: 18px; margin: 0 1px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.mvp-bar:hover { filter: brightness(.97); }
.mvp-wk { border-left: 1px dashed var(--line); margin: -2px 0; }
.mvp-today { border-left: 1.5px solid #e5484d; margin: -2px 0; z-index: 2; pointer-events: none; }
@media (max-width: 719px) { .mvp-bar { font-size: 10px; padding: 0 4px; } .mv-period { margin-bottom: 10px; } }

/* 보관 메모: 메모 칸을 넓게 (제목 바로 아래) */
.field-area.nt-body { min-height: 42vh; font-size: 15px; line-height: 1.7; margin: 12px 0 8px; }
.memo-view { min-height: 50vh; }
.modal:has(.nt-body), .modal:has(.memo-view) { width: min(640px, calc(100vw - 24px)); }

/* 월 보기: 높이는 줄마다 내용만큼(기본 = 화면 맞춤 --rowh) */
.month-view .mv-grid { height: auto; min-height: 0; }
/* 월 보기 오른쪽 루틴 패널은 달력과 같이 스크롤되지 않게 */
@media (min-width: 1024px) { .panel-inner { max-height: calc(100vh - 52px - var(--bottombar-h, 76px)); } }
#view-week .month-view { overflow: clip !important; }
.month-view .mv-head { position: sticky; top: calc(53px + var(--wh-h, 96px)); z-index: 4; background: #fff; }
/* 월 보기 루틴 달력: 촘촘하게 */
.rt-grid { grid-template-columns: repeat(7, 28px); justify-content: start; gap: 4px; }
.rt-d { width: 28px; height: 28px; border-radius: 7px; font-size: 10.5px; }
.rt-d.future { opacity: .6; }
@media (max-width: 719px) { .month-view .mv-head { top: 53px; } }

/* 월 보기 정렬: 날짜 숫자 높이를 모두 24px로 맞추고, 막대·칸 내용이 같은 기준선에서 시작 */
.month-view .mv-cell { padding-top: 6px; gap: 2px; }
.month-view .mv-num { height: 24px; line-height: 24px; padding: 0 5px; flex: none; }
.month-view .mv-cell.today .mv-num { width: 24px; padding: 0; }
.month-view .mv-bar { margin-top: calc(32px + var(--lane) * 18px); }
.month-view .mv-cell .mv-lanes { height: calc(var(--lanes, 0) * 18px); margin-bottom: 0; }
.month-view .mv-ev { min-height: 16px; }
@media (max-width: 719px) {
  .month-view .mv-cell { padding-top: 5px; }
  .month-view .mv-bar { margin-top: calc(31px + var(--lane) * 7px); }
  .month-view .mv-cell .mv-lanes { height: calc(var(--lanes, 0) * 7px); }
}
/* 루틴 패널: 폭을 꽉 채우고 스크롤바 없음 */
.rt-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); justify-content: stretch; gap: 4px; }
.rt-d { width: auto; height: 28px; }
.panel-inner, .panel { scrollbar-width: none !important; }
.panel-inner::-webkit-scrollbar, .panel::-webkit-scrollbar { display: none; }
html.mv-on { scrollbar-width: none; }
html.mv-on::-webkit-scrollbar { display: none; }

/* 마감 */
.due-b { flex: none; display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px; font-size: 10.5px; font-weight: 600; line-height: 16px; color: var(--ink-2); background: var(--surface); font-family: var(--font-num); white-space: nowrap; }
.due-b.soon { color: #c2410c; background: #fff1e6; }
.due-b.late { color: #e5484d; background: #fdecec; }
.entry.is-due { opacity: .75; }
.entry.is-due .txt { color: var(--ink-2); }
.due-flag { flex: none; display: inline-grid; place-items: center; width: 16px; color: #e5484d; margin-right: 6px; }

/* 월 보기 루틴 작게 보기 */
.rt-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.rt-mode { border: 0; background: var(--surface); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.rt-mode:hover { color: var(--ink); }
.rt-mini { padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.rtm-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.rtm-head b { font-size: 12.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtm-head .rt-cnt { font-size: 13px; }
.rtm-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.rtm-strip { display: grid; gap: 2px; }
.rtm-d { height: 12px; padding: 0; border: 0; border-radius: 3px; background: var(--surface); cursor: pointer; }
.rtm-d.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.rtm-d.future { opacity: .55; }
.rtm-d.skip { background: none; }

/* 마우스로 누른 버튼에 남는 포커스 테두리 없앰(키보드 이동 때만 보임) */
button:focus:not(:focus-visible) { outline: none; }
#expandBtn.is-on { box-shadow: none; background: transparent; }

/* 루틴 달력 칸: 정사각형, 건너뛰는 날(span)도 같은 크기·같은 정렬 */
.rt-d { width: auto; height: auto; aspect-ratio: 1; display: grid; place-items: center; padding: 0; line-height: 1; }
.rt-d.skip { display: grid; }
/* 작게 보기: 오늘은 은은하게(아래 작은 점) */
.rtm-d.today { box-shadow: none; position: relative; }
.rtm-d.today::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--ink-2); }
.rtm-strip { padding-bottom: 5px; }
.rtm-d { height: auto; aspect-ratio: 1; }

/* 작게 보기 = 같은 달력 모양을 작게 (칸 20px 정사각형) */
.rtm-grid { display: grid; grid-template-columns: repeat(7, 20px); gap: 3px; }
.rtm-d { width: 20px; height: 20px; aspect-ratio: auto; display: grid; place-items: center; border: 0; padding: 0; border-radius: 5px; background: var(--surface); font-size: 9px; font-family: var(--font-num); color: var(--mute); line-height: 1; cursor: pointer; }
.rtm-d.on { color: #fff; font-weight: 600; }
.rtm-d.skip { background: none; opacity: .3; cursor: default; }
.rtm-d.today::after { display: none; }
.rtm-strip { display: none; }
.rt-mini { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.rt-mini .rtm-head { margin: 0; }
/* 오늘 표시: 진한 테두리 대신 옅은 테두리 */
.rt-d.today, .rtm-d.today { box-shadow: inset 0 0 0 1px var(--mute); }
.rt-d.today.on, .rtm-d.today.on { box-shadow: none; }

/* 작게 보기: 루틴 두 개씩 나란히, 칸 17px */
.rtm-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.rt-mini { display: block; border-bottom: 0; padding: 8px 0 10px; }
.rt-mini .rtm-head { margin: 0 0 6px; }
.rtm-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.rtm-d { width: auto; height: auto; aspect-ratio: 1; font-size: 8.5px; border-radius: 4px; }

/* 로그인: 구글 버튼 + 권한 안내 */
.lg-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: min(320px, 100%); height: 48px; border: 1px solid var(--line-strong, #dadce0); border-radius: 999px; background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; margin: 6px auto 0; }
.lg-google:hover { background: var(--surface); }
.lg-perm { display: grid; gap: 6px; max-width: 360px; margin: 22px auto 0; padding: 14px 16px; border-radius: 14px; background: var(--surface); text-align: left; font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.lg-perm > b { font-size: 12px; color: var(--ink); }
.lg-perm-s { max-width: 340px; margin: 14px auto 0; font-size: 11.5px; line-height: 1.5; color: var(--mute); }

/* 빠른 입력 마감 */
.qa-due { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 0 10px; height: 34px; border-radius: 10px; background: var(--surface); font-size: 12px; color: var(--mute); cursor: pointer; }
.qa-due.hidden { display: none; }
.qa-due span { flex: none; font-weight: 600; }
.qa-due input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink-2); outline: none; cursor: pointer; }
.qa-due-x { border: 0; background: none; color: var(--mute); font-size: 11px; cursor: pointer; padding: 2px; }
input[type="date"], input[type="time"] { cursor: pointer; }

/* D-day 칩: 하루 전·당일은 옅은 붉은 배경, 지나면 진한 붉은색 */
.due-b.soon { color: #d93036; background: #fdecec; }
.due-b.late { color: #fff; background: #e5484d; }
/* 빠른 입력 창 정렬: 입력·메모·마감 줄을 같은 높이·같은 안쪽 여백으로 */
.popover #qa { height: 36px; padding: 0 12px; font-size: 13px; }
.popover .qa-memo { min-height: 36px; padding: 9px 12px; font-size: 13px; line-height: 18px; }
.popover .qa-due { height: 36px; padding: 0 8px 0 12px; gap: 10px; font-size: 13px; }
.popover .qa-due span { font-weight: 500; color: var(--mute); }
.popover .qa-due input { height: 100%; padding: 0; background: transparent; border-radius: 0; font-size: 13px; color: var(--ink-2); }
.popover .qa-due + .segctl, .popover .qa-due.hidden + .segctl { margin: 8px 0 0; }
.popover .hint { line-height: 1.5; }

/* ===== 소식 ===== */
.news-btn { position: relative; }
.news-btn i { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px #fff; display: none; }
.news-btn.has-new i { display: block; }
.news-view { position: fixed; inset: 0; z-index: 70; background: rgba(11,12,14,.28); display: flex; justify-content: center; align-items: stretch; animation: fade-in .15s ease-out; }
html.nw-open { overflow: hidden; }
.nw-wrap { position: relative; width: min(560px, 100%); margin: 24px 0; background: #f6f6f7; border-radius: 22px; overflow-y: auto; scrollbar-width: none; box-shadow: 0 20px 60px rgba(11,12,14,.18); }
.nw-wrap::-webkit-scrollbar { display: none; }
.nw-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #fff; color: var(--ink-2); cursor: pointer; z-index: 2; }
.nw-root { padding: 26px 22px 40px; }
.nw-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-right: 40px; margin-bottom: 10px; }
.nw-meta { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--mute); }
.nw-head h2 { margin: 4px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.nw-actions { display: flex; gap: 6px; }
.nw-root .pill-btn { height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.nw-root .nw-fb { background: var(--ink); color: #fff; box-shadow: none; }
.nw-intro { margin: 6px 0 18px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.nw-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 2px solid var(--line); margin-bottom: 6px; }
.nw-tabs button { height: 42px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--mute); cursor: pointer; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.nw-tabs button.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.nw-sec { margin: 22px 2px 10px; font-size: 14px; font-weight: 700; }
.nw-card { display: block; width: 100%; text-align: left; border: 0; background: #fff; border-radius: 16px; padding: 16px 18px 14px; margin-bottom: 10px; font: inherit; color: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.nw-card:hover { box-shadow: 0 0 0 1px var(--line), 0 6px 16px -10px rgba(0,0,0,.2); }
.nw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nw-date { font-size: 12px; color: var(--mute); font-family: var(--font-num); }
.nw-kind { flex: none; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.k-feature { color: #c2417e; background: #fdecf4; }
.k-bug { color: #2b7bb9; background: #e8f4fc; }
.k-notice { color: var(--ink-2); background: var(--surface); }
.nw-title { margin: 8px 0 12px; font-size: 16px; font-weight: 700; line-height: 1.4; }
.nw-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nw-more { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mute); }
.nw-st { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface); color: var(--ink-2); }
.nw-st.st-doing { background: #fff4d6; color: #a86b00; }
.nw-st.st-done { background: #e7f6ec; color: #23864a; }
.nw-like { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; background: var(--surface); color: var(--ink-2); font-size: 13px; font-family: var(--font-num); cursor: pointer; }
.nw-like b { font-weight: 600; }
.nw-like:hover { background: #ececee; }
.nw-like.on { background: var(--ink); color: #fff; }
.nw-empty { display: grid; gap: 4px; place-items: center; text-align: center; padding: 28px 16px; background: #fff; border-radius: 16px; font-size: 13px; color: var(--ink-2); }
.nw-empty b { font-size: 14px; color: var(--ink); }
.nw-none { text-align: center; color: var(--mute); font-size: 13px; padding: 30px 0; }
.nw-detail { background: #fff; border-radius: 18px; padding: 20px 20px 16px; margin-top: 8px; }
.nw-detail h2 { margin: 10px 0 8px; font-size: 21px; font-weight: 800; line-height: 1.35; }
.nw-body { margin: 14px 0 18px; font-size: 14.5px; line-height: 1.75; color: var(--ink); white-space: normal; }
.nw-want { font-size: 13px; color: var(--mute); }
@media (max-width: 719px) {
  .nw-wrap { margin: 0; border-radius: 0; width: 100%; }
  .nw-root { padding: 20px 16px calc(40px + env(safe-area-inset-bottom)); }
  .nw-head h2 { font-size: 26px; }
}
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
/* 터치 기기: 마우스를 올려야 보이던 버튼을 옅게라도 늘 보이게 */
@media (hover: none) {
  .quad-name .pen { opacity: .5; }
  .dl-evline .dl-plus { opacity: .6; }
}

.local-warn, .lg-warn { color: #b25e00; background: #fff6e8; border-radius: 10px; padding: 10px 12px; line-height: 1.55; }
.lg-warn { max-width: 340px; margin: 14px auto 0; font-size: 12.5px; text-align: left; }
.kc-row { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; }
.kc-row code { flex: 1; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-family: var(--font-num), monospace; font-size: 14px; letter-spacing: .04em; word-break: break-all; }

.lg-legal { max-width: 340px; margin: 18px auto 0; font-size: 11.5px; line-height: 1.6; color: var(--mute); }
.lg-legal a { color: var(--ink-2); }
a.cal-set-row { text-decoration: none; color: inherit; }

/* ===== 처음 쓰는 사람용 안내 ===== */
.modal:has(.ob) { width: min(440px, calc(100vw - 24px)); padding: 0 22px 18px; }
.ob { position: relative; padding-top: 18px; }
.ob-skip { position: absolute; top: 14px; right: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--mute); cursor: pointer; }
.ob-body { min-height: 360px; }
.ob-body h2 { margin: 18px 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.ob-body p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.ob-art { margin-top: 28px; height: 190px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; overflow: hidden; padding: 12px; }
.ob-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.ob-foot .pill-btn { height: 34px; padding: 0 16px; border: 0; border-radius: 17px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ob-foot .ob-next { background: var(--ink); color: #fff; }
.ob-dots { display: flex; gap: 6px; } .ob-dots i { width: 6px; height: 6px; border-radius: 3px; background: #d6d8de; transition: width .2s; } .ob-dots i.on { width: 16px; background: var(--ink); }
/* 그림들 */
.ob-sheet { width: 100%; max-width: 320px; background: #fff; border-radius: 12px; padding: 8px 8px 6px; font-size: 10px; }
.ob-days, .ob-row, .ob-time { display: grid; grid-template-columns: 28px repeat(5, 1fr); align-items: center; }
.ob-days b { text-align: center; font-weight: 600; color: var(--ink-2); padding-bottom: 4px; border-bottom: 1px solid #c9cbd1; }
.ob-days i { border-bottom: 1px solid #c9cbd1; align-self: stretch; }
.ob-time { height: 40px; border-bottom: 1px solid var(--line); } .ob-time i { font-style: normal; color: var(--mute); font-size: 9px; }
.ob-ev { grid-row: 1; margin: 0 2px; padding: 3px 4px; border-radius: 4px; border-top: 2px solid; font-weight: 600; font-size: 9px; }
.ob-label { text-align: center; color: var(--mute); font-size: 9.5px; padding: 5px 0; }
.ob-row { height: 26px; border-top: 1px solid var(--line); } .ob-row i { font-style: normal; text-align: center; }
.ob-row span { font-size: 9.5px; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid var(--line); height: 100%; display: flex; align-items: center; }
.ob-row.big { height: 44px; grid-template-columns: 34px repeat(3, 1fr); width: 100%; max-width: 300px; background: #fff; border-radius: 10px; border: 0; font-size: 12px; }
.ob-row.big span { font-size: 12px; }
.ob-tree { display: grid; justify-items: center; gap: 2px; font-size: 13px; }
.ob-node { background: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 700; text-align: center; } .ob-node small { display: block; font-weight: 500; font-size: 10.5px; color: var(--mute); }
.ob-node.c1 { box-shadow: inset 0 0 0 1.5px #3b8ee0; } .ob-node.c2 { box-shadow: inset 0 0 0 1.5px #d9488c; }
.ob-arrow { color: var(--mute); font-size: 12px; line-height: 1; }
.ob-pair { display: flex; gap: 8px; }
.ob-write, .ob-drag { width: 100%; display: grid; justify-items: center; gap: 8px; position: relative; }
.ob-tap { color: #3b8ee0; font-weight: 700; animation: ob-pulse 1.4s ease-in-out infinite; }
.ob-pop { width: 210px; background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 8px 22px -10px rgba(0,0,0,.25); font-size: 11.5px; }
.ob-in { background: var(--surface); border-radius: 8px; padding: 7px 9px; } .ob-in em { font-style: normal; color: #3b8ee0; animation: ob-blink 1s steps(1) infinite; }
.ob-seg { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; text-align: center; background: var(--surface); border-radius: 8px; padding: 2px; }
.ob-seg b { background: #fff; border-radius: 6px; padding: 3px 0; } .ob-seg span { padding: 3px 0; color: var(--mute); }
.ob-hint { margin-top: 5px; font-size: 9.5px; color: var(--mute); }
.ob-chip { font-size: 11px; font-weight: 600; } .ob-chip.from { animation: ob-move 2.2s ease-in-out infinite; position: relative; z-index: 1; background: #fdeaf3; border-radius: 6px; margin: 6px 2px; justify-content: center; border-left: 0 !important; }
.ob-dash { border: 1.5px dashed #c9cbd1 !important; border-radius: 6px; margin: 6px 2px; }
.ob-hand { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ob-must { display: flex; gap: 10px; width: 100%; max-width: 320px; }
.ob-card { flex: 1; background: #fff; border-radius: 12px; padding: 10px; font-size: 11px; display: grid; gap: 5px; align-content: start; }
.ob-card b { font-size: 12px; } .ob-d { color: #d93036; background: #fdecec; border-radius: 4px; padding: 0 4px; font-size: 9.5px; font-weight: 600; } .ob-p { color: #c2417e; font-size: 9.5px; }
.ob-hb { display: flex; gap: 4px; } .ob-hb span { width: 16px; height: 16px; border-radius: 4px; background: var(--surface); } .ob-hb span.on { background: #f59e3b; }
.ob-card small { color: var(--mute); }
@keyframes ob-pulse { 0%,100% { opacity: .35 } 50% { opacity: 1 } }
@keyframes ob-blink { 50% { opacity: 0 } }
@keyframes ob-move { 0%,15% { transform: translateX(0) } 55%,85% { transform: translateX(100%) } 100% { transform: translateX(0) } }
@media (max-width: 719px) { .ob-body { min-height: 380px; } }
#loginGate .lg-legal { margin-top: 22px; }
.cal-set-row .chev { margin-left: auto; }

/* ===== 모바일 다듬기 (2026-11-17) ===== */
/* 빠른 입력: 어느 트랙·어느 날에 적는지 맨 위에 */
.qa-where { display: flex; align-items: center; gap: 7px; margin: 0 2px 8px; font-size: 12.5px; min-width: 0; }
.qa-where .track-icon { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; display: grid; place-items: center; flex: none; }
.qa-where b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.qa-where span:last-child { margin-left: auto; flex: none; color: var(--mute); font-family: var(--font-num); font-size: 12px; }
/* 1일 보기: 시간만 있는 왼쪽 칸은 좁게 */
@media (min-width: 720px) { .sheet.is-day { --gutter: 64px; } }
/* 종일 줄: 모바일에도 "종일" 접기 버튼(왼쪽 칸) */
@media (max-width: 719px) {
  .allday { margin-left: 0 !important; display: grid !important; grid-template-columns: var(--gutter) repeat(var(--cols), minmax(0, 1fr)) !important; }
  .allday > .allday-label { display: flex !important; align-items: flex-start; justify-content: center; padding: 5px 0 0; font-size: 10px; color: var(--mute); }
  .allday .chips { grid-column: 2 / -1 !important; }
  .allday-label .ad-fold { padding: 2px 2px; gap: 1px; }
}
@media (max-width: 719px) {
  :root { --gutter: 44px; --fs-cell: 11px; --fs-dow: 10px; --fs-time: 9px; }
  /* 시간 글자도 트랙 아이콘처럼 왼쪽 칸 가운데에 → 같은 여백 */
  .time-label { right: auto; left: 50%; transform: translate(-50%, 10px); }
  .span-bar { font-size: 10.5px; height: 22px; }
  .event .ev-title { font-size: 10.5px; }
  #trackRows .hb-name { font-size: 10.5px; }
  /* 빈 트랙 줄: 삼각형과 글자를 한 줄로 */
  #trackRows .empty-toggle { display: flex !important; }
  #trackRows .empty-toggle .et-head { flex: none; width: auto; white-space: nowrap; padding: 0 6px 0 4px; }
  #trackRows .empty-toggle .et-name { font-size: 11px; }
  #trackRows .empty-toggle .et-fill { flex: 1; padding: 0 6px; }
  #trackRows .empty-toggle .et-names { font-size: 11px; }
  /* 위 버튼들: 왼쪽으로 쏠리지 않게 줄 폭을 꽉 채움 */
  #view-week .week-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; }
  #view-week .week-actions .head-nav { width: 100%; margin-right: 0; }
  #view-week .week-actions .head-nav .seg { flex: 1; width: auto; }
  #view-week .week-actions .pill-group { justify-self: start; }
  #view-week .week-actions .panel-toggle { justify-self: end; }
  /* 아래 메뉴: 네 탭을 고르게 */
  .bottombar { gap: 10px; padding-left: 12px; padding-right: 12px; }
  .bottombar .tabs { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .bottombar .tab { padding: 0 4px; text-align: center; font-size: 13px; }
}
@media (max-width: 719px) { #trackRows .empty-toggle .et-head { flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 5px; } }

/* 모바일 데일리: 긴 줄은 칸 안에서 접어 보이기 */
.dl-grid.wrap .dl-ta { white-space: pre-wrap; overflow-wrap: anywhere; word-break: keep-all; }
.dl-grid.wrap .dl-hours span { box-sizing: border-box; align-items: flex-start; padding-top: calc(var(--lh) - 22px); padding-bottom: 0; }

/* 모바일 빠른 입력 = 바텀시트 */
.popover.as-sheet { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; border-radius: 22px 22px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(11,12,14,.14); z-index: 61; animation: sheet-up .2s ease-out; }
.popover.as-sheet::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: #dcdee3; margin: -4px auto 10px; }
.popover.as-sheet #qa, .popover.as-sheet .qa-memo, .popover.as-sheet .qa-due input { font-size: 16px; }
.popover.as-sheet #qa, .popover.as-sheet .qa-due { height: 44px; }
.popover.as-sheet .qa-where { font-size: 14px; } .popover.as-sheet .qa-where .track-icon { width: 26px; height: 26px; }
.popover.as-sheet .segctl button { height: 34px; font-size: 13px; }
.popover.as-sheet .hint { display: none; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }

/* Projects: 캘린더 필터 이름표, 캘린더별 묶음 머리글, 캘린더 화면의 + 트랙 */
.filter-row .filter-label { flex: none; align-self: flex-start; margin-top: 9px; font-size: 11px; font-weight: 600; color: var(--mute); letter-spacing: .02em; }
.board-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; margin: 14px 2px -2px; font-size: 13px; font-weight: 700; color: var(--ink); }
.board-group:first-child, .inbox-card + .board-group { margin-top: 6px; }
.board-group .cdot { width: 8px; height: 8px; border-radius: 50%; }
.board-group .cnt { font-weight: 500; color: var(--mute); font-size: 12px; }
.add-track-line { padding: 6px 0 2px var(--gutter); }
.add-track-inline { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--mute); padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.add-track-inline:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 719px) { .add-track-line { padding-left: 4px; } }

.guide-row { width: 100%; display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface); font: inherit; text-align: left; cursor: pointer; }
.guide-row:hover { background: #ececee; }
.guide-row .guide-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.guide-row b { display: block; font-size: 14px; } .guide-row small { display: block; font-size: 12px; color: var(--mute); margin-top: 1px; }
.guide-row .chev { margin-left: auto; color: var(--mute); }
