/* ================================================================
   ミンケセAI観光案内所 — チャット画面
   前提：LINEのリッチメニューやQRから、スマホで片手で開かれる。
   ・最初の画面で「何ができるか」が一目で分かること
   ・回答は読むより「選んで押す」ものにすること
   ・追加の読み込みなし（フォント・画像・ライブラリを使わない）
   ================================================================ */

:root {
  --brand: #0b6b5f;
  --brand-strong: #07564c;
  --brand-soft: #e3f1ee;
  --on-brand: #ffffff;

  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #f6f9f8;
  --text: #15201d;
  --text-2: #4f5f5a;
  --text-3: #7d8b86;
  --line: #e1e8e5;

  --user: #0b6b5f;
  --on-user: #ffffff;

  --shadow-1: 0 1px 2px rgba(16, 40, 35, .06), 0 2px 8px rgba(16, 40, 35, .06);
  --shadow-2: 0 6px 24px rgba(16, 40, 35, .12);

  --radius: 18px;
  --radius-s: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2fb39e;
    --brand-strong: #25a18d;
    --brand-soft: #16312c;
    --on-brand: #04201b;

    --bg: #0e1513;
    --surface: #17211e;
    --surface-2: #1c2825;
    --text: #e8efec;
    --text-2: #b3c2bd;
    --text-3: #83938e;
    --line: #26332f;

    --user: #1f7a6c;
    --on-user: #f2fbf8;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 8px 28px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }

/* PCで開いてもスマホの幅で見せる（横に間延びさせない） */
.app {
  height: 100vh;
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
@media (min-width: 600px) {
  body { background: #dfe8e5; }
  .app { box-shadow: 0 0 0 1px var(--line), var(--shadow-2); }
}
@media (min-width: 600px) and (prefers-color-scheme: dark) {
  body { background: #070b0a; }
}

/* ---------------- ヘッダー ---------------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 10px) 12px 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 2;
}
.brand-mascot {
  flex: 0 0 auto; width: 40px; height: 40px; display: block;
  background: var(--brand-soft); border-radius: 50%;
  object-fit: contain;
  transition: transform .25s ease-out;
}
.brand-text { min-width: 0; flex: 1; }
.title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title .beta {
  flex: 0 0 auto; font-size: 10px; font-weight: 700; line-height: 1;
  color: var(--brand); background: var(--brand-soft);
  border-radius: 999px; padding: 3px 7px;
}
.sub { font-size: 12px; color: var(--text-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: none; background: transparent;
  color: var(--text-2); cursor: pointer;
}
.icon-btn:active { background: var(--surface-2); }

/* ---------------- 会話エリア ---------------- */
.log {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 14px 12px;
  scroll-behavior: smooth;
}

/* ---------------- 入口（会話前） ---------------- */
.welcome { text-align: center; padding: 8px 2px 4px; }
.welcome.leaving { animation: fade-out .2s ease-in forwards; }
.welcome-mascot {
  width: auto; height: 132px; display: block; margin: 0 auto;
  filter: drop-shadow(0 8px 14px rgba(11, 107, 95, .18));
  animation: float 4s ease-in-out infinite;
}
.welcome-title { font-size: 22px; font-weight: 800; letter-spacing: .02em; margin: 6px 0 2px; }
.welcome-sub { font-size: 14px; color: var(--text-2); margin: 0 0 18px; line-height: 1.6; }

/* やりたいことカード。ここが最初の主役 */
.intents {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  text-align: left;
}
.intent {
  display: flex; align-items: center; gap: 9px;
  min-height: 62px; padding: 10px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  box-shadow: var(--shadow-1);
  cursor: pointer; text-align: left;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.intent:hover { border-color: var(--brand); }
.intent:active { transform: scale(.97); }
.intent-icon {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center; font-size: 20px; line-height: 1;
  background: var(--tile, var(--brand-soft));
}
@media (prefers-color-scheme: dark) {
  /* 明るいパステルは暗い画面で浮くので、色味だけ残して沈める */
  .intent-icon { background: rgba(255, 255, 255, .08); background: color-mix(in srgb, var(--tile) 20%, transparent); }
}
.intent-text { min-width: 0; }
.intent-text { flex: 1; }
/* 「海鮮を食べた／い」のような中途半端な折り返しを出さない */
.intent-label { display: block; font-weight: 700; font-size: 14px; line-height: 1.35; white-space: nowrap; letter-spacing: -.01em; }
.intent-hint { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.35; margin-top: 1px; }

.welcome-lang { font-size: 12.5px; color: var(--text-2); margin: 18px 0 4px; }
.welcome-privacy { font-size: 11.5px; color: var(--text-3); margin: 0 12px; line-height: 1.6; }
.link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--brand); text-decoration: underline; text-underline-offset: 2px; font-size: inherit;
}

/* ---------------- 吹き出し ---------------- */
.msg-row { display: flex; gap: 8px; margin: 0 0 14px; animation: rise .22s ease-out; }
.msg-row.me { justify-content: flex-end; }
.avatar {
  flex: 0 0 auto; width: 32px; height: 32px; margin-top: 2px;
  background: var(--brand-soft); border-radius: 50%;
  object-fit: contain;
}
/* 考え中は少し揺らす（以前のSVGの目のまばたきの代わり） */
.msg-row.thinking .avatar { animation: float 1.6s ease-in-out infinite; }
.msg-row.cont .avatar { visibility: hidden; }

.bubble {
  max-width: 86%; padding: 10px 14px; border-radius: var(--radius);
  white-space: pre-wrap; word-break: break-word;
}
.msg-row.me .bubble {
  background: var(--user); color: var(--on-user);
  border-bottom-right-radius: 6px;
}
.msg-row.ai .bubble {
  background: var(--surface); box-shadow: var(--shadow-1);
  border-top-left-radius: 6px;
}
.bubble a { color: inherit; }
.msg-row.ai .bubble a { color: var(--brand); }

/* 回答（構造化）。吹き出しを横いっぱいに使ってカードを並べる */
.answer { flex: 1; min-width: 0; display: grid; gap: 10px; }
.answer-lead {
  background: var(--surface); box-shadow: var(--shadow-1);
  border-radius: var(--radius); border-top-left-radius: 6px;
  padding: 10px 14px; margin: 0;
}

.place {
  background: var(--surface); box-shadow: var(--shadow-1);
  border-radius: var(--radius); padding: 12px 14px 12px;
  border: 1px solid transparent;
}
.place-head { display: flex; align-items: flex-start; gap: 10px; }
.place-num {
  flex: 0 0 auto; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand);
  font-size: 13px; font-weight: 800; line-height: 1;
}
.place-name { font-size: 16px; font-weight: 800; line-height: 1.4; margin: 0; }
.place-reason { font-size: 14px; color: var(--text-2); margin: 4px 0 0 34px; line-height: 1.6; }

/* ボタンは指で押せる大きさ。地図を主役にする */
.place-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px;
  margin: 12px 0 0 34px;
}
.place-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 40px; padding: 0 10px; border-radius: 12px;
  font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  color: var(--brand); background: var(--brand-soft); border: none;
}
.place-btn.primary { background: var(--brand); color: var(--on-brand); }
.place-btn:active { transform: scale(.97); }
.place-btn svg { flex: 0 0 auto; }

