@import url("/css/tokens.css");
@import url("/css/base.css");
@import url("/css/components.css");
@import url("/css/utilities.css");


/* ==== 基本設定 ==== */
body {
  font-family: 'Nunito', 'Noto Sans JP', sans-serif;
  background-color: #FAFAFA;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1, h2, h3 {
  color: #333;
}

a {
  text-decoration: none;
  color: #4CAF93;
}



/* ==== カード ==== */
.card {
  background-color: #F0F4F8;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  margin: 1rem 0;
}

/* ==== 入力フォーム ==== */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #CCC;
  background-color: white;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: #4CAF93;
}

/* ==== 汎用ユーティリティクラス ==== */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.25rem; }
.font-bold { font-weight: bold; }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* ==== タイマー表示例 ==== */
.timer {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin: 1rem 0;
  color: #4CAF93;
}

/* ==== アバター表示 ==== */
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #4CAF93;
}

/* ==== ログイン画面 ==== */
.input {
  box-sizing: border-box; /* ← これを追加 */
}

/* ==== 通話中画面↓ ==== */

/* ==== ボリュームスライダー ==== */
#speakerVolume {
  width: 100%;
  margin-top: 0.5rem;
  accent-color: #4CAF93;
}

/* ==== noteSection メモ入力エリア ==== */
#noteSection {
  background-color: #fff;
  border: 2px solid #4CAF93;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 700px;
  margin: 2rem auto;
}

#noteSection textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #CCC;
  padding: 0.75rem;
  font-size: 1rem;
  resize: vertical;
}

#noteSection button {
  margin-top: 1rem;
}

/* ==== 通報・ブロックセクション ==== */
#noteSection form[action="/block"] {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ccc;
}

#noteSection select,
#noteSection textarea {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
}

/* ==== モバイル対応（任意） ==== */
@media (max-width: 600px) {
  .card {
    padding: 1rem;
  }

  .btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  .timer {
    font-size: 1.5rem;
  }

  .avatar {
    width: 48px;
    height: 48px;
  }

  #noteSection {
    padding: 1rem;
  }
}

/* ==== cefr説明 ==== */
.text-sm {
  font-size: 0.875rem;
  margin-top: 0;
  margin-bottom: 16px;
}

/* end.ejsの安定性向上用 */
#noteSection textarea.input,
#noteSection select.input {
  max-width: 100%;
  box-sizing: border-box;
}

.app-logo {
  width: 120px; /* 必要に応じて調整 */
}

.logo-container {
  position: absolute;
  top: 20px;
  left: 20px;
}

.logo-container {
  z-index: 1000;
}

@media screen and (max-width: 500px) {
  .app-logo {
    width: 80px;
  }
}



/* ==== 初回AI体験 ==== */
.trial-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.trial-hero {
  text-align: left;
}

.trial-badge {
  display: inline-block;
  background: #fff5e6;
  color: #b45309;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.trial-subtext {
  margin-top: 0.5rem;
  color: #555;
}

.trial-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #444;
}

.trial-main {
  margin-top: 1.5rem;
}

.chat-log {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  min-height: 240px;
  max-height: 320px;
  overflow-y: auto;
}

.chat-message {
  margin-bottom: 0.9rem;
}

.chat-message .chat-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0 0 0.3rem;
}

.chat-message .chat-text {
  margin: 0;
  background: #f3f4f6;
  padding: 0.6rem 0.8rem;
  border-radius: 0.75rem;
  line-height: 1.5;
}

.chat-message.user .chat-text {
  background: #e8f8f1;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  margin-top: 1rem;
}

.trial-note {
  margin-top: 0.8rem;
  color: #666;
}

.trial-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.trial-cards {
  display: grid;
  gap: 1rem;
}

.trial-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
}

.trial-card h2 {
  margin-top: 0;
  font-size: 1rem;
}

.trial-end-profile {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

.trial-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fef3c7;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

@media (max-width: 640px) {
  .trial-end-profile {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .chat-form {
    grid-template-columns: 1fr;
  }
  .trial-actions {
    flex-direction: column;
  }
}

/* ==== Trial result layout ==== */
.trial-result .trial-hero {
  margin-bottom: 1rem;
}

.trial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
  transition: opacity 0.3s ease;
}

.trial-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.trial-overlay-content {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.6rem;
  max-width: 640px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  text-align: center;
  margin: auto;
}

.trial-overlay-content .trial-cards {
  margin: 1rem 0 1.25rem;
  gap: 0.75rem;
}

.trial-overlay-content .trial-card {
  background: #f8fafc;
}

.trial-overlay-btn {
  width: 100%;
  justify-content: center;
}

.trial-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.trial-result .card {
  padding: 1rem 1.1rem;
}

.trial-result .trial-cards {
  gap: 0.7rem;
}

.trial-result .trial-card {
  padding: 0.8rem;
}

.trial-result .trial-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.trial-result .trial-card p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.trial-result #noteSection {
  margin: 0;
}

.trial-block-area {
  margin-top: 0.9rem;
}

.trial-block-toggle {
  width: 100%;
}

.trial-block-form {
  margin-top: 0.6rem;
  opacity: 0.7;
}

@media (max-width: 960px) {
  .trial-result-grid {
    grid-template-columns: 1fr;
  }
}