:root {
  --bg: #131211;
  --bg-elevated: #191817;
  --surface: #1e1c1b;
  --surface-2: #262422;
  --surface-3: #302d2a;
  --border: #34312e;
  --border-strong: #4a4641;
  --text: #ece9e4;
  --text-muted: #aca69e;
  --text-faint: #8a847c;
  --primary: #df9a52;
  --primary-strong: #ecae6c;
  --primary-soft: rgba(255, 255, 255, 0.07);
  --primary-contrast: #1b1006;
  --accent: #ecae6c;
  --accent-soft: rgba(236, 174, 108, 0.14);
  --danger: #e2685d;
  --danger-soft: rgba(226, 104, 93, 0.15);
  --warning: #e6cc5a;
  --warning-soft: rgba(230, 204, 90, 0.14);
  --info: #6aa5d9;
  --info-soft: rgba(106, 165, 217, 0.15);
  --success: #86bd9b;
  --success-soft: rgba(134, 189, 155, 0.14);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --focus: 0 0 0 3px rgba(236, 174, 108, 0.45);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --sidebar: 248px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f5f1;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f5f1;
  --surface-3: #e7ece6;
  --border: #d9e0d8;
  --border-strong: #bfcabf;
  --text: #17231d;
  --text-muted: #55675d;
  --text-faint: #7d8d84;
  --primary: #2f7a55;
  --primary-strong: #276848;
  --primary-soft: rgba(47, 122, 85, 0.12);
  --primary-contrast: #ffffff;
  --accent: #b86a1c;
  --accent-soft: rgba(184, 106, 28, 0.12);
  --danger: #b8443a;
  --danger-soft: rgba(184, 68, 58, 0.1);
  --warning: #9a6b00;
  --warning-soft: rgba(154, 107, 0, 0.12);
  --info: #2f679d;
  --info-soft: rgba(47, 103, 157, 0.1);
  --success: #2f7a55;
  --success-soft: rgba(47, 122, 85, 0.12);
  --shadow: 0 12px 32px rgba(23, 35, 29, 0.14);
  --shadow-sm: 0 1px 2px rgba(23, 35, 29, 0.1);
  --focus: 0 0 0 3px rgba(184, 106, 28, 0.45);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; }
p { margin: 0 0 0.6em; }
a { color: var(--primary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; margin-right: 4px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); text-align: center; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

.icon { flex-shrink: 0; }
.muted { color: var(--text-muted); }
.small { font-size: 0.82rem; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.align-right { text-align: right; }
.spacer { flex: 1; }
.pad { padding: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -40px; z-index: 100; padding: 8px 12px; background: var(--accent); color: #1b1006; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
.noscript { padding: 40px; text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 0.9rem; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease), color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-contrast); }
.btn-primary:hover:not(:disabled) { background: var(--primary-strong); }
.btn-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 0.84rem; }
.btn-block { width: 100%; height: 42px; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--primary-contrast); border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.icon-btn-sm { width: 26px; height: 26px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--primary-strong); cursor: pointer; font-weight: 500; text-align: left; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { text-decoration: underline; }

.input {
  width: 100%; min-height: 36px; padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elevated); color: var(--text); font: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-faint); }
.input:hover { border-color: var(--border-strong); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled, .input[readonly] { opacity: 0.75; cursor: default; }
.input-sm { min-height: 30px; padding: 4px 9px; font-size: 0.85rem; width: auto; }
.input-lg { min-height: 46px; font-size: 1.05rem; }
textarea.input { resize: vertical; line-height: 1.5; }
select.input { padding-right: 28px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="color"].input { padding: 3px; height: 36px; width: 70px; }
.color-input { width: 46px !important; padding: 2px !important; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field > span { font-weight: 600; font-size: 0.84rem; color: var(--text-muted); }
.field-hint { margin: 0; font-size: 0.78rem; color: var(--text-faint); }
.field-error { margin: 0; font-size: 0.8rem; color: var(--danger); }
.field-wide { grid-column: 1 / -1; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid > .checkbox, .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.inline-form .input { flex: 1; }
.inline-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; text-transform: none;
  background: var(--surface-3); color: var(--text-muted);
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-severity-blocker, .badge-severity-critical, .badge-priority-critical { background: var(--danger-soft); color: var(--danger); }
.badge-severity-major, .badge-priority-high { background: var(--accent-soft); color: var(--accent); }
.badge-severity-minor { background: var(--warning-soft); color: var(--warning); }
.badge-difficulty-green { background: var(--success-soft); color: var(--success); }
.badge-difficulty-blue { background: var(--info-soft); color: var(--info); }
.badge-difficulty-black, .badge-difficulty-double_black, .badge-difficulty-pro { background: var(--surface-3); color: var(--text); }
.badge-status-concept, .badge-status-paused { background: var(--surface-3); color: var(--text-muted); }
.badge-status-preproduction { background: var(--info-soft); color: var(--info); }
.badge-status-production { background: var(--primary-soft); color: var(--primary-strong); }
.badge-status-alpha, .badge-status-beta { background: var(--accent-soft); color: var(--accent); }
.badge-status-released { background: var(--success-soft); color: var(--success); }

.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%;
  background: var(--avatar); color: #fff; font-weight: 700; letter-spacing: 0.02em; user-select: none;
  box-shadow: 0 0 0 2px var(--surface);
}
.avatar-xs { width: 20px; height: 20px; font-size: 0.55rem; }
.avatar-sm { width: 26px; height: 26px; font-size: 0.66rem; }
.avatar-md { width: 34px; height: 34px; font-size: 0.8rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar-ghost { background: var(--surface-3); color: var(--text-faint); }
.avatar-more { background: var(--surface-3); color: var(--text-muted); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -7px; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--surface-2); font-size: 0.82rem; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell > div { display: flex; flex-direction: column; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.label-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; background: color-mix(in srgb, var(--label) 28%, transparent); color: color-mix(in srgb, var(--label) 70%, var(--text)); border: 1px solid color-mix(in srgb, var(--label) 45%, transparent); }
.swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--swatch); flex-shrink: 0; }

.progress { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-strong)); transition: width 0.4s var(--ease); }

