:root {
    --surface: #fbfaf6;
    --surface-muted: #f1f0ea;
    --panel: #fffefa;
    --ink: #252b35;
    --muted: #707783;
    --line: #dddcd5;
    --primary: #267763;
    --primary-soft: #dceee8;
    --blue: #3d6fba;
    --amber: #bc8324;
    --red: #b84a3f;
    --shadow: 0 18px 48px rgba(37, 43, 53, .08);
}

:root[data-theme="dark"] {
    --surface: #151715;
    --surface-muted: #20231f;
    --panel: #1b1e1b;
    --ink: #eceee8;
    --muted: #a6ada4;
    --line: #343932;
    --primary: #78c7ad;
    --primary-soft: #203b34;
    --blue: #93b7ff;
    --amber: #dfb66b;
    --red: #e08378;
    --shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-shell {
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    overflow-x: clip;
}

.sidebar {
    background: var(--surface-muted);
    border-right: 1px solid var(--line);
    padding: 18px 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 18px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: var(--surface);
    background: var(--primary);
    font-weight: 800;
}

.brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--panel);
}

.brand span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.nav-section {
    margin-top: 16px;
}

.nav-title {
    padding: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 7px;
    color: var(--ink);
}

.nav-item span:first-child {
    width: 18px;
    text-align: center;
    color: var(--muted);
}

.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 650;
}

.main {
    min-width: 0;
}

.topbar {
    min-width: 0;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.search {
    min-width: 0;
    flex: 1;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--muted);
}

.search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.icon-button,
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.icon-button {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
    position: relative;
}

button.icon-button {
    cursor: pointer;
}

.notify-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
}

.notification-menu {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: 340px;
    max-height: 430px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
}

.mobile-nav {
    display: none;
}

.notification-dropdown-head,
.notice-mini {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.notification-dropdown-head {
    padding: 8px;
    border-bottom: 1px solid var(--line);
}

.notification-dropdown-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-mini {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
}

.notice-mini:last-child {
    border-bottom: 0;
}

.notice-mini.unread {
    background: var(--primary-soft);
}

.notice-mini a {
    min-width: 0;
    color: var(--ink);
}

.notice-mini strong,
.notice-mini span {
    display: block;
}

.notice-mini strong {
    font-size: 13px;
}

.notice-mini span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
}

.avatar {
    border-radius: 999px;
    background: #cbd9c2;
    color: var(--blue);
    font-weight: 720;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-select {
    min-width: 120px;
    height: 34px;
}

.site-logo-preview {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
}

.site-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar.small {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.logout-link {
    color: var(--muted);
    font-size: 13px;
}

.content {
    min-width: 0;
    padding: 24px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.page-head > div:first-child {
    min-width: 0;
}

.page-head h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.page-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.button-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 13px;
    background: var(--panel);
    color: var(--ink);
    font-weight: 620;
    cursor: pointer;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.btn.primary {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--surface);
}

.btn.danger {
    border-color: #e2b7ae;
    color: var(--red);
}

.inline-form {
    display: inline-flex;
}

.home-page {
    max-width: 1680px;
}

.home-hero {
    margin-bottom: 12px;
}

.home-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.home-status-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.home-status-tile {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    display: grid;
    align-content: space-between;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--panel);
}

.home-status-tile:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
}

.home-status-tile span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.home-status-tile strong {
    font-size: 34px;
    line-height: 1;
}

.home-status-tile em,
.home-shortcut em,
.home-shortcut span,
.home-panel-head p,
.home-list-title span {
    color: var(--muted);
    font-style: normal;
}

.amber-tile:before {
    background: var(--amber);
}

.blue-tile:before {
    background: var(--blue);
}

.home-shortcuts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.home-shortcut {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon body"
        "icon count";
    gap: 2px 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.home-shortcut:hover {
    border-color: var(--primary);
    background: var(--surface);
    transform: translateY(-1px);
}

.home-shortcut .tile-icon {
    grid-area: icon;
}

.home-shortcut div:last-of-type {
    grid-area: body;
    min-width: 0;
}

.home-shortcut strong,
.home-shortcut span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-shortcut strong {
    font-size: 14px;
}

.home-shortcut span {
    font-size: 12px;
}

.home-shortcut em {
    grid-area: count;
    font-size: 12px;
    font-weight: 650;
}

.home-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr);
    gap: 16px;
    align-items: start;
}

.home-main-stack,
.home-side-stack {
    display: grid;
    gap: 16px;
}

.home-feed,
.home-questions,
.home-saved {
    overflow: hidden;
}

#home-open-reminders {
    scroll-margin-top: 80px;
}

.home-panel-head {
    min-height: 64px;
    align-items: flex-start;
}

.home-panel-head h2 {
    font-size: 16px;
}

.home-panel-head p {
    margin: 3px 0 0;
    font-size: 12px;
}

.home-feed-row {
    min-height: 104px;
    align-items: flex-start;
}

.home-feed-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.home-feed-row .row-title,
.home-mini-row .row-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-feed-tags {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.home-feed-row p {
    max-width: 76ch;
    margin: 6px 0 6px;
    color: var(--muted);
}

.home-list-group {
    border-top: 1px solid var(--line);
}

.home-list-group:first-of-type {
    border-top: 0;
}

.home-list-title {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 15px 7px;
    background: var(--surface);
}

.home-list-title strong {
    font-size: 13px;
}

.home-mini-row {
    min-height: 58px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.compact-empty {
    padding-top: 12px;
    padding-bottom: 14px;
    font-size: 13px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.module-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.module-card {
    display: block;
    padding: 16px;
}

.module-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.module-card h2 {
    margin: 12px 0 6px;
    font-size: 16px;
}

.module-card p,
.row-meta {
    color: var(--muted);
}

.tile-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--surface-muted);
    color: var(--primary);
    font-weight: 750;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 12px;
    font-weight: 650;
    background: var(--surface-muted);
    color: var(--muted);
}

.badge.pin {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.draft {
    background: #fbefd8;
    color: var(--amber);
}

.split {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.plan-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 16px;
}

.plan-summary div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-right: 1px solid var(--line);
}

.plan-summary div:last-child {
    border-right: 0;
}

.plan-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.plan-summary strong {
    font-size: 24px;
}

.plan-tabs {
    display: inline-flex;
    gap: 3px;
    margin: 0 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px;
    background: var(--surface-muted);
}

.plan-tabs a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 0 13px;
    color: var(--muted);
    font-weight: 650;
}

