/* VOLA Task — responsive styles (phone first adjustments at the bottom) */
:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e9ecf1;
  --line: #e2e5ea;
  --line-2: #d3d8df;
  --text: #1a1d21;
  --text-2: #464c55;
  --muted: #6b7280;
  --accent: #2a78d6;
  --accent-2: #1c5cab;
  --accent-soft: #e6f0fc;
  --good: #13865c;
  --good-soft: #e3f4ec;
  --bad: #c9302f;
  --bad-soft: #fdeceb;
  --warn: #a86b00;
  --warn-soft: #fdf3dc;
  --sun: #f5a524;
  --sun-soft: #fff4dd;
  --track: #e8ebf0;
  --series-1: #2a78d6;
  --heat-0: #ebedf0;
  --heat-1: #b7d3f6;
  --heat-2: #6da7ec;
  --heat-3: #2a78d6;
  --heat-4: #184f95;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 12px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .18);
  --r: 10px;
  --r-sm: 7px;
  --sidebar: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, "Segoe UI", sans-serif;
  --tl-left: 260px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111316;
    --surface: #1a1d21;
    --surface-2: #22262b;
    --surface-3: #2a2f35;
    --line: #2d3238;
    --line-2: #3a4048;
    --text: #eceef1;
    --text-2: #c4c9d0;
    --muted: #949ca7;
    --accent: #4a92ea;
    --accent-2: #86b6ef;
    --accent-soft: #1b2c42;
    --good: #2fb37f;
    --good-soft: #15302a;
    --bad: #ef6b6a;
    --bad-soft: #3a1d1e;
    --warn: #e0a73a;
    --warn-soft: #3a2e14;
    --sun: #f5b545;
    --sun-soft: #3a2f17;
    --track: #2d3238;
    --series-1: #3987e5;
    --heat-0: #262a30;
    --heat-1: #184f95;
    --heat-2: #256abf;
    --heat-3: #3987e5;
    --heat-4: #86b6ef;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111316; --surface: #1a1d21; --surface-2: #22262b; --surface-3: #2a2f35; --line: #2d3238; --line-2: #3a4048;
  --text: #eceef1; --text-2: #c4c9d0; --muted: #949ca7; --accent: #4a92ea; --accent-2: #86b6ef; --accent-soft: #1b2c42;
  --good: #2fb37f; --good-soft: #15302a; --bad: #ef6b6a; --bad-soft: #3a1d1e; --warn: #e0a73a; --warn-soft: #3a2e14;
  --sun: #f5b545; --sun-soft: #3a2f17; --track: #2d3238; --series-1: #3987e5;
  --heat-0: #262a30; --heat-1: #184f95; --heat-2: #256abf; --heat-3: #3987e5; --heat-4: #86b6ef;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: .01em; }