.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

.loading-state, .empty-state, .error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 42px 20px; text-align: center; color: var(--text-muted); animation: fade-in 0.25s var(--ease); }
.loading-state { flex-direction: row; }
.empty-state h3, .error-state h3 { color: var(--text); }
.empty-state p, .error-state p { max-width: 420px; margin: 0; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); color: var(--primary-strong); }
.error-state .empty-icon { color: var(--danger); }

.alert { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 0.9rem; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, rgba(236, 174, 108, 0.1), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(224, 154, 79, 0.14), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); animation: pop-in 0.35s var(--ease); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-brand div { display: flex; flex-direction: column; }
.auth-brand span { color: var(--text-muted); font-size: 0.82rem; }
.auth-lead { color: var(--text-muted); margin: 6px 0 20px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form input:not([type="checkbox"]), .auth-form textarea { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text); font: inherit; }
.auth-form input:focus, .auth-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.auth-form [aria-invalid="true"] { border-color: var(--danger); }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--text-muted); }

.app-loading { min-height: 100vh; display: grid; place-items: center; }
.boot-screen { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-muted); animation: fade-in 0.3s; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--sidebar); flex-shrink: 0; display: flex; flex-direction: column;
  padding: 16px 12px; border-right: 1px solid var(--border); background: var(--bg-elevated); overflow-y: auto; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand div { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 0.95rem; }
