@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --bg: #f9f8f6;
  --surface: #ffffff;
  --surface-2: #f2efe9;
  --hover: #efece6;
  --line: #e7e5e0;
  --line-strong: #dcd8d0;
  --text: #1f2a37;
  --muted: #67635c;
  --accent: #a9502f;
  --accent-hover: #934427;
  --accent-ink: #ffffff;
  --accent-soft: #fbede7;
  --accent-deco: #c25e3e;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --warn-line: #f0dcae;
  --ok: #2a5937;
  --ok-solid: #2f6b44;
  --ok-soft: #eaf3ed;
  --ok-line: #c8e0d0;
  --internal: #5d4b83;
  --internal-soft: #f3f0f8;
  --internal-line: #dcd2ed;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(31, 42, 55, .04), 0 2px 6px rgba(31, 42, 55, .03);
  --shadow-hover: 0 2px 4px rgba(31, 42, 55, .06), 0 6px 14px rgba(31, 42, 55, .06);
  --shadow-lg: 0 8px 24px -4px rgba(31, 42, 55, .14), 0 2px 6px -1px rgba(31, 42, 55, .06);
  --nav-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614; --surface: #201f1c; --surface-2: #2a2825; --hover: #302e2a; --line: #34322e; --line-strong: #44413c; --text: #ece8e1; --muted: #a8a39a;
    --accent: #e58a69; --accent-hover: #ee9c7e; --accent-ink: #1f1410; --accent-soft: #3a2620; --accent-deco: #e58a69;
    --danger: #ff8a80; --danger-soft: #3a1d1b; --warn: #e9b45a; --warn-soft: #33280f; --warn-line: #4d3c17;
    --ok: #8ccb9e; --ok-solid: #8ccb9e; --ok-soft: #1d2e22; --ok-line: #2d4a36; --internal: #bba9e3; --internal-soft: #29243a; --internal-line: #3d3557;
    --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-hover: 0 4px 12px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font-body); font-feature-settings: "cv11", "ss01"; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.3; font-weight: 600; margin: 0; letter-spacing: -.02em; }
