:root {
    --bg: #f3f4f7;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #eef2f7;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --accent: #4f46e5;
    --accent-strong: #4338ca;
    --accent-soft: #eef2ff;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --success: #15803d;
    --success-soft: #f0fdf4;
    --warning: #b45309;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px -16px rgba(15, 23, 42, .25);
    --radius: 14px;
    --radius-sm: 9px;
    --font: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1120;
        --surface: #111827;
        --surface-2: #0f172a;
        --surface-3: #1e293b;
        --text: #e5e7eb;
        --muted: #94a3b8;
        --line: #1f2937;
        --line-strong: #334155;
        --accent: #818cf8;
        --accent-strong: #a5b4fc;
        --accent-soft: #1e1b4b;
        --danger: #f87171;
        --danger-soft: #3f1d1d;
        --success: #4ade80;
        --success-soft: #14301f;
        --warning: #fbbf24;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -22px rgba(0, 0, 0, .8);
        color-scheme: dark;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3 {
    line-height: 1.25;
}

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--surface-3);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 12.5px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 60px;
    padding: 0 24px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand,
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -.01em;
    text-decoration: none;
}

.brand:hover,
.auth-brand:hover {
    text-decoration: none;
}

.brand-mark {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.brand-mark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 100% 55%, 55% 100%, 0 100%);
    opacity: .92;
}

.topnav {
    display: flex;
    gap: 4px;
}

.topnav a {
    padding: 7px 11px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}

.topnav a:hover {
    background: var(--surface-3);
    color: var(--text);
    text-decoration: none;
}

.topnav a.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.topbar-spacer {
    flex: 1;
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
}

.topbar-user:hover {
    text-decoration: none;
}

.topbar-user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* shell */

.shell {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 28px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 26px 28px 60px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 86px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 4px;
}

.side-nav,
.side-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}

.side-link:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.side-link.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.side-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot, var(--muted));
    flex: 0 0 auto;
}

.side-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-count {
    margin-left: auto;
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.side-section {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.side-title {
    margin: 0 0 8px 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.side-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 8px;
}

.main {
    min-width: 0;
}

/* page head */

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

.page-head-compact {
    align-items: flex-start;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
}

.page-title {
    margin: 0;
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -.02em;
}

.page-sub {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.back-link {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.dot-sep {
    margin: 0 6px;
    color: var(--line-strong);
}

.section-title {
    margin: 22px 0 10px;
    font-size: 14px;
    font-weight: 700;
}

/* buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--surface-3);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .05s ease, box-shadow .15s ease;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn-primary:hover {
    background: var(--accent-strong);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--surface-2);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    background: var(--surface-3);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    filter: brightness(.95);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

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

/* forms */

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.field-wide {
    grid-column: 1 / -1;
}

label {
    color: var(--text);
    font-size: 12.5px;
    font-weight: 650;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="color"] {
    width: 34px;
    height: 34px;
    padding: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
    flex: 0 0 auto;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 11.5px;
}

.field-hint.is-overdue {
    color: var(--danger);
    font-weight: 600;
}

.field-hint.is-today {
    color: var(--warning);
    font-weight: 600;
}

.task-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.task-form-single {
    grid-template-columns: 1fr;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}

.checkline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
}

.checkline input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
}

/* create panel */

.create-panel {
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.create-panel summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    color: var(--text);
    font-weight: 650;
    cursor: pointer;
    list-style: none;
}

.create-panel summary::-webkit-details-marker {
    display: none;
}

.create-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 17px;
    line-height: 1;
}

.create-panel[open] summary {
    border-bottom: 1px solid var(--line);
}

.create-panel .task-form {
    padding: 18px 16px;
}

/* filter bar */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.filter-search {
    flex: 1 1 220px;
    min-width: 180px;
}

.filter-search input {
    background: var(--surface-2);
}

.filter-item {
    flex: 0 1 165px;
}

.filter-item select {
    background: var(--surface-2);
}

.filter-bar .btn {
    flex: 0 0 auto;
}

/* board */

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

.column {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 70%, var(--bg));
    transition: background .15s ease, box-shadow .15s ease;
}

.column.is-drag-over {
    background: var(--accent-soft);
    box-shadow: 0 0 0 2px var(--accent) inset;
}

.column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
}

.column-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 750;
    letter-spacing: .01em;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px color-mix(in srgb, #94a3b8 20%, transparent);
}

.column-doing .status-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 3px color-mix(in srgb, #3b82f6 20%, transparent);
}

.column-done .status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 20%, transparent);
}

.column-count {
    min-width: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.column-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-height: 120px;
    padding: 0 10px 12px;
}

.column-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 10px;
    color: var(--muted);
    font-size: 12px;
}

.column-empty[hidden] {
    display: none;
}

/* task card */

.task-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease, opacity .15s ease;
}

.task-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.task-card.is-dragging {
    opacity: .35;
    cursor: grabbing;
}

.task-card.due-is-overdue {
    border-left: 3px solid var(--danger);
}

.task-card.due-is-today {
    border-left: 3px solid var(--warning);
}

.task-card-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.priority {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #3b82f6;
}

.priority-low {
    background: #94a3b8;
}

.priority-normal {
    background: #3b82f6;
}

.priority-high {
    background: #f59e0b;
}

.priority-urgent {
    background: #ef4444;
    box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 18%, transparent);
}