.brand span { font-size: 0.76rem; color: var(--text-muted); }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 550; transition: background 0.15s, color 0.15s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--text); }
.nav-item.active .icon { color: var(--primary-strong); }
.nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #1b1006; font-size: 0.72rem; font-weight: 700; text-align: center; }
.nav-heading { display: flex; align-items: center; justify-content: space-between; margin: 20px 10px 6px; color: var(--text-faint); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.nav-project .project-dot { width: 9px; height: 9px; }
.nav-empty { margin: 4px 10px; color: var(--text-faint); font-size: 0.82rem; }
.project-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--project); flex-shrink: 0; }
.sidebar-footer { margin-top: auto; padding-top: 14px; }
.user-block { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: left; }
.user-block:hover { border-color: var(--border-strong); }
.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.user-meta strong, .user-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { font-size: 0.76rem; color: var(--text-muted); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 24px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.topbar-search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-faint); }
.topbar-search:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.topbar-search-input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding-left: 0; }
.topbar-actions { margin-left: auto; display: flex; gap: 6px; }
.menu-toggle { display: none; }
.bell { position: relative; }
.bell-dot { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #1b1006; font-size: 0.62rem; font-weight: 800; line-height: 16px; }
.announcement { display: flex; align-items: center; gap: 8px; padding: 9px 24px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 0.88rem; border-bottom: 1px solid var(--border); }
.announcement[hidden] { display: none; }
.outlet { flex: 1; min-width: 0; outline: none; }
.outlet:focus, .outlet:focus-visible, .board-canvas:focus-visible { box-shadow: none; }
.view { padding: 24px; max-width: 1480px; margin: 0 auto; animation: fade-in 0.2s var(--ease); }
.sidebar-scrim { display: none; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-heading { min-width: 0; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.page-subtitle { margin: 6px 0 0; color: var(--text-muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-title { font-size: 1.25rem; }
.section-title { margin: 26px 0 12px; }

.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 16px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-count { padding: 0 6px; border-radius: 999px; background: var(--surface-3); font-size: 0.72rem; }

.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.panel-head h2 { display: flex; align-items: center; gap: 8px; font-size: 0.98rem; }
.panel-head h2 .icon { color: var(--primary-strong); }
.panel-body { padding: 16px 18px; }
.panel-body .empty-state { padding: 26px 10px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.stat > div { display: flex; flex-direction: column; }
.stat strong { font-size: 1.35rem; line-height: 1.1; }
.stat span:not(.stat-icon) { color: var(--text-muted); font-size: 0.82rem; }
.stat-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-strong); }
.stat.danger .stat-icon { background: var(--danger-soft); color: var(--danger); }

.card-rows { display: flex; flex-direction: column; gap: 6px; }
.card-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.card-row:hover { border-color: var(--border-strong); background: var(--surface-3); }
.card-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-row-sub { color: var(--text-muted); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.type-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; background: var(--surface-3); color: var(--text-muted); }
.type-icon.type-task { color: var(--primary-strong); background: var(--primary-soft); }
.type-icon.type-bug { color: var(--danger); background: var(--danger-soft); }
.type-icon.type-feature { color: var(--warning); background: var(--warning-soft); }
.type-icon.type-art { color: #b48ae0; background: rgba(180, 138, 224, 0.16); }
.type-icon.type-audio { color: var(--info); background: var(--info-soft); }
.type-icon.type-level { color: var(--accent); background: var(--accent-soft); }
.type-icon.type-playtest { color: #6fc1b8; background: rgba(111, 193, 184, 0.15); }

.deadline-list, .milestone-list, .member-list, .activity-list, .simple-list, .linked-list, .attachment-list, .comment-list, .checklist, .tree-list, .version-list, .notification-list, .search-list, .approval-list, .label-editor, .calendar-events, .release-log { list-style: none; margin: 0; padding: 0; }
.deadline { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.deadline:last-child { border-bottom: 0; }
.deadline-date { grid-row: span 2; align-self: center; padding: 4px 0; border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; font-weight: 700; font-size: 0.78rem; }
.deadline.overdue .deadline-date { background: var(--danger-soft); color: var(--danger); }
.deadline.soon .deadline-date { background: var(--warning-soft); color: var(--warning); }
.deadline .link-btn { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.milestone-list li { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.milestone-list li:last-child { border-bottom: 0; }
.milestone-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.milestone-head h3 { flex: 1; }
.member-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.member-list li > div { display: flex; flex-direction: column; min-width: 0; }
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: 0; }
.activity-item p { margin: 0; }
.activity-list.compact li { padding: 4px 0; font-size: 0.84rem; border-bottom: 0; }
.simple-list li { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.simple-list li:last-child { border-bottom: 0; }
.quick-projects { display: grid; grid-template-columns: 1fr; gap: 8px; }
.quick-project { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 0 10px; padding: 10px; border-radius: var(--radius); border: 1px solid var(--border); color: var(--text); background: var(--surface-2); }
.quick-project:hover { text-decoration: none; border-color: var(--project); }
.quick-project .project-mark { grid-row: span 2; }
.quick-project-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-project .muted { grid-column: 2; }
.project-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--project, var(--primary)) 30%, var(--surface-2)); color: var(--text); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.04em; flex-shrink: 0; }
.project-mark.small { width: 34px; height: 34px; border-radius: 9px; font-size: 0.66rem; }
.project-mark.large { width: 100%; height: 100%; border-radius: 0; font-size: 2rem; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s; }
.project-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--project); box-shadow: var(--shadow); }
.project-card-cover { height: 140px; background: linear-gradient(135deg, color-mix(in srgb, var(--project) 50%, var(--surface-2)), var(--surface-2)); display: grid; }
.project-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.project-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.project-card-desc { color: var(--text-muted); font-size: 0.86rem; margin: 0; }
.project-card-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; color: var(--text-muted); font-size: 0.8rem; }
.project-card-meta span { display: inline-flex; align-items: center; gap: 5px; }

.project-nav { margin: -24px -24px 20px; padding: 18px 24px 0; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, color-mix(in srgb, var(--project) 14%, transparent), transparent); }
.project-nav-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.project-cover-thumb { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.project-nav-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.project-name { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.project-nav-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.project-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.project-tabs::-webkit-scrollbar { display: none; }
.project-tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 2px solid transparent; color: var(--text-muted); font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.project-tab:hover { color: var(--text); text-decoration: none; }
.project-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.admin-tabs { margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.project-page { display: flex; flex-direction: column; gap: 18px; }
.type-breakdown { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.type-count { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.82rem; color: var(--text-muted); }
.type-count strong { color: var(--text); }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.board-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 92px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.board-tile:hover { text-decoration: none; border-color: var(--primary); }
.archived-boards { margin-top: 14px; }
.archived-boards summary { cursor: pointer; color: var(--text-muted); font-weight: 600; }

.board-view { display: flex; flex-direction: column; min-height: calc(100vh - 220px); }
.board-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.board-title { display: flex; flex-direction: column; gap: 2px; }
.board-title p { margin: 0; }
.board-switcher { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; margin-left: -10px; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 1.15rem; font-weight: 700; cursor: pointer; }
.board-switcher:hover { background: var(--surface-2); }
.board-actions { display: flex; gap: 6px; align-items: center; }
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filter-search { display: flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text-faint); }
.filter-search:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.filter-search .input { border: 0; box-shadow: none !important; background: transparent; min-width: 160px; }
.board-canvas { flex: 1; overflow-x: auto; overflow-y: hidden; margin: 0 -24px; padding: 0 24px 16px; outline: none; }
.board-lanes { display: flex; align-items: flex-start; gap: 14px; min-height: 100%; }
.board-list { display: flex; flex-direction: column; width: 290px; flex-shrink: 0; max-height: calc(100vh - 250px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.board-list.is-done-list { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); }
.board-list.over-limit { border-color: var(--danger); }
.board-list.static { max-height: none; }
.list-header { display: flex; align-items: center; gap: 8px; padding: 10px 8px 8px 14px; }
.list-header.is-handle { cursor: grab; }
.list-title { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 0.9rem; min-width: 0; }
.list-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-title .icon { color: var(--success); }
.list-count { color: var(--text-faint); font-size: 0.78rem; font-weight: 650; white-space: nowrap; }
.list-count.warning { color: var(--warning); }
.list-count.danger { color: var(--danger); }
.wip-warning { display: flex; align-items: center; gap: 6px; margin: 0 10px 6px; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 0.76rem; font-weight: 600; }
.list-cards { display: flex; flex-direction: column; gap: 8px; padding: 2px 10px 6px; min-height: 30px; overflow-y: auto; flex: 1; }
.list-drop-end { min-height: 4px; flex-shrink: 0; }
.list-composer { padding: 4px 10px 10px; }
.add-card-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; font-weight: 550; }
.add-card-btn:hover { background: var(--surface-2); color: var(--text); }
.composer-form { display: flex; flex-direction: column; gap: 8px; }
.composer-actions { display: flex; gap: 6px; align-items: center; }
.composer-actions select { flex: 1; }
.add-list-btn { display: flex; align-items: center; gap: 8px; width: 270px; flex-shrink: 0; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: transparent; color: var(--text-muted); cursor: pointer; font-weight: 600; }
.add-list-btn:hover { background: var(--surface); color: var(--text); }

.card-tile {
  position: relative; display: flex; flex-direction: column; gap: 7px; padding: 10px 11px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s; touch-action: manipulation;
}
.card-tile:hover { border-color: var(--border-strong); }
.card-tile:focus-visible { box-shadow: var(--focus); }
.card-tile.priority-critical { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-sm); }
.card-tile.priority-high { box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm); }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.card-title-row { display: flex; gap: 8px; align-items: flex-start; }
.card-title { font-weight: 550; line-height: 1.35; word-break: break-word; }
.card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meta-items { display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-muted); font-size: 0.76rem; }
.meta-item { display: inline-flex; align-items: center; gap: 3px; }
.meta-item.complete { color: var(--success); }
.due.overdue { color: var(--danger); font-weight: 650; }
.due.soon { color: var(--warning); font-weight: 650; }
.due.done { color: var(--success); }
.drag-ghost { position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none; opacity: 0.95; box-shadow: var(--shadow); border-color: var(--accent) !important; transition: none; }
.drag-source { display: none !important; }
.drag-placeholder { flex-shrink: 0; border-radius: var(--radius); border: 2px dashed var(--accent); background: var(--accent-soft); }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: start center; padding: 6vh 16px 16px; overflow-y: auto; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(2px); animation: fade-in 0.15s; }
.modal-backdrop.leaving { opacity: 0; transition: opacity 0.15s; }
.modal { width: 100%; max-width: 560px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); animation: pop-in 0.22s var(--ease); }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 820px; }
.modal-xl { max-width: 1040px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 18px 20px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }
.modal-footer[hidden] { display: none; }
.card-modal .modal-header { border-bottom: 0; padding-bottom: 0; }
.card-modal .modal-title { visibility: hidden; }

