:root {
  color-scheme: light;
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-soft: #fafbf9;
  --text: #202a23;
  --muted: #778178;
  --quiet: #a1aaa1;
  --line: #e8ece7;
  --green: #377653;
  --green-dark: #2b6345;
  --green-soft: #eaf2ec;
  --shadow: 0 8px 26px rgba(30, 48, 36, .045);
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(65, 133, 88, .2);
  outline-offset: 2px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: #89958b; font-size: 10px; font-weight: 700; letter-spacing: .14em; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 4;
  inset: 0 auto 0 0;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 25px 16px 17px;
  border-right: 1px solid var(--line);
  background: #fbfcfa;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 32px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border-radius: 12px; background: var(--green); box-shadow: 0 6px 14px rgba(55, 118, 83, .2); color: white; font-size: 17px; font-weight: 700; }
.brand strong { display: block; font-size: 14px; letter-spacing: .01em; }
.brand small { display: block; margin-top: 4px; color: #929d94; font-size: 10px; letter-spacing: .06em; }
.nav-label { padding: 0 11px 10px; color: #a2aaa3; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.main-nav { display: grid; gap: 4px; }
.nav-item { display: flex; min-height: 42px; align-items: center; gap: 11px; border: 0; border-radius: 10px; background: transparent; padding: 0 11px; color: #69756c; text-align: left; font-size: 12px; transition: background .16s ease, color .16s ease; }
.nav-item:hover { background: #f1f4f0; color: #315d42; }
.nav-item.active { background: var(--green-soft); color: #2e6445; font-weight: 650; }
.nav-icon { width: 19px; flex: none; color: #8b978d; font-size: 16px; text-align: center; }
.nav-item.active .nav-icon { color: var(--green); }
.sidebar-bottom { margin-top: auto; }
.storage-note { display: flex; gap: 9px; align-items: flex-start; margin: 0 2px 11px; border: 1px solid #e8eee7; border-radius: 11px; background: #f5f8f4; padding: 11px 10px; color: #58675b; font-size: 10px; line-height: 1.55; }
.storage-note small { color: #929d93; font-size: 9px; }
.tiny-dot { width: 7px; height: 7px; flex: none; margin-top: 4px; border-radius: 50%; background: #79a781; }
.logout-button { width: 100%; min-height: 38px; font-size: 11px; }

.main-area { width: min(calc(100% - 248px), 1540px); min-height: 100vh; margin-left: 248px; padding: 0 42px; }
.topbar { display: flex; height: 66px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: #9aa39b; font-size: 11px; }
.crumb-sep { color: #c9d0c9; }
.breadcrumb strong { color: #566259; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.today-label { color: #89958b; font-size: 11px; }
.account-control { display: flex; align-items: center; gap: 7px; }
.account-control > span { color: #929d93; font-size: 9px; }
.account-control select { max-width: 185px; appearance: none; -webkit-appearance: none; border: 1px solid #e4eae3; border-radius: 8px; background-color: white; background-image: linear-gradient(45deg, transparent 50%, #7f8e82 50%), linear-gradient(135deg, #7f8e82 50%, transparent 50%); background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; background-repeat: no-repeat; background-size: 5px 5px; padding: 7px 32px 7px 9px; color: #435247; font-size: 10px; }
.account-settings { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #e4eae3; border-radius: 8px; background: white; color: #748277; font-size: 14px; }
.account-settings:hover { border-color: #cbdccf; background: #f5f8f4; color: var(--green); }
.preview-badge { border: 1px solid #d9e8da; border-radius: 20px; background: #eff7ef; padding: 6px 9px; color: #47734f; font-size: 9px; font-weight: 600; }
.avatar { width: 31px; height: 31px; border: 1px solid #e4e9e3; border-radius: 50%; background: white; color: #54705b; font-size: 10px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 32px 0 24px; }
.page-heading h1 { margin: 0 0 7px; font-size: clamp(22px, 2vw, 27px); font-weight: 650; letter-spacing: -.035em; }
.page-heading .muted { margin: 0; font-size: 12px; line-height: 1.6; }
.button { min-height: 38px; border: 1px solid transparent; border-radius: 9px; padding: 0 14px; font-size: 11px; font-weight: 650; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.button-primary { background: var(--green); box-shadow: 0 4px 10px rgba(55, 118, 83, .12); color: white; }
.button-primary:hover { transform: translateY(-1px); background: var(--green-dark); box-shadow: 0 7px 15px rgba(55, 118, 83, .16); }
.button-quiet { border-color: var(--line); background: white; color: #637066; }
.button-quiet:hover { background: #f7f9f6; }
.button-danger { border-color: #f0d9d5; background: #fff8f6; color: #ad5147; }
.plus { margin-right: 4px; font-size: 15px; vertical-align: -1px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-card, .panel { border: 1px solid #e9ede8; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat-card { min-height: 121px; padding: 17px 18px 15px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #727e74; font-size: 11px; }
.stat-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; font-size: 13px; }
.icon-violet { background: #f1edfa; color: #8d76b4; }
.icon-blue { background: #ebf2fb; color: #688bc1; }
.icon-amber { background: #fbf2e5; color: #c28c43; }
.icon-green { background: #e9f3e9; color: #5b9364; }
.stat-card strong { display: block; margin: 9px 0 3px; font-size: 27px; font-weight: 650; line-height: 1.1; }
.stat-card small { color: #9aa39b; font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .9fr); gap: 13px; margin-top: 13px; }
.panel { padding: 20px 21px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-heading h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.panel-heading .eyebrow { margin-bottom: 5px; }
.text-button { border: 0; background: transparent; padding: 5px 2px; color: #5e8866; font-size: 10px; font-weight: 650; white-space: nowrap; }
.text-button:hover { color: #2d6643; }
.text-button span { margin-left: 3px; font-size: 14px; }
.upcoming-list { display: grid; }
.upcoming-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 11px; align-items: center; border-top: 1px solid #f0f2ef; padding: 11px 0; cursor: pointer; }
.upcoming-item:first-child { border-top: 1px solid #f0f2ef; }
.date-chip { display: grid; width: 46px; min-height: 46px; align-content: center; justify-items: center; border: 1px solid #edf0eb; border-radius: 11px; background: #f7f9f6; color: #657468; }
.date-chip b { font-size: 14px; line-height: 1.05; }
.date-chip small { margin-top: 4px; color: #929e93; font-size: 8px; }
.date-chip.unscheduled { color: #9a8a6c; }
.upcoming-copy { min-width: 0; }
.upcoming-copy strong { display: block; overflow: hidden; color: #303b33; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-copy small { display: block; overflow: hidden; margin-top: 4px; color: #929d94; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill, .type-pill { display: inline-flex; min-height: 21px; align-items: center; border-radius: 20px; background: #f2f4f1; padding: 3px 8px; color: #707c72; font-size: 9px; font-weight: 550; white-space: nowrap; }
.status-idea { background: #f1edfa; color: #826ca9; }
.status-planned { background: #edf2f8; color: #7084a4; }
.status-making { background: #edf4f5; color: #59858c; }
.status-ready { background: #fbf2e4; color: #ac7c40; }
.status-published { background: #eaf3e9; color: #5e8661; }
.empty-hint { color: #8e9a90; font-size: 10px; line-height: 1.7; }
.empty-action { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px dashed #dce7dc; border-radius: 11px; background: #fbfdfb; padding: 13px 14px; }
.empty-action p { margin: 0; color: #849087; font-size: 10px; line-height: 1.6; }
.empty-action button { flex: none; border: 0; background: transparent; color: #4e8358; font-size: 10px; font-weight: 650; }
.pipeline { display: grid; gap: 13px; }
.pipeline-empty { border: 1px dashed #e1e9e0; border-radius: 10px; background: #fbfdfb; padding: 15px 13px; color: #8e9a90; font-size: 10px; line-height: 1.7; }
.pipeline-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) 20px; gap: 9px; align-items: center; color: #748076; font-size: 9px; }
.pipeline-bar { overflow: hidden; height: 6px; border-radius: 8px; background: #f0f2ef; }
.pipeline-fill { height: 100%; border-radius: inherit; background: #8db197; }
.pipeline-count { color: #89948b; text-align: right; }
.pipeline-foot { display: flex; justify-content: space-between; margin-top: 17px; border-top: 1px solid #eef1ed; padding-top: 11px; color: #9aa49b; font-size: 9px; }
.recent-panel { margin-top: 13px; }
.content-table-wrap { overflow-x: auto; }
.content-table { width: 100%; border-collapse: collapse; }
.content-table th { padding: 0 8px 9px; color: #9aa49b; font-size: 9px; font-weight: 550; text-align: left; }
.content-table td { border-top: 1px solid #f0f2ef; padding: 11px 8px; color: #738076; font-size: 10px; }
.table-title { max-width: 350px; color: #344037 !important; font-weight: 650; }
.table-title button { border: 0; background: none; padding: 0; color: inherit; font-weight: inherit; text-align: left; }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-tab { border: 0; border-radius: 8px; background: transparent; padding: 8px 10px; color: #838e85; font-size: 10px; white-space: nowrap; }
.filter-tab:hover { background: #f0f4ef; }
.filter-tab.active { background: var(--green-soft); color: #2e6445; font-weight: 650; }
.filter-count { margin-left: 4px; color: #9ba59c; font-size: 9px; }
.search-box { display: flex; width: 230px; flex: none; align-items: center; border: 1px solid #e5eae4; border-radius: 9px; background: white; padding: 0 9px; color: #9ba69c; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; padding: 9px 6px; color: var(--text); font-size: 10px; }
.content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.content-card { display: flex; min-height: 190px; flex-direction: column; border: 1px solid #e8ede7; border-radius: 14px; background: white; padding: 16px; box-shadow: var(--shadow); cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.content-card:hover { transform: translateY(-2px); border-color: #cbdccf; box-shadow: 0 12px 28px rgba(30, 48, 36, .08); }
.content-card:focus-visible { outline: 3px solid rgba(65, 133, 88, .22); outline-offset: 2px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.content-card h3 { margin: 13px 0 6px; color: #29352d; font-size: 13px; font-weight: 650; line-height: 1.5; }
.card-summary { display: -webkit-box; overflow: hidden; margin: 0; color: #89948b; font-size: 10px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.platform-list { display: flex; flex-wrap: wrap; gap: 5px; }
.platform-chip { border-radius: 5px; background: #f3f6f2; padding: 4px 6px; color: #718076; font-size: 8px; }
.format-chip { border-radius: 5px; background: #eef5ee; padding: 4px 6px; color: #5e8165; font-size: 8px; }
.card-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.task-progress { color: #839087; font-size: 9px; white-space: nowrap; }
.card-date { display: block; margin-top: 10px; color: #9ba59c; font-size: 9px; }
.empty-state { border: 1px dashed #dce5dc; border-radius: 16px; background: #fff; padding: 58px 20px; text-align: center; }
.empty-illustration { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 14px; border-radius: 15px; background: #edf4ed; color: #77967c; font-size: 22px; }
.empty-state h3 { margin: 0 0 7px; color: #344037; font-size: 14px; }
.empty-state p { margin: 0 0 18px; color: #909b91; font-size: 10px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 27px; border-top: 1px solid var(--line); padding: 15px 0 22px; color: #9ba59c; font-size: 9px; }

.overlay { position: fixed; z-index: 8; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(27, 39, 30, .34); backdrop-filter: blur(3px); }
.editor-modal { width: min(700px, 100%); max-height: min(92vh, 900px); overflow: auto; border: 1px solid #e7ece6; border-radius: 18px; background: #fcfdfb; padding: 23px; box-shadow: 0 24px 70px rgba(25, 39, 29, .22); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; border-bottom: 1px solid #e9ede8; padding-bottom: 15px; }
.modal-header h2 { margin: 0; font-size: 18px; font-weight: 650; }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f0f3ef; color: #68746b; font-size: 19px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-section { display: flex; align-items: baseline; gap: 9px; border-top: 1px solid #edf0ec; padding-top: 12px; }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section strong { color: #455449; font-size: 10px; font-weight: 700; }
.form-section span { color: #9aa49b; font-size: 9px; font-weight: 400; }
.field { display: grid; gap: 6px; color: #5f6c61; font-size: 10px; font-weight: 650; }
.field > .required-mark { color: #bf7566; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #e2e8e1; border-radius: 8px; background-color: white; padding: 10px 11px; color: #303a32; font-size: 11px; font-weight: 400; outline: none; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7f8e82 50%), linear-gradient(135deg, #7f8e82 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-repeat: no-repeat; background-size: 5px 5px; padding-right: 34px; }
.field select:invalid { color: #9aa49b; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #91b29a; box-shadow: 0 0 0 3px rgba(99, 146, 107, .1); }
.field small { color: #929d93; font-size: 9px; font-weight: 400; line-height: 1.5; }
.full-span { grid-column: 1 / -1; }
.field-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.field-inline .text-button { white-space: nowrap; }
#classification-feedback { display: block; border-radius: 7px; background: #f5f7f4; padding: 7px 8px; color: #839087; }
#classification-feedback[data-state="suggestion"] { background: #eef6ef; color: #477451; }
#classification-feedback[data-state="caution"] { background: #fbf5eb; color: #927342; }
.quick-plan-card { display: grid; justify-items: start; gap: 7px; border: 1px solid #dfeadf; border-radius: 11px; background: linear-gradient(135deg, #f2f8f1, #fbfcfa); padding: 12px; }
.quick-plan-button { min-height: 36px; }
.quick-plan-card > small { color: #849087; font-size: 9px; font-weight: 400; line-height: 1.55; }
.quick-plan-card > .classification-feedback { width: 100%; }
.choice-field > span { color: #5f6c61; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.choice-chip { min-height: 31px; border: 1px solid #e0e8df; border-radius: 18px; background: #fff; padding: 6px 10px; color: #6f7d71; font-size: 9px; font-weight: 550; text-align: left; }
.choice-chip:hover { border-color: #bfd5c1; background: #f6faf5; }
.choice-chip.selected { border-color: #85ad8d; background: #eaf4eb; color: #3f754b; box-shadow: inset 0 0 0 1px rgba(89, 137, 97, .08); }
.choice-chip.preferred:not(.selected) { border-color: #d7e4d7; background: #f7faf6; color: #65816a; }
.field > span.suggestion-label { color: #5f6c61; }
.suggestion-label small { display: block; margin-top: 3px; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.suggestion-chip { border: 1px solid #dfe9df; border-radius: 18px; background: #f5f9f4; padding: 6px 9px; color: #5e8064; font-size: 9px; }
.suggestion-chip:hover { border-color: #c8dccb; background: #eaf3ea; }
.suggestion-note { color: #9aa49b; font-size: 9px; font-weight: 400; line-height: 1.5; }
.link-field > label { color: #5f6c61; font-size: 10px; font-weight: 650; }
.location-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.location-heading label { color: #5f6c61; font-size: 10px; font-weight: 650; }
.material-location-list { display: grid; gap: 8px; }
.material-location-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid #e6ece5; border-radius: 9px; background: #fff; padding: 7px; }
.material-location-row .material-location-value { min-width: 0; border: 0; background: transparent; padding: 6px 4px; color: #425047; font-size: 10px; }
.material-location-row .material-location-value:focus { outline: 0; }
.material-location-row .material-location-value[readonly] { color: #6b7c6e; }
.location-actions { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.location-actions .button { min-height: 28px; padding: 0 8px; font-size: 8px; }
.remove-location { width: 27px; height: 27px; border: 0; border-radius: 7px; background: #f7f8f6; color: #87948a; font-size: 16px; }
.remove-location:hover { background: #fff0ee; color: #ad5147; }
.link-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.link-preview a { display: inline-block; max-width: 100%; overflow: hidden; border: 1px solid #e1e9e1; border-radius: 6px; background: #f8faf7; padding: 5px 7px; color: #57815e; font-size: 9px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.link-preview a:hover { background: #edf5ed; text-decoration: underline; }
.task-field { border-top: 1px solid #e9ede8; padding-top: 13px; }
.form-section { display: flex; align-items: baseline; gap: 9px; border-top: 1px solid #edf0ec; padding-top: 12px; }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section strong { color: #455449; font-size: 10px; font-weight: 700; }
.form-section span { color: #9aa49b; font-size: 9px; font-weight: 400; }
.task-heading { display: flex; align-items: center; justify-content: space-between; }
.task-heading > span { color: #5f6c61; font-size: 10px; font-weight: 650; }
.task-list { display: grid; gap: 7px; margin: 6px 0 9px; }
.task-row { display: grid; min-width: 0; grid-template-columns: 18px minmax(0, 1fr) 28px; gap: 9px; align-items: center; border: 1px solid #edf0ec; border-radius: 9px; background: #fff; padding: 5px 7px; }
.task-row input[type="checkbox"] { width: 16px; height: 16px; justify-self: center; margin: 0; accent-color: #4f8160; }
.task-row input[type="text"] { width: 100%; min-width: 0; border: 1px solid #e4e9e3; border-radius: 7px; background: #fff; padding: 8px 9px; color: #303a32; font-size: 10px; }
.task-row input[type="text"]:focus { border-color: #91b29a; box-shadow: 0 0 0 3px rgba(99, 146, 107, .1); outline: 0; }
.remove-task { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 7px; background: #f7f8f6; color: #89948b; font-size: 16px; }
.remove-task:hover { background: #fff0ee; color: #ad5147; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; border-top: 1px solid #e9ede8; padding-top: 13px; }
.modal-actions { display: flex; gap: 8px; margin-left: auto; }
.account-modal { width: min(760px, 100%); max-height: min(90vh, 860px); overflow: auto; border: 1px solid #e7ece6; border-radius: 18px; background: #fcfdfb; padding: 23px; box-shadow: 0 24px 70px rgba(25, 39, 29, .22); }
.account-modal .modal-header { gap: 20px; }
.account-modal-intro { margin: 7px 0 0; color: #8b978d; font-size: 10px; }
.accounts-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.account-card { border: 1px solid #e6ece5; border-radius: 12px; background: white; padding: 14px; }
.account-card-top { display: flex; align-items: center; justify-content: space-between; }
.account-kind { border-radius: 20px; background: #eef4ee; padding: 5px 8px; color: #648069; font-size: 9px; }
.account-system-label { color: #a1aaa2; font-size: 8px; }
.account-card h3 { margin: 12px 0 5px; color: #344037; font-size: 13px; }
.account-card p { min-height: 31px; margin: 0; color: #879389; font-size: 9px; line-height: 1.6; }
.account-topics, .account-platforms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.account-topics span, .account-platforms span { border-radius: 5px; background: #f3f6f2; padding: 4px 6px; color: #728075; font-size: 8px; }
.account-platforms { align-items: center; border-top: 1px solid #f0f2ef; padding-top: 9px; }
.account-platforms small { width: 100%; color: #9aa49b; font-size: 8px; }
.account-platforms em { color: #a1aaa2; font-size: 8px; font-style: normal; }
.account-form { border-top: 1px solid #edf0ec; padding-top: 13px; }
.account-form .form-section { margin-bottom: 14px; }
.accounts-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; border-top: 1px solid #edf0ec; padding-top: 13px; }
.accounts-footer > span { color: #89958b; font-size: 9px; }
.card-owner { display: flex; align-items: center; gap: 6px; margin-top: 11px; color: #758378; font-size: 9px; }
.account-dot { width: 7px; height: 7px; border-radius: 50%; background: #78a47e; }
.folder-browser-modal { width: min(600px, 100%); max-height: min(82vh, 760px); overflow: auto; border: 1px solid #e7ece6; border-radius: 18px; background: #fcfdfb; padding: 22px; box-shadow: 0 24px 70px rgba(25, 39, 29, .22); }
.folder-browser-actions { display: flex; gap: 8px; align-items: center; }
.folder-browser-actions .button { min-height: 30px; padding: 0 10px; font-size: 9px; }
.folder-browser-list { display: grid; max-height: 52vh; overflow: auto; gap: 6px; }
.folder-entry { display: block; width: 100%; border: 1px solid #e7ece6; border-radius: 8px; background: #fff; padding: 10px 11px; color: #4c6351; font-size: 10px; text-align: left; text-decoration: none; }
.folder-entry:hover { border-color: #bfd5c1; background: #f5f9f4; }
.folder-browser-loading, .folder-browser-note { margin: 0; color: #8b978d; font-size: 9px; line-height: 1.6; }
.folder-browser-note { margin-top: 12px; border-top: 1px solid #edf0ec; padding-top: 10px; }

.toast { position: fixed; z-index: 20; bottom: 24px; left: 50%; transform: translate(-50%, 12px); border-radius: 9px; background: #26382b; padding: 10px 15px; color: white; font-size: 10px; opacity: 0; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); transition: opacity .2s ease, transform .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.login-screen { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 72% 18%, #e8f0e6, transparent 34%), #f5f6f3; }
.login-card { width: min(380px, 100%); border: 1px solid #e7ece6; border-radius: 19px; background: white; padding: 32px; box-shadow: 0 18px 55px rgba(39, 54, 42, .09); }
.login-card .brand-mark { margin-bottom: 22px; }
.login-card h1 { margin: 0 0 8px; font-size: 23px; }
.login-card .muted { margin: 0 0 22px; font-size: 11px; }
.login-card form { display: grid; gap: 9px; }
.login-card label { color: #657067; font-size: 10px; font-weight: 650; }
.login-card input { border: 1px solid #e2e6df; border-radius: 8px; padding: 11px; outline: none; }
.login-card .button { margin-top: 7px; }
.full-width { width: 100%; }
.error-text { min-height: 15px; margin: 0; color: #b75349; font-size: 10px; }

@media (max-width: 1120px) {
  .main-area { padding: 0 28px; }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.2fr) minmax(250px, .9fr); }
}

@media (max-width: 900px) {
  .sidebar { width: 74px; align-items: center; padding: 19px 9px 14px; }
  .brand { padding: 0 0 28px; }
  .brand > span:last-child, .nav-label, .storage-note { display: none; }
  .main-nav { width: 100%; }
  .nav-item { justify-content: center; padding: 0; font-size: 0; }
  .nav-icon { font-size: 18px; }
  .main-area { width: calc(100% - 74px); margin-left: 74px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .sidebar { inset: auto 0 0; width: 100%; height: 64px; flex-direction: row; justify-content: center; border: 0; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); padding: 5px 8px max(5px, env(safe-area-inset-bottom)); backdrop-filter: blur(10px); }
  .brand, .sidebar-bottom, .nav-label { display: none; }
  .main-nav { display: flex; align-items: center; justify-content: space-around; gap: 0; }
  .main-nav .nav-item { display: grid; min-width: 0; min-height: 48px; flex: 1; justify-items: center; gap: 2px; border-radius: 9px; padding: 5px 2px; font-size: 8px; }
  .nav-icon { width: auto; font-size: 16px; }
  .main-area { width: 100%; margin: 0; padding: 0 15px calc(83px + env(safe-area-inset-bottom)); }
  .topbar { height: 54px; }
  .top-actions { gap: 7px; }
  .today-label, .avatar { display: none; }
  .account-control > span { display: none; }
  .account-control { gap: 5px; }
  .account-control select { max-width: 132px; padding: 7px 30px 7px 8px; background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%; }
  .account-settings { width: 28px; height: 28px; }
  .preview-badge { display: none !important; }
  .preview-badge { font-size: 8px; }
  .page-heading { align-items: flex-start; padding: 24px 0 18px; }
  .page-heading h1 { font-size: 21px; }
  .page-heading .muted { max-width: 250px; font-size: 10px; }
  .page-heading > .button { min-height: 35px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
  .plus { font-size: 13px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { min-height: 103px; padding: 12px; }
  .stat-card strong { margin: 7px 0 2px; font-size: 23px; }
  .stat-top { font-size: 10px; }
  .stat-card small { font-size: 9px; }
  .dashboard-grid { gap: 9px; margin-top: 9px; }
  .panel { padding: 16px 14px; }
  .recent-panel { margin-top: 9px; }
  .content-grid { grid-template-columns: 1fr; gap: 9px; }
  .content-card { min-height: 170px; }
  .list-toolbar { align-items: stretch; flex-direction: column; gap: 9px; }
  .filter-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .search-box { width: 100%; }
  .filter-tab { padding: 8px 9px; }
  .page-footer { margin-top: 18px; font-size: 8px; }
  .page-footer span:last-child { max-width: 58%; text-align: right; }
  .overlay { place-items: end center; padding: 7px; }
  .editor-modal { width: 100%; max-height: 94vh; border-radius: 17px 17px 12px 12px; padding: 17px 15px; }
  .account-modal { width: 100%; max-height: 94vh; border-radius: 17px 17px 12px 12px; padding: 17px 15px; }
  .accounts-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .full-span { grid-column: auto; }
  .material-location-row { grid-template-columns: 1fr; }
  .location-actions { justify-content: flex-start; }
  .folder-browser-modal { width: 100%; max-height: 90vh; border-radius: 17px 17px 12px 12px; padding: 17px 15px; }
  .modal-footer { position: sticky; bottom: -17px; background: #fcfdfb; padding: 11px 0 3px; }
  .content-table th:nth-child(3), .content-table td:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.button.small { min-height: 29px; border-radius: 8px; padding: 0 10px; font-size: 9px; }
.icon-button.small { width: 27px; height: 27px; font-size: 15px; }

.capture-box { margin-bottom: 14px; border: 1px solid #e6ece5; border-radius: 14px; background: #fff; box-shadow: var(--shadow); padding: 14px; }
#capture-raw { width: 100%; border: 1px solid #e2e8e1; border-radius: 10px; padding: 12px; color: var(--text); font-size: 11px; line-height: 1.65; outline: none; resize: vertical; }
#capture-raw:focus { border-color: #91b29a; box-shadow: 0 0 0 3px rgba(99, 146, 107, .1); }
.capture-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.capture-hint { color: #9aa49b; font-size: 9px; }

.stack-list { display: grid; gap: 10px; }
.stack-card { border: 1px solid #e8ede7; border-radius: 14px; background: #fff; box-shadow: var(--shadow); padding: 16px; }
.stack-card h3 { margin: 8px 0 4px; color: #29352d; font-size: 13px; line-height: 1.5; }
.capture-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.capture-raw { color: #3a463d; font-size: 11px; line-height: 1.65; word-break: break-word; }
.capture-raw a { color: #3f754b; }
.stack-main small { display: block; margin-top: 7px; color: #9aa49b; font-size: 9px; }
.stack-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }

.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.topic-card { display: flex; flex-direction: column; border: 1px solid #e8ede7; border-radius: 14px; background: #fff; box-shadow: var(--shadow); padding: 16px; }
.topic-card.is-strong { border-color: #bcd9c2; }
.topic-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.score-badge { display: inline-flex; align-items: baseline; gap: 2px; color: #2f5d43; font-size: 20px; font-weight: 650; line-height: 1; }
.score-badge small { color: #9aa49b; font-size: 9px; font-weight: 500; }
.decision-pill { border-radius: 20px; background: #f2f4f1; padding: 4px 9px; color: #707c72; font-size: 9px; font-weight: 600; white-space: nowrap; }
.decision-evaluate { background: #f1edfa; color: #826ca9; }
.decision-do { background: #eaf3e9; color: #4f7d57; }
.decision-later { background: #fbf2e4; color: #a97a3f; }
.decision-drop { background: #f1f2f0; color: #939c94; }
.topic-card h3 { margin: 11px 0 6px; color: #29352d; font-size: 13px; line-height: 1.5; cursor: pointer; }
.topic-card p { display: -webkit-box; overflow: hidden; margin: 0; color: #89948b; font-size: 10px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.score-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.score-chips span { border-radius: 5px; background: #f4f7f3; padding: 4px 6px; color: #718076; font-size: 8px; }
.topic-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 13px; }
.topic-foot small { color: #9aa49b; font-size: 9px; }
.card-actions { display: flex; align-items: center; gap: 8px; }

.set-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.set-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.account-chip { border-radius: 5px; background: #eef5ee; padding: 4px 7px; color: #557a5c; font-size: 8px; font-weight: 600; }
.set-card h3 { cursor: pointer; }
.set-sub { display: block; margin-bottom: 10px; color: #9aa49b; font-size: 9px; }
.progress-line { overflow: hidden; height: 6px; border-radius: 8px; background: #f0f2ef; }
.progress-line div { height: 100%; border-radius: inherit; background: #8db197; transition: width .2s ease; }
.progress-copy { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; color: #839087; font-size: 9px; }
.progress-copy span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-tasks { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0 0; padding: 0; list-style: none; }
.mini-tasks label { display: flex; align-items: center; gap: 6px; border: 1px solid #eef1ed; border-radius: 18px; background: #fafbf9; padding: 5px 9px; color: #66746a; font-size: 9px; cursor: pointer; }
.mini-tasks input { width: 13px; height: 13px; margin: 0; accent-color: #4f8160; }
.mini-tasks .done { color: #a8b0a9; text-decoration: line-through; }
.set-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; border-top: 1px solid #f0f2ef; padding-top: 10px; }
.set-foot small { color: #9aa49b; font-size: 9px; }

.publication-list { display: grid; gap: 6px; }
.publication-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 76px; gap: 8px; align-items: center; border: 1px solid #eef1ed; border-radius: 9px; background: #fbfcfa; padding: 7px 9px; }
.pub-check { display: flex; align-items: center; gap: 7px; color: #4d5c51; font-size: 10px; }
.pub-check input { width: 15px; height: 15px; margin: 0; accent-color: #4f8160; }
.pub-url { min-width: 0; width: 100%; border: 1px solid #e4e9e3; border-radius: 7px; background: #fff; padding: 7px 8px; color: #303a32; font-size: 10px; outline: none; }
.pub-url:focus { border-color: #91b29a; }
.pub-link { color: #4f8058; font-size: 9px; text-decoration: none; white-space: nowrap; }
.pub-link:hover { text-decoration: underline; }
.publication-edit-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 82px 28px; gap: 7px; align-items: center; margin-bottom: 6px; border: 1px solid #edf0ec; border-radius: 9px; background: #fff; padding: 6px 7px; }
.publication-edit-row input.pub-platform, .publication-edit-row input.pub-url { min-width: 0; width: 100%; border: 1px solid #e4e9e3; border-radius: 7px; padding: 8px 9px; color: #303a32; font-size: 10px; outline: none; }
.pub-done { display: flex; align-items: center; gap: 5px; color: #66746a; font-size: 9px; white-space: nowrap; }

.platform-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.table-link { color: #4f8058; font-size: 9px; text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.inline-bar { overflow: hidden; width: 90px; height: 6px; border-radius: 8px; background: #f0f2ef; }
.inline-bar div { height: 100%; background: #8db197; }

.score-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 9px; align-items: end; }
.score-field { display: grid; gap: 6px; color: #5f6c61; font-size: 10px; font-weight: 650; }
.score-field input { width: 100%; border: 1px solid #e2e8e1; border-radius: 8px; padding: 9px 10px; color: #303a32; font-size: 11px; outline: none; }
.score-field input:focus { border-color: #91b29a; box-shadow: 0 0 0 3px rgba(99, 146, 107, .1); }
.score-total { display: grid; justify-items: center; gap: 2px; border: 1px solid #e3ece4; border-radius: 10px; background: #f6faf5; padding: 6px 12px; }
.score-total small { color: #9aa49b; font-size: 8px; }
.score-total strong { color: #2f5d43; font-size: 20px; line-height: 1; }
.score-total span { color: #9aa49b; font-size: 8px; }
.source-note { border: 1px dashed #e0e8df; border-radius: 8px; background: #fbfcfa; padding: 8px 9px; color: #718076; font-size: 9px; line-height: 1.6; word-break: break-word; }
.source-note a { color: #4f8058; }
.mini-tag { display: inline-block; margin: 2px 4px 2px 0; border-radius: 5px; background: #f3f6f2; padding: 4px 6px; color: #718076; font-size: 8px; }
.new-set-hint { margin: 0; border: 1px dashed #dfe9df; border-radius: 9px; background: #f7faf6; padding: 10px 11px; color: #6d7c70; font-size: 9px; line-height: 1.6; }
.set-detail-sections { display: grid; gap: 13px; margin-top: 4px; border-top: 1px solid #edf0ec; padding-top: 13px; }

@media (max-width: 1120px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .topic-grid { grid-template-columns: 1fr; }
  .capture-card { grid-template-columns: 1fr; }
  .stack-actions { justify-content: flex-start; }
}
@media (max-width: 620px) {
  .stack-card { padding: 14px; }
  .capture-actions { flex-direction: column; align-items: stretch; }
  .capture-actions .button { width: 100%; }
  .publication-row { grid-template-columns: 1fr; }
  .publication-edit-row { grid-template-columns: 1fr 1fr; }
  .publication-edit-row .remove-task { justify-self: end; }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-total { grid-column: 1 / -1; grid-auto-flow: column; align-items: center; justify-content: center; }
  .progress-copy span:last-child { max-width: 55%; }
}
