:root {
  --paper: #faf9f5;
  --surface: #fffefa;
  --sidebar: #f4f4eb;
  --line: #e2e2d7;
  --ink: #283d32;
  --soft: #637064;
  --muted: #6e776b;
  --green: #355c47;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: default; opacity: .55; }
button[aria-busy="true"] { cursor: progress; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #a47f45; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
button { border: none; background: none; }
button, .btn, .folder-card, .nav-item, .record-row { transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
svg { flex-shrink: 0; vertical-align: middle; }
.skip { position: fixed; z-index: 100; top: 8px; left: 8px; background: var(--surface); padding: 7px 12px; border: 1px solid var(--green); border-radius: 6px; transform: translateY(-160%); }
.skip:focus-visible { transform: none; }
.start, .login { min-height: 100svh; display: grid; align-content: center; justify-content: center; gap: 14px; padding: 24px; }
.shell { min-height: 100vh; }
.sidebar { width: 220px; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; background: var(--sidebar); border-right: 1px solid #dddfd1; z-index: 12; padding: 29px 16px 16px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; }
.sidebar .brand { margin: 0 12px 38px; width: fit-content; }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 28px/1.1 var(--serif); letter-spacing: .12em; color: #294733; }
.brand small { color: #637461; font: 11px/1.6 var(--sans); letter-spacing: .11em; margin-top: 3px; }
.sidebar nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; border-radius: 8px; padding: 10px 15px; color: #526252; font-size: 14px; text-align: left; line-height: 23px; white-space: nowrap; }
.nav-item svg { color: #697b65; }
.nav-item:hover, .icon-btn:hover { background: #e9ecdf; }
.nav-item.selected { background: #dfe8d8; color: #30593f; font-weight: 650; }
.nav-item.selected svg { color: #365e42; }
.nav-label { margin: 22px 15px 7px; font-size: 11px; font-weight: 600; color: #788371; letter-spacing: .1em; }
.side-foot { margin-top: auto; padding-top: 38px; }
.export-link { color: #586858; }
.space { display: flex; align-items: center; gap: 10px; margin: 13px 4px 0; border-top: 1px solid #d9ddcf; padding: 19px 7px 2px; }
.space-icon { width: 34px; height: 34px; border-radius: 50%; background: #e2e7d8; display: grid; place-items: center; color: #556d52; }
.space strong,.space small { display: block; }
.space strong { font-size: 12px; line-height: 1.5; }
.space small { font-size: 10px; color: var(--muted); }
.space .icon-btn { margin-left: auto; }
.work { margin-left: 220px; min-width: 0; }
.topbar { min-height: 61px; padding: 12px clamp(25px,3.4vw,65px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.top-crumb, .header-date { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.top-crumb i { font-style: normal; color: #afb6a6; margin: 0 2px; }
.top-crumb strong { color: #4e5f51; font-weight: 550; }
.header-date { font-variant-numeric: tabular-nums; gap: 7px; }
.mobile-menu,.scrim { display: none; }
main#main { max-width: 1550px; padding: 29px clamp(25px,3.4vw,65px) 40px; margin-inline: auto; outline: 0; }
.page-head,.section-head,.panel-head,.list-bar,.folder-top,.dialog-head,.dialog-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.page-head { margin-bottom: 18px; min-height: 39px; }
h1 { font-size: 31px; font-weight: 670; letter-spacing: -.045em; line-height: 1.4; }
.head-sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.btn { min-height: 38px; padding: 8px 15px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 7px; line-height: 1.4; font-weight: 580; font-size: 13px; white-space: nowrap; }
.btn.primary { background: var(--green); color: #fffef7; border-color: #345642; }
.btn.primary:hover:not(:disabled) { background: #264d38; }
.btn.secondary { background: var(--surface); border-color: #d7d9cc; }
.btn.secondary:hover:not(:disabled) { border-color: #9aa995; background: #f2f3e9; }
.hero { isolation: isolate; overflow: hidden; position: relative; display: flex; align-items: center; min-height: clamp(200px,15vw,255px); padding: 23px clamp(26px,3vw,49px); border: 1px solid #dce2d1; border-radius: 13px; background: #eaf0e3; }
.hero-art { position: absolute; z-index: -1; inset: 0 0 0 23%; background: url("/garden.jpg") center 61% / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent, #000 29%); mask-image: linear-gradient(90deg, transparent, #000 29%); }
.hero-text { position: relative; max-width: 67%; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; color: #486747; font-size: 11px; font-weight: 650; letter-spacing: .11em; }
.hero-tag svg { color: #8b7846; }
.hero h2 { font-family: var(--serif); font-size: clamp(27px,2.55vw,41px); letter-spacing: -.025em; color: #28462e; font-weight: 700; line-height: 1.32; margin: 7px 0; }
.hero p { color: #4e624d; font-size: 13px; }
.hero-btn { margin-top: 16px; background: #fffcf1ed; border-color: #c1cab8; color: #3a573d; padding: 6px 13px; min-height: 32px; font-size: 12px; }
.hero-btn:hover { background: #fff; border-color: #8fa389; }
.library { margin-top: 26px; }
.section-head { margin-bottom: 13px; }
.section-head h2,.panel-head h2,.list-bar h2 { font-size: 19px; font-weight: 640; letter-spacing: -.03em; display: flex; align-items: center; gap: 9px; line-height: 1.5; }
.section-head h2 svg,.panel-head h2 svg { color: #6a7a5c; }
.section-meta { color: var(--muted); font-size: 12px; }
.card-grid { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.sage { --tile:#eaf0e1; --tile-ink:#5a7750; }
.amber { --tile:#f5edda; --tile-ink:#977a43; }
.clay { --tile:#f5e7e1; --tile-ink:#9a6955; }
.teal { --tile:#e3efea; --tile-ink:#508173; }
.lavender { --tile:#eeebf3; --tile-ink:#7f6f91; }
.blue { --tile:#e6ecf2; --tile-ink:#607f95; }
.folder-card { min-width:0; display:block; background:var(--surface); border:1px solid var(--line); border-radius:11px; padding:15px 18px 13px; }
.folder-card:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--tile-ink),white 47%); box-shadow:0 4px 12px #384b2b0a; }
.folder-top { margin-bottom:9px; }
.tile-icon,.row-ico { width:35px; height:35px; border-radius:9px; background:var(--tile,#e4edde); color:var(--tile-ink,#5b745b); display:inline-grid; place-items:center; flex-shrink:0; }
.card-count { font-size:11px; color:#707a6d; }
.folder-title { display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:16px; font-weight:650; line-height:1.45; }
.folder-title svg { color:#a1aa9a; }
.folder-card p { color:var(--muted); font-size:12px; margin-top:3px; }
.lower-grid { display:grid; grid-template-columns:minmax(0,1.48fr) minmax(268px,1fr); gap:15px; align-items:start; margin-top:23px; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:11px; overflow:hidden; }
.panel-head { padding:16px 19px 12px; }
.panel-head h2 { font-size:16px; gap:7px; }
.text-link { display:inline-flex; align-items:center; justify-content:center; gap:4px; font-size:12px; font-weight:550; color:#5f7659; background:none; padding:2px 0; }
.text-link:hover { color:#2e5534; text-decoration:underline; text-underline-offset:3px; }
.recent-list { padding:0 18px 6px; }
.record-row { display:flex; align-items:center; gap:11px; width:100%; text-align:left; padding:13px 5px; border-top:1px solid #eeeee6; }
.record-row:hover { background:#f6f6ee; }
.row-ico { width:32px; height:32px; border-radius:8px; }
.row-text { flex:1; min-width:0; }
.row-text strong,.row-text small { line-height:1.5; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row-text strong { font-size:13px; font-weight:580; }
.row-text small { font-size:11px; color:var(--muted); margin-top:2px; }
.row-date { color:var(--muted); font-size:11px; white-space:nowrap; }
.record-row>svg { color:#a4aa9d; }
.mood-panel p { color:var(--soft); font-size:13px; padding:0 19px; }
.mood-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px; margin:12px 12px 15px; }
.mood-grid button { display:flex; flex-direction:column; align-items:center; gap:5px; padding:5px 1px; border-radius:7px; }
.mood-grid button:hover { background:#f2f2e8; transform:translateY(-2px); }
.mood-grid span { color:#5f685d; font-size:11px; }
.face-0 { --face-fill:#f5dfa3; --face-ring:#e8cf92; --face-ink:#896a38; }
.face-1 { --face-fill:#dce6c9; --face-ring:#c9d7b4; --face-ink:#69794e; }
.face-2 { --face-fill:#cedee6; --face-ring:#bacfdc; --face-ink:#607e91; }
.face-3 { --face-fill:#dfd9e9; --face-ring:#d0c6dd; --face-ink:#7c6f8d; }
.face-4 { --face-fill:#efc9b4; --face-ring:#dfb49f; --face-ink:#9b6954; }
.mood-note { margin:0 19px; border-top:1px solid var(--line); padding:12px 0; display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; }
.empty { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:25px 16px; gap:4px; text-align:center; }
.empty-icon { width:40px; height:40px; border-radius:11px; background:#edf1e6; color:#708168; display:grid; place-items:center; margin-bottom:6px; }
.empty strong { font-size:14px; }
.empty p { color:var(--muted); font-size:13px; }
.empty .text-link { margin-top:4px; }
.records-panel .empty { min-height:270px; }
.list-bar { padding:18px 20px; flex-wrap:wrap; }
.list-bar h2 { font-size:17px; }
.list-bar h2 span { font:500 12px/1.8 var(--sans); border-radius:12px; background:#edf0e5; padding:0 7px; color:var(--soft); }
.list-tools { display:flex; align-items:center; gap:8px; }
.search { display:flex; align-items:center; gap:7px; border:1px solid #d8dbce; padding:0 10px; border-radius:6px; color:#778170; background:var(--surface); }
.search input { border:none; padding:7px 0; width:124px; background:transparent; }
.search:focus-within { outline:2px solid #a47f45; }
.search input:focus { outline:0; }
select,input,textarea { color:var(--ink); }
.list-tools select { background:var(--surface); border:1px solid #d8dbce; border-radius:6px; padding:7px; font-size:13px; }
#record-list .record-row { padding:15px 20px; }
.ai-banner,.info-line { display:flex; align-items:center; gap:13px; }
.ai-banner { background:#eaf0ef; border:1px solid #d8e2df; border-radius:10px; padding:20px; margin-bottom:16px; }
.ai-banner .tile-icon { background:#dae6e3; color:#58766e; }
.ai-banner h2 { font-size:17px; }
.ai-banner p { color:var(--soft); font-size:13px; }
.ai-banner .btn { margin-left:auto; }
.icon-btn { display:inline-grid; place-items:center; flex-shrink:0; width:32px; height:32px; padding:3px; border-radius:6px; color:#5c6d5d; }
.mobile-menu { display:none; }
dialog { background:var(--surface); color:var(--ink); padding:0; width:min(460px,calc(100vw - 28px)); max-height:calc(100svh - 42px); overflow:auto; border:1px solid #d5d9ca; border-radius:13px; box-shadow:0 20px 80px #23352235; overscroll-behavior:contain; }
dialog.wide { width:min(640px,calc(100vw - 28px)); }
dialog::backdrop { background:#2b382b69; }
.dialog-head { border-bottom:1px solid var(--line); padding:15px 21px; }
.dialog-head h2 { font-size:19px; font-weight:650; }
.dialog-foot { border-top:1px solid var(--line); padding:13px 21px; justify-content:flex-end; background:#fafaf3; }
.dialog-foot.wrap { flex-wrap:wrap; }
.form-inner,.read-record { padding:20px 22px; }
.form-inner>p:first-child { color:var(--soft); }
.form-inner label,.login-card label,.field-readonly { display:block; font-size:13px; font-weight:570; }
.form-inner>label,.form-inner>.form-grid,.form-inner>fieldset { margin-bottom:14px; }
.form-inner>label:last-child { margin-bottom:0; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
label>input:not([type="checkbox"]),label>select,label>textarea,.field-readonly pre { display:block; width:100%; }
.form-inner input:not([type="checkbox"]),.form-inner select,.form-inner textarea,.login-card input,.field-readonly pre { border:1px solid #cfd5c6; border-radius:6px; background:#fffefa; padding:8px 10px; margin-top:5px; font-size:14px; font-weight:normal; min-width:0; }
.form-inner textarea,.body-text,.details dd,.field-readonly pre,.ai-prompt pre { line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.form-inner textarea { resize:vertical; min-height:64px; width:100%; }
.form-inner label em,.extra-fields h3 small { font-size:10px; font-style:normal; font-weight:500; color:#78836e; margin-left:4px; }
.extra-fields { border-top:1px solid var(--line); padding-top:14px; }
.extra-fields h3 { font-size:14px; margin-bottom:12px; }
.form-error { color:#9b4439; font-size:13px; }
.form-error:not(:empty) { margin-top:10px; }
.help { color:var(--muted); font-size:12px; margin-bottom:10px; }
.flex { flex:1; }
.danger-link { color:#92564b; }
.danger-link:hover { background:#f6eae3; }
.btn.danger { background:#964f41; color:white; }
.delete-title { margin:12px 0; padding:10px 14px; background:#f3f0e8; border-radius:6px; font-weight:600; }
.info-line { align-items:flex-start; background:#eff3e8; border-radius:7px; color:#576b50; padding:11px 13px; font-size:13px; margin:12px 0; }
.info-line svg { margin-top:3px; }
.record-meta { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--muted); }
.pill { display:inline-flex; align-items:center; gap:5px; background:var(--tile); color:var(--tile-ink); padding:3px 8px; border-radius:5px; }
.read-record h3 { font-size:23px; line-height:1.5; margin:14px 0; overflow-wrap:anywhere; }
.body-text { font-size:15px; }
.details { border-top:1px solid var(--line); padding-top:10px; margin:18px 0 0; }
.details>div { display:grid; grid-template-columns:minmax(80px,26%) minmax(0,1fr); margin:8px 0; }
.details dt { color:var(--muted); font-size:13px; }
.details dd { margin:0; font-size:14px; }
.picker { padding:10px; border:1px solid var(--line); border-radius:7px; max-height:40vh; overflow:auto; }
.picker legend { font-size:13px; font-weight:600; padding:0 4px; }
.form-inner .pick-row { display:flex; align-items:center; gap:10px; padding:8px; border-radius:5px; cursor:pointer; }
.pick-row:hover { background:#f2f4ea; }
.pick-row input { width:16px; height:16px; accent-color:var(--green); }
.pick-row span,.pick-row small,.pick-row strong { display:block; }
.pick-row small { font-size:11px; color:var(--muted); font-weight:400; }
.preview-meta { display:flex; justify-content:space-between; gap:8px; margin:10px 0; font-size:13px; overflow-wrap:anywhere; }
.ai-prompt { margin:12px 0; font-size:13px; }
.ai-prompt summary { cursor:pointer; color:var(--green); }
.ai-prompt pre,.field-readonly pre { max-height:200px; overflow:auto; font:13px/1.65 var(--sans); }
.login { background:#edf0e5; }
.login-card { background:var(--surface); border:1px solid var(--line); border-radius:13px; box-shadow:0 12px 40px #2e4c3410; padding:28px; width:min(360px,83vw); }
.login-card h1 { margin-top:24px; font-size:24px; }
.login-card p { color:var(--muted); font-size:13px; margin:7px 0 17px; }
.login-card .form-error { color:#9b4439; }
.login-card .btn { width:100%; }
#notice { position:fixed; inset:auto auto 22px 50%; transform:translate(-50%,8px); visibility:hidden; opacity:0; transition:opacity .15s, transform .15s; color:white; background:#304d3c; border-radius:8px; padding:8px 15px; z-index:99; font-size:13px; max-width:85vw; width:max-content; text-align:center; box-shadow:0 3px 10px #3547361a; pointer-events:none; }
#notice.show { opacity:1; visibility:visible; transform:translate(-50%,0); }
@media(min-width:1550px) { .sidebar { width:245px; padding-inline:22px; } .work { margin-left:245px; } .folder-card { padding:20px 22px; } .lower-grid { gap:20px; } }
@media(max-width:1080px) {
  .sidebar { width:192px; padding-inline:12px; }
  .work { margin-left:192px; }
  .hero-art { left:18%; }
  .folder-card { padding:13px; }
  .card-grid { gap:10px; }
  .lower-grid { grid-template-columns:minmax(0,1.15fr) minmax(243px,1fr); gap:11px; }
  .mood-grid { margin-inline:7px; }
  .face { width:36px; height:36px; }
}
@media(max-width:800px) {
  .sidebar { width:235px; transform:translateX(-100%); transition:transform .2s; visibility:hidden; padding:24px 16px 16px; }
  .work { margin-left:0; }
  .show-menu .sidebar { transform:none; visibility:visible; }
  .show-menu .scrim { display:block; position:fixed; inset:0; background:#23362460; z-index:11; }
  .mobile-menu { display:inline-grid; }
  .topbar { min-height:53px; padding:9px 20px; justify-content:flex-start; gap:7px; }
  .header-date { margin-left:auto; }
  main#main { padding:21px 21px 36px; }
}
@media(max-width:600px) {
  .topbar { padding:6px 12px; }
  .top-crumb>svg,.top-crumb>i,.top-crumb>strong,.header-date time span { display:none; }
  .top-crumb { font-weight:560; color:var(--soft); font-size:13px; }
  .header-date { font-size:11px; gap:4px; }
  h1 { font-size:26px; }
  main#main { padding:18px 15px 28px; }
  .page-head { margin-bottom:13px; }
  .page-head .btn { min-height:34px; padding:5px 11px; }
  .hero { min-height:177px; padding:19px 16px; }
  .hero-text { max-width:85%; }
  .hero h2 { font-size:clamp(22px,5.8vw,31px); margin:5px 0; }
  .hero p { max-width:20em; font-size:12px; }
  .hero-art { left:23%; opacity:.73; background-position:70% 60%; mask-image:linear-gradient(90deg,transparent,#000 68%); }
  .hero-btn { margin-top:12px; }
  .library { margin-top:20px; }
  .section-head h2 { font-size:17px; }
  .card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .folder-card { padding:12px; }
  .folder-title { font-size:15px; }
  .folder-card p { font-size:11px; }
  .lower-grid { grid-template-columns:1fr; margin-top:17px; }
  .mood-grid { margin-inline:16px; }
  .face { width:41px; height:41px; }
  .dialog-head,.form-inner,.read-record,.dialog-foot { padding-inline:15px; }
  .form-grid { grid-template-columns:1fr; gap:11px; }
  .list-bar { padding:15px; }
  .list-tools { width:100%; }
  .search { flex:1; min-width:0; }
  .search input { min-width:0; }
  #record-list .record-row { padding:12px; }
  .ai-banner { flex-wrap:wrap; gap:9px; padding:14px; }
  .ai-banner>div { flex:1; min-width:65%; }
  .ai-banner .btn { margin-left:0; }
  .dialog-foot { gap:6px; }
  .dialog-foot .btn { padding-inline:10px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; scroll-behavior:auto!important; } }
