/*
 * Team Office のモック（開発前）の見た目。
 * ドット絵風は、等幅のシステムフォント・角ばった枠・ブロックのメーター・box-shadow で描く人物で出す。
 * 外部のフォント・画像は使わない。
 * スマートフォンの縦画面（幅 320〜390）を先に作り、大きな画面で広げる。
 */

.office {
  --office-ink: #17202A;
  --office-line: #17202A;
  --office-shadow: #17202A;
  --office-page: #DCE3EA;
  --office-panel: #FFFFFF;
  --office-soft: #F4F6F8;
  --office-muted: #55626F;
  --office-room: #F7F9FB;
  --office-sky: #8FD3F4;
  --office-orb: #FFD23F;
  --office-ok: #2EC4B6;
  --office-mid: #FFC857;
  --office-high: #FF6B57;
  --office-ink-ok: #0B5F68;
  --office-ink-mid: #7A4B00;
  --office-ink-high: #8A1F12;
  --office-font: "MS Gothic", "Osaka-Mono", "Noto Sans Mono CJK JP", var(--font-mono);

  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
  padding: 10px 10px 14px;
  font-family: var(--office-font);
  font-size: 0.9rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--office-ink);
  background: var(--office-page);
  border: 3px solid var(--office-line);
}

.office,
.office * {
  border-radius: 0;
}

.office p,
.office ul,
.office ol {
  margin: 0;
}

.office ul,
.office ol {
  padding: 0;
  list-style: none;
}

/* 夜の照明 */
.office--night {
  --office-page: #0F1826;
  --office-shadow: #4A5A70;
  --office-room: #B9C4D4;
  --office-sky: #16233A;
  --office-orb: #FFF3B0;
}

/* ---- 共通の部品 ---- */

.office-panel {
  min-width: 0;
  padding: 12px;
  background: var(--office-panel);
  border: 3px solid var(--office-line);
  box-shadow: 4px 4px 0 var(--office-shadow);
}

.office-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 10px;
}

.office .office-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.office-panel__note {
  flex: 1 1 100%;
  font-size: 0.8rem;
  color: var(--office-muted);
}

.office-tag {
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #5C3900;
  background: #FFE9B0;
  border: 2px solid #E6A100;
}

.office-empty {
  font-size: 0.85rem;
  color: var(--office-muted);
}

.office-dot {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(23, 32, 42, 0.35);
}

.office-button {
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 4px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--office-ink);
  background: #FFFFFF;
  border: 2px solid var(--office-line);
  box-shadow: 3px 3px 0 var(--office-line);
  cursor: pointer;
}

.office-button[aria-pressed="true"] {
  color: #FFFFFF;
  background: #0B5F68;
  border-color: #0B5F68;
}

/* 押されているかを、色だけでなく四角の塗りでも示す（読み上げには出ない空の飾り） */
.office-button[aria-pressed]::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  vertical-align: -1px;
  border: 2px solid currentColor;
}

.office-button[aria-pressed="true"]::before {
  background: currentColor;
}

.office-button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--office-line);
}

.office-button--night[aria-pressed="true"] {
  color: #17202A;
  background: #FFE08A;
  border-color: #FFE08A;
}

/* ブロックのメーター */
.office-blocks {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 2px;
  min-width: 0;
}

.office-blocks__cell {
  height: 12px;
  background: #33414E;
}

.office-blocks--small {
  display: inline-grid;
  grid-template-columns: repeat(10, 6px);
  gap: 1px;
}

.office-blocks--small .office-blocks__cell {
  height: 8px;
  background: #D9DFE5;
}

.office-blocks--ok .is-on {
  background: var(--office-ok);
}

.office-blocks--mid .is-on {
  background: var(--office-mid);
}

.office-blocks--high .is-on {
  background: var(--office-high);
}

.office-ink--ok {
  color: var(--office-ink-ok);
}

.office-ink--mid {
  color: var(--office-ink-mid);
}

.office-ink--high {
  color: var(--office-ink-high);
}

/* ドット絵（1つの点の box-shadow で描く） */
.office-sprite {
  position: relative;
  display: inline-block;
  flex: none;
}

.office-sprite__dot {
  position: absolute;
  display: block;
  background: transparent;
}

/* ---- ヘッダー ---- */

