/* MGK 静的サイト: page-layout。同じ表示設定を複数ページで共有します。 */
:root {
  --cream: #fdfbef; /* 背景（あたたかい紙の色） */
  --card: #ffffff;
  --navy: #23406e; /* アプリのメイン紺 */
  --blue: #3d7dd8; /* アプリのアクセント青（右の丸） */
  --blue-soft: #eaf1fc;
  --coral: #f2784b; /* アプリの左の丸 */
  --gold: #e8a500; /* アプリの「ピッタリ」金 */
  --line: #ede6d2;
  --muted: #6b7a90;
  --danger: #d8365d; /* アプリの「遅い」赤 */
  --radius: 18px;
  --shadow: 0 2px 10px rgba(35, 64, 110, 0.07);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 18px 64px;
}

/* ---------- ヘッダー ---------- */
.site-head {
  background: linear-gradient(180deg, #fffdf5 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--line);
  padding: 26px 0 22px;
  margin-bottom: 28px;
}
.site-head .wrap {
  padding-bottom: 0;
}
.brandline {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brandline img {
  width: 56px;
  height: auto;
  flex: none;
}
.brandline .t {
  min-width: 0;
}
.brandline h1 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brandline p {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- 共通パーツ ---------- */
section {
  margin: 0 0 34px;
}
h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 14px;
  padding-left: 13px;
  border-left: 5px solid var(--blue);
  border-radius: 2px;
  line-height: 1.5;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px;
  box-shadow: var(--shadow);
}
.card p {
  margin: 0 0 0.85em;
}
.card p:last-child {
  margin-bottom: 0;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--navy);
}
.meta {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------- FAQ ---------- */
.faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:last-child {
  border-bottom: 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 46px 16px 18px;
  position: relative;
  font-weight: 500;
  line-height: 1.6;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  background: #fbfaf3;
}
.faq summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
  border-radius: 6px;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: calc(50% - 4px);
  width: 9px;
  height: 9px;
  border-right: 2.5px solid var(--blue);
  border-bottom: 2.5px solid var(--blue);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
  top: calc(50% - 1px);
}
.faq .a {
  padding: 0 18px 18px;
  color: #3a4a63;
  font-size: 0.95rem;
}
.faq .a p {
  margin: 0 0 0.7em;
}
.faq .a p:last-child {
  margin-bottom: 0;
}
.faq .a ul {
  margin: 0.2em 0 0.7em;
  padding-left: 1.25em;
}
.faq .a li {
  margin: 0.15em 0;
}
.kbd {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--navy);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.9em;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- チャット ---------- */
.chat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.chat-log {
  padding: 20px 18px 6px;
  min-height: 120px;
}
.row {
  display: flex;
  gap: 11px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.row.me {
  flex-direction: row-reverse;
}
.av {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-soft);
  border: 1px solid #d9e5f7;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.av img {
  width: 40px;
  height: auto;
  display: block;
  margin-bottom: -2px;
}
.bubble {
  max-width: calc(100% - 68px);
  padding: 12px 15px;
  border-radius: 16px;
  background: #f5f7fb;
  border: 1px solid #e4eaf3;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.96rem;
}
.row.me .bubble {
  background: #fff3e8;
  border-color: #f7d9c2;
}
.bubble.err {
  background: #fdeef2;
  border-color: #f3c9d5;
  color: #8e1f3c;
}
.bubble.ok {
  background: #fff8e3;
  border-color: #f2dfa6;
}
.bubble .nm {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.row.me .bubble .nm {
  color: var(--coral);
}

/* 確認バブルの一覧 */
.confirm-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px dashed #d6deea;
}
.confirm-list li {
  padding: 9px 0;
  border-bottom: 1px dashed #d6deea;
}
.confirm-list .k {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.confirm-list .v {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* 入力エリア */
.chat-input {
  border-top: 1px solid var(--line);
  background: #fcfbf4;
  padding: 16px 18px 18px;
}
.chat-input label.q {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.chat-input input[type="text"],
.chat-input input[type="email"],
.chat-input textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--navy);
  background: #fff;
  border: 2px solid #dce4ef;
  border-radius: 12px;
  padding: 11px 13px;
  line-height: 1.7;
}
.chat-input textarea {
  min-height: 118px;
  resize: vertical;
}
.chat-input input:focus,
.chat-input textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(61, 125, 216, 0.14);
}
.counter {
  font-size: 0.76rem;
  color: var(--muted);
  text-align: right;
  margin-top: 4px;
}
.counter.over {
  color: var(--danger);
  font-weight: 700;
}

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 11px 22px;
  line-height: 1.4;
}
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.btn-main {
  background: var(--blue);
  color: #fff;
}
.btn-main:hover {
  background: #2f6ac0;
}
.btn-main[disabled] {
  background: #c3cedd;
  cursor: not-allowed;
}
.btn-sub {
  background: #fff;
  color: var(--navy);
  border-color: #cbd6e5;
}
.btn-sub:hover {
  background: #f2f6fc;
}
.btn-send {
  background: var(--coral);
  color: #fff;
}
.btn-send:hover {
  background: #de6537;
}
.btn-send[disabled] {
  background: #e4cdc0;
  cursor: not-allowed;
}

/* 同意チェック */
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  background: #fff;
  border: 2px solid #dce4ef;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
}
.consent input {
  width: 22px;
  height: 22px;
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--blue);
}
.consent label {
  line-height: 1.7;
}
.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.7;
}
.err-msg {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 9px;
  line-height: 1.7;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- フッター ---------- */
footer {
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}
footer a {
  color: var(--muted);
  text-decoration: underline;
}
footer a:hover {
  color: var(--navy);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 10px;
}

@media (max-width: 480px) {
  body {
    font-size: 15.5px;
  }
  .brandline img {
    width: 48px;
  }
  .brandline h1 {
    font-size: 1.15rem;
  }
  .bubble {
    max-width: calc(100% - 58px);
    font-size: 0.94rem;
  }
  .av {
    width: 40px;
    height: 40px;
  }
  .av img {
    width: 35px;
  }
  .btns button {
    flex: 1 1 auto;
  }
}
