/* DAY 2단계: 일정(구글 캘린더 모양)·할 일·일일 채팅·공유·AI 도구·알림 설정 */

.show-phone-flex { display: none !important; }
.ai-badge { font-size: .62rem; font-weight: 800; color: var(--accent-strong); border: 1px solid currentColor; border-radius: 5px; padding: 0 4px; line-height: 1.4; }
.tb-ai { width: auto; padding: 0 10px; gap: 4px; display: inline-flex; align-items: center; color: var(--accent-strong); font-weight: 700; font-size: .82rem; }
.tb.is-rec { color: var(--danger); background: rgba(229, 72, 77, .12); animation: blink 1.2s infinite; }
.menu-cap { padding: 6px 10px 4px; font-size: .75rem; font-weight: 700; color: var(--text-3); }
.wide-menu .menu-label { white-space: normal; }
.ai-busy { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--text-2); font-size: .9rem; }
.ai-summary { font-size: 1rem; line-height: 1.7; }
.ai-image-out img { width: 100%; border-radius: 12px; margin-top: 8px; }
.moment-tools { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.moment:hover .moment-tools, .moment:focus-within .moment-tools { opacity: 1; }
.moment-tools button { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .78rem; font-weight: 600; }
.moment.kind-audio .moment-tools { position: static; opacity: 1; margin-top: 6px; }
.moment.kind-audio .moment-tools button { background: var(--bg-sunken); color: var(--text-2); }
.entry-author { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: .85rem; background: var(--bg-sunken); border-radius: 9px; padding: 8px 12px; }
.entry-editor.is-readonly .entry-meta .chip { pointer-events: none; }
.entry-editor.is-readonly .tag button { display: none; }
.shared-note { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: .85rem; }

/* 손글씨·스캔 */
.draw-modal .modal-body { display: flex; }
.draw-wrap { display: grid; gap: 10px; width: 100%; }
.draw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sw.sm { width: 24px; height: 24px; border: 1px solid var(--line-strong); }
.pen-size { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.pen-size span { background: var(--text); border-radius: 50%; display: block; }
.pen-size.is-on { background: var(--bg-active); }
.draw-canvas { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 12px; touch-action: none; background: #fff; cursor: crosshair; }
.scan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.scan-page { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3 / 4; }
.scan-page img { width: 100%; height: 100%; object-fit: cover; }
.scan-page > span { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 6px; padding: 0 6px; font-size: .75rem; }
.scan-x { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .55); color: #fff; width: 26px; height: 26px; border-radius: 50%; }
.scan-add { border: 2px dashed var(--line-strong); border-radius: 10px; aspect-ratio: 3 / 4; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--text-2); font-size: .85rem; }

/* 공유: 반응·댓글·구성원 */
.social { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.reaction { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--bg-sunken); font-size: .95rem; }
.reaction b { font-size: .78rem; color: var(--text-2); }
.reaction.is-mine { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.react-pick { display: inline-flex; gap: 2px; opacity: .55; }
.react-pick:hover, .react-pick:focus-within { opacity: 1; }
.react-add { width: 30px; height: 30px; border-radius: 50%; font-size: 1rem; }
.react-add:hover { background: var(--bg-hover); }
.comment { padding: 8px 12px; border-radius: 12px; background: var(--bg-sunken); }
.comment + .comment { margin-top: 6px; }
.comment-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.comment-del { margin-left: auto; width: 28px; height: 28px; }
.comment p { margin: 2px 0 0; white-space: pre-wrap; }
.comment-form { display: flex; gap: 6px; align-items: flex-end; }
.comment-input { min-height: 38px; resize: none; }
.share-box { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.members { display: grid; gap: 4px; }
.member { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.input.sm { min-height: 30px; padding: 2px 8px; font-size: .85rem; }

/* 오늘: 일정 */
.today-event { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.today-event .ag-dot { flex: none; }
.te-time { color: var(--text-2); font-size: .82rem; min-width: 68px; }
.te-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 일일 채팅 */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-list { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; display: flex; gap: 8px; align-items: flex-end; }
.bubble.is-me { align-self: flex-end; flex-direction: row-reverse; }
.bubble-ai { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.bubble-text { padding: 9px 13px; border-radius: 16px; background: var(--bg-sunken); white-space: pre-wrap; line-height: 1.55; font-size: .95rem; }
.bubble.is-me .bubble-text { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.bubble.is-ai .bubble-text { border-bottom-left-radius: 5px; }
.bubble time { font-size: .68rem; color: var(--text-3); flex: none; }
.dots { display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--bg-sunken); border-radius: 16px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
.chat-foot { border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.chat-entry { justify-self: center; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; background: var(--bg-sunken); border-radius: 20px; padding: 4px 4px 4px 14px; }
.chat-input { flex: 1; border: 0; outline: none; background: none; resize: none; max-height: 140px; line-height: 1.5; padding: 7px 0; }
.chat-send { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }

/* ---------------- 일정(구글 캘린더 모양) ---------------- */

.app[data-section="schedule"] { grid-template-columns: var(--side-w) 256px minmax(0, 1fr); }
:root[data-sidebar="closed"] .app[data-section="schedule"] { grid-template-columns: 0 256px minmax(0, 1fr); }
/* 일정의 왼쪽 달력 패널 접기(전체 메뉴는 그대로) */
:root[data-sched-panel="closed"] .app[data-section="schedule"] { grid-template-columns: var(--side-w) 0 minmax(0, 1fr); }
:root[data-sched-panel="closed"][data-sidebar="closed"] .app[data-section="schedule"] { grid-template-columns: 0 0 minmax(0, 1fr); }
:root[data-sched-panel="closed"] .app[data-section="schedule"] .listpane { overflow: hidden; border-right: 0; }
/* 일정 머리: '전체 메뉴 펴기'는 전체 메뉴가 접혔을 때만(PC) */
.sched-head .menu-open { display: none; }
:root[data-sidebar="closed"] .sched-head .menu-open { display: inline-grid; }
@media (max-width: 767px) { :root[data-sidebar="closed"] .sched-head .menu-open { display: none; } }

/* 지난 일정은 흐리게(구글 캘린더처럼) */
.ev.is-past, .ag-item.is-past, .today-event.is-past { opacity: .5; }
.ev.is-past:hover, .ag-item.is-past:hover { opacity: .8; }
.app[data-section="schedule"] .listpane { background: var(--bg); }
.app[data-section="schedule"] .list-head { border-bottom: 0; }
.detail[data-mode="schedule"] .detail-head { display: none; }
.detail[data-mode="schedule"] .detail-body { display: flex; }
.sched-side { padding: 4px 10px 24px; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 14px; }
.create-btn {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 0 22px 0 12px; height: 54px; border-radius: 16px;
  background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 4px 10px rgba(0, 0, 0, .08); font-weight: 700; font-size: .95rem;
}
:root[data-theme="dark"] .create-btn { background: var(--bg-sunken); }
.create-btn:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, .22), 0 8px 16px rgba(0, 0, 0, .1); }
.create-plus { color: var(--accent); display: grid; }
.mini-cal { padding: 0 4px; }
.mini-head { display: flex; align-items: center; gap: 2px; padding: 0 2px 4px; }
.mini-head b { flex: 1; font-size: .88rem; }
.mini-head .ibtn { width: 28px; height: 28px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.mini-dow { font-size: .66rem; color: var(--text-3); padding: 4px 0; }
.mini-day { width: 28px; height: 28px; margin: 1px auto; border-radius: 50%; font-size: .74rem; }
.mini-day:hover { background: var(--bg-hover); }
.mini-day.is-out { color: var(--text-3); }
.mini-day.is-sel { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.mini-day.is-today { background: var(--accent); color: #fff; font-weight: 700; }
.cal-list { display: grid; gap: 10px; }
.cal-group { display: grid; gap: 1px; }
.cal-group > b, .cal-group-head b { font-size: .82rem; padding: 6px 8px; }
.cal-group-head { display: flex; align-items: center; justify-content: space-between; }
.cal-row-wrap { display: flex; align-items: center; }
.cal-row-wrap .cal-row { flex: 1; min-width: 0; }
.cal-more { width: 28px; height: 28px; opacity: 0; }
.cal-row-wrap:hover .cal-more, .cal-more:focus-visible { opacity: 1; }
.cal-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: .88rem; }
.cal-row:hover { background: var(--bg-hover); }
.cal-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cal-check { width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--c); flex: none; }
.cal-row input:checked + .cal-check {
  background: var(--c) no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
.cal-row input:focus-visible + .cal-check { outline: 2px solid var(--accent); outline-offset: 2px; }
.cal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-errors { padding: 0 8px; color: var(--danger); }
.connect-card { background: var(--bg-sunken); border-radius: 12px; padding: 12px; font-size: .88rem; }
.connect-card p { margin: 0 0 10px; }

.sched-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sched-head { display: flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: var(--head-h); border-bottom: 1px solid var(--line); }
.sched-title { margin: 0 0 0 8px; font-size: 1.3rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-outline { border-radius: 999px; padding: 0 18px; }
.view-pick { border-radius: 999px; gap: 4px; }
.tasks-toggle.is-on { color: var(--accent); background: var(--accent-soft); }
.sched-wrap { flex: 1; display: flex; min-height: 0; position: relative; }
.sched-body { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; transition: opacity .15s; }
.sched-body.is-loading { opacity: .6; }
.tasks-panel { width: 0; overflow: hidden; border-left: 0 solid var(--line); transition: width .18s ease; display: flex; }
.sched-main.tasks-on .tasks-panel { width: 340px; border-left-width: 1px; }

/* 시간표(일·주) */
.timegrid { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tg-head, .tg-allday { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(0, 1fr)); }
.tg-head { padding-top: 6px; }
.tg-day { display: grid; justify-items: center; gap: 2px; padding: 4px 0 6px; }
.tg-dow { font-size: .72rem; font-weight: 600; color: var(--text-2); }
.tg-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; }
.tg-day:hover .tg-num { background: var(--bg-hover); }
.tg-day.is-today .tg-dow { color: var(--accent-strong); }
.tg-day.is-today .tg-num { background: var(--accent); color: #fff; }
.tg-gutter { font-size: .68rem; color: var(--text-3); text-align: right; padding-right: 8px; align-self: center; }
.tg-allday { grid-template-rows: repeat(var(--lanes), 24px); gap: 2px 0; padding: 2px 0 6px; border-bottom: 1px solid var(--line); min-height: 30px; }
.tg-allday .tg-gutter { grid-column: 1; grid-row: 1 / -1; }
.tg-allday-cell { grid-row: 1 / -1; border-left: 1px solid var(--line); }
.tg-scroll { flex: 1; overflow-y: auto; position: relative; }
.tg-grid { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(0, 1fr)); position: relative; }
.tg-hours { grid-column: 1; }
.tg-hour { height: 48px; position: relative; }
.tg-hour span { position: absolute; top: -8px; right: 8px; font-size: .68rem; color: var(--text-3); white-space: nowrap; }
.tg-col { position: relative; border-left: 1px solid var(--line); cursor: pointer;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 48px); }
.tg-col.is-today { background-color: rgba(45, 183, 245, .035); }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: #EA4335; z-index: 3; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: #EA4335; }

/* 일정 조각 */
.ev { display: flex; align-items: center; gap: 4px; min-width: 0; text-align: left; font-size: .76rem; line-height: 1.25; border-radius: 6px; padding: 1px 6px; color: var(--text); overflow: hidden; }
.ev-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ev-bar { background: var(--c); color: #fff; height: 22px; margin: 0 2px; }
.ev-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.ev-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.ev-block { position: absolute; z-index: 1; flex-direction: column; align-items: flex-start; gap: 0; padding: 3px 6px; background: var(--c); color: #fff;
  border: 1px solid var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.ev-block .ev-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-sub { font-size: .7rem; opacity: .92; }
.ev-block:has(.ev-sub.inline) { flex-direction: row; align-items: center; }
.ev:hover { filter: brightness(.94); }
.ev-dot { height: 22px; }
.ev-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.ev-dot:hover { background: var(--bg-hover); filter: none; }
.ev-time { color: var(--text-2); font-weight: 400; white-space: nowrap; }
.ev-task { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ev-task.is-done .ev-title { text-decoration: line-through; color: var(--text-3); }

/* 월 */
.month { flex: 1; display: grid; grid-template-rows: auto repeat(6, minmax(0, 1fr)); min-height: 0; overflow-y: auto; }
.month-dows { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .72rem; font-weight: 600; color: var(--text-2); padding: 6px 0 2px; border-bottom: 1px solid var(--line); }
.month-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 28px repeat(var(--lanes), 24px) 22px 1fr;
  border-bottom: 1px solid var(--line); min-height: 108px; row-gap: 1px; }
.month-cell { border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative; }
.month-cell:first-child { border-left: 0; }
.month-cell.is-out { background: var(--bg-sunken); }
:root[data-theme="dark"] .month-cell.is-out { background: rgba(255, 255, 255, .02); }
.month-num { margin-top: 4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; font-size: .76rem; font-weight: 600; }
.month-num:hover { background: var(--bg-hover); }
.month-cell.is-out .month-num { color: var(--text-3); }
.month-num.is-today { background: var(--accent); color: #fff; }
.month-more { position: absolute; left: 2px; right: 2px; top: calc(28px + (var(--row) - 2) * 25px); text-align: left; padding: 0 8px; height: 22px; font-size: .74rem; font-weight: 700; color: var(--text-2); border-radius: 6px; }
.month-more:hover { background: var(--bg-hover); }
.month-week > .ev { align-self: stretch; z-index: 1; }

/* 일정 목록 */
.agenda { flex: 1; overflow-y: auto; padding: 8px 0 60px; }
.ag-day { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ag-date { display: grid; justify-items: start; align-content: start; text-align: left; }
.ag-date b { font-size: 1.6rem; font-weight: 500; line-height: 1.1; }
.ag-date small { color: var(--text-2); font-size: .75rem; }
.ag-day.is-today .ag-date b { color: var(--accent-strong); }
.ag-list { display: grid; gap: 2px; }
.ag-item { display: grid; grid-template-columns: 12px 130px 1fr; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-align: left; font-size: .9rem; }
.ag-item:hover { background: var(--bg-hover); }
.ag-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.ag-time { color: var(--text-2); font-size: .82rem; }
.ag-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-title.is-done { text-decoration: line-through; color: var(--text-3); }

/* 일정 자세히(팝오버)·편집 창 */
.ev-pop { display: grid; gap: 8px; padding: 6px 10px 10px; width: min(360px, calc(100vw - 32px)); }
.ev-pop-actions { display: flex; justify-content: flex-end; gap: 2px; margin: 0 -6px; }
.ev-pop-title { display: flex; gap: 12px; align-items: flex-start; }
.ev-pop-title h3 { margin: 0; font-size: 1.15rem; font-weight: 500; }
.ev-pop-title p { margin: 2px 0 0; }
.ev-pop-sq { width: 14px; height: 14px; border-radius: 4px; background: var(--c); margin-top: 6px; flex: none; }
.ev-pop-row { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: .88rem; }
.ev-pop-row.desc { white-space: pre-wrap; max-height: 160px; overflow-y: auto; }
.ev-form { display: grid; gap: 12px; }
.title-input { font-size: 1.3rem; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; padding: 6px 2px; }
.title-input:focus { box-shadow: none; border-bottom-color: var(--accent); }
.ev-form-row { display: flex; gap: 12px; align-items: flex-start; }
.ev-form-row > .ico { margin-top: 9px; color: var(--text-2); }
.ev-form-row > .input, .ev-form-row > textarea { flex: 1; }
.ev-form-indent { margin: 0 0 0 30px; }

/* 할 일 패널(구글 Tasks) */
.tasks { width: 340px; flex: none; display: flex; flex-direction: column; overflow-y: auto; background: var(--bg); }
.tasks-head { display: flex; align-items: flex-start; gap: 2px; padding: 12px 8px 8px 16px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.tasks-title { flex: 1; display: grid; }
.tasks-title small { font-size: .7rem; font-weight: 700; color: var(--text-3); letter-spacing: .04em; }
.list-pick { display: inline-flex; align-items: center; gap: 4px; font-size: 1.1rem; font-weight: 600; text-align: left; padding: 2px 0; }
.task-add { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 16px; }
.task-add-ico { color: var(--accent); display: grid; }
.task-add-in { flex: 1; border: 0; outline: none; background: none; min-height: 34px; color: var(--accent-strong); font-weight: 600; min-width: 0; }
.task-add-in::placeholder { color: var(--accent-strong); }
.task-add-due { min-height: 30px; padding: 2px 6px; font-size: .78rem; width: 128px; }
.task { display: flex; align-items: flex-start; gap: 6px; padding: 6px 8px 6px 12px; }
.task:hover { background: var(--bg-hover); }
.task.is-sub { padding-left: 40px; }
.task-check { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); flex: none; }
.task-check:hover { color: var(--accent); background: var(--accent-soft); }
.task.is-done .task-check { color: var(--accent); }
.task-body { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; padding: 6px 0; }
.task-title { font-size: .92rem; overflow-wrap: anywhere; }
.task.is-done .task-title { text-decoration: line-through; color: var(--text-3); }
.task-notes { font-size: .78rem; color: var(--text-2); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-due { display: inline-flex; align-items: center; gap: 4px; justify-self: start; font-size: .72rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); }
.task-due.is-over { color: var(--danger); border-color: var(--danger); }
.task-del { width: 30px; height: 30px; opacity: 0; }
.task:hover .task-del, .task-del:focus-visible { opacity: 1; }
.task-edit { display: grid; gap: 6px; padding: 8px 12px 8px 16px; background: var(--bg-sunken); }
.done-toggle { display: flex; align-items: center; gap: 6px; padding: 12px 16px; font-weight: 600; font-size: .88rem; color: var(--text-2); border-top: 1px solid var(--line); margin-top: 8px; }

/* 설정: 알림·단축어 */
.reminder { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.day-pick { display: inline-flex; gap: 4px; }
.day-pick button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: .8rem; font-weight: 600; color: var(--text-2); }
.day-pick button.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.55; }
.code-line { display: inline-block; font-family: var(--mono); font-size: .8rem; background: var(--bg-sunken); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.swatch.inline { display: inline-block; vertical-align: -2px; }

/* 일기장 PDF(인쇄) */
.print-book { display: none; }
@media print {
  body.print-book-mode > :not(.print-book) { display: none !important; }
  body.print-book-mode .print-book { display: block; }
  .print-cover { text-align: center; padding: 30vh 0; page-break-after: always; }
  .print-cover h1 { font-size: 2.4rem; margin: 0 0 12px; }
  .print-entry { padding: 0 0 24px; border-bottom: 1px solid #ddd; margin-bottom: 24px; }
  .print-meta { color: #666; font-size: .85rem; margin: 0 0 8px; }
}

/* 위치 기록 */
.rec-on { width: 8px; height: 8px; border-radius: 50%; background: #34A853; box-shadow: 0 0 0 3px rgba(52, 168, 83, .2); flex: none; }
.place-intro { margin: 12px; display: grid; gap: 6px; }
.place-intro p { margin: 0; }
.visit { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.visit-no { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.visit-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.visit-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-del { width: 30px; height: 30px; opacity: 0; }
.visit:hover .visit-del, .visit-del:focus-visible { opacity: 1; }
.places-map { flex: 1; }

/* ---------------- 중간 화면 ---------------- */

@media (max-width: 1180px) {
  .sched-main.tasks-on .tasks-panel { position: absolute; right: 0; top: 0; bottom: 0; z-index: 20; box-shadow: var(--shadow); background: var(--bg); }
}

/* ---------------- 휴대폰 ---------------- */

@media (max-width: 767px) {
  .show-phone-flex { display: inline-grid !important; }
  .app[data-section="schedule"], :root[data-sidebar="closed"] .app[data-section="schedule"] { grid-template-columns: 100%; }
  .app[data-section="schedule"] .listpane { display: none; }
  .app[data-section="schedule"] .detail { display: flex; }
  .app[data-section="schedule"][data-drawer="open"] .listpane {
    display: flex; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 60; box-shadow: var(--shadow);
  }
  .app[data-section="schedule"][data-drawer="open"]::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 55; }
  .app[data-section="schedule"] .fab, .app[data-section="chat"] .fab { display: none !important; }
  .sched-head { padding: calc(6px + env(safe-area-inset-top)) 6px 6px; gap: 2px; }
  .sched-title { font-size: 1.05rem; margin-left: 4px; }
  .pill-outline { padding: 0 12px; }
  .sched-main.tasks-on .tasks-panel { position: fixed; inset: 0; width: 100%; z-index: 70; }
  .tasks { width: 100%; padding-top: env(safe-area-inset-top); }
  .tg-head, .tg-allday, .tg-grid { grid-template-columns: 44px repeat(var(--cols), minmax(0, 1fr)); }
  .tg-num { width: 32px; height: 32px; font-size: 1.05rem; }
  .tg-hour span { font-size: .6rem; right: 4px; }
  .month-week { min-height: 86px; }
  .month-num { font-size: .7rem; }
  .ev { font-size: .66rem; padding: 0 3px; }
  .ev-time { display: none; }
  .ag-day { grid-template-columns: 60px 1fr; padding: 8px 10px; }
  .ag-item { grid-template-columns: 10px 92px 1fr; gap: 8px; }
}

/* 날씨 직접 고르기 */
.weather-choices { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.weather-choices .chip.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.detail-head .done-btn { padding: 6px 14px; min-height: 32px; }