.answer-meta {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12.5px; color: var(--text-2); padding: 0 6px; margin: 0;
}
.answer-meta svg { flex: 0 0 auto; margin-top: 3px; color: var(--brand); }
.answer-follow {
  font-size: 14px; color: var(--text); margin: 2px 0 0; padding: 0 6px;
}

/* ---------------- 戻る ---------------- */
.back-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 1px;
  min-height: 40px; padding: 0 10px 0 4px; margin-left: -6px; border: none; border-radius: 12px;
  background: transparent; color: var(--brand); font-size: 14px; font-weight: 700; cursor: pointer;
}
.back-btn:active { background: var(--surface-2); }
.back-btn.hidden { display: none; }
.back-btn.hidden + .brand-mascot { margin-left: 0; }
.answer-direct { font-size: 15px; line-height: 1.75; }

/* ---------------- βの案内・評価・報告 ---------------- */
.welcome-beta {
  font-size: 12.5px; color: var(--text-2); line-height: 1.7; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; margin: 16px 0 0;
}
.answer-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  padding: 2px 6px 0; font-size: 12px; color: var(--text-3);
}
.rate-label { margin-right: 2px; }
.rate-btn {
  width: 36px; height: 32px; border-radius: 10px; cursor: pointer; font-size: 15px; line-height: 1;
  background: var(--surface); border: 1px solid var(--line);
}
.rate-btn[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); }
.rate-btn:active { transform: scale(.94); }
.report-link, .place-report {
  background: none; border: none; padding: 4px 0; cursor: pointer;
  font-size: 12px; color: var(--text-3); text-decoration: underline; text-underline-offset: 2px;
}
.report-link { margin-left: auto; }
.place-report { display: block; margin: 8px 0 0 34px; font-size: 11.5px; }