.dropdown-menu { position: fixed; z-index: 120; min-width: 210px; max-width: 340px; max-height: 70vh; overflow-y: auto; padding: 5px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); animation: pop-in 0.14s var(--ease); }
.dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); cursor: pointer; text-align: left; font-size: 0.88rem; }
.dropdown-item:hover:not(:disabled), .dropdown-item:focus-visible, .dropdown-item.active { background: var(--surface-2); box-shadow: none; }
.dropdown-item:disabled { opacity: 0.5; cursor: not-allowed; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item .icon { color: var(--text-muted); }
.dropdown-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-hint { color: var(--text-faint); font-size: 0.78rem; }
.dropdown-separator { height: 1px; margin: 5px 4px; background: var(--border); }
.dropdown-heading { padding: 6px 9px 4px; color: var(--text-faint); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.dropdown-empty { padding: 10px; color: var(--text-muted); font-size: 0.85rem; }
.check-slot { display: inline-grid; place-items: center; width: 16px; color: var(--primary-strong); }
.picker-menu { width: 280px; }
.picker { display: flex; flex-direction: column; gap: 6px; }
.picker-search { width: 100% !important; }
.picker-list { display: flex; flex-direction: column; max-height: 280px; overflow-y: auto; }
.mention-menu { width: 260px; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 150; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow); animation: pop-in 0.2s var(--ease); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all 0.2s; }
.toast-message { flex: 1; }
.toast-success .icon:first-child { color: var(--success); }
.toast-error { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.toast-error .icon:first-child { color: var(--danger); }
.toast-info .icon:first-child { color: var(--accent); }

.card-detail-header { display: flex; flex-direction: column; gap: 8px; margin-top: -8px; margin-bottom: 18px; }
.type-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: 0.8rem; font-weight: 650; cursor: pointer; }
.type-pill:disabled { cursor: default; }
.type-pill.type-bug { color: var(--danger); }
.type-pill.type-feature { color: var(--warning); }
.type-pill.type-level { color: var(--accent); }
.type-pill.type-audio { color: var(--info); }
.card-title-input { width: 100%; padding: 4px 8px; margin-left: -8px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: 700 1.4rem/1.3 var(--font); resize: none; overflow: hidden; }
.card-title-input:hover:not([readonly]) { border-color: var(--border); }
.card-title-input:focus { outline: none; border-color: var(--accent); background: var(--bg-elevated); }
.card-location { margin: 0; color: var(--text-muted); font-size: 0.85rem; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.card-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 26px; }
.card-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.card-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-section-head h3 { display: flex; align-items: center; gap: 8px; }
.card-section-head h3 .icon { color: var(--text-muted); }
.markdown.editable { min-height: 54px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); cursor: text; }
.markdown.editable:hover { background: var(--surface-3); }
.type-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.checklist-progress { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.8rem; color: var(--text-muted); }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: var(--radius-sm); }
.checklist-item:hover { background: var(--surface-2); }
.checklist-item input { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.checklist-text { flex: 1; outline: none; padding: 2px 4px; border-radius: 4px; }
.checklist-text:focus { background: var(--bg-elevated); box-shadow: var(--focus); }
.checklist-item.done .checklist-text { color: var(--text-muted); text-decoration: line-through; }
.attachment-list { display: flex; flex-direction: column; gap: 8px; }
.attachment { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); }
.attachment-thumb { display: grid; place-items: center; width: 64px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); color: var(--text-muted); flex-shrink: 0; }
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attachment-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.attachment-info a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.comment-form { display: flex; gap: 10px; margin-bottom: 14px; }
.comment-input { flex: 1; }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.comment-head time { color: var(--text-faint); font-size: 0.78rem; }
.comment-body .markdown { padding: 8px 12px; border-radius: var(--radius); background: var(--surface-2); }
.comment-actions { display: flex; gap: 10px; margin-top: 4px; font-size: 0.8rem; }
.comment-edit { display: flex; flex-direction: column; }
.card-side { display: flex; flex-direction: column; gap: 16px; }
.side-block { display: flex; flex-direction: column; gap: 6px; }
.side-label { display: flex; align-items: center; justify-content: space-between; color: var(--text-muted); font-weight: 650; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; }
.side-action { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); cursor: pointer; }
.side-action:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.card-side .input-sm { width: 100%; }
.side-actions { flex-direction: row; flex-wrap: wrap; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.side-meta { margin: 0; }
.linked-list li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 0.86rem; }
.linked-list li > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linked-list a, .linked-list .link-btn { display: inline-flex; align-items: center; gap: 5px; }
.input.due-overdue { border-color: var(--danger); color: var(--danger); }
.input.due-soon { border-color: var(--warning); }

