/* ベースカラー */
:root {
  --main-brown: #5D4037;         /* ← こちらが有効 */
  --sub-beige: #D7CCC8;
  --bg-beige: #EFEBE9;
  --positive: #8B9E5F;
  --negative: #BC6B4A;
  --text-main: #3E2723;
  --text-sub: #795548;
}

/* --- スクロールバーの基本設定 --- */
html {
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* WebKit系ブラウザ（Chromeなど） */
html::-webkit-scrollbar {
  width: 10px;
}
html::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  min-height: 40px;
}

/* =============================================== */
/* ↓↓↓ ここから下に追記 ↓↓↓ */

/* 長いメールやURLがモバイルではみ出さないようにする */
#user-email {
  padding-left: 2px;
  white-space: nowrap;          /* 折り返さない */
  font-size: clamp(0.75rem, 3.5vw, 1rem); /* 画面幅でスケール */
  overflow: hidden;             /* もし溢れてもレイアウト崩さない */
  text-overflow: ellipsis;      /* オーバー分は省略記号 */
}

/* =============================================== */

/* AIメッセージの改行を有効にする */
#ai-message-content p {
  white-space: pre-wrap;
}

.case-table th {
  font-size: 0.95rem;
  font-weight: bold;
}
.case-table td {
  font-size: 0.95rem;
}



@media (max-width: 640px) {
  header .flex.items-center.gap-3 {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    flex-shrink: 0;
    flex-wrap: nowrap;
  }
  header .flex.items-center.gap-3 img {
    height: 2.2rem !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 40vw !important;
  }
  header h1 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-left: 0.2rem;
    white-space: nowrap;
  }
}


/* 角丸ボタン用クラス */
.rounded-button {
  font-weight: normal !important;
  border-radius: 8px !important;
}

/* 新規登録フォームの入力欄の太字を解除 */
#signupForm input,
#signupForm button,
#signupForm .rounded-button {
  font-weight: normal !important;
}

/* フォーム要素用クラス */
.form-element {
  border-radius: 8px !important;
}

/* ========================= */
/* モーダル共通スタイル統一 */
/* ========================= */

/* Firefox 用 */
#diagnosis-detail-modal,
#diagnosis-detail-modal > div,
#case-modal > div,
#case-modal .overflow-y-auto,
#new-case-modal,
#new-case-modal .overflow-y-auto {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

/* WebKit 用 */
#diagnosis-detail-modal::-webkit-scrollbar,
#diagnosis-detail-modal > div::-webkit-scrollbar,
#case-modal > div::-webkit-scrollbar,
#case-modal .overflow-y-auto::-webkit-scrollbar,
#new-case-modal::-webkit-scrollbar,
#new-case-modal .overflow-y-auto::-webkit-scrollbar {
  width: 8px;
}

#diagnosis-detail-modal::-webkit-scrollbar-track,
#diagnosis-detail-modal > div::-webkit-scrollbar-track,
#case-modal > div::-webkit-scrollbar-track,
#case-modal .overflow-y-auto::-webkit-scrollbar-track,
#new-case-modal::-webkit-scrollbar-track,
#new-case-modal .overflow-y-auto::-webkit-scrollbar-track {
  background: var(--sub-beige);
  border-radius: 10px;
}

#diagnosis-detail-modal::-webkit-scrollbar-thumb,
#diagnosis-detail-modal > div::-webkit-scrollbar-thumb,
#case-modal > div::-webkit-scrollbar-thumb,
#case-modal .overflow-y-auto::-webkit-scrollbar-thumb,
#new-case-modal::-webkit-scrollbar-thumb,
#new-case-modal .overflow-y-auto::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  min-height: 40px;
}
#diagnosis-detail-modal::-webkit-scrollbar-track,
#diagnosis-detail-modal > div::-webkit-scrollbar-track,
#case-modal > div::-webkit-scrollbar-track,
#case-modal .overflow-y-auto::-webkit-scrollbar-track,
#new-case-modal::-webkit-scrollbar-track,
#new-case-modal .overflow-y-auto::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb:hover,
#diagnosis-detail-modal::-webkit-scrollbar-thumb:hover,
#diagnosis-detail-modal > div::-webkit-scrollbar-thumb:hover,
#case-modal > div::-webkit-scrollbar-thumb:hover,
#case-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover,
#new-case-modal::-webkit-scrollbar-thumb:hover,
#new-case-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #a89b94 !important;
}

/* Scroll to Top Button Styles */
#scrollToTopBtn {
  /* Tailwind CSS classes handle most styling:
     fixed bottom-8 right-8 bg-primary text-white p-3 rounded-full shadow-lg
     hover:bg-accent transition-all duration-300 opacity-0 invisible z-50
  */
  cursor: pointer;
  border: none;
  outline: none;
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* =============================================== */
/* ↓↓↓ ここから下は基本設定 ↓↓↓ */
/* =============================================== */

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg-beige);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

