:root {
  --ink: #171717;
  --muted: #77736c;
  --line: #e9e6df;
  --paper: #fff;
  --canvas: #f6f5f1;
  --accent: #ffd83d;
  --accent-deep: #efb900;
  --danger: #d94343;
  --shadow: 0 18px 55px rgba(39, 34, 22, .09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 82% -10%, #fff8cf 0, transparent 30rem), var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1240px) / 2)); background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(0,0,0,.06); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark, .login-mark { display: block; object-fit: cover; background: #fffdf7; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.brand-mark { width: 42px; height: 42px; }
.brand span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 16px; }
.brand small { color: var(--muted); margin-top: 4px; font-size: 11px; }
.main-nav { display: flex; align-items: center; gap: 5px; padding: 5px; border-radius: 13px; background: #efede7; }
.nav-button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.nav-button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.top-actions { display: flex; gap: 10px; min-width: 230px; justify-content: flex-end; }
.button { border: 0; border-radius: 12px; min-height: 42px; padding: 0 17px; font-weight: 700; transition: transform .16s, background .16s, opacity .16s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { background: var(--accent); color: #16130b; box-shadow: 0 7px 18px rgba(216,169,0,.16); }
.button.primary:hover { background: #ffdf59; }
.button.ghost { background: #efede7; color: #45413a; }
.button.danger { background: #fff0ef; color: var(--danger); }
.button.wide { width: 100%; }
main { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 80px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 44px; }
.eyebrow { margin: 0 0 10px; color: #9a7b00; font-size: 11px; letter-spacing: .18em; font-weight: 900; }
.hero h1 { margin: 0; font-size: clamp(38px, 5vw, 62px); letter-spacing: -.06em; line-height: .95; }
.subtitle { color: var(--muted); margin: 18px 0 0; font-size: 15px; }
.stats { display: flex; background: rgba(255,255,255,.72); border: 1px solid rgba(0,0,0,.06); border-radius: 18px; box-shadow: var(--shadow); }
.stats div { min-width: 105px; padding: 18px 22px; display: flex; flex-direction: column; }
.stats div + div { border-left: 1px solid var(--line); }
.stats strong { font-size: 24px; line-height: 1; }
.stats span { color: var(--muted); font-size: 11px; margin-top: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: rgba(255,255,255,.7); padding: 10px 16px; border-radius: 99px; color: #625f58; font-size: 13px; font-weight: 700; }
.tab.active { background: #191919; color: #fff; border-color: #191919; }
.search { display: flex; align-items: center; gap: 8px; width: min(280px, 32vw); padding: 0 14px; height: 42px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: #999; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; }
.content-card { background: rgba(255,255,255,.82); border: 1px solid rgba(0,0,0,.06); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); min-height: 360px; }
.category-manager { min-height: 0; margin-bottom: 22px; }
.category-config-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.category-config { display: grid; grid-template-columns: minmax(110px, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.category-config.is-hidden { opacity: .58; background: #f4f2ed; }
.category-config-copy { min-width: 0; }
.category-config-copy strong, .category-config-copy small { display: block; overflow-wrap: anywhere; }
.category-config-copy strong { font-size: clamp(13px, 1vw, 15px); line-height: 1.35; }
.category-config-copy small { margin-top: 4px; color: var(--muted); font-size: clamp(9px, .75vw, 11px); line-height: 1.4; }
.category-config-actions { display: grid; grid-template-columns: repeat(4, auto); gap: 6px; }
.category-config .mini { min-width: 34px; padding: 0 8px; white-space: nowrap; }
.daily-hero { align-items: center; margin-bottom: 28px; }
.daily-hero .subtitle { max-width: 760px; line-height: 1.7; }
.daily-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.daily-summary article { min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 10px; border: 1px solid rgba(0,0,0,.06); border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: var(--shadow); }
.daily-summary span { color: var(--muted); font-size: 11px; }
.daily-summary strong { font-size: 30px; line-height: 1; }
.daily-card { min-height: 0; }
.daily-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; }
.daily-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
.daily-table th, .daily-table td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.daily-table thead th { color: var(--muted); background: #f6f4ef; font-size: 10px; font-weight: 800; white-space: nowrap; }
.daily-table th:first-child { text-align: left; }
.daily-table tbody th { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.daily-table tbody th span { padding: 3px 7px; border-radius: 99px; color: #6d5600; background: #ffef9d; font-size: 9px; }
.daily-table tbody tr:last-child th, .daily-table tbody tr:last-child td { border-bottom: 0; }
.daily-table tbody tr.is-today { background: #fffdf2; }
.daily-table tbody tr:hover { background: #faf9f5; }
.feedback-hero { margin-bottom: 28px; }
.feedback-toolbar { justify-content: flex-end; }
.feedback-list { display: grid; gap: 16px; }
.feedback-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.feedback-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.feedback-card > header div { display: flex; flex-direction: column; gap: 5px; }
.feedback-card > header strong { font-size: 14px; }
.feedback-card > header span { color: var(--muted); font-size: 11px; }
.feedback-card > header code { color: #8d887e; font-size: 10px; }
.feedback-content { margin: 18px 0; font-size: 15px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-images { display: grid; grid-template-columns: repeat(5, minmax(0, 130px)); gap: 10px; margin-bottom: 16px; }
.feedback-images button { aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #efede7; }
.feedback-images img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feedback-no-images { margin: 0 0 16px; color: #aaa59b; font-size: 11px; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.feedback-meta span { padding: 6px 9px; border-radius: 99px; color: #625c50; background: #f4f2ed; font-size: 10px; }
.feedback-log { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 13px; }
.feedback-log summary { color: #75672d; cursor: pointer; font-size: 11px; font-weight: 800; }
.feedback-log pre { max-height: 320px; margin: 12px 0 0; padding: 14px; overflow: auto; border-radius: 12px; color: #dedbd3; background: #24231f; font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.membership-hero { margin-bottom: 28px; }
.member-search-card, .member-summary, .grant-card, .record-section { background: rgba(255,255,255,.86); border: 1px solid rgba(0,0,0,.06); border-radius: 24px; box-shadow: var(--shadow); }
.member-search-card { padding: 22px 24px 8px; }
.member-search-form { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: end; gap: 12px; }
.member-search-form .button { height: 44px; }
.member-result { display: grid; gap: 18px; margin-top: 18px; }
.member-summary { padding: 25px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.member-summary h2 { margin: 0; font-size: 25px; }
.account-uuid { margin: 9px 0 0; color: #4f4b44; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.account-created { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.membership-state { min-width: 220px; padding: 18px 20px; display: flex; flex-direction: column; border-radius: 17px; background: #fff8d5; }
.membership-state span, .membership-state small { color: #75672d; font-size: 11px; }
.membership-state strong { margin: 6px 0; font-size: 22px; }
.grant-card { padding: 25px 28px 10px; }
.grant-card h2, .record-heading h2 { margin: 0; font-size: 20px; }
.grant-card > div:first-child > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.grant-fields { margin-top: 20px; display: grid; grid-template-columns: 190px minmax(260px, 1fr) auto; align-items: end; gap: 12px; }
.grant-fields .button { height: 44px; }
.record-section { padding: 26px; }
.record-heading { margin-bottom: 19px; }
.record-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: start; }
.record-group { min-width: 0; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: #f9f8f5; }
.record-group > header { padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
.record-group h3 { margin: 0; font-size: 14px; }
.record-group header span { min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; border-radius: 99px; color: #705b00; background: #fff2a8; font-size: 10px; font-weight: 900; }
.record-list { max-height: 480px; padding: 10px; display: grid; gap: 9px; overflow: auto; }
.record-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.record-card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.record-card-title strong { font-size: 13px; }
.record-card-title span { flex: none; padding: 3px 7px; border-radius: 99px; color: #665100; background: #fff3b4; font-size: 9px; font-weight: 800; }
.record-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.record-empty { margin: 0; padding: 24px 10px; color: #aaa59b; text-align: center; font-size: 11px; }
.filter-hero { align-items: center; margin-bottom: 28px; }
.filter-hero-actions { display: flex; gap: 10px; flex: none; }
.filter-workbench { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.35fr); gap: 20px; align-items: start; }
.filter-preview-card, .filter-controls-card { border: 1px solid rgba(0,0,0,.06); border-radius: 24px; background: rgba(255,255,255,.86); box-shadow: var(--shadow); }
.filter-preview-card { position: sticky; top: 96px; padding: 20px; }
.filter-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.filter-panel-head h2 { margin: 0; font-size: 18px; }
.filter-panel-head p { max-width: 270px; margin: 5px 0 0; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-upload-button { position: relative; display: grid; place-items: center; flex: none; cursor: pointer; }
.filter-upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filter-preview-stage { position: relative; min-height: 430px; max-height: calc(100vh - 260px); display: grid; place-items: center; overflow: hidden; border: 1.5px dashed #cbc5b9; border-radius: 18px; background-color: #e8e6e1; background-image: linear-gradient(45deg,#ddd9d1 25%,transparent 25%),linear-gradient(-45deg,#ddd9d1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ddd9d1 75%),linear-gradient(-45deg,transparent 75%,#ddd9d1 75%); background-size: 22px 22px; background-position: 0 0,0 11px,11px -11px,-11px 0; cursor: pointer; transition: border-color .16s, background-color .16s; }
.filter-preview-stage.dragover { border-color: var(--accent-deep); background-color: #fff7c9; }
.filter-preview-stage canvas { display: block; max-width: 100%; max-height: calc(100vh - 265px); width: auto; height: auto; object-fit: contain; }
.filter-preview-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 28px; text-align: center; background: rgba(248,247,243,.93); }
.filter-preview-empty b { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); font-size: 28px; }
.filter-preview-empty strong { margin-top: 4px; font-size: 14px; }
.filter-preview-empty small { max-width: 280px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.filter-preview-foot { display: flex; justify-content: space-between; margin-top: 11px; color: var(--muted); font-size: 10px; }
.filter-preview-foot strong { color: #514d45; }
.filter-controls-card { padding: 24px; }
.filter-preset-row { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(260px, 1fr); align-items: end; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.filter-preset-row p { min-height: 44px; margin: 0; padding: 10px 12px; display: flex; align-items: center; border-radius: 11px; color: #6d685f; background: #f4f2ed; font-size: 11px; line-height: 1.55; }
.filter-control-group { padding: 22px 0; border-bottom: 1px solid var(--line); }
.filter-control-group:last-child { padding-bottom: 0; border-bottom: 0; }
.filter-control-group > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.filter-control-group h3 { margin: 0; font-size: 15px; }
.filter-control-group header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.filter-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.filter-control { min-width: 0; }
.filter-control > span { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.filter-control strong { font-size: 11px; }
.filter-control output { color: #8c7620; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.filter-control > div { display: grid; grid-template-columns: minmax(80px, 1fr) 64px auto; align-items: center; gap: 7px; }
.filter-control input[type=range] { width: 100%; accent-color: var(--accent-deep); }
.filter-control input[type=number] { width: 64px; height: 31px; padding: 0 6px; border: 1px solid #ddd8ce; border-radius: 8px; background: #fff; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.filter-control small { min-width: 15px; color: var(--muted); font-size: 9px; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.list-head h2 { margin: 0; font-size: 20px; }
.list-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.save-status { color: #8b7620; font-size: 12px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 16px; }
.template-card { display: grid; grid-template-columns: 96px 1fr; min-height: 142px; background: var(--paper); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; transition: transform .18s, box-shadow .18s, opacity .18s; }
.template-card:hover { transform: translateY(-2px); box-shadow: 0 13px 30px rgba(28,24,15,.09); }
.template-card.dragging { opacity: .35; transform: scale(.98); }
.template-card.drag-target { outline: 3px solid rgba(255,216,61,.72); outline-offset: 2px; }
.card-image { position: relative; background: #dedbd3; overflow: hidden; min-height: 142px; }
.card-image > img:first-child { width: 100%; height: 100%; position: absolute; object-fit: cover; }
.outline-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.position { position: absolute; left: 7px; top: 7px; min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: rgba(20,20,20,.74); color: #fff; font-size: 10px; font-weight: 800; backdrop-filter: blur(8px); }
.card-copy { min-width: 0; padding: 14px 14px 12px; display: flex; flex-direction: column; }
.card-top { display: flex; justify-content: space-between; gap: 8px; }
.card-copy h3 { margin: 0; font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.badge { flex: none; background: #fff6c5; color: #7a5e00; border-radius: 99px; padding: 3px 7px; font-size: 9px; font-weight: 900; }
.card-copy p { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { display: flex; align-items: center; gap: 7px; margin-top: auto; }
.mini { height: 30px; padding: 0 10px; border: 0; border-radius: 8px; font-size: 11px; font-weight: 700; background: #f2f0eb; color: #555149; }
.mini.delete { margin-left: auto; color: var(--danger); background: #fff2f1; }
.drag-handle { padding: 2px 4px; border: 0; background: transparent; color: #aaa59b; font-size: 20px; line-height: 1; cursor: grab; }
.empty { min-height: 280px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty > span { font-size: 42px; color: #c1bbb0; }
.empty h3 { color: var(--ink); margin: 12px 0 6px; }
.empty p { margin: 0 0 18px; font-size: 13px; }
.hidden { display: none !important; }
.modal { border: 0; padding: 0; border-radius: 24px; box-shadow: 0 30px 100px rgba(0,0,0,.28); color: var(--ink); }
.modal::backdrop { background: rgba(15,14,12,.52); backdrop-filter: blur(5px); }
.editor { width: min(980px, calc(100% - 30px)); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 25px 28px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 24px; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f1efe9; font-size: 24px; line-height: 1; }
.modal-body { padding: 24px 28px; max-height: min(70vh, 720px); overflow: auto; }
.upload-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-card { position: relative; aspect-ratio: 3/2; border: 1.5px dashed #cfc9bc; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: #f8f7f3; cursor: pointer; }
.upload-card.dragover { border-color: var(--accent-deep); background: #fffae3; }
.upload-card.checker { background-color: #f7f7f7; background-image: linear-gradient(45deg,#e7e7e7 25%,transparent 25%),linear-gradient(-45deg,#e7e7e7 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7e7e7 75%),linear-gradient(-45deg,transparent 75%,#e7e7e7 75%); background-size: 18px 18px; background-position: 0 0,0 9px,9px -9px,-9px 0; }
.upload-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
.upload-card.has-image img { display: block; }
.upload-card.has-image .upload-placeholder { display: none; }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.upload-placeholder b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); font-size: 22px; }
.upload-placeholder strong { font-size: 13px; }
.upload-placeholder small { color: var(--muted); font-size: 10px; }
.replace-label { position: absolute; bottom: 8px; right: 8px; display: none; padding: 5px 8px; border-radius: 7px; color: #fff; background: rgba(0,0,0,.62); font-size: 10px; }
.upload-card.has-image:hover .replace-label { display: block; }
.existing-outline-action { margin-top: 12px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e3ddce; border-radius: 13px; background: #fbfaf6; }
.existing-outline-action > span { display: flex; flex-direction: column; gap: 3px; }
.existing-outline-action strong { font-size: 11px; }
.existing-outline-action small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.existing-outline-action .button { flex: none; }
.outline-editor { margin-top: 18px; padding: 18px; border: 1px solid #e3ddce; border-radius: 18px; background: #fbfaf6; }
.outline-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.outline-editor-head .eyebrow { margin-bottom: 5px; font-size: 9px; }
.outline-editor-head h3 { margin: 0; font-size: 16px; }
.outline-editor-head p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.local-badge { flex: none; padding: 6px 9px; border-radius: 99px; color: #5e550f; background: #fff2a2; font-size: 9px; font-weight: 900; }
.outline-workbench { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, .7fr); gap: 16px; align-items: start; }
.outline-stage { position: relative; min-height: 340px; max-height: 520px; display: grid; place-items: center; overflow: hidden; border: 1px solid #d8d3c8; border-radius: 14px; background-color: #f2f2f2; background-image: linear-gradient(45deg,#e2e2e2 25%,transparent 25%),linear-gradient(-45deg,#e2e2e2 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e2e2e2 75%),linear-gradient(-45deg,transparent 75%,#e2e2e2 75%); background-size: 18px 18px; background-position: 0 0,0 9px,9px -9px,-9px 0; }
.outline-stage canvas { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; cursor: crosshair; touch-action: none; }
.outline-loading { position: absolute; inset: 0; display: none; place-items: center; color: #665712; background: rgba(255,250,221,.88); font-size: 12px; font-weight: 800; backdrop-filter: blur(3px); }
.outline-editor.is-busy .outline-loading { display: grid; }
.outline-controls { display: grid; gap: 14px; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 10px; background: #ebe8e1; }
.segmented-control button { min-height: 33px; padding: 0 8px; border: 0; border-radius: 8px; color: #756f66; background: transparent; font-size: 10px; font-weight: 800; }
.segmented-control button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.08); }
.outline-control-group { display: grid; gap: 8px; }
.outline-control-group > strong, .outline-range strong { font-size: 11px; }
.outline-control-group p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.tool-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.tool-buttons .mini { padding: 0 6px; }
.tool-buttons .mini.active { color: #4f4300; background: var(--accent); }
.outline-range { display: grid; gap: 7px; }
.outline-range > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.outline-range output { color: #8c7620; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.outline-range input { width: 100%; accent-color: var(--accent-deep); }
.outline-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.outline-editor .mini:disabled { opacity: .42; cursor: default; }
.outline-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.outline-editor-foot span { color: #7a681a; font-size: 10px; font-weight: 800; }
.outline-editor-foot span[data-kind=error] { color: var(--danger); }
.outline-editor-foot span[data-kind=success] { color: #50731b; }
.outline-editor-foot small { max-width: 430px; color: var(--muted); font-size: 9px; text-align: right; line-height: 1.5; }
.form-grid { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 700; }
.field.full { grid-column: 1 / -1; }
.field em { color: #aaa; font-style: normal; font-weight: 500; }
.field input, .field select { width: 100%; height: 44px; border: 1px solid #ddd8ce; border-radius: 11px; padding: 0 13px; outline: 0; background: #fff; }
.field input:focus, .field select:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 3px rgba(255,216,61,.22); }
.switch-field { border: 1px solid #ddd8ce; border-radius: 11px; padding: 8px 11px 8px 13px; display: flex; align-items: center; justify-content: space-between; }
.switch-field > span { display: flex; flex-direction: column; gap: 3px; }
.switch-field strong { font-size: 12px; }
.switch-field small { color: var(--muted); font-size: 9px; }
input[role=switch] { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: #d6d3cc; position: relative; transition: background .16s; }
input[role=switch]::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #fff; position: absolute; left: 3px; top: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .16s; }
input[role=switch]:checked { background: var(--accent-deep); }
input[role=switch]:checked::after { transform: translateX(18px); }
.form-error { min-height: 18px; margin: 13px 0 0; color: var(--danger); font-size: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px 22px; border-top: 1px solid var(--line); }
.login { width: min(390px, calc(100% - 30px)); text-align: center; }
.login form { padding: 36px; }
.login-mark { width: 58px; height: 58px; margin: 0 auto 18px; }
.login h2 { margin: 0; }
.login p { color: var(--muted); font-size: 13px; margin: 8px 0 24px; }
.login .field { text-align: left; margin-bottom: 6px; }
.login .form-error { text-align: left; margin: 5px 0 10px; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 30; transform: translate(-50%, 20px); background: #191919; color: #fff; padding: 11px 17px; border-radius: 99px; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 76px; padding: 10px 16px; flex-wrap: wrap; gap: 9px; }
  .brand { order: 1; }
  .main-nav { order: 3; width: 100%; }
  .nav-button { flex: 1; }
  .top-actions { order: 2; min-width: 0; }
  .button.ghost#refreshButton { display: none; }
  main { width: min(100% - 24px, 620px); padding-top: 32px; }
  .hero { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
  .stats { width: 100%; }
  .stats div { flex: 1; min-width: 0; padding: 15px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .tab { flex: none; }
  .search { width: 100%; }
  .content-card { padding: 18px; border-radius: 19px; }
  .daily-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-summary article:last-child { grid-column: 1 / -1; }
  .category-config-list { grid-template-columns: 1fr; }
  .category-config { grid-template-columns: 1fr; align-items: start; }
  .category-config-actions { width: 100%; grid-template-columns: repeat(4, 1fr); }
  .template-grid { grid-template-columns: 1fr; }
  .upload-pair { grid-template-columns: 1fr 1fr; gap: 10px; }
  .outline-workbench { grid-template-columns: 1fr; }
  .outline-stage { min-height: 280px; max-height: 60vh; }
  .outline-stage canvas { max-height: 60vh; }
  .outline-editor-foot { align-items: flex-start; flex-direction: column; }
  .outline-editor-foot small { text-align: left; }
  .existing-outline-action { align-items: stretch; flex-direction: column; }
  .modal-body, .modal-head { padding-left: 18px; padding-right: 18px; }
  .modal-foot { padding-left: 18px; padding-right: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .member-search-form, .grant-fields { grid-template-columns: 1fr; }
  .member-summary { align-items: stretch; flex-direction: column; }
  .membership-state { min-width: 0; }
  .record-groups { grid-template-columns: 1fr; }
  .feedback-images { grid-template-columns: repeat(3, 1fr); }
  .filter-hero-actions { width: 100%; }
  .filter-hero-actions .button { flex: 1; }
  .filter-workbench { grid-template-columns: 1fr; }
  .filter-preview-card { position: static; }
  .filter-preview-stage { min-height: 360px; max-height: 70vh; }
  .filter-preview-stage canvas { max-height: 70vh; }
  .filter-preset-row, .filter-control-grid { grid-template-columns: 1fr; }
}
