@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@600;700&display=swap');

:root {
  --paper: #f4f0e7;
  --paper-2: #fbf9f4;
  --ink: #292b27;
  --muted: #817e75;
  --line: #ddd8cd;
  --orange: #df6b43;
  --orange-soft: #f6ded4;
  --blue: #506f86;
  --blue-soft: #dce8ee;
  --green: #6e8062;
  --green-soft: #e0e7dc;
  --shadow: 0 18px 50px rgba(55, 50, 41, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }

.app-shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  height: 100vh; position: sticky; top: 0; padding: 28px 20px 20px;
  border-right: 1px solid var(--line); background: rgba(251,249,244,.76);
  display: flex; flex-direction: column; backdrop-filter: blur(14px); z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; padding: 0 9px; }
.brand-mark {
  width: 39px; height: 39px; display: grid; place-items: center; color: #fff;
  background: var(--ink); border-radius: 12px 12px 12px 4px; font-family: "Noto Serif SC", serif; font-size: 20px;
}
.brand span:last-child { display: flex; flex-direction: column; }
.brand strong { font-family: "Noto Serif SC", serif; font-size: 19px; letter-spacing: .08em; }
.brand small, .profile small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.main-nav { margin-top: 43px; display: grid; gap: 7px; }
.nav-item, .space-item {
  border: 0; background: transparent; text-align: left; display: flex; align-items: center;
  width: 100%; cursor: pointer; border-radius: 10px; color: #6d6b64; transition: .2s ease;
}
.nav-item { padding: 11px 12px; gap: 13px; font-weight: 500; }
.nav-item:hover, .nav-item.active { background: #e9e4d9; color: var(--ink); }
.nav-item.active { font-weight: 600; }
.nav-icon { width: 19px; text-align: center; font-size: 18px; }
.nav-count { margin-left: auto; background: var(--orange); color: white; font-size: 10px; min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 20px; }
.spaces { margin-top: 36px; }
.section-label { display: flex; justify-content: space-between; color: #a09c91; font-size: 10px; letter-spacing: .12em; padding: 0 11px 10px; }
.section-label button { border: 0; background: transparent; cursor: pointer; color: #8b887f; font-size: 16px; }
.space-item { padding: 8px 11px; gap: 10px; font-size: 12px; }
.space-item:hover { color: var(--ink); transform: translateX(2px); }
.space-item span { margin-left: auto; font-size: 10px; color: #a19d93; }
.space-dot { width: 8px; height: 8px; border-radius: 50%; }
.coral { background: var(--orange); }.blue { background: var(--blue); }.green { background: var(--green); }
.sidebar-card { margin-top: auto; background: #ebe6db; border: 1px solid #dfd9cd; padding: 16px; border-radius: 14px; position: relative; overflow: hidden; }
.sidebar-card .spark { color: var(--orange); position: absolute; right: 14px; top: 11px; }
.sidebar-card strong { font-family: "Noto Serif SC", serif; font-size: 12px; }
.sidebar-card p { font-size: 10px; line-height: 1.7; color: var(--muted); margin: 7px 0 12px; }
.tiny-bars { display: flex; align-items: end; height: 24px; gap: 5px; }
.tiny-bars i { flex: 1; background: #c9c3b6; border-radius: 3px 3px 1px 1px; }
.tiny-bars i.today { background: var(--orange); }
.profile { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 17px 8px 0; cursor: pointer; text-align: left; }
.profile > span:nth-child(2) { display: flex; flex-direction: column; }
.profile strong { font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: white; display: grid; place-items: center; font-size: 12px; }
.more { margin-left: auto; color: #a09d95; font-size: 11px; letter-spacing: 1px; }

main { min-width: 0; }
.topbar {
  height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; padding: 0 40px; background: rgba(244,240,231,.8); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 8;
}
.mobile-menu { display: none; }
.date-nav { display: flex; gap: 20px; align-items: center; font-size: 12px; font-weight: 600; }
.date-nav button, .icon-btn, .focus-top button { border: 0; background: transparent; cursor: pointer; color: #99958c; }
.date-nav button { font-size: 22px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 35px; height: 35px; border-radius: 9px; font-size: 20px; position: relative; }
.icon-btn:hover { background: #e9e4d9; }
.notification i { position: absolute; width: 5px; height: 5px; background: var(--orange); border-radius: 50%; right: 8px; top: 7px; }
.primary-btn { border: 0; border-radius: 9px; background: var(--ink); color: #fff; padding: 10px 15px; cursor: pointer; font-size: 11px; margin-left: 5px; }
.primary-btn span { margin-right: 6px; }
.content { max-width: 1320px; margin: auto; padding: 40px 44px 54px; }
.welcome { display: flex; justify-content: space-between; align-items: end; margin-bottom: 32px; }
.eyebrow, .overline { font-size: 9px; letter-spacing: .17em; color: #9a968c; font-weight: 700; }
.welcome h1 { font-family: "Noto Serif SC", serif; font-size: clamp(25px, 2.4vw, 35px); margin: 8px 0 9px; letter-spacing: -.02em; }
.welcome h1 span { color: var(--orange); font-size: 18px; vertical-align: top; }
.welcome > div > p:last-child { color: var(--muted); font-size: 12px; margin: 0; }
.ai-plan-btn {
  border: 1px solid #d8d2c6; background: rgba(251,249,244,.72); display: flex; align-items: center;
  text-align: left; gap: 11px; border-radius: 13px; padding: 10px 15px 10px 10px; cursor: pointer; box-shadow: 0 6px 20px rgba(60,55,45,.04);
}
.ai-plan-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ai-orb { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; color: var(--orange); background: var(--orange-soft); }
.ai-plan-btn > span:last-child { display: flex; flex-direction: column; }
.ai-plan-btn strong { font-size: 11px; }.ai-plan-btn small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(560px, 1fr) 295px; gap: 22px; align-items: start; }
.plan-panel, .focus-card, .review-card, .quick-note {
  background: rgba(251,249,244,.8); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 5px 25px rgba(60,55,45,.035);
}
.plan-panel { padding: 29px 31px 0; }
.panel-heading, .card-title-row { display: flex; justify-content: space-between; align-items: start; }
.panel-heading h2, .card-title-row h3 { font-family: "Noto Serif SC", serif; margin: 5px 0 0; font-size: 18px; }
.plan-progress { text-align: right; display: flex; flex-direction: column; }
.plan-progress strong { font-size: 13px; }.plan-progress span { color: var(--muted); font-size: 9px; margin-top: 2px; }
.timeline { margin-top: 25px; }
.task { min-height: 98px; display: grid; grid-template-columns: 58px 17px 24px minmax(0, 1fr) auto; gap: 11px; position: relative; padding-bottom: 17px; }
.time { display: flex; flex-direction: column; align-items: end; padding-top: 3px; }
.time strong { font-size: 11px; }.time span { font-size: 8px; color: #a5a198; margin-top: 5px; white-space: nowrap; }
.line { position: relative; height: 100%; display: flex; justify-content: center; }
.line::before { content:""; position: absolute; top: 13px; bottom: -13px; width: 1px; background: #ddd8ce; }
.task:last-child .line::before { display: none; }
.line i { width: 7px; height: 7px; border: 2px solid #aaa69b; border-radius: 50%; background: var(--paper-2); z-index: 1; margin-top: 7px; }
.current .line i { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.done .line i { background: var(--green); border-color: var(--green); }
.check { margin-top: 0; width: 21px; height: 21px; border-radius: 6px; border: 1px solid #d2ccc0; background: transparent; cursor: pointer; font-size: 11px; }
.done .check { color: #fff; background: var(--green); border-color: var(--green); }
.task-content h3 { margin: 7px 0 3px; font-size: 13px; font-weight: 600; }
.task-content > p { color: var(--muted); font-size: 10px; margin: 0; }
.task.done .task-content { opacity: .65; }
.task-meta { display: flex; align-items: center; gap: 8px; color: #98948a; font-size: 8px; }
.tag { padding: 3px 7px; border-radius: 5px; font-weight: 600; }
.coral-tag { background: var(--orange-soft); color: #ae5032; }.blue-tag { background: var(--blue-soft); color: #486476; }.green-tag { background: var(--green-soft); color: #5a6f51; }
.status-pill, .difficulty { font-size: 8px; color: var(--muted); padding-top: 6px; }
.start-btn, .quiet-btn { align-self: center; border-radius: 8px; font-size: 9px; padding: 8px 11px; cursor: pointer; }
.start-btn { border: 0; color: white; background: var(--orange); box-shadow: 0 6px 14px rgba(223,107,67,.2); }
.quiet-btn { border: 1px solid #d8d2c6; background: transparent; }
.ai-note { display: inline-flex; align-items: center; gap: 5px; background: #eeeae1; padding: 6px 9px; border-radius: 7px; font-size: 8px; color: #736f66; margin-top: 9px; }
.ai-note span { color: var(--orange); }
.plan-footer { border-top: 1px solid var(--line); margin-top: 2px; padding: 15px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.plan-footer span:last-child::before { content: "◷"; margin-right: 5px; }
.right-column { display: grid; gap: 16px; }
.focus-card { padding: 20px; text-align: center; background: var(--ink); color: #f8f5ee; overflow: hidden; position: relative; }
.focus-card::before { content:""; width: 150px; height: 150px; border-radius: 50%; background: rgba(223,107,67,.13); position: absolute; right: -80px; top: -70px; }
.focus-top { display: flex; justify-content: space-between; }
.focus-top .overline { color: #aaa89f; }.focus-top button { color: #aaa89f; }
.timer-ring {
  --progress: 0deg; width: 126px; height: 126px; margin: 14px auto;
  border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--orange) var(--progress), #444641 0);
  position: relative;
}
.timer-ring::before { content:""; position:absolute; inset: 5px; border-radius: 50%; background: var(--ink); }
.timer-ring div { z-index: 1; display: flex; flex-direction: column; }
.timer-ring strong { font-size: 28px; letter-spacing: -.04em; }.timer-ring span { font-size: 8px; color: #aaa89f; margin-top: 2px; }
.focus-card h3 { font-family: "Noto Serif SC", serif; font-size: 13px; margin: 2px 0 4px; }
.focus-card > p { font-size: 9px; color: #aaa89f; margin: 0 0 14px; }
.focus-main-btn { width: 100%; border: 0; background: #f4f0e7; color: var(--ink); border-radius: 9px; padding: 10px; font-size: 10px; cursor: pointer; }
.review-card { padding: 20px; }
.big-count { font-family: "Noto Serif SC", serif; font-size: 30px; color: var(--orange); }
.review-groups { margin-top: 15px; display: grid; }
.review-groups > div { display: flex; align-items: center; gap: 9px; padding: 11px 0; border-top: 1px solid var(--line); }
.review-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.review-icon.urgent { background: var(--orange-soft); color: var(--orange); }.review-icon.normal { background: var(--blue-soft); color: var(--blue); }
.review-groups p { display: flex; flex-direction: column; margin: 0; }
.review-groups strong { font-size: 10px; }.review-groups small { font-size: 8px; color: var(--muted); margin-top: 2px; }
.review-groups button { margin-left: auto; border: 0; background: transparent; font-size: 8px; color: var(--muted); cursor: pointer; }
.memory-bar { display: flex; gap: 10px; align-items: center; margin-top: 8px; background: #eeeadf; padding: 10px; border-radius: 9px; }
.memory-bar > span { width: 75px; height: 5px; background: #d3cec2; border-radius: 5px; overflow: hidden; }
.memory-bar i { display: block; width: 78%; height: 100%; background: var(--green); }
.memory-bar div { display: flex; flex-direction: column; }.memory-bar strong { font-size: 10px; }.memory-bar small { font-size: 7px; color: var(--muted); }
.quick-note { padding: 15px; display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; background: #e9e4d8; }
.note-pin { color: var(--orange); }.quick-note strong { font-family: "Noto Serif SC", serif; font-size: 9px; }.quick-note p { font-size: 7px; color: var(--muted); margin: 3px 0 0; line-height: 1.5; }
.quick-note button { border: 0; background: transparent; font-size: 8px; color: var(--orange); cursor: pointer; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(31,32,29,.55); backdrop-filter: blur(7px); display: grid; place-items: center; z-index: 50; opacity: 0; visibility: hidden; transition: .25s; padding: 20px; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { width: min(570px, 100%); background: var(--paper-2); border-radius: 22px; padding: 30px; position: relative; box-shadow: 0 25px 80px rgba(0,0,0,.25); transform: translateY(15px) scale(.98); transition: .25s; }
.open .modal { transform: translateY(0) scale(1); }
.modal-close { position: absolute; right: 18px; top: 15px; border: 0; background: transparent; font-size: 22px; color: var(--muted); cursor: pointer; }
.modal-header { display: flex; gap: 14px; align-items: start; }
.modal-icon { width: 42px; height: 42px; border-radius: 13px; background: var(--orange-soft); color: var(--orange); display: grid; place-items: center; font-size: 18px; }
.modal h2 { font-family: "Noto Serif SC", serif; margin: 4px 0 5px; font-size: 20px; }
.modal-header p, .result-header p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.dropzone { border: 1.5px dashed #c8c1b4; background: #f4f0e7; border-radius: 16px; margin-top: 23px; padding: 35px; text-align: center; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: .2s; }
.dropzone.drag, .dropzone:hover { border-color: var(--orange); background: #f8eee8; }
.dropzone input { display: none; }.upload-illustration { font-size: 32px; color: var(--orange); margin-bottom: 10px; }
.dropzone strong { font-size: 12px; }.dropzone p { color: var(--muted); font-size: 9px; margin: 6px 0 15px; }
.browse-btn { background: var(--ink); color: white; padding: 8px 15px; border-radius: 8px; font-size: 9px; }
.privacy-note { display: flex; gap: 9px; align-items: center; margin-top: 15px; color: var(--muted); }
.privacy-note span { color: var(--green); }.privacy-note p { font-size: 8px; line-height: 1.5; margin: 0; }.privacy-note strong { color: var(--ink); }
.result-modal { width: min(750px, 100%); }
.scan-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; border-radius: 22px 22px 0 0; }
.scan-progress span { display: block; height: 100%; background: var(--orange); animation: scan 1.4s ease both; }
@keyframes scan { from { width: 0; } to { width: 100%; } }
.result-header { display: flex; gap: 12px; align-items: center; }
.success-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: white; display: grid; place-items: center; }
.result-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 18px; margin-top: 22px; }
.paper-preview { min-height: 270px; padding: 27px 22px; background: #eee6d3; box-shadow: 0 8px 25px rgba(60,55,45,.1); transform: rotate(-1.5deg); position: relative; color: #565249; font-family: "Noto Serif SC", serif; font-size: 11px; line-height: 2; }
.paper-preview::after { content:""; position:absolute; inset:0; background: repeating-linear-gradient(transparent 0 27px, rgba(100,110,120,.12) 28px); pointer-events:none; }
.paper-preview em { display: block; color: #373934; margin: 12px 0; }
.tape { position:absolute; width: 65px; height: 18px; background: rgba(255,255,255,.45); top: -8px; left: 50%; transform: translateX(-50%) rotate(2deg); }
.organized { border: 1px solid var(--line); border-radius: 13px; padding: 17px; }
.organized h3 { margin: 0 0 14px; font-family: "Noto Serif SC", serif; font-size: 13px; display: flex; justify-content: space-between; }
.organized h3 span { font: 8px "DM Sans"; color: var(--muted); }
.organized h4 { font-size: 9px; color: var(--orange); margin: 12px 0 5px; }
.organized ul { padding-left: 17px; margin: 0; }.organized li { font-size: 9px; color: #5f5c55; line-height: 1.65; margin-bottom: 4px; }
.organized label { display:block; font-size: 9px; margin: 8px 0; }.organized input { accent-color: var(--green); vertical-align: middle; margin-right: 6px; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top: 20px; }
.modal-actions button { border-radius: 8px; padding: 9px 14px; cursor: pointer; font-size: 9px; }
.secondary-action { border: 1px solid var(--line); background: transparent; }.primary-action { border: 0; background: var(--ink); color: white; }
.toast { position: fixed; right: 25px; bottom: 25px; background: var(--ink); color: white; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; z-index: 70; transform: translateY(80px); opacity: 0; transition: .3s; box-shadow: var(--shadow); }
.toast.show { transform: translateY(0); opacity: 1; }.toast > span { width: 24px; height: 24px; display:grid; place-items:center; border-radius:50%; background:var(--green); }
.toast p { margin:0; display:flex; flex-direction:column; }.toast strong { font-size:10px; }.toast small { color:#b9b7af; font-size:8px; margin-top:2px; }

.settings-modal { width: min(760px, 100%); max-height: calc(100vh - 34px); overflow-y: auto; }
.settings-form { margin-top: 23px; }
.form-label { display: block; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; margin-bottom: 9px; }
.provider-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.provider-option {
  position: relative; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line);
  border-radius: 11px; padding: 10px; cursor: pointer; transition: .2s; min-width: 0;
}
.provider-option:hover { border-color: #aaa59a; transform: translateY(-1px); }
.provider-option.selected { border-color: var(--orange); background: #fbede6; box-shadow: 0 0 0 1px var(--orange); }
.provider-option input { position: absolute; opacity: 0; pointer-events: none; }
.provider-option > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.provider-option strong { font-size: 10px; white-space: nowrap; }
.provider-option small { color: var(--muted); font-size: 7px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.provider-logo { flex: 0 0 29px; width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; color: white; font-size: 11px; font-weight: 700; }
.openai-logo { background: #252724; }.claude-logo { background: #b96945; }.qwen-logo { background: #7256bd; }
.deepseek-logo { background: #4b6fdd; }.zhipu-logo { background: #3977c3; }.moonshot-logo { background: #232323; }
.baidu-logo { background: #315ee9; }.custom-logo { background: var(--green); }
.settings-fields { margin-top: 18px; display: grid; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 9px; font-weight: 600; }
.field input {
  width: 100%; border: 1px solid var(--line); background: #f6f2e9; border-radius: 9px;
  padding: 10px 11px; color: var(--ink); outline: none; font-size: 10px;
}
.field input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.field > small { color: var(--muted); font-size: 8px; }.field > small.configured { color: var(--green); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.secret-input { position: relative; }
.secret-input input { padding-right: 52px; }
.secret-input button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--orange); font-size: 8px; cursor: pointer; }
.setting-switch { display: flex; align-items: center; justify-content: space-between; background: #eee9de; border-radius: 11px; padding: 12px; }
.setting-switch > div { display: flex; flex-direction: column; }.setting-switch strong { font-size: 10px; }.setting-switch small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.switch { position: relative; width: 38px; height: 22px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #c8c3b9; transition: .2s; }
.switch span::after { content:""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: white; transition: .2s; box-shadow: 0 2px 5px rgba(0,0,0,.15); }
.switch input:checked + span { background: var(--green); }.switch input:checked + span::after { transform: translateX(16px); }
.settings-security { display: flex; gap: 9px; margin-top: 14px; padding: 10px 12px; border: 1px solid #ded8ca; border-radius: 10px; color: var(--muted); }
.settings-security > span { color: var(--green); }.settings-security p { margin: 0; font-size: 8px; line-height: 1.55; }.settings-security strong { color: var(--ink); }

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .right-column { grid-template-columns: repeat(2, 1fr); }
  .quick-note { grid-column: span 2; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -260px; width: 246px; transition: .3s; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .mobile-menu { display: block; border: 0; background: transparent; cursor: pointer; }
  .topbar { padding: 0 18px; }.date-nav button, .icon-btn { display: none; }
  .primary-btn { padding: 9px 11px; }
  .content { padding: 28px 18px; }
  .welcome { align-items: start; gap: 20px; }.ai-plan-btn small { display: none; }.ai-plan-btn strong { width: 50px; }
  .plan-panel { padding: 23px 16px 0; }
  .task { grid-template-columns: 43px 10px 22px minmax(0,1fr); gap: 7px; }
  .task > :last-child:not(.task-content) { display:none; }
  .ai-note { display:none; }
  .right-column { grid-template-columns: 1fr; }.quick-note { grid-column: auto; }
  .result-grid { grid-template-columns: 1fr; }.paper-preview { min-height: 200px; }
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
}