.office-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  color: #F4F6F8;
  background: #17202A;
  border: 3px solid var(--office-line);
  box-shadow: 4px 4px 0 var(--office-shadow);
}

.office-head__name {
  font-size: 1.25rem;
  font-weight: 700;
}

.office-head__sub {
  font-size: 0.8rem;
  color: #B8C2CC;
}

.office-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.office-badge {
  padding: 2px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid currentColor;
}

.office-badge--mock {
  color: #17202A;
  background: #FFE08A;
  border-color: #FFE08A;
}

.office-badge--fiction {
  color: #FFE08A;
  background: transparent;
}

.office-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.8rem;
  color: #D5DCE3;
}

.office-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.office-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.85rem;
  color: #B8C2CC;
}

.office-stat__value {
  font-size: 1.05rem;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}

.office-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.office-head .office-button {
  box-shadow: 3px 3px 0 #000000;
}

.office-scenario {
  font-size: 0.8rem;
  color: #B8C2CC;
}

/* ---- オーナーの席 ---- */

.office-owner {
  background: #FFF6E0;
  border-color: #E6A100;
}

.office-owner__body {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.office-owner__seat {
  display: flex;
  flex: 1 1 160px;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px;
  text-align: center;
  background: #FFE9B0;
  border: 2px solid #E6B94A;
}

.office-owner__figure {
  animation: office-hop 1.6s ease-in-out infinite;
}

.office-owner__label {
  font-weight: 700;
  color: #5C3900;
}

.office-owner__role {
  font-size: 0.8rem;
  color: #7A4B00;
}

.office-owner__count {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: #B34700;
  animation: office-blink 1.4s ease-in-out infinite;
}

.office-owner__todo {
  display: flex;
  flex: 999 1 280px;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.office-owner__todo-head {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.office .office-owner__todo-title {
  margin: 0;
  font-size: 1rem;
  color: #5C3900;
}

.office-owner__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.office-owner__item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 2px solid #E6A100;
}

.office-owner__item.is-long {
  border-color: #D9482F;
}

.office-owner__num {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #17202A;
  background: #E6A100;
}

.office-owner__item.is-long .office-owner__num {
  color: #FFFFFF;
  background: #B8341F;
}

.office-owner__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.office-owner__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.office-owner__title {
  font-weight: 700;
}

.office-kind {
  padding: 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
}

.office-kind--look {
  background: #1F4FB8;
}

.office-kind--read {
  background: #0B5F68;
}

.office-kind--try {
  background: #6B3FA8;
}

.office-owner__how {
  font-size: 0.85rem;
  color: #33414E;
}

.office-owner__meta {
  font-size: 0.8rem;
  color: #55626F;
}

/* ---- 使用量 ---- */

.office-usage {
  color: #F4F6F8;
  background: #17202A;
}

.office-usage .office-panel__note {
  color: #B8C2CC;
}

.office-usage__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 10px;
}

.office-usage__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: #212D3A;
  border: 2px solid #2B3948;
}

.office-usage__card--high {
  border-color: var(--office-high);
}

.office-usage__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}

.office-usage__name {
  font-weight: 700;
}

.office-usage__plan {
  font-size: 0.75rem;
  color: #B8C2CC;
}

.office-usage__note {
  font-size: 0.8rem;
  font-weight: 700;
}

.office-usage .office-ink--ok {
  color: #7FE3D8;
}

.office-usage .office-ink--mid {
  color: #FFC857;
}

.office-usage .office-ink--high {
  color: #FF8A7A;
}

.office-meter {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr) 3.5em;
  align-items: center;
  gap: 2px 8px;
}

.office-meter__label {
  font-size: 0.8rem;
  color: #D5DCE3;
}

.office-meter__pct {
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.office-meter__reset {
  grid-column: 2 / 4;
  font-size: 0.75rem;
  color: #A9B6C3;
}

/* ---- 体制と負荷 ---- */

.office-org__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.office-org__top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.office-org__box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--office-soft);
  border: 2px solid var(--office-line);
}

.office-org__box--owner {
  background: #FFF9EA;
}

/* オーナー ══ ジョブズ（狭い画面では縦の二重線） */
.office-org__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.75rem;
  color: #33414E;
}

.office-org__double {
  display: block;
  width: 8px;
  height: 28px;
  border-left: 2px solid var(--office-line);
  border-right: 2px solid var(--office-line);
}