.plan-tabs a.active {
    background: var(--panel);
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(37, 43, 53, .06);
}

.plan-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.plan-day {
    overflow: hidden;
}

.plan-group {
    border-top: 1px solid var(--line);
}

.plan-group:first-of-type {
    border-top: 0;
}

.plan-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--surface);
}

.plan-list {
    min-height: 46px;
}

.plan-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    background: var(--panel);
}

.plan-item.completed .plan-title {
    color: var(--muted);
    text-decoration: line-through;
}

.plan-list[data-sortable="0"] .plan-item {
    grid-template-columns: minmax(0, 1fr);
}

.plan-item.dragging {
    opacity: .55;
    background: var(--primary-soft);
}

.drag-handle {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    cursor: grab;
}

.plan-main {
    min-width: 0;
}

.plan-title {
    font-weight: 700;
}

.plan-title .badge {
    margin-left: 6px;
    vertical-align: middle;
}

.badge.recurring {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.multi-day {
    background: #e9edf7;
    color: var(--blue);
}

.plan-main p {
    margin: 6px 0;
    color: var(--muted);
}

.plan-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.plan-actions .btn {
    min-height: 30px;
    padding: 5px 9px;
}

.plan-form {
    max-width: 760px;
}

.plan-form .field textarea {
    min-height: 150px;
}

.segmented-control {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    width: min(420px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px;
    background: var(--surface-muted);
}

.segmented-control label {
    cursor: pointer;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 650;
}

.segmented-control input:checked + span {
    background: var(--panel);
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(37, 43, 53, .06);
}

.multi-day-fields {
    display: grid;
    gap: 14px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.multi-date-picker {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.multi-date-picker input {
    width: min(240px, 100%);
}

.multi-dates-value {
    min-height: 88px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.multi-date-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.date-chip {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    font-weight: 650;
}

.date-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.daily-override-panel {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.daily-override-panel summary {
    cursor: pointer;
    color: var(--ink);
    font-weight: 700;
}

.multi-day-daily-fields {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.daily-override-item {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
}

.daily-override-item strong {
    font-size: 13px;
}

.future-plan-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .48fr);
    gap: 16px;
    align-items: start;
}

.calendar-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.calendar-weekday,
.calendar-cell {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.calendar-weekday {
    min-height: 36px;
    display: grid;
    place-items: center;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.calendar-cell {
    min-height: 112px;
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 10px;
    background: var(--panel);
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

.calendar-cell:hover {
    background: var(--surface);
}

.calendar-cell.muted {
    background: var(--surface);
    color: var(--muted);
}

.calendar-cell.today {
    box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-cell.selected {
    background: var(--primary-soft);
}

.calendar-date {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 750;
}

.calendar-cell strong {
    color: var(--ink);
    font-size: 13px;
}

.calendar-cell em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.selected-day-panel > .plan-day {
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
}

.selected-day-panel > .plan-day > .panel-head {
    display: none;
}

.recurring-layout {
    display: grid;
    grid-template-columns: minmax(320px, .52fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.recurring-form .form-grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.recurring-list {
    display: grid;
}

.recurring-rule {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: var(--panel);
}

.recurring-rule:first-child {
    border-top: 0;
}

.recurring-rule.paused {
    background: var(--surface);
}

.recurring-rule strong,
.recurring-rule span {
    display: block;
}

.recurring-rule span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.recurring-rule p {
    margin: 8px 0 0;
    color: var(--muted);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 {
    margin: 0;
    font-size: 15px;
}

.list-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
}

.list-row.compact {
    grid-template-columns: auto 1fr;
}

.list-row:last-child {
    border-bottom: 0;
}

.clickable-row {
    color: inherit;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

.clickable-row:hover {
    background: var(--surface);
}

.clickable-row:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.row-title {
    font-weight: 650;
}

.empty {
    padding: 18px 15px;
    color: var(--muted);
}

.empty.small {
    font-size: 13px;
}

.flash {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.flash.error {
    border-color: #e2b7ae;
    color: var(--red);
    background: #fff2ef;
}

.flash.success {
    border-color: #b8ddcf;
    color: var(--primary);
    background: var(--primary-soft);
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(90deg, rgba(221, 220, 213, .55) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--surface);
}

.auth-shell {
    width: min(420px, calc(100vw - 32px));
}

.login-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.login-brand {
    padding: 0 0 22px;
}

.login-card h1 {
    margin: 0;
    font-size: 24px;
}

.login-card p,
.login-note {
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.login-form label span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.login-form input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 10px;
    background: var(--surface);
    color: var(--ink);
}

.login-note {
    margin-top: 16px;
    font-size: 12px;
}

.admin-stats .module-card strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    background: var(--surface-muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: var(--surface);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.table-title-link {
    color: var(--ink);
    font-weight: 720;
}

.table-title-link:hover {
    color: var(--primary);
}

.validation-table td {
    vertical-align: top;
}

.validation-due-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    border: 1px solid #efd18f;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff8e8;
}

.validation-due-strip div {
    display: grid;
    gap: 3px;
}

.validation-due-strip strong {
    color: var(--ink);
}

.validation-due-strip span {
    color: var(--muted);
    font-size: 13px;
}

.validation-tabs {
    margin-bottom: 12px;
}

.validation-helper {
    margin-top: 12px;
}

.badge.validation-type {
    background: var(--surface-muted);
    color: var(--muted);
}

.badge.validation-status.pending {
    background: var(--surface-muted);
    color: var(--muted);
}

.badge.validation-status.due {
    background: #fbefd8;
    color: var(--amber);
}

.badge.validation-status.reviewed,
.badge.validation-result.effective {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.validation-result.ineffective {
    background: #f7dfdc;
    color: var(--red);
}

.badge.validation-result.uncertain,
.badge.validation-result.none {
    background: var(--surface-muted);
    color: var(--muted);
}

.validation-detail-panel {
    margin-bottom: 14px;
}

.validation-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
}

.validation-detail-grid > div {
    display: grid;
    align-content: start;
    gap: 6px;
}

.validation-detail-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.validation-detail-grid p {
    margin: 0;
    color: var(--ink);
    line-height: 1.65;
}

.validation-reopen-form {
    padding: 0 14px 14px;
}

.demand-record-tabs {
    margin-bottom: 12px;
}

.demand-record-tabs span {
    color: var(--muted);
    font-size: 12px;
}

.demand-record-table td {
    vertical-align: top;
}

.demand-record-notes {
    max-width: 260px;
    color: var(--muted);
}

.demand-record-helper {
    margin-top: 12px;
}

.domain-record-table td {
    vertical-align: top;
}

.domain-record-notes {
    max-width: 300px;
    color: var(--muted);
}

.badge.domain-expiry.expired {
    background: #f7dfdc;
    color: var(--red);
}

.badge.domain-expiry.expiring {
    background: #fbefd8;
    color: var(--amber);
}

.badge.domain-expiry.normal {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.domain-expiry.missing {
    background: var(--surface-muted);
    color: var(--muted);
}

.domain-record-summary,
.domain-record-section {
    margin-bottom: 14px;
}

.domain-record-section .panel-head,
.domain-document-panel .panel-head {
    align-items: flex-start;
    gap: 12px;
}

.domain-record-section .panel-head p,
.domain-document-panel .panel-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.domain-detail-grid {
    border-top: 1px solid var(--line);
}

.domain-notes-block {
    display: grid;
    gap: 6px;
    padding: 0 14px 14px;
}

.domain-notes-block span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.domain-notes-block p {
    margin: 0;
    color: var(--ink);
    line-height: 1.65;
}

.domain-markdown-body {
    padding: 16px;
}

.content > .domain-document-wide {
    width: 100%;
    max-width: min(1540px, 100%);
}

.domain-document-wide .domain-document-form {
    max-width: none;
}

.domain-document-panel {
    margin-bottom: 14px;
}

.domain-document-editor-grid {
    grid-template-columns: minmax(640px, 1.35fr) minmax(360px, .85fr);
    padding: 16px;
}

.domain-document-editor-side {
    margin: 0;
}

.daily-review-table td {
    vertical-align: top;
}

.daily-review-excerpt {
    max-width: 380px;
    color: var(--muted);
}

.daily-review-textarea {
    min-height: 360px;
}

.content > .daily-review-editor-wide {
    width: 100%;
    max-width: min(1540px, 100%);
}

.daily-review-editor-wide .daily-review-form {
    max-width: none;
}

.daily-review-editor-grid {
    grid-template-columns: minmax(620px, 1.25fr) minmax(360px, .9fr);
    margin-top: 10px;
}

.daily-review-detail {
    margin-bottom: 14px;
}

.daily-review-markdown-body {
    padding: 18px;
}

.finance-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.finance-summary-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.finance-summary-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.finance-summary-card strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.2;
}

.finance-summary-card.income strong,
.finance-amount.income {
    color: var(--primary);
}

.finance-summary-card.expense strong,
.finance-amount.expense {
    color: var(--red);
}

.finance-filterbar {
    margin-bottom: 12px;
}

.finance-record-table td {
    vertical-align: top;
}

.finance-amount {
    white-space: nowrap;
    font-weight: 750;
}

.finance-record-notes {
    max-width: 320px;
    color: var(--muted);
}

.badge.finance-type.income {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.finance-type.expense {
    background: #f7dfdc;
    color: var(--red);
}

.finance-amount-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.finance-amount-input span {
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--muted);
    font-weight: 800;
}

.keyword-share-tabs {
    margin-bottom: 12px;
}

.keyword-share-tabs span {
    color: var(--muted);
    font-size: 12px;
}

.keyword-share-list {
    display: grid;
}

.keyword-share-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 15px 16px;
    border-top: 1px solid var(--line);
}

.keyword-share-row:first-of-type {
    border-top: 0;
}

.keyword-share-main {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.keyword-share-title-line,
.keyword-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.keyword-share-title-line strong {
    min-width: 0;
    color: var(--ink);
    font-size: 16px;
    overflow-wrap: anywhere;
}

.keyword-share-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--muted);
    font-size: 12px;
}

.keyword-share-main p {
    max-width: 96ch;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.keyword-share-actions {
    align-content: start;
    justify-content: flex-end;
}

.keyword-share-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, .85fr);
    gap: 16px;
    align-items: start;
}

.keyword-share-detail-layout > * {
    min-width: 0;
}

.keyword-share-detail-panel,
.keyword-share-notes-panel {
    overflow: hidden;
}

.keyword-share-summary {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-top: 1px solid var(--line);
}

.keyword-share-summary-main {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.keyword-share-summary-main span,
.keyword-share-summary-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.keyword-share-summary-main strong {
    color: var(--ink);
    font-size: 17px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.keyword-share-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.keyword-share-summary-grid > div {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 72%, var(--panel));
}

.keyword-share-summary-grid strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.keyword-share-description-block {
    padding: 0 16px 16px;
}

.keyword-share-section-title {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.keyword-share-description {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
}

.keyword-note-form {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 58%, var(--panel));
}

.keyword-note-form .field textarea {
    min-height: 108px;
    height: 108px;
    max-height: 180px;
    resize: vertical;
    background: var(--panel);
}

.keyword-note-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.keyword-note-form-footer span {
    color: var(--muted);
    font-size: 12px;
}

.keyword-note-list {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 16px;
}

.keyword-note-list::before {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 24px;
    width: 1px;
    background: var(--line);
}

.keyword-note-item {
    position: relative;
    display: grid;
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 10px;
}

.keyword-note-dot {
    position: relative;
    z-index: 1;
    width: 9px;
    height: 9px;
    margin: 7px auto 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--panel);
}

.keyword-note-content {
    display: grid;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.keyword-note-head strong {
    color: var(--ink);
}

.keyword-note-head span {
    color: var(--muted);
    font-size: 12px;
}

.keyword-note-body {
    color: var(--ink);
}

.keyword-note-actions {
    display: flex;
    justify-content: flex-end;
}

.danger-text {
    color: var(--red);
}

.keyword-note-empty {
    position: relative;
    z-index: 1;
    background: transparent;
}

.badge.demand-judgment.keep {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.demand-judgment.drop {
    background: #f7dfdc;
    color: var(--red);
}

.badge.demand-judgment.watch {
    background: #fbefd8;
    color: var(--amber);
}

.flag-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.flag-form label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.user-cell {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.breadcrumb {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.filterbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(120px, .7fr)) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
}

.model-filterbar {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-filterbar {
    grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(118px, .7fr)) auto;
}

.link {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.filterbar label span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.filterbar input,
.select {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 10px;
    background: var(--panel);
    color: var(--ink);
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.resource-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    transition: background-color 160ms ease;
}

.resource-leading {
    padding-top: 3px;
}

.resource-cover {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.resource-row:last-child {
    border-bottom: 0;
}

.resource-row:hover {
    background: var(--surface);
}

.resource-title-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.resource-title-wrap {
    min-width: 0;
}

.resource-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.resource-main .row-title {
    font-size: 16px;
    line-height: 1.35;
}

.resource-main p {
    max-width: 92ch;
    margin: 8px 0 9px;
    color: var(--muted);
}

.resource-question-count {
    min-width: 72px;
    border-radius: 5px;
    padding: 3px 8px;
    background: var(--surface-muted);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
    font-weight: 650;
}

.resource-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--muted);
    font-size: 13px;
}

.resource-meta-line span {
    position: relative;
}

.resource-meta-line span + span:before {
    content: "";
    position: absolute;
    top: 50%;
    left: -8px;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: var(--line);
}

.resource-main .tags {
    margin-top: 10px;
}

.tags,
.row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.row-badges {
    justify-content: flex-end;
    align-content: flex-start;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 4px;
    padding: 1px 7px;
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 12px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.tabs a {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 7px 11px;
    background: var(--panel);
    color: var(--muted);
    font-weight: 650;
}

.tabs a.active {
    border-color: var(--primary-soft);
    background: var(--primary-soft);
    color: var(--primary);
}

.notification-list {
    display: grid;
}

.notification-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 15px;
    border-bottom: 1px solid var(--line);
}

.notification-row:last-child {
    border-bottom: 0;
}

.notification-row.unread {
    background: var(--surface);
}

.search-page-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px 150px 150px auto;
    gap: 10px;
    margin-bottom: 16px;
}

.search-page-form input {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--panel);
    color: var(--ink);
}

.search-page-form .select {
    height: 42px;
}

.search-counts {
    padding: 10px 18px 8px;
}

.search-result-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 15px 18px;
    border-top: 1px solid var(--line);
    transition: background-color 160ms ease;
}

.search-result-row:hover {
    background: var(--surface);
}

.search-result-media {
    padding-top: 2px;
}

.search-result-media .tile-icon,
.search-result-media .resource-cover {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.search-result-main {
    min-width: 0;
}

.search-result-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.search-result-main .row-title {
    min-width: 0;
    font-size: 16px;
    line-height: 1.35;
}

.search-result-labels {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.search-result-labels .badge {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
}

.search-result-main p {
    max-width: 92ch;
    margin: 6px 0 7px;
    color: var(--muted);
}

.search-result-tags {
    margin-top: 9px;
}

.search-model-panel {
    margin-top: 16px;
}

.admin-upload-panel {
    margin-bottom: 16px;
}

.admin-upload-body {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px;
}

.admin-upload-body .form-note {
    width: 100%;
    margin: 0;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    gap: 16px;
    align-items: start;
}

.article-layout > * {
    min-width: 0;
}

.internal-ref {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 6px;
    border-radius: 5px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 650;
}

.article {
    min-width: 0;
    width: 100%;
    max-width: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 34px 38px;
    background: var(--panel);
}

.article > .tags {
    margin-bottom: 16px;
}

.article-cover {
    margin-bottom: 18px;
}

.article-cover img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.content-image-preview {
    margin-bottom: 16px;
}

.content-image-preview img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.article-body {
    min-width: 0;
    max-width: 960px;
    margin: 22px auto 0;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.82;
    overflow-wrap: break-word;
}

.article-body p,
.markdown-body p {
    margin: 0 0 18px;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin: 34px 0 12px;
    line-height: 1.35;
}

.article-body h1,
.markdown-body h1 {
    font-size: 24px;
}

.article-body h2,
.markdown-body h2 {
    font-size: 20px;
}

.article-body h3,
.markdown-body h3 {
    font-size: 16px;
}

.article-body h4,
.markdown-body h4 {
    font-size: 15px;
}

.article-body h5,
.article-body h6,
.markdown-body h5,
.markdown-body h6 {
    font-size: 14px;
}

.article-body h4,
.article-body h5,
.article-body h6,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    color: var(--ink);
    font-weight: 720;
}

.article-body img,
.markdown-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 22px auto 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    box-shadow: 0 10px 28px rgba(37, 43, 53, .08);
}

.article-body img.image-zoomable,
.content-image-preview img.image-zoomable {
    cursor: zoom-in;
}

.article-body a,
.markdown-body a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-body ul,
.article-body ol,
.markdown-body ul,
.markdown-body ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.article-body li,
.markdown-body li {
    margin: 7px 0;
    padding-left: 2px;
}

.article-body li > ul,
.article-body li > ol,
.markdown-body li > ul,
.markdown-body li > ol {
    margin: 8px 0 2px;
}

.task-list-item {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
}

.task-list-item input {
    margin-top: 5px;
    accent-color: var(--primary);
}

.article-body blockquote,
.markdown-body blockquote {
    margin: 20px 0;
    padding: 12px 14px;
    border-left: 3px solid var(--primary);
    background: var(--surface);
    color: var(--muted);
}

.article-body blockquote p,
.markdown-body blockquote p {
    margin-bottom: 0;
}

.article-body hr,
.markdown-body hr {
    height: 1px;
    border: 0;
    margin: 30px 0;
    background: var(--line);
}

.table-wrap {
    overflow-x: auto;
    margin: 22px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.article-body table,
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
}

.article-body th,
.article-body td,
.markdown-body th,
.markdown-body td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.article-body th,
.markdown-body th {
    background: var(--surface-muted);
    font-weight: 720;
}

.article-body tr:last-child td,
.markdown-body tr:last-child td {
    border-bottom: 0;
}

.article-body code,
.markdown-body code {
    border-radius: 4px;
    padding: 1px 5px;
    background: var(--surface-muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .92em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-body pre,
.markdown-body pre {
    position: relative;
    overflow-x: visible;
    margin: 20px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface-muted);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 9px;
    background: var(--panel);
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity .16s ease, transform .16s ease, color .16s ease;
}

.article-body pre:hover .code-copy-btn,
.article-body pre:focus-within .code-copy-btn,
.markdown-body pre:hover .code-copy-btn,
.markdown-body pre:focus-within .code-copy-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.code-copy-btn:hover {
    color: var(--primary);
}

.article-body pre code,
.markdown-body pre code {
    padding: 0;
    background: transparent;
    white-space: inherit;
}

.easymde-preview {
    padding: 22px 26px;
    background: var(--panel);
}

.copy-source {
    position: fixed;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
}

.bookmark-link,
.file-preview {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.bookmark-link span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.bookmark-link strong {
    color: var(--blue);
    word-break: break-all;
}

.file-preview {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.question-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.reminder-section {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.reminder-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.reminder-section-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
}

.inline-head {
    padding: 0 0 10px;
    border-bottom: 0;
}

.inline-head h2 {
    margin: 0;
}

.question-list {
    display: grid;
    gap: 10px;
}

.reminder-list {
    display: grid;
    gap: 12px;
}

.question-form {
    display: grid;
    gap: 9px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.reminder-form {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 10px 14px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.reminder-form.is-simple {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
    background: var(--surface);
}

.reminder-form.is-simple .reminder-body-field span {
    color: var(--ink);
    font-size: 13px;
}

.reminder-form .compact-field {
    align-content: start;
}

.reminder-form .select {
    height: 44px;
    background: var(--surface);
}

.reminder-type-control {
    display: grid;
    gap: 0;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.reminder-type-control.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.reminder-type-control.is-dual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reminder-type-control label {
    min-width: 0;
    cursor: pointer;
}

.reminder-type-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reminder-type-control label + label span {
    border-left: 1px solid var(--line);
}

.reminder-type-control span {
    min-height: 38px;
    display: grid;
    place-items: center;
    padding: 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.reminder-type-control input:checked + span {
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.question-form .field textarea,
.reminder-form .field textarea,
.reply-form .field textarea {
    min-height: 68px;
    max-height: 160px;
    padding: 10px 11px;
    line-height: 1.55;
    background: var(--surface);
}

.reminder-form .field textarea {
    height: 64px;
    min-height: 64px;
    max-height: 150px;
}

.reminder-form.is-simple .field textarea {
    height: 78px;
    min-height: 78px;
    border-color: #d4d8d1;
    background: var(--panel);
}

.reminder-form.is-simple .field textarea:focus {
    border-color: var(--primary);
    outline: 2px solid var(--primary-soft);
    outline-offset: 0;
}

.question-form .field textarea::placeholder,
.reminder-form .field textarea::placeholder,
.reply-form .field textarea::placeholder {
    color: var(--muted);
}

.question-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.question-form-footer span {
    color: var(--muted);
    font-size: 12px;
}

.question-form-footer .btn {
    min-height: 32px;
    padding: 0 12px;
}

.reminder-form-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 2px;
}

.reminder-form.is-simple .reminder-form-footer {
    padding-top: 0;
}

.reminder-form-footer span {
    color: var(--muted);
    font-size: 12px;
}

.reminder-form-footer .btn {
    min-height: 36px;
    padding: 0 14px;
    flex: 0 0 auto;
}

.reply-form .question-form-footer {
    justify-content: flex-end;
}

.question-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px 14px;
    background: var(--panel);
}

.reminder-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    background: var(--panel);
}

.reminder-box.open {
    border-color: #edd08e;
    box-shadow: inset 2px 0 0 #e4b34f;
}

.reminder-box.done {
    background: var(--surface);
}

.question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.reminder-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.reminder-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.question-body {
    margin-bottom: 6px;
    font-size: 15px;
}

.reminder-body {
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 560;
}

.plain-text {
    color: var(--ink);
    line-height: 1.65;
    white-space: normal;
    word-break: break-word;
}

.question-meta,
.reminder-meta {
    color: var(--muted);
    font-size: 12px;
}

.question-delete-form {
    margin-top: 8px;
}

.reminder-resolution {
    display: grid;
    gap: 7px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
}

.reminder-resolution-note {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #f4f6f8;
    color: var(--muted);
    font-size: 13px;
}

.reminder-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 10px;
}

.reminder-resolve-form {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.reminder-resolve-form .reminder-note-field textarea {
    height: 48px;
    min-height: 48px;
    max-height: 120px;
    padding: 8px 10px;
    line-height: 1.5;
    background: var(--surface);
}

.reminder-resolve-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.reminder-resolve-buttons .btn,
.reminder-inline-action .btn {
    min-height: 36px;
    padding: 0 14px;
    white-space: nowrap;
}

.reminder-resolve-buttons .btn.primary {
    border-color: var(--primary);
    background: var(--panel);
    color: var(--primary);
}

.reminder-inline-action {
    align-self: end;
    justify-self: end;
}

.reminder-actions .btn.danger {
    border-color: transparent;
    background: transparent;
    color: var(--red);
}

.badge.todo {
    background: #fbefd8;
    color: var(--amber);
}

.badge.reminder {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge.update {
    background: #e9edf7;
    color: var(--blue);
}

.reply-box {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.reply-box.child {
    margin-left: 18px;
    background: var(--panel);
}

mark {
    padding: 0 2px;
    border-radius: 3px;
    background: #fff1a6;
    color: inherit;
}

.reply-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.detail-body {
    padding: 16px;
}

.detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.reply-admin-list {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.reply-admin-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.reply-admin-item.child {
    margin-top: 10px;
    background: var(--panel);
}

.reply-admin-children {
    margin-top: 12px;
    padding-left: 18px;
    border-left: 2px solid var(--line);
}

.file-usage-list {
    display: grid;
    gap: 6px;
    min-width: 220px;
}

.file-usage-list a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
}

.side-stack {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.toc-list {
    display: grid;
    gap: 2px;
    padding: 10px;
}

.toc-link {
    display: block;
    border-radius: 6px;
    padding: 7px 8px;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
}

.toc-link:hover {
    background: var(--surface);
    color: var(--primary);
}

.toc-link.level-h3 {
    padding-left: 18px;
    color: var(--muted);
    font-size: 12px;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 42px;
    background: rgba(14, 16, 20, .82);
}

.image-lightbox[hidden] {
    display: none !important;
}

.image-lightbox img {
    max-width: min(1180px, 94vw);
    max-height: 88vh;
    border-radius: 8px;
    background: var(--surface-muted);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

.image-lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 7px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    font-weight: 650;
}

body.lightbox-open {
    overflow: hidden;
}

.meta-list {
    display: grid;
}

.meta-list div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.meta-list div:last-child {
    border-bottom: 0;
}

.meta-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.content-form {
    display: block;
    --editor-toolbar-sticky-top: 0px;
}

.admin-form {
    max-width: 720px;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.editor-panel,
.settings-panel .panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.form-panel {
    margin-bottom: 12px;
}

.editor-panel {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.editor-sticky-head {
    position: sticky;
    top: 0;
    z-index: 12;
    display: grid;
    gap: 14px;
    margin: -18px -18px 0;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    background: var(--panel);
    box-shadow: 0 10px 22px rgba(37, 43, 53, .05);
}

.settings-panel {
    position: sticky;
    top: 16px;
    z-index: 8;
}

.form-stack {
    display: grid;
    gap: 14px;
    padding: 14px;
}

.field {
    display: grid;
    gap: 7px;
}

.field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
}

.field input {
    height: 40px;
    padding: 0 10px;
}

.field textarea {
    min-height: 420px;
    resize: vertical;
    padding: 12px;
    line-height: 1.7;
}

.field .markdown-editor-textarea {
    min-height: 520px;
}

.field em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.editor-note {
    margin-top: -2px;
}

.EasyMDEContainer {
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.markdown-editor-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.markdown-editor-split .EasyMDEContainer,
.markdown-preview-panel {
    min-width: 0;
}

.markdown-preview-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.markdown-preview-head {
    min-height: 49px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.markdown-live-preview-body {
    min-height: 578px;
    overflow: visible;
    padding: 22px 26px;
}

.markdown-live-preview-body.article-body {
    max-width: none;
    margin-top: 0;
    font-size: 15px;
}

.EasyMDEContainer .editor-toolbar {
    position: sticky;
    top: var(--editor-toolbar-sticky-top);
    z-index: 11;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
    box-shadow: 0 8px 16px rgba(37, 43, 53, .05);
    opacity: 1;
}

.EasyMDEContainer .editor-toolbar button {
    color: var(--muted);
}

.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
    border-color: var(--line);
    background: var(--primary-soft);
    color: var(--primary);
}

.EasyMDEContainer .editor-toolbar i.separator {
    border-left-color: var(--line);
    border-right-color: transparent;
}

.EasyMDEContainer .CodeMirror,
.EasyMDEContainer .editor-preview,
.EasyMDEContainer .editor-preview-side {
    border: 0;
    background: var(--panel);
    color: var(--ink);
}

.EasyMDEContainer .CodeMirror {
    min-height: 520px;
    padding: 14px 16px;
    font: 14px/1.75 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.EasyMDEContainer .CodeMirror-cursor {
    border-left-color: var(--ink);
}

.EasyMDEContainer .CodeMirror-placeholder {
    color: var(--muted);
}

.EasyMDEContainer .CodeMirror-selected,
.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected {
    background: var(--primary-soft);
}

.EasyMDEContainer .editor-preview-side {
    border-left: 1px solid var(--line);
}

.EasyMDEContainer .editor-statusbar {
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface);
}

:root[data-theme="dark"] .EasyMDEContainer .editor-toolbar button:after,
:root[data-theme="dark"] .EasyMDEContainer .editor-toolbar button:before {
    color: var(--ink);
}

.field .compact-textarea {
    min-height: 140px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.check-grid.single-column {
    grid-template-columns: 1fr;
}

.check-grid label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 7px 10px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 620;
}

.check-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    accent-color: var(--primary);
}

.option-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.form-note,
.muted {
    color: var(--muted);
}

.markdown-upload,
.content-file-upload,
.model-image-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--surface);
}

.toolbar-image-upload {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    min-height: 0;
    margin-top: 8px;
}

.domain-document-image-upload {
    min-height: 20px;
    margin-top: 10px;
}

.domain-document-image-status:empty {
    display: none;
}

.markdown-upload .btn,
.content-file-upload .btn,
.model-image-upload .btn {
    min-height: 32px;
}

.file-upload-status {
    color: var(--primary);
    font-size: 12px;
    font-weight: 650;
}

.file-upload-status.error {
    color: var(--red);
}

.upload-status {
    --upload-state-color: var(--blue);
    --upload-state-bg: var(--panel);
    --upload-state-bg: color-mix(in srgb, var(--blue) 9%, var(--panel));
    --upload-progress: 0%;
    display: none;
    align-items: start;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 8px 10px;
    width: min(100%, 620px);
    padding: 9px 10px;
    border: 1px solid var(--line);
    border: 1px solid color-mix(in srgb, var(--upload-state-color) 28%, var(--line));
    border-radius: 8px;
    background: var(--upload-state-bg);
    color: var(--ink);
    font-size: 12px;
    box-shadow: 0 8px 22px rgba(37, 43, 53, .06);
}

.upload-status.is-visible {
    display: grid;
}

.upload-status::before {
    content: "i";
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1px solid currentColor;
    border-radius: 50%;
    color: var(--upload-state-color);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.upload-status[data-state="uploading"]::before {
    content: "";
    border-color: color-mix(in srgb, var(--blue) 22%, var(--line));
    border-top-color: var(--blue);
    animation: uploadStatusSpin .8s linear infinite;
}

.upload-status[data-state="success"] {
    --upload-state-color: var(--primary);
    --upload-state-bg: var(--primary-soft);
    --upload-state-bg: color-mix(in srgb, var(--primary-soft) 76%, var(--panel));
}

.upload-status[data-state="success"]::before {
    content: "✓";
}

.upload-status[data-state="warning"] {
    --upload-state-color: var(--amber);
    --upload-state-bg: var(--panel);
    --upload-state-bg: color-mix(in srgb, var(--amber) 10%, var(--panel));
}

.upload-status[data-state="warning"]::before {
    content: "!";
}

.upload-status[data-state="error"] {
    --upload-state-color: var(--red);
    --upload-state-bg: var(--panel);
    --upload-state-bg: color-mix(in srgb, var(--red) 8%, var(--panel));
}

.upload-status[data-state="error"]::before {
    content: "!";
}

.upload-status-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.upload-status-main {
    color: var(--ink);
    font-weight: 700;
}

.upload-status-detail {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-status-progress {
    grid-column: 1 / -1;
    position: relative;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--line);
    background: color-mix(in srgb, var(--upload-state-color) 15%, var(--line));
}

.upload-status-progress::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--upload-progress);
    border-radius: inherit;
    background: var(--upload-state-color);
    transition: width .18s ease-out;
}

.upload-status-action {
    align-self: center;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border: 1px solid color-mix(in srgb, var(--upload-state-color) 36%, var(--line));
    border-radius: 6px;
    background: var(--panel);
    color: var(--upload-state-color);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.upload-status-action:hover {
    background: var(--surface);
    background: color-mix(in srgb, var(--upload-state-color) 8%, var(--panel));
}

@keyframes uploadStatusSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .upload-status[data-state="uploading"]::before {
        animation: none;
    }

    .upload-status-progress::after {
        transition: none;
    }
}

.file-chip {
    color: var(--muted);
    font-size: 12px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
}

.model-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.model-card:hover {
    background: var(--surface);
}

.model-cover {
    width: 116px;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    background: var(--surface-muted);
}

.model-cover.placeholder {
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 34px;
    font-weight: 800;
}

.model-card-body {
    display: grid;
    gap: 10px;
    align-content: start;
    min-width: 0;
    padding: 14px;
}

.model-card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 750;
}

.model-summary {
    display: grid;
    gap: 7px;
}

.model-summary div {
    display: grid;
    gap: 2px;
}

.model-summary span,
.model-field-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.model-summary strong {
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 620;
}

.model-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.model-field-list {
    display: grid;
}

.model-field-item {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.model-field-item:last-child {
    border-bottom: 0;
}

.model-field-value {
    min-width: 0;
    word-break: break-word;
}

.model-detail-image {
    display: block;
    max-width: min(100%, 520px);
    max-height: 360px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: contain;
    background: var(--surface-muted);
}

.model-image-preview {
    min-height: 92px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
}

.model-image-preview img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 7px;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: start;
}

.profile-avatar-preview {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 32px;
    font-weight: 800;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discard-form {
    max-width: 720px;
    margin-top: 12px;
}

.form-actions {
    justify-content: flex-end;
    margin-top: 12px;
}

@media (max-width: 1280px) {
    .home-shortcuts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-workspace {
        grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
    }

    .domain-document-editor-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    }

    .daily-review-editor-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    }
}

@media (max-width: 900px) {
    body {
        padding-bottom: 72px;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .content {
        padding: 16px;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        height: auto;
        min-height: 58px;
        gap: 8px;
        padding: 10px 12px;
    }

    .search {
        min-width: 0;
    }

    .logout-link {
        display: none;
    }

    .notification-dropdown {
        position: fixed;
        top: 58px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .mobile-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 40;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(48px, 1fr);
        gap: 2px;
        overflow-x: auto;
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: var(--panel);
        box-shadow: 0 -12px 30px rgba(37, 43, 53, .08);
    }

    .mobile-nav-item {
        position: relative;
        min-width: 0;
        min-height: 50px;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 2px;
        border-radius: 8px;
        color: var(--muted);
    }

    .mobile-nav-item span {
        font-size: 17px;
        line-height: 1;
    }

    .mobile-nav-item strong {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
        font-weight: 650;
    }

    .mobile-nav-item i {
        position: absolute;
        top: 3px;
        right: 12px;
        min-width: 16px;
        height: 16px;
        display: grid;
        place-items: center;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--red);
        color: #fff;
        font-size: 10px;
        font-style: normal;
        font-weight: 750;
    }

    .mobile-nav-item.active {
        background: var(--primary-soft);
        color: var(--primary);
    }

    .home-hero,
    .home-status-grid,
    .home-shortcuts,
    .home-workspace {
        display: block;
    }

    .home-hero {
        margin-bottom: 12px;
    }

    .home-actions,
    .home-status-tile,
    .home-shortcut,
    .home-feed,
    .home-questions,
    .home-saved {
        margin-bottom: 12px;
    }

    .home-status-tile {
        min-height: 96px;
    }

    .home-shortcut {
        transform: none;
    }

    .home-feed-row,
    .home-mini-row,
    .search-result-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .home-feed-row .badge {
        display: none;
    }

    .home-feed-top {
        display: block;
    }

    .search-result-top {
        display: block;
    }

    .search-result-labels {
        justify-content: flex-start;
        margin-top: 6px;
    }

    .page-head,
    .split,
    .dashboard-grid,
    .plan-summary,
    .plan-board,
    .future-plan-layout,
    .recurring-layout,
    .module-grid {
        display: block;
    }

    .module-card,
    .plan-summary,
    .plan-day,
    .panel {
        margin-bottom: 12px;
    }

    .plan-summary div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .plan-summary div:last-child {
        border-bottom: 0;
    }

    .plan-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .plan-actions {
        justify-content: stretch;
    }

    .plan-actions .inline-form,
    .plan-actions .btn {
        width: 100%;
    }

    .plan-actions .btn {
        justify-content: center;
    }

    .plan-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .plan-tabs a {
        justify-content: center;
        padding: 0 8px;
    }

    .calendar-actions {
        width: 100%;
        justify-content: stretch;
        margin-top: 10px;
    }

    .calendar-actions .btn {
        flex: 1;
        justify-content: center;
        padding-right: 8px;
        padding-left: 8px;
    }

    .calendar-cell {
        min-height: 78px;
        padding: 7px;
    }

    .calendar-cell strong,
    .calendar-cell em {
        font-size: 11px;
    }

    .recurring-rule {
        grid-template-columns: minmax(0, 1fr);
    }

    .recurring-form .form-grid.two {
        grid-template-columns: 1fr;
    }

    .filterbar,
    .search-page-form,
    .resource-row,
    .article-layout,
    .keyword-share-row,
    .keyword-share-detail-layout,
    .markdown-editor-split,
    .file-preview,
    .form-grid,
    .admin-detail-grid,
    .model-detail-layout,
    .profile-grid,
    .model-grid,
    .model-card,
    .model-field-item {
        display: block;
    }

    .filterbar label,
    .filter-actions,
    .resource-row > *,
    .keyword-share-actions,
    .file-preview > * {
        margin-bottom: 10px;
    }

    .editor-sticky-head,
    .settings-panel,
    .EasyMDEContainer .editor-toolbar {
        position: static;
        top: auto;
        z-index: auto;
    }

    .editor-sticky-head {
        margin: 0;
        padding: 0;
        border-bottom: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .side-stack {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .image-lightbox {
        padding: 18px;
    }

    .row-badges {
        justify-content: flex-start;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .validation-due-strip {
        display: block;
    }

    .validation-due-strip .btn {
        width: 100%;
        margin-top: 10px;
    }

    .validation-detail-grid {
        grid-template-columns: 1fr;
    }

    .article {
        padding: 18px;
    }

    .keyword-share-summary-grid {
        grid-template-columns: 1fr;
    }

    .keyword-note-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .keyword-note-form-footer .btn {
        width: 100%;
    }

    .question-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .question-form-footer .btn {
        width: 100%;
    }

    .reminder-form,
    .reminder-form-footer,
    .reminder-head {
        display: block;
    }

    .reminder-form.is-simple {
        padding: 12px;
    }

    .reminder-type-control {
        margin-bottom: 10px;
    }

    .reminder-form-footer .btn {
        width: 100%;
        margin-top: 8px;
    }

    .reminder-head .row-meta {
        display: block;
        margin-top: 6px;
    }

    .reminder-actions {
        display: block;
    }

    .reminder-resolve-form {
        display: block;
    }

    .reminder-resolve-buttons {
        display: block;
    }

    .reminder-resolve-buttons .btn,
    .reminder-inline-action .btn {
        width: 100%;
        margin-top: 8px;
    }

    .reply-box.child {
        margin-left: 10px;
    }

    .model-cover {
        width: 100%;
        height: 180px;
    }

    .check-grid {
        grid-template-columns: 1fr;
    }
}
