/* 入口の町の 吹き出しの案内（/town/coach.js）。ゲームの web/src/ui/coach.css と 同じ 見た目・同じ 数値。色は 入口の 町（town.css の --t-*）から */
.coachb { position: fixed; inset: 0; z-index: 75; pointer-events: none; }
.coachb-dim { position: absolute; inset: 0; background: rgba(22, 34, 47, .42); }
.coachb-ring { position: absolute; pointer-events: none; border-radius: 14px; box-shadow: 0 0 0 3px var(--t-orange, #EE7D12), 0 0 0 9999px rgba(22, 34, 47, .42); transition: left .25s cubic-bezier(.2, .8, .2, 1), top .25s cubic-bezier(.2, .8, .2, 1), width .25s cubic-bezier(.2, .8, .2, 1), height .25s cubic-bezier(.2, .8, .2, 1); }
.coachb-ring[data-pulse]::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; border: 2px solid var(--t-orange, #EE7D12); opacity: 0; animation: coachbPulse 2.2s cubic-bezier(.2, .8, .2, 1) infinite; }
@keyframes coachbPulse { 0% { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.06); } }
.coachb-bubble { position: absolute; pointer-events: auto; box-sizing: border-box; padding: 14px 16px 12px; border-radius: 18px; background: var(--t-card, #FFFDF8); color: var(--t-ink, #22343A); box-shadow: var(--t-shadow, 0 1px 0 rgba(60,40,20,.05), 0 10px 30px rgba(60,40,20,.12)); text-align: left; overflow-wrap: anywhere; font-family: var(--t-body, 'Noto Sans JP', sans-serif); }
.coachb-bubble.coachb-in { animation: coachbIn .28s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes coachbIn { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
.coachb-arrow { position: absolute; width: 14px; height: 14px; background: var(--t-card, #FFFDF8); transform: rotate(45deg); pointer-events: none; }
.coachb-bubble[data-side="below"] > .coachb-arrow { top: -7px; left: calc(var(--arrow) - 7px); }
.coachb-bubble[data-side="above"] > .coachb-arrow { bottom: -7px; left: calc(var(--arrow) - 7px); }
.coachb-bubble[data-side="right"] > .coachb-arrow { left: -7px; top: calc(var(--arrow) - 7px); }
.coachb-bubble[data-side="left"] > .coachb-arrow { right: -7px; top: calc(var(--arrow) - 7px); }
.coachb-bubble.coachb-noarrow > .coachb-arrow { display: none; }
.coachb-step { margin: 0 0 2px; color: var(--t-orange-d, #B85C05); font-family: var(--t-display, 'Zen Maru Gothic', sans-serif); font-weight: 900; font-size: 13px; line-height: 1.4; }
.coachb-step span { color: #8A9799; font-weight: 700; }
.coachb-title { margin: 0 0 4px; font-family: var(--t-display, 'Zen Maru Gothic', sans-serif); font-weight: 900; font-size: 18px; line-height: 1.35; color: var(--t-ink, #22343A); }
.coachb-body { margin: 0; font-size: 13px; line-height: 1.6; color: var(--t-sub, #5D6D70); }
.coachb-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; clear: both; }
.coachb-acts button { min-height: 40px; padding: 0 18px; border-radius: 999px; font-family: var(--t-display, 'Zen Maru Gothic', sans-serif); font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer; transition: transform .08s; }
.coachb-acts button:active { transform: scale(.95); }
.coachb-acts button:focus-visible { outline: 3px solid var(--t-orange, #EE7D12); outline-offset: 2px; }
.coachb-skip { background: transparent; color: var(--t-sub, #5D6D70); border: 1px solid var(--t-line, #E3D7C1); }
.coachb-next { background: var(--t-teal, #0B5E64); color: var(--t-on-teal, #F4FAF9); border: 0; }
.coachb-pic { float: right; width: 64px; height: 64px; margin: 0 0 4px 10px; border-radius: 12px; background: var(--t-paper, #FBF6EC); object-fit: contain; }
/* 完成イメージ（横長）：吹き出しの 幅いっぱい。比（960:512）で 高さを 先に 取り、読み込みで 吹き出しが 跳ねない。紙の 絵は 透けた 地なので 枠は 付けない */
.coachb-shot { display: block; width: calc(100% + 12px); max-width: none; height: auto; aspect-ratio: 960 / 512; margin: -6px -6px 8px; object-fit: contain; }
/* 案内の 歩が 出ている 間だけ 隠す 物（coach.js の hush。入口の 町の あいさつが 案内の 吹き出しと 重ならない ように）。場所は 取った まま＝主役の ボタンは 動かない */
[data-coach-hush] { visibility: hidden !important; }
/* ゲームの 案内の 間は 下の 画面に 触れさせない（暗い 所を 押しても 始まらない） */
.coachb.coachb-block { pointer-events: auto; }

/* ---------- 頭の 右の「？」（ゲームの シートの .sheet-help と 同じ：枠も 影も ない 丸い 押し場所に 円の「？」。× の 左）---------- */
.coach-help { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--t-sub, #5D6D70); cursor: pointer; vertical-align: middle; -webkit-tap-highlight-color: transparent; transition: transform .08s; }
.coach-help svg { width: 24px; height: 24px; }
.coach-help:active { transform: scale(.95); }
.coach-help[aria-expanded="true"] { color: var(--t-teal, #0B5E64); }
.coach-help:focus-visible { outline: 3px solid var(--t-orange, #EE7D12); outline-offset: 2px; }
/* 入口の 町の 頭（BKY・LP）：隣の 掲示板・音楽と 同じ 丸い 札に そろえる。縦の スマホでは 3つが 入るよう、町が 狭い 画面で 使う 詰めた 幅（town.css 359px 以下）に する */
.t-top nav .coach-help { width: var(--t-btn, 44px); height: var(--t-btn, 44px); padding: 0; justify-content: center; color: var(--t-sub, #5D6D70); }
/* 429px 以下は town.css が 掲示板と 音楽を 44px の 丸い 絵だけに する（上の 帯を 1行に。A-01）ので、ここは 430〜599px だけ */
@media (min-width: 430px) and (max-width: 599px) and (orientation: portrait) {
  .t-top nav:has(.coach-help) { gap: 4px; }
  .t-top nav:has(.coach-help) a.t-board-btn { width: 68px; padding: 0 7px; font-size: 11.5px; }
  .t-top nav:has(.coach-help) .t-board-btn svg { width: 15px; height: 15px; }
}
.coach-help-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* 設定の「？のボタンを出す」を 切ったら、どの ページの「？」も 出さない（/common/sheetmode.js が <html data-help-off> を 付ける。頭の 列の 幅は そのまま＝題は 真ん中） */
html[data-help-off] .coach-help { display: none !important; }

/* ---------- 「？」の 小窓（ゲームの .coach-pop・企業版 .t-tourpop と 同じ 数値）---------- */
.coach-pop { position: fixed; z-index: 66; box-sizing: border-box; width: min(320px, calc(100vw - 32px)); padding: 12px 14px 14px; border-radius: 18px; background: var(--t-card, #FFFDF8); color: var(--t-ink, #22343A); box-shadow: var(--t-shadow, 0 1px 0 rgba(60,40,20,.05), 0 10px 30px rgba(60,40,20,.12)); text-align: left; font-family: var(--t-body, 'Noto Sans JP', sans-serif); animation: coachbIn .2s cubic-bezier(.2, .8, .2, 1) both; }
.coach-pop-head { display: flex; align-items: center; gap: 8px; }
.coach-pop-title { flex: 1; min-width: 0; margin: 0; font-family: var(--t-display, 'Zen Maru Gothic', sans-serif); font-weight: 900; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.coach-pop-x { display: inline-grid; place-items: center; width: 36px; height: 36px; margin: -6px -6px -6px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--t-sub, #5D6D70); cursor: pointer; flex: none; }
.coach-pop-x svg { width: 18px; height: 18px; }
.coach-pop-lead { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: var(--t-sub, #5D6D70); white-space: pre-line; max-height: 40vh; overflow-y: auto; }
.coach-pop-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.coach-pop-acts:empty { display: none; }
.coach-pop-acts button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-family: var(--t-display, 'Zen Maru Gothic', sans-serif); font-weight: 700; font-size: 13px; cursor: pointer; transition: transform .08s; }
.coach-pop-acts button:active { transform: scale(.95); }
.coach-pop-acts svg { width: 18px; height: 18px; flex: none; }
.coach-pop-replay { flex: 1 1 auto; background: var(--t-teal, #0B5E64); color: var(--t-on-teal, #F4FAF9); border: 0; }
.coach-pop button:focus-visible { outline: 3px solid var(--t-orange, #EE7D12); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .coach-pop { animation: none; }
  .coachb-bubble.coachb-in { animation: none; }
  .coachb-ring { transition: none; }
  .coachb-ring[data-pulse]::after { animation: none; }
}