.office-org__link-text {
  font-weight: 700;
}

.office-org__groups {
  display: grid;
  gap: 12px;
  padding-top: 10px;
  border-top: 2px solid #8A96A3;
}

.office-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.office-group__name {
  align-self: flex-start;
  padding: 2px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #33414E;
  background: #EEF1F4;
  border: 2px solid #8A96A3;
}

.office-group__meter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 0.8rem;
  color: #33414E;
}

.office-group__meter-name {
  font-weight: 700;
}

.office-group__meter-pct {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.office-group__meter--ok .office-group__meter-pct {
  color: var(--office-ink-ok);
}

.office-group__meter--mid .office-group__meter-pct {
  color: var(--office-ink-mid);
}

.office-group__meter--high .office-group__meter-pct {
  color: var(--office-ink-high);
}

.office-group__nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 8px;
}

.office-node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  background: #FFFFFF;
  border: 2px solid #D9DFE5;
  border-top-width: 6px;
}

.office-node__role {
  font-size: 0.75rem;
  color: var(--office-muted);
}

.office-node__name {
  font-weight: 700;
}

.office-node__state {
  font-size: 0.8rem;
  font-weight: 700;
  color: #33414E;
}

.office-node--high .office-node__state {
  color: var(--office-ink-high);
}

.office-node__bar {
  display: block;
  height: 6px;
  background: #E3E8ED;
}

.office-node__fill {
  display: block;
  height: 100%;
  background: var(--office-ok);
  transition: width 0.4s steps(4, end);
}

.office-node--mid .office-node__fill {
  background: var(--office-mid);
}

.office-node--high .office-node__fill {
  background: var(--office-high);
}

.office-node__queue {
  font-size: 0.75rem;
  color: #33414E;
}

.office-org__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.office-org__note {
  flex: 1 1 240px;
  min-width: 0;
  padding: 8px 10px;
  border: 2px solid;
}

.office-org__note--jam {
  background: #FDECEA;
  border-color: #E08A7E;
}

.office-org__note--free {
  background: #E8F6F1;
  border-color: #6FBF9F;
}

.office-org__note-title {
  font-size: 0.85rem;
  font-weight: 700;
}

.office-org__note--jam .office-org__note-title {
  color: #8A1F12;
}

.office-org__note--free .office-org__note-title {
  color: #0F5132;
}

.office-org__note-line {
  font-size: 0.85rem;
}

/* ---- フロア ---- */

.office-floor__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.office-rooms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}

.office-room {
  min-width: 0;
  background-color: var(--office-room);
  background-image:
    linear-gradient(45deg, rgba(23, 32, 42, 0.04) 25%, transparent 25%, transparent 75%, rgba(23, 32, 42, 0.04) 75%),
    linear-gradient(45deg, rgba(23, 32, 42, 0.04) 25%, transparent 25%, transparent 75%, rgba(23, 32, 42, 0.04) 75%);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  border: 2px solid #C5CDD6;
}

.office--night .office-room {
  border-color: #4A5A70;
}

.office-room__wall {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 3px solid rgba(23, 32, 42, 0.2);
}

.office-room__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
}

.office-room__name {
  padding: 0 6px;
  color: #17202A;
  background: #FFFFFF;
}

.office-room__deco {
  display: inline-flex;
  flex: none;
  align-items: flex-end;
  gap: 6px;
}

/* 窓：昼は空と太陽、夜は夜空と月と星 */
.office-window {
  position: relative;
  display: block;
  width: 40px;
  height: 28px;
  background: var(--office-sky);
  border: 4px solid #FFFFFF;
}

.office-window::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 4px;
  background: #FFFFFF;
}

.office-window__orb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  background: var(--office-orb);
}

.office--night .office-window__orb {
  left: 20px;
}

.office-window__star {
  position: absolute;
  top: 3px;
  left: 4px;
  display: none;
  width: 4px;
  height: 4px;
  background: #FFFFFF;
  box-shadow: 4px 8px 0 #FFFFFF;
}

.office--night .office-window__star {
  display: block;
}

.office-room__people {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
}