.editor { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); overflow: hidden; }
.editor:focus-within { border-color: var(--accent); }
.editor-toolbar { display: flex; align-items: center; gap: 2px; padding: 5px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.editor-tool, .editor-mode { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.82rem; font-weight: 600; }
.editor-tool:hover, .editor-mode:hover { background: var(--surface-3); color: var(--text); }
.editor-mode.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tool-bold { font-weight: 800; }
.tool-italic { font-style: italic; font-family: Georgia, serif; }
.tool-code { font-family: var(--mono); font-size: 0.72rem; }
.editor-body { display: grid; grid-template-columns: 1fr; }
.editor[data-mode="split"] .editor-body { grid-template-columns: 1fr 1fr; }
.editor-input { border: 0 !important; border-radius: 0; box-shadow: none !important; min-height: 220px; font-family: var(--mono); font-size: 0.86rem; background: transparent; }
.editor-preview { padding: 12px 14px; overflow: auto; border-left: 1px solid var(--border); max-height: 70vh; }
.editor[data-mode="write"] .editor-preview { display: none; }
.editor[data-mode="preview"] .editor-input { display: none; }
.editor[data-mode="preview"] .editor-preview { border-left: 0; min-height: 220px; }

.markdown { line-height: 1.6; overflow-wrap: anywhere; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1 { font-size: 1.5rem; margin: 1.1em 0 0.5em; }
.markdown h2 { font-size: 1.2rem; margin: 1.2em 0 0.5em; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.markdown h3 { font-size: 1.02rem; margin: 1.1em 0 0.4em; }
.markdown h4, .markdown h5, .markdown h6 { margin: 1em 0 0.4em; }
.markdown ul, .markdown ol { padding-left: 1.4em; margin: 0 0 0.7em; }
.markdown li { margin: 0.15em 0; }
.markdown li.task-item { list-style: none; margin-left: -1.3em; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.markdown li.task-item input { accent-color: var(--primary); }
.markdown blockquote { margin: 0 0 0.8em; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--text-muted); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.markdown code { padding: 1px 5px; border-radius: 4px; background: var(--surface-3); }
.markdown pre { margin: 0 0 0.8em; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-3); overflow-x: auto; }
.markdown pre code { padding: 0; background: none; }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 1.2em 0; }
.markdown img { border-radius: var(--radius-sm); }
.markdown .table-wrap { margin: 0 0 0.8em; }
.markdown table { border-collapse: collapse; width: 100%; font-size: 0.9em; }
.markdown th, .markdown td { padding: 6px 10px; border: 1px solid var(--border); text-align: left; }
.markdown th { background: var(--surface-2); }
.mention { padding: 0 4px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.wiki-link { padding: 0 2px; border-bottom: 1px dashed var(--primary-strong); color: var(--primary-strong); background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; cursor: pointer; }
.wiki-link.missing { color: var(--danger); border-bottom-color: var(--danger); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { padding: 8px 10px; border-bottom: 1px solid var(--border-strong); color: var(--text-muted); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; text-align: left; white-space: nowrap; }
.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover td { background: var(--surface-2); }
.data-table tr:focus-visible { box-shadow: inset var(--focus); }
.data-table.compact td { padding: 6px 8px; }
.cell-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

.notes-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.notes-sidebar { position: sticky; top: 78px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.notes-sidebar-head { display: flex; gap: 6px; align-items: center; padding: 10px; border-bottom: 1px solid var(--border); }
.notes-search { flex: 1; display: flex; align-items: center; gap: 4px; padding-left: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elevated); color: var(--text-faint); min-width: 0; }
.notes-search .input { border: 0; background: transparent; box-shadow: none !important; width: 100%; min-width: 0; }
.notes-tree { overflow-y: auto; padding: 6px; }
.tree-group + .tree-group { margin-top: 8px; }
.tree-heading { display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: var(--text-faint); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.tree-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.88rem; }
.tree-item span:not(.tree-tag):not(.tree-excerpt) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.tree-item.active { background: var(--primary-soft); color: var(--text); }
.tree-tag, .tree-excerpt { font-size: 0.66rem; padding: 0 5px; border-radius: 4px; background: var(--surface-3); color: var(--text-faint); white-space: nowrap; }
.tree-folder-row { display: flex; align-items: center; }
.tree-folder { flex: 1; display: flex; align-items: center; gap: 6px; padding: 6px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font-weight: 600; font-size: 0.88rem; cursor: pointer; text-align: left; min-width: 0; }
.tree-folder span:not(.tree-count) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-folder:hover { background: var(--surface-2); }
.tree-count { color: var(--text-faint); font-size: 0.74rem; }
.tree-list.nested { padding-left: 14px; border-left: 1px solid var(--border); margin-left: 12px; }
.notes-main { min-width: 0; }
.notes-home { padding: 8px 4px; }
.notes-home h2 { margin: 26px 0 10px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 18px; }
.template-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; text-align: left; transition: border-color 0.15s, transform 0.15s var(--ease); }
.template-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.template-card .icon { color: var(--accent); }
.note-page { padding: 24px 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.note-page.editing { display: flex; flex-direction: column; gap: 10px; }
.note-header { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.note-header h1 { margin: 4px 0; }
.note-breadcrumb { display: flex; align-items: center; gap: 4px; }
.note-meta { margin-bottom: 8px; }
.note-actions { display: flex; gap: 6px; align-items: flex-start; }
.note-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--border); }
.note-footer h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--text-muted); }
.note-edit-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.note-title-input { flex: 1; font-size: 1.3rem; font-weight: 700; min-width: 200px; }
.note-page.editing .editor-input { min-height: 460px; }
.history-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; min-height: 320px; }
.version-list { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; }
.version-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; cursor: pointer; text-align: left; }
.version-item:hover, .version-item.active { border-color: var(--primary); background: var(--primary-soft); }
.version-preview { min-width: 0; max-height: 60vh; overflow-y: auto; padding: 4px; }
.version-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.conflict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.conflict-text { max-height: 340px; overflow: auto; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); white-space: pre-wrap; font-size: 0.8rem; }

