@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: #f4f2ed; --surface: #fff; --ink: #202522; --muted: #767c77;
  --line: #e5e2da; --soft: #ebe9e2; --green: #275d4a; --green-2: #3c8065;
  --accent: #5b67d6; --amber: #d98f39; --danger: #c34d4d;
  --shadow: 0 20px 55px rgba(38, 44, 40, .08); --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.6 'DM Sans','Noto Sans SC',sans-serif; }
button,input,textarea,select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.eyebrow { margin: 0 0 7px; color: var(--green-2); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { line-height: 1.25; }
h1,h2 { font-family: 'Noto Serif SC',serif; }
h1 { margin-bottom: 10px; font-size: clamp(28px,3vw,42px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 24px; letter-spacing: -.03em; }
button { border: 0; cursor: pointer; }
.primary,.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 11px; font-weight: 600; transition: .2s ease; }
.primary { color: white; background: var(--green); box-shadow: 0 8px 20px rgba(39,93,74,.17); }
.primary:hover { background: #1d4d3c; transform: translateY(-1px); }
.primary.compact { min-height: 38px; padding: 0 14px; font-size: 13px; }
.primary.wide { width: 100%; }
.primary.round { width: 72px; height: 72px; padding: 0; border-radius: 50%; }
.secondary { border: 1px solid var(--line); background: var(--surface); }
.secondary:hover { border-color: #c9c6bd; background: #faf9f6; }
.text-button,.back-button { padding: 0; color: var(--green); background: none; font-weight: 600; }
.text-button:hover,.back-button:hover { color: var(--green-2); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 232px; padding: 24px 18px; border-right: 1px solid var(--line); background: #f8f7f3; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; background: none; text-align: left; }
.brand-mark { display: grid; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border-radius: 12px 12px 12px 3px; color: white; background: var(--green); font-family: 'Noto Serif SC',serif; font-size: 20px; box-shadow: 0 8px 17px rgba(39,93,74,.18); }
.brand-mark.large { width: 56px; height: 56px; margin: 0 auto 25px; font-size: 27px; }
.brand b { display: block; font-family: 'Noto Serif SC',serif; font-size: 18px; }
.brand small { display: block; margin-top: -2px; color: #91968f; font-size: 8px; font-weight: 700; letter-spacing: .24em; }
.sidebar nav { margin-top: 36px; }
.sidebar nav > p { margin: 24px 12px 8px; color: #a1a49e; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.nav-item,.quick-goal { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #666b67; background: transparent; text-align: left; font-weight: 500; }
.nav-item span { width: 18px; color: #8b908b; font-size: 18px; text-align: center; }
.nav-item:hover,.quick-goal:hover { color: var(--ink); background: #eeece6; }
.nav-item.active { color: var(--green); background: #e6eee9; font-weight: 700; }
.quick-goal { padding-top: 7px; padding-bottom: 7px; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.quick-goal::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--goal-color); }
.sidebar-foot { margin-top: auto; padding: 0 12px; }
.mini-quote { margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: #727771; background: rgba(255,255,255,.5); font-family: 'Noto Serif SC',serif; font-size: 12px; }
.content-shell { min-height: 100vh; margin-left: 232px; }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; height: 74px; align-items: center; justify-content: space-between; padding: 0 4vw; border-bottom: 1px solid rgba(229,226,218,.8); background: rgba(244,242,237,.88); backdrop-filter: blur(18px); }
.global-search { position: relative; display: flex; width: min(440px,45vw); align-items: center; gap: 9px; }
.global-search > span { color: #8f948e; font-size: 19px; }
.global-search input { width: 100%; padding: 10px 60px 10px 0; border: 0; outline: 0; background: transparent; }
kbd { position: absolute; right: 0; padding: 2px 7px; border: 1px solid #dcd9d1; border-radius: 5px; color: #969a95; background: #f8f7f3; font-size: 10px; box-shadow: 0 1px 0 #d6d3cb; }
.top-actions { display: flex; align-items: center; gap: 25px; }
.date-label { color: #858a85; font-size: 12px; }
.search-popover { position: absolute; top: 46px; left: 0; width: min(540px,75vw); max-height: 420px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.search-result { display: block; width: 100%; padding: 11px 12px; border-radius: 9px; background: white; text-align: left; }
.search-result:hover { background: #f3f2ed; }
.search-result b,.search-result small { display: block; }
.search-result small { color: var(--muted); }
main { padding: 44px max(4vw,30px) 80px; }
.page { display: none; max-width: 1240px; margin: 0 auto; animation: enter .28s ease; }
.page.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.hero-row,.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 35px; }
.hero-row h1 { max-width: 670px; }
.hero-copy { margin: 0; color: var(--muted); font-size: 15px; }
.quiet-action { display: flex; min-width: 330px; align-items: center; gap: 13px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.57); text-align: left; }
.quiet-action > span { color: var(--amber); font-size: 25px; }
.quiet-action b,.quiet-action small { display: block; }
.quiet-action small { margin-top: 2px; color: var(--muted); }
.quiet-action i { margin-left: auto; color: var(--green); font-style: normal; }
.quiet-action:hover { border-color: #cfcbbf; background: white; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(40,45,42,.06); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 42px; }
.stat-card { position: relative; overflow: hidden; padding: 19px 20px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.62); }
.stat-card::after { content: ''; position: absolute; top: -25px; right: -25px; width: 70px; height: 70px; border-radius: 50%; background: var(--tint,#e5ece8); opacity: .65; }
.stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; margin-top: 6px; font-family: 'Noto Serif SC',serif; font-size: 25px; }
.stat-card strong em { color: var(--muted); font: 400 11px 'DM Sans'; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 17px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 265px; gap: 17px; margin-bottom: 46px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 24px rgba(42,47,44,.035); }
.today-card { padding: 8px 20px; }
.task-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid #eeece6; }
.task-item:last-child { border-bottom: 0; }
.task-check { width: 21px; height: 21px; border: 1.5px solid #c9cec9; border-radius: 7px; background: white; }
.task-check:hover { border-color: var(--green); background: #edf4f0; }
.task-check.done { display: grid; place-items: center; color: white; border-color: var(--green); background: var(--green); }
.task-check.done::after { content: '✓'; font-size: 12px; }
.task-main b { display: block; font-size: 13px; }
.task-main small { color: var(--muted); }
.task-time { color: #8b8f8a; font-size: 11px; }
.focus-card { padding: 22px; text-align: center; background: #edf0e9; }
.timer-ring { display: flex; width: 134px; height: 134px; margin: 13px auto; flex-direction: column; align-items: center; justify-content: center; border: 7px solid #d8dfd7; border-top-color: var(--green); border-radius: 50%; background: #f8f9f5; box-shadow: inset 0 0 0 5px #eef1ec; }
.timer-ring span { font-family: 'Noto Serif SC',serif; font-size: 28px; }
.timer-ring small { color: var(--muted); font-size: 10px; }
.timer-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }
.circle-button { width: 32px; height: 32px; border: 1px solid #cdd4ce; border-radius: 50%; background: transparent; }
.goal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.goal-grid.large { grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); }
.goal-card { position: relative; overflow: hidden; min-height: 210px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; cursor: pointer; transition: .22s ease; }
.goal-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--goal-color); }
.goal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.goal-top { display: flex; justify-content: space-between; gap: 10px; }
.goal-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--goal-color); background: color-mix(in srgb,var(--goal-color) 11%,white); font-size: 20px; }
.status-pill,.tag { display: inline-flex; padding: 3px 8px; border-radius: 20px; color: var(--green); background: #edf3ef; font-size: 10px; }
.goal-card h3 { margin: 16px 0 5px; font-family: 'Noto Serif SC',serif; font-size: 18px; }
.goal-card > p { height: 42px; margin-bottom: 17px; overflow: hidden; color: var(--muted); font-size: 12px; }
.progress-line { height: 5px; overflow: hidden; border-radius: 5px; background: #eeece6; }
.progress-line i { display: block; height: 100%; border-radius: 5px; background: var(--goal-color); }
.goal-meta { display: flex; justify-content: space-between; margin-top: 8px; color: #8b8f8a; font-size: 10px; }
.empty-state { padding: 60px 20px; border: 1px dashed #cbc8be; border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state.compact { margin-top: 30px; padding: 45px 20px; }
.empty-state span { display: block; margin-bottom: 5px; color: var(--green-2); font-size: 30px; }
.empty-state h3 { margin-bottom: 5px; color: var(--ink); }
.large-input { width: 100%; padding: 16px 19px; border: 1px solid var(--line); border-radius: 13px; outline: none; background: white; }
.large-input:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(60,128,101,.08); }
.library-toolbar { margin: -5px 0 25px; }
.knowledge-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.knowledge-item { padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; }
.knowledge-item:hover { border-color: #cdc9be; box-shadow: 0 10px 30px rgba(40,45,42,.05); }
.knowledge-item .type { color: var(--green-2); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.knowledge-item h3 { margin: 8px 0 5px; font-size: 15px; }
.knowledge-item p { max-height: 43px; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; }
.discover-hero { padding: 40px; border-radius: 24px; color: white; background: radial-gradient(circle at 90% 10%,rgba(255,255,255,.16),transparent 32%),linear-gradient(130deg,#234d3f,#39705b); box-shadow: 0 18px 50px rgba(32,72,57,.2); text-align: center; }
.discover-hero .eyebrow { color: #bdd9ce; }
.discover-hero h1 { margin-bottom: 10px; }
.discover-hero > p:not(.eyebrow) { color: #d6e5df; }
.discover-search { display: flex; max-width: 680px; margin: 24px auto 15px; padding: 6px; border-radius: 14px; background: white; }
.discover-search input { flex: 1; min-width: 0; padding: 8px 13px; border: 0; outline: 0; }
.discover-search .primary { box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.chip { padding: 5px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 20px; color: #e4eeea; background: rgba(255,255,255,.07); font-size: 11px; }
.chip:hover { background: rgba(255,255,255,.16); }
.resource-results { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 25px; }
.resource-card { display: flex; flex-direction: column; min-height: 200px; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.resource-source { display: flex; align-items: center; justify-content: space-between; color: var(--green-2); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.resource-card h3 { margin: 12px 0 7px; font-size: 15px; }
.resource-card p { display: -webkit-box; margin-bottom: 16px; overflow: hidden; color: var(--muted); font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.resource-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.resource-actions a { color: var(--green); font-weight: 600; text-decoration: none; }
.save-resource { margin-left: auto; padding: 7px 10px; border-radius: 8px; color: var(--green); background: #edf3ef; font-size: 11px; }
.save-resource.saved { color: #838883; background: #eeece7; }
.back-button { margin-bottom: 24px; }
.workspace-hero { position: relative; overflow: hidden; padding: 29px 30px; border-radius: 20px; color: white; background: linear-gradient(125deg,var(--goal-color),color-mix(in srgb,var(--goal-color) 55%,#152e27)); }
.workspace-hero::after { content: ''; position: absolute; right: -30px; bottom: -90px; width: 250px; height: 250px; border: 40px solid rgba(255,255,255,.06); border-radius: 50%; }
.workspace-hero .eyebrow { color: rgba(255,255,255,.7); }
.workspace-hero h1 { position: relative; z-index: 1; max-width: 760px; margin-bottom: 8px; font-size: 34px; }
.workspace-hero p { position: relative; z-index: 1; max-width: 760px; color: rgba(255,255,255,.77); }
.workspace-metrics { position: relative; z-index: 1; display: flex; gap: 28px; margin-top: 20px; }
.workspace-metrics b,.workspace-metrics small { display: block; }
.workspace-metrics b { font-size: 19px; }
.workspace-metrics small { color: rgba(255,255,255,.65); font-size: 10px; }
.workspace-tabs { display: flex; gap: 5px; margin: 25px 0 20px; padding: 5px; border-radius: 12px; background: #eae8e2; }
.workspace-tabs button { flex: 1; padding: 10px; border-radius: 9px; color: #707570; background: transparent; font-weight: 600; }
.workspace-tabs button.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(40,45,42,.08); }
.workspace-tab { display: none; }
.workspace-tab.active { display: block; animation: enter .2s ease; }
.tab-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.phase { margin-bottom: 15px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.phase-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid #eeece7; }
.phase-head h3 { margin: 0; font-size: 14px; }
.phase-head small { color: var(--muted); }
.phase .task-item { margin: 0 18px; }
.task-item.completed .task-main { opacity: .52; text-decoration: line-through; }
.item-actions { display: flex; align-items: center; gap: 7px; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: #edebe5; }
.resource-list,.note-list,.review-list { display: grid; gap: 10px; }
.saved-resource-row,.note-row,.review-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.file-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; color: var(--green); background: #edf3ef; }
.saved-resource-row b,.note-row b { display: block; }
.saved-resource-row small,.note-row small { color: var(--muted); }
.row-link { color: var(--green); text-decoration: none; }
.upload-label { cursor: pointer; }
.upload-label input { display: none; }
.review-row { grid-template-columns: 90px 1fr auto; align-items: start; }
.review-date { color: var(--green-2); font-weight: 700; }
.review-row p { margin: 0; white-space: pre-wrap; }
.review-minutes { color: var(--muted); }
.login-screen { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 10% 10%,#e0e9e3,transparent 35%),radial-gradient(circle at 90% 90%,#e8e4d5,transparent 40%),var(--paper); }
.login-card { width: min(430px,100%); padding: 42px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.83); box-shadow: var(--shadow); text-align: center; backdrop-filter: blur(12px); }
.login-card h1 { font-size: 30px; }
.login-card form { margin-top: 26px; text-align: left; }
.login-card .primary { margin-top: 14px; }
.form-error { min-height: 22px; margin: 10px 0 0; color: var(--danger); font-size: 12px; }
dialog { width: min(720px,calc(100vw - 30px)); max-height: 90vh; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: #fbfaf7; box-shadow: 0 30px 90px rgba(26,32,28,.24); }
dialog::backdrop { background: rgba(30,35,31,.38); backdrop-filter: blur(5px); }
.dialog-form { padding: 28px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.dialog-head h2 { font-size: 25px; }
.dialog-close { padding: 0; color: #8b8f8a; background: none; font-size: 26px; }
label { position: relative; display: block; color: #5d625e; font-size: 12px; font-weight: 600; }
input,textarea,select { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #dcd9d1; border-radius: 9px; color: var(--ink); background: white; outline: none; }
input:focus,textarea:focus,select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(60,128,101,.08); }
textarea { resize: vertical; }
.field-grid { display: grid; gap: 13px; margin-bottom: 14px; }
.field-grid.two { grid-template-columns: repeat(2,1fr); }
.field-grid.three { grid-template-columns: repeat(3,1fr); margin-top: 14px; }
.input-suffix { position: absolute; right: 10px; bottom: 10px; color: #9a9e99; font-size: 11px; }
.color-field { display: flex; align-items: center; gap: 15px; margin-top: 16px; color: #5d625e; font-size: 12px; font-weight: 600; }
.color-choices { display: flex; gap: 9px; }
.color-choice { width: 23px; height: 23px; border: 3px solid white; border-radius: 50%; background: var(--choice); box-shadow: 0 0 0 1px #d8d5cc; }
.color-choice.active { box-shadow: 0 0 0 2px var(--choice); }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.autosave-hint { margin-right: auto; color: var(--muted); font-size: 11px; }
.note-form { padding-bottom: 20px; }
.note-title-input { padding-left: 0; border-width: 0 0 1px; border-radius: 0; background: transparent; font-family: 'Noto Serif SC',serif; font-size: 24px; }
.note-title-input:focus { box-shadow: none; }
.note-editor { min-height: 360px; margin-top: 12px; padding: 18px; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; line-height: 1.8; }
.toast { position: fixed; z-index: 200; right: 25px; bottom: 25px; max-width: 340px; padding: 12px 17px; border-radius: 11px; color: white; background: #25322d; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.loading { position: relative; color: transparent !important; pointer-events: none; }
.loading::after { content: ''; position: absolute; inset: 0; width: 16px; height: 16px; margin: auto; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mobile-only { display: none; }

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: .25s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px rgba(30,35,31,.16); }
  .content-shell { margin-left: 0; }
  .mobile-only { display: grid; }
  .global-search { width: min(440px,55vw); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .goal-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 700px) {
  .topbar { height: 64px; padding: 0 15px; gap: 8px; }
  .global-search { width: auto; flex: 1; }
  .top-actions .date-label,.top-actions .primary { display: none; }
  kbd { display: none; }
  main { padding: 28px 16px 70px; }
  .hero-row,.page-title-row { display: block; margin-bottom: 25px; }
  .quiet-action { width: 100%; min-width: 0; margin-top: 20px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 15px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .focus-card { display: none; }
  .goal-grid,.goal-grid.large,.knowledge-grid,.resource-results { grid-template-columns: 1fr; }
  .goal-card { min-height: 190px; }
  .section-heading .text-button { display: none; }
  .discover-hero { padding: 28px 16px; }
  .discover-search { display: block; padding: 7px; }
  .discover-search .primary { width: 100%; margin-top: 6px; }
  .workspace-hero { padding: 24px 20px; }
  .workspace-hero h1 { font-size: 27px; }
  .workspace-tabs { overflow-x: auto; }
  .workspace-tabs button { min-width: 95px; }
  .field-grid.two,.field-grid.three { grid-template-columns: 1fr; }
  .dialog-form { padding: 21px; }
  .dialog-actions { flex-wrap: wrap; }
  .autosave-hint { width: 100%; }
  .saved-resource-row,.note-row { grid-template-columns: 38px 1fr; }
  .saved-resource-row .item-actions,.note-row .item-actions { grid-column: 2; }
}

/* Daily Library integration */
.catalog-title-row { align-items: center; }
.catalog-origin-link { color: var(--green); text-decoration: none; }
.catalog-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) 210px 150px 130px auto; gap: 9px; margin-bottom: 14px; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.catalog-toolbar input,.catalog-toolbar select { margin: 0; border-color: transparent; background: #f6f5f1; }
.catalog-search { position: relative; display: flex; align-items: center; }
.catalog-search span { position: absolute; z-index: 1; left: 13px; color: var(--muted); font-size: 18px; }
.catalog-search input { padding-left: 38px; }
.catalog-summary { display: flex; align-items: center; gap: 17px; margin: 0 4px 19px; }
.catalog-summary div { display: flex; align-items: baseline; gap: 5px; }
.catalog-summary b { font-family: Noto Serif SC,serif; font-size: 24px; }
.catalog-summary small,.catalog-summary p { color: var(--muted); }
.catalog-summary p { flex: 1; margin: 0; font-size: 12px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.catalog-card { position: relative; display: flex; min-height: 252px; flex-direction: column; padding: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; transition: .2s ease; }
.catalog-card:hover { transform: translateY(-3px); border-color: #cbc7bc; box-shadow: var(--shadow); }
.catalog-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.catalog-card h3 { margin: 13px 0 7px; font-family: Noto Serif SC,serif; font-size: 16px; }
.catalog-card > p { display: -webkit-box; margin-bottom: 13px; overflow: hidden; color: var(--muted); font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.catalog-label { padding: 3px 8px; border-radius: 20px; color: var(--green); background: #edf3ef; font-size: 10px; font-weight: 700; }
.catalog-date { color: var(--muted); font-size: 10px; }
.catalog-reasons { display: flex; flex-wrap: wrap; gap: 5px; min-height: 24px; }
.catalog-reason { padding: 3px 7px; border-radius: 6px; color: #765923; background: #f5eddb; font-size: 9px; }
.catalog-card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid #efede8; }
.catalog-card-actions .text-button { font-size: 12px; }
.catalog-bind-button { margin-left: auto; padding: 7px 10px; border-radius: 8px; color: var(--green); background: #edf3ef; font-size: 11px; }
.catalog-bind-button.bound { color: var(--muted); background: #eeece7; }
.catalog-dialog { width: min(940px,calc(100vw - 28px)); max-height: 92vh; }
.catalog-reader-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 25px 30px 18px; border-bottom: 1px solid var(--line); background: rgba(251,250,247,.94); backdrop-filter: blur(12px); }
.catalog-reader-head h2 { max-width: 760px; font-size: 25px; }
.catalog-markdown { max-width: 780px; min-height: 360px; margin: 0 auto; padding: 32px 28px 105px; font-size: 15px; line-height: 1.9; }
.catalog-markdown h1,.catalog-markdown h2,.catalog-markdown h3 { margin: 1.7em 0 .65em; font-family: Noto Serif SC,serif; }
.catalog-markdown h1 { font-size: 27px; }
.catalog-markdown h2 { padding-bottom: 7px; border-bottom: 1px solid var(--line); font-size: 21px; }
.catalog-markdown h3 { font-size: 17px; }
.catalog-markdown p { margin: 0 0 1em; }
.catalog-markdown blockquote { margin: 1em 0; padding: 11px 16px; border-left: 3px solid var(--green-2); color: var(--muted); background: #f0f3ef; }
.catalog-markdown a { color: var(--green-2); }
.catalog-markdown li { margin-bottom: 5px; }
.catalog-reader-actions { position: sticky; z-index: 3; bottom: 0; display: flex; align-items: center; gap: 9px; padding: 13px 20px; border-top: 1px solid var(--line); background: rgba(251,250,247,.96); backdrop-filter: blur(12px); }
.catalog-reader-actions select { width: 220px; margin: 0; }
.catalog-reader-actions .tiny { margin-right: auto; }
@media (max-width: 1100px) { .catalog-toolbar { grid-template-columns: 1fr 1fr 1fr; } .catalog-search { grid-column: 1 / -1; } .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .catalog-toolbar { grid-template-columns: 1fr 1fr; } .catalog-toolbar .primary { grid-column: 1 / -1; } .catalog-grid { grid-template-columns: 1fr; } .catalog-reader-actions { flex-wrap: wrap; } .catalog-reader-actions select { width: 100%; } .catalog-reader-actions .tiny { display: none; } .catalog-reader-actions button { flex: 1; min-width: 135px; } }