h2 { font-size: 15px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
textarea { resize: vertical; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.bad { color: var(--bad); }
.good { color: var(--good); }
.warn-text { color: var(--warn); }
.strike { text-decoration: line-through; color: var(--muted); }
kbd { font: 11px/1 var(--font); padding: 2px 5px; border-radius: 4px; background: rgba(255, 255, 255, .22); margin-left: auto; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 600; margin-left: 6px; vertical-align: middle; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--surface-2); font-weight: 600; white-space: nowrap; text-decoration: none !important; color: var(--text); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.icon-btn.subtle { width: 28px; height: 28px; color: var(--muted); }
.icon-btn.add { color: var(--accent); background: var(--accent-soft); width: 30px; height: 30px; }
.link-btn { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 600; font-size: inherit; }
.link { font-size: 13px; font-weight: 600; }
.field-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; max-width: 100%; }
.field-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.field-btn.set { color: var(--text); }
.field-btn.danger { color: var(--bad); border-color: var(--bad); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; margin-bottom: 14px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; color: var(--muted); font-size: 13px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg.sm { margin: 0; }
.seg.sm button { padding: 4px 10px; font-size: 12px; }
.check-line { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 4px 0 12px; }

/* boot / auth */
.boot { min-height: 100vh; display: grid; place-items: center; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 800; font-size: 17px; flex: none; }
.boot .logo { width: 56px; height: 56px; font-size: 30px; border-radius: 16px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 30px 28px; }
.auth-card h1 { margin: 18px 0 14px; font-size: 20px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.form { display: grid; gap: 14px; }
.lbl { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.lbl input, .lbl select, .lbl textarea { font-weight: 400; color: var(--text); width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* shell */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; z-index: 40; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; font-weight: 800; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-btn { margin-bottom: 12px; }
.nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; border: 0; background: none; width: 100%; text-align: left; font-size: 14px; }
.nav-item:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav-item.on { background: var(--accent-soft); color: var(--accent); }
.nav-count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--sun); color: #3a2700; border-radius: 10px; padding: 1px 7px; }
.nav-count.hot { background: var(--bad); color: #fff; }
.nav-section { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 4px 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.nav-projects { display: grid; gap: 1px; }
.nav-proj { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; color: var(--text-2); font-size: 13px; }
.nav-proj span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-proj:hover { background: var(--surface-2); text-decoration: none; }
.nav-proj.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 6px; }
.me-link { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; flex: 1; min-width: 0; color: var(--text); }
.me-link:hover { background: var(--surface-2); text-decoration: none; }
.me-link span { display: grid; min-width: 0; }
.me-link b, .me-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-link small { color: var(--muted); font-size: 11px; }
.main-wrap { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { display: none; }
.bottomnav, .fab, .drawer-backdrop { display: none; }
#main { outline: none; }
.page { max-width: 1180px; margin: 0 auto; padding: 26px 28px 80px; }
body.wide .page { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 2px; }

/* cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.col-main, .col-side { min-width: 0; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.profile .kpi { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi-value small { font-size: 16px; color: var(--muted); font-weight: 600; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.tone-bad .kpi-value { color: var(--bad); }
.kpi-ring { display: flex; align-items: center; gap: 12px; }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring-label { position: relative; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mini-kpis div { display: grid; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.mini-kpis span { font-size: 11px; font-weight: 600; }
.mini-kpis b { font-size: 20px; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty-icon { width: 54px; height: 54px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--accent); margin-bottom: 10px; }
.empty-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.empty-sub { font-size: 13px; margin-bottom: 12px; }
.empty-mini { color: var(--muted); font-size: 13px; padding: 8px 0; }
.empty-line { color: var(--muted); font-size: 12px; padding: 6px 12px 6px 40px; }
.section-label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 20px 0 8px; display: flex; gap: 8px; align-items: center; }

/* avatars, chips, pills */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; line-height: 1; letter-spacing: -.02em; overflow: hidden; white-space: nowrap; }
.avatar.empty { background: var(--surface-3); color: var(--muted); border: 1px dashed var(--line-2); }
.avatar.ring { box-shadow: 0 0 0 2px var(--surface); }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -6px; }
.more-av { font-size: 12px; color: var(--muted); margin-left: 6px; align-self: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip.muted { color: var(--muted); }
.chip:hover { text-decoration: none; color: var(--text); }
.pill { border: 0; color: #fff; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 10px; white-space: nowrap; min-width: 72px; }
.pill.big { padding: 6px 14px; font-size: 13px; }
.pill:hover { filter: brightness(1.08); }
.prio { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; flex: none; }
.prio-0 { color: var(--muted); } .prio-1 { color: #6b7280; } .prio-2 { color: var(--accent); } .prio-3 { color: #d9591f; } .prio-4 { color: var(--bad); }
.prio-4 .ic { fill: currentColor; }
.due { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.due.overdue { color: var(--bad); font-weight: 700; }
.due.due-today { color: var(--warn); font-weight: 700; }
.due.due-soon { color: var(--text-2); }
.meta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.status-dot { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--c); }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.reason { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.reason.bad { background: var(--bad-soft); color: var(--bad); }
.reason.warn { background: var(--warn-soft); color: var(--warn); }
.tag-done { color: var(--good); font-weight: 700; }
.tag-status { color: var(--c); font-weight: 700; }
.quote { color: var(--muted); }

/* progress */
.pbar { position: relative; display: inline-block; width: 100%; height: 8px; border-radius: 6px; background: var(--track); overflow: hidden; vertical-align: middle; }
.pbar.thin { height: 5px; }
.pbar-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 6px; transition: width .3s; }
.pbar-label { font-size: 12px; font-weight: 700; margin-left: 6px; }
.stack { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.stack-seg { min-width: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }

/* task rows */
.tlist { display: grid; }
.trow { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid var(--line); min-width: 0; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--surface-2); }
.trow.compact { padding: 7px 4px; }
.trow-main { flex: 1; min-width: 0; }
.trow-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.is-done .trow-title { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.trow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; min-width: 0; }
.mini-prog .pbar { width: 40px; }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); display: inline-grid; place-items: center; color: transparent; flex: none; padding: 0; transition: all .15s; }
.check:hover { border-color: var(--good); color: var(--good); }
.is-done > .check, .is-done .check, .check.on { background: var(--good); border-color: var(--good); color: #fff; }
.check.sm { width: 18px; height: 18px; }
.check.big { width: 30px; height: 30px; }
.late-note { font-size: 12px; color: var(--warn); padding: 0 8px 8px 40px; margin-top: -4px; }

/* groups (my tasks) */
.group { margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; }
.group-head { display: flex; align-items: center; justify-content: space-between; }
.group-toggle { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 4px; flex: 1; text-align: left; }
.group-toggle .ic { transition: transform .15s; color: var(--muted); }
.group.collapsed .group-toggle .ic { transform: rotate(-90deg); }
.group.collapsed .tlist { display: none; }
.group-toggle h2.bad { color: var(--bad); }

/* home */
.mtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.mtable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mtable td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mtable tr:last-child td { border-bottom: 0; }
.mtable tr[data-href] { cursor: pointer; }
.mtable tbody tr:hover { background: var(--surface-2); }
.mtable .num { text-align: right; font-variant-numeric: tabular-nums; }
.mtable tr.inactive { opacity: .5; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 140px; }
.who:hover { text-decoration: none; }
.who span { display: grid; line-height: 1.3; }
.who small { color: var(--muted); font-size: 11px; }
.today-cell { min-width: 110px; }
.today-cell .pbar { width: 60px; margin-right: 6px; }
.th-sort { border: 0; background: none; color: inherit; font-weight: 600; padding: 0; font-size: 12px; }
.th-sort.on { color: var(--accent); }
.th-sort.on::after { content: " ↓"; }
.foot-note { margin: 10px 0 0; }
.plist { display: grid; gap: 4px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; color: var(--text); }
.prow:hover { background: var(--surface-2); text-decoration: none; }
.picon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font-size: 18px; flex: none; }
.picon.lg { width: 46px; height: 46px; font-size: 24px; border-radius: 12px; }
.prow-main { flex: 1; min-width: 0; display: grid; }
.prow-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-meta { font-size: 12px; color: var(--muted); }
.prow-prog { display: flex; align-items: center; gap: 8px; width: 150px; flex: none; font-size: 13px; }
.feed { display: grid; gap: 12px; }
.feed-row { display: flex; gap: 10px; }
.feed-body { min-width: 0; }
.feed-text { font-size: 13px; line-height: 1.5; word-break: break-word; }
.feed-time { font-size: 11px; color: var(--muted); }

/* my day */
.hero-sun { background: linear-gradient(135deg, var(--sun-soft), var(--surface)); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; align-items: center; }
.hero-left { display: flex; align-items: center; gap: 16px; }
.inline-add { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--accent); }
.inline-add input { border: 0; flex: 1; padding: 8px 0; background: transparent; box-shadow: none !important; }
.all-done { text-align: center; padding: 14px; font-weight: 700; color: var(--good); background: var(--good-soft); border-radius: 8px; margin-top: 8px; }
.moods { display: flex; gap: 8px; margin-bottom: 10px; }
.mood { width: 42px; height: 42px; border-radius: 50%; border: 2px solid transparent; background: var(--surface-2); font-size: 22px; filter: grayscale(.6); opacity: .7; }
.mood.on { border-color: var(--sun); filter: none; opacity: 1; background: var(--sun-soft); }
.note { min-height: 80px; }
.sugg { display: grid; gap: 2px; }
.sugg-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 4px; border-radius: 8px; }
.sugg-row:hover { background: var(--surface-2); }
.sugg-main { flex: 1; min-width: 0; cursor: pointer; }
.sugg-title { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ritual { min-height: 360px; display: grid; }
.ritual-intro { text-align: center; padding: 28px 24px; display: grid; gap: 8px; align-content: center; }
.ritual-intro p { margin: 0; }
.ritual-sun { font-size: 52px; line-height: 1; }
.ritual-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.ritual-list { text-align: left; max-height: 220px; overflow: auto; background: var(--surface-2); border-radius: 10px; padding: 10px 14px; display: grid; gap: 4px; margin-top: 6px; }
.ritual-step { padding: 22px 24px; display: grid; gap: 14px; align-content: start; }
.ritual-count { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ritual-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.ritual-bar span { display: block; height: 100%; background: var(--sun); transition: width .25s; }
.ritual-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 8px; justify-items: start; background: var(--surface-2); }
.ritual-title { font-size: 18px; font-weight: 700; }
.ritual-q { text-align: center; font-weight: 700; margin-top: 4px; }
.ritual-choices { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.choice { height: 52px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 14px; }
.choice.yes { background: var(--sun); border-color: var(--sun); color: #3a2700; }
.choice:hover { filter: brightness(.97); }
.ritual-picked { text-align: center; font-size: 12px; color: var(--muted); min-height: 18px; }
.ritual-step .link-btn { justify-self: center; font-size: 13px; color: var(--muted); }

/* projects */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; color: var(--text); box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.pcard:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.pcard.archived { opacity: .6; }
.pcard-top { display: flex; gap: 12px; align-items: center; }
.pcard-name { font-weight: 700; font-size: 15px; }
.pcard-prog, .proj-prog { display: flex; align-items: center; gap: 10px; }
.pcard-stats { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.proj-head { align-items: center; }
.proj-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.proj-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proj-prog { width: 180px; font-size: 13px; }
.proj-desc { color: var(--text-2); margin: -8px 0 16px; white-space: pre-wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 9px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { margin-left: 2px; height: 18px; min-width: 18px; font-size: 11px; }
.card .tabs { margin: -4px -4px 8px; }

/* project table (monday style) */
.ptable { display: grid; gap: 14px; }
.ptable-head, .prow-t { display: grid; grid-template-columns: minmax(220px, 1fr) 150px 110px 80px 110px 120px; align-items: center; gap: 0; }
.ptable-head { font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 0 0 10px; }
.ptable-head span { padding: 0 8px; }
.pgroup { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--g); border-radius: var(--r); overflow: hidden; }
.pgroup-head { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 10px 12px; width: 100%; text-align: left; color: var(--g); }
.pgroup-head b { font-size: 14px; }
.prow-t { border-top: 1px solid var(--line); min-height: 42px; cursor: pointer; }
.prow-t:hover { background: var(--surface-2); }
.prow-t > span { padding: 4px 8px; min-width: 0; display: flex; align-items: center; gap: 6px; border-left: 1px solid var(--line); height: 100%; }
.prow-t > span:first-child { border-left: 0; padding-left: 12px; }
.prow-t .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.prow-t.is-done .ttl { text-decoration: line-through; color: var(--muted); }
.c-status { justify-content: center; }
.c-status .pill { width: 100%; border-radius: 0; height: 100%; min-height: 34px; }
.c-prog .pbar { flex: 1; }
.c-prog small { width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.cell-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px; border-radius: 6px; min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.cell-btn:hover { background: var(--surface-3); }
.prow-add { display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-top: 1px solid var(--line); color: var(--muted); }
.prow-add input { border: 0; flex: 1; background: transparent; padding: 7px 0; box-shadow: none !important; }

/* board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.bcol { background: var(--surface-2); border-radius: var(--r); padding: 8px; display: grid; gap: 8px; min-height: 120px; }
.bcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-bottom: 3px solid var(--g); padding-bottom: 8px; }
.bcol-head .count { margin-left: auto; }
.bcol-body { display: grid; gap: 8px; min-height: 40px; border-radius: 8px; transition: background .12s; align-content: start; }
.bcol-body.drop-hover { background: var(--accent-soft); }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; box-shadow: var(--shadow-sm); cursor: grab; display: grid; gap: 6px; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bcard:hover { border-color: var(--line-2); }
.bcard.overdue { border-left: 3px solid var(--bad); }
.bcard-title { font-weight: 600; }
.bcard-foot { display: flex; align-items: center; gap: 10px; }
.bcard.placeholder { opacity: .35; }
.bcard.lift { box-shadow: var(--shadow-lg); transform: scale(1.02); }
.bghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; box-shadow: var(--shadow-lg); opacity: .95; }
.bcol-add input { width: 100%; border: 1px dashed var(--line-2); background: transparent; }

/* calendar */
.cal-page { padding-top: 18px; }
.cal-toolbar, .rv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-nav, .cal-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-title { font-size: 19px; margin-left: 8px; display: flex; align-items: center; gap: 6px; }
.cal-summary { font-size: 13px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.placing-bar { position: sticky; top: 0; z-index: 20; background: var(--sun); color: #3a2700; font-weight: 700; padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-layout { display: flex; gap: 14px; align-items: stretch; }
.cal-inbox { width: 250px; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; max-height: calc(100vh - 150px); overflow-y: auto; position: sticky; top: 12px; align-self: flex-start; }
.cal-inbox.drop-hover { background: var(--accent-soft); }
.cal-inbox-head { display: flex; align-items: center; justify-content: space-between; }
.cal-inbox-hint { margin: 4px 0 8px; }
.inbox-group { margin-bottom: 10px; }
.inbox-label { font-size: 11px; font-weight: 700; color: var(--muted); margin: 6px 0 4px; }
.inbox-label.bad { color: var(--bad); }
.inbox-item { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); border-left: 3px solid var(--c); margin-bottom: 6px; cursor: grab; background: var(--surface); font-size: 13px; user-select: none; }
.inbox-item:hover { box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.inbox-title { font-weight: 600; }
.inbox-meta { display: flex; gap: 8px; font-size: 11px; }
.cal-grid { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.cal-head, .cal-allday { display: grid; grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cal-gutter { font-size: 11px; display: flex; align-items: center; justify-content: center; }
.cal-dayhead { padding: 6px 4px; text-align: center; border-left: 1px solid var(--line); display: grid; justify-items: center; gap: 2px; }
.cal-dayhead .link-btn { display: grid; justify-items: center; color: var(--text); line-height: 1.2; }
.cal-dayhead .dw { font-size: 11px; color: var(--muted); font-weight: 600; }
.cal-dayhead .dn { font-size: 20px; font-weight: 700; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.cal-dayhead.today .dn { background: var(--accent); color: #fff; }
.cal-dayhead.past .dn { color: var(--muted); }
.cal-dayhead.weekend .dw { color: var(--bad); }
.day-score { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.day-score.good { background: var(--good-soft); color: var(--good); }
.day-score.bad { background: var(--bad-soft); color: var(--bad); }
.cal-allday-cell { border-left: 1px solid var(--line); padding: 4px; display: grid; gap: 3px; align-content: start; min-height: 34px; max-height: 110px; overflow-y: auto; }
.cal-allday-cell.drop-hover, .month-cell.drop-hover { background: var(--accent-soft); }
.cal-chip { font-size: 12px; padding: 2px 6px; border-radius: 5px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; display: flex; align-items: center; gap: 3px; user-select: none; }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; }
.cal-chip.done { opacity: .6; text-decoration: line-through; }
.cal-chip.done .ic { color: var(--good); }
.cal-chip.missed { border-left-color: var(--bad); background: var(--bad-soft); }
.cal-scroll { overflow-y: auto; height: calc(100vh - 250px); min-height: 360px; position: relative; overscroll-behavior: contain; }
.cal-body { display: grid; grid-template-columns: 52px 1fr; position: relative; }
.cal-gutter.hours { position: relative; display: block; }
.cal-gutter.hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.cal-cols { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); position: relative; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.cal-col.past { background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--surface-2) 60%, transparent) 8px 9px); }
.cal-col.today { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.cal-hour { position: absolute; left: 0; right: 0; height: 48px; border-top: 1px solid var(--line); }
.cal-hour::after { content: ""; position: absolute; left: 0; right: 0; top: 24px; border-top: 1px dashed color-mix(in srgb, var(--line) 60%, transparent); }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: var(--bad); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.cal-block { position: absolute; z-index: 2; border-radius: 6px; padding: 3px 7px; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--c) 20%, var(--surface)); border-left: 3px solid var(--c); font-size: 12px; box-shadow: var(--shadow-sm); user-select: none; }
.cal-block:hover { box-shadow: var(--shadow); z-index: 4; }
.cal-block.done { opacity: .6; }
.cal-block.done .cb-title { text-decoration: line-through; }
.cal-block.done .ic { color: var(--good); }
.cal-block.missed { border-left-color: var(--bad); background: var(--bad-soft); }
.cal-block.missed::after { content: "未達"; position: absolute; right: 4px; top: 3px; font-size: 10px; font-weight: 700; color: var(--bad); }
.cal-block.short { padding-top: 0; padding-bottom: 0; }
.cb-title { font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 3px; }
.cb-time { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.cal-block.drag-src, .inbox-item.drag-src, .cal-chip.drag-src { opacity: .4; }
.cal-ghost { position: absolute; left: 2px; right: 2px; z-index: 5; border-radius: 6px; background: color-mix(in srgb, var(--accent) 25%, transparent); border: 2px dashed var(--accent); font-size: 12px; font-weight: 700; padding: 2px 6px; overflow: hidden; pointer-events: none; color: var(--text); }
.cal-month { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.month-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); padding: 6px 0; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(108px, auto); }
.month-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: grid; gap: 3px; align-content: start; min-width: 0; }
.month-cell:nth-child(7n) { border-right: 0; }
.month-cell.out { background: var(--surface-2); }
.month-cell.out .month-date .link-btn { color: var(--muted); }
.month-cell.today .month-date .link-btn { background: var(--accent); color: #fff; }
.month-date { display: flex; align-items: center; justify-content: space-between; }
.month-date .link-btn { color: var(--text); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.link-btn.more { font-size: 11px; text-align: left; }

/* timeline */
.tl-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tl-toolbar .check-line { margin: 0; }
.tl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; max-height: calc(100vh - 210px); position: relative; overscroll-behavior: contain; }
.tl-inner { position: relative; min-width: 100%; }
.tl-header { position: sticky; top: 0; z-index: 6; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
.tl-left { position: sticky; left: 0; z-index: 4; width: var(--tl-left); flex: none; background: var(--surface); border-right: 1px solid var(--line); }
.tl-corner { z-index: 7; display: flex; align-items: flex-end; padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tl-scale { position: relative; height: 50px; flex: none; }
.tl-months { position: relative; height: 22px; }
.tl-months span { position: absolute; top: 4px; font-size: 12px; font-weight: 700; padding-left: 6px; border-left: 1px solid var(--line-2); white-space: nowrap; }
.tl-ticks { position: relative; height: 28px; }
.tl-ticks span { position: absolute; top: 2px; font-size: 11px; color: var(--text-2); text-align: center; line-height: 1.1; display: grid; white-space: nowrap; }
.tl-ticks span small { font-size: 9px; color: var(--muted); }
.tl-ticks span.we { color: var(--bad); }
.tl-ticks span.today { color: #fff; background: var(--accent); border-radius: 5px; }
.tl-ticks span.today small { color: #fff; }
.tl-rows { position: relative; }
.tl-bg { position: absolute; top: 0; bottom: 0; left: var(--tl-left); pointer-events: none; z-index: 0; }
.tl-we { position: absolute; top: 0; bottom: 0; background: var(--surface-2); }
.tl-mline { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); opacity: .7; }
.tl-row { display: flex; height: 38px; border-bottom: 1px solid var(--line); position: relative; }
.tl-row:hover .tl-left { background: var(--surface-2); }
.tl-group { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.tl-group .tl-left { background: var(--surface-2); border: 0; border-right: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 10px; text-align: left; font-size: 13px; min-width: 0; }
.tl-group .tl-left b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-group .tl-left small { color: var(--muted); font-size: 11px; }
.tl-group .count { margin-left: auto; }
.tl-name { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 26px; cursor: pointer; font-size: 13px; min-width: 0; }
.tl-tname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; }
.tl-dot.done { background: var(--good); }
.tl-track { position: relative; flex: none; width: calc(100% - var(--tl-left)); z-index: 1; }
.tl-bar { position: absolute; top: 7px; height: 24px; border-radius: 6px; background: color-mix(in srgb, var(--c) 30%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); overflow: hidden; cursor: pointer; display: flex; align-items: center; user-select: none; }
.tl-bar:hover { box-shadow: var(--shadow); }
.tl-prog { position: absolute; inset: 0 auto 0 0; background: var(--c); opacity: .75; }
.tl-bar.done { opacity: .55; }
.tl-bar.overdue { border: 2px solid var(--bad); }
.tl-label { position: relative; font-size: 12px; font-weight: 700; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); text-shadow: 0 0 3px var(--surface), 0 0 3px var(--surface); }
.tl-outlabel { position: absolute; top: 10px; font-size: 12px; white-space: nowrap; color: var(--text-2); pointer-events: none; }
.tl-handle { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.tl-handle.l { left: 0; } .tl-handle.r { right: 0; }
.tl-span { position: absolute; top: 13px; height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, transparent); overflow: hidden; }
.tl-span span { display: block; height: 100%; background: var(--c); border-radius: 6px; }
.tl-empty { padding: 30px; text-align: center; color: var(--muted); }

/* org & member */
.org-section { margin-bottom: 22px; }
.org-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; color: var(--text-2); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; color: var(--text); display: grid; gap: 12px; box-shadow: var(--shadow-sm); transition: box-shadow .15s; }
.mcard:hover { text-decoration: none; box-shadow: var(--shadow); }
.mgrid.exec .mcard { border-top: 3px solid var(--sun); }
.mcard-top { display: flex; align-items: center; gap: 12px; position: relative; }
.mcard-id { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.mcard-id b { font-size: 15px; }
.mtitle { font-size: 13px; color: var(--accent); font-weight: 700; }
.online { position: absolute; left: 34px; top: 34px; width: 12px; height: 12px; border-radius: 50%; background: var(--good); border: 2px solid var(--surface); }
.online-text { font-size: 12px; color: var(--good); font-weight: 600; margin-left: 10px; vertical-align: middle; }
.mcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.mcard-stats div { background: var(--surface-2); border-radius: 8px; padding: 6px 4px; display: grid; }
.mcard-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mcard-stats span { font-size: 11px; color: var(--muted); }
.mcard-today { display: flex; align-items: center; gap: 8px; }
.mcard-today .pbar { flex: 1; }
.profile-main { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 200px; }
.profile-id h1 { font-size: 24px; }
.profile-title { font-weight: 700; color: var(--accent); margin: 2px 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-bio { margin: 0 0 6px; color: var(--text-2); white-space: pre-wrap; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile .grid-kpi { margin-bottom: 0; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.plan-days { display: grid; gap: 4px; }
.plan-day { display: flex; align-items: center; gap: 10px; font-size: 12px; padding: 3px 0; }
.plan-day.today { font-weight: 700; }
.pd-date { width: 70px; flex: none; }
.pd-bar { flex: 1; }
.pd-n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-none { flex: 1; }
.note-row { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.note-row:last-child { border-bottom: 0; }
.rank-list { display: grid; gap: 2px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; color: var(--text); font-size: 13px; }
.rank-row:hover { background: var(--surface-2); text-decoration: none; }
.rank-name { flex: 1; display: grid; line-height: 1.3; min-width: 0; }
.rank-name small { color: var(--muted); font-size: 11px; }
.rank-n { white-space: nowrap; font-size: 12px; }

/* charts */
.bars { display: flex; align-items: stretch; gap: 4px; padding-top: 18px; }
.bar-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bar-track { flex: 1; display: flex; align-items: flex-end; }
.bar { width: 100%; max-width: 34px; margin: 0 auto; border-radius: 4px 4px 0 0; min-height: 2px; position: relative; transition: height .3s; }
.bar-val { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--text-2); }
.bar-label { font-size: 10px; color: var(--muted); text-align: center; margin-top: 4px; white-space: nowrap; overflow: hidden; height: 15px; }
.bar-label.strong { color: var(--text); font-weight: 700; }
.bar-col:hover .bar { filter: brightness(1.12); }
.heatmap-wrap { overflow-x: auto; padding-bottom: 4px; }
.hm-months { position: relative; height: 16px; font-size: 10px; color: var(--muted); }
.hm-months span { position: absolute; }
.heatmap { display: flex; gap: 3px; }
.hm-col { display: grid; gap: 3px; }
.hm-cell { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.hm-cell.blank { background: transparent; }
.hm-legend { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); margin-top: 8px; justify-content: flex-end; }

/* review */
.rv-toolbar h2.cal-title { font-size: 18px; }

/* settings */
.settings .card { max-width: 860px; }
.color-pick, .icon-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.color-pick input, .icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.color-pick span { display: block; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.color-pick input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.icon-pick span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--surface-2); font-size: 18px; cursor: pointer; border: 2px solid transparent; }
.icon-pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.color-pick label, .icon-pick label { position: relative; }
.teams { display: grid; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 8px; }
.team-row input { flex: 1; }
.team-add { display: flex; gap: 8px; margin-top: 4px; }
.team-add input { flex: 1; }
.invites { display: grid; gap: 6px; }
.invite-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.invite-row > span:first-child { flex: 1; }
.invite-row.invalid { opacity: .55; }
.link-box { display: flex; gap: 8px; }
.link-box input { flex: 1; font-size: 13px; }
.danger-zone { display: flex; gap: 8px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; flex-wrap: wrap; }

/* panel */
#panel { display: none; }
#panel.open { display: block; }
.panel-backdrop { position: fixed; inset: 0; background: rgba(10, 14, 20, .18); z-index: 60; }
.panel-card { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 61; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: .5; } }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.panel-crumb { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-body { flex: 1; overflow-y: auto; padding: 18px 22px 40px; overscroll-behavior: contain; }
.panel-title-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.title-edit { font-size: 20px; font-weight: 700; border: 1px solid transparent; padding: 2px 6px; resize: none; overflow: hidden; line-height: 1.4; background: transparent; }
.title-edit:hover { border-color: var(--line); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.field { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.field.wide { grid-column: 1 / -1; justify-items: stretch; }
.flabel { font-size: 12px; font-weight: 600; color: var(--muted); }
.sched-edit, .prog-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sched-edit input { flex: 1; min-width: 180px; }
.prog-edit input[type=range] { flex: 1; accent-color: var(--accent); }
.prog-edit .pbar { flex: 1; }
.desc-edit { min-height: 90px; resize: none; overflow: hidden; }
.subtasks { display: grid; gap: 2px; }
.subtask { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 6px; }
.subtask:hover { background: var(--surface-2); }
.subtask-title { flex: 1; min-width: 0; word-break: break-word; }
.subtask.is-done .subtask-title { text-decoration: line-through; color: var(--muted); }
.subtask-add { display: flex; align-items: center; gap: 10px; padding: 4px; color: var(--muted); }
.subtask-add input { flex: 1; border: 0; background: transparent; padding: 6px 0; box-shadow: none !important; }
.comments { display: grid; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment-body { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.comment-head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.comment-head .link-btn { margin-left: auto; font-size: 11px; color: var(--muted); }
.comment-text { white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.comment-add { display: flex; gap: 10px; align-items: flex-end; }
.comment-add textarea { flex: 1; resize: none; min-height: 38px; }
.history { margin-top: 20px; font-size: 12px; }
.history summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.hist-row { padding: 4px 0; }
.panel-foot { margin-top: 24px; font-size: 12px; }

/* popover, modal, toasts */
#pop .pop-backdrop { position: fixed; inset: 0; z-index: 90; }
.pop-card { position: fixed; z-index: 91; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 200px; max-width: calc(100vw - 16px); max-height: 70vh; overflow-y: auto; padding: 6px; }
.menu-list { display: grid; }
.menu-item { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 7px; text-align: left; width: 100%; font-size: 14px; }
.menu-item:hover, .menu-item:focus { background: var(--surface-2); outline: none; }
.menu-item.active { font-weight: 700; }
.menu-item span { display: grid; line-height: 1.3; }
.menu-item small { font-size: 11px; color: var(--muted); }
.menu-item .right { margin-left: auto; }
.menu-check { margin-left: auto; color: var(--accent); }
.menu-icon { width: 20px; text-align: center; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu-title { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 10px; display: flex; gap: 6px; align-items: center; }
.menu-search { padding: 4px; }
.menu-search input, .menu-foot input { width: 100%; }
.menu-foot { border-top: 1px solid var(--line); padding: 8px 4px 2px; margin-top: 4px; }
.notif-list { display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 8px; border-radius: 8px; font-size: 13px; }
.notif.new { background: var(--accent-soft); }
#modal { display: none; }
#modal.open { display: grid; position: fixed; inset: 0; z-index: 80; place-items: center; padding: 16px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 14, 20, .42); }
.modal-card { position: relative; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; animation: pop .16s ease-out; }
.modal-card.wide { max-width: 760px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 0; }
.modal-head h2 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 16px 20px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
.confirm-msg { white-space: pre-wrap; margin: 6px 0 0; font-size: 15px; }
.qa-input { width: 100%; font-size: 17px; padding: 12px 14px; }
.qa-hint { font-size: 12px; color: var(--muted); margin-top: -6px; }
.qa-fields { display: flex; flex-wrap: wrap; gap: 8px; }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #23272e; color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastin .2s ease-out; transition: opacity .3s, transform .3s; }
.toast-success { background: #13865c; }
.toast-error { background: #c9302f; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

.show-mobile { display: none !important; }

/* ------------------------------------------------------------ tablet */
@media (max-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .ptable-head, .prow-t { grid-template-columns: minmax(180px, 1fr) 120px 100px 64px 96px 100px; }
  .hide-sm { display: none; }
}

/* ------------------------------------------------------------ phone */
@media (max-width: 760px) {
  :root { --tl-left: 132px; }
  body { font-size: 15px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: min(300px, 86vw); box-shadow: var(--shadow-lg); padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  body.drawer-open .sidebar { transform: none; }
  body.drawer-open .drawer-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 14, 20, .4); z-index: 39; }
  .sidebar .add-btn kbd { display: none; }
  .main-wrap { margin-left: 0; padding-bottom: calc(70px + var(--safe-b)); }
  .topbar { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px; }
  .topbar-title { flex: 1; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bell { position: relative; }
  .bell.has::after { content: ""; position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
  .top-avatar { display: inline-flex; padding: 2px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
  .bn-item { display: grid; justify-items: center; gap: 1px; padding: 7px 0 6px; font-size: 10px; font-weight: 600; color: var(--muted); border: 0; background: none; position: relative; }
  .bn-item:hover { text-decoration: none; }
  .bn-item.on { color: var(--accent); }
  .bn-dot { position: absolute; top: 3px; left: calc(50% + 6px); background: var(--sun); color: #3a2700; font-size: 10px; font-weight: 800; border-radius: 8px; padding: 0 5px; line-height: 15px; }
  .bn-dot.hot { background: var(--bad); color: #fff; }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(74px + var(--safe-b)); z-index: 36; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(42, 120, 214, .45); }
  body.panel-open .fab { display: none; }
  .page { padding: 14px 16px 30px; }
  .page-head { margin-bottom: 14px; align-items: flex-start; }
  .page-head h1 { font-size: 20px; }
  .card { padding: 14px; border-radius: 12px; }
  .grid-kpi { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 24px; }
  .row2 { grid-template-columns: 1fr; }
  .trow { padding: 10px 4px; }
  .trow-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .check { width: 26px; height: 26px; }
  .prow-prog { width: 96px; }
  .hero-sun { padding: 14px; }
  .hero-sun .btn { width: 100%; }
  .ritual-choices { grid-template-columns: 1fr; }
  .choice { height: 50px; }
  .show-mobile { display: inline-flex !important; }
  .hide-xs { display: none; }
  /* panel → full screen sheet */
  .panel-card { width: 100vw; animation: sheetin .2s ease-out; padding-top: env(safe-area-inset-top, 0px); }
  @keyframes sheetin { from { transform: translateY(40px); opacity: .4; } }
  .panel-body { padding: 14px 16px calc(40px + var(--safe-b)); }
  .fields { grid-template-columns: 1fr 1fr; gap: 10px; }
  .title-edit { font-size: 18px; }
  /* popovers become bottom sheets */
  .pop-card.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100% !important; max-width: none; border-radius: 16px 16px 0 0; padding: 10px 10px calc(14px + var(--safe-b)); max-height: 75vh; animation: sheetin .18s ease-out; }
  #pop.open .pop-backdrop { background: rgba(10, 14, 20, .35); }
  .menu-item { padding: 12px; font-size: 15px; }
  #modal.open { place-items: end center; padding: 0; }
  .modal-card { border-radius: 16px 16px 0 0; max-height: 92vh; padding-bottom: var(--safe-b); animation: sheetin .2s ease-out; }
  #toasts { bottom: calc(140px + var(--safe-b)); }
  /* project table → cards */
  .ptable-head { display: none; }
  .prow-t { grid-template-columns: 1fr auto; grid-template-areas: "title status" "meta meta"; padding: 8px 10px; gap: 6px; }
  .prow-t > span { border: 0; padding: 0; height: auto; }
  .prow-t > span:first-child { padding-left: 0; }
  .c-title { grid-area: title; }
  .c-status { grid-area: status; }
  .c-status .pill { border-radius: 6px; min-height: 0; height: auto; }
  .c-who, .c-prio, .c-due, .c-prog { grid-row: 2; }
  .prow-t .c-who { grid-column: 1; }
  .prow-t { grid-template-areas: none; grid-template-columns: auto auto auto 1fr auto; }
  .prow-t .c-title { grid-column: 1 / 5; grid-row: 1; }
  .prow-t .c-status { grid-column: 5; grid-row: 1; }
  .prow-t .c-who { grid-column: 1; grid-row: 2; }
  .prow-t .c-prio { grid-column: 2; grid-row: 2; }
  .prow-t .c-due { grid-column: 3; grid-row: 2; }
  .prow-t .c-prog { grid-column: 4 / 6; grid-row: 2; }
  .board { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 12px; }
  .bcol { scroll-snap-align: center; }
  /* calendar */
  .cal-layout { display: block; }
  .cal-inbox { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 70vh; z-index: 70; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg); transform: translateY(105%); transition: transform .2s; padding-bottom: calc(16px + var(--safe-b)); }
  body.inbox-open .cal-inbox { transform: none; }
  .cal-scroll { height: calc(100vh - 290px); }
  .cal-head, .cal-allday { grid-template-columns: 40px repeat(var(--days), minmax(0, 1fr)); }
  .cal-body { grid-template-columns: 40px 1fr; }
  .cal-gutter.hours span { font-size: 10px; right: 4px; }
  .cal-title { font-size: 16px; }
  .cal-toolbar { gap: 8px; }
  .month-grid { grid-auto-rows: minmax(72px, auto); }
  .month-cell { padding: 2px; }
  .month-cell .cal-chip { font-size: 10px; padding: 1px 3px; }
  .month-cell .day-score { display: none; }
  .tl { max-height: calc(100vh - 230px); }
  .tl-name { padding-left: 10px; }
  .tl-name .avatar { display: none; }
  .tl-group .tl-left small { display: none; }
  .proj-prog { width: 120px; }
  .proj-actions { width: 100%; }
  .mgrid { grid-template-columns: 1fr; }
  .profile-main { gap: 12px; }
  .profile-id h1 { font-size: 20px; }
  .seg { max-width: 100%; }
  #toasts { max-width: calc(100vw - 32px); }
}
@media (max-width: 380px) {
  .grid-kpi { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 21px; }
  .fields { grid-template-columns: 1fr; }
}
@media (hover: none) {
  .trow:hover, .sugg-row:hover, .prow-t:hover { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================ v2: BWP features */
.avatar.img { object-fit: cover; background: var(--surface-3); }
.avatar.group { background: var(--surface-3); color: var(--text-2); }
.brand-logo { height: 64px; width: auto; max-width: 220px; object-fit: contain; }
.brand-logo.sm { height: 30px; max-width: 120px; }
.logo.fallback { display: none; }
.logo.fallback.show { display: inline-grid; }
.brand .brand-logo.sm + .logo.fallback.show + .brand-name, .brand .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-brand { flex-direction: column; align-items: flex-start; gap: 8px; }
.auth-brand .logo.fallback.show { width: 56px; height: 56px; font-size: 30px; border-radius: 16px; }
.catch { display: grid; margin: 10px 0 4px; font-weight: 800; font-size: 19px; line-height: 1.45; letter-spacing: .04em; background: linear-gradient(90deg, var(--accent), #6250d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card.wide { max-width: 560px; }
.pos-pick { display: grid; gap: 8px; }
.pos { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 400; }
.pos:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pos span { display: grid; }
.pos small { color: var(--muted); }
.agree { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.terms-text { white-space: pre-wrap; line-height: 1.8; font-size: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.pad { padding: 12px; }
.prewrap { white-space: pre-wrap; word-break: break-word; }
.alert { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; color: var(--text); text-decoration: none !important; }
.alert.warn { background: var(--warn-soft); }
.alert.info { background: var(--accent-soft); }
.alert a { font-weight: 600; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input[type=search] { height: 34px; padding: 4px 10px; }
.filters .check-line { margin: 0; }

/* badges */
.credit { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: #9a6a00; background: #fff4d6; border-radius: 10px; padding: 1px 7px; white-space: nowrap; }
.credit .ic { fill: currentColor; }
.credit.big { font-size: 13px; padding: 3px 10px; }
.credit-inline { color: #9a6a00; font-weight: 800; }
.imp { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }
.imp-hi { background: var(--bad-soft); color: var(--bad); }
.imp-mid { background: var(--warn-soft); color: var(--warn); }
.gchip { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--text-2); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); white-space: nowrap; }
.achip { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.abadge { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.abadge.pending { background: var(--warn-soft); color: var(--warn); }
.abadge.review { background: #ede9fe; color: #6250d6; }
.abadge.ok { background: var(--good-soft); color: var(--good); }
.abadge.rejected { background: var(--surface-3); color: var(--muted); }
.like { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.like:hover { background: var(--surface-2); color: var(--text); }
.like.on { color: var(--accent); }
.like.on .ic { fill: color-mix(in srgb, var(--accent) 25%, transparent); }
.drive-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--good-soft); color: var(--good); text-decoration: none !important; word-break: break-all; }
.drive-link:hover { filter: brightness(.96); }
.link-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.check.pending { border-color: #6250d6; background: #ede9fe; color: #6250d6; }

/* panel workflow */
.badges-row { display: flex; gap: 6px; flex-wrap: wrap; margin: -8px 0 12px 42px; }
.badges-row:empty { display: none; }
.wf { border-radius: 12px; padding: 14px; margin-bottom: 16px; display: grid; gap: 10px; border: 1px solid var(--line); }
.wf-title { font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-pending { background: var(--warn-soft); border-color: transparent; }
.wf-review { background: #f3f0ff; border-color: #ddd6fe; }
.wf-ok { background: var(--good-soft); border-color: transparent; }
.wf-rejected { background: var(--surface-2); }
.wf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wf-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.wf-comment-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wf textarea { background: var(--surface); }
.report { display: flex; gap: 18px; flex-wrap: wrap; }
.report > div { display: grid; gap: 2px; }
.report-note { background: var(--surface); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; font-size: 13px; }
.report-btn { margin-bottom: 16px; height: 42px; }
.report-task { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 15px; }
.field-ro { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; color: var(--text); }
.num-in { width: 90px; }
.submit-box { display: grid; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 12px; }
.folder-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.time-chips { display: flex; gap: 6px; flex-wrap: wrap; font-weight: 400; }
.chip-btn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 16px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.chip-btn.on, .chip-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* feed */
.feed-page { max-width: 720px; }
.fcards { display: grid; gap: 14px; margin-bottom: 18px; }
.fcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.fcard.celebrate { border-color: #f5d27a; background: linear-gradient(180deg, #fffaf0, var(--surface) 60%); }
.fcard.kind-due_soon { border-left: 4px solid var(--warn); }
.fcard-head { display: flex; gap: 12px; padding: 14px 16px 8px; }
.fcard-who { flex: 1; min-width: 0; }
.fcard-text { font-size: 14px; line-height: 1.55; word-break: break-word; }
.fcard-task { margin: 4px 16px 6px; padding: 10px 12px; border-radius: 10px; border-left: 4px solid var(--c); background: var(--surface-2); cursor: pointer; }
.fcard-task:hover { background: var(--surface-3); }
.fcard-task-title { font-weight: 700; margin-bottom: 2px; }
.fcard-actions { display: flex; gap: 4px; padding: 2px 10px 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.fcard-comments { padding: 10px 16px 14px; background: var(--surface-2); display: grid; gap: 10px; }
.fcard-comments .comment-body { background: var(--surface); }
.fcard-comments input { flex: 1; }

/* messages */
.msg-page { max-width: 1180px; padding-bottom: 20px; }
.msg-layout { display: grid; grid-template-columns: 320px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; height: calc(100vh - 60px); min-height: 480px; }
.msg-list { border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.msg-list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.msg-list-head h1 { font-size: 18px; }
.conv { display: flex; gap: 10px; align-items: center; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--line); }
.conv:hover { background: var(--surface-2); text-decoration: none; }
.conv.on { background: var(--accent-soft); }
.conv-main { flex: 1; min-width: 0; display: grid; }
.conv-top { display: flex; justify-content: space-between; gap: 6px; }
.conv-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-last { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.thread-title { display: grid; line-height: 1.3; }
.thread-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.day-sep { text-align: center; font-size: 11px; color: var(--muted); }
.day-sep span { background: var(--surface-3); border-radius: 10px; padding: 2px 10px; }
.bubble-row { display: flex; gap: 8px; align-items: flex-end; max-width: 82%; }
.bubble-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble-wrap { display: grid; gap: 4px; min-width: 0; }
.bubble-row.mine .bubble-wrap { justify-items: end; }
.bubble-name { font-size: 11px; color: var(--muted); }
.bubble { background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; border-radius: 16px 16px 16px 4px; white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.bubble-row.mine .bubble { background: var(--accent); color: #fff; border-color: transparent; border-radius: 16px 16px 4px 16px; }
.bubble-time { font-size: 10px; color: var(--muted); }
.msg-task { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 8px 12px; cursor: pointer; max-width: 320px; }
.msg-task-label { font-size: 11px; color: var(--accent); font-weight: 800; display: flex; gap: 4px; align-items: center; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 8px; background: var(--surface); }
.composer-row { display: flex; gap: 6px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 40px; max-height: 140px; }
.composer .icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.composer .send { color: var(--accent); }
.task-compose { display: grid; gap: 6px; background: var(--accent-soft); border-radius: 10px; padding: 10px; }
.task-compose-row { display: flex; gap: 6px; flex-wrap: wrap; }
.task-compose-row select { flex: 1; min-width: 140px; }
.pick-users { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; }
.pick-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.pick-user:hover { background: var(--surface-2); }
.pick-user span { display: grid; line-height: 1.3; }
.show-mobile-inline { display: none !important; }

/* credits & ranking */
.req-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.req-main { flex: 1; min-width: 180px; }
.ledger { display: grid; }
.ledger-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ledger-row:last-child { border-bottom: 0; }
.ledger-date { width: 42px; flex: none; }
.ledger-main { flex: 1; min-width: 0; }
.ledger-amt { font-weight: 800; color: #9a6a00; font-variant-numeric: tabular-nums; }
.howto { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.kpi-credit { color: var(--text); text-decoration: none !important; background: linear-gradient(135deg, #fff8e5, var(--surface)); }
.hero-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: linear-gradient(90deg, #fff4d6, var(--surface)); border: 1px solid #f5d27a; margin-bottom: 14px; color: var(--text); text-decoration: none !important; }
.rank-period { margin: -6px 0 14px; }
.hero-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; padding: 18px; border-radius: 16px; background: linear-gradient(135deg, #fff1c9, #ffe0f0); margin-bottom: 18px; color: #3a2700; }
.hero-card.empty { background: var(--surface-2); color: var(--text); }
.hero-badge { font-weight: 800; font-size: 13px; width: 100%; }
.hero-main { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none !important; }
.hero-name { font-size: 22px; font-weight: 800; }
.hero-reason { margin: 6px 0 0; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 10px 0 18px; }
.podium-col { display: grid; justify-items: center; gap: 4px; width: 150px; color: var(--text); text-decoration: none !important; text-align: center; }
.podium-col small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.podium-medal { font-size: 28px; }
.podium-score { font-size: 20px; font-weight: 800; color: #9a6a00; }
.podium-score small { font-size: 11px; margin-left: 2px; }
.podium-block { width: 100%; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #f5d27a, #eab308); }
.podium-col.p1 .podium-block { height: 90px; }
.podium-col.p2 .podium-block { height: 62px; background: linear-gradient(180deg, #e5e7eb, #9ca3af); }
.podium-col.p3 .podium-block { height: 44px; background: linear-gradient(180deg, #f3c9a4, #c2773d); }
.rank-list.big .rank-row { padding: 10px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
.rank-no { width: 28px; text-align: center; font-weight: 800; color: var(--muted); }
.rank-row.me { background: var(--accent-soft); }

/* events */
.ev-month { margin-bottom: 20px; }
.ev-month-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--text-2); }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; }
.ev-grid.past { opacity: .7; }
.ev-card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; box-shadow: var(--shadow-sm); }
.ev-card:hover { box-shadow: var(--shadow); }
.ev-date { width: 54px; flex: none; display: grid; justify-items: center; align-content: center; background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.ev-m { font-size: 11px; font-weight: 700; }
.ev-d { font-size: 22px; font-weight: 800; }
.ev-w { font-size: 11px; }
.ev-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ev-uni { font-size: 12px; font-weight: 700; color: var(--text-2); }
.ev-title { font-weight: 800; }
.deadline { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.deadline.warn { color: var(--warn); }
.deadline.bad { color: var(--bad); }
.deadline.past { color: var(--muted); }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 6px 0; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.dl dd { margin: 0; }
.attach-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.attach { position: relative; width: 120px; height: 100px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.attach img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-file { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; padding: 8px; text-align: center; font-size: 11px; color: var(--text-2); word-break: break-all; }
.attach .icon-btn { position: absolute; top: 2px; right: 2px; background: var(--surface); }
.attach.add { display: grid; place-items: center; align-content: center; gap: 4px; cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 700; border-style: dashed; }

/* manuals */
.mn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mn-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; color: var(--text); box-shadow: var(--shadow-sm); }
.mn-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.mn-top { display: flex; gap: 8px; align-items: center; color: var(--accent); }
.mn-top b { color: var(--text); }
.mn-excerpt { font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mn-foot { display: flex; align-items: center; gap: 6px; }
.manual-detail { max-width: 860px; }
.mn-article { margin-top: 12px; padding: 22px 26px; }
.mn-article h1 { margin: 10px 0 6px; font-size: 24px; }
.mn-by { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.md { line-height: 1.85; font-size: 15px; }
.md p { margin: 0; }
.md h3, .md h4, .md h5 { margin: 18px 0 6px; }
.md ul, .md ol { margin: 4px 0; padding-left: 22px; }
.md-gap { height: 10px; }
.mn-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* admin */
.queue-link { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.role-bars { display: grid; gap: 8px; }
.role-bar { display: grid; grid-template-columns: 100px 1fr 30px; align-items: center; gap: 8px; font-size: 13px; }
.role-bar b { text-align: right; }
.pref-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pref-chip { font-size: 12px; background: var(--surface-2); border-radius: 12px; padding: 3px 10px; }

/* projects (area / genre) */
.pj-group { margin-bottom: 26px; }
.pj-group-h { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.pj-group-h .drive-link { font-size: 12px; padding: 3px 8px; margin-left: auto; }
.pj-sub { margin: 0 0 14px; }
.pj-sub-h { font-size: 14px; color: var(--text-2); margin: 0 0 8px; }

/* profile page (themed by --uc) */
.profile-page { --accent: var(--uc); }
.profile-page .tabs button.on { color: var(--uc); border-bottom-color: var(--uc); }
.pf-hero { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.pf-cover { position: relative; height: 220px; background: linear-gradient(135deg, var(--uc), color-mix(in srgb, var(--uc) 45%, #ffffff)); background-size: cover; background-position: center; }
.pf-cover-btn { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .5); color: #fff; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; cursor: pointer; }
.pf-head { display: flex; gap: 18px; padding: 0 22px; align-items: flex-end; flex-wrap: wrap; margin-top: -56px; position: relative; }
.pf-avatar { position: relative; flex: none; }
.pf-avatar .avatar { box-shadow: 0 0 0 5px var(--surface), var(--shadow); font-size: 34px !important; }
.pf-avatar-btn { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--uc); color: #fff; cursor: pointer; box-shadow: 0 0 0 3px var(--surface); }
.pf-id { flex: 1; min-width: 220px; padding-top: 60px; }
.pf-id h1 { font-size: 26px; }
.pf-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.pf-role { background: var(--uc); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 12px; }
.pf-tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: color-mix(in srgb, var(--uc) 12%, var(--surface)); color: var(--text); }
.pf-tag.strong { border: 1px solid color-mix(in srgb, var(--uc) 50%, transparent); }
.pf-tag.hero { background: #fff1c9; color: #7a5200; }
.pf-sub { color: var(--text-2); font-size: 14px; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; }
.pf-actions .btn.primary { background: var(--uc); }
.pf-bio { margin: 14px 22px 0; white-space: pre-wrap; color: var(--text-2); }
.pf-contacts { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 22px 18px; }
.pf-line, .pf-sns { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none !important; }
.pf-line b { color: #06c755; }
.pf-sns b { color: var(--uc); }
.pf-line:hover, .pf-sns:hover { background: var(--surface-2); }
.pf-credits { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.pf-credit { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; box-shadow: var(--shadow-sm); }
.pf-credit.main { background: linear-gradient(135deg, color-mix(in srgb, var(--uc) 85%, #000), var(--uc)); color: #fff; border: 0; }
.pf-credit-label { font-size: 12px; font-weight: 700; opacity: .85; }
.pf-credit-num { font-size: 38px; font-weight: 900; display: flex; align-items: center; gap: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pf-credit-num .ic { fill: #ffd54a; stroke: #ffd54a; }
.pf-credit-num.sm { font-size: 24px; }
.pf-credit-sub { font-size: 12px; font-weight: 700; opacity: .9; }
.hist-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.hist-table tr { cursor: pointer; }
.hist-table .like { padding: 4px 6px; }
.mcard-cr { display: flex; align-items: center; gap: 3px; font-size: 16px; color: #9a6a00; }
.mcard-cr .ic { fill: currentColor; }

/* settings */
.settings-h { display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; font-size: 17px; }
.pf-edit-media { display: flex; gap: 16px; align-items: stretch; margin-bottom: 16px; flex-wrap: wrap; }
.pf-edit-avatar { display: grid; justify-items: center; gap: 8px; }
.pf-edit-cover { flex: 1; min-width: 220px; min-height: 120px; border-radius: 12px; background-size: cover; background-position: center; display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px; }
.pf-edit-cover .btn { background: rgba(255, 255, 255, .9); }
.cat-list { display: grid; gap: 8px; }
.cat-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cat-row input:not(.num-in) { flex: 1; min-width: 140px; }
.icon-sel { width: 64px; }
.export-list { display: grid; gap: 10px; margin: 10px 0 14px; }
.export-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.export-row b { width: 90px; }
.formula { flex: 1; min-width: 200px; font-size: 11px; background: var(--surface-2); padding: 6px 8px; border-radius: 6px; word-break: break-all; }
code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* AI chat */
.ai-chat { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.ai-log { flex: 1; min-height: 300px; max-height: 60vh; overflow-y: auto; padding: 14px 20px; display: grid; gap: 10px; align-content: start; }
.ai-hello p { margin: 0 0 10px; }
.ai-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-msg { display: flex; }
.ai-msg.user { justify-content: flex-end; }
.ai-bubble { max-width: 85%; white-space: pre-wrap; word-break: break-word; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; line-height: 1.65; }
.ai-msg.user .ai-bubble { background: var(--accent); color: #fff; }
.ai-bubble.typing { color: var(--muted); }
.ai-form { display: flex; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--line); align-items: flex-end; }
.ai-form textarea { flex: 1; resize: none; }
.ai-note { padding: 0 20px 14px; }

/* tutorial */
.tutorial { padding: 30px 26px 22px; text-align: center; display: grid; gap: 10px; }
.tut-icon { font-size: 56px; line-height: 1; }
.tutorial h2 { font-size: 20px; }
.tutorial p { margin: 0; color: var(--text-2); line-height: 1.7; }
.tut-dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0; }
.tut-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.tut-dots span.on { background: var(--accent); width: 22px; border-radius: 4px; }
.tut-actions { display: flex; justify-content: space-between; gap: 10px; }

@media (max-width: 1100px) {
  .pf-credits { grid-template-columns: 1fr 1fr; }
  .pf-credit.main { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .row3 { grid-template-columns: 1fr; }
  .wf-grid { grid-template-columns: 1fr 1fr; }
  .badges-row { margin-left: 0; }
  .msg-page { padding: 0; }
  .msg-layout { grid-template-columns: 1fr; border-radius: 0; border: 0; height: calc(100vh - 56px - 64px - var(--safe-b)); }
  .msg-page.has-thread .msg-list { display: none; }
  .msg-page:not(.has-thread) .msg-thread { display: none; }
  .show-mobile-inline { display: inline-flex !important; }
  .bubble-row { max-width: 92%; }
  body[data-route="messages"] .fab { display: none; }
  .pf-cover { height: 150px; }
  .pf-head { padding: 0 16px; margin-top: -48px; gap: 10px; }
  .pf-avatar .avatar { width: 96px !important; height: 96px !important; }
  .pf-id { padding-top: 0; min-width: 100%; }
  .pf-id h1 { font-size: 22px; }
  .pf-bio, .pf-contacts { margin-left: 0; padding-left: 16px; padding-right: 16px; }
  .pf-bio { margin: 10px 16px 0; padding: 0; }
  .pf-credit-num { font-size: 30px; }
  .podium-col { width: 31%; }
  .ev-grid, .mn-grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 96px 1fr; }
  .export-row b { width: 100%; }
  .mn-article { padding: 16px; }
  .catch { font-size: 17px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .credit { background: #3a2f17; color: #f5c95c; }
  :root:not([data-theme="light"]) .credit-inline, :root:not([data-theme="light"]) .ledger-amt, :root:not([data-theme="light"]) .podium-score, :root:not([data-theme="light"]) .mcard-cr { color: #f5c95c; }
  :root:not([data-theme="light"]) .wf-review { background: #231f3a; border-color: #3b3366; }
  :root:not([data-theme="light"]) .abadge.review { background: #2c2650; color: #b3a8ff; }
  :root:not([data-theme="light"]) .fcard.celebrate, :root:not([data-theme="light"]) .hero-strip, :root:not([data-theme="light"]) .kpi-credit { background: linear-gradient(180deg, #2e2716, var(--surface) 70%); border-color: #5a4a1e; }
  :root:not([data-theme="light"]) .hero-card:not(.empty) { background: linear-gradient(135deg, #3a2f17, #3a1f30); color: var(--text); }
  :root:not([data-theme="light"]) .pf-tag.hero { background: #3a2f17; color: #f5c95c; }
}

/* ============================================================ v3: Monday-style dark theme (dark only) */
:root, :root[data-theme], :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #181b34; --surface: #292f4c; --surface-2: #30354f; --surface-3: #3b405e; --line: #3f4462; --line-2: #535877;
  --text: #e6e9ef; --text-2: #c5c7d4; --muted: #9699a6;
  --accent: #579bfc; --accent-2: #7eb2fe; --accent-soft: #23335c; --primary: #0073ea; --primary-2: #0060b9;
  --good: #00c875; --good-soft: #14393a; --bad: #e2445c; --bad-soft: #452033; --warn: #fdab3d; --warn-soft: #463622;
  --sun: #ffcb00; --sun-soft: #403717; --track: #3f4462; --series-1: #579bfc;
  --heat-0: #30354f; --heat-1: #1f4f8f; --heat-2: #2f6fc7; --heat-3: #579bfc; --heat-4: #a9cbff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow: 0 2px 8px rgba(0, 0, 0, .35); --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
}
body { background: var(--bg); }
.sidebar { background: #1f2341; border-right-color: var(--line); }
.nav-item.on { background: #133774; color: #fff; }
.nav-item.on .ic { color: #9cc4ff; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); }
.btn.soft { background: var(--accent-soft); color: #a9cbff; }
.topbar, .bottomnav { background: rgba(31, 35, 65, .95) !important; }
input, select, textarea { background: #1f2341; border-color: var(--line-2); color: var(--text); }
.seg { background: #1f2341; }
.seg button.on { background: var(--surface-3); color: #fff; }
.card, .kpi, .group, .pcard, .mcard, .fcard, .ev-card, .mn-card, .pf-credit, .pf-hero { background: var(--surface); border-color: var(--line); }
.toast { background: #3b405e; }
.toast-success { background: #00854d; }
.toast-error { background: #c22e46; }
.credit { background: #403717; color: #ffd84d; }
.credit-inline, .ledger-amt, .podium-score, .mcard-cr { color: #ffd84d; }
.wf-review { background: #2a2550; border-color: #463c86; }
.abadge.review { background: #3a2f63; color: #d1b8ff; }
.fcard.celebrate, .hero-strip, .kpi-credit { background: linear-gradient(180deg, #3a3318, var(--surface) 70%); border-color: #5e4d1e; }
.hero-card:not(.empty) { background: linear-gradient(135deg, #3d3416, #3e1d38); color: var(--text); }
.pf-tag.hero { background: #403717; color: #ffd84d; }
.drive-link { background: #123d33; color: #33e0a0; }
.check { background: transparent; }
.is-done > .check, .is-done .check, .check.on { background: var(--good); border-color: var(--good); }
.month-cell.out { background: #22274a; }
.cal-col.today { background: rgba(87, 155, 252, .08); }
.pill { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.pill.sm { font-size: 11px; padding: 1px 8px; min-width: 0; border-radius: 4px; }
.gdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: auto; }
.gdot.ok { background: var(--good); box-shadow: 0 0 0 3px rgba(0, 200, 117, .2); }
.gdot.ng { background: #797e93; }
.gdot.warn { background: var(--warn); }
.gdot.sm { width: 7px; height: 7px; box-shadow: none; }
.gstatus { display: flex; align-items: center; gap: 8px; }
.gstatus .gdot { margin-left: 0; }
.spacer { flex: 1; }
.row-end { display: flex; justify-content: flex-end; gap: 6px; padding-top: 6px; }
.btn-col { display: grid; gap: 8px; margin-top: 12px; }
.caution { color: #ffcf7a; font-size: 13px; }
.rem { font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.rem-soon { color: var(--warn); }
.rem-over { color: #ff7b8f; }
.rem-ok { color: var(--good); }
.av-stack { display: inline-flex; align-items: center; }
.av-stack .avatar + .avatar { margin-left: -8px; }
.av-more { display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-3); font-size: 10px; font-weight: 700; margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.btn.disabled { opacity: .5; pointer-events: none; }
.btn.on { border-color: var(--accent); color: #a9cbff; }

/* project view tabs + toolbar */
.vtabs { display: flex; gap: 2px; align-items: flex-end; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.vtab { display: inline-flex; align-items: center; position: relative; }
.vtab > button:first-child { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 9px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.vtab.on > button:first-child { color: #fff; border-bottom-color: var(--accent); }
.vtab-x { border: 0; background: none; color: var(--muted); padding: 2px; border-radius: 4px; opacity: 0; margin-left: -6px; }
.vtab:hover .vtab-x { opacity: 1; }
.vtab-x:hover { background: var(--surface-3); color: #fff; }
.vtab-add { border: 0; background: none; color: var(--muted); padding: 8px; border-radius: 6px; }
.vtab-add:hover { background: var(--surface-2); color: #fff; }
.bd-toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.bd-search { display: inline-flex; align-items: center; gap: 6px; background: #1f2341; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 8px; height: 30px; color: var(--muted); }
.bd-search input { border: 0; background: transparent; padding: 0; width: 140px; box-shadow: none !important; }

/* main table (Monday) */
.mt-wrap { overflow-x: auto; padding-bottom: 12px; }
.mt { min-width: max-content; display: grid; gap: 22px; }
.mt-pending { background: var(--warn-soft); padding: 8px 12px; border-radius: 8px; font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mt-group-h { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--gc); font-size: 16px; padding: 4px 0 8px; }
.mt-group-h b { font-size: 16px; }
.mt-row { display: grid; align-items: stretch; min-height: 38px; border-bottom: 1px solid var(--line); background: var(--surface); }
.mt-row:hover { background: #343a5a; }
.mt-head { background: transparent !important; min-height: 34px; border-bottom: 1px solid var(--line); }
.th { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 6px; border-left: 1px solid var(--line); cursor: default; user-select: none; text-align: center; }
.th[draggable=true] { cursor: grab; }
.th[data-act]:hover { background: var(--surface-2); color: #fff; }
.th.th-title { justify-content: flex-start; border-left: 0; padding-left: 16px; position: sticky; left: 0; background: var(--bg); z-index: 2; }
.th.dragging-col { opacity: .4; }
.th.drop-col { box-shadow: inset 3px 0 0 var(--accent); }
.th-add { border-left: 1px solid var(--line); }
.td { display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--line); padding: 0 6px; font-size: 13px; min-width: 0; overflow: hidden; }
.td.click { cursor: pointer; }
.td.edit { cursor: text; }
.td.edit:hover, .td.click:hover:not(.td-pill) { box-shadow: inset 0 0 0 1px var(--line-2); }
.td-title { justify-content: flex-start; gap: 8px; border-left: 0; padding-left: 0; position: sticky; left: 0; z-index: 1; background: inherit; cursor: pointer; }
.td-title .gbar { width: 6px; align-self: stretch; background: var(--gc); flex: none; border-radius: 0; }
.mt-group:first-child .mt-row:nth-child(2) .gbar { border-top-left-radius: 6px; }
.td-title .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mt-row.is-done .ttl { color: var(--muted); }
.td-title .open-ic { margin-left: auto; opacity: 0; }
.mt-row:hover .open-ic { opacity: 1; }
.td-pill { background: var(--pc); color: #fff; font-weight: 600; padding: 0 4px; border-left: 1px solid var(--bg); text-align: center; justify-content: center; transition: filter .1s; }
.td-pill.click:hover { filter: brightness(1.12); }
.td-tl .tl-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(90deg, var(--pc) var(--tlp), #4b506f var(--tlp)); white-space: nowrap; }
.td-text { justify-content: flex-start; }
.td-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td.num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.td-owner { gap: 4px; }
.files-n { display: inline-flex; gap: 4px; align-items: center; color: #33e0a0; font-weight: 700; }
.add-hint { opacity: 0; }
.mt-row:hover .add-hint { opacity: .8; }
.cell-input { width: 100%; height: 30px; padding: 4px 8px; font-size: 13px; }
.cell-link { color: var(--accent); }
.cb { width: 18px; height: 18px; border: 2px solid var(--line-2); border-radius: 4px; display: inline-grid; place-items: center; color: #fff; }
.cb.on { background: var(--good); border-color: var(--good); }
.stars { gap: 0; }
.star { border: 0; background: none; color: #4b506f; font-size: 16px; padding: 0 1px; }
.star.on { color: var(--sun); }
.mt-add { background: transparent; }
.mt-add input { border: 0; background: transparent; box-shadow: none !important; padding: 8px 4px; flex: 1; }
.mt-add .td-title { background: transparent; }
.coltype-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; }
.coltype { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 8px 10px; border-radius: 8px; font-size: 13px; text-align: left; }
.coltype:hover { border-color: var(--accent); }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px 8px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--pc); cursor: pointer; }
.fchip:has(input:checked) { background: var(--pc); color: #fff; }
.fchip input { display: none; }
.range-form { display: grid; gap: 8px; padding: 6px; }

/* cards view */
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--pc); border-radius: 10px; padding: 12px; display: grid; gap: 8px; cursor: pointer; }
.tcard:hover { box-shadow: var(--shadow); }
.tcard-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tcard-title { font-weight: 700; }
.tcard-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; }

/* kanban */
.bcol { background: #1f2341; border-top: 4px solid var(--g); border-radius: 10px; }
.bcol-head { border-bottom: 0; padding-bottom: 4px; color: var(--g); }
.bcol-head b { color: var(--text); }
.bcard { position: relative; background: var(--surface); border-color: var(--line); }
.bcard-edit { position: absolute; top: 6px; right: 6px; border: 0; background: var(--surface-3); color: var(--text-2); width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; opacity: .75; }
.bcard-edit:hover { opacity: 1; background: var(--primary); color: #fff; }
.bcard-title { padding-right: 28px; }
.bcard-foot { justify-content: space-between; }
.bcol-add input { background: transparent; }

/* dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.dash-w { margin: 0; }
.w-tools { display: flex; gap: 0; opacity: .3; }
.dash-w:hover .w-tools { opacity: 1; }
.dash-add { min-height: 120px; border: 2px dashed var(--line-2); border-radius: var(--r); background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; }
.dash-add:hover { border-color: var(--accent); color: #a9cbff; }
.w-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.w-num { display: grid; justify-items: center; background: var(--surface-2); border-radius: 8px; padding: 10px 4px; }
.w-num b { font-size: 24px; color: var(--c); font-variant-numeric: tabular-nums; }
.w-num span { font-size: 11px; color: var(--muted); }
.hbars { display: grid; gap: 8px; }
.hbar-row { display: grid; grid-template-columns: 84px 1fr 32px; gap: 8px; align-items: center; font-size: 12px; }
.hbar-track { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 4px; }
.hbar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.w-owner { display: grid; gap: 8px; }
.w-owner-row { display: grid; grid-template-columns: 24px 90px 1fr 28px; gap: 8px; align-items: center; font-size: 12px; }
.w-owner-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-owner .stack { height: 12px; margin: 0; }
.w-list { display: grid; }
.w-li { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; cursor: pointer; text-decoration: none !important; }
.w-li:last-child { border-bottom: 0; }
.w-li-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.battery { display: flex; align-items: center; gap: 2px; margin: 10px 0; }
.battery-body { flex: 1; height: 54px; border: 3px solid var(--text-2); border-radius: 8px; padding: 3px; display: flex; gap: 2px; overflow: hidden; }
.battery-body span { border-radius: 3px; min-width: 3px; }
.battery-cap { width: 7px; height: 22px; background: var(--text-2); border-radius: 0 3px 3px 0; }
.battery-label { font-size: 13px; color: var(--muted); }
.battery-label b { font-size: 22px; color: var(--text); }
.mini-gantt { position: relative; display: grid; gap: 6px; }
.mg-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); margin-left: 110px; opacity: .7; z-index: 1; }
.mg-row { display: grid; grid-template-columns: 104px 1fr; gap: 6px; align-items: center; cursor: pointer; }
.mg-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-track { position: relative; height: 14px; background: var(--surface-2); border-radius: 4px; }
.mg-bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.w-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.w-gallery a { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.w-gallery img { width: 100%; height: 100%; object-fit: cover; }
.w-gimg-drive { padding: 6px; text-align: center; font-size: 10px; color: var(--text-2); align-content: center; gap: 4px; word-break: break-all; }

/* workspace finder */
.finder { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; height: calc(100vh - 170px); min-height: 420px; scroll-snap-type: x proximity; }
.fcol { flex: none; width: 250px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; scroll-snap-align: start; }
.fcol.finfo { width: 320px; flex: 1; min-width: 300px; border-right: 0; background: #252a47; }
.fcol-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); position: sticky; top: 0; }
.fcol-body { overflow-y: auto; padding: 6px; flex: 1; }
.fitem { display: flex; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 7px; color: var(--text); font-size: 13px; text-decoration: none !important; }
.fitem:hover { background: var(--surface-2); }
.fitem.on { background: var(--primary); color: #fff; }
.fitem.on .fitem-n { background: rgba(255, 255, 255, .25); color: #fff; }
.fitem-ic { width: 20px; text-align: center; flex: none; }
.fitem-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fitem-n { font-size: 11px; background: var(--surface-3); border-radius: 9px; padding: 0 7px; color: var(--text-2); }
.fitem > .ic:last-child { color: var(--muted); }
.fitem.task { cursor: pointer; }
.sdot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fempty { color: var(--muted); font-size: 12px; padding: 16px 8px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.finfo-body { padding: 18px; display: grid; gap: 10px; align-content: start; }
.finfo-icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: var(--surface-3); }
.finfo-row { display: flex; align-items: center; gap: 10px; }
.genre-desc { min-height: 160px; }

/* focus */
.focus-kpis { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.focus-kpis b { color: var(--text); font-size: 18px; }
.next-card { background: linear-gradient(135deg, #1d3c74, var(--surface)); border: 1px solid #2f5aa8; border-left: 6px solid var(--pc); border-radius: 14px; padding: 18px 20px; display: grid; gap: 10px; margin-bottom: 16px; }
.next-label { font-size: 12px; font-weight: 800; color: #a9cbff; display: flex; gap: 6px; align-items: center; letter-spacing: .05em; }
.next-title { font-size: 22px; font-weight: 800; }
.status-lanes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.lane { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--pc); border-radius: 10px; padding: 10px; }
.lane-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.lane-body { display: grid; gap: 4px; }
.lane-item { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; padding: 6px 8px; border-radius: 6px; background: var(--surface-2); cursor: pointer; }
.lane-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.when-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 16px; }
.when { margin: 0; }
.when h2.bad { color: var(--bad); }
.goal-mini { display: grid; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* goals */
.goal-section { margin-bottom: 24px; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.goal { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; }
.goal.done { border-color: #1d6b4a; background: linear-gradient(180deg, #16382f, var(--surface)); }
.goal-top { display: flex; gap: 6px; align-items: center; }
.goal-top .icon-btn { margin-left: auto; }
.goal-title { font-size: 16px; }
.goal-why { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.goal-why-l { font-size: 11px; font-weight: 800; color: #a9cbff; display: flex; gap: 4px; align-items: center; }
.goal-why p { margin: 4px 0 0; font-size: 13px; white-space: pre-wrap; }
.goal-prog { display: flex; align-items: center; gap: 8px; }
.goal-tasks { display: grid; gap: 2px; font-size: 12px; }
.goal-pick { display: grid; gap: 4px; max-height: 180px; overflow-y: auto; font-weight: 400; background: var(--surface-2); border-radius: 8px; padding: 8px; }

/* teams */
.team-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--tc); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.team-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.team-h h2 { font-size: 17px; }
.team-ic { color: var(--tc); }
.team-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.tm { display: grid; justify-items: center; text-align: center; gap: 3px; padding: 10px 6px; border-radius: 10px; background: var(--surface-2); }
.tm-name { font-weight: 700; color: var(--text); }
.tm-role { font-size: 12px; color: #a9cbff; font-weight: 600; }
.sel-new { display: flex; gap: 6px; }
.sel-new select { flex: 1; }

/* integrations */
.gcard.ok { border-color: #1d6b4a; }
.gcard-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.gcard-head .drive-link { margin-left: auto; }
.g-logo { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: #123d33; color: #33e0a0; }
.gsteps { display: grid; gap: 14px; margin: 16px 0; }
.gstep { display: flex; gap: 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.gstep.done { opacity: .75; }
.gstep-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; flex: none; font-size: 13px; }
.gstep.done .gstep-n { background: var(--good); color: #fff; }
.gstep-body { margin-top: 6px; font-size: 13px; display: grid; gap: 8px; }
.gform { margin-top: 4px; }
.gmembers { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.gm { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.gm span:first-child { width: 120px; }
.gme { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.gme h3 { font-size: 14px; margin-bottom: 6px; }
.tree { background: #1f2341; border-radius: 10px; padding: 14px; font-size: 12px; line-height: 1.7; overflow-x: auto; color: var(--text-2); }
.copyable { user-select: all; }

/* panel: files & caution */
.caution-edit { background: #3b3220; border-color: #6b5626; color: #ffe2a8; min-height: 38px; resize: none; }
.upload-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.upload-row label.btn { cursor: pointer; }
.file-list { display: grid; gap: 4px; }
.file-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 6px; background: var(--surface); }
.file-row a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-submit { font-size: 13px; }
.more-submit summary { cursor: pointer; color: var(--muted); }
.more-submit .lbl { margin-top: 8px; }

/* timeline: move tasks between projects */
.tl-name[draggable=true] { cursor: grab; }
.drag-h { color: var(--muted); display: inline-flex; }
.tl.moving .tl-group { outline: 1px dashed var(--line-2); }
.tl-group.drop-on .tl-left { background: var(--primary) !important; color: #fff; }

/* spotlight tutorial */
.tour { position: fixed; inset: 0; z-index: 300; }
.tour-hole { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(8, 10, 25, .72), 0 0 0 3px #579bfc; transition: all .25s ease; pointer-events: none; }
.tour-tip { position: fixed; background: var(--surface); border: 1px solid #3d5ea8; border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-lg); display: grid; gap: 8px; transition: left .25s, top .25s; }
.tour-tip.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 32px)); }
.tour-tip h3 { font-size: 17px; }
.tour-tip p { margin: 0; color: var(--text-2); line-height: 1.7; font-size: 14px; }
.tour-step { font-size: 11px; font-weight: 800; color: #a9cbff; letter-spacing: .05em; }
.tour-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
body.touring .sidebar { z-index: 250; }

@media (max-width: 760px) {
  .status-lanes { grid-template-columns: 1fr 1fr; }
  .w-summary { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .finder { height: calc(100vh - 230px); }
  .fcol { width: 78vw; }
  .fcol.finfo { width: 86vw; min-width: 0; }
  .next-title { font-size: 19px; }
  .bd-search input { width: 100px; }
  body.touring .sidebar { z-index: 301; }
  body.touring .tour-tip { z-index: 302; }
}
.pop-card [data-user-list] { max-height: min(320px, 45vh); overflow-y: auto; }
.pop-card .menu-foot { position: sticky; bottom: -6px; background: var(--surface); }
.integrations .card, .gstep > div { min-width: 0; }
.gstep-body code, .copyable { word-break: break-all; white-space: normal; }
.tree { max-width: 100%; white-space: pre; }
.lane, .when, .status-lanes > *, .dash-w { min-width: 0; }
body.touring .sidebar { z-index: 299 !important; }
@media (max-width: 760px) {
  .fcol, .fcol.finfo { flex: none; }
  body.touring .tour-tip { z-index: auto; }
}

/* quick add: report items (same as report.vola-app.cloud) */
.qa-tlabel { margin-bottom: -8px; }
.qa-report { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 14px 14px; display: grid; gap: 12px; margin: 0; }
.qa-report legend { font-size: 13px; font-weight: 700; color: var(--text-2); padding: 0 6px; }
.qa-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.qa-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qa-kind input { position: absolute; opacity: 0; }
.qa-kind span { display: block; text-align: center; padding: 9px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-weight: 600; color: var(--text-2); cursor: pointer; }
.qa-kind input:checked + span { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.qa-kind input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.qa-report.isplan .qa-pastcell { display: none; }
.to-record { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.qa-report .qa-planonly { display: none; margin: 0; }
.qa-report.isplan .qa-planonly { display: block; }
.qa-report.isplan .qa-pastonly { display: none; }
.qa-pastonly { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .qa-grid, .qa-pastonly { grid-template-columns: 1fr 1fr; } }
.qa-report input[type=file] { padding: 6px; }
.task-report { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; }
.task-report .flabel { display: block; }
.task-report input, .task-report select { width: 100%; }

/* ============ task-la 専用(2026-11-24 案件E62): 1日スケジュール・スケジュール一覧・完了の証拠 ============ */
.ds-today-tag { font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 10px; padding: 1px 8px; margin-left: 6px; }
.ds-date { margin-left: 8px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.ds-summary, .sl-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ds-sum { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--uc); border-radius: 10px; padding: 8px 12px; position: relative; }
.ds-sum .good { color: var(--good); }
.ds-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-2); border-radius: 0 0 10px 10px; overflow: hidden; }
.ds-bar span { display: block; height: 100%; background: var(--good); }
.ds-person { border-top: 3px solid var(--uc); }
.ds-pname { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; padding: 4px 0; }
.ds-allday .cal-gutter { line-height: 1.2; text-align: center; }
.ds-strip { max-height: 170px; min-height: 52px; }
.ds-chip { font-size: 12px; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c); display: flex; align-items: center; gap: 5px; cursor: grab; user-select: none; }
.ds-chip-t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ds-chip.done .ds-chip-t, .ds-block.done .cb-title { text-decoration: line-through; opacity: .7; }
.ds-chip.drag-src { opacity: .4; }
.ds-check { flex: none; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--muted); background: transparent; color: transparent; display: inline-grid; place-items: center; padding: 0; cursor: pointer; margin-right: 4px; vertical-align: -3px; }
.ds-check:hover { border-color: var(--good); color: var(--good); }
.ds-check.on { background: var(--good); border-color: var(--good); color: #fff; }
.ds-add input { width: 100%; border: 1px dashed var(--line-2); background: transparent; color: var(--text); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12px; }
.ds-add input:focus { border-style: solid; border-color: var(--accent); outline: none; }
.ds-col { border-top: 0; }
.ds-col .cal-hour::after { top: 50%; }
.ds-col.drop-hover, .ds-strip.drop-hover { background: var(--accent-soft); }
.ds-block { cursor: grab; }
.ds-block .cb-title { display: flex; align-items: center; gap: 2px; font-weight: 600; }
.ds-who { margin: 6px 0 2px; flex-wrap: wrap; }
.ds-hint { margin-top: 10px; }
.ev-badge { flex: none; font-size: 11px; margin-left: 4px; white-space: nowrap; }
.ev-form .ev-drop { border: 2px dashed var(--line-2); border-radius: 10px; padding: 12px; display: grid; gap: 8px; margin-bottom: 12px; text-align: center; }
.ev-form .ev-drop.drop-hover { border-color: var(--accent); background: var(--accent-soft); }
.ev-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ev-picked { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ev-file { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--surface-2); border-radius: 6px; padding: 2px 4px 2px 8px; }
.ev-note { background: var(--surface-2); border-radius: 8px; padding: 6px 10px; margin: 6px 0; white-space: pre-wrap; font-size: 13px; }
.ev-form .check-line { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; }
.sl-filters .seg, .ds-who.seg { margin-bottom: 0; }
.sl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.sl-custom { display: inline-flex; gap: 4px; align-items: center; }
.sl-custom input, .sl-search { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.sl-search { min-width: 200px; }
.sl-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sl-head, .sl-day { display: grid; grid-template-columns: 170px repeat(var(--cols), minmax(0, 1fr)); }
.sl-head { font-weight: 700; font-size: 13px; background: var(--surface-2); position: sticky; top: 0; z-index: 3; }
.sl-head > div { padding: 8px 10px; border-left: 1px solid var(--line); display: flex; align-items: center; gap: 6px; }
.sl-head > div:first-child { border-left: 0; }
.sl-ph { border-top: 3px solid var(--uc); }
.sl-day { border-top: 1px solid var(--line); }
.sl-day.today { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.sl-day.future .sl-date b { color: var(--accent); }
.sl-date { padding: 8px 10px; display: grid; align-content: start; gap: 2px; font-size: 13px; }
.sl-date a { color: var(--text); }
.sl-date .ds-today-tag { justify-self: start; margin-left: 0; }
.sl-cell { padding: 6px 8px; border-left: 1px solid var(--line); display: grid; gap: 6px; align-content: start; min-width: 0; }
.sl-item { border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); border-radius: 6px; padding: 5px 8px; min-width: 0; }
.sl-item.missed { border-left-color: var(--bad); }
.sl-item.done .sl-title { color: var(--muted); }
.sl-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.sl-time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); flex: none; min-width: 52px; }
.sl-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13px; }
.sl-title .ic { color: var(--good); margin-right: 3px; }
.pill.sm { font-size: 10px; padding: 1px 7px; flex: none; min-width: 0; }
.sl-sub { margin: 1px 0 0 60px; }
.sl-ev { margin: 5px 0 2px 60px; display: grid; gap: 4px; }
.sl-thumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sl-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.sl-files { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.sl-note { font-size: 12px; white-space: pre-wrap; background: var(--surface-2); border-radius: 6px; padding: 4px 8px; }
.sl-add-ev { margin-left: 60px; }
.sl-daylog { font-size: 12px; color: var(--text-2); border-top: 1px dashed var(--line); padding-top: 4px; white-space: pre-wrap; }
@media (max-width: 760px) {
  .sl-head { display: none; }
  .sl-day { grid-template-columns: 1fr; }
  .sl-cell { border-left: 0; }
  .sl-cell::before { content: attr(data-name); font-size: 11px; font-weight: 700; color: var(--muted); }
  .sl-sub, .sl-ev, .sl-add-ev { margin-left: 0; }
  .ds-date { display: none; }
}
/* ---- スマホ: タップしやすい大きさ・タッチのドラッグ(2026-11-24 E62 公開。WCAG 2.5.5 / Apple の 44×44 を目安) */
[data-drag] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.drag-lift { box-shadow: 0 8px 22px rgba(0, 0, 0, .45) !important; transform: scale(1.03); outline: 2px solid var(--accent); z-index: 5; }
body.dragging { -webkit-user-select: none; user-select: none; }
body.dragging .bottomnav, body.dragging .fab, body.dragging .topbar { pointer-events: none; } /* ドラッグ中は、重なっているメニューの下の時間割へ置けるように */
.ds-check { position: relative; }
@media (pointer: coarse) { .ds-check::after { content: ""; position: absolute; inset: -6px; } } /* 指のときだけ、見た目より広く押せる(マウスではドラッグの邪魔になるので広げない) */
@media (max-width: 760px) {
  .btn, .btn.sm { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .seg button, .seg.sm button { min-height: 44px; padding-left: 12px; padding-right: 12px; }
  .ds-page .cal-toolbar { flex-wrap: wrap; }
  .ds-page .cal-nav { flex-wrap: wrap; min-width: 0; width: 100%; }
  .ds-page .cal-title { order: -1; width: 100%; font-size: 17px; } /* 日付は1行目に(横に並べると「今日」の印が切れる) */
  .ds-block.narrow .ds-check { display: none; } /* 3つ以上重なった細いブロックでは ✓ を出さない(開いた詳細から完了にできる) */
  .ds-block.narrow { padding: 3px 4px; }
  .ds-page .cal-tools { width: 100%; }
  .ds-page .cal-tools > * { flex: 1; justify-content: center; }
  .ds-summary { grid-template-columns: 1fr 1fr; gap: 6px; }
  .ds-sum { padding: 6px 8px; gap: 6px; min-width: 0; }
  .ds-sum > div { min-width: 0; }
  .ds-sum b { overflow-wrap: anywhere; }
  .ds-sum .avatar { display: none; }
  .ds-pname { font-size: 13px; min-height: 44px; min-width: 0; }
  .ds-pname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ds-chip { min-height: 44px; font-size: 13px; padding: 4px 6px; }
  .ds-check { width: 22px; height: 22px; }
  .ds-strip { max-height: 210px; overflow-y: auto; }
  .ds-add input { min-height: 44px; font-size: 16px; } /* 16px 未満だと iPhone が拡大する */
  .inbox-item { min-height: 48px; }
  .ds-hint { font-size: 12px; }
  .sl-filters > * { max-width: 100%; }
  .sl-search { min-width: 0; width: 100%; min-height: 44px; font-size: 16px; }
  .sl-custom input { min-height: 44px; font-size: 16px; }
  .sl-row { min-height: 44px; }
  .sl-thumbs img { width: 72px; height: 72px; }
  .ev-file .icon-btn { width: 44px; height: 44px; }
  .chip-btn { min-height: 44px; padding: 6px 14px; }
  .ds-block:not(.short) .ds-check { width: 26px; height: 26px; margin-right: 6px; }
  .ev-form textarea, .ev-form input:not([type=file]):not([type=checkbox]) { font-size: 16px; }
}