.office-person {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.office-person--paused {
  opacity: 0.6;
}

.office-person__figure {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  width: 72px;
}

.office-person__mark {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 16px;
  font-weight: 700;
  line-height: 1;
}

.office-person--waiting .office-person__mark {
  color: #7A4B00;
  animation: office-blink 1.4s ease-in-out infinite;
}

.office-person--paused .office-person__mark {
  color: #6B7785;
  animation: office-float 2.4s ease-in-out infinite;
}

.office-think {
  display: block;
  width: 5px;
  height: 5px;
  background: #5B8DEF;
  animation: office-dot 1.2s infinite;
}

.office-think:nth-child(2) {
  animation-delay: 0.2s;
}

.office-think:nth-child(3) {
  animation-delay: 0.4s;
}

.office-person--working .office-sprite--person {
  animation: office-typing 0.5s ease-in-out infinite;
}

.office-person--thinking .office-sprite--person {
  animation: office-sway 2.4s ease-in-out infinite;
}

.office-person--waiting .office-sprite--person {
  animation: office-hop 1.2s ease-in-out infinite;
}

/* 机と、その上の物（モニター・カップ・夜の電気スタンド） */
.office-desk {
  position: relative;
  display: block;
  width: 72px;
  height: 22px;
  margin-top: -6px;
}

.office-desk__top {
  position: absolute;
  top: 8px;
  right: 4px;
  left: 4px;
  height: 8px;
  background: #B08968;
}

.office-desk__monitor {
  position: absolute;
  top: 0;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 28px;
  height: 10px;
  background: #33414E;
}

.office-desk__key {
  display: block;
  width: 3px;
  height: 3px;
  background: #2EC4B6;
  animation: office-dot 0.6s infinite;
}

.office-desk__key:nth-child(2) {
  animation-delay: 0.15s;
}

.office-desk__key:nth-child(3) {
  animation-delay: 0.3s;
}

.office-desk__cup {
  position: absolute;
  top: -2px;
  left: 46px;
  width: 12px;
  height: 11px;
  background: #FFFFFF;
  border: 2px solid #8A96A3;
}

.office-desk__steam {
  position: absolute;
  top: -9px;
  left: 3px;
  width: 2px;
  height: 6px;
  background: #B8C2CC;
  animation: office-steam 1.8s ease-in-out infinite;
}

.office-desk__lamp {
  position: absolute;
  top: -6px;
  left: 6px;
  display: none;
  width: 8px;
  height: 8px;
  background: #FFE08A;
  box-shadow:
    0 0 0 4px rgba(255, 224, 138, 0.45),
    0 0 0 10px rgba(255, 224, 138, 0.22),
    0 0 0 18px rgba(255, 224, 138, 0.1);
  animation: office-blink 3s ease-in-out infinite;
}

.office--night .office-desk__lamp {
  display: block;
}

.office-person__info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.office-person__name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
}

.office-person__name {
  font-weight: 700;
}

.office-person__role {
  font-size: 0.75rem;
  color: #3E4A56;
}

.office-person__state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.office-person--working .office-person__state-label {
  color: #0B5F68;
}

.office-person--thinking .office-person__state-label {
  color: #1F4FB8;
}

.office-person--waiting .office-person__state-label {
  color: #7A4B00;
}

.office-person--idle .office-person__state-label,
.office-person--paused .office-person__state-label {
  color: #3E4A56;
}

.office-person__task {
  font-weight: 400;
  color: #3E4A56;
}

.office-bubble {
  position: relative;
  padding: 6px 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  background: #FFFFFF;
  border: 2px solid #17202A;
}

.office-bubble::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -8px;
  width: 6px;
  height: 6px;
  background: #FFFFFF;
  border-bottom: 2px solid #17202A;
  border-left: 2px solid #17202A;
}

/* 受け渡し */
.office-courier {
  padding: 6px 10px 4px;
  background: var(--office-soft);
}

.office-courier__ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: #33414E;
}

.office-courier__track {
  position: relative;
  height: 20px;
  border-bottom: 2px dashed #8A96A3;
}

.office-courier__doc {
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 14px;
  height: 16px;
  background: #FFFFFF;
  border: 2px solid #33414E;
  box-shadow: inset 0 4px 0 #FFFFFF, inset 0 6px 0 #8A96A3, inset 0 10px 0 #FFFFFF, inset 0 12px 0 #8A96A3;
  animation: office-courier 9s steps(36, end) infinite;
}

