/* denwa.microfund.co.jp（電話の受け答えシミュレーション）。1ファイルだけ。外への取得なし（字は端末の字）。
   決まり: いちばん小さい字 12px・押す所は 44px 以上・せりふは 17px・スマホの幅（360・390px）で横にはみ出さない */
:root { --bg: #f5f7fb; --panel: #fff; --text: #1c2430; --muted: #566174; --border: #d5dbe6; --link: #1257b5;
        --ai: #2f8477; --ai-bg: #e9f5f2; --you: #b8650f; --you-bg: #fff6e6; --stop: #9b2c2c; --stop-bg: #fdecec; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.7;
       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Noto Sans SC", "PingFang SC", Meiryo, sans-serif; }
a { color: var(--link); }
[hidden] { display: none !important; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 12px; background: var(--panel); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.3; }
.brand img { display: block; border-radius: 6px; flex: 0 0 28px; }
.snd { flex: 0 0 auto; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 22px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; }
.snd.off { color: var(--muted); background: #eef1f6; }
.main { max-width: 640px; margin: 0 auto; padding: 8px 12px 24px; }
h1 { font-size: 21px; line-height: 1.4; margin: 6px 0 6px; }
h2 { font-size: 16px; line-height: 1.5; margin: 16px 0 4px; }
p { margin: 0 0 10px; }
.lead { font-size: 15px; }
.face { display: block; flex: 0 0 auto; }
.note { margin-top: 14px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.note p { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 16px; margin: 0 6px 8px 0; border-radius: 12px; background: var(--link); color: #fff; font-weight: 700; font-size: 15px; line-height: 1.4; text-decoration: none; }
.btn-sub { background: var(--panel); color: var(--link); border: 2px solid var(--link); }

/* いちばん上の短い断り（畳まない・12px）。箱の全体がリンク */
.note-top { display: block; min-height: 44px; margin: 0 0 6px; padding: 6px 10px; background: #fffbe8; border: 1px solid #e6d58a; border-radius: 10px; color: var(--text); font-size: 12px; line-height: 1.55; text-decoration: none; }
.note-top-more { color: var(--link); text-decoration: underline; white-space: nowrap; }

/* 通話 */
.scene { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0 0 6px; }
.scene-tag { display: inline-block; padding: 0 8px; margin-right: 4px; border-radius: 999px; background: #e3e8f1; color: var(--text); font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.scene-intro { color: var(--text); font-size: 15px; }
.phone { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 12px; background: #1c2430; border-radius: 14px; color: #fff; }
.phone-over { background: #4a5364; }
.phone-ico { flex: 0 0 34px; display: block; }
.phone-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.phone-num { font-size: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.phone-st { font-size: 12px; line-height: 1.5; color: #c9d2e0; }
.phone-wave { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; height: 22px; }
.phone-wave i { display: block; width: 3px; height: 6px; border-radius: 2px; background: #7fe0a6; }
.phone-over .phone-wave { display: none; }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 20px; } }
.talking .phone-wave i { animation: wave .7s ease-in-out infinite; }
.talking .phone-wave i:nth-child(2) { animation-delay: .15s; }
.talking .phone-wave i:nth-child(3) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .talking .phone-wave i { animation: none; } }

.talk, .said { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; }
.talk-who, .said-who { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.talk-name { font-size: 12px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.bubble, .said-bubble { flex: 1 1 auto; min-width: 0; padding: 6px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; }
.bubble p, .said p { margin: 0; }
.line, .said-text { font-size: 17px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.said-bubble { border-left-width: 5px; }
.said-ai .said-bubble { border-left-color: var(--ai); background: var(--ai-bg); }
.said-you .said-bubble { border-left-color: var(--you); background: var(--you-bg); }
.said-note { font-size: 14px; line-height: 1.55; margin-top: 2px; }
.tag { font-size: 12px; font-weight: 700; color: var(--ai); line-height: 1.5; }
.tap-hint { font-size: 13px; color: var(--muted); }
.bubble-tools, .said-tools { margin-top: 2px; }
.replay { min-height: 44px; padding: 0 12px; border: 1px solid var(--link); border-radius: 22px; background: var(--panel); color: var(--link); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.choices-h { font-size: 14px; line-height: 1.5; color: var(--text); margin: 8px 0 4px; font-weight: 700; }
.choices ul { list-style: none; margin: 0; padding: 0; }
.choices li { margin: 0 0 6px; }
.choice { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; min-height: 48px; padding: 6px 12px; background: var(--panel); border: 2px solid var(--link); border-radius: 12px; color: var(--text); text-decoration: none; font-size: 16px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.choice:hover, .choice:focus-visible { background: #eaf2fd; }
.choice-ai { border-color: var(--ai); background: var(--ai); color: #fff; justify-content: center; font-size: 17px; }
.choice-ai:hover, .choice-ai:focus-visible { background: #256b60; }
.choice-hangup { border-color: var(--stop); color: var(--stop); background: var(--stop-bg); justify-content: center; }
.choice-hangup:hover, .choice-hangup:focus-visible { background: #f9d9d9; }
.choice-again { border-style: dashed; }
.choice-row { display: flex; gap: 6px; margin: 0 0 6px; }
.choice-row .choice-ai { flex: 2 1 0; text-align: center; }
.choice-row .choice-hangup { flex: 1 1 0; text-align: center; }
.own-label { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--you-bg); border: 1px solid #e6c48f; color: #7a4406; font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap; }

/* 終わりの画面 */
.ended { font-size: 15px; margin: 4px 0 8px; }
.memo, .review { margin: 0 0 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.memo { border-left: 5px solid var(--ai); }
.memo h2, .review h1 { margin-top: 0; }
.review h1 { font-size: 18px; }
.memo ul, .review ul { margin: 0 0 6px; padding-left: 1.2em; font-size: 15px; }
.memo li, .review li { margin: 0 0 6px; }
.review-type { font-size: 15px; font-weight: 700; }
.review-k { display: inline-block; padding: 0 8px; margin-right: 4px; border-radius: 6px; background: #e3e8f1; font-size: 12px; font-weight: 700; line-height: 1.8; }
.quote { font-weight: 600; }
.quote-tr { font-size: 14px; color: var(--muted); }
.src { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.srcs a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.src-meta { font-size: 12px; color: var(--muted); }
.nojudge { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.log-fold { margin: 10px 0; }
.log-fold > summary { display: flex; align-items: center; min-height: 44px; color: var(--link); cursor: pointer; font-size: 15px; }
.log { list-style: none; margin: 0; padding: 0; }
.log > li { margin: 0 0 10px; }
.to-check { margin-top: 16px; }

/* 手順・この遊びについて */
.checks { margin: 0 0 12px; padding-left: 1.4em; }
.checks > li { margin: 0 0 12px; }
.check-text { font-size: 16px; font-weight: 600; margin: 0 0 2px; }
.check-q { font-size: 14px; margin: 0; }
.check-110 { margin-top: 4px; font-weight: 600; }
.scene-list { margin: 0 0 12px; padding-left: 1.2em; }
.scene-list li { margin: 0 0 8px; }
.scene-list a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 600; }
.first-line { font-size: 15px; padding: 6px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.sec .checks { list-style: disc; }
.sec ul { margin: 0 0 6px; padding-left: 1.2em; font-size: 15px; }
.sec li { margin: 0 0 6px; }

.foot { max-width: 640px; margin: 0 auto; padding: 12px 12px 32px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.foot p { margin: 8px 0 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 14px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-lang { display: flex; flex-wrap: wrap; gap: 0 14px; }
.footer-lang a.on { color: var(--text); font-weight: 700; text-decoration: none; }
.svc-title { font-size: 13px; margin: 8px 0 0; }
.svc-list { margin: 0; }
/* 下の欄の、アプリ横丁へのボタン（2026-10-07 夜 社長「各画面のフッターには、アプリ横丁へのボタンリンクを」。slot・english と同じ形＝枠 1px・角 10px・高さ 46px・塗りなし。
   templates/base.html の .app-row。外す: main.py の SERVICE_LINKS_ENABLED = False → 再起動） */
.foot .app-row { margin: 4px 0 0; }
.foot a.app-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 46px; max-width: 100%; margin: 4px 0 6px; padding: 8px 20px; border: 1px solid var(--muted); border-radius: 10px; background: var(--panel); color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.4; text-decoration: none; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .main { padding: 6px 10px 20px; }
  .line, .said-text { font-size: 16px; }
  .talk-who, .said-who { flex-basis: 48px; }
}