/* ---------------- 旅程モード ---------------- */
/* 入口：横いっぱいの1枚。「今からどうする？」の8枚と役割が違うことを見た目で分ける */
.intent-plan {
  grid-column: 1 / -1; min-height: 70px; padding: 12px 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-color: transparent; color: var(--on-brand);
}
.intent-plan .intent-icon { background: rgba(255, 255, 255, .18); }
.intent-plan .intent-hint { color: inherit; opacity: .85; white-space: normal; }
.intent-plan .intent-label { font-size: 15px; }
.intent-go { font-size: 26px; line-height: 1; opacity: .8; margin-left: 2px; }
.intent-plan:hover { border-color: transparent; filter: brightness(1.05); }
.chip-plan { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 700; }

/* 条件フォーム */
.planner {
  flex: 1; min-width: 0;
  background: var(--surface); box-shadow: var(--shadow-1);
  border-radius: var(--radius); border-top-left-radius: 6px;
  padding: 14px 14px 16px;
  display: grid; gap: 14px;
}
.planner.done { opacity: .6; }
.planner-title { margin: 0; font-size: 14.5px; }
.pf-field { display: grid; gap: 7px; }
.pf-label { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.pf-label small { font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn, .pf-tag {
  min-height: 38px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font-size: 13.5px; white-space: nowrap;
}
.pf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-tag { display: inline-flex; align-items: center; gap: 5px; }
.seg-btn[aria-checked="true"], .pf-tag[aria-pressed="true"] {
  background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 700;
}
.seg-btn:active, .pf-tag:active { transform: scale(.97); }
.planner-go {
  min-height: 48px; border: none; border-radius: 14px; cursor: pointer;
  background: var(--brand); color: var(--on-brand); font-size: 15px; font-weight: 800;
}
.planner-go:active { transform: scale(.98); }
.planner button:disabled { cursor: default; }

/* 旅程 */
.curated-badge {
  margin: -4px 0 10px; padding: 6px 10px; border-radius: 10px;
  background: #fdf1d8; color: #7a4b00; font-size: 12px; font-weight: 700;
}
@media (prefers-color-scheme: dark) { .curated-badge { background: #3a2c10; color: #f3d39a; } }
.plan { flex: 1; min-width: 0; display: grid; gap: 12px; }
.plan-head {
  background: var(--surface); box-shadow: var(--shadow-1);
  border-radius: var(--radius); border-top-left-radius: 6px; padding: 12px 14px;
}
.plan-kicker { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--brand); }
.plan-title { margin: 1px 0 8px; font-size: 17px; font-weight: 800; line-height: 1.4; }
.plan-conds { display: flex; flex-wrap: wrap; gap: 5px; }
.plan-conds span {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
}

.plan-day { background: var(--surface); box-shadow: var(--shadow-1); border-radius: var(--radius); padding: 12px 12px 6px; }
.plan-day-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.day-badge {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 800; line-height: 1;
  padding: 7px 10px; border-radius: 10px; background: var(--brand); color: var(--on-brand);
}
.day-text { display: grid; min-width: 0; }
.day-zone { font-weight: 800; font-size: 15px; line-height: 1.35; }
.day-theme { font-size: 12px; color: var(--text-3); line-height: 1.4; }

/* タイムライン：左に時間帯、右にカード。縦線で順番を見せる */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 21px; top: 8px; bottom: 16px;
  width: 2px; background: var(--line); border-radius: 1px;
}
.tl-item { display: grid; grid-template-columns: 44px 1fr; gap: 8px; margin: 0 0 10px; position: relative; }
.tl-slot {
  align-self: start; justify-self: center; position: relative; z-index: 1;
  font-size: 11.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 3px 7px; margin-top: 8px; white-space: nowrap;
}
.tl-card { min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.tl-top { display: flex; align-items: flex-start; gap: 6px; }
.tl-icon { flex: 0 0 auto; font-size: 15px; line-height: 1.45; }
.tl-name { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 800; line-height: 1.45; }
.tl-price {
  flex: 0 0 auto; font-size: 11.5px; color: var(--text-2); white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-top: 2px;
}
.tl-price.free { color: var(--brand); border-color: transparent; background: var(--brand-soft); }
.tl-reason { margin: 3px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.tl-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tl-btn {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; padding: 0 11px; border-radius: 10px;
  font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  color: var(--brand); background: var(--brand-soft);
}
.tl-btn.primary { background: var(--brand); color: var(--on-brand); }
.tl-btn:active { transform: scale(.97); }
.tl-move {
  display: grid; grid-template-columns: 44px 1fr; gap: 8px; margin: -4px 0 6px;
  font-size: 11.5px; color: var(--text-3);
}
.tl-move span { grid-column: 2; padding-left: 4px; }
.tl-move span::before { content: "↓ "; }

.plan-info {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); box-shadow: var(--shadow-1); border-radius: var(--radius); padding: 12px 14px;
}
.plan-info-icon { font-size: 20px; line-height: 1.3; }
.plan-info strong { font-size: 14px; }
.plan-info p { margin: 2px 0 0; font-size: 13.5px; color: var(--text-2); }
.plan-stay-btn {
  display: inline-flex; align-items: center; min-height: 38px; margin-top: 8px; padding: 0 14px;
  border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.plan-notes { margin: 0; padding: 0 8px 0 24px; font-size: 12px; color: var(--text-3); line-height: 1.6; }
.plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-action {
  min-height: 46px; border-radius: 14px; cursor: pointer; font-weight: 800; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.plan-action.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.plan-action:active { transform: scale(.98); }

/* 考え中 */
.thinking { display: inline-flex; align-items: center; gap: 10px; }
.thinking-label { font-size: 13.5px; color: var(--text-2); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: .3; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }
.msg-row.thinking .m-eye { animation: m-blink 1.4s ease-in-out infinite; transform-origin: center; }

/* ---------------- 入力エリア ---------------- */
.composer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + var(--safe-b));
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 12px 8px;
  /* 右端を薄くして「横に続く」ことを伝える */
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
          mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chips.hidden { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  min-height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap;
}
.chip:active { transform: scale(.97); }

.input-row { display: flex; align-items: flex-end; gap: 8px; padding: 0 10px 0 12px; }
textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 128px;
  border: 1px solid var(--line); border-radius: 22px;
  padding: 11px 16px; background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 16px; line-height: 1.4; /* 16px未満だとiOSで拡大される */
}
textarea::placeholder { color: var(--text-3); }
textarea:focus { outline: none; border-color: var(--brand); background: var(--surface); }
#send {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: none;
  display: grid; place-items: center; cursor: pointer;
  background: var(--brand); color: var(--on-brand);
  transition: opacity .15s, transform .12s;
}
#send:disabled { opacity: .35; cursor: default; }
#send:not(:disabled):active { transform: scale(.94); }

/* ---------------- シート（使い方・データの扱い） ---------------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet.hidden { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 17, .45); animation: fade-in .2s ease-out; }
.sheet-panel {
  position: relative; width: 100%; max-width: 560px; max-height: 86dvh; overflow-y: auto;
  background: var(--surface); color: var(--text);
  border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + var(--safe-b));
  box-shadow: var(--shadow-2);
  animation: sheet-up .26s cubic-bezier(.2, .9, .3, 1);
}
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.sheet-panel h2 { font-size: 17px; margin: 0 0 8px; }
.sheet-panel h3 { font-size: 13.5px; margin: 16px 0 4px; color: var(--brand); }
.sheet-panel p { font-size: 14px; color: var(--text-2); margin: 0 0 6px; }
.sheet-panel .sheet-en { font-size: 12.5px; color: var(--text-3); margin-top: 12px; }
.sheet-close {
  width: 100%; min-height: 46px; margin-top: 16px; border: none; border-radius: 14px;
  background: var(--surface-2); font-weight: 700; cursor: pointer;
}

/* ---------------- 初回の導入（キャラが手前に出てくる） ---------------- */
.intro {
  position: fixed; inset: 0; z-index: 50;
  background: radial-gradient(circle at 50% 40%, #16876f 0%, #0b6b5f 45%, #05372f 100%);
  display: grid; place-items: center;
  perspective: 900px;
  animation: fade-in .3s ease-out;
}
.intro.hidden { display: none; }
.intro.leaving { animation: intro-out .45s ease-in forwards; pointer-events: none; }
.intro-stage { display: grid; place-items: center; gap: 18px; transform-style: preserve-3d; }
.intro-mascot {
  width: min(54vw, 220px); height: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .35));
  animation: mascot-come 1s cubic-bezier(.2, 1.3, .4, 1) both, float 3.4s ease-in-out 1s infinite;
}
.intro-bubble {
  /* 背景を白で固定しているので文字色も固定（テーマ依存にするとダークモードで白地に白文字） */
  background: #fff; color: #15201d; border-radius: 16px; padding: 12px 20px;
  display: grid; gap: 2px; text-align: center; max-width: 84vw;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  animation: pop-in .4s ease-out .75s both;
}
.intro-bubble strong { font-size: 18px; }
.intro-bubble span { font-size: 13.5px; color: #55635f; }
.intro-skip {
  position: absolute; bottom: calc(40px + var(--safe-b));
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .55);
  color: #fff; border-radius: 999px; padding: 11px 30px; font-size: 14.5px; font-weight: 700; cursor: pointer;
  animation: pop-in .4s ease-out 1.1s both;
}

/* マスコットの立体（パーツごとの奥行き） */
.m-star  { transform-origin: 88px 10px; animation: twinkle 3.2s ease-in-out infinite; }
.m-front { transform: translateZ(8px); }
.m-back  { transform: translateZ(-10px); }
.brand-mascot .m-wave, .welcome-mascot .m-wave { transform-origin: 32px 78px; animation: wave 2.6s ease-in-out infinite; }

/* ---------------- 動き ---------------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: rotate(0); } 50% { opacity: .75; transform: rotate(-8deg); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-16deg); } 85% { transform: rotate(4deg); } }
@keyframes m-blink { 0%, 80%, 100% { transform: scaleY(1); } 88% { transform: scaleY(.15); } }
@keyframes intro-out { to { opacity: 0; transform: scale(1.06); } }
@keyframes mascot-come {
  from { opacity: 0; transform: translateZ(-460px) translateY(28px) rotateY(-28deg) rotateX(12deg); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

/* 端末の「動きを減らす」設定を尊重する */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .log { scroll-behavior: auto; }
}

/* <picture> は見た目に関わらないので、中の画像をそのまま並べる */
picture { display: contents; }