.task-title {
    color: var(--text);
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.4;
    word-break: break-word;
}

.task-title:hover {
    color: var(--accent);
    text-decoration: none;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.project-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 8px 1px 6px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.project-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--chip, var(--muted));
}

.due {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.due.is-overdue {
    background: var(--danger-soft);
    color: var(--danger);
}

.due.is-today {
    background: color-mix(in srgb, var(--warning) 14%, transparent);
    color: var(--warning);
}

.due.is-done {
    opacity: .6;
}

.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.task-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 2px;
}

.assignee {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignee.is-empty {
    font-weight: 500;
    opacity: .7;
}

.task-updated {
    color: var(--muted);
    font-size: 10.5px;
    opacity: .7;
    white-space: nowrap;
}

/* avatars */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 750;
    object-fit: cover;
    overflow: hidden;
}

.avatar-sm {
    width: 27px;
    height: 27px;
    font-size: 11px;
}

.avatar-xs {
    width: 20px;
    height: 20px;
    font-size: 9.5px;
}

/* tags */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: hsl(var(--tag-hue, 240) 75% 93%);
    color: hsl(var(--tag-hue, 240) 45% 30%);
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.5;
}

.tag:hover {
    text-decoration: none;
    filter: brightness(.97);
}

.tag.is-active {
    box-shadow: 0 0 0 2px hsl(var(--tag-hue, 240) 45% 45%);
}

.tag-sm {
    padding: 0 7px;
    font-size: 10.5px;
}

.tag-count {
    opacity: .6;
    font-size: 10px;
}

@media (prefers-color-scheme: dark) {
    .tag {
        background: hsl(var(--tag-hue, 240) 40% 20%);
        color: hsl(var(--tag-hue, 240) 70% 80%);
    }
}

/* cards */

.card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.card-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 750;
}

.token-card {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    background: linear-gradient(180deg, var(--accent-soft), var(--surface) 65%);
}

.token-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
}

.token-status.is-active {
    background: var(--success-soft);
    color: var(--success);
}

.token {
    display: block;
    padding: 11px 12px;
    border: 1px dashed var(--line-strong);
    border-radius: 9px;
    background: var(--surface-2);
    font-size: 12px;
    word-break: break-all;
}

/* detail layout */

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

.detail-side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.meta-list {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 7px 12px;
    margin: 0;
    font-size: 12.5px;
}

.meta-list dt {
    color: var(--muted);
}

.meta-list dd {
    margin: 0;
    word-break: break-word;
}

.danger-card {
    border-color: color-mix(in srgb, var(--danger) 30%, var(--line));
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 11.5px;
}

/* projects */

.project-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
}

.project-row.is-archived {
    opacity: .7;
}

.project-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.project-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.project-delete {
    display: flex;
    justify-content: flex-end;
    margin: -4px 8px 6px;
}

/* table */

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.table th {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

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

.pill {
    display: inline-flex;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
}

.pill-on {
    background: var(--success-soft);
    color: var(--success);
}

/* flash */

.flash {
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.flash-success {
    border-color: color-mix(in srgb, var(--success) 30%, transparent);
    background: var(--success-soft);
    color: var(--success);
}

.flash-error {
    border-color: color-mix(in srgb, var(--danger) 30%, transparent);
    background: var(--danger-soft);
    color: var(--danger);
}

/* auth */

body.is-auth {
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
        radial-gradient(700px 420px at 100% 0%, color-mix(in srgb, #8b5cf6 14%, transparent), transparent 55%),
        var(--bg);
    display: flex;
    flex-direction: column;
}

.auth-shell {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 48px 20px 24px;
}

.auth-brand {
    justify-content: center;
    margin-bottom: 22px;
    color: var(--text);
    font-size: 16px;
}

.auth-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.auth-title {
    margin: 0;
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -.02em;
}

.auth-sub {
    margin: 6px 0 20px;
    color: var(--muted);
    font-size: 13px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-footer {
    padding: 24px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.error-page {
    max-width: 620px;
    margin: 40px auto;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.error-page .auth-sub {
    white-space: pre-wrap;
    word-break: break-word;
}

/* footer */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 16px 34px;
    color: var(--muted);
    font-size: 11.5px;
}

.site-footer-sep {
    opacity: .4;
}

/* responsive */

@media (max-width: 1180px) {
    .board {
        grid-template-columns: repeat(3, minmax(250px, 1fr));
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .detail-grid {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

@media (max-width: 960px) {
    .shell {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px 18px 48px;
    }

    .main {
        order: 1;
    }

    .sidebar {
        order: 2;
        position: static;
        max-height: none;
        overflow: visible;
    }

    .side-nav,
    .side-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .side-section {
        padding-top: 12px;
    }

    .side-tags {
        padding: 0;
    }

    .topnav {
        display: none;
    }

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

    .task-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .topbar {
        padding: 0 14px;
        gap: 10px;
    }

    .topbar-user-name,
    .topbar-user .avatar {
        display: none;
    }

    .topbar-new {
        display: none;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-title {
        font-size: 22px;
    }

    .board {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
    }

    .column {
        flex: 0 0 84vw;
        scroll-snap-align: start;
    }

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

    .filter-bar {
        align-items: stretch;
    }

    .filter-item,
    .filter-search {
        flex: 1 1 100%;
    }

    .project-row {
        flex-direction: column;
    }

    .project-actions {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .auth-card {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