input#evidence {
  display: none !important;
}

input[type="file"]#evidence {
  display: none !important;
}



.header {
  background: var(--main-brown);
  color: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.7rem;
  font-weight: bold;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-list a:hover {
  color: var(--positive);
}

.btn-primary {
  background: var(--positive);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  border: none;
  display: inline-block;
}

.btn-primary:hover {
  background: #7A8D54;
}

.hero {
  background: var(--sub-beige);
  text-align: center;
  padding: 6rem 0 4rem 0;
}

/* ヒーローセクションのタイトル専用 行間を広げる */
.hero-title {
  line-height: 1.2!important;
}

.no-wrap {
  white-space: nowrap;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.features {
  background: #fff;
  padding: 3rem 0;
}

.features-list {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-item {
  background: var(--bg-beige);
  border-radius: 10px;
  padding: 1.5rem;
  min-width: 220px;
  flex: 1 1 220px;
  box-shadow: 0 2px 8px rgba(93,64,55,0.07);
  margin: 0.5rem 0;
}

.story {
  background: var(--sub-beige);
  padding: 3rem 0;
}

.story-list {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.story-item {
  background: #fff;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  min-width: 220px;
  flex: 1 1 220px;
  box-shadow: 0 2px 8px rgba(93,64,55,0.07);
  margin: 0.5rem 0;
}

.advisor {
  background: #fff;
  padding: 3rem 0;
  text-align: center;
}

.onee {
  background: var(--bg-beige);
  padding: 3rem 0;
  text-align: center;
}

.mockup {
  background: #fff;
  padding: 3rem 0;
  text-align: center;
}

.pricing {
  background: var(--sub-beige);
  padding: 3rem 0;
  text-align: center;
}

.pricing ul {
  list-style: none;
  padding: 0;
}

.pricing li {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.faq {
  background: #fff;
  padding: 3rem 0;
}

.faq ul {
  list-style: none;
  padding: 0;
}

.faq li {
  margin-bottom: 1.5rem;
}

.cta {
  background: var(--positive);
  color: #fff;
  text-align: center;
  padding: 3rem 0;
}

.cta .btn-primary {
  background: #fff;
  color: var(--positive);
  margin-top: 1.5rem;
}

.footer {
  background: var(--main-brown);
  color: #fff;
  text-align: center;
  padding: 1.2rem 0;
  font-size: 0.95rem;
}

.main-content {
  flex-grow: 1;
}


#new-case-btn,
#quick-new-case {
  font-weight: bold!important;
}


.delete-case-btn {
  color: #9ca3af; /* gray-400 */
  background: #fff;
  transition: background 0.2s, color 0.2s;
}
.delete-case-btn:hover, .delete-case-btn:focus {
  background: #ef4444 !important; /* red-500 */
  color: #fff !important;
}
.delete-case-btn:hover i, .delete-case-btn:focus i {
  color: #fff !important;
}

/* ツールチップ */


.evidence-drop-area {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  /* display: block !important; の行を削除 */
  margin-left: 0 !important;
  margin-right: 0 !important;
  position: relative !important;
  z-index: 10 !important;
  border: 2px dashed #d1d5db !important;
  border-radius: 16px !important;
  background: #fff !important;
  padding: 2.5rem 1rem 1.2rem 1rem !important;
  text-align: center !important;
  transition: border-color 0.2s, background 0.2s !important;
  margin-bottom: 1rem !important;
}

.evidence-drop-area.dragover {
  border-color: #8B7B6C !important;
  background: #f5f5f5 !important;
}

.evidence-drop-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.evidence-drop-icon {
  font-size: 2.5rem !important;
  color: #8B7B6C !important;
  background: #f3f3f3 !important;
  border-radius: 50% !important;
  width: 56px !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 1rem !important;
}

.evidence-drop-main-text {
  font-size: 1.15rem !important;
  color: #444 !important;
  margin-bottom: 0.5rem !important;
  font-weight: 500 !important;
}

.evidence-drop-sub-text {
  font-size: 0.95rem !important;
  color: #888 !important;
}

@media (max-width: 600px) {
  .evidence-drop-area {
    padding: 1.5rem 0.5rem 0.8rem 0.5rem !important;
  }
  .evidence-drop-icon {
    font-size: 2rem !important;
    width: 40px !important;
    height: 40px !important;
  }
  .evidence-drop-main-text {
    font-size: 1rem !important;
  }
  .evidence-drop-sub-text {
    font-size: 0.85rem !important;
  }
}

@media (max-width: 700px) {
  .features-list, .story-list {
    flex-direction: column;
    gap: 1rem;
  }
  .container {
    padding: 0 0.5rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
}