h2 { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .5rem; }
h3 { font-family: var(--font-head); font-size: .95rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .5rem; display: flex; align-items: center; gap: .4rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: .5rem 0; width: 100%; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
:focus-visible { outline: 2px solid var(--accent-deco); outline-offset: 2px; }
[hidden] { display: none !important; }

.icon { display: inline-flex; width: 1.1em; height: 1.1em; flex: none; }
.icon svg { width: 100%; height: 100%; }

input, select, textarea { font: inherit; font-size: .92rem; color: inherit; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .5rem .7rem; width: 100%; min-height: 40px; }
textarea { resize: vertical; }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; accent-color: var(--text); margin: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-deco); outline: none; box-shadow: 0 0 0 3px rgba(194, 94, 62, .15); }
[aria-invalid=true] { border-color: var(--danger) !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 500; font-size: .86rem; letter-spacing: .01em; padding: .45rem .9rem; min-height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.is-busy { opacity: .7; cursor: progress; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-success { background: var(--ok-solid); border-color: var(--ok-solid); color: var(--accent-ink); font-weight: 600; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--accent-ink); font-weight: 600; }
.btn-danger-outline { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-sm { padding: .3rem .65rem; min-height: 32px; font-size: .82rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.2rem; position: relative; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.icon-btn.small { width: 28px; height: 28px; font-size: 1rem; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.text-danger { color: var(--danger) !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

.row { display: flex; align-items: center; }
.row.gap { gap: .5rem; }
.row.between { justify-content: space-between; gap: .75rem; }
.row.end { justify-content: flex-end; gap: .5rem; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: .85rem; }
.stack-sm { display: flex; flex-direction: column; gap: .4rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.spacer { flex: 1; }

.field { display: flex; flex-direction: column; gap: .3rem; }
.field-label { font-size: .8rem; font-weight: 500; letter-spacing: .01em; color: var(--muted); }
.field-hint { font-size: .78rem; color: var(--muted); }
.field-error { color: var(--danger); background: var(--danger-soft); border-radius: 8px; padding: .45rem .65rem; margin: 0; font-size: .88rem; }
.check { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }
.switch { display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; font-size: .88rem; background: var(--surface); }
.switch span { display: inline-flex; align-items: center; gap: .35rem; }

.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .69rem; font-weight: 600; letter-spacing: .03em; line-height: 1rem; padding: .1rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill-requested, .pill-warn, .pill-pending { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.pill-approved, .pill-ok, .pill-shared { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.pill-changes_requested, .pill-failed { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill-internal { background: var(--internal-soft); color: var(--internal); border-color: var(--internal-line); }
.pill-btn { border: 0; cursor: pointer; }
.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.count { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 0 .45rem; border-radius: 999px; margin-left: .45rem; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; letter-spacing: .02em; flex: none; }
.avatar-sm { width: 24px; height: 24px; font-size: .66rem; }
.avatar-md { width: 40px; height: 40px; font-size: .95rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.15rem; }
.avatar-empty { background: var(--surface-2); color: var(--muted); }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .6rem; height: 56px; padding: 0 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; font-size: 1.02rem; min-width: 0; flex: 1; text-decoration: none !important; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; flex: none; }
.me-link { display: inline-flex; padding: 4px; text-decoration: none !important; }
.bell .badge { top: 0; right: -2px; }

.layout { display: flex; min-height: calc(100vh - 56px); }
.nav { width: 232px; flex: none; padding: 1rem .75rem; border-right: 1px solid var(--line); background: var(--bg); position: sticky; top: 56px; height: calc(100vh - 56px); display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem; border-radius: var(--radius-sm); color: var(--text); font-size: .92rem; font-weight: 500; position: relative; text-decoration: none !important; }
.nav-link:hover { background: var(--hover); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-link .badge { position: static; margin-left: auto; }
.main { flex: 1; min-width: 0; padding: 1.5rem 2rem 3rem; outline: none; }

.status-slot { position: sticky; top: 56px; z-index: 19; }
.banner { display: flex; align-items: center; gap: .5rem; padding: .5rem .9rem; font-size: .88rem; border-bottom: 1px solid var(--line); }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.banner-info { background: var(--accent-soft); color: var(--accent); }
.banner-error { background: var(--danger-soft); color: var(--danger); justify-content: space-between; }

.timer-slot { display: flex; }
.timer-pill { display: flex; align-items: center; gap: .55rem; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); border-radius: 999px; padding: .15rem .2rem .15rem .75rem; font-size: .84rem; font-weight: 500; max-width: 46vw; box-shadow: var(--shadow); }
.timer-task { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22vw; }
.timer-elapsed { font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "zero"; font-weight: 600; color: var(--ok); letter-spacing: .02em; }
.timer-pill .icon-btn { color: var(--accent); width: 30px; height: 30px; border-radius: 50%; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-solid); box-shadow: 0 0 0 3px var(--ok-soft); flex: none; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.page-head { margin-bottom: 1.4rem; }
.page-head p { margin: .15rem 0 0; }
.loading, .empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.error-panel { max-width: 560px; margin: 2rem auto; padding: 1.25rem; background: var(--surface); border: 1px solid var(--danger); border-radius: var(--radius); }
.error-panel h2 { color: var(--danger); }
.boot-error { padding: 1rem; }

.group { margin-bottom: 1.4rem; }
.group-title { font-family: var(--font-body); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; }
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list > * + * { border-top: 1px solid var(--line); }
.task-row, .notice, .entry-row, .template-row, .token-row { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; color: var(--text); text-decoration: none !important; background: var(--surface); }
.task-row:hover, .notice:hover, .template-row:hover { background: var(--surface-2); }
.task-row-main, .notice-main, .entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; color: var(--text); }
.task-row-title { font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; font-size: .95rem; }
.task-row-meta { font-size: .8rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.task-row.is-overdue .task-row-title { color: var(--danger); }
.due { font-size: .76rem; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due-over { color: var(--danger); font-weight: 600; }
.due-today { color: var(--warn); font-weight: 600; }
.notice.is-unread { background: var(--accent-soft); }
.notice-excerpt { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-deco); flex: none; }
.template-row { border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; flex-wrap: wrap; }
.token-row code { color: var(--muted); }
.is-inactive { opacity: .55; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.project-card { display: flex; flex-direction: column; gap: .7rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); text-decoration: none !important; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.project-card-top { display: flex; align-items: center; gap: .5rem; }
.project-card-meta { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.progress { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent-deco); border-radius: 2px; }

.board-head { display: flex; flex-direction: column; gap: 1rem; margin: -1.5rem -2rem 0; padding: 1.25rem 2rem 1rem; border-bottom: 1px solid var(--line); }
.board-title { display: flex; align-items: flex-start; gap: .6rem; min-width: 0; }
.board-title h1 { font-size: 1.75rem; line-height: 1.25; letter-spacing: -.015em; word-spacing: .04em; }
.board-title p { margin: 0; }
.board-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.board { display: flex; gap: 1rem; overflow-x: auto; margin: 0 -2rem; padding: 1.25rem 2rem 1rem; align-items: flex-start; scroll-snap-type: x proximity; min-height: 60vh; }
.column { flex: 0 0 300px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 250px); scroll-snap-align: start; }
.column.has-pending { background: var(--surface); border-color: var(--accent-deco); box-shadow: 0 0 0 3px var(--accent-soft); }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .7rem .5rem .6rem .9rem; border-bottom: 1px solid var(--line); }
.col-head h2 { font-size: .98rem; margin: 0; display: flex; align-items: center; gap: .5rem; min-width: 0; flex-wrap: wrap; }
.col-list { display: flex; flex-direction: column; gap: .6rem; padding: .7rem .6rem; overflow-y: auto; min-height: 48px; }
.card { display: flex; flex-direction: column; gap: .55rem; padding: .75rem .875rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); cursor: pointer; text-decoration: none !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.card.is-dragging { opacity: .4; }
.card.is-pending { border-style: dashed; }
.card.is-overdue .card-title { color: var(--text); }
.card-title { font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.4; letter-spacing: -.005em; word-spacing: .03em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-size: .76rem; color: var(--muted); padding-top: .55rem; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.meta { display: inline-flex; align-items: center; gap: .2rem; }
.meta-done { color: var(--ok); }
.vis { display: inline-flex; color: var(--muted); }
.vis-on { color: var(--accent); }
.drop-marker { height: 3px; background: var(--accent-deco); border-radius: 2px; }
.add-task { padding: 0 .6rem .7rem; }
.add-task input { background: transparent; border-style: dashed; min-height: 38px; font-size: .86rem; }
.add-task input:focus { background: var(--surface); border-style: solid; }

.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(31, 42, 55, .38); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; display: flex; flex-direction: column; }
.modal-wide { max-width: 980px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem .75rem .7rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1rem; }
.modal-body { padding: 1.1rem 1.2rem 1.3rem; }
.danger-zone { border-top: 1px solid var(--line); padding-top: .85rem; }

.task-detail { min-height: 200px; }
.detail-crumbs { display: flex; align-items: center; gap: .4rem; margin-bottom: .5rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1.3rem; }
.detail-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: .75rem; }
.title-input { font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; border-color: transparent; padding: .25rem .4rem; resize: none; overflow: hidden; }
.title-input:hover { border-color: var(--line); }
.title-text { font-size: 1.4rem; margin: 0; }
.desc-input { min-height: 90px; }
.desc-text { white-space: pre-wrap; margin: 0; }
.detail-section { border-top: 1px solid var(--line); padding-top: .8rem; }
.detail-side .detail-section { border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem; background: var(--bg); }
.checklist { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .2rem; }
.checklist li { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .25rem 0; }
.checklist li.is-done span { text-decoration: line-through; color: var(--muted); }
.files { list-style: none; padding: 0; margin: 0 0 .6rem; display: flex; flex-direction: column; gap: .4rem; }
.files li { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.files a { overflow-wrap: anywhere; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.file-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 6px; color: var(--muted); }
.comments { display: flex; flex-direction: column; gap: .8rem; margin-bottom: .8rem; }
.comment { display: flex; gap: .6rem; }
.comment-main { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .55rem .75rem; }
.comment-internal .comment-main { background: var(--internal-soft); border-color: var(--internal-line); }
.comment.is-pending .comment-main { opacity: .7; border: 1px dashed var(--line); }
.comment-head { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .15rem; font-size: .88rem; }
.comment-actions { margin-left: auto; display: inline-flex; gap: .6rem; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-body textarea { margin-bottom: .4rem; }
.mention { color: var(--accent); font-weight: 600; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.composer { display: flex; flex-direction: column; gap: .5rem; }
.composer-input { position: relative; }
.mention-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .25rem; z-index: 5; max-width: 360px; }
.mention-opt { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0; background: transparent; padding: .45rem .5rem; border-radius: 8px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.mention-opt.is-active, .mention-opt:hover { background: var(--surface-2); }
.approval-status { display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; margin-bottom: .5rem; }
.approval-ask { border-color: var(--warn-line) !important; background: var(--warn-soft) !important; }
.entries { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.entries li { display: flex; align-items: center; gap: .45rem; }
.entries strong { margin-left: auto; }
.log-form { margin-top: .5rem; }
.log-form input[name=minutes] { width: 70px; }
.log-form input[type=date] { width: auto; flex: 1; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; margin: 0; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.activity ul { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.activity summary, details summary { cursor: pointer; font-weight: 600; }

.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; box-shadow: var(--shadow); }
.tile strong { font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-label { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.tile-unit { font-size: .78rem; color: var(--muted); }
.tile-accent strong { color: var(--accent); }
.timer-big { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; background: var(--ok-soft); border-color: var(--ok-line); }
.timer-big .btn { margin-left: auto; }
.entry-row strong { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table.report { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.report th, table.report td { padding: .5rem .4rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.report th { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { height: 5px; margin-top: .3rem; background: transparent; }
.bar-all { display: block; height: 100%; background: var(--surface-2); border-radius: 3px; overflow: hidden; min-width: 2px; }
.bar-bill { display: block; height: 100%; background: var(--accent-deco); }

.tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 1rem; scrollbar-width: none; }
.tab { padding: .6rem .85rem; color: var(--muted); font-weight: 500; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none !important; }
.tab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent-deco); }
.people { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .6rem; }
.person { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; flex-wrap: wrap; }
.person-main { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.client-block { border-top: 1px solid var(--line); padding-top: .6rem; }
.client-block h3 { margin-bottom: .2rem; }
.secret { display: flex; align-items: center; gap: .5rem; background: var(--surface-2); padding: .5rem .6rem; border-radius: var(--radius-sm); }
.secret code { flex: 1; overflow-wrap: anywhere; }
pre.code { background: var(--surface-2); padding: .6rem .7rem; border-radius: 8px; overflow-x: auto; margin: 0; }
.notice-ok { background: var(--ok-soft); border-color: transparent; }
fieldset.events { border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .4rem .8rem; padding: .6rem .8rem; }
fieldset.events legend { font-size: .82rem; font-weight: 600; color: var(--muted); padding: 0 .3rem; }
.url { overflow-wrap: anywhere; }
.mail summary { padding: .65rem .9rem; font-weight: 400; }
.mail-body { white-space: pre-wrap; margin: 0; padding: .2rem .9rem .9rem; font-family: inherit; font-size: .9rem; color: var(--muted); }
.tpl-rows { display: flex; flex-direction: column; gap: .35rem; }
.tpl-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 70px 30px 30px; gap: .4rem; align-items: center; }
.tpl-head { font-weight: 600; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); padding: .3rem .8rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: .84rem; color: var(--text); }
.chip-on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }

.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: radial-gradient(ellipse at top, var(--accent-soft), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.75rem 1.5rem; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 1rem; }
.auth-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 700; letter-spacing: -.01em; font-size: 1.15rem; }
.auth-card p { margin: 0; }
.lang-switch { display: flex; gap: .4rem; justify-content: center; }

.toasts { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { display: flex; align-items: center; gap: .6rem; background: var(--text); color: var(--bg); padding: .6rem .5rem .6rem .9rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: .9rem; }
.toast span { flex: 1; }
.toast .link { color: var(--bg); font-weight: 700; text-decoration: underline; }
.toast .icon-btn { color: inherit; width: 28px; height: 28px; }
.toast-error { background: var(--danger); color: var(--accent-ink); }
.toast-error .link { color: var(--accent-ink); }

@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { height: 52px; padding: 0 .75rem; }
  .status-slot { top: 52px; }
  .layout { min-height: calc(100vh - 52px); }
  .nav-head { display: none; }
  .h-page { font-size: 1.4rem; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; top: auto; width: auto; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom); flex-direction: row; justify-content: space-around; border-right: 0; border-top: 1px solid var(--line); z-index: 30; gap: 0; }
  .nav-link { flex: 1; flex-direction: column; gap: 2px; padding: .4rem .1rem; font-size: .66rem; border-radius: 0; justify-content: center; }
  .nav-link .icon { width: 22px; height: 22px; }
  .nav-link.active { background: transparent; }
  .nav-link.active .icon { background: var(--accent-soft); border-radius: 999px; width: 44px; padding: 0 11px; box-sizing: border-box; }
  .nav-link .badge { position: absolute; top: 4px; left: calc(50% + 4px); right: auto; margin: 0; }
  .nav-label { white-space: nowrap; }
  .main { padding: .9rem 16px calc(var(--nav-h) + 2rem); }
  .nav { background: var(--surface); }
  .bell { display: none; }
  .brand-name { font-size: .95rem; }
  .timer-pill { max-width: 60vw; }
  .timer-task { max-width: 30vw; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .board { margin: 0 -16px; padding: 1rem 16px 1rem; gap: .75rem; scroll-snap-type: x mandatory; }
  .board-head { margin: -.9rem -16px 0; padding: .9rem 16px .85rem; gap: .75rem; }
  .seg-btn { padding: .3rem .6rem; font-size: .8rem; }
  .seg-btn .seg-n { display: none; }
  .column { flex-basis: 84vw; max-height: none; }
  .board-tools .check { font-size: .8rem; }
  .backdrop { padding: 0; display: block; }
  .modal { border-radius: 0; max-width: none; min-height: 100%; }
  .board-title h1 { font-size: 1.3rem; }
  .board-head { margin-bottom: .6rem; gap: .4rem; }
  .board-tools .btn-label { display: none; }
  .modal-head { position: sticky; top: 0; background: var(--surface); z-index: 2; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { order: -1; }
  .tpl-row { grid-template-columns: minmax(0, 1fr) 90px 54px 26px 26px; }
  .toasts { left: 1rem; right: 1rem; bottom: calc(var(--nav-h) + 1rem); }
  .cards { grid-template-columns: 1fr; }
  .tile strong { font-size: 1.3rem; }
}
.title-input, .title-text { margin-bottom: .75rem; }
.btn-danger:hover { background: var(--danger); filter: brightness(1.1); }
.btn-success:hover { background: var(--ok); filter: brightness(1.1); }

.nav-head { display: flex; align-items: center; gap: .65rem; padding: .25rem .5rem 1rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
.nav-head .brand-mark { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); }
.nav-head strong { display: block; font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-head > div > span { display: block; font-size: .76rem; color: var(--muted); }
.nav-head > div { min-width: 0; }
.crumbs { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); margin-bottom: .25rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs .icon { width: .9em; height: .9em; }
.board-meta { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-top: .45rem; font-size: .84rem; color: var(--muted); }
.board-meta .meta { gap: .35rem; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); gap: 2px; }
.seg-btn { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .86rem; font-weight: 500; padding: .35rem .75rem; min-height: 32px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed=true] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); border: 1px solid var(--line); }
.seg-n { font-size: .72rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tool-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 .2rem; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.column-done .col-dot { background: var(--ok-solid); }
.has-pending .col-dot { background: var(--accent-deco); }
.col-head h2 .count { margin-left: 0; }
.card-top { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.card-top:empty { display: none; }
.pill .icon { width: 11px; height: 11px; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.card-meta .spacer { flex: 1; }
.card-meta > .avatar { margin-left: auto; }
.client-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-line); }
.h-page { font-size: 1.75rem; letter-spacing: -.015em; }
.project-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.project-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--pc, var(--accent-deco)); }
.task-row .dot { width: 8px; height: 8px; }
@media (min-width: 761px) { .topbar .brand > * { visibility: hidden; } }
.board-title-main { min-width: 0; border-left: 3px solid var(--pc, var(--accent-deco)); padding-left: .9rem; }
@media (max-width: 760px) {
  .nav-head, .tool-sep { display: none; }
  .board-title-main { padding-left: .7rem; }
}
.toast .icon-btn:hover { background: rgba(127, 127, 127, .25); color: inherit; }
