/* Mitsumo - project specific styles */

/* チャットと案件のメッセージ入力に共通する設定。 */
.message-preferences {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  color: #52657b;
  font-size: 12px;
}
.message-preferences label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.message-preferences input {
  accent-color: #2459a8;
}
.project-message-input {
  min-width: 0;
  resize: vertical;
}
/* Embedded chat: only the message history scrolls inside the resized frame. */
.mitsumo-widget-chat {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.mitsumo-widget-chat .widget-header,
.mitsumo-widget-chat .widget-composer,
.mitsumo-widget-chat #confirm-button {
  flex-shrink: 0;
}
.mitsumo-widget-chat #chat-messages {
  min-height: 0;
  overflow-wrap: anywhere;
}
.mitsumo-widget-chat #chat-messages .text-sm,
.mitsumo-widget-chat #chat-messages .markdown-body {
  font-size: 16px;
  line-height: 1.7;
}
.mitsumo-widget-chat .widget-message-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mitsumo-widget-chat .widget-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mitsumo-widget-chat .widget-composer-actions .message-preferences {
  margin-top: 0;
  gap: 0 12px;
  min-width: 0;
}
.mitsumo-widget-chat #chat-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 68px;
  max-height: 144px;
  font-size: 16px;
  line-height: 1.5;
}
.mitsumo-widget-chat #send-button {
  flex-shrink: 0;
  min-width: 64px;
  min-height: 44px;
  font-size: 16px;
}
.mitsumo-widget-chat .message-preferences label {
  min-height: 32px;
}
.mitsumo-widget-chat .message-preferences input {
  width: 16px;
  height: 16px;
}
@media (max-width: 480px) {
  .mitsumo-widget-chat #chat-messages,
  .mitsumo-widget-chat .widget-composer {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-height: 400px) {
  .mitsumo-widget-chat #chat-input {
    height: 48px;
    min-height: 48px;
    max-height: 80px;
  }
  .mitsumo-widget-chat .widget-composer {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
.analytics-settings {
  scroll-margin-top: 90px;
  margin-top: 16px;
  padding: 16px;
  background: #f4f7fa;
  border: 1px solid #cbd9ea;
  border-radius: 12px;
}
.analytics-settings button {
  margin: 8px 8px 0 0;
  padding: 8px 12px;
  border: 1px solid #adc2df;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

/* 「相談相棒」トップページ。画像内に文言を焼き込まず、コピーとフォームはHTMLで重ねる。 */
.home-companion-hero {
  position: relative;
  overflow: hidden;
  background-color: #f8f4eb;
  background-image: url("/static/images/home/hero-companion-v1.b7d9503b2dc3.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
}

.home-companion-copy,
.home-estimate-card {
  position: relative;
  z-index: 2;
}

.home-estimate-card {
  margin-top: 6rem;
  max-width: 44rem;
}

.home-companion-copy {
  max-width: 62rem;
}

.home-guide-bubble {
  position: absolute;
  z-index: 1;
  top: 4.5rem;
  right: 7%;
  padding: 0.8rem 1rem;
  border: 2px solid #244d7c;
  border-radius: 1.5rem;
  background: rgba(255, 253, 248, 0.94);
  color: #17385f;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.6;
}

.home-guide-bubble::after {
  content: "";
  position: absolute;
  right: 2.2rem;
  bottom: -0.55rem;
  width: 1rem;
  height: 1rem;
  border-right: 2px solid #244d7c;
  border-bottom: 2px solid #244d7c;
  background: #fffdf8;
  transform: rotate(45deg);
}

.home-step-art {
  height: 12rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.home-step-art-1 { background-image: url("/static/images/home/step-companion-1-v2.2bdd6310af6e.webp"); }
.home-step-art-2 { background-image: url("/static/images/home/step-companion-2-v2.05fa22de33b4.webp"); }
.home-step-art-3 { background-image: url("/static/images/home/step-companion-3-v2.5fb9b1aa9651.webp"); }

.home-privacy-art {
  height: 12rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.home-privacy-art-1 { background-image: url("/static/images/home/privacy-companion-1-v2.58632ca0b4c9.webp"); }
.home-privacy-art-2 { background-image: url("/static/images/home/privacy-companion-2-v2.64fdecee9342.webp"); }
.home-privacy-art-3 { background-image: url("/static/images/home/privacy-companion-3-v2.b7c6c3b4c4c3.webp"); }

/* 公開ページ共通の「相談相棒」トーン。情報設計は保ち、背景・見出し・カードをトップと揃える。 */
body.companion-theme {
  background: #fbfaf7;
  color: #172033;
}

body.companion-theme nav {
  border-color: #e7dfd2;
  background: rgba(255, 255, 255, 0.96);
}

body.companion-theme main > section.bg-white,
body.companion-theme main > section[class*="from-white"] {
  background: #fffdf8 !important;
}

body.companion-theme main > section.bg-gray-50 {
  background: #f1f5f6 !important;
}

body.companion-theme main h1,
body.companion-theme main h2 {
  letter-spacing: 0.035em;
}

body.companion-theme main .rounded-2xl,
body.companion-theme main .rounded-3xl,
body.companion-theme main .rounded-xl {
  border-color: #e4ddd1;
}

.companion-public-hero {
  overflow: hidden;
  border-bottom: 1px solid #e7dfd2;
  background:
    radial-gradient(circle at 12% 15%, rgba(173, 208, 223, 0.18), transparent 25rem),
    #f8f4eb;
}

.companion-hero-copy {
  position: relative;
  z-index: 2;
}

.companion-eyebrow {
  margin-bottom: 1rem;
  color: #526171;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.companion-primary-button,
.companion-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.companion-primary-button {
  background: #bf332c;
  color: #fff;
  box-shadow: 0 8px 20px rgba(115, 48, 42, 0.12);
}

.companion-primary-button:hover {
  background: #a92c26;
  transform: translateY(-1px);
}

.companion-secondary-button {
  border: 1px solid #244d7c;
  background: rgba(255, 253, 248, 0.82);
  color: #17385f;
}

.companion-secondary-button:hover {
  background: #fff;
  transform: translateY(-1px);
}

.companion-page-art {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(36, 77, 124, 0.16);
  border-radius: 2rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 45px rgba(48, 65, 75, 0.1);
}

.companion-page-art-clients { background-image: url("/static/images/public-companion-scene-clients-v3.21721365734e.webp"); }
.companion-page-art-vendors { background-image: url("/static/images/public-companion-scene-2-v2.efa719969177.webp"); }
.companion-page-art-pricing { background-image: url("/static/images/public-companion-scene-pricing-hero-v2.bd86dea61fd3.webp"); }

.companion-client-challenge-requirements {
  background-image: url("/static/images/home/client-challenge-requirements-v1.f97f0e8d895e.webp");
}

.companion-client-challenge-cost {
  background-image: url("/static/images/home/client-challenge-cost-v1.b0eb3649ec26.webp");
}

.companion-inline-art {
  height: auto;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid #e4ddd1;
  border-radius: 1.5rem;
  box-shadow: 0 12px 30px rgba(48, 65, 75, 0.09);
}

.companion-card-art {
  height: 10rem;
}

.companion-case-art {
  width: 7rem;
  height: auto;
  min-height: 7rem;
  flex-shrink: 0;
  background-position: center;
  background-size: cover;
}

.companion-case-art-new-business {
  background-image: url("/static/images/home/case-new-business-v1.9e69d5fa4b1c.webp");
}

.companion-case-art-internal-dx {
  background-image: url("/static/images/home/case-internal-dx-v1.c0e1f5bda14b.webp");
}

.companion-case-art-system-renovation {
  background-image: url("/static/images/home/case-system-renovation-v1.2d5737432520.webp");
}

.companion-case-art-estimate-check {
  background-image: url("/static/images/home/case-estimate-check-v1.174b97766c24.webp");
}

.companion-vendor-problem-art {
  width: 9rem;
  height: auto;
  min-height: 8.5rem;
  flex-shrink: 0;
  background-position: center;
}

.companion-vendor-problem-vague {
  background-image: url("/static/images/home/vendor-problem-vague-v1.56daed7d08f6.webp");
}

.companion-vendor-problem-sales-time {
  background-image: url("/static/images/home/vendor-problem-sales-time-v1.b4a7c1edf593.webp");
}

.companion-vendor-problem-fragmented-contact {
  background-image: url("/static/images/home/vendor-problem-fragmented-contact-v1.d09b24ca8b04.webp");
}

.companion-vendor-benefit-art {
  width: 9rem;
  height: auto;
  min-height: 8.5rem;
  flex-shrink: 0;
  background-position: center;
}

.companion-vendor-benefit-requirements {
  background-image: url("/static/images/home/vendor-benefit-requirements-v1.bef6c139f682.webp");
}

.companion-vendor-benefit-matching {
  background-image: url("/static/images/home/vendor-benefit-matching-v1.e35138d4bfa8.webp");
}

.companion-vendor-benefit-communication {
  background-image: url("/static/images/home/vendor-benefit-communication-v1.274a50ddbfaa.webp");
}

.companion-vendor-flow-art {
  height: 8rem;
}

.companion-trial-art {
  width: 100%;
  height: 12rem;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.companion-type-art {
  width: 100%;
  height: 10rem;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.companion-closing-cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid #e4ddd1;
  border-bottom: 1px solid #e4ddd1;
  background-color: #edf3f4;
  background-image:
    linear-gradient(90deg, #edf3f4 0%, rgba(237, 243, 244, 0.96) 45%, rgba(237, 243, 244, 0.08) 72%),
    url("/static/images/home/hero-companion-v1.b7d9503b2dc3.webp");
  background-repeat: no-repeat;
  background-position: center, right center;
  background-size: cover, auto 125%;
}

.companion-empty-state {
  min-height: 16rem;
  display: flex;
  align-items: center;
  background-color: #fffdf8;
  background-image:
    linear-gradient(90deg, #fffdf8 0%, rgba(255, 253, 248, 0.94) 48%, rgba(255, 253, 248, 0.12) 76%),
    url("/static/images/home/hero-companion-v1.b7d9503b2dc3.webp");
  background-repeat: no-repeat;
  background-position: center, right center;
  background-size: cover, auto 150%;
}

body.companion-account main {
  background:
    radial-gradient(circle at 85% 20%, rgba(173, 208, 223, 0.2), transparent 24rem),
    #f8f4eb;
}

body.companion-account main > div > div {
  border-color: #e4ddd1;
  box-shadow: 0 18px 45px rgba(48, 65, 75, 0.08);
}

/* ログイン後の作業画面。公開ページの相談相棒らしさを残しつつ、操作密度を優先する。 */
body.companion-workspace {
  background: #eef3f4;
}

body.companion-workspace main {
  background:
    radial-gradient(circle at 92% 2%, rgba(173, 208, 223, 0.2), transparent 24rem),
    linear-gradient(180deg, #f5f1e8 0, #f5f1e8 11rem, #eef3f4 30rem);
}

body.companion-workspace main > div {
  padding-top: 2.25rem;
  padding-bottom: 4rem;
}

body.companion-workspace main .bg-white {
  background-color: rgba(255, 253, 248, 0.98) !important;
}

body.companion-workspace main .border-gray-200,
body.companion-workspace main .border-gray-100 {
  border-color: #ded8cd !important;
}

body.companion-workspace main .rounded-2xl,
body.companion-workspace main .rounded-xl {
  box-shadow: 0 10px 28px rgba(48, 65, 75, 0.055);
}

body.companion-workspace main table thead {
  background: #f2f5f5;
}

body.companion-workspace main table tbody tr:hover {
  background: #f8f4eb !important;
}

body.companion-workspace main input,
body.companion-workspace main textarea,
body.companion-workspace main select {
  border-color: #d8d1c6;
  background: #fff;
}

body.companion-workspace main input:focus,
body.companion-workspace main textarea:focus,
body.companion-workspace main select:focus {
  border-color: #527aa4;
  box-shadow: 0 0 0 3px rgba(82, 122, 164, 0.15);
}

/* 見積もりチャット。公開ページの「相談相棒」の温度感を作業画面にも持ち込む。 */
body.companion-chat-workspace {
  background: #e9f0f1;
}

body.companion-chat-workspace main {
  padding: 1.1rem;
  background:
    radial-gradient(circle at 8% 5%, rgba(239, 207, 181, 0.38), transparent 22rem),
    radial-gradient(circle at 92% 8%, rgba(173, 208, 223, 0.42), transparent 25rem),
    #edf3f3;
}

body.companion-chat-workspace main > .chat-workspace-shell {
  width: min(100%, 92rem);
  margin: 0 auto;
  padding: 0 !important;
}

.chat-workspace-shell {
  overflow: hidden;
  border: 1px solid #d9d3c8;
  border-radius: 1.5rem;
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(48, 65, 75, 0.12);
}

.chat-conversation-panel {
  position: relative;
  background:
    radial-gradient(circle at 4% 96%, rgba(239, 207, 181, 0.18), transparent 15rem),
    #fffaf2;
}

.chat-document-panel {
  background:
    radial-gradient(circle at 100% 0, rgba(173, 208, 223, 0.34), transparent 18rem),
    #edf4f5 !important;
}

.chat-panel-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4rem;
}

.chat-heading-mascot {
  width: 3.7rem;
  height: 3.2rem;
  flex: 0 0 auto;
  padding: 0.35rem 0.45rem;
  border: 1px solid #cbdde5;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 7px 16px rgba(23, 56, 95, 0.08);
}

.chat-heading-kicker {
  color: #bf332c;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.chat-flow {
  border-color: #d8e5ea !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 5px 16px rgba(48, 65, 75, 0.04);
}

.chat-flow li:not([aria-hidden="true"]) {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.chat-flow li span {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d9ebf2;
  color: #17385f;
  font-size: 0.62rem;
}

.chat-message-canvas {
  border-color: #e0d9cd !important;
  background:
    radial-gradient(circle, rgba(82, 122, 164, 0.07) 1px, transparent 1.5px) 0 0 / 22px 22px,
    rgba(255, 255, 255, 0.9) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 30px rgba(48, 65, 75, 0.05);
}

.chat-mascot-avatar {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfe0e7;
  border-radius: 0.9rem;
  background: #eef7fa;
  box-shadow: 0 5px 12px rgba(23, 56, 95, 0.08);
}

.chat-mascot-avatar img {
  width: 2rem;
  height: auto;
}

.chat-ai-bubble {
  border: 1px solid #d7e3e8;
  background: #f4f9fa !important;
  box-shadow: 0 6px 16px rgba(48, 65, 75, 0.05);
}

.chat-composer {
  padding: 0.45rem;
  border: 1px solid #ddd5c8;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(48, 65, 75, 0.09);
}

.chat-composer textarea {
  border-color: transparent !important;
  background: #fffdf8 !important;
}

.chat-document-heading {
  min-height: 4rem;
  padding: 0 0.25rem;
}

.chat-document-panel #requirements-panel {
  border-color: #cbdde5 !important;
  background: rgba(255, 253, 248, 0.96) !important;
  box-shadow: 0 12px 30px rgba(48, 65, 75, 0.08);
}

.chat-document-empty {
  text-align: center;
}

.chat-empty-illustration {
  position: relative;
  width: 9.5rem;
  height: 7.5rem;
  margin-bottom: 1rem;
  border-radius: 50% 50% 46% 54%;
  background: #e4f0f4;
}

.chat-empty-illustration img {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  width: 5.4rem;
  transform: translateX(-50%);
}

.chat-empty-illustration span {
  position: absolute;
  top: -0.35rem;
  right: -2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #8ba9b8;
  border-radius: 0.8rem 0.8rem 0.8rem 0.2rem;
  background: #fff;
  color: #527088;
  font-size: 0.65rem;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(48, 65, 75, 0.08);
}

.chat-mobile-tabs {
  background: #fffaf2 !important;
}

@media (max-width: 1023px) {
  body.companion-chat-workspace main {
    padding: 0;
  }

  .chat-workspace-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-panel-heading {
    min-height: 3.5rem;
  }

  .chat-flow ol {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
  }
}

.workspace-illustrated-header {
  position: relative;
  min-height: 11.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 20rem 2rem 2rem;
  border: 1px solid #d8d1c6;
  border-radius: 1.5rem;
  background-color: #fffdf8;
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 18rem auto;
  box-shadow: 0 16px 38px rgba(48, 65, 75, 0.08);
}

.workspace-illustrated-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #fffdf8 0%, rgba(255, 253, 248, 0.95) 55%, transparent 78%);
}

.workspace-illustrated-header > * {
  position: relative;
  z-index: 1;
}

.workspace-illustrated-header-vendor {
  background-image: url("/static/images/home/vendor-benefit-communication-v1.274a50ddbfaa.webp");
}

.workspace-illustrated-header-client {
  background-image: url("/static/images/home/step-companion-3-v2.5fb9b1aa9651.webp");
}

.workspace-illustrated-header-widget {
  background-image: url("/static/images/home/step-companion-1-v2.2bdd6310af6e.webp");
}

.workspace-illustrated-header-billing {
  background-image: url("/static/images/public-companion-scene-pricing-hero-v2.bd86dea61fd3.webp");
}

.workspace-illustrated-header-compact {
  padding-right: 12rem;
  background-size: 12rem auto;
}

.workspace-eyebrow {
  margin-bottom: 0.45rem;
  color: #bf332c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.workspace-header-actions {
  max-width: 18rem;
}

.workspace-header-actions a,
.workspace-back-link {
  border: 1px solid #b9c8d5 !important;
  border-radius: 0.75rem !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #17385f !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

.workspace-header-actions a:hover,
.workspace-back-link:hover {
  background: #fff !important;
  border-color: #527aa4 !important;
}

.workspace-header-actions a.workspace-primary-action {
  border-color: #bf332c !important;
  background: #bf332c !important;
  color: #fff !important;
}

.workspace-header-actions a.workspace-primary-action:hover {
  border-color: #a92c26 !important;
  background: #a92c26 !important;
}

.workspace-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid #d8d1c6;
  border-radius: 1rem;
  background: #fffdf8;
}

.workspace-flow-four {
  grid-template-columns: repeat(4, 1fr);
}

.workspace-flow li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  color: #526171;
  font-size: 0.82rem;
  font-weight: 600;
}

.workspace-flow li + li {
  border-left: 1px solid #e4ddd1;
}

.workspace-flow li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: #edf3f4;
  color: #244d7c;
  font-size: 0.72rem;
}

.workspace-flow li.is-current {
  background: #f8f4eb;
  color: #172033;
}

.workspace-flow li.is-current span {
  background: #bf332c;
  color: #fff;
}

.workspace-project-header {
  position: relative;
  overflow: hidden;
  border-left: 5px solid #244d7c !important;
}

.workspace-project-header::after {
  content: "";
  position: absolute;
  right: -1.5rem;
  bottom: -2.4rem;
  width: 9rem;
  height: 9rem;
  opacity: 0.09;
  background: url("/static/images/brand/mitsumo-mark.e9501a868a7f.svg") center / contain no-repeat;
}

.workspace-empty-state {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(15rem, 1fr);
  align-items: center;
  gap: 2rem;
  padding: 0 !important;
  overflow: hidden;
  text-align: center;
}

.workspace-empty-art {
  align-self: stretch;
  min-height: 18rem;
  background: url("/static/images/home/step-companion-1-v2.2bdd6310af6e.webp") center / cover no-repeat;
}

.workspace-empty-copy {
  padding: 2rem 2rem 2rem 0;
}

body.companion-admin-workspace main {
  background: linear-gradient(180deg, #f7f0ef 0, #eef3f4 24rem);
}

@media (max-width: 1023px) {
  .home-companion-hero {
    background-position: 58% top;
    background-size: auto 32rem;
  }

  .home-companion-copy {
    max-width: 62%;
  }

  .home-guide-bubble {
    display: none;
  }
}

@media (max-width: 767px) {
  .home-companion-hero {
    background-image: none;
  }

  .home-companion-copy {
    max-width: none;
    margin-bottom: 2rem;
  }

  .home-estimate-card {
    margin-top: 0;
  }

  .companion-page-art {
    aspect-ratio: 1 / 1;
    border-radius: 1.25rem;
  }

  .companion-closing-cta {
    background-image: none;
  }

  .companion-empty-state {
    min-height: auto;
    background-image: none;
  }

  body.companion-workspace main > div {
    padding-top: 1.25rem;
  }

  .workspace-illustrated-header {
    min-height: 0;
    display: block;
    padding: 1.5rem;
    background-image: none;
  }

  .workspace-illustrated-header::after {
    display: none;
  }

  .workspace-header-actions {
    margin-top: 1.25rem;
    max-width: none;
  }

  .workspace-flow {
    grid-template-columns: 1fr;
  }

  .workspace-flow li + li {
    border-top: 1px solid #e4ddd1;
    border-left: 0;
  }

  .workspace-empty-state {
    grid-template-columns: 1fr;
  }

  .workspace-empty-art {
    min-height: 12rem;
  }

  .workspace-empty-copy {
    padding: 0 1.5rem 1.75rem;
  }
}

/* Chrome/Edge autofill の黄色背景を抑制してラッパー色と揃える */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #F9FAFB inset !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #0F172A !important;
  transition: background-color 5000s ease-in-out 0s;
}
.field-wrap:focus-within input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
}


/* Allauth form widget styling (for {{ field }} rendered inputs) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Smooth scrolling for chat */
#chat-messages {
  scroll-behavior: smooth;
}

/* Markdown body styles for AI messages */
.markdown-body p { margin: 0.4em 0; }
.markdown-body p:first-child { margin-top: 0; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body strong { font-weight: 700; }
.markdown-body em { font-style: italic; }
.markdown-body ul, .markdown-body ol { margin: 0.4em 0; padding-left: 1.5em; }
.markdown-body ul { list-style-type: disc; }
.markdown-body ol { list-style-type: decimal; }
.markdown-body li { margin: 0.2em 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  font-weight: 700;
  margin: 0.6em 0 0.3em;
}
.markdown-body h1 { font-size: 1.2em; }
.markdown-body h2 { font-size: 1.1em; }
.markdown-body h3 { font-size: 1.05em; }
.markdown-body code {
  background: rgba(0,0,0,0.06);
  padding: 0.15em 0.35em;
  border-radius: 0.25em;
  font-size: 0.9em;
}
.markdown-body pre {
  background: rgba(0,0,0,0.06);
  padding: 0.75em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin: 0.4em 0;
}
.markdown-body pre code {
  background: none;
  padding: 0;
}
.markdown-body blockquote {
  border-left: 3px solid #d1d5db;
  padding-left: 0.75em;
  margin: 0.4em 0;
  color: #6b7280;
}
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0;
  font-size: 0.95em;
}
.markdown-body th,
.markdown-body td {
  border: 1px solid #dbe4ee;
  padding: 0.55em 0.7em;
  text-align: left;
  vertical-align: top;
}
.markdown-body th {
  background: #eef6fb;
  color: #16324f;
  font-weight: 700;
}
.markdown-body tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* Mermaid diagrams */
.mermaid-container {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75em;
  padding: 1em;
  overflow-x: auto;
}
.mermaid-container svg {
  max-width: 100%;
  height: auto;
}

/* 応答待ちの骨組み。行が上から順に立ち上がり、そのあと静かに脈打つ。
   数秒の待ちを「止まっている」ではなく「組み上がっている」に見せるため。 */
.build-row {
  opacity: 0;
  animation:
    build-in 0.28s ease-out forwards,
    build-pulse 1.8s ease-in-out infinite;
  animation-delay: calc(var(--build-order, 0) * 90ms),
    calc(var(--build-order, 0) * 90ms + 0.28s);
}

@keyframes build-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes build-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

/* 送信中のステータス行に添える細い進捗バー */
.thinking-bar {
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.thinking-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: #9ca3af;
  animation: thinking-slide 1.4s ease-in-out infinite;
}

/* ブラウザが初期表示後にPC幅へ広がった場合も、モバイルタブの
   inline display を残さず左右の関係を必ず見せる。 */
@media (min-width: 1024px) {
  #panel-chat,
  #panel-req {
    display: flex !important;
  }
}

@keyframes thinking-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .build-row {
    opacity: 1;
    animation: none;
  }
  .thinking-bar::after {
    width: 100%;
    animation: none;
  }
}
