@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-elev: #fff;
  --ink: #25364b;
  --muted: #65758a;
  --faint: #78899c;
  --line: #dde5ee;
  --line-soft: #e9eef4;
  --accent: #547baa;
  --accent-strong: #365e91;
  --accent-dim: #eaf0f8;
  --green: #36856b;
  --red: #bb5264;
  --yellow: #b88b37;
  --gray: #8a99aa;
  --sidebar: 324px;
  --header: 84px;
  --radius: 12px;
  --ease: 200ms cubic-bezier(.2, .7, .2, 1);
  font-family: "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scrollbar-gutter: stable; }
body { margin: 0; min-height: 100dvh; background: linear-gradient(145deg, #f9fbfd, var(--bg) 55%); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; opacity: .6; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: #dce7f5; color: #25364b; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 80; background: var(--accent-strong); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 11px; line-height: 1.8; }

/* Navigation and snapshot: keep stable space for every numeric update. */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--header); padding: 0 28px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; background: url('/favicon.svg') center / contain no-repeat; }
.brand h1 { font-size: 20px; line-height: 1.4; letter-spacing: -.035em; font-weight: 700; }
.brand p { font-size: 10px; color: var(--muted); margin-top: 3px; letter-spacing: .025em; }
.top-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
.snapshot { font-size: 10px; color: var(--muted); white-space: nowrap; }
.snapshot time { font-weight: 600; color: #4a607c; font-variant-numeric: tabular-nums; margin: 0 5px; }
.snapshot > span { color: var(--faint); }
.summary { display: flex; align-items: center; gap: 24px; }
.summary-item { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.summary-item strong { font-size: 18px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; color: var(--ink); min-width: 1.2ch; }
.mobile-task { display: none; }
.dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; color: var(--gray); box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 10%, transparent); }
.dot.green { color: var(--green); }
.dot.red { color: var(--red); }
.dot.yellow { color: var(--yellow); }
.dot.gray, .dot.neutral { color: var(--gray); }
.rolling-count { font-variant-numeric: tabular-nums; }
.count-window { display: inline-block; height: 1.2em; line-height: 1.2; overflow: hidden; vertical-align: middle; }
.count-reel { display: flex; flex-direction: column; }
.count-reel > span { display: block; height: 1.2em; line-height: 1.2; text-align: center; }

