:root {
  color: #25283e;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 13px;
  background: #e9edf4;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow: hidden; }
button, a { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #aa99f1; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
#office-canvas, #scene-overlay { position: fixed; inset: 0; width: 100%; height: 100%; }
#office-canvas { z-index: 0; }
#scene-overlay { z-index: 1; pointer-events: none; }
.fallback { position: fixed; z-index: 2; top: 50%; left: 40%; color: #60677d; }
.topbar {
  position: fixed; z-index: 10; inset: 0 0 auto; height: 76px; display: flex; align-items: center; gap: 20px;
  padding: 0 24px; background: rgba(255,255,255,.94); border-bottom: 1px solid #e8e8f0;
  box-shadow: 0 3px 22px #4442680a; backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; color: #1e293b; text-decoration: none; flex: none; white-space: nowrap; }
.brand-mark { display: block; width: 38px; height: 38px; flex: none; border-radius: 10px; box-shadow: 0 6px 14px #4f46e533; }
.brand b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.4px; line-height: 1; color: #1e293b; }
.brand b span { margin-left: 5px; font-weight: 500; color: #4f46e5; }
.brand small { display: block; font-size: 7.5px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: #94a3b8; margin-top: 5px; }
.top-divider { height: 32px; width: 1px; background: #e9e9ef; }
.mode-tabs { display: flex; gap: 4px; flex: none; }
.mode-tabs a { padding: 7px 9px; border-radius: 9px; color: #8a809f; text-decoration: none; font-size: 12px; font-weight: bold; }
.mode-tabs a[aria-current] { background: #eee9fa; color: #6351a7; }
.mode-tabs small { display: block; font-size: 10px; font-weight: normal; }
@media (max-width: 700px) {
  .mode-tabs small { display: none; }
  .brand { gap: 6px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
  .brand b { font-size: 13px; }
  .brand b span { margin-left: 3px; }
  .mode-tabs a { padding: 7px 5px; }
}
.sprint-title { min-width: 190px; }
.sprint-title small { display: block; color: #a6a4b5; font-size: 9px; letter-spacing: 1px; font-weight: 700; }
.sprint-title small span { margin: 0 4px; color: #d3d0dd; }
.sprint-title strong { display: block; margin-top: 4px; font-size: 13px; }
.day-control { display: flex; gap: 14px; align-items: center; margin-left: auto; }
.day-label { white-space: nowrap; font-size: 15px; font-weight: 800; letter-spacing: .5px; }
.day-label small { color: #aaa9b8; font-size: 11px; }
.live-dot { display: inline-block; width: 7px; height: 7px; background: #59b895; border-radius: 50%; box-shadow: 0 0 0 3px #def3e9; margin-right: 7px; vertical-align: middle; }
.day-dots { display: flex; gap: 5px; }
.day-dots span { width: 13px; height: 4px; border-radius: 8px; background: #e7e5ef; }
.day-dots .done { background: #8c79d6; }
.day-dots .current { background: #5846a9; }
.controls { display: flex; gap: 8px; }
.control-btn, .drawer-toggle { border: 1px solid #e5e3ee; background: #fff; padding: 10px 14px; border-radius: 9px; color: #605d73; font-weight: 700; white-space: nowrap; }
.control-btn:hover, .drawer-toggle:hover { background: #f5f2ff; }
.control-btn.primary { background: #6855b7; border-color: #6855b7; color: white; box-shadow: 0 4px 10px #6a59b631; }
.control-btn.primary:hover { background: #55429f; }
.control-btn:disabled { opacity: .5; }
.drawer-toggle { background: #f5f3fc; color: #6554ab; }
.workspace-label { position: fixed; z-index: 2; left: 28px; top: 108px; pointer-events: none; }
.eyebrow { color: #8d7dc0; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.workspace-label h1 { font-size: 25px; line-height: 1.4; letter-spacing: .04em; margin: 13px 0 8px; }
.workspace-label p { color: #858899; font-size: 12px; line-height: 1.8; }
.agent-card, .drawer { position: fixed; z-index: 5; background: rgba(255,255,255,.95); border: 1px solid #ffffff; box-shadow: 0 12px 40px #44425b19; backdrop-filter: blur(18px); }
.agent-card { top: 260px; bottom: 20px; left: 20px; width: 370px; border-radius: 17px; overflow-y: auto; padding: 18px; }
.agent-heading { display: flex; align-items: center; gap: 11px; }
.agent-avatar { width: 40px; height: 40px; flex: none; border-radius: 10px; box-shadow: 0 5px 12px #4f46e540; }
.agent-avatar img { display: block; width: 100%; height: 100%; }
.agent-kicker { color: #6366f1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 8.5px; font-weight: 700; letter-spacing: .6px; }
.agent-kicker span { color: #74b79b; margin-left: 5px; letter-spacing: 0; }
.agent-heading h2 { font-size: 16px; margin-top: 3px; }
.agent-intro { display: flex; gap: 10px; align-items: center; margin: 17px 0 14px; }
.quote-mark { color: #d0c6ef; font: bold 34px Georgia, serif; line-height: 1; }
.agent-intro b { font-size: 12px; }
.agent-intro p { font-size: 11px; color: #8b8b9b; margin-top: 3px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #efedf4; border-radius: 11px; background: #faf9fd; padding: 11px 0; }
.metrics > div { padding: 0 9px; min-width: 0; }
.metrics > div + div { border-left: 1px solid #eae8f0; }
.metrics span, .metrics em { display: block; color: #9390a4; font-size: 10px; font-style: normal; white-space: nowrap; }
.metrics strong { display: block; font-size: 21px; line-height: 1.4; color: #5e4ca8; }
.metrics strong small { font-size: 10px; }
.metrics em { font-size: 8px; }
.risk-line { margin: 8px 2px 0; color: #888499; font-size: 10px; }
.risk-line strong { color: #c48269; }
.risk-line span { color: #aaa6b5; }
.diagnosis { margin-top: 18px; }
.section-label { color: #8b7ac7; font-weight: 800; font-size: 9px; letter-spacing: 1px; }
.section-label span { font-size: 13px; margin-right: 4px; }
.section-label small { color: #b2b0bf; font-weight: 500; letter-spacing: 0; }
.section-label i { display: inline-block; width: 17px; height: 1px; background: #e4e0ed; vertical-align: middle; margin: 0 5px; }
.insight-body { margin-top: 9px; display: flex; gap: 10px; padding: 12px; background: #fff8f1; border: 1px solid #f8eadd; border-radius: 10px; }
.issue-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: #fff0dd; color: #de9854; font-weight: 800; }
.insight-body strong { font-size: 12px; color: #6a5142; }
.insight-body p { font-size: 11px; line-height: 1.6; color: #927d71; margin-top: 4px; }
.action-head { display: flex; justify-content: space-between; align-items: end; margin: 18px 0 9px; }
.action-head h3 { font-size: 14px; margin-top: 4px; }
.action-head > small { color: #aaa8b7; font-size: 10px; }
.actions { display: grid; gap: 7px; }
.action { display: flex; gap: 9px; align-items: flex-start; text-align: left; width: 100%; padding: 10px; border-radius: 10px; border: 1px solid #eae8ef; background: #fff; color: #414154; }
.action:hover:not(:disabled) { border-color: #a99ade; transform: translateY(-1px); }
.action--engineering { border-color: #d8d1f0; background: #f8f6ff; }
.action.selected { border-color: #6e5bb9; box-shadow: inset 0 0 0 1px #6e5bb9; }
.action:disabled:not(.selected) { opacity: .58; }
.action-marker { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; color: #8c7bcd; background: #eeeafa; font-size: 14px; }
.action--bad .action-marker { color: #aaa3a6; background: #f6f4f4; }
.action-content { display: grid; gap: 3px; flex: 1; }
.action-content small { font-size: 8px; letter-spacing: .8px; color: #9a89d0; font-weight: 800; }
.action--bad .action-content small { color: #b0abb0; }
.action-content strong { font-size: 11px; line-height: 1.45; }
.action-content > span { font-size: 10px; color: #9995a5; line-height: 1.4; }
.action-arrow { color: #9d8bd5; }
.selected-note { color: #6554a6; font-size: 10px; }
.agent-foot { margin-top: 13px; color: #aaa6b5; text-align: center; font-size: 10px; }
.drawer { top: 91px; right: 16px; bottom: 16px; width: min(460px, 34vw); border-radius: 16px; padding: 19px; overflow-y: auto; }
.drawer-heading, .board-title, .chart-heading, .team-title { display: flex; justify-content: space-between; align-items: center; }
.drawer-heading h2 { font-size: 17px; margin-top: 5px; }
.drawer-heading h2 span { color: #d7ceee; }
.sprint-badge, .wip-badge { font-size: 9px; font-weight: 800; color: #8574c0; background: #f2effa; padding: 6px 8px; border-radius: 7px; white-space: nowrap; }
.board-title { margin-top: 23px; }
.board-title h3, .chart-heading h3, .team-title h3 { font-size: 13px; }
.board-title p, .chart-heading p { color: #aaa8b6; font-size: 10px; margin-top: 3px; }
.wip-badge.over { color: #b87a46; background: #fff1e2; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 12px; }
.board-column { min-width: 0; min-height: 150px; padding: 6px 4px; background: #f7f7fa; border-radius: 8px; }
.column-heading { display: flex; justify-content: space-between; align-items: center; gap: 2px; padding: 2px 2px 7px; }
.column-name { font-size: 9px; font-weight: 800; white-space: nowrap; }
.column-name::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #bdbbc8; margin-right: 4px; }
.board-column--progress .column-name::before { background: #9c87dc; }
.board-column--review .column-name::before { background: #e4b570; }
.board-column--done .column-name::before { background: #72c4a0; }
.column-count { color: #aaa8b5; font-size: 9px; }
.task-card { margin-bottom: 5px; padding: 7px 5px; border: 1px solid #efedf2; border-radius: 6px; background: white; box-shadow: 0 2px 4px #34314b08; overflow-wrap: anywhere; }
.task-card strong { display: block; min-height: 25px; font-size: 9px; line-height: 1.4; }
.task-meta { display: flex; align-items: center; gap: 3px; margin-top: 6px; color: #9c99a8; font-size: 8px; white-space: nowrap; }
.mini-avatar { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; color: white; font-size: 8px; }
.task-points { margin-left: auto; color: #8c7db4; }
.empty-column { color: #d3d1db; text-align: center; padding: 12px; }
.deferred { color: #aaa5b7; font-size: 9px; margin-top: 8px; line-height: 1.5; }
.chart-heading { margin-top: 22px; border-top: 1px solid #f0eef3; padding-top: 18px; }
.chart-heading > span, .team-title > span { color: #aca6bb; font-size: 9px; font-weight: 700; }
.chart-legend { display: flex; gap: 14px; margin-top: 12px; color: #9693a2; font-size: 10px; }
.chart-legend span:last-child { margin-left: auto; color: #7164a0; font-weight: bold; }
.chart-legend i { display: inline-block; width: 15px; vertical-align: middle; border-top: 2px solid #d5cfdf; }
.chart-legend .legend-ideal { border-top-style: dashed; }
.chart-legend .legend-actual { border-color: #8f7ad4; }
.chart { display: block; width: 100%; height: auto; margin-top: 2px; overflow: visible; }
.chart-grid { stroke: #efedf3; stroke-width: 1; }
.chart-label { fill: #b5b1c0; font-size: 9px; }
.chart-ideal { stroke: #d1cadb; stroke-width: 2; stroke-dasharray: 4 4; }
.chart-actual { fill: none; stroke: #8f7ad4; stroke-width: 2.5; stroke-linejoin: round; }
.chart-point { fill: #8f7ad4; stroke: white; stroke-width: 1.5; }
.team-title { border-top: 1px solid #f0eef3; padding-top: 16px; margin-top: 10px; }
.team { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px 4px; margin-top: 12px; }
.team-member { display: flex; align-items: center; gap: 6px; min-width: 0; }
.team-avatar { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 10px; color: white; font-weight: bold; }
.team-label { min-width: 0; }
.team-label b, .team-label small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-label b { font-size: 10px; }
.team-label small { color: #a5a2b1; font-size: 9px; }
.scene-hint { position: fixed; z-index: 2; bottom: 17px; left: 50%; transform: translateX(-50%); padding: 7px 12px; background: #ffffffc9; border-radius: 20px; color: #89899b; font-size: 10px; pointer-events: none; }
.scene-hint span { color: #8673c6; }
.result { width: min(560px, calc(100% - 32px)); max-height: 90vh; overflow-y: auto; border: 0; border-radius: 20px; padding: 32px; color: #2e2b42; text-align: center; box-shadow: 0 20px 70px #28223b40; }
.result::backdrop { background: #29263e80; backdrop-filter: blur(4px); }
.result-icon { display: grid; place-items: center; margin: 0 auto 12px; width: 55px; height: 55px; color: white; font-size: 30px; border-radius: 18px; background: #7663bd; }
.result h2 { margin: 10px 0 6px; font-size: 21px; }
.result > p { color: #9a97a9; }
.result-metrics { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 22px 0; }
.result-metrics div { padding: 14px; background: #f8f6fc; border-radius: 10px; }
.result-metrics span, .result-metrics strong { display: block; }
.result-metrics span { color: #908a9e; font-size: 11px; }
.result-metrics strong { color: #6552a7; font-size: 20px; margin-top: 5px; }
.result-feedback { text-align: left; background: #f5f1ff; padding: 15px; border-radius: 10px; margin-bottom: 20px; line-height: 1.7; }
.result-feedback strong { color: #6f5bb3; }
.result-feedback p { color: #716d80; margin-top: 5px; font-size: 12px; }
@media (max-height: 850px) {
  .workspace-label { display: none; }
  .agent-card { top: 91px; }
}
@media (max-width: 1200px) {
  .sprint-title, .top-divider { display: none; }
  .day-dots { display: none; }
}
@media (max-width: 999px) {
  .topbar { height: 66px; padding: 0 12px; gap: 8px; }
  .brand small, .workspace-label, .scene-hint { display: none; }
  .day-control { margin-left: auto; }
  .agent-card { top: auto; bottom: 12px; left: 12px; width: min(370px, calc(100vw - 24px)); max-height: 55vh; }
  .drawer { top: 76px; right: 12px; bottom: 12px; width: min(460px, calc(100vw - 24px)); z-index: 7; }
  .control-btn, .drawer-toggle { padding: 9px; font-size: 11px; }
}
@media (max-width: 520px) {
  /* 1段目：ロゴ・日付・操作／2段目：モードのタブ */
  .topbar { height: auto; flex-wrap: wrap; row-gap: 6px; padding: 8px 12px; }
  .mode-tabs { order: 5; width: 100%; }
  .mode-tabs a { flex: 1; text-align: center; padding: 5px; }
  .drawer { top: 91px; }
  .controls .control-btn span, .drawer-toggle span { display: none; }
  .day-label { font-size: 12px; }
}
@media (max-width: 380px) {
  .topbar { gap: 6px; }
  .day-label .live-dot, .day-label small { display: none; }
}
