/* ==========================================================================
   賃貸サポートチャットボット風ページ スタイル
   スマホ（〜599px）: 1カラム / 600px以上: カード幅拡大＋選択肢2カラム
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-card-bg: #eceeed;
  --color-border: #333333;
  --color-text: #222222;
  --color-muted: #6b6b6b;
  --color-btn-bg: #ffffff;
  --color-btn-bg-hover: #333333;
  --color-btn-text-hover: #ffffff;
  --color-user-bubble: #333333;
  --color-user-bubble-text: #ffffff;
  --color-error: #b3261e;
  --color-error-bg: #fdecea;
  --radius-card: 12px;
  --radius-pill: 999px;
  --radius-bubble: 16px;
  --max-width-mobile: 420px;
  --max-width-desktop: 680px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 15px;
}

.page {
  display: flex;
  justify-content: center;
  padding: 24px 12px;
  min-height: 100vh;
}

.card {
  width: 100%;
  max-width: var(--max-width-mobile);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.card__header {
  padding: 16px 20px 4px;
}

.card__site-name {
  margin: 0;
  font-size: 13px;
  font-weight: bold;
  color: var(--color-muted);
  text-align: center;
}

.card__body {
  padding: 20px 24px 32px;
  text-align: center;
}

/* ---- チャットログ（過去のやり取り） ---- */

.chatlog {
  text-align: left;
  margin-bottom: 20px;
}

.bubble {
  border-radius: var(--radius-bubble);
  padding: 14px 18px;
  margin: 0 0 14px;
  text-align: left;
  white-space: normal;
}

.bubble--bot {
  background: #ffffff;
  border: 1px solid var(--color-border);
}

.bubble--log {
  opacity: 0.7;
  font-size: 0.92em;
}

.bubble--active {
  margin-top: 4px;
  margin-bottom: 24px;
}

.bubble--user {
  background: var(--color-user-bubble);
  color: var(--color-user-bubble-text);
  margin-left: auto;
  margin-right: 0;
  width: fit-content;
  max-width: 80%;
  font-size: 0.92em;
}

.history-toggle {
  text-align: left;
  margin-bottom: 20px;
}

.history-toggle summary {
  cursor: pointer;
  color: var(--color-muted);
  font-size: 0.9em;
  margin-bottom: 8px;
}

/* ---- 選択肢ボタン ---- */

.question {
  font-weight: bold;
  margin: 0 0 16px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.options--yesno {
  flex-direction: row;
  justify-content: center;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: var(--color-btn-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  text-decoration: none;
  font-size: 1em;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-align: center;
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-btn-bg-hover);
  color: var(--color-btn-text-hover);
}

.options--yesno .btn {
  width: 120px;
}

.btn--primary {
  font-weight: bold;
}

/* ---- お問い合わせフォーム ---- */

.contact-form {
  text-align: left;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 0.9em;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-field .required {
  color: var(--color-error);
  font-size: 0.8em;
  margin-left: 6px;
  font-weight: normal;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field textarea,
.form-field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  background: #ffffff;
}

.form-field textarea {
  resize: vertical;
}

.form-field--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-errors {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  color: var(--color-error);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: left;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2em;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.photo-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

/* ---- 完了画面 ---- */

.mock-notice {
  background: #fff8e1;
  border: 1px solid #e0c46c;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88em;
  color: #6b5900;
  text-align: left;
  margin-bottom: 20px;
}

.summary {
  text-align: left;
  margin-bottom: 24px;
}

.summary__heading {
  font-size: 0.95em;
  margin: 20px 0 8px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 4px;
}

.summary__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}

.summary__table th,
.summary__table td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid #ddd;
}

.summary__table th {
  width: 40%;
  color: var(--color-muted);
  font-weight: normal;
}

.summary__message {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.92em;
}

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.photo-grid__item {
  margin: 0;
  width: 100px;
}

.photo-grid__item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.photo-grid__item figcaption {
  font-size: 0.75em;
  color: var(--color-muted);
  word-break: break-all;
  text-align: center;
  margin-top: 4px;
}

/* ==========================================================================
   レスポンシブ: 600px以上でカード幅を拡大し、選択肢ボタンを2カラム表示
   ========================================================================== */

@media (min-width: 600px) {
  .card {
    max-width: var(--max-width-desktop);
  }

  .card__body {
    padding: 28px 40px 40px;
  }

  .options--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