/* Fixed task rail. */
.task-panel { position: fixed; top: var(--header); left: 0; bottom: 0; width: var(--sidebar); z-index: 15; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 25px 24px 10px; }
.eyebrow { display: block; font-size: 10px; letter-spacing: .13em; color: var(--accent); font-weight: 500; line-height: 1.6; margin-bottom: 6px; }
.panel-heading h2 { font-size: 17px; letter-spacing: -.025em; }
.icon-button.close-panel { display: none; }
.panel-auth { padding: 0 24px 20px; }
.text-button { background: none; border: 0; padding: 3px 0; color: var(--muted); font-size: 11px; transition: color var(--ease); }
.text-button:hover { color: var(--accent-strong); }
.panel-tabs { --tab-index: 0; position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 16px; padding: 4px; border-radius: 9px; background: #f0f3f7; border: 1px solid var(--line-soft); }
.panel-tabs::before { content: ""; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: 6px; background: #fff; box-shadow: 0 1px 4px #25364b12; transform: translateX(calc(var(--tab-index) * 100%)); transition: transform 240ms cubic-bezier(.2,.7,.2,1); }
.tab { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 34px; padding: 0 3px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; transition: color var(--ease); }
.tab:hover, .tab.active { color: var(--accent-strong); }
.tab.active { font-weight: 600; }
.tab .count { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 18px; padding: 0 4px; border-radius: 4px; background: #e6ebf1; color: var(--muted); font-size: 10px; font-weight: 500; transition: background var(--ease), color var(--ease); }
.tab.active .count { color: var(--accent-strong); background: var(--accent-dim); }
.tab-panels { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 20px 16px 28px; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
label { display: block; margin: 17px 0 7px; font-size: 12px; font-weight: 500; }
.optional { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.required { color: var(--red); }
input, textarea { width: 100%; border: 1px solid var(--line); background: #fcfdfe; border-radius: 7px; padding: 10px 11px; font-size: 12px; transition: border-color var(--ease), box-shadow var(--ease); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 100px; resize: vertical; line-height: 1.8; }
input:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-dim); background: #fff; }
.file-label { padding: 12px; border: 1px dashed #c4d2e1; border-radius: 7px; background: #f7f9fc; cursor: pointer; }
.file-label .optional { display: block; margin: 4px 0 0; }
input[type=file] { padding: 6px; font-size: 10px; }
input::file-selector-button { border: 0; padding: 7px 10px; margin-right: 8px; border-radius: 4px; background: var(--accent-dim); color: var(--accent-strong); cursor: pointer; font: inherit; }
#file-hint { margin-top: 6px; }
.primary-button, .ghost-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; white-space: nowrap; transition: background var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease); }
.primary-button { background: var(--accent-strong); color: #fff; font-weight: 500; box-shadow: 0 2px 3px #365e9114; }
.primary-button:hover { background: #2c507e; box-shadow: 0 3px 8px #365e9124; }
.primary-button:active, .ghost-button:active { transform: translateY(1px); }
#task-form > .primary-button { width: 100%; margin-top: 12px; }
.ghost-button { background: #fff; border-color: var(--line); }
.ghost-button:hover { border-color: #bacbde; background: #f9fbfd; }
.ghost-button[aria-busy=true] .refresh-icon { animation: refresh-spin 1.1s linear infinite; }
.form-message { min-height: 1.4em; color: var(--red); font-size: 11px; line-height: 1.7; margin: 8px 0 0; }
.form-message.success { color: var(--green); }
.task-item, .inbox-record { border: 1px solid var(--line-soft); border-radius: 9px; padding: 16px; margin-bottom: 12px; background: #fff; box-shadow: 0 2px 5px #25364b03; overflow-wrap: anywhere; }
.task-item h4, .inbox-record strong { font-size: 13px; font-weight: 600; line-height: 1.65; }
.progress-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; margin: 10px 0 8px; font-variant-numeric: tabular-nums; }
.progress-meta strong { color: var(--accent-strong); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.progress-track { display: block; width: 100%; height: 4px; appearance: none; border: 0; border-radius: 4px; overflow: hidden; background: #eaf0f5; color: #6e90b9; margin: 0 0 12px; }
.progress-track::-webkit-progress-bar { background: #eaf0f5; border-radius: 4px; }
.progress-track::-webkit-progress-value { background: #6e90b9; border-radius: 4px; }
.progress-track::-moz-progress-bar { background: #6e90b9; border-radius: 4px; }
.step-title { font-size: 10px; line-height: 1.7; color: var(--accent-strong); margin-bottom: 5px; }
.step-text { font-size: 12px; line-height: 1.85; }
.task-note, .inbox-record p { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.85; }
.artifact-path, .attachment-link { display: inline-block; font-size: 11px; margin-top: 8px; overflow-wrap: anywhere; }
.inbox-status { font-size: 10px; color: var(--accent-strong); background: var(--accent-dim); padding: 2px 6px; border-radius: 4px; font-weight: 500; }
.task-steps { margin-top: 10px; font-size: 11px; line-height: 1.8; }
.task-steps ol { padding-left: 20px; }
.task-steps li + li { margin-top: 8px; }
summary { cursor: pointer; color: var(--muted); transition: color var(--ease); }
summary:hover { color: var(--accent-strong); }
.inbox-details { margin-top: 24px; }
.inbox-details > summary { margin-bottom: 12px; }
.empty { padding: 20px 4px; color: var(--muted); font-size: 12px; line-height: 1.8; }

/* Two toolbar rows by construction: the title can never compete with filters. */
main { min-width: 0; margin-left: var(--sidebar); padding: 30px 30px 20px; min-height: calc(100dvh - var(--header)); }
.office-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "heading actions" "filters filters"; align-items: center; gap: 22px 16px; margin-bottom: 14px; }
.office-heading { grid-area: heading; min-width: 0; }
.office-heading .eyebrow { white-space: nowrap; }
.office-heading h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; font-size: 28px; line-height: 1.4; font-weight: 600; letter-spacing: -.04em; white-space: nowrap; }
#office-total { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.office-actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 12px; white-space: nowrap; }
.refresh-note { color: var(--muted); font-size: 10px; }
.filters { grid-area: filters; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.filter { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; min-height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease); }
.filter:hover { color: var(--ink); background: #eaf0f7; }
.filter.active { background: #fff; color: var(--accent-strong); border-color: #d6e1ee; box-shadow: 0 1px 3px #25364b08; font-weight: 600; }
.filter[data-filter=red].active { color: #a74354; border-color: #e9c7ce; background: #fff7f8; }
#board-message { color: var(--accent-strong); font-size: 11px; line-height: 1.8; margin: 0 0 8px; }
#board-message:empty { display: none; }
.office-floor { display: flex; flex-direction: column; min-width: 0; gap: 26px; }
.office-row { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.group-sign { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; min-width: 0; }
.row-number { font-size: 10px; font-variant-numeric: tabular-nums; color: var(--accent); letter-spacing: .06em; font-weight: 600; }
.group-sign h3 { font-size: 15px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.group-size { font-size: 10px; color: var(--muted); white-space: nowrap; }
.desks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 14px; min-width: 0; overflow: visible; }
.empty-row { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 9px; padding: 24px; color: var(--muted); font-size: 12px; }
.desk { appearance: none; position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; margin: 0; padding: 0; border: 1px solid #dce5ef; border-radius: var(--radius); background: #fff; color: inherit; text-align: left; box-shadow: 0 2px 4px #233e5e03, 0 6px 14px #233e5e03; transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
@media (hover: hover) {
  .desk:hover { transform: translateY(-3px); border-color: #bbcfe2; box-shadow: 0 5px 9px #233e5e06, 0 12px 24px #233e5e0c; }
}
.desk:active { transform: translateY(-1px); }
.stage { position: relative; width: 100%; padding-top: 12px; background: linear-gradient(155deg, #f9fbfd, #edf3f8); border-radius: 11px 11px 0 0; line-height: 0; }
.desk-state { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.desk-state .dot { width: 5px; height: 5px; flex-basis: 5px; box-shadow: none; }
.desk[data-status=red] { border-color: #e3bcc4; }
.desk[data-status=red] .stage { background: linear-gradient(155deg, #fffafb, #f7ecef); }
.desk[data-status=red] .desk-state { color: #a74354; font-weight: 600; }
.desk[data-status=gray] .stage, .desk[data-status=neutral] .stage { background: linear-gradient(155deg, #f7f9fb, #edf0f4); }
.workstation { width: 100%; height: auto; overflow: visible; }
.workstation .screen { fill: #E7F2FF; }
.workstation .lamp, .workstation .lamp-halo { fill: var(--green); }
.workstation .lamp-halo,
.workstation .actor, .workstation .head, .workstation .arms-bob,
.workstation .arm-l, .workstation .arm-r, .workstation .hand-l, .workstation .hand-r,
.workstation .code-scroll, .workstation .cursor,
.workstation .key-spark, .workstation .type-bubble {
  transform-box: fill-box;
  transform-origin: center;
}
.workstation .head { transform-origin: 50% 92%; }
.workstation .arm-l { transform-origin: 18% 12%; }
.workstation .arm-r { transform-origin: 22% 10%; }
.workstation .lamp-halo { opacity: .12; }
.workstation .typing-fx, .workstation .cursor { visibility: hidden; }
.workstation[data-status=green] .lamp-halo { animation: breathe 3.4s ease-in-out infinite; }
.workstation[data-status=green] .actor { animation: work-bob 2.2s ease-in-out infinite; }
.workstation[data-status=green] .arms-bob { animation: work-bob 2.2s ease-in-out infinite; }
.workstation[data-status=green] .head { animation: nod 2.2s ease-in-out infinite; }
.workstation[data-status=green] .arm-l { animation: type-left .52s ease-in-out infinite; }
.workstation[data-status=green] .arm-r { animation: type-right .52s ease-in-out infinite; }
.workstation[data-status=green] .code-scroll { animation: code-scroll 6s linear infinite; }
.workstation[data-status=green] .cursor { visibility: visible; animation: blink 1.05s steps(1, end) infinite; }
.workstation[data-status=green] .typing-fx { visibility: visible; }
.workstation[data-status=green] .type-bubble { animation: bubble 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.workstation[data-status=green] .key-spark.s1 { animation: spark 1.15s ease-out infinite; }
.workstation[data-status=green] .key-spark.s2 { animation: spark 1.15s ease-out .38s infinite; }
.workstation[data-status=green] .key-spark.s3 { animation: spark 1.15s ease-out .72s infinite; }
.workstation[data-status=yellow] .actor,
.workstation[data-status=yellow] .arms-bob { animation: idle-breathe 3.6s ease-in-out infinite; }
.workstation[data-status=yellow] .lamp-halo { opacity: .16; animation: breathe 4s ease-in-out infinite; }
.workstation[data-status=red] .lamp, .workstation[data-status=red] .lamp-halo { fill: var(--red); }
.workstation[data-status=red] .lamp-halo { opacity: .23; }
.workstation[data-status=red] .screen { fill: #f1dfe4; }
.workstation[data-status=red] .code-scroll, .workstation[data-status=red] .cursor { visibility: hidden; }
.workstation[data-status=yellow] .lamp, .workstation[data-status=yellow] .lamp-halo { fill: var(--yellow); }
.workstation[data-status=yellow] .screen { fill: #f0ecdf; }
.workstation[data-status=gray] .lamp, .workstation[data-status=neutral] .lamp { fill: var(--gray); }
.workstation[data-status=gray] .lamp-halo, .workstation[data-status=neutral] .lamp-halo { opacity: 0; }
.workstation[data-status=gray] .screen, .workstation[data-status=neutral] .screen { fill: #4b5c6e; }
.workstation[data-status=gray] .screen-ui, .workstation[data-status=neutral] .screen-ui { opacity: .19; }
.ui-alert { display: none; }
.workstation[data-status=red] .ui-alert { display: block; }
.nameplate { display: flex; flex-direction: column; width: 100%; flex: 1; min-width: 0; padding: 12px; background: #fff; border-top: 1px solid #e5ecf3; border-radius: 0 0 11px 11px; }
.desk-id { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; margin-bottom: 7px; }
.desk-name { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-role { flex: 0 0 auto; font-size: 9px; line-height: 1.6; color: var(--faint); white-space: nowrap; }
.desk.leader .desk-role { padding: 1px 5px; color: var(--accent-strong); background: #edf2f8; border-radius: 4px; font-weight: 500; }
.desk-task { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; height: 3.4em; overflow: hidden; overflow-wrap: anywhere; font-size: 11px; line-height: 1.7; color: #607186; }
.desk-task.unread-label { color: var(--muted); }
.desk-time { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 6px; min-width: 0; margin-top: 12px; padding-top: 9px; border-top: 1px solid #edf1f5; color: var(--muted); font-size: 9px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.desk-time time { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-time .relative { color: var(--faint); white-space: nowrap; }
.office-footer { padding: 28px 0 8px; color: var(--muted); font-size: 10px; }

/* Native dialog focus handling, with a right-side detail drawer. */
dialog { width: 480px; max-width: calc(100% - 32px); padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px #20364d24; }
dialog::backdrop { background: #1e304b38; backdrop-filter: blur(3px); }
.detail-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: 480px; max-width: 100%; height: 100%; height: 100dvh; max-height: 100dvh; padding: 28px 30px max(32px, env(safe-area-inset-bottom)); border: 0; border-left: 1px solid var(--line); border-radius: 0; overflow-y: auto; overscroll-behavior: contain; }
.detail-dialog[open] { animation: drawer-enter 280ms cubic-bezier(.2,.7,.2,1) both; }
.detail-dialog[open]::backdrop { animation: backdrop-enter 240ms ease both; }
.detail-dialog.is-closing::backdrop { animation: backdrop-exit 180ms ease both; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dialog-top .eyebrow { margin: 0; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); font-size: 20px; transition: background var(--ease), color var(--ease); }
.icon-button:hover { color: var(--ink); background: var(--bg); }
.bot-title { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.bot-title > div:last-child { min-width: 0; }
.bot-title h2 { font-size: 24px; line-height: 1.5; margin-bottom: 10px; overflow-wrap: anywhere; }
.bot-title .dot { margin-left: 8px; }
.bot-figure { width: 100%; border: 1px solid var(--line-soft); border-radius: 10px; background: linear-gradient(150deg, #f8fafc, #edf3f8); }
.bot-figure .workstation { width: 260px; max-width: 100%; margin: 0 auto; }
.leader-badge { font-size: 10px; color: var(--accent-strong); background: var(--accent-dim); border-radius: 4px; padding: 3px 8px; }
.detail-meta { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 10px 0 26px; }
.detail-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.detail-section h3 { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .1em; margin-bottom: 9px; }
.detail-section p { line-height: 1.9; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-section .relative { display: inline-block; margin-left: 10px; color: var(--muted); font-size: 11px; }
.login-dialog { width: 390px; }
.login-dialog[open] { animation: content-enter 220ms ease both; }
.login-dialog h2 { font-size: 22px; margin-bottom: 8px; }
.login-dialog form { margin-top: 20px; }
.drawer-backdrop { position: fixed; inset: 0; background: #1e304b38; backdrop-filter: blur(3px); z-index: 29; animation: backdrop-enter 200ms ease both; }
.drawer-open, .detail-open { overflow: hidden; }

@keyframes breathe { 0%, 100% { opacity: .1; transform: scale(.9); } 50% { opacity: .24; transform: scale(1.13); } }
@keyframes work-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3.6px); } }
@keyframes nod { 0%, 100% { transform: rotate(0deg) translateY(0); } 35% { transform: rotate(6deg) translateY(2.8px); } 68% { transform: rotate(-2deg) translateY(-1px); } }
@keyframes type-left {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  22% { transform: rotate(-11deg) translateY(11px); }
  44% { transform: rotate(-1.5deg) translateY(1px); }
  68% { transform: rotate(-8deg) translateY(8px); }
}
@keyframes type-right {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  18% { transform: rotate(1.5deg) translateY(0.8px); }
  40% { transform: rotate(11deg) translateY(11px); }
  62% { transform: rotate(1.5deg) translateY(1px); }
  82% { transform: rotate(8deg) translateY(8px); }
}
@keyframes code-scroll { 0% { transform: translateY(0); } 100% { transform: translateY(-32px); } }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes spark {
  0% { opacity: 0; transform: translate(0, 0) scale(.35); }
  25% { opacity: .55; transform: translate(2px, -5px) scale(1); }
  100% { opacity: 0; transform: translate(6px, -13px) scale(.2); }
}
@keyframes bubble {
  0%, 100% { opacity: 0; transform: translateY(3px) scale(.88); }
  18%, 62% { opacity: .9; transform: translateY(0) scale(1); }
  82% { opacity: 0; transform: translateY(-4px) scale(.92); }
}
@keyframes idle-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.2px); } }
@keyframes drawer-enter { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: translateX(0); } }
@keyframes content-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-exit { from { opacity: 1; } to { opacity: 0; } }
@keyframes refresh-spin { to { transform: rotate(360deg); } }

@media (min-width: 1600px) {
  :root { --sidebar: 352px; }
  main { padding-left: 36px; padding-right: 36px; }
  .desks { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  :root { --sidebar: 288px; }
  .topbar { padding: 0 20px; gap: 16px; }
  .summary { gap: 16px; }
  .brand h1 { font-size: 18px; }
  main { padding: 24px 20px; }
  .office-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
  .desks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
  .nameplate { padding: 10px; }
  .panel-heading { padding-left: 20px; padding-right: 20px; }
  .panel-auth { padding-left: 20px; }
  .tab { font-size: 10px; }
}
@media (max-width: 760px) {
  :root { --sidebar: min(360px, 92vw); --header: auto; }
  html { scrollbar-gutter: auto; }
  .topbar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; height: auto; gap: 20px 12px; padding: 20px 16px 16px; }
  .brand { min-width: 0; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .brand h1 { font-size: 18px; white-space: nowrap; }
  .brand p { font-size: 9px; letter-spacing: 0; line-height: 1.7; }
  .mobile-task { display: block; grid-column: 2; grid-row: 1; border: 1px solid #d4dfec; border-radius: 7px; background: #f1f5fa; color: var(--accent-strong); min-height: 36px; padding: 0 12px; font-size: 11px; white-space: nowrap; }
  .top-meta { grid-column: 1 / -1; grid-row: 2; width: 100%; align-items: stretch; gap: 12px; }
  .snapshot { font-size: 9px; display: flex; align-items: baseline; flex-wrap: wrap; }
  .summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .summary-item { display: grid; grid-template-columns: 6px 1fr; gap: 6px; font-size: 9px; padding-left: 3px; }
  .summary-item .dot { align-self: center; }
  .summary-item strong { grid-column: 2; font-size: 21px; }
  main { margin-left: 0; padding: 24px 12px 12px; min-height: 60dvh; }
  .office-toolbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "heading actions" "filters filters"; gap: 18px 10px; margin-bottom: 16px; }
  .office-heading .eyebrow { font-size: 9px; letter-spacing: .08em; margin-bottom: 5px; }
  .office-heading h2 { font-size: 24px; gap: 7px; }
  #office-total { font-size: 10px; }
  .office-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
  .refresh-note { font-size: 9px; white-space: nowrap; }
  .ghost-button { min-height: 34px; padding: 0 10px; font-size: 11px; }
  .filters { flex-wrap: wrap; gap: 5px; width: 100%; }
  .filter { padding: 0 9px; min-height: 34px; font-size: 10px; gap: 5px; }
  .filter .dot { width: 5px; height: 5px; flex-basis: 5px; }
  .office-floor { gap: 24px; }
  .office-row { padding-top: 17px; gap: 12px; }
  .group-sign { gap: 8px; }
  .group-sign h3 { font-size: 14px; }
  .group-size { font-size: 10px; }
  .desks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .stage { padding-top: 13px; }
  .desk-state { top: 10px; left: 10px; font-size: 9px; }
  .nameplate { padding: 10px; }
  .desk-id { gap: 4px; }
  .desk-name { font-size: 13px; }
  .desk-role { font-size: 9px; }
  .desk-task { font-size: 11px; }
  .desk-time { flex-direction: column; align-items: flex-start; gap: 3px; font-size: 10px; min-height: 42px; margin-top: 10px; padding-top: 8px; }
  .task-panel { top: 0; bottom: 0; z-index: 30; transform: translateX(-105%); transition: transform 240ms cubic-bezier(.2,.7,.2,1), visibility 240ms; visibility: hidden; box-shadow: 8px 0 40px #1c2b4520; }
  .task-panel.open { transform: translateX(0); visibility: visible; }
  .icon-button.close-panel { display: inline-flex; }
  .detail-dialog { width: min(440px, 94vw); padding: 20px 22px max(28px, env(safe-area-inset-bottom)); }
  .bot-title h2 { font-size: 22px; }
  .bot-figure .workstation { width: 220px; }
  /* Prevent iOS zoom from changing the two-column viewport on form focus. */
  input, textarea { font-size: 16px; }
}
@media (max-width: 359px) {
  .brand-mark { display: none; }
  .brand h1 { font-size: 17px; }
  .refresh-note { font-size: 8px; }
  .filter { padding: 0 7px; }
  .nameplate { padding: 8px; }
  .desk-name { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .workstation .typing-fx, .workstation .cursor { visibility: hidden !important; }
}