.office-handoffs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #33414E;
  background: var(--office-soft);
}

.office-handoffs__title {
  font-weight: 700;
}

/* ---- タスク ---- */

.office-tasks__board {
  display: grid;
  gap: 10px;
}

.office-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  background: var(--office-soft);
  border: 2px solid #D9DFE5;
}

.office-column__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.office .office-column__name {
  margin: 0;
  font-size: 0.9rem;
}

.office-column__count {
  font-size: 0.8rem;
  color: var(--office-muted);
}

.office-column__cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.office-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 2px solid #D9DFE5;
  border-top: 5px solid #8A96A3;
}

.office-column--design .office-card {
  border-top-color: #5B8DEF;
}

.office-column--implementing .office-card {
  border-top-color: #2EC4B6;
}

.office-column--reviewing .office-card {
  border-top-color: #7A4FB8;
}

.office-column--owner .office-card {
  border-top-color: #E6A100;
}

.office-card__id {
  font-size: 0.75rem;
  color: var(--office-muted);
  font-variant-numeric: tabular-nums;
}

.office-card__title {
  font-weight: 700;
  line-height: 1.4;
}

.office-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.office-chip {
  padding: 0 6px;
  font-size: 0.75rem;
  color: #33414E;
  background: #EEF1F4;
}

.office-card__note {
  font-size: 0.8rem;
  font-weight: 700;
  color: #3E4A56;
}

/* ---- アクティビティ ---- */

.office-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.office-activity__list {
  display: flex;
  flex-direction: column;
}

.office-feed {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-top: 2px solid #EEF1F4;
}

.office-feed__time {
  flex: none;
  width: 3.2em;
  padding-top: 2px;
  font-size: 0.8rem;
  color: var(--office-muted);
  font-variant-numeric: tabular-nums;
}

.office-feed__avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFFFFF;
}

.office-feed__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.office-feed__text {
  font-size: 0.85rem;
  line-height: 1.5;
}

.office-feed__task {
  font-size: 0.75rem;
  color: var(--office-muted);
}

.office-foot {
  padding: 0 4px;
  font-size: 0.8rem;
  color: var(--office-muted);
}

.office--night .office-foot {
  color: #C9D2DB;
}

/* ---- 大きな画面では広げる ---- */

@media (min-width: 600px) {
  .office {
    padding: 16px;
  }

  .office-head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
  }

  .office-head__title {
    flex: 1 1 260px;
  }

  .office-org__top {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .office-org__box {
    flex: 0 1 240px;
  }

  .office-org__link {
    flex-direction: column;
    gap: 2px;
    padding: 0 6px;
  }

  .office-org__double {
    width: 96px;
    height: 8px;
    border: 0;
    border-top: 2px solid var(--office-line);
    border-bottom: 2px solid var(--office-line);
  }

  .office-tasks__board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .office-org__groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .office-tasks__board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/*
 * ---- ごく狭い幅（幅 390 の端末で 200% に拡大したときなど） ----
 * 使用量のメーターは、名前とリセットまでの時間を1行ずつ使い、
 * 百分率の数字が縦に割れないようにする。幅 320 以上の見た目は変えない。
 */

@media (max-width: 300px) {
  .office-meter {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .office-meter__label,
  .office-meter__reset {
    grid-column: 1 / -1;
  }

  .office-meter__pct {
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

/* ---- 動き ---- */

@keyframes office-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes office-dot {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes office-typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes office-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

@keyframes office-hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes office-float {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

@keyframes office-steam {
  0% { opacity: 0; transform: translateY(2px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4px); }
}

@keyframes office-courier {
  0% { left: 0; }
  45% { left: calc(100% - 14px); }
  55% { left: calc(100% - 14px); }
  100% { left: 0; }
}

/* 「自動で進める」を止めたときは、常時の動きも止める */
.office--paused *,
.office--paused *::before,
.office--paused *::after {
  animation-play-state: paused !important;
}

/* 動きを減らす設定のときは、常時の動きを止める（自動の進行は office-demo.js で止める） */
@media (prefers-reduced-motion: reduce) {
  .office *,
  .office *::before,
  .office *::after {
    animation: none !important;
    transition: none !important;
  }

  .office-button:active {
    transform: none;
  }
}
