/* Typography and spacing inspired by the owner's 衣然自得 and 冰弦 sites. */
:root{
  --ink:#203f53;--muted:#607b8d;--line:#d8e7ef;--accent:#087aae;
  --font-latin:Georgia,"Times New Roman",serif;
  font-family:var(--font-reading,"Songti SC",SimSun,serif);
  color:var(--ink);background:#f5faff;font-weight:400;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
::selection{background:#d4edfa;color:#193f59}
button,input,textarea,select{font-family:inherit;font-weight:400}
button{letter-spacing:.025em}
.primary{background:var(--accent);border-color:var(--accent);font-weight:400;box-shadow:0 3px 10px #1d688e0a}
.primary:hover{background:#08638c}
.primary,.secondary,.delete-button,.copy-button{border-radius:10px}
button:focus-visible,a:focus-visible{outline:2px solid #258ab8;outline-offset:4px}
input:focus,textarea:focus,select:focus{outline:2px solid #9bcee7;outline-offset:3px}
.sidebar{width:224px;padding:32px 20px 22px;background:#ffffffef;overflow-y:auto;scrollbar-width:thin}
.brand{font-family:var(--font-display);font-size:34px;letter-spacing:.12em;font-weight:400;padding:0 7px;gap:12px;margin-bottom:32px}
.brand-mark{width:38px;height:42px;border-radius:12px;background:#e3f3fd;color:#227eab;border:1px solid #c4e0ef}
.brand-mark svg{width:25px;height:25px}
.brand small{font-family:var(--font-latin);font-size:9px;letter-spacing:.22em;color:#617d90;margin-top:6px}
.new-note{height:48px;justify-content:center;letter-spacing:.1em;font-size:15px;margin-bottom:28px}
.new-note kbd{font-family:var(--font-latin);font-size:11px;letter-spacing:0}
.nav-item{font-size:16px;min-height:47px;border-radius:9px;gap:10px;color:#4d6f83}
.nav-item.active{font-weight:400;background:#e7f3fb;color:#0b6594}
.nav-item.active:before{content:"";height:15px;width:2px;background:#3f9cc6;border-radius:2px;margin-left:-5px;margin-right:3px}
.nav-count{font-family:var(--font-latin);font-size:13px;color:#5e7a8c}
.nav-label{font-size:12px;letter-spacing:.16em;color:#738a9a;margin:28px 0 12px}
.tag-button{font-size:12px;line-height:1.6;color:#617f93;padding:5px 8px;border-radius:6px;background:#fff}
.sidebar-tags>div{gap:6px;padding:2px 4px}
.sidebar-bottom{padding-top:28px}
.account-button{gap:9px;padding-top:20px}
.account-button strong{font-size:14px;font-weight:400;color:#3e627b}
.account-button small{font-size:11px;color:#6f889a;line-height:1.5}
.avatar{font-family:var(--font-display);font-size:21px;background:#e8f4fc;border:1px solid #d4e7f3}
.main{margin-left:224px}
.topbar{height:66px;padding:0 46px;background:#ffffffb5}
.breadcrumb{font-size:13px;color:#658094;letter-spacing:.06em}
.breadcrumb strong{font-weight:400;color:#385b72}
.sync-status{font-size:12px;color:#617d90}
.sync-status:before{background:#5aa8c6}
.workspace{max-width:1390px;padding:42px 46px 26px}
.page-heading{position:relative;align-items:flex-end;gap:24px;margin-bottom:34px;padding:8px 0 29px;border-bottom:1px solid var(--line)}
.page-heading-main{position:relative;z-index:1;min-width:0}
.eyebrow{font-family:var(--font-latin);font-size:11px;letter-spacing:.23em;color:#6a8ba0;margin-bottom:17px}
.eyebrow:before{content:"";display:inline-block;width:30px;height:1px;background:#aacbdc;vertical-align:middle;margin-right:13px}
h1{font-family:var(--font-display);font-size:clamp(38px,3.55vw,54px);font-weight:400;line-height:1.35;letter-spacing:.045em;margin:0 0 17px;color:#20465f;text-wrap:balance}
.heading-dot{font-family:var(--font-latin);font-weight:400;color:#4cacd2;padding-left:4px}
.page-heading p{font-size:16px;letter-spacing:.025em;line-height:1.9;color:#58768b;max-width:650px}
.today{flex:none;font-family:var(--font-reading);font-size:12px;line-height:2;color:#6b8798;padding-bottom:5px;display:block}
.today strong{font-family:var(--font-latin);font-size:19px;font-weight:400;color:#476b82}
.space-cards{gap:16px;margin-bottom:30px}
.space-card,.space-card.study,.space-card.life{position:relative;background:#ffffffc9;border:1px solid #d6e7f1;border-radius:14px;padding:21px 22px;gap:16px;min-height:104px;box-shadow:0 3px 15px #29567203}
.space-card:hover{transform:translateY(-2px);border-color:#9ccce3;background:#fafdff}
.space-icon,.study .space-icon,.life .space-icon{width:40px;height:40px;border-radius:50%;background:#edf7fd;color:#488cac}
.space-card strong{font-family:var(--font-display);font-size:26px;letter-spacing:.1em;font-weight:400;line-height:1.4;color:#295c7a}
.space-card small,.study small,.life small{font-size:12px;color:#66869a;font-weight:400;line-height:1.6;margin-top:6px}
.space-total,.study .space-total,.life .space-total{font-family:var(--font-latin);font-size:27px;line-height:1;font-weight:400;font-style:italic;color:#85abc1}
.notes-toolbar{gap:10px;margin-bottom:27px}
.search-box{border-color:#d6e6ef;min-height:51px;height:51px;border-radius:10px;gap:12px;padding:0 17px}
.search-box input{font-size:16px;font-weight:400;color:#294c65}
.search-box input::placeholder{color:#7390a3}
.search-box kbd{font-family:var(--font-latin);font-size:11px;color:#6b8698}
.notes-toolbar select{font-size:14px;color:#476d85;border-radius:10px;max-width:150px;min-height:46px}
.view-switch{border-radius:10px;align-items:center;gap:4px}
.view-switch .icon-button{height:37px;width:36px}
.results-heading{margin-bottom:20px;gap:14px;align-items:center}
.results-heading h2{font-family:var(--font-display);font-size:27px;font-weight:400;letter-spacing:.04em;line-height:1.5}
.results-heading h2 span{font-family:var(--font-latin);font-size:14px;font-weight:400;letter-spacing:0;vertical-align:middle;background:#e3f1fa;color:#507d97;padding:3px 7px;margin-left:8px}
.results-hint{font-size:13px;letter-spacing:.04em;color:#66859a}
.text-button{font-size:13px}
.notes-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:21px}
.note-card{border:1px solid #d7e5ee;border-radius:15px;padding:22px 26px 0;min-height:322px;box-shadow:0 4px 18px #294c6504;background:#fff}
.note-card:hover{box-shadow:0 10px 28px #3d718b0c;border-color:#b6d7e8;transform:translateY(-2px)}
.note-top{height:auto;min-height:36px;margin-bottom:17px}
.note-tools{gap:2px}
.note-tools .icon-button{width:36px;height:36px;color:#698797}
.note-tools .is-pinned{color:#1e83b0;background:#edf7fc}
.badge{font-size:12px;letter-spacing:.055em;padding:5px 9px;border-radius:5px;background:#edf7fd;color:#397b9d}
.badge.study,.badge.life{background:#edf7fd;color:#397b9d}
.note-card h3{font-family:var(--font-display);font-size:27px;line-height:1.6;font-weight:400;letter-spacing:.025em;margin:0 0 14px;color:#254b64}
.note-title-button{font-family:inherit;font-size:inherit;letter-spacing:inherit;font-weight:inherit}
.note-preview{font-family:var(--font-reading);font-size:17px;line-height:1.95;color:#4e6a7e;min-height:96px;margin:0 0 20px;letter-spacing:.015em;-webkit-line-clamp:3}
.note-tags{gap:6px;margin:0 0 20px}
.note-tags span{font-size:12px;line-height:1.6;color:#608197;background:#f0f7fb;border-radius:5px;padding:3px 7px;overflow-wrap:anywhere;max-width:100%}
.note-footer{border-top:1px solid #e3edf3;padding:14px 0;font-size:12px;color:#6d8899;gap:10px}
.note-footer-actions{gap:8px;flex-wrap:wrap}
.delete-button,.copy-button{font-size:13px;min-height:39px;padding:8px 12px;gap:6px;color:#47718a}
.delete-button{border-color:#d7e7f0;background:#fff}
.copy-button{background:#ebf6fc}
.copy-button:hover{background:#deeff9}
.add-card{border-color:#bbd4e2;border-radius:15px;min-height:322px;background:#edf7fc55;gap:13px;color:#59869f}
.add-card strong{font-family:var(--font-display);font-size:25px;font-weight:400;letter-spacing:.04em}
.add-card small{font-size:13px;letter-spacing:.03em;color:#6c8a9d}
.add-card>span{width:44px;height:44px;font-family:var(--font-latin);border-color:#c3dce9}
.notes-grid.list{grid-template-columns:1fr}
.list .note-card{grid-template-columns:130px minmax(0,1fr) 175px;min-height:158px;gap:0 24px;padding:21px 26px}
.list .note-top{min-height:36px;align-self:start;flex-wrap:wrap;gap:8px}
.list .note-card h3{font-size:25px;margin:0}
.list .note-preview{font-size:16px;line-height:1.85;min-height:0;margin:9px 0 12px;-webkit-line-clamp:2}
.list .note-footer{padding:0;gap:14px}
.list .note-footer-actions{justify-content:center}
.list .add-card{min-height:95px}
.workspace-footer{font-size:12px;color:#6e8a9c;margin-top:40px;line-height:1.9;letter-spacing:.03em}
dialog{font-family:var(--font-reading);border-color:#cfe2ef;border-radius:18px;box-shadow:0 24px 90px #16354d24}
dialog::backdrop{background:#19374740;backdrop-filter:blur(6px)}
.reader-dialog,.editor-dialog{width:min(1120px,94vw);height:min(1040px,92dvh);background:#fff}
.reader-header,.editor-dialog .dialog-heading{padding:16px 28px;background:#f6fbff;border-bottom:1px solid #dce9f1}
.reader-back{font-size:16px;font-weight:400;letter-spacing:.03em}
.reader-header .badge{font-size:14px;letter-spacing:.08em;background:#eaf5fc}
.reader-scroll{padding:38px clamp(28px,6vw,82px) 70px}
.reader-meta{font-size:13px;letter-spacing:.045em;color:#6c8595;margin-bottom:17px}
.reader-title{font-family:var(--font-display);font-size:44px;font-weight:400;line-height:1.55;letter-spacing:.035em;color:#214760;margin:0 0 23px}
.reader-tags{gap:8px;margin:0 0 30px;padding-bottom:26px;border-bottom:1px solid #e2edf4}
.reader-tags span{font-size:13px;font-weight:400;background:#eef7fc;color:#52788e;padding:5px 10px}
.reader-content{font-family:var(--font-reading);font-size:24px;line-height:2.05;letter-spacing:.02em;color:#2c4d62;font-weight:400;max-width:850px}
.reader-actions{padding:16px 28px;background:#f8fcff;gap:12px}
.reader-actions button{font-size:16px;font-weight:400;letter-spacing:.045em;min-height:50px;border-radius:10px}
.reader-actions .secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.editor-dialog .dialog-heading h2{font-family:var(--font-display);font-size:30px;font-weight:400;letter-spacing:.04em}
.editor-scroll{padding:28px clamp(28px,5vw,65px) 36px}
.editor-dialog .editor-title{font-family:var(--font-display);font-size:35px;font-weight:400;letter-spacing:.025em;line-height:1.6}
.editor-dialog textarea{font-family:var(--font-reading);font-size:22px;line-height:2;letter-spacing:.015em;color:#294c64;background:#f8fcff;border-color:#dcebf3;padding:22px}
.editor-meta label,.editor-meta select,.tags-field,.tags-field input{font-size:16px;font-weight:400}
.editor-dialog .dialog-actions{padding:16px 28px;background:#f8fcff}
.editor-dialog .dialog-actions .primary,.editor-dialog .dialog-actions .secondary{font-weight:400}
.dialog-heading h2,.confirm-dialog h2{font-family:var(--font-display);font-size:28px;font-weight:400;line-height:1.6}
.storage-explanation strong{font-size:18px;font-weight:400}
.storage-explanation p,.confirm-dialog>p{font-size:16px;color:#496e86;line-height:1.95}
.backup-hint{font-size:13px;color:#698497}
.toast{font-size:15px;background:#286e96;font-weight:400;letter-spacing:.025em}

@media(min-width:1600px){.notes-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.notes-grid.list{grid-template-columns:1fr}}
@media(min-width:761px) and (max-width:1100px){
  .sidebar{width:190px;padding:27px 15px 20px}.main{margin-left:190px}
  .brand{font-size:29px;gap:8px;padding:0}.brand-mark{width:33px;height:38px}
  .workspace{padding:30px 26px 24px}.topbar{padding:0 26px}
  h1{font-size:38px}.page-heading p{font-size:15px}.today{display:none}
  .space-card,.space-card.study,.space-card.life{padding:17px 14px;gap:10px;min-height:100px;flex-wrap:wrap}
  .space-icon{display:none}.space-card strong{font-size:25px}.space-card small{font-size:11px;white-space:normal}.space-total{font-size:24px}
  .notes-grid{gap:16px}.note-card{padding:17px 20px 0}.note-card h3{font-size:24px}.note-preview{font-size:16px}
  .note-footer-actions{margin-left:0}.note-footer{gap:8px}.results-hint{display:none}
  .list .note-card{grid-template-columns:105px minmax(0,1fr) 140px;gap:0 16px;padding:20px}.list .note-footer-actions{gap:6px}
}
@media(max-width:760px){
  .sidebar{position:sticky;width:100%;padding:12px 18px 11px;gap:12px;border-bottom:1px solid #cfe3ef;background:#fffffff5;overflow:visible;backdrop-filter:blur(12px)}
  .brand{font-size:30px;letter-spacing:.1em;gap:8px;margin:0;padding:0}.brand-mark{height:35px;width:31px;border-radius:9px}.brand-mark svg{width:22px;height:22px}.brand small{display:none}
  .new-note{min-height:44px;height:44px;font-size:14px;letter-spacing:.025em;width:auto;padding:0 13px;margin:0 0 0 auto;gap:4px;border-radius:10px}.new-note .plus{font-size:22px}.new-note kbd{display:none}
  .sidebar-bottom{padding:0;margin:0}.account-button{width:34px;padding:0;margin:0}.avatar{width:34px;height:34px;font-size:22px}
  .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;flex:1 0 100%;order:3;overflow:visible;padding:4px;background:#f3f9fd;border:1px solid #e2edf5;border-radius:12px}
  .sidebar nav .nav-item{min-height:42px;width:100%;font-size:14px;justify-content:center;padding:9px 4px;gap:5px;margin:0;letter-spacing:.01em;border-radius:8px;white-space:nowrap}
  .sidebar nav .nav-item.active{background:#fff;color:#146b95;box-shadow:0 1px 5px #1b547b0c}
  .nav-item.active:before{display:none}.nav-count{font-size:12px;margin-left:2px}.nav-item svg{width:14px;height:14px}
  .nav-item[data-view="all"]{order:1}.nav-item[data-view="pinned"]{order:2}.nav-item.mobile-trash{display:flex;order:3}.nav-item[data-view="work"]{order:4}.nav-item[data-view="study"]{order:5}.nav-item[data-view="life"]{order:6}
  .category-dot{height:5px;width:5px;margin:0 3px;border-radius:50%}.sidebar-tags,.sidebar-bottom>.nav-item{display:none}
  .main{margin:0}.topbar{height:40px;padding:0 21px;background:transparent}.breadcrumb{font-size:11px;gap:8px}.sync-status{font-size:10px;gap:5px}
  .workspace{padding:22px 20px 25px}.page-heading{padding:0 0 23px;margin-bottom:22px;display:block}
  .eyebrow{font-size:9px;letter-spacing:.17em;margin-bottom:12px}.eyebrow:before{width:22px;margin-right:9px}
  h1{font-size:34px;letter-spacing:.025em;line-height:1.5;margin:0 0 10px;text-wrap:balance}.page-heading p{font-size:14px;line-height:1.9;letter-spacing:.015em;color:#54738a}.today{display:none}
  .space-cards{display:none}
  .notes-toolbar{gap:9px;margin-bottom:23px}.search-box{flex-basis:100%;height:49px;min-height:49px;padding:0 14px}.search-box input{font-size:16px}.search-box kbd{display:none}
  .notes-toolbar select{max-width:none;min-height:42px;height:42px;font-size:14px;padding:0 11px}.view-switch{padding:3px}.view-switch .icon-button{width:37px;height:34px}
  .results-heading{margin-bottom:17px;gap:10px}.results-heading h2{font-size:26px}.results-heading h2 span{font-size:13px}.results-hint{display:none}
  .notes-grid,.notes-grid.list{grid-template-columns:1fr;gap:18px}
  .note-card,.list .note-card{display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:17px 20px 0;gap:0;border-radius:14px}
  .note-top,.list .note-top{min-height:40px;height:auto;margin-bottom:10px;align-self:stretch;flex-wrap:nowrap;gap:8px}
  .note-tools .icon-button{height:40px;width:40px}.note-tools svg{height:18px;width:18px}
  .note-card h3,.list .note-card h3{font-size:26px;font-weight:400;line-height:1.6;margin:0 0 13px;letter-spacing:.015em}
  .note-preview,.list .note-preview{font-size:17px;line-height:1.95;min-height:0;letter-spacing:.015em;margin:0 0 18px;-webkit-line-clamp:3}
  .note-tags,.list .note-tags{margin:0 0 18px;gap:6px}.note-tags span{font-size:12px;padding:3px 7px}
  .note-footer,.list .note-footer{flex-direction:row;align-items:center;justify-content:space-between;min-width:0;padding:12px 0;gap:8px;border-top:1px solid #e3edf3;font-size:11px}
  .note-footer-actions,.list .note-footer-actions{display:flex;flex-direction:row;gap:7px;width:auto;margin-left:auto;max-width:100%;flex-wrap:wrap}
  .note-footer-actions .copy-button,.note-footer-actions .delete-button{min-height:44px;font-size:14px;padding:9px 11px;gap:5px;border-radius:8px}.note-footer-actions svg{height:16px;width:16px}
  .add-card,.list .add-card{min-height:148px;gap:10px;flex-direction:column}.add-card strong{font-size:24px}.add-card small{font-size:12px}
  .workspace-footer{font-size:11px;margin-top:30px;gap:10px}
  .reader-dialog,.editor-dialog{width:100%;height:100dvh;max-height:100dvh;max-width:100%;margin:0;border-radius:0}
  .reader-header{padding:calc(10px + env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) 10px max(14px,env(safe-area-inset-left,0px));gap:8px}
  .reader-back{font-size:16px;min-height:44px;padding:9px 6px}.reader-header .badge{font-size:13px;padding:7px 9px}
  .reader-scroll{padding:28px max(24px,env(safe-area-inset-right,0px)) 46px max(24px,env(safe-area-inset-left,0px))}
  .reader-meta{font-size:12px;line-height:1.8;margin-bottom:17px;letter-spacing:.03em}
  .reader-title{font-size:36px;font-weight:400;line-height:1.6;letter-spacing:.025em;margin-bottom:19px}
  .reader-tags{margin-bottom:26px;padding-bottom:23px;gap:7px}.reader-tags span{font-size:12px;padding:4px 8px}
  .reader-content{font-size:22px;line-height:2.05;letter-spacing:.015em}
  .reader-actions{padding:12px max(14px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(14px,env(safe-area-inset-left,0px));gap:8px}
  .reader-actions button{font-size:16px;letter-spacing:.02em;min-width:0;min-height:50px;padding:10px 9px}.reader-actions .secondary{gap:5px}
  .editor-dialog .dialog-heading{padding:calc(10px + env(safe-area-inset-top,0px)) max(18px,env(safe-area-inset-right,0px)) 10px max(18px,env(safe-area-inset-left,0px))}.editor-dialog .dialog-heading h2{font-size:28px}
  .editor-scroll{padding:22px max(20px,env(safe-area-inset-right,0px)) 30px max(20px,env(safe-area-inset-left,0px))}
  .editor-dialog .editor-title{font-size:30px;line-height:1.6;padding:10px 0}.editor-dialog textarea{font-size:21px;line-height:2;padding:18px 15px;min-height:42dvh}
  .editor-dialog .dialog-actions{padding:12px max(16px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));gap:8px}
  .editor-dialog .dialog-actions .primary,.editor-dialog .dialog-actions .secondary{font-size:15px;padding:11px 15px}.editor-dialog .danger-text{font-size:13px}
  .account-dialog,.confirm-dialog{padding:24px 20px}.dialog-heading h2,.confirm-dialog h2{font-size:26px}
}
@media(max-width:360px){
  .sidebar{padding-left:12px;padding-right:12px;gap:10px}.sidebar nav .nav-item{font-size:13px;gap:4px}.nav-count{font-size:11px}.brand{font-size:28px}.new-note{padding:0 10px;font-size:13px}
  .workspace{padding-left:16px;padding-right:16px}h1{font-size:30px}.eyebrow{font-size:8px}.page-heading p{font-size:13px}
  .note-card,.list .note-card{padding-left:17px;padding-right:17px}.note-card h3,.list .note-card h3{font-size:25px}
  .note-footer-actions,.list .note-footer-actions{width:100%}
  .reader-scroll{padding-left:20px;padding-right:20px}.reader-title{font-size:32px}.reader-actions{gap:6px;padding-left:10px;padding-right:10px}.reader-actions button{font-size:15px;padding-left:8px;padding-right:8px}
  .editor-dialog .dialog-actions{padding-left:12px;padding-right:12px;gap:6px}.editor-dialog .dialog-actions .primary,.editor-dialog .dialog-actions .secondary{padding-left:10px;padding-right:10px;font-size:14px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