.timeline { display: grid; grid-template-columns: 220px minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.timeline-labels { border-right: 1px solid var(--border); background: var(--surface); z-index: 1; }
.timeline-label { display: flex; align-items: center; height: 38px; padding: 0 12px; border-bottom: 1px solid var(--border); font-size: 0.85rem; overflow: hidden; }
.timeline-label > span { display: inline-flex; align-items: center; gap: 6px; }
.timeline-label.head { height: 44px; color: var(--text-faint); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.timeline-label.card-row { padding-left: 32px; height: 30px; }
.timeline-toggle, .timeline-card-label { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; min-width: 0; color: var(--text); }
.timeline-toggle span:first-of-type, .timeline-card-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-toggle span:first-of-type { flex: 1; font-weight: 600; }
.timeline-card-label { font-size: 0.8rem; color: var(--text-muted); }
.timeline-scroll { overflow-x: auto; position: relative; }
.timeline-canvas { position: relative; }
.timeline-scale { position: relative; height: 44px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.timeline-month { position: absolute; top: 0; height: 100%; padding: 6px 8px; border-left: 1px solid var(--border); color: var(--text-muted); font-size: 0.76rem; font-weight: 650; white-space: nowrap; overflow: hidden; }
.timeline-week { position: absolute; bottom: 3px; font-size: 0.66rem; color: var(--text-faint); transform: translateX(-50%); }
.timeline-row { position: relative; height: 38px; border-bottom: 1px solid var(--border); background-image: linear-gradient(90deg, transparent calc(100% - 1px), transparent); }
.timeline-row.card-row { height: 30px; background: var(--surface-2); }
.timeline-bar { position: absolute; top: 7px; height: 24px; padding: 0; border: 1px solid color-mix(in srgb, var(--primary) 60%, transparent); border-radius: 6px; background: var(--primary-soft); overflow: hidden; cursor: pointer; text-align: left; }
.timeline-bar.status-completed { border-color: var(--border-strong); background: var(--surface-3); }
.timeline-bar.late { border-color: var(--danger); }
.timeline-bar-fill { position: absolute; inset: 0 auto 0 0; width: var(--progress); background: color-mix(in srgb, var(--primary) 55%, transparent); }
.timeline-bar-label { position: relative; display: block; padding: 0 8px; font-size: 0.74rem; font-weight: 650; line-height: 22px; white-space: nowrap; color: var(--text); }
.timeline-release { position: absolute; top: 9px; display: flex; align-items: center; gap: 4px; transform: translateX(-6px); white-space: nowrap; }
.timeline-release .diamond { width: 12px; height: 12px; transform: rotate(45deg); background: var(--accent); border-radius: 2px; }
.timeline-release.status-released .diamond { background: var(--success); }
.timeline-release.status-cancelled .diamond { background: var(--text-faint); }
.timeline-release-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.timeline-dot { position: absolute; top: 50%; width: 11px; height: 11px; margin: -6px 0 0 -5px; padding: 0; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface); cursor: pointer; }
.timeline-dot.done { border-color: var(--success); background: var(--success); }
.timeline-nodate { position: absolute; top: 6px; }
.timeline-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; }
.timeline-today span { position: absolute; top: 26px; left: 4px; padding: 0 4px; border-radius: 3px; background: var(--accent); color: #1b1006; font-size: 0.62rem; font-weight: 800; }
.milestone-cards, .sprint-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.milestone-card, .sprint-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
.sprint-card:hover { text-decoration: none; border-color: var(--primary); }
.sprint-card.status-active { border-color: color-mix(in srgb, var(--success) 50%, var(--border)); }
.sprint-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sprint-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; margin-bottom: 18px; }
.sprint-columns { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.burndown { width: 100%; height: auto; }
.burndown .grid { stroke: var(--border); stroke-width: 1; }
.burndown .axis { fill: var(--text-faint); font-size: 10px; }
.burndown .ideal { fill: none; stroke: var(--text-faint); stroke-width: 1.5; stroke-dasharray: 4 4; }
.burndown .actual { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.burndown .actual-dot { fill: var(--accent); }
.chart-legend { display: flex; gap: 16px; margin-top: 6px; color: var(--text-muted); }
.legend::before { content: ""; display: inline-block; width: 16px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 2px dashed var(--text-faint); }
.legend.actual::before { border-top: 3px solid var(--accent); }

.hub-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hub-header h1 { font-size: 1.35rem; }
.hub-header p { margin: 4px 0 0; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.doc-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text); }
.doc-card:hover { text-decoration: none; border-color: var(--primary); }
.doc-card p { margin: 0; }
.severity-summary, .pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.severity-tile, .pipeline-step { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: left; }
.severity-tile strong, .pipeline-step strong { font-size: 1.3rem; }
.severity-tile span, .pipeline-step span { color: var(--text-muted); font-size: 0.8rem; }
.severity-tile.active, .pipeline-step.active { border-color: var(--accent); box-shadow: var(--focus); }
.severity-blocker strong, .severity-critical strong { color: var(--danger); }
.severity-major strong { color: var(--accent); }
.severity-minor strong { color: var(--warning); }
.release-log { display: flex; flex-direction: column; gap: 16px; position: relative; }
.release { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.release-marker { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.release.status-released .release-marker { background: var(--success-soft); color: var(--success); }
.release-body { padding: 16px 18px; }
.release-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.release-head h2 { font-size: 1.1rem; }
.release-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.release-columns h3 { color: var(--text-muted); margin-bottom: 6px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.team-card { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.team-card.inactive { opacity: 0.6; }
.team-card h2 { font-size: 1rem; }
.team-card p { margin: 2px 0 8px; }
.team-responsibility { font-weight: 550; }

.idea-list { display: flex; flex-direction: column; gap: 12px; }
.idea { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.idea.status-declined { opacity: 0.65; }
.vote-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 54px; height: 62px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.vote-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.vote-btn.voted { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.vote-btn:disabled { cursor: not-allowed; opacity: 0.6; }
.idea-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.idea-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.idea-head h2 { font-size: 1.02rem; margin-right: 4px; }
.idea-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.calendar { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.calendar-head, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-head div { padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; }
.calendar-cell { min-height: 118px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; }
.calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-cell.outside { background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
.calendar-cell.outside .calendar-day { color: var(--text-faint); }
.calendar-cell.today .calendar-day { background: var(--accent); color: #1b1006; }
.calendar-day { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.calendar-events { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.calendar-event { display: flex; align-items: center; gap: 4px; width: 100%; padding: 2px 6px; border: 0; border-left: 3px solid var(--project); border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: 0.72rem; cursor: pointer; text-align: left; }
.calendar-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event:disabled { cursor: default; opacity: 1; }
.calendar-event.done span { text-decoration: line-through; color: var(--text-muted); }
.calendar-event.event-milestone { background: var(--primary-soft); font-weight: 650; }
.calendar-event.event-release { background: var(--accent-soft); font-weight: 650; }
.calendar-event.event-sprint { background: var(--info-soft); }
.calendar-legend { display: flex; gap: 12px; color: var(--text-muted); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 4px; }

.search-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.search-box { display: flex; align-items: center; gap: 10px; padding-left: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-faint); }
.search-box:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.search-box .input { border: 0; box-shadow: none !important; background: transparent; }
.search-results { display: flex; flex-direction: column; gap: 20px; }
.search-group h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.search-list { display: flex; flex-direction: column; gap: 6px; }
.search-hit { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; }
.search-hit:hover { border-color: var(--primary); text-decoration: none; }
.search-hit-title { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.search-excerpt { color: var(--text-muted); font-size: 0.84rem; }
.saved-views { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.saved-chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 2px 0 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.82rem; }

.notification-menu { width: 360px; max-width: calc(100vw - 16px); padding: 0; }
.notification-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notification-list { max-height: 420px; overflow-y: auto; }
.notification-list.page { max-height: none; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.notification { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.notification:last-child { border-bottom: 0; }
.notification.unread { background: var(--primary-soft); }
.notification-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--text-muted); flex-shrink: 0; }
.notification-icon.n-overdue { color: var(--danger); background: var(--danger-soft); }
.notification-icon.n-due_soon { color: var(--warning); background: var(--warning-soft); }
.notification-icon.n-mentioned { color: var(--accent); background: var(--accent-soft); }
.notification-body { display: flex; flex-direction: column; min-width: 0; }
.notification-body a { color: var(--text); }
.notification-loading, .notification-empty { padding: 16px 14px; }
.notification-all { display: block; padding: 10px; text-align: center; border-top: 1px solid var(--border); font-weight: 600; }

.settings-page .form-grid { max-width: 820px; }
.cover-editor { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cover-preview { width: 260px; height: 140px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border); }
.cover-preview.empty { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--project) 50%, var(--surface-2)), var(--surface-2)); font-size: 1.8rem; font-weight: 800; }
.label-editor { display: flex; flex-direction: column; gap: 8px; }
.label-editor li { display: flex; align-items: center; gap: 8px; }
.label-editor li .label-chip { min-width: 100px; }
.label-editor .input:not(.color-input) { flex: 1; max-width: 260px; }
.danger-zone { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; align-items: center; }
.danger-zone p { margin: 2px 0 0; }

.profile-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-card .panel-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 18px; }
.profile-card h2 { margin-top: 8px; }
.profile-card p { margin: 0; }
.profile-forms { display: flex; flex-direction: column; gap: 18px; }

.admin-body { display: flex; flex-direction: column; gap: 18px; }
.approval-queue { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); }
.approval { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.approval:last-child { border-bottom: 0; }
.approval-info { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.approval-note { margin: 6px 0 0; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 0.85rem; }
.admin-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.admin-projects .panel-head h2 { flex-wrap: wrap; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.shortcut-table { width: 100%; border-collapse: collapse; }
.shortcut-table td { padding: 7px 4px; border-bottom: 1px solid var(--border); }
.shortcut-table td:first-child { white-space: nowrap; width: 40%; }
.archived h3 { margin: 6px 0; }
.archived h3 + * { margin-bottom: 16px; }

@media (max-width: 1180px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3 { grid-column: 1 / -1; }
  .card-detail-grid { grid-template-columns: minmax(0, 1fr) 240px; }
}

@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform 0.25s var(--ease); box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.45); }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .view { padding: 18px 16px; }
  .project-nav { margin: -18px -16px 18px; padding: 16px 16px 0; }
  .board-canvas { margin: 0 -16px; padding: 0 16px 16px; }
  .notes-layout, .profile-layout, .sprint-layout, .sprint-summary { grid-template-columns: 1fr; }
  .notes-sidebar { position: static; max-height: 360px; }
  .card-detail-grid { grid-template-columns: 1fr; }
  .card-side { order: -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .side-actions, .side-meta { grid-column: 1 / -1; }
  .admin-projects { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .dashboard-grid, .form-grid, .type-fields, .note-footer, .release-columns, .conflict-grid, .history-layout { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .card-side { grid-template-columns: 1fr; }
  .editor[data-mode="split"] .editor-body { grid-template-columns: 1fr; }
  .editor[data-mode="split"] .editor-preview { border-left: 0; border-top: 1px solid var(--border); }
  .board-list { width: 82vw; max-height: calc(100vh - 230px); }
  .timeline { grid-template-columns: 130px minmax(0, 1fr); }
  .calendar-cell { min-height: 72px; padding: 3px; }
  .calendar-event span { display: none; }
  .calendar-event { justify-content: center; padding: 2px; }
  .modal-backdrop { padding: 0; }
  .modal { min-height: 100vh; border-radius: 0; border: 0; }
  .note-page { padding: 16px; }
  .topbar-search-input::placeholder { color: transparent; }
  .danger-zone { grid-template-columns: 1fr; }
  .h-hide-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
