/* 新しいトップ（public/js/top-moment.js）：売りたいものを書く欄、相手が集まる画面、一週間の画面の置き場所。
   色・字・角は共通の変数（kosei.css）、ボタンは決まった3つの形（parts.css）。一週間の部品そのものの見た目は week-view.css。 */
.tm, .tm-page { --tm-gap: 24px; color: var(--text); font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.8; text-align: left; }
.tm *, .tm-page * { box-sizing: border-box; min-width: 0; }
.tm :where(p, h1, h2, ul, dl, dd, dt), .tm-page :where(p, h1, h2, ul, dl, dd, dt) { margin: 0; padding: 0; }
.tm :where(ul), .tm-page :where(ul) { list-style: none; }
.tm :where(p, li, dd), .tm-page :where(p, li, dd) { word-break: auto-phrase; }
.tm { max-width: 1280px; margin: 0 auto; padding: 4px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: #fff; }
/* 中身の左右は、上の帯の箱にそろえる（main の幅いっぱい。帯も同じ幅：tone.css） */
.tm-page { margin: 0; padding: var(--tm-gap) 0 48px; }

/* 企画を読めなかったときの一言と、もう一度の口 */
.tm-fail { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .35); color: #fff; font-size: var(--fs-body); }
/* 紺の帯：呼びかけ、欄、押したあとに手に入るもの */
.tm-band { display: block; padding: 18px 24px; border-radius: 4px; background: var(--band); color: #fff; }
.tm-band .pch-import-note { margin: 0; font-size: var(--fs-tag); color: #fff; }
.tm .tm-ask { display: flex; align-items: center; flex-wrap: nowrap; max-width: none; margin: 0; height: auto; min-height: 52px; padding: 0 0 0 16px; border-radius: 2px; overflow: hidden; background: #fff; color: var(--text-muted); }
/* 欄の下の一言（アイデアでない言葉、読めないアドレスなど。.search-hint）が出たら、欄の中で次の行に置く。欄は狭めない */
.tm .tm-ask:has(.search-hint) { flex-wrap: wrap; }
.tm .tm-ask .search-hint { margin: 0 0 var(--s2); }
.tm .tm-ask .pch-go { align-self: stretch; min-height: 52px; border-radius: 0; background: var(--gold); color: var(--brand-12); font-weight: 700; white-space: nowrap; }
/* 押したあいだの「探しています…」：幅と高さは押す前のまま（home.js paintStarting）。折るのは、言葉の中の印（U+200B。data/words/aite-groups.json busy）の所だけ：「探して／います…」 */
.tm .tm-ask .pch-go.is-busy { white-space: normal; word-break: keep-all; overflow-wrap: normal; line-height: 1.2; }
@media (max-width: 1180px) {
  .tm-band { padding: 16px; }
}
@media (max-width: 700px) {
  .tm-band { padding: 16px 12px; }
  .tm .tm-ask { padding-left: 12px; }
  .tm .tm-ask .pch-glass { display: none; }
  .tm .tm-ask .pch-go { padding: 0 8px; font-size: var(--fs-control); }
  .tm .tm-ask .pch-go.is-busy { padding: 0 1px; } /* 狭い幅では、横の余白だけを詰めて二行に収める（幅・字の大きさはそのまま） */
  .tm .tm-ask { padding-left: 8px; }
  .tm .tm-ask .pch-clip, .tm .tm-ask [data-voice] { width: 36px; }
}
/* 360 より狭い（320 など）：送るボタンの字「相手を探す」が横に並ぶと、欄が 40px まで細くなり、書くと縦に伸びて画面の外へ出た
   （qa-mobile q2）。送るボタンは欄の下の段に、幅いっぱいで置く（欄は横幅を使える） */
@media (max-width: 359px) {
  .tm .tm-ask { flex-wrap: wrap; }
  .tm .tm-ask .pch-go { flex: 1 0 calc(100% + 8px); margin-left: -8px; min-height: var(--tap, 44px); } /* 欄の左の余白（8px）の分、左へ出して端までそろえる */
}

.tm-week { margin-top: 10px; min-height: 60vh; }


/* 待つあいだの一行 */
.tm-wait { padding: 48px 0; text-align: center; color: var(--text-muted); }

/* 相手が集まる：人数、条件、内訳、主役のボタン。その下に集まった人 */
.tm-g-head { display: grid; gap: 12px; justify-items: start; }
.tm-count strong { font-size: var(--fs-display); }
/* 「3,000人中」は、狭い画面でも出す（相手探しの紺のカードでは省いている） */
.tm-page .tm-count .find-of { display: inline; }
.tm-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tm-tags span { padding: 2px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--fs-note); line-height: 1.7; background: #fff; white-space: nowrap; }
.tm-tags em { font-style: normal; font-size: var(--fs-note); color: var(--text-head); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.tm-dropped { font-size: var(--fs-note); color: var(--text-muted); }
.tm-g-head .find-relax { justify-content: flex-start; margin: 0; }
.tm-split { display: grid; grid-template-columns: repeat(2, minmax(0, 22rem)); gap: 8px 48px; width: 100%; margin-top: 4px; }
.tm-bars { display: grid; gap: 2px; align-content: start; }
.tm-bars dt { font-size: var(--fs-note); font-weight: 700; color: var(--text-head); }
.tm-bars dd { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 4rem; align-items: center; gap: 8px; font-size: var(--fs-note); line-height: 1.7; }
.tm-bars dd span { white-space: nowrap; }
.tm-bars dd i { display: block; height: 6px; background: var(--line-soft); }
.tm-bars dd u { display: block; height: 100%; background: var(--band); text-decoration: none; }
.tm-bars dd b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-ai { min-height: 1lh; font-size: var(--fs-note); color: var(--text); }
.tm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 4px; }
.tm-actions-end { margin-top: 32px; justify-content: center; }
.tm-page button.primary.tm-go { min-width: 17rem; font-weight: 700; }
.tm-of { width: 100%; margin-top: 20px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 800 var(--fs-title)/1.5 var(--font-mincho); color: var(--text-head); }
.tm-people { margin-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
.tm-person { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-content: start; gap: 0 12px; width: 100%; min-height: 76px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line-soft); background: none; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.tm-person img { grid-row: 1 / span 3; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--line-soft); }
.tm-person-name { font-size: var(--fs-note); line-height: 1.6; color: var(--text-muted); }
.tm-person-name b { font-size: var(--fs-body); color: var(--text-head); }
.tm-person-name em { margin-left: 8px; padding: 1px 6px; background: var(--band); color: #fff; font-style: normal; font-size: var(--fs-tag); white-space: nowrap; }
/* 一行目：集めた条件に当たる、その人の暮らし。二行目：仕事 */
.tm-person-life { text-wrap: balance; grid-column: 2; font-size: var(--fs-note); line-height: 1.6; color: var(--text); }
.tm-person-life span { display: inline-block; }
.tm-person-line { grid-column: 2; font-size: var(--fs-note); line-height: 1.6; color: var(--text-muted); }
.tm-person:hover .tm-person-name b { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1080px) { .tm-people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .tm-people, .tm-split { grid-template-columns: minmax(0, 1fr); }
  .tm-page button.primary.tm-go { width: 100%; min-width: 0; }
  .tm-actions { width: 100%; }
}

/* 六段の相手探しから、集まった画面へ戻るボタン（find.js closeHTML）：字が増えるぶん、幅だけ */
.find-close.find-close-gather { white-space: nowrap; }

/* 一週間のページ：帯の下の空きを、集まった画面とそろえる。部品の最初の行は文字だけのボタン（押せる範囲が字より上下に広い）なので、そのぶん上へ */
.tm-page > .tm-week { margin-top: calc((1.875rem - var(--tap)) / 2 - 2px); min-height: 0; }

/* 新しい流れの帯（集まる・一週間・待つあいだ）：企画の言葉は、狭い画面でも「…」で切らず、2行まで折り返す */
@media (max-width: 700px) {
  html[data-top='new'] .page-band:has(+ .tm-page) .page-band-eyebrow, html[data-top='new'] .find-new.is-gathering .page-band-eyebrow { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-overflow: clip; letter-spacing: .04em; }
  /* 押せる企画名（3組の画面）：2行で切るのは企画名の字だけ（「直す」は切らない） */
  html[data-top='new'] .page-band:has(+ .tm-page) .page-band-eyebrow:has(.page-band-edit) { display: block; }
  html[data-top='new'] .page-band-edit .page-band-edit-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-overflow: clip; }
}
/* 待つあいだの帯：右に「戻る」のボタンが無いので、その分の空きを取らない（企画の言葉が切れない） */
html[data-top='new'] body .find-new.is-gathering > .page-band .page-band-in { padding-right: 0; }
.tm-scene-failed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

/* 待つあいだの画面（find.js gatheringHTML）：顔を並べた上に、白い箱の一言と動く線。ヘッダーと帯は、ほかの画面と同じ */
.tm-gathering { position: relative; display: grid; place-items: center; min-height: 420px; }
.tm-wait-wall { position: absolute; inset: var(--tm-gap) 0 0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; max-height: 420px; overflow: hidden; }
/* 待つあいだ、止まって見えないように：顔が、あちこちで一人ずつ順に明るくなる（--turn は、一巡のうちのその顔の番。find.js gatheringHTML）。
   画像が届くまでは、同じ大きさの薄い地の色（空きや割れた画像の印を出さない）。届いた顔は、同じ明るさの動きの中に入る */
.tm-wait-wall img { width: 40px; height: 40px; border-radius: 2px; object-fit: cover; background: var(--line-soft); opacity: .45; transition: opacity .3s; animation: tm-wait-look 9s linear infinite; animation-delay: calc(var(--turn, 0s) * -1); }
@keyframes tm-wait-look { 0%, 12%, 100% { opacity: .45; } 4% { opacity: 1; } }
/* 相手の条件が届いたら：条件の札が一つずつ出て、当てはまらない顔が薄くなり、当てはまる顔が残る（find.js narrowDown） */
.tm-gathering:has(.tm-narrow) .tm-wait-wall img { animation: none; opacity: 1; }
.tm-gathering:has(.tm-narrow) .tm-wait-wall img.out { opacity: .1; }
.tm-page .tm-narrow { display: grid; gap: 10px; justify-items: center; text-align: center; }
.tm-narrow p { margin: 0; }
.tm-narrow .tm-tags { justify-content: center; min-height: 0; cursor: default; }
.tm-narrow .tm-tags span:last-child { animation: tm-narrow-in .25s ease-out; }
@keyframes tm-narrow-in { from { opacity: 0; transform: translateY(4px); } }
/* 待った秒数は小さく（出る前から一行ぶんを空けておく：出たときに箱が伸びない） */
.find-wait-new .tm-wait-sec { min-height: 1.4em; font-size: var(--fs-note); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .tm-wait-wall img { animation: none; opacity: .55; transition: none; } }
.tm-page .tm-wait-box { position: relative; width: min(520px, 100%); margin: 0; padding: 22px 28px; background: #fff; border: 3px solid var(--brand-12, #0c1030); box-shadow: 0 8px 24px rgba(12, 16, 48, .15); }
/* 読めなかったあと、欄に残った企画の言葉が1字だけ折れないように */
.tm .tm-ask textarea { text-wrap: pretty; }

/* いちばん上：ペルコモとは（上の線のすぐ下）→ 問い（間をあける）→ 紺の帯。説明と問いは小さくしすぎない。
   句ごとに span を inline-block にして、語の途中で折れないようにする */
.tm { padding-top: 0; }
.tm-lead span { display: inline-block; }
.tm-band { padding-block: 16px; }

/* 集まった画面の「相手をくわしく選び直す」：脇役のボタンと一行の説明（朱色の塗りは主役の一つだけ） */
.tm-reselect { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.tm-reselect p { flex: 1 1 18em; font-size: var(--fs-note); color: var(--text-muted); text-wrap: pretty; }

/* 下のほうの小さな「ペルコモとは」 */
.tm-about { display: grid; gap: 6px; max-width: 46rem; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-note); color: var(--text-muted); }
.tm-about h2 { font: 800 var(--fs-body)/1.5 var(--font-sans); color: var(--text-head); }
.tm-about p { text-wrap: pretty; }
/* 文中リンクの形は人物紹介の .pf-doc-link と同じ（下線）。その CSS は color-mix で下線の色を決めていて、トップを画像にする道具（html2canvas）が読めず止まるので、ここでは色を決めず字の色のままにする */
.tm-about-link { all: unset; cursor: pointer; font-size: var(--fs-note); line-height: 1.7; color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.tm-about-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 767px) { .tm-about-link { display: inline-flex; align-items: center; min-height: 2.75rem; } }
.tm-about-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 4px; }

/* 一週間の部品との間（広い画面） */
@media (min-width: 701px) {
  .tm-week { margin-top: 4px; }
}

/* 相手が集まる画面：紺の帯と人数の行のあいだを、詰める */
.tm-gather { margin-top: -8px; padding-top: 4px; }
.tm-gather .tm-count { line-height: 1.4; }

/* いちばん上：大きな見出し（左）と顔（右）。見出しの下に一言、その下に紺の帯（欄は幅いっぱい。欄の下に「対話する相手」） */
.tm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin: 18px 0 20px; }
.tm-big span { display: inline-block; }
.tm-big { font: 800 clamp(1.625rem, 2.9vw, 2.375rem)/1.3 var(--font-sans, 'LINE Seed JP', sans-serif); color: var(--text-head); letter-spacing: .01em; text-wrap: balance; }
.tm-lead { margin-top: 10px; font-size: var(--fs-body); line-height: 1.7; color: var(--text-head); }
.tm-lead span { display: block; }
.tm-faces { flex: none; display: grid; grid-template-columns: repeat(10, 40px); gap: 3px; }
.tm-faces img { width: 40px; height: 40px; object-fit: cover; display: block; border-radius: 2px; background: var(--line); }
@media (min-width: 1440px) {
  .tm-faces { grid-template-columns: repeat(10, 46px); }
  .tm-faces img { width: 46px; height: 46px; }
}
/* 1280 より狭く 1100 以上：顔は10列2段のまま 32px に小さくして（一言の長い方の行が1行に入る分だけ残す）、
   見出しを1行・一言を2行に保つ。帯までの高さは 1280 以上と同じ */
@media (max-width: 1279px) {
  .tm-head { align-items: center; column-gap: 24px; }
  .tm-faces { --face: 32px; grid-template-columns: repeat(10, var(--face)); gap: 2px; }
  .tm-faces img { width: var(--face); height: var(--face); }
}
/* 1100 より狭い：顔を右に置くと見出しと一言が押しつぶされる。スマホと同じ組み方（見出し、一言、顔を一列） */
@media (max-width: 1099px) {
  .tm-head { display: block; margin: 12px 0 14px; }
  .tm-faces { display: flex; gap: 3px; margin-top: 12px; overflow: hidden; }
  .tm-faces img { flex: 1 1 0; width: auto; max-width: 46px; height: auto; aspect-ratio: 1; }
}
/* 対話する相手：〔人｜会社〕〔全国｜地域〕。押している方が白地 */
.tm-aite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.tm-aite-label { font-weight: 700; color: #fff; }
.tm-seg { display: inline-flex; }
.tm-seg button { min-width: 0; min-height: var(--tap, 44px); padding: 0 20px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 0; background: transparent; color: #fff; font: inherit; font-weight: 700; line-height: 1.3; cursor: pointer; }
.tm-seg button + button { margin-left: -1.5px; }
.tm-seg button:first-child { border-radius: 4px 0 0 4px; }
.tm-seg button:last-child { border-radius: 0 4px 4px 0; }
.tm-seg button[aria-pressed='true'] { position: relative; background: #fff; border-color: #fff; color: var(--band); }
.tm-seg button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tm-place { flex: 0 1 260px; min-height: var(--tap, 44px); padding: 0 14px; border: 0; border-radius: 4px; background: #fff; color: var(--text); font: inherit; }
.tm-place[hidden] { display: none; }
@media (max-width: 700px) {
  .tm-big { font-size: 1.5rem; }
  .tm-lead span + span { display: none; }
  .tm-faces img:nth-child(n + 8) { display: none; }
  .tm-aite { margin-top: 12px; }
  .tm-aite-label { flex-basis: 100%; }
  .tm-seg button { padding: 0 14px; }
  .tm-place { flex: 1 1 100%; }
}

/* 相手が3組（絵：design/aite-2jiku-demo/3kumi-4masu.png）：上に〔人｜会社〕、右に「条件を自分で決める」。その下に3枚の札 */
.tm-groups-page { margin-top: 0; padding-top: 8px; }
.tm-aite-plain { margin-top: 0; justify-content: flex-start; }
.tm-aite-plain .tm-seg button { border-color: var(--band); color: var(--band); background: #fff; }
.tm-aite-plain .tm-seg button[aria-pressed='true'] { background: var(--band); border-color: var(--band); color: #fff; }
.tm-aite-plain .tm-seg button:focus-visible { outline-color: var(--band); }
.tm-aite-plain .tm-place { border: 1px solid var(--line); }
.tm-own { margin-left: auto; font-weight: 400; }
/* 企画を読む AI が「個人にも会社にも当てはまりそう」と返したとき、人の3組の下に一言（会社として見る道） */
.tm-buyer-both { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin: 12px 0 0; font-size: var(--fs-body); line-height: 1.6; color: var(--text); }
.tm-buyer-both span { text-wrap: balance; }
.tm-buyer-both .link { min-height: var(--tap, 44px); padding-inline: 0; font-weight: 700; }
/* 見出しと「条件を自分で決める」を一つの行に（見出しの右。入らない幅では見出しの下に折り返す：#903 の2） */
.tm-groups-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; margin-top: 20px; }
.tm-groups-top .tm-groups-head { margin: 0; }
.tm-groups-top .tm-own { margin-left: auto; min-height: var(--tap, 44px); display: inline-flex; align-items: center; padding-inline: 0; }
.tm-groups-head span { display: inline-block; }
.tm-groups-head { margin-top: 20px; text-wrap: balance; font-size: var(--fs-title); line-height: 1.4; font-weight: 800; color: var(--text-head); }
/* 3組に共通の企画の相手（組の名前からは外してある）。見出しのすぐ下に一度だけ */
.tm-groups-common { margin: 8px 0 0; font-size: var(--fs-body); line-height: 1.6; color: var(--text); text-wrap: pretty; }
.tm-groups { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tm-group { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 20px; border: 1px solid var(--line); background: #fff; }
.tm-group h3 { margin: 0; font-size: var(--fs-lead); line-height: 1.5; font-weight: 800; color: var(--text-head); text-wrap: balance; }
.tm-group-size { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; margin: 0; font-size: var(--fs-note); color: var(--text-muted); }
.tm-group-size b { font-size: var(--fs-head); line-height: 1.2; font-weight: 800; color: var(--text-mark); font-variant-numeric: tabular-nums; }
.tm-group-line { margin: 0; min-height: 3.2em; font-size: var(--fs-note); line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.tm-group-faces { display: flex; gap: 6px; margin: 6px 0 10px; }
.tm-group-faces img { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
/* 読み込むまでは描かない（灰色の丸を「顔の無い人」に見せない）。読み込めたら出す（top-moment.js の load の受け口が .is-shown を付ける） */
.tm-group-faces img:not(.is-shown) { visibility: hidden; }
.tm-group-go { margin-top: auto; width: 100%; min-width: 0; padding-inline: 8px; font-weight: 700; white-space: nowrap; }
/* 聴いたあとの札は「6人の言葉を読む」と「一週間を見て、対話する」の二つ：二つ目は一つ目のすぐ下（下にそろえるのは一つ目の margin-top: auto） */
.tm-group-go + .tm-group-go { margin-top: 8px; }
.tm-group-heard { align-self: flex-start; padding: 1px 8px; background: var(--band); color: #fff; font-style: normal; font-size: var(--fs-tag); white-space: nowrap; }
.tm-group.is-heard { border-color: var(--band); }
.tm-group-top { grid-row: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tm-group-acts { grid-row: 4; align-self: end; display: flex; flex-direction: column; gap: 8px; }
.tm-group-open { position: static; }
.tm-group-open::after { content: ''; position: absolute; inset: 0; }
.tm-group-read { position: relative; z-index: 1; }
/* 3列は、いちばん長い組の名前（「夫婦二人暮らしの50代以上の女性」）が1行に収まる最も狭い幅（実測：札の余白を詰めて952px）。960px以上は3列、それより狭いと1列 */
@media (min-width: 960px) and (max-width: 1099px) {
  .tm-groups { gap: 12px; }
  .tm-group { padding-inline: 14px; }
}
@media (max-width: 959px) {
  .tm-groups { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  /* 1列では札の高さをそろえる必要がない。一行（残りの条件）が無い札は、その行ごと詰める */
  .tm-group-line { min-height: 0; }
  .tm-group-line:empty { display: none; }
}
@media (max-width: 700px) {
  .tm-own { margin-left: 0; flex-basis: 100%; text-align: left; }
}

/* 対話する相手：〔地域〕の場所の欄（public/js/area.js。絵：design/aite-2jiku-demo/top-basho.png）。欄の右に、調べている間の一言か、都道府県・市区町村の二段と範囲の切り替え。候補は欄の下に縦に */
.tm-area-wrap, .tm-area-rest { display: contents; }
.tm-area-wrap[hidden] { display: none; }
.tm-area-sel select { min-height: var(--tap, 44px); max-width: 100%; padding: 0 30px 0 14px; border: 0; border-radius: 4px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23444' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center; color: var(--text); font: inherit; appearance: none; -webkit-appearance: none; cursor: pointer; }
.tm-area-sel select:disabled { opacity: .6; cursor: default; }
.tm-area-sel select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tm-area-note { color: rgba(255, 255, 255, .9); font-size: var(--fs-note); line-height: 1.5; }
.tm-area-none { flex-basis: 100%; margin: 0; }
.tm-area-cands { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tm-area-cands button { min-height: var(--tap, 44px); padding: 0 16px; border: 0; border-radius: 4px; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tm-area-cands button:hover { background: #eef0fa; }
.tm-area-cands button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tm-area-cands b { font-weight: 700; }
.tm-aite-plain .tm-area-note { color: var(--text-muted); }
.tm-aite-plain .tm-area-sel select { border: 1px solid var(--line); }
.tm-aite-plain .tm-area-sel select:focus-visible { outline-color: var(--band); }
.tm-aite-plain .tm-area-cands button { border: 1px solid var(--line); }
.tm-aite-plain .tm-area-cands button:focus-visible { outline-color: var(--band); }
/* 地域の画面の上の行：「千葉県 印西市　市の全体　変える」 */
.tm-area-line { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; min-width: 0; }
.tm-area-line .tm-own { margin-left: auto; }
/* 「町を見る」「変える」「条件を自分で決める」も、押す所は高さ44px（行の高さは〔人｜会社〕と同じ）。字は左にそろえる */
.tm-area-line { align-items: center; }
.tm-area-line .link { display: inline-flex; align-items: center; min-height: var(--tap, 44px); padding-inline: 0; }
.tm-area-line b { font-weight: 800; color: var(--text-head); }
.tm-area-line > span { color: var(--text); }
/* 一行目は場所、二行目は町の数と押す所（町を見る・変える） */
.tm-area-where, .tm-area-acts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; flex-basis: 100%; min-width: 0; }
.tm-area-acts { align-items: center; }
.tm-area-where > span, .tm-area-acts > span { color: var(--text); }
.tm-area-line .link { font-weight: 400; }
.tm-area-towns { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 8px 0 0; font-size: var(--fs-note); color: var(--text-muted); line-height: 1.6; }
/* 会社は市区町村の全体の数：札の上の一行（施設・駅のまわりで選んだとき） */
.tm-area-scope { margin: 10px 0 0; font-size: var(--fs-note); line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.tm-area-say { margin: 20px 0 0; text-align: left; font-size: var(--fs-body); line-height: 1.7; color: var(--text); text-wrap: pretty; }
/* 地域の札：何軒に1軒（大きく）→ 県との比 → 割合が高い町（会社は「4,810事業所のうち564」）→ 顔 → ボタン */
.tm-area-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; margin: 10px 0 0; font-size: var(--fs-note); color: var(--text-muted); }
.tm-area-head b { font-weight: 800; color: var(--text-head); }
@media (max-width: 767px) { .tm-area-sizes { display: grid; grid-template-columns: repeat(var(--sizes-cols, 3), max-content); gap: 2px 16px; } .tm-area-sizes b { grid-column: 1 / -1; } }
.tm-area-big { margin: 0; font-size: 1.375rem; line-height: 1.3; font-weight: 800; color: var(--text-mark); font-variant-numeric: tabular-nums; }
/* 地域の3組の札：組の一行の下に、組を含む区分の名前 → 何軒に1軒 → 県との比 → 世帯の数 → 数えていない条件 */
.tm-area-group .tm-group-line { margin-bottom: 10px; }
.tm-area-kind { margin: 0; font-size: var(--fs-note); line-height: 1.6; color: var(--text); text-wrap: pretty; }
.tm-area-uncounted { margin: 6px 0 0; font-size: var(--fs-note); line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.tm-area-ratio, .tm-area-sub { margin: 0; min-height: 1.6em; font-size: var(--fs-note); line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
/* 県比や町が出ない札：3列・4列のときは高さの空きを残して顔とボタンの高さをそろえ、1列では詰める */
@media (max-width: 959px) {
  .tm-area-ratio.is-blank, .tm-area-sub.is-blank { display: none; }
}
/* 札が4つ：1100px以上は4列、それより狭ければ2列×2段、960px未満は1列。4列で名前が1行に入らないときは、1280px未満を2列×2段（area-cards.js） */
@media (min-width: 1100px) {
  .tm-groups-area.tm-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 960px) and (max-width: 1099px) {
  .tm-groups-area.tm-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) and (max-width: 1279px) {
  .tm-groups-area.tm-n4.is-wrapped { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 4列のときも、顔の列が札からはみ出さない（顔は札の幅に合わせて縮む） */
.tm-area-card .tm-group-faces img { flex: 0 1 44px; width: auto; min-width: 0; height: auto; aspect-ratio: 1; }
@media (max-width: 700px) {
  /* 狭い画面：「町を見る」「変える」「条件を自分で決める」は同じ行に並べる（入らなければ折り返す） */
  .tm-area-line .tm-own { margin-left: 0; flex-basis: auto; }
}
.tm-area-towns span { white-space: nowrap; }
.tm-area-source .tm-about-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.tm-area-source { margin: 12px 0 0; font-size: var(--fs-note); color: var(--text-muted); }

/* 札を押して「選んだ暮らしの形」にする（人 × 地域。public/js/area.js pick）：札の名前のボタンを札いっぱいに広げる（::after）。「一週間を見て、対話する」は上に出して別に押せる。
   選んだ札は枠を太く（色だけにしない）・背景を薄く。色は帯の色（--band）と面（--surface-quiet） */
.tm-area-card { position: relative; }
.tm-area-pick { display: inline; min-height: 0; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; text-wrap: inherit; cursor: pointer; }
.tm-area-pick::after { content: ''; position: absolute; inset: 0; }
.tm-area-pick:focus-visible { outline: none; }
.tm-area-pick:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.tm-area-card .tm-group-go { position: relative; z-index: 1; }
/* 店の下の大きいボタン（area-places.js refreshPlacesGo）が、選んでいる札の先を担うとき、選んでいる札のボタンは隠す（選んでいない札のボタンは残す） */
.tm-groups-area.has-ap-go .tm-area-card.is-picked .tm-group-go { display: none; }
.tm-area-card:has(.tm-area-pick):hover { border-color: var(--band); }
.tm-area-card.is-picked { border-color: var(--band); box-shadow: inset 0 0 0 1px var(--band); background: var(--surface-quiet); }
/* 地図を置く枠（商圏地図 #683：地図は data-area-map-body に描く。area.js startMap）。描けるまでは hidden。出すとき：PC は札を左・地図を右、狭い画面は札の下。
   選んでいる形：PC は一行（tm-area-map-kind）、狭い画面は地図のすぐ上の三つの切り替え（tm-area-map-switch。札と同じ area-select・同じ選び）。地図が出ていないあいだ（hidden）は、札の並びは今のまま */
.tm-area-split:has(> .tm-area-map:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.tm-area-map-kind { display: none; margin: 0 0 8px; font-weight: 800; color: var(--text-head); }
.tm-area-map-switch { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0 0 8px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; }
.tm-area-map-switch button { min-width: 0; min-height: 44px; margin: 0; padding: 6px 8px; border: 0; border-radius: 0; background: #fff; color: var(--text); font: inherit; font-size: var(--fs-note); line-height: 1.4; text-wrap: balance; cursor: pointer; }
.tm-area-map-switch button + button { border-left: 1px solid var(--line); }
.tm-area-map-switch button[aria-pressed='true'] { background: var(--band); color: #fff; font-weight: 800; }
.tm-area-map-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tm-area-map-body.trade-map { min-height: 0; }
/* 地図を読み込んでいる・読み込めなかったとき（area.js startMap）：枠に一行（と「もう一度読み込む」）だけ。地図の高さは取らない */
.tm-area-map.is-failed .tm-area-map-kind, .tm-area-map.is-failed .tm-area-map-switch { display: none; }
/* 読み込み中・失敗の一行は .tm-wait のまま（同じ字の大きさ・濃さ）。地図の枠の中なので、上下の空きだけ詰める */
.tm-area-map.is-failed .tm-wait { padding: 24px 0 12px; }
.tm-area-map.is-failed .tm-actions-end { margin-top: 0; padding-bottom: 12px; }
/* 地域の3組の切り替え：組の名前は長いので、狭い画面では縦に1つずつ（3つ横では3行に折れる。名前は短くしない） */
.tm-area-map-switch.is-groups { grid-auto-flow: row; grid-auto-rows: auto; }
.tm-area-map-switch.is-groups button + button { border-left: 0; border-top: 1px solid var(--line); }
.tm-area-map-switch.is-groups button { text-align: left; padding: 8px 12px; }
/* 地域の3組：地図の上の一文（塗っている区分）と、数えられない組を選んだときの、地図の代わりの一行（札の並びと同じ余白をとる） */
.tm-area-map-none { margin: 24px 0 0; font-size: var(--fs-note); line-height: 1.7; color: var(--text-muted); text-wrap: pretty; }
@media (min-width: 960px) {
  .tm-area-split:has(> .tm-area-map:not([hidden])) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; }
  .tm-area-split:has(> .tm-area-map:not([hidden])) .tm-groups-area { grid-template-columns: minmax(0, 1fr); }
  .tm-area-map-kind { display: block; }
  .tm-area-map-switch { display: none; }
  /* 地図は札と同じ枠に入れ、見出し（選んだ組）と一文も枠の中に。左の一枚目の札と、右の枠の上の線をそろえる（札の並びの margin-top と同じ。斉藤さん 2026-11-21） */
  .tm-area-split > .tm-area-map { margin-top: 16px; padding: 20px; border: 1px solid var(--line); background: #fff; }
}
/* 呼んだ画面（業界のペルコモ）へ戻る道 */
.tm-back-home { margin: 0 0 12px; font-size: var(--fs-note); }
.tm-back-home a { color: var(--text); }

/* 一週間から7人目に「この人に聴く」を押したときの小窓（top-moment.js weekFull）：題は右上の「×」に重ならない。いる6人は顔と名前のボタンで、
   間をあけて並べる（点の付いた縦の並びで、ボタンがくっついていた：手元の写し 2026-11-23） */
.week-full h2 { padding-right: 3rem; }
.week-full-list { list-style: none; margin: var(--space-4) 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.week-full-list button { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }
.week-full-list img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
/* 会社の札の一行：正確な人数と、使う人・決める人の人数を、1行ずつ（狭い幅で1語だけ2行目に残らない） */
.tm-group-line .tm-line-part { display: block; }
