﻿:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-soft: #fafafe;
  --text: #171226;
  --muted: #777091;
  --line: #ece8f8;
  --purple-700: #5f42db;
  --purple-600: #6a52e8;
  --purple-500: #7f6ef6;
  --purple-200: #ebe8ff;
  --purple-100: #f5f3ff;
  --danger: #ef3e6b;
  --shadow: 0 14px 28px rgba(75, 60, 150, 0.12);
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: radial-gradient(circle at 10% -20%, #ffffff 0%, var(--bg) 55%); color: var(--text); font-family: var(--font); }
body { min-height: 100vh; }
#app { max-width: 430px; margin: 0 auto; min-height: 100vh; background: var(--surface); box-shadow: 0 0 0 1px #edeaf6, var(--shadow); position: relative; }
.shell { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
.screen { padding: 18px 16px 12px; display: none; }
.screen.active { display: block; }
.title { font-size: 32px; line-height: 1.05; margin: 0 0 6px; letter-spacing: -0.03em; font-weight: 800; }
.subtitle { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
#home.screen { padding-top: 10px; }
.home-top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.home-dot-wrap { width: 22px; height: 22px; position: relative; display: inline-block; }
.home-dot { position: absolute; display: block; border-radius: 999px; }
.home-dot-main { width: 7px; height: 7px; left: 4px; top: 3px; background: #6a52e8; box-shadow: 0 0 0 3px rgba(106, 82, 232, 0.12); }
.home-dot-sub { width: 5px; height: 5px; left: 12px; top: 11px; background: #8c79ff; }
.home-avatar { width: 30px; height: 30px; border: 1px solid #ece8f8; border-radius: 50%; background: #fff; display: grid; place-items: center; padding: 0; }
.home-avatar-face { font-size: 15px; line-height: 1; }
.home-greeting { margin: 0; font-size: 35px; line-height: 1.06; letter-spacing: -0.035em; font-weight: 800; color: #141027; }
.home-helper { margin: 2px 0 10px; color: #8a84a3; font-size: 21px; letter-spacing: -0.01em; font-weight: 600; }
.home-input-card { border-radius: 16px; border-color: #e8e4f4; box-shadow: 0 2px 0 rgba(33, 19, 86, 0.04); padding: 0; overflow: hidden; }
.home-plan-input { min-height: 76px; border: 0; border-radius: 0; padding: 14px 14px 8px; font-size: 13px; font-weight: 600; color: #2b2445; line-height: 1.45; resize: none; }
.home-plan-input::placeholder { color: #8f89a8; opacity: 1; font-weight: 600; }
.home-plan-input:focus { outline: none; }
.home-input-actions { border-top: 1px solid #efebf8; display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; }
.home-sparkle { color: #6a52e8; font-size: 16px; line-height: 1; opacity: 0.95; }
.home-send-btn { width: 30px; height: 30px; border-radius: 999px; border: 0; color: #fff; font-size: 14px; font-weight: 800; background: linear-gradient(180deg, #6d57ec, #4f38d8); box-shadow: 0 4px 10px rgba(91, 66, 212, 0.28); display: grid; place-items: center; padding: 0; }
.home-create-wrap { margin-top: 8px; }
.home-create-btn { width: 100%; border-radius: 10px; min-height: 34px; padding: 7px 12px; font-size: 18px; letter-spacing: -0.01em; background: linear-gradient(90deg, #5f42db, #735cf0); }
.home-summary-card { margin-top: 2px; border-radius: 16px; border-color: #ebe6fb; background: #fff; }
.home-summary-stats { display: grid; gap: 5px; font-size: 13px; color: #5e587a; }
.home-summary-stats strong { color: #35304d; }
.home-summary-chips { margin-top: 10px; }
textarea, input, select { width: 100%; border: 1px solid var(--line); border-radius: 12px; font: inherit; padding: 12px; color: var(--text); background: #fff; }
textarea { min-height: 120px; resize: vertical; }
.btn { border: 0; border-radius: 14px; font: inherit; padding: 12px 14px; font-weight: 700; cursor: pointer; }
.btn-primary { background: linear-gradient(90deg, var(--purple-700), var(--purple-500)); color: #fff; }
.btn-ghost { background: var(--purple-100); color: var(--purple-700); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.recent-item, .task-item, .history-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface-soft); }
.list { display: grid; gap: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 10px; }
.section-head h3 { margin: 0; font-size: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: #fff; color: #504a6d; font-size: 13px; font-weight: 700; }
.chip.active { background: var(--purple-700); color: #fff; border-color: transparent; }
.task-item { display: flex; gap: 10px; align-items: flex-start; }
.check { margin-top: 3px; width: 24px; height: 24px; border: 2px solid #c9c4de; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.check.done { background: var(--purple-700); border-color: var(--purple-700); color: #fff; }
.task-meta { color: var(--muted); font-size: 13px; }
.done-title { text-decoration: line-through; color: #a6a1bc; }
.done-meta { color: #bdb9d0; }
.actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { border: 0; background: transparent; color: #7f789f; cursor: pointer; padding: 4px; }
.bottom-nav { position: fixed; bottom: 0; width: min(430px, 100vw); background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
.tab { text-align: center; font-size: 11px; color: #817aa1; border: 0; background: transparent; font-family: var(--font); font-weight: 700; }
.tab svg { display: block; margin: 0 auto 3px; }
.tab.active { color: var(--purple-700); }
.fab { position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; border: 0; color: #fff; background: linear-gradient(135deg, var(--danger), var(--purple-600)); font-size: 28px; box-shadow: var(--shadow); }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-nav { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #e7e9ef; background: #fff; color: #5f6368; font-size: 20px; line-height: 1; }
.calendar-grid-wrap { border: 1px solid #e6e8ee; border-radius: 8px; overflow: hidden; background: #fff; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.dow { text-align: center; font-size: 11px; color: #6f7481; font-weight: 700; padding: 7px 0; border-bottom: 1px solid #eceff5; }
.day-cell { min-height: 66px; border-right: 1px solid #eceff5; border-bottom: 1px solid #eceff5; padding: 3px 3px 2px; font-size: 11px; position: relative; cursor: pointer; background: #fff; }
.day-cell:nth-child(7n) { border-right: 0; }
.day-num { font-size: 11px; color: #3d4250; font-weight: 600; margin-bottom: 2px; }
.other-month .day-num { color: #c2c6d3; }
.day-cell.sel { background: #f4f8ff; }
.day-events { display: grid; gap: 2px; }
.event-chip { border: 0; border-radius: 3px; height: 13px; text-align: left; padding: 0 4px; font-size: 9px; font-weight: 700; line-height: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.event-chip.done { opacity: .5; }
.event-chip.c1 { background: #1e8e3e; }
.event-chip.c2 { background: #0b8043; }
.event-chip.c3 { background: #039be5; }
.event-chip.c4 { background: #00897b; }
.event-chip.c5 { background: #34a853; }
.more-chip { font-size: 9px; color: #5f6368; padding: 0 2px; line-height: 12px; }
.muted { color: #c0bcce; }
.modal { position: fixed; inset: 0; background: rgba(20,16,40,.32); display: none; align-items: flex-end; }
.modal.show { display: flex; }
.sheet { width: min(430px, 100vw); margin: 0 auto; background: #fff; border-radius: 22px 22px 0 0; max-height: 94vh; overflow: auto; padding: 16px; }
.field { margin-bottom: 12px; }
.field label { display:block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.note { font-size: 12px; color: var(--muted); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); background: #171226; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13px; display: none; z-index: 20; }
.empty { color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; padding: 16px; }
.settings-title { margin: 0 0 10px; font-size: 33px; letter-spacing: -0.03em; font-weight: 800; color: #111126; }
.settings-section-label { margin: 13px 4px 7px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: #8b86a3; text-transform: uppercase; }
.danger-label { color: #b72153; }
.settings-group { background: #fff; border: 1px solid #ece8f8; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 rgba(37, 23, 92, 0.04); }
.settings-row { width: 100%; border: 0; background: #fff; padding: 13px 12px; display: flex; align-items: center; justify-content: space-between; text-align: left; min-height: 60px; }
.settings-row + .settings-row { border-top: 1px solid #f0edf9; }
.settings-row:active { background: #f6f4fd; }
.settings-row-left { display: flex; align-items: center; gap: 10px; color: #2b2445; }
.settings-row-left strong { display: block; font-size: 16px; line-height: 1.1; color: #1d1733; }
.settings-row-left small { display: block; margin-top: 3px; font-size: 12px; color: #8b86a3; font-weight: 600; }
.settings-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: #f4f2ff; color: #5f42db; font-size: 12px; font-weight: 800; border: 1px solid #ece8fb; }
.settings-chevron { color: #aba6bf; font-size: 18px; line-height: 1; }
.danger-group { border-color: #f1d2df; }
.danger-row .settings-icon { background: #ffedf3; color: #b72153; border-color: #f7d8e3; }
.danger-row .settings-row-left strong { color: #b72153; }
.settings-confirm-box { padding: 12px; background: #fff9fb; }
.settings-confirm-box p { margin: 0 0 10px; color: #7c2e4e; font-size: 13px; font-weight: 700; line-height: 1.35; }
.settings-confirm-actions { display: flex; gap: 8px; }
.settings-cancel { background: #f1eef9; color: #554f74; }
.settings-confirm { background: linear-gradient(180deg, #c12a5a, #ad1d4c); color: #fff; }
.settings-detail { padding: 0 12px 11px 46px; border-top: 1px solid #f6f2fb; color: #6f698c; font-size: 13px; line-height: 1.45; }
.recent-editor-overlay { position: fixed; inset: 0; background: #fff; z-index: 40; display: flex; justify-content: center; }
.recent-editor-sheet { width: min(430px, 100vw); min-height: 100vh; background: #fff; padding: calc(8px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom)); }
.recent-editor-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.recent-editor-link { border: 0; background: transparent; color: #5f42db; font-size: 17px; font-weight: 700; padding: 4px 2px; }
.recent-editor-actions { display: flex; gap: 4px; align-items: center; }
.recent-editor-icon { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #ece8f8; background: #fff; color: #7f6ef6; font-size: 14px; line-height: 1; display: grid; place-items: center; padding: 0; }
.recent-editor-done { border: 0; background: transparent; color: #5f42db; font-size: 18px; line-height: 1; font-weight: 800; padding: 4px 2px; }
.recent-editor-date { color: #b9b1d3; font-size: 12px; margin: 1px 0 6px; }
.recent-editor-title { margin: 0 0 12px; font-size: 58px; line-height: 0.94; letter-spacing: -0.04em; color: #414048; font-weight: 800; }
.recent-editor-list { display: grid; gap: 8px; }
.recent-editor-row { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.recent-editor-check { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #d7d1ea; background: #fff; color: transparent; font-size: 17px; font-weight: 800; display: grid; place-items: center; padding: 0; }
.recent-editor-check.checked { background: linear-gradient(180deg, #7f6ef6, #5f42db); color: #fff; border-color: #5f42db; }
.recent-editor-input { border: 0; border-bottom: 1px solid #f1edf9; border-radius: 0; padding: 3px 2px 4px; font-size: 28px; line-height: 1.22; letter-spacing: -0.02em; color: #4a455c; background: transparent; font-weight: 500; }
.recent-editor-input:focus { outline: none; border-bottom-color: #c9bfec; }
.recent-editor-footer { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #8b86a3; font-size: 12px; }
.recent-editor-footer .btn.btn-ghost { padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 700; color: #5f42db; background: #f4f1ff; }
