.office-cycle-teaser {
  grid-column: 1 / -1;
  border: 1px solid #638b65;
}
#office-cycle-dialog {
  width: min(680px, calc(100vw - 24px));
  top: var(--app-safe-top, 0px);
  bottom: var(--app-safe-bottom, 0px);
  max-height: min(
    92dvh,
    calc(
      var(--tg-viewport-stable-height, 100dvh) - var(--app-safe-top, 0px) -
        var(--app-safe-bottom, 0px) - 24px
    )
  );
  overflow-y: auto;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.office-pane-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.office-pane-tabs button {
  flex: 1 1 28%;
  padding: 10px 8px;
  min-height: 44px;
  border: 1px solid var(--line, #ccd7c7);
  border-radius: 10px;
  background: #eef2e6;
  color: #27442d;
  font: inherit;
  cursor: pointer;
}
.office-pane-tabs button[aria-pressed="true"] {
  color: white;
  background: #396d49;
}
#office-cycle-body label {
  display: block;
  margin: 12px 0;
  font-weight: 700;
}
#office-cycle-body select {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  padding: 12px 8px;
  border-radius: 8px;
  background: #fffdf3;
  color: #1e3a29;
  font: inherit;
  border: 1px solid #a4b79d;
}
.office-choice {
  display: block;
  width: 100%;
  padding: 12px;
  min-height: 44px;
  margin: 8px 0;
  border: 1px solid #8eaa89;
  border-radius: 10px;
  text-align: left;
  font: inherit;
  font-weight: 650;
  color: #264632;
  background: #e9f0de;
  cursor: pointer;
}
.office-choice:disabled {
  opacity: 0.5;
  cursor: default;
}
.office-choice:focus-visible,
.office-pane-tabs button:focus-visible {
  outline: 3px solid #b67a28;
  outline-offset: 2px;
}
.office-task,
.shift-paper {
  margin: 12px 0;
  padding: 14px;
  background: #f4f0df;
  border-radius: 12px;
  border: 1px solid #c8c8b4;
  color: #203a2b;
}
#office-cycle-body h3,
#office-cycle-body h4 {
  margin: 8px 0;
}
.office-task p,
.shift-paper p {
  margin: 10px 0;
}
.office-speaker {
  font-weight: 800;
  color: #31784b;
}
#office-cycle-body blockquote {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid #6b9b65;
  background: #f0f4e8;
}
.office-recall {
  font-style: italic;
}
.office-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
}
.paper-illustration {
  font-size: 40px;
  min-height: 54px;
}
.prompt-preview {
  padding: 14px;
  border: 1px dashed #729968;
  background: #eff4e5;
  border-radius: 8px;
}
#office-cycle-result {
  position: relative;
  padding: 10px 0;
  color: #315538;
  font-weight: 650;
}
.skill-office-props {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.virtual-clone {
  position: absolute;
  left: 31%;
  bottom: 21%;
  font-size: 56px;
  opacity: 0;
  filter: hue-rotate(55deg);
}
.skill-virtual .virtual-clone {
  opacity: 0.32;
  animation: virtual-wait 3s ease-in-out infinite alternate;
}
.virtual-clone:nth-child(2) {
  left: 66%;
  animation-delay: -1.5s;
}
.coffee-queue {
  position: absolute;
  left: 2%;
  bottom: 25%;
  font-size: 13px;
  padding: 4px;
  background: #fff6d8;
  opacity: 0;
  border-radius: 5px;
}
.skill-ratelimit .coffee-queue {
  opacity: 1;
  animation: coffee-line 2.8s ease-in-out infinite;
}
.skill-retry .office-printer-paper {
  animation: endless-print 1.8s linear infinite;
}
.office-earned-decor {
  position: absolute;
  top: 22%;
  right: 4%;
  font-size: 24px;
}
@keyframes virtual-wait {
  from {
    transform: translate(-6px, 0);
  }
  to {
    transform: translate(12px, -5px);
  }
}
@keyframes coffee-line {
  50% {
    transform: translateX(5px);
  }
}
@keyframes endless-print {
  0% {
    transform: translateY(-5px);
  }
  90%,
  100% {
    transform: translateY(14px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .skill-office-props *,
  .skill-retry .office-printer-paper {
    animation: none !important;
  }
}
.reduced-motion .skill-office-props *,
.reduced-motion.skill-retry .office-printer-paper {
  animation: none !important;
}
@media (max-width: 500px) {
  #office-cycle-dialog {
    padding: 16px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .office-pane-tabs button {
    font-size: 12px;
  }
  .virtual-clone {
    font-size: 40px;
  }
}

.office-task .muted,
.shift-paper .muted {
  color: #4d5c4c;
}
#office-cycle-body blockquote,
.prompt-preview {
  color: #25452e;
}
.office-speaker {
  color: #b2dc9b;
}
#office-cycle-result {
  color: #b8d8a6;
}
.office-rules {
  margin: 10px 0;
}
.office-rules summary {
  cursor: pointer;
  min-height: 36px;
  padding: 8px 0;
}

.office-inspection,
.office-mentor-note {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #8fae73;
  border-radius: 12px;
  background: #263220;
  color: #e8efdc;
}
.office-inspection .muted,
.office-mentor-note .muted {
  color: #bcccb3;
}
.office-team {
  margin-top: 16px;
}
.office-team summary,
.office-consult summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
}
.office-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.office-team-card {
  border: 1px solid #58754a;
  border-radius: 10px;
  padding: 12px;
}
.office-team-card .muted {
  color: #b5c6aa;
}
.office-team-card h4 {
  overflow-wrap: anywhere;
}
.office-mentor-note {
  animation: colleague-arrives 0.35s ease-out;
}
@keyframes colleague-arrives {
  from {
    opacity: 0.4;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#office-cycle-dialog > .dialog-heading {
  position: sticky;
  top: -16px;
  z-index: 5;
  background: #1c2117;
  padding: 10px 0;
}
@media (max-width: 360px) {
  .office-team-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .office-mentor-note {
    animation: none;
  }
}
.reduced-motion .office-mentor-note {
  animation: none;
}
.virtual-clone svg {
  width: 48px;
  height: 80px;
  overflow: visible;
}
.skill-virtual .clone-arm {
  animation: clone-typing 1.8s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.office-mentor-visitor {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 155px;
  white-space: nowrap;
  padding: 3px 6px;
  border-radius: 8px;
  background: #e9f0de;
  color: #24472d;
  font-size: 10px;
  line-height: 1.2;
  border: 1px solid #779a66;
}
@keyframes clone-typing {
  to {
    transform: translateY(-3px) rotate(-4deg);
  }
}
@media (max-width: 500px) {
  .virtual-clone svg {
    width: 38px;
    height: 64px;
  }
}

.office-cycle-teaser h3 {
  margin: 10px 0;
  font-size: 19px;
}
.office-cycle-teaser p {
  font-size: 12px;
  color: #b6c3a9;
}
.office-cycle-teaser small {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.scene.has-mentor .ai-bubble {
  visibility: hidden;
}
