:root {
  color-scheme: light;
  --page: #f4f6f1;
  --paper: #fff;
  --ink: #172a24;
  --muted: #54665c;
  --line: #dde4db;
  --forest: #234c3b;
  --lime: #c7ec88;
  --project-a: #68b59b;
  --project-b: #e5aa62;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--page);
}

.signin-page { display: grid; min-height: 100dvh; place-items: center; padding: 18px; }
.signin-card { width: min(100%, 410px); padding: 25px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 10px 35px #19352b17; }
.signin-card:has(#setup-form:not([hidden])) { width: min(100%, 510px); }
.setup-avatar { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.setup-avatar h2 { font-size: 15px; }
.signin-card h1 { font-size: 23px; margin: 12px 0 16px; }
.signin-brand { width: max-content; padding: 4px 8px; border-radius: 6px; background: var(--lime); font-weight: 800; letter-spacing: .08em; }
.signin-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.language-select { padding: 4px 8px; min-height: 34px; width: auto; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
html[lang="zh-CN"] body { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif; }
.signin-card .button { width: 100%; min-height: 40px; margin-top: 16px; }
.signin-card a.button { text-decoration: none; }
#copy-invite { margin-top: 6px; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #438866; outline-offset: 4px; }
svg { width: 18px; height: 18px; display: block; }
button svg { pointer-events: none; }
p, h1, h2 { margin: 0; }
[hidden] { display: none !important; }

.layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 25px 16px 17px; background: #182824; color: #edf3eb; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 7px; color: inherit; text-decoration: none; }
.brand-icon { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 39px; border-radius: 10px; color: #1a3325; background: var(--lime); }
.brand-icon svg { width: 23px; height: 23px; }
.brand b { display: block; font-size: 15px; font-weight: 800; letter-spacing: .09em; line-height: 1.2; }
.brand small { display: block; color: #b9c9bc; font-size: 11px; margin-top: 3px; }
.nav { display: grid; gap: 5px; margin-top: 36px; }
.nav-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 8px; color: #c7d5ca; background: transparent; text-decoration: none; text-align: left; font-size: 13px; font-weight: 600; }
.nav-link:hover { color: white; background: #263b34; }
.nav-link.current { color: #e9f5dc; background: #31483d; }
.nav-link.current svg { color: var(--lime); }
.sidebar-details-toggle { display: none; }
.sidebar-details { flex: 1; min-height: 0; margin: 20px -4px 0; padding: 2px 4px 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #597466 transparent; }
.project-nav h2 { margin: 0 0 5px 9px; color: #b9c9bc; font-size: 11px; }
.project-links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.project-links a { display: flex; align-items: center; gap: 7px; min-height: 33px; padding: 5px 9px; border-radius: 7px; color: #c7d5ca; text-decoration: none; font-size: 12px; }
.project-links a span { min-width: 0; overflow-wrap: anywhere; }
.project-links a:hover { background: #263b34; color: #fff; }
.project-links a[aria-current="page"] { background: #31483d; color: #e9f5dc; font-weight: 700; }
.project-links a:focus-visible { outline-offset: -2px; }
.sidebar-footer { flex: none; display: grid; gap: 11px; padding-top: 5px; }
.nav-meeting { border: 1px solid #658c85; background: #294540; color: #f4f8f0; }
.nav-meeting[data-meeting="true"], .nav-meeting[data-meeting="true"]:hover { background: #d9ece8; border-color: #b4d8d4; color: #1d514e; }
.nav-meeting[data-meeting="true"] svg { color: inherit; }
.project-dot, .legend-dot, .local-light { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 8px; }
.pa { background: var(--project-a); }
.pb { background: var(--project-b); }
.pc { background: #a597d2; }
.pd { background: #7eaacb; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 10px 7px 0; border-top: 1px solid #34473e; color: #bdccbf; font-size: 11px; }
.local-light { background: #a8d97c; width: 6px; height: 6px; flex-basis: 6px; }
.local-light.offline { background: #e6ae72; }

.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 57px; padding: 8px clamp(20px, 3vw, 44px); border-bottom: 1px solid var(--line); background: #f9fbf6; color: var(--muted); font-size: 12px; }
.topbar b { color: var(--ink); }
.workspace-heading { display: flex; align-items: center; flex: none; gap: 9px; white-space: nowrap; }
.workspace-heading .language-select { min-height: 28px; padding: 2px 4px 2px 6px; font-size: 11px; font-weight: 700; }
.account-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 4px; }
.account-actions a { text-decoration: none; }
.viewer-name { max-width: 23vw; margin-inline: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.connection-error, .workspace-banner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 13px; border: 1px solid #d3e2d1; border-radius: 8px; background: #ecf3e9; color: #2a4b3c; font-size: 12px; }
.connection-error { margin: 12px; }
.workspace-banner { margin-bottom: 13px; }
.breadcrumb-slash { margin: 0 7px; color: #7c8d81; }
.content { max-width: 1500px; margin: 0 auto; padding: 26px clamp(20px, 3vw, 44px) 34px; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.23; letter-spacing: .015em; font-weight: 800; }
.intro p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.intro .add-project { min-height: 40px; padding-inline: 11px; }

.studio { border: 1px solid #2c4137; background: #1c2f28; color: #f2f7ee; border-radius: 14px; padding: 12px; box-shadow: 0 6px 16px #1c2f2813; }
.studio-top, .studio-legend { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.studio-top { justify-content: space-between; min-height: 28px; margin-bottom: 9px; }
.studio-top h2 { display: flex; align-items: center; gap: 8px; color: #f0f5ec; font-size: 14px; font-weight: 700; white-space: nowrap; }
.studio-top h2 svg { width: 16px; height: 16px; color: #adc98e; }
.studio-hint { color: #bccbbf; font-size: 11px; text-align: right; }
.room-grid { display: grid; gap: 10px; }
.project-floor { container: project-floor / inline-size; min-width: 0; padding: 7px 7px 8px; border: 1px solid #3c5246; border-radius: 9px; background: #22372e; }
.project-floor h3, .zone-header h4 { min-width: 0; margin: 0; }
.room-tag { display: flex; align-items: center; gap: 7px; max-width: 100%; min-height: 27px; margin-bottom: 5px; padding: 3px 7px; border: 0; border-radius: 5px; background: transparent; color: #f6f8ee; font-size: 13px; font-weight: 700; text-align: left; }
.room-tag span { min-width: 0; overflow-wrap: anywhere; }
.studio-empty { padding: 8px 4px; color: #b9c9bc; font-size: 12px; }
.zone-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 7px; }
@container project-floor (480px <= width < 720px) {
  .zone-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .zone-grid > .floor-zone { grid-column: span 2; }
  .zone-grid > .floor-zone:last-child { grid-column: 2 / span 2; }
}
@container project-floor (min-width: 720px) {
  .zone-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.floor-zone { container-type: inline-size; --floor-avatar-size: clamp(49px, 22cqi, 86px); --zone-accent: #e2bc89; --zone-background: #332c25; min-width: 0; border: 1px solid #ffffff1d; border-radius: 7px; background: var(--zone-background); }
.floor-zone[data-zone="model"] { --zone-accent: #f0c572; --zone-background: #343528; }
.floor-zone[data-zone="review"] { --zone-accent: #a8ccc9; --zone-background: #23383d; }
.zone-header { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; min-height: 28px; padding: 4px 7px; }
.zone-header h4 { display: flex; align-items: center; gap: 5px; color: #f5f2e6; font-size: 12px; white-space: nowrap; }
.zone-header svg { width: 14px; height: 14px; color: var(--zone-accent); }
.zone-kind { color: #dadbd0; font-size: 10px; white-space: nowrap; }
.zone-queue { margin-left: auto; padding: 1px 5px; border-radius: 4px; background: #14292c; color: #efc278; font-size: 10px; white-space: nowrap; }
.zone-stage { position: relative; width: 100%; aspect-ratio: 200 / 106; min-height: 118px; }
.zone-stage:has(.avatars > :nth-child(3)) { min-height: calc(var(--floor-avatar-size) * 1.62 + 72px); }
.floor { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0 0 6px 6px; image-rendering: pixelated; background: var(--zone-background); }
.avatars { position: absolute; inset: 0; pointer-events: none; }
.avatar { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px; width: max-content; max-width: 43%; padding: 0; border: 0; color: #f6fbf2; background: none; transform: translate(-50%, -50%); pointer-events: auto; z-index: 1; }
.avatar.travelling { z-index: 3; }
.avatar-sprite { display: block; flex: 0 0 auto; width: var(--floor-avatar-size); aspect-ratio: 42 / 34; overflow: hidden; }
.avatar-sprite canvas { display: block; width: calc(100% * var(--sprite-frames)); height: 100%; image-rendering: pixelated; }
.avatar-sprite[data-animated] canvas { animation: scene-action var(--sprite-duration) steps(var(--sprite-frames), end) var(--sprite-delay) infinite; }
.avatar-name { display: flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 6px 2px; white-space: nowrap; font-weight: 700; font-size: clamp(9px, 3.3cqi, 12px); line-height: 1.2; border-radius: 4px; background: #14251ff5; }
.avatar-name span, .avatar-state { overflow: hidden; text-overflow: ellipsis; }
.avatar-state { width: max-content; max-width: 100%; padding: 1px 5px 2px; border-radius: 3px; background: #1a3029f5; font-size: clamp(8px, 2.9cqi, 10px); line-height: 1.2; white-space: nowrap; }
.avatar:hover .avatar-name, .avatar:focus-visible .avatar-name { background: #405a35; }
.avatar .legend-dot { width: 6px; height: 6px; flex-basis: 6px; }
.zone-extra { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px 6px 7px; }
.zone-extra .avatar { position: relative; max-width: 100%; transform: none; }
.zone-extra .avatar-sprite { width: clamp(46px, 18cqi, 68px); }
@keyframes scene-action { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .avatar-sprite[data-animated] canvas { animation: none; } }
.studio-legend { flex-wrap: wrap; margin-top: 11px; color: #c8d4c9; font-size: 11px; }
.studio-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot.doing { background: #b4e480; }
.legend-dot.review { background: #f3bf6d; }
.legend-dot.idle { background: #aebbb4; }
.legend-dot.meeting { background: #83cbd2; }

.shared-room { --room-name: #e5eee5; --room-status: #f0f4ee; --room-border: #dce5db; display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 5px; margin-top: 8px; padding: 0 5px 0 10px; border: 1px solid var(--room-border); border-radius: 8px; background: #fff; color: #233e31; scroll-margin-top: 12px; }
.shared-room h3 { display: flex; align-items: center; gap: 6px; margin: 0; padding-right: 7px; border-right: 1px solid var(--room-border); white-space: nowrap; font-size: 12px; }
.shared-room h3 svg { width: 14px; height: 14px; color: #407572; }
.standby-room-cup { position: relative; width: 10px; height: 7px; margin-right: 2px; border: 1px solid #795440; border-radius: 0 0 3px 3px; }
.standby-room-cup::after { content: ""; position: absolute; left: 100%; top: 0; width: 4px; height: 4px; border: 1px solid #795440; border-radius: 0 3px 3px 0; }
.meeting-room { --room-name: #b8cdb2; --room-status: #e3ecdf; --room-border: #aec3a8; --room-name-hover: #afc7a8; background: #c8d8c2; }
.meeting-room h3 svg { color: #466448; }
.standby-room { --room-name: #e7e2d8; --room-status: #f8f5ee; --room-border: #d9d2c4; --room-name-hover: #ded7ca; background: #f1eee7; }
.shared-room-roster { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 3px 6px 4px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #9aaea0 #f4f7f2; }
.shared-room-roster .avatar { --floor-avatar-size: 52px; flex: 0 0 73px; position: relative; width: 73px; max-width: none; transform: none; }
.shared-room-roster .avatar-name { color: #263b30; background: var(--room-name); font-size: 10px; }
.shared-room-roster .avatar-state { color: #344b3d; background: var(--room-status); font-size: 9px; }
.shared-room-roster .avatar:hover .avatar-name, .shared-room-roster .avatar:focus-visible .avatar-name { background: var(--room-name-hover, #d3e4d8); }
.shared-room-roster .avatar:focus-visible { outline-offset: 1px; border-radius: 5px; }
.shared-room > p { padding: 9px 2px; color: #53695b; font-size: 11px; }

.work-assistant { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; padding: 8px; border: 1px solid #c3d8ca; border-radius: 9px; background: #edf5ec; color: #214737; text-decoration: none; }
.work-assistant:hover, .work-assistant.current { border-color: #a9c2a8; background: #dcebd8; }
.work-assistant-label strong, .work-assistant-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-assistant-label strong { font-size: 11px; }
.work-assistant-label small { margin-top: 2px; color: #416854; font-size: 10px; }
.work-assistant-arrow { color: #416854; font-size: 18px; line-height: 1; }
.work-assistant-avatar { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #b3cbb7; border-radius: 5px; background: #daeadd; }
.work-assistant-avatar canvas { width: 23px; image-rendering: pixelated; }
#my-tasks { max-width: 980px; }
.my-task-current { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; padding: 17px 18px; border: 1px solid #c3d8ca; border-radius: 12px; background: #edf5ec; color: #214737; }
.my-task-context { min-width: 0; }
.my-task-state { display: inline-block; margin-bottom: 6px; padding: 3px 7px; border-radius: 5px; background: #d8e9d8; color: #245640; font-size: 12px; font-weight: 700; }
.my-task-context h2 { font-size: 18px; overflow-wrap: anywhere; }
.my-task-project { margin-top: 4px; color: #416854; font-size: 12px; overflow-wrap: anywhere; }
.work-assistant-controls { display: grid; gap: 4px; justify-items: end; color: #416854; font-size: 12px; }
.my-task-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.my-task-queue { margin-top: 20px; }
.my-task-queue h2 { margin-bottom: 8px; font-size: 16px; }
#work-assistant-tasks, #work-assistant-review-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
#work-assistant-tasks .task-return-note { margin-top: 4px; color: #8d382c; font-weight: 700; }
.my-task-review { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 58px; padding: 8px 12px; border: 1px solid #d8e3da; border-radius: 8px; background: var(--paper); }
.my-task-open { padding: 0; border: 0; background: none; color: var(--ink); font-size: 13px; text-align: start; overflow-wrap: anywhere; }
.my-task-open strong { display: block; }
.my-task-open small { display: block; margin-top: 3px; color: #486357; font-size: 11px; }
.my-task-open:hover strong { text-decoration: underline; }
.my-task-waiting { display: grid; gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; }
.my-task-waiting li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 7px; background: #eef1ed; color: #486357; font-size: 12px; }
.my-task-waiting small { display: block; margin-top: 2px; }
#my-tasks-empty { display: grid; justify-items: start; gap: 10px; }
.my-task-context .return-note { margin-top: 8px; }
#work-assistant-tasks button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 58px; padding: 8px 12px; border: 1px solid #d8e3da; border-radius: 8px; background: var(--paper); color: var(--ink); text-align: start; overflow-wrap: anywhere; font-size: 13px; }
#work-assistant-tasks button:not(:disabled):hover { background: #edf5ec; }
#work-assistant-tasks button:focus-visible { outline-offset: -3px; }
#work-assistant-tasks button:disabled { background: #edf1eb; color: #486357; }
#work-assistant-tasks small { display: block; margin-top: 3px; color: #486357; font-size: 11px; }
.my-task-list-action { padding: 4px 6px; border-radius: 5px; background: #e1eddf; color: #245640; font-size: 11px; white-space: nowrap; }
#work-assistant-tasks button:disabled .my-task-list-action { background: #e2e9df; color: #486357; }
.work-clock { font-variant-numeric: tabular-nums; white-space: nowrap; }
#work-assistant-clock { color: #214737; font-size: 24px; font-weight: 700; }
.work-assistant-checkin { position: fixed; z-index: 4; right: 14px; bottom: 14px; width: min(400px, calc(100vw - 28px)); display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 6px 9px; padding: 10px 12px; border: 1px solid #e1c99e; border-radius: 9px; background: #fff2d9; color: #604315; box-shadow: 0 4px 18px #4339232b; }
.work-assistant-checkin canvas { display: block; width: 34px; image-rendering: pixelated; }
.work-assistant-checkin strong { display: block; margin-bottom: 3px; overflow-wrap: anywhere; font-size: 12px; }
.work-assistant-checkin p { margin: 0; font-size: 13px; }
#work-assistant-ack { grid-column: 2; justify-self: end; }
.work-assistant-chip { display: none; font-size: 12px; font-weight: 700; }
.work-assistant-checkin.collapsed { width: auto; grid-template-columns: 26px auto auto; gap: 8px; padding: 5px 8px; cursor: pointer; }
.work-assistant-checkin.collapsed > div { display: none; }
.work-assistant-checkin.collapsed canvas { width: 26px; }
.work-assistant-checkin.collapsed .work-assistant-chip { display: inline; }
.work-assistant-checkin.collapsed #work-assistant-ack { grid-column: auto; }
.work-checkin-arrived canvas { animation: work-assistant-hop .62s steps(4, end) 2; }
@keyframes work-assistant-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .work-checkin-arrived canvas { animation: none; } }
.task-work-time { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 7px; background: #edf5ec; color: #214737; font-size: 12px; }

.focus-view { --focus-accent: #c7ec88; --budget-fill: #679960; --budget-label: #305a36; --budget-tint: #e8f1e6; min-height: 100dvh; background: #eef2e9; }
.focus-view[data-pace="near"] { --focus-accent: #f4c56e; --budget-fill: #d09a39; --budget-label: #694b16; --budget-tint: #fff2d8; }
.focus-view[data-pace="over"] { --focus-accent: #f69986; --budget-fill: #cb6654; --budget-label: #84362b; --budget-tint: #fae9e5; }
.focus-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; max-width: 1080px; margin: 0 auto; padding: 16px 24px; }
.focus-back { color: var(--forest); font-weight: 700; text-decoration: none; }
.focus-back:hover { text-decoration: underline; }
.focus-notices { display: flex; flex-wrap: wrap; gap: 6px; }
.focus-body { display: grid; gap: 13px; max-width: 1080px; padding: 0 24px 26px; margin: 0 auto; }
.focus-timer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 20px; align-items: center; padding: clamp(21px, 3vw, 34px); border: 1px solid #2a4539; border-radius: 18px; background: #182e26; color: #f3f8eb; }
.focus-mode { color: #cceaa0; font-size: 13px; font-weight: 700; margin-bottom: 22px; }
.focus-project { color: #c3d6c5; font-size: 13px; overflow-wrap: anywhere; margin-bottom: 5px; }
.focus-intro h1 { font-size: clamp(22px, 3vw, 32px); line-height: 1.35; overflow-wrap: anywhere; }
.focus-state { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 5px 9px; border-radius: 6px; background: #314b3e; color: #deeed2; font-size: 12px; font-weight: 700; }
.focus-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #b8e283; }
.focus-view[data-status="paused"] .focus-state::before { background: #f6c976; }
.focus-view[data-status="resuming"] .focus-state::before { background: #c7ec88; }
.focus-visuals { --focus-visual-size: clamp(150px, 18vw, 208px); display: flex; align-items: center; justify-content: center; gap: clamp(9px, 1.5vw, 18px); }
#focus-assistant-art { display: block; width: var(--focus-visual-size); height: auto; aspect-ratio: 1; border-radius: 12px; image-rendering: pixelated; background: #263e34; }
.focus-dial { --focus-progress: 0%; display: grid; place-items: center; width: var(--focus-visual-size); aspect-ratio: 1; padding: clamp(5px, 1vw, 9px); border-radius: 50%; background: conic-gradient(var(--focus-accent) var(--focus-progress), #395345 0); }
.focus-dial-face { position: relative; display: grid; place-content: center; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #20392f; }
.focus-dial .work-clock { color: #f8faed; font-size: clamp(27px, 4vw, 36px); font-weight: 800; letter-spacing: -.025em; }
.focus-dial-label { color: #c3d6c5; margin-top: 3px; font-size: 11px; }
.focus-resume-cue { position: absolute; inset: 0; display: grid; place-content: center; place-items: center; gap: 6px; border-radius: inherit; background: radial-gradient(circle, #335542, #20392f 70%); color: #d9f7aa; }
.focus-resume-cue[data-start="true"] { background: #c7ec88; color: #20392f; }
.focus-resume-value { font-size: clamp(34px, 6vw, 58px); line-height: 1; font-variant-numeric: tabular-nums; animation: focus-count-in .22s steps(5, end) both; }
.focus-resume-cue[data-start="true"] .focus-resume-value { font-size: clamp(23px, 4vw, 36px); letter-spacing: .04em; }
.focus-resume-cue span { font-size: 11px; font-weight: 700; }
@keyframes focus-count-in { from { transform: scale(.78); opacity: .45; } 75% { transform: scale(1.06); } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .focus-resume-value { animation: none; } }
.focus-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid #3d5548; }
.focus-actions .button { min-height: 40px; }
.focus-actions .button.subtle { color: #dfebdf; border-color: #597264; }
.focus-actions .button.subtle:hover { background: #314c40; }
.focus-actions .button.primary { margin-inline-start: auto; background: #c7ec88; color: #19382b; }
.focus-actions .button.primary:hover { background: #def5ab; }
.focus-budget, .focus-details { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.focus-budget-heading { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.focus-budget-heading h2 { font-size: 15px; }
.focus-budget-state { color: var(--budget-label); background: var(--budget-tint); border-radius: 5px; padding: 4px 7px; font-weight: 700; font-size: 11px; }
.focus-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0 0 12px; }
.focus-metrics dt { color: var(--muted); font-size: 12px; }
.focus-metrics dd { margin: 5px 0 0; color: #234b39; overflow-wrap: anywhere; font-size: clamp(17px, 2.4vw, 25px); font-weight: 800; font-variant-numeric: tabular-nums; }
.focus-metrics div:last-child dd { color: var(--budget-label); }
.focus-budget-chart { --focus-estimate-mark: 100%; --focus-budget-used: 0%; }
.focus-budget-track { position: relative; height: 13px; overflow: hidden; border-radius: 4px; background: #e5ece4; }
.focus-budget-track span { display: block; width: var(--focus-budget-used); height: 100%; background: var(--budget-fill); }
.focus-budget-track i { position: absolute; inset: 0 0 0 clamp(0%, calc(var(--focus-estimate-mark) - 2px), calc(100% - 2px)); border-left: 2px solid #345444; }
.focus-view[data-pace="over"] .focus-budget-track i { background: repeating-linear-gradient(120deg, #fff7 0 2px, transparent 2px 5px); }
.focus-budget-scale { display: flex; justify-content: space-between; margin-top: 6px; gap: 8px; color: var(--muted); font-size: 11px; }
.focus-details h2 { font-size: 15px; }
.focus-details dl { display: flex; flex-wrap: wrap; gap: 9px 24px; margin: 10px 0 0; }
.focus-details dl > div { min-width: 112px; }
.focus-details dt { font-size: 11px; color: var(--muted); }
.focus-details dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 700; }
#focus-detail-note { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.65; }
.focus-message { color: var(--muted); font-size: 12px; }
.focus-message:empty, #focus-error:empty { display: none; }
.status.paused { color: #674211; background: #f7e7cb; }
@media (max-width: 820px) {
  .focus-header { padding-inline: 14px; }
  .focus-body { padding-inline: 12px; }
  .focus-timer { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; }
  .focus-mode { margin-bottom: 14px; }
  .focus-visuals { --focus-visual-size: clamp(104px, 37vw, 200px); }
}
@media (max-width: 390px) {
  .focus-metrics { gap: 5px; }
  .focus-actions .button.primary { margin-inline-start: 0; }
}

.schedule { scroll-margin-top: 16px; }
.schedule-in-project { margin-top: 24px; }
.schedule-in-project #schedule-title { font-size: clamp(21px, 2.3vw, 27px); }
.staff-load { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.staff-load-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; padding: 11px 13px; }
.staff-load-header p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.load-week-controls { display: flex; align-items: center; gap: 5px; color: var(--forest); font-size: 12px; font-weight: 700; }
.load-week-controls .load-week-arrow { min-width: 30px; padding: 2px 6px; font-size: 19px; line-height: 1.1; }
#load-week-label { padding: 0 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#load-this-week:disabled { opacity: .55; }
.staff-load-rows { list-style: none; margin: 0; padding: 0 13px; }
.staff-load-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 3.4fr) minmax(72px, auto); align-items: center; gap: 5px 14px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; font-variant-numeric: tabular-nums; }
.staff-load-person { min-width: 0; overflow-wrap: anywhere; }
.staff-load-person small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.staff-load-plan { display: flex; flex-wrap: wrap; align-items: center; column-gap: 9px; row-gap: 4px; }
.staff-load-plan > strong { white-space: nowrap; }
.staff-load-track { display: flex; flex: 1 1 120px; height: 8px; overflow: hidden; border-radius: 5px; background: #e9efe7; }
.staff-load-segment { height: 100%; }
.staff-load-projects { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 3px 10px; color: var(--muted); font-size: 10px; }
.staff-load-projects span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.staff-load-projects b { white-space: nowrap; }
.staff-load-available { justify-self: end; padding: 4px 7px; border-radius: 5px; background: #e5f3e5; color: #235d42; font-weight: 700; white-space: nowrap; }
.staff-load-available.full { background: #fff1d7; color: #694516; }
.schedule-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: clip; }
.schedule-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.filters { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; gap: 3px; padding: 3px; border-radius: 8px; background: #edf1eb; }
.filters a { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; max-width: min(210px, 100%); padding: 4px 9px; border-radius: 6px; color: #44584e; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.filters a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.filters a:hover { background: #e3ece3; }
.filters a[aria-current="true"] { background: var(--paper); color: #214a37; box-shadow: 0 1px 3px #14291d21; }
#schedule-project-name { min-width: 0; color: var(--forest); font-size: 13px; overflow-wrap: anywhere; }
.metrics { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; color: var(--muted); font-size: 11px; }
.metrics b { font-variant-numeric: tabular-nums; margin-left: 4px; color: var(--ink); font-size: 14px; }
.project-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 11px; padding: 10px 13px; border-bottom: 1px solid var(--line); background: #f8faf6; }
.project-team { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; min-width: 0; }
.project-team svg { color: #406854; }
.project-team small { display: block; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.project-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.project-actions svg { width: 15px; height: 15px; }
.bulk-toolbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 6px 13px; border-bottom: 1px solid var(--line); background: #eef5ea; color: var(--forest); font-size: 12px; font-weight: 700; }
.bulk-toolbar button:disabled { opacity: .55; }
.empty-schedule { padding: 21px 13px; color: var(--muted); font-size: 12px; }
/* The table scrolls inside its own frame, so the header row (and, on wide screens, the task names) can stay in view. */
.table-scroll { position: relative; overflow: auto; max-height: min(78dvh, 920px); }
.task-table { width: 100%; min-width: 936px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; }
.task-table thead th { position: sticky; top: 0; z-index: 3; }
.task-table th, .task-table td { text-align: left; padding: 7px 9px; border-bottom: 1px solid #e8ede6; }
.task-table th { font-size: 11px; color: #52655a; font-weight: 700; background: #f8faf6; height: 34px; }
.task-table th:first-child, .task-table td:first-child { padding-left: 13px; }
.task-table .title-head { width: 176px; }
.task-table .assignee-head { width: 98px; }
.task-table .estimate-head { width: 58px; }
.task-table .actual-head { width: 84px; }
.task-table .status-head { width: 176px; }
.task-table .selection-cell { width: 38px; padding: 4px; text-align: center; }
.selection-cell input { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--forest); cursor: pointer; }
.task-table th:last-child { width: 52px; }
.task-table .edit-cell { padding-inline: 4px; }
@media (min-width: 761px) {
  .task-table td.selection-cell, .task-table td.title-cell, .task-table td.edit-cell { position: sticky; z-index: 2; background: var(--paper); }
  .task-table th.selection-cell, .task-table th.title-head, .task-table th.actions-head { position: sticky; z-index: 4; }
  .task-table .edit-cell, .task-table .actions-head { right: 0; box-shadow: -1px 0 0 #dbe3d9; }
  .task-table .selection-cell { left: 0; }
  .task-table .title-cell, .task-table .title-head { left: var(--sel-w, 0px); box-shadow: 1px 0 0 #dbe3d9; }
  .task-table tbody tr:hover > td.selection-cell, .task-table tbody tr:hover > td.title-cell, .task-table tbody tr:hover > td.edit-cell { background: #f8faf6; }
  .task-table tbody tr:has(.selection-cell input:checked) > td.selection-cell, .task-table tbody tr:has(.selection-cell input:checked) > td.title-cell, .task-table tbody tr:has(.selection-cell input:checked) > td.edit-cell { background: #edf5e9; }
  /* A see-through cell would show the timeline scrolling underneath, so the fixed columns are never dimmed. */
  .deps-focus .task-table tbody tr:not(.dep-self):not(.dep-related) > td.selection-cell, .deps-focus .task-table tbody tr:not(.dep-self):not(.dep-related) > td.title-cell, .deps-focus .task-table tbody tr:not(.dep-self):not(.dep-related) > td.edit-cell { opacity: 1; }
}
.task-table td { height: 43px; }
.task-table tr:last-child td { border-bottom: 0; }
.task-table tbody tr:hover { background: #f8faf6; }
.task-table tbody tr:has(.selection-cell input:checked) { background: #edf5e9; }
.task-title { display: flex; align-items: center; gap: 6px; text-align: left; color: var(--ink); font-size: 12px; font-weight: 700; background: transparent; border: 0; padding: 3px 0; }
.task-title:hover { color: #236244; text-decoration: underline; }
.task-title span, .assignee-cell { overflow-wrap: anywhere; }
.schedule-assignee { display: block; width: 100%; min-height: 29px; padding: 3px 4px; border: 1px solid #cbd9cf; border-radius: 5px; background: var(--paper); color: var(--ink); font: inherit; text-overflow: ellipsis; }
.schedule-assignee:hover { border-color: #8fae9a; }
.unassigned { color: var(--muted); }
.task-title .project-dot { width: 6px; height: 6px; flex-basis: 6px; }
.estimate-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-predecessors { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-deadline { display: inline-block; margin-top: 3px; color: #8d382c; font-size: 11px; font-weight: 700; }
.task-return-note { display: -webkit-box; overflow: hidden; margin-top: 3px; color: #8d382c; font-size: 11px; font-weight: 700; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.return-note { margin-top: 8px; padding: 7px 9px; border-radius: 6px; color: #8d382c; background: #fbeeea; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: pre-wrap; }
.status { display: inline-flex; align-items: center; white-space: nowrap; padding: 3px 6px; border-radius: 5px; font-size: 10px; font-weight: 700; }
.status.todo { color: #52645a; background: #eef1ed; }
.status.doing { color: #235d42; background: #e5f3e5; }
.status.wait, .status.check { color: #694516; background: #fff1d7; }
.status.done { color: #52645a; background: #e6ede9; }
.task-table .timeline-head, .task-table .timeline-cell { padding: 0; }
.days { display: grid; grid-template-columns: repeat(var(--days, 5), 1fr); align-items: stretch; min-height: 34px; }
.days span { text-align: center; display: grid; align-items: center; white-space: nowrap; border-left: 1px solid #e9eee7; }
.timeline-cell { background-image: repeating-linear-gradient(to right, #e9eee7 0, #e9eee7 1px, transparent 1px, transparent calc(100% / var(--days, 5))); }
.track { position: relative; height: 23px; }
.target-marker { position: absolute; top: 2px; height: 19px; border-left: 2px solid #ae5141; color: #8d382c; }
.target-marker span { display: block; padding: 2px 5px; transform: translateX(-100%); background: #fff0e9; border-radius: 4px 0 0 4px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.bar { position: absolute; min-width: 2px; top: 5px; height: 13px; border: 1.5px solid var(--bar-edge); border-radius: 4px; background-color: var(--bar-solid); box-sizing: border-box; }
.bar.milestone { min-width: 8px; height: 8px; top: 7px; border-radius: 1px; transform: rotate(45deg); }
/* --bar-edge is at least 3.4:1 against white and the highlighted row colours; fills keep the original hues. */
.bar.pa { --bar-edge: #3b8a6f; --bar-solid: #77bca2; --bar-todo: #bbded1; --bar-done: #d3eae1; }
.bar.pb { --bar-edge: #b5701f; --bar-solid: #e7b16e; --bar-todo: #f3d8b7; --bar-done: #f7e6d1; }
.bar.pc { --bar-edge: #7a69b5; --bar-solid: #a597d2; --bar-todo: #d2cbe9; --bar-done: #e2def1; }
.bar.pd { --bar-edge: #4a84b0; --bar-solid: #7eaacb; --bar-todo: #bfd5e5; --bar-done: #d6e4ee; }
.staff-load-segment.pa { background: #77bca2; }
.staff-load-segment.pb { background: #e7b16e; }
.staff-load-segment.pc { background: #a597d2; }
.staff-load-segment.pd { background: #7eaacb; }
.bar.todo { background-color: var(--bar-todo); }
.bar.done { background-color: var(--bar-done); }
.bar.wait, .bar.check { background-image: repeating-linear-gradient(135deg, transparent 0 4px, #fff6 4px 7px); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; white-space: nowrap; }
.row-status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
a.button { text-decoration: none; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 5px; padding: 6px 9px; color: var(--ink); border-radius: 7px; border: 1px solid transparent; background: transparent; font-size: 12px; font-weight: 700; white-space: nowrap; }
.button.secondary { border-color: #c9d9ce; background: #f3f8f2; color: #244e3b; }
.button.secondary:hover { background: #e9f2e6; }
.button.primary { background: var(--forest); color: white; }
.button.primary:hover { background: #32624d; }
.button.subtle { color: #496254; }
.button.subtle:hover { background: #ebf1e9; }
.row-actions .button, .row-status-actions .button { font-size: 10px; min-height: 28px; padding: 4px 6px; }
.row-status-actions .button:disabled { background: #e8ede8; color: #52645a; }
.row-actions .button svg, .topbar .button svg { width: 15px; height: 15px; }
.schedule-note { margin-top: 9px; color: var(--muted); font-size: 11px; }

dialog { width: min(450px, calc(100vw - 28px)); max-height: calc(100dvh - 24px); padding: 20px; border: 1px solid #d5e0d8; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 16px 55px #162b2560; }
dialog.project-dialog { width: min(550px, calc(100vw - 28px)); }
.avatar-options { display: grid; gap: 12px; margin-top: 12px; }
.avatar-option-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.avatar-option-group legend { padding: 0 0 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.avatar-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.avatar-option { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 7px 4px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--page); font-size: 12px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.avatar-option:has(:checked) { border-color: #4f8a6b; background: #e8f3e6; }
.avatar-option:has(:focus-visible) { outline: 2px solid #438866; outline-offset: 2px; }
.avatar-option:has(:enabled) { cursor: pointer; }
.avatar-option input { position: absolute; top: 5px; right: 5px; margin: 0; accent-color: var(--forest); }
.avatar-preview { display: block; width: min(96px, 100%); }
.avatar-preview canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.avatar-color-options { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-color-option { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--page); font-size: 11px; cursor: pointer; }
.avatar-color-option:has(:checked) { border-color: #4f8a6b; background: #e8f3e6; }
.avatar-color-option:has(:focus-visible) { outline: 2px solid #438866; outline-offset: 2px; }
.avatar-color-option input { margin: 0; accent-color: var(--forest); }
.avatar-color-swatch { width: 12px; height: 12px; flex: 0 0 12px; border: 1px solid #172a2440; border-radius: 3px; background: var(--avatar-swatch, conic-gradient(#3c80b1, #2e9588, #738b4c, #b7763d, #be6572, #9274ad, #3c80b1)); }
dialog::backdrop { background: #172c25a6; }
.mcp-key-result { margin-top: 12px; padding: 2px 10px 10px; border-radius: 8px; background: #eef5ea; }
.mcp-key-result .button { margin-top: 8px; }
.mcp-keys-heading { margin: 13px 0 0; font-size: 13px; }
.mcp-key-list { list-style: none; max-height: 210px; overflow: auto; margin: 5px 0 0; padding: 0; }
.mcp-key-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.mcp-key-list li div { min-width: 0; overflow-wrap: anywhere; }
.mcp-key-list small { display: block; margin-top: 2px; color: var(--muted); }
.mcp-key-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
dialog h2 { font-size: 20px; line-height: 1.4; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.dialog-context { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.join-request { display: grid; gap: 5px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.join-request .dialog-context { margin: 0; }
.join-request small { color: var(--muted); }
.join-request .dialog-buttons { margin-top: 6px; }
.task-translation { margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.translation-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 8px; }
.translation-controls .field { margin: 0; }
.translation-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.translation-columns > div { min-width: 0; padding: 8px; border-radius: 6px; background: #f0f5ec; }
.translation-columns strong { color: var(--muted); font-size: 12px; }
.translation-columns p { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.glossary-fields { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 10px; }
.glossary-fields input { width: 100%; min-width: 0; }
.glossary-actions { margin-top: 8px; }
.glossary-search { margin-top: 16px; }
.glossary-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.glossary-table th, .glossary-table td { padding: 6px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.glossary-table th:last-child { width: 66px; }
.glossary-table td button { width: 100%; }
dialog.glossary-import-dialog { width: min(820px, calc(100vw - 24px)); }
.glossary-import-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.glossary-import-scroll { max-height: 38vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.glossary-import-table { min-width: 660px; }
.glossary-import-table thead { position: sticky; top: 0; background: var(--paper); z-index: 1; }
.glossary-import-table th:nth-child(3) { width: 29%; }
.glossary-import-table th:last-child { width: 32%; }
.glossary-import-table select { width: 100%; }
.glossary-import-table small { display: block; margin-top: 3px; font-weight: normal; color: var(--muted); }
.glossary-import-table ul { margin: 0; padding-inline-start: 16px; }
.glossary-import-table td { vertical-align: top; }
#glossary-import-visible { color: var(--muted); margin-inline-start: auto; }
.glossary-replacements { margin-top: 10px; padding: 8px; background: #fff5da; border-radius: 6px; overflow-wrap: anywhere; }
.glossary-replacements ul { max-height: 83px; overflow: auto; margin: 4px 0 8px; padding-inline-start: 22px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 16px; }
.project-fields { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.fields label, .field, .staff-add label { display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 700; }
.field { margin-top: 14px; }
.fields select, .fields input, .field input, .field select, .field textarea, .staff-add input { width: 100%; min-width: 0; padding: 8px; border: 1px solid #cad7ce; border-radius: 7px; background: #fafcf9; color: var(--ink); font-size: 16px; }
#request-own-assignment { margin-top: 10px; }
.task-request-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 12px 0 0; }
.task-request-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.task-request-card .dialog-context, .task-request-note { margin: 5px 0; }
.task-request-note { white-space: pre-wrap; }
.task-request-changes { display: grid; gap: 6px; margin: 10px 0 0; font-size: 13px; }
.task-request-changes > div { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr); gap: 8px; }
.task-request-changes dt, .request-before { color: var(--muted); }
.task-request-changes dd { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; min-width: 0; }
.team-roles { margin: 8px 0; }
.team-roles:empty { display: none; }
.fields :disabled { opacity: .85; color: var(--ink); }
.team-fieldset { margin: 16px 0 0; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.team-fieldset legend { padding: 0 4px; font-size: 12px; font-weight: 700; }
.team-options { display: flex; flex-wrap: wrap; gap: 6px; max-height: 148px; padding: 3px; overflow-y: auto; }
.team-options label { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border: 1px solid #d5e1d5; border-radius: 6px; padding: 5px 7px; font-size: 12px; cursor: pointer; }
.team-options label:has(:checked) { background: #e9f4e5; border-color: #a7c5ad; }
.manager-toggle { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 12px; border: 1px solid #d5e1d5; border-radius: 6px; padding: 8px 10px; cursor: pointer; }
.manager-toggle:has(:checked) { background: #e9f4e5; border-color: #a7c5ad; }
.manager-toggle input { margin-top: 3px; }
.manager-toggle span { display: grid; gap: 2px; }
.manager-toggle small { color: var(--muted); font-size: 12px; }
.team-options span { overflow-wrap: anywhere; }
.team-options input { accent-color: var(--forest); margin: 1px 0 0; flex-shrink: 0; }
.staff-add { display: flex; gap: 8px; align-items: end; margin-top: 10px; }
.staff-add label { flex: 1; }
.staff-add .button { min-height: 37px; }
#staff-message:empty { display: none; }
.template-details, .template-task-note { margin-top: 8px; padding: 9px 10px; background: #eef5ea; border-radius: 7px; font-size: 12px; }
.template-details summary { cursor: pointer; font-weight: 700; }
.template-task-note p { margin: 4px 0 0; line-height: 1.65; }
.template-preview { max-height: 205px; overflow: auto; margin: 6px 0 0; padding: 0 6px 0 21px; font-size: 13px; }
.template-preview li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.template-preview strong { float: right; font-variant-numeric: tabular-nums; }
.template-preview small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.error { color: #9a2929; font-size: 12px; margin-top: 6px; }
.error:empty { display: none; }
.dialog-buttons { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.toast { position: fixed; z-index: 5; right: 16px; bottom: 16px; max-width: min(430px, calc(100vw - 32px)); padding: 11px 15px; border-radius: 8px; background: #213f33; color: #fff; box-shadow: 0 8px 24px #162b2540; font-size: 13px; }

@media (max-width: 1020px) {
  .layout { grid-template-columns: 176px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
}
@media (max-width: 760px) {
  .layout { display: block; }
  .sidebar { position: sticky; z-index: 6; height: auto; padding: 6px 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 6px; }
  .brand { gap: 6px; padding: 0; }
  .brand-icon { width: 31px; height: 31px; flex-basis: 31px; }
  .brand-icon svg { width: 18px; height: 18px; }
  .brand b { font-size: 12px; }
  .brand small { display: none; }
  .nav { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 2px; margin-top: 0; }
  .nav-link { width: auto; min-height: 39px; font-size: 11px; padding: 6px; gap: 4px; white-space: nowrap; }
  .nav-link svg { width: 14px; height: 14px; }
  .sidebar-footer { grid-column: 1 / -1; grid-row: 3; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 0; }
  .sidebar-footer .work-assistant { padding-block: 4px; }
  .sidebar-details-toggle { grid-column: 2; grid-row: 2; display: flex; justify-self: end; }
  .sidebar-details-toggle[aria-expanded="true"] { color: #e9f5dc; background: #31483d; }
  .sidebar-details { grid-column: 1 / -1; grid-row: 4; max-height: min(44dvh, 310px); margin: 0 -4px; padding-bottom: 6px; }
  .sidebar-details-toggle[aria-expanded="false"] + .sidebar-details { display: none; }
  .main, .schedule, .shared-room { scroll-margin-top: 139px; }
  .sidebar-foot { display: none; }
  .topbar { min-height: 42px; padding-inline: 14px; }
  .topbar { flex-wrap: wrap; gap: 3px 8px; }
  .content { padding: 19px 13px 25px; }
  .intro { margin-bottom: 14px; }
}
@media (max-width: 540px) {
  .my-task-current { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 13px; }
  .work-assistant-controls { justify-items: start; }
  .staff-load-row { grid-template-columns: minmax(0, 1fr) auto; }
  .staff-load-plan { grid-column: 1 / -1; grid-row: 2; }
  .studio { padding: 8px; }
  .studio-hint { font-size: 9px; }
  .studio-top { gap: 5px; }
  .intro p { font-size: 12px; }
}
@media (max-width: 390px) {
  .project-fields { grid-template-columns: minmax(0, 1fr); }
  .intro .add-project { font-size: 11px; padding-inline: 6px; }
}

.deps-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.deps-toggle input { width: 14px; height: 14px; margin: 0; accent-color: var(--forest); }
.timeline-overlay { position: absolute; left: 0; top: 0; z-index: 1; overflow: visible; pointer-events: none; }
.dep-edge { transition: opacity .12s; }
.dep-edge path { fill: none; stroke: #5d7b6a; stroke-width: 1; }
.dep-edge polygon { fill: #5d7b6a; }
.deps-focus .dep-edge:not(.active) { opacity: .15; }
.dep-edge.active path { stroke: #276548; stroke-width: 1.6; opacity: 1; }
.dep-edge.active polygon { fill: #276548; opacity: 1; }
.days span.today { background: #eaf2fa; color: #2c5f95; font-weight: 700; }
.today-line line { stroke: #3b6ea5; stroke-width: 1.5; }
.today-line rect { fill: #3b6ea5; }
.today-line text { fill: #fff; font-size: 9px; font-weight: 700; }
.task-table td { transition: opacity .12s; }
.deps-focus .task-table tbody tr:not(.dep-self):not(.dep-related) > td { opacity: .4; }
.task-table tbody tr.dep-self > td { background: #e8f2e4; }
.task-table tbody tr.dep-related > td { background: #f3f8f0; }
.bar[data-bar] { cursor: pointer; }
.bar.tentative { border-style: dashed; background-color: var(--bar-done); }
.bar.late { box-shadow: 0 0 0 1.5px #ae5141; }
.task-late { display: inline-block; margin: 3px 0 0 6px; color: #8d382c; font-size: 10px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .dep-edge, .task-table td { transition: none; } }

.schedule-toolbar { position: relative; }
.schedule-legend { font-size: 11px; }
.schedule-legend summary { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-weight: 700; cursor: pointer; list-style: none; }
.schedule-legend summary::-webkit-details-marker { display: none; }
.schedule-legend summary::before { content: "\24D8"; font-size: 13px; line-height: 1; }
.schedule-legend[open] summary { background: #edf1eb; }
.legend-list { position: absolute; z-index: 6; top: calc(100% - 2px); right: 13px; display: grid; gap: 7px; width: max-content; max-width: calc(100% - 26px); margin: 0; padding: 10px 12px; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: 0 8px 24px #162b2530; color: var(--ink); font-weight: 400; }
.legend-list li { display: flex; align-items: center; gap: 8px; }
.legend-bar.bar { position: static; display: inline-block; flex: 0 0 28px; width: 28px; }
.legend-today { flex: 0 0 28px; height: 0; border-top: 1.5px solid #3b6ea5; }
.update-banner { position: fixed; z-index: 8; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 28px); padding: 7px 10px 7px 13px; border: 1px solid #e1c99e; border-radius: 9px; background: #fff2d9; color: #604315; box-shadow: 0 4px 18px #4339232b; font-size: 12px; font-weight: 700; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-inline-start: 5px; padding: 0 5px; border-radius: 9px; background: #8d382c; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.admin-menu { position: relative; }
.menu-caret { margin-inline-start: 4px; font-size: 10px; }
.admin-menu-list { position: absolute; z-index: 8; top: calc(100% + 4px); right: 0; display: grid; min-width: 160px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: 0 8px 24px #162b2530; }
.admin-menu-list .button { justify-content: flex-start; width: 100%; }
#backup-download { margin-top: 14px; }
.backup-heading { margin: 16px 0 6px; font-size: 13px; }
.backup-list { display: grid; max-height: 40dvh; margin: 0; padding: 0; overflow: auto; list-style: none; }
.backup-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.backup-list small { display: block; margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.staff-load-unassigned { grid-template-columns: minmax(0, 1fr); }
.staff-load-unassigned a { justify-self: start; padding: 4px 8px; border-radius: 5px; background: #fff1d7; color: #694516; font-weight: 700; text-decoration: none; }
.staff-load-unassigned a:hover { text-decoration: underline; }
.task-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.task-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 5px; background: #eef1ed; color: #52645a; font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.task-badge svg { width: 11px; height: 11px; }
.task-badge.priority-high { background: #fbeeea; color: #8d382c; }
.task-badge.priority-low { background: #eef1ed; color: #6b7a71; font-weight: 400; }
.task-badge.subtask-badge.complete { background: #e5f3e5; color: #235d42; }
.dialog-badges:not(:empty) { margin-bottom: 4px; }
.dialog-badges .task-badges { margin-top: 0; }
.task-extras { margin: 14px 0 16px; padding: 12px 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.task-extras .dialog-context { margin-bottom: 10px; }
.task-extras-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; }
.subtask-progress { color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.subtask-list { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; }
.subtask { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 2px 4px; border-radius: 6px; }
.subtask:hover { background: #f4f7f2; }
.subtask-check { display: flex; flex: 1; align-items: flex-start; gap: 7px; min-width: 0; font-size: 13px; line-height: 1.5; cursor: pointer; }
.subtask-check input { margin: 3px 0 0; accent-color: var(--forest); flex-shrink: 0; }
.subtask-text { overflow-wrap: anywhere; }
.subtask.done .subtask-text { color: var(--muted); text-decoration: line-through; }
.subtask-edit { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid #a7c5ad; border-radius: 6px; font-size: 16px; }
.subtask-tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.subtask-button { min-width: 26px; height: 24px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; }
.subtask-button:hover { background: #e7eee5; color: var(--ink); }
.subtask-button svg { width: 12px; height: 12px; }
.subtask-delete.armed { background: #fbeeea; color: #8d382c; font-weight: 700; }
.subtask-add { display: flex; gap: 6px; margin-top: 8px; }
.subtask-add input { flex: 1; min-width: 0; padding: 7px 8px; border: 1px solid #cad7ce; border-radius: 7px; background: #fafcf9; color: var(--ink); font-size: 16px; }
.subtask-add .button { flex-shrink: 0; }
.memo-block { margin-top: 14px; }
.memo-block label { font-size: 13px; }
.memo-block textarea { display: block; width: 100%; margin-top: 5px; padding: 8px; border: 1px solid #cad7ce; border-radius: 7px; background: #fafcf9; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.6; resize: vertical; }
.memo-block textarea:read-only { background: #f4f6f1; }
.memo-meta { display: flex; align-items: center; gap: 8px; min-height: 18px; margin-top: 3px; font-size: 11px; }
.memo-status { color: var(--muted); }
.memo-status.saved { color: #235d42; font-weight: 700; }
.memo-status.error { color: #9a2929; font-weight: 700; }
