/* Tonari のサイトだけの部品（2026-10-11、共通のデザインへの置き換え）。
   共通の骨組みは kz-*.css、色は kz-theme-tonari-*.css（どちらも kazuapps の scripts/sync-design.py が写す。手で直さない）。
   色は共通の変数（--paper、--ink、--muted、--line、--link、--night、--accent など）だけを使う。例外は最初の画面の機器の絵
   （Mac と iPhone の本体、壁紙、ウインドウ）で、絵の色は .stage の中の変数にまとめた（明るい表示でも暗い表示でも夜の面の上に
   描くので、テーマで変わらない）。光の継ぎ目は --accent から作る。
   /assets/* は 1 年キャッシュするので、中身を変えたら名前の番号を上げる（site-v14.css）。
   site-v13（2026-10-12）：Codex の点検の TN-018・021・046・047。質問の題の決まりは共通の CSS に移った */

/* ---- 上部と共通の小さな部品 ---- */

/* 言語の切り替え（上部のページの切り替えの中。日本語のページでは English、英語のページでは 日本語） */
.primary-nav .lang-switch { color: var(--muted); }

.visually-hidden,
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.note { color: var(--muted); font-size: 0.9375rem; }
.note + .note { margin-top: 0.5rem; }
.mono { font-family: var(--font-code); font-size: 0.9em; overflow-wrap: anywhere; }

/* スマホやタブレット（タッチだけの端末）で開いた人に、Mac で開いてダウンロードすることを示す（3 回目のレビューの U-027） */
.touch-only { display: none; }
@media (hover: none) and (pointer: coarse) {
  .touch-only { display: block; margin-top: 0.75rem; font-size: 0.9375rem; color: var(--muted); max-width: var(--measure); }
}

/* 本文のページ（ページの頭の下） */
.page-body { padding-block: 0.5rem clamp(3rem, 7vw, 5.5rem); }
.page-body .prose > h2:first-child { margin-top: 0; }

/* ---- トップ ---- */

/* iPhone アプリの状況の文（<!--status:iphone-->。配布を始めた日に差し替える） */
.status { margin-top: 0.9rem; max-width: var(--measure); color: var(--muted); font-size: 0.9375rem; }
.status::before {
  content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.5rem; vertical-align: 0.12em;
  border-radius: 50%; background: var(--accent);
}

/* 夜の面の中の機器の絵。単位 --u。Mac の列は台の幅 110u（画面 96u は中央）、あいだ 3u、光、3u、iPhone 30u。
   全体の座標（左上が 0）で、Mac の画面の中は x=9u・y=2u から、iPhone の画面の中は x=118u・y=4.5u から始まる。
   壁紙とウインドウはこの座標で置くので、Mac の画面から iPhone の画面へ続いて見える */
.stage-panel { padding-block: clamp(1.75rem, 4vw, 3rem); overflow: hidden; }
.stage {
  --device-body: #0b0b0d;
  --device-edge: rgba(255, 255, 255, 0.14);
  --device-base: linear-gradient(#d5d8de, #8c9098);
  --device-wall: radial-gradient(120% 140% at 18% 12%, #2d4a7c 0%, #16233e 42%, #070a12 80%);
  --device-window: rgba(30, 32, 40, 0.94);
  --device-window-edge: rgba(255, 255, 255, 0.1);
  --device-text: rgba(255, 255, 255, 0.16);
  --device-menubar: rgba(0, 0, 0, 0.35);
  --device-shadow: rgba(0, 0, 0, 0.45);
  --light-red: #ff6159;
  --light-yellow: #ffbd2e;
  --light-green: #28c941;
  container-type: inline-size;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: min(15px, calc(3 * 100cqi / 150));
  max-width: 46rem;
  margin-inline: auto;
}
.stage > * { --u: min(5px, calc(100cqi / 150)); }
.mac { display: flex; flex-direction: column; align-items: center; }
.mac-screen,
.phone { position: relative; background: var(--device-body); border: 1px solid var(--device-edge); overflow: hidden; }
.mac-screen {
  width: calc(96 * var(--u)); height: calc(62 * var(--u));
  border-radius: calc(3 * var(--u)) calc(3 * var(--u)) 3px 3px; padding: calc(2 * var(--u));
}
.mac-base {
  width: calc(110 * var(--u)); height: calc(3 * var(--u));
  border-radius: 0 0 calc(6 * var(--u)) calc(6 * var(--u)); background: var(--device-base);
}
.phone { width: calc(30 * var(--u)); height: calc(62 * var(--u)); border-radius: calc(6 * var(--u)); padding: calc(1.5 * var(--u)); }
/* 画面の中身：同じ壁紙を、機器の絵全体の座標で敷く（Mac から iPhone へ続いて見える） */
.screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background: var(--device-wall); background-size: calc(146 * var(--u)) calc(66 * var(--u));
}
.mac-screen .screen { border-radius: calc(1.5 * var(--u)); background-position: calc(-9 * var(--u)) calc(-2 * var(--u)); }
.phone .screen { border-radius: calc(4.5 * var(--u)); background-position: calc(-118 * var(--u)) calc(-4.5 * var(--u)); }
.menubar { position: absolute; inset: 0 0 auto 0; height: calc(3.2 * var(--u)); background: var(--device-menubar); }
/* Mac の画面から iPhone へまたがるウインドウ（2 つの画面で、同じ位置に描く） */
.window {
  position: absolute; width: calc(52 * var(--u)); height: calc(30 * var(--u)); border-radius: calc(1.6 * var(--u));
  background: var(--device-window); border: 1px solid var(--device-window-edge);
  box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) var(--device-shadow);
}
.window::before {
  content: ""; position: absolute; left: calc(2 * var(--u)); top: calc(1.6 * var(--u));
  width: calc(8 * var(--u)); height: calc(1.6 * var(--u)); border-radius: 99px;
  background: radial-gradient(circle at calc(0.8 * var(--u)) 50%, var(--light-red) calc(0.7 * var(--u)), transparent 0),
    radial-gradient(circle at calc(3.6 * var(--u)) 50%, var(--light-yellow) calc(0.7 * var(--u)), transparent 0),
    radial-gradient(circle at calc(6.4 * var(--u)) 50%, var(--light-green) calc(0.7 * var(--u)), transparent 0);
}
.window::after {
  content: ""; position: absolute; left: calc(2.5 * var(--u)); right: calc(2.5 * var(--u));
  top: calc(6 * var(--u)); bottom: calc(3 * var(--u));
  background: repeating-linear-gradient(to bottom, var(--device-text) 0, var(--device-text) calc(1 * var(--u)),
    transparent calc(1 * var(--u)), transparent calc(3.6 * var(--u)));
}
/* ウインドウは全体の座標で x=78u・y=16u（Mac の画面の中は 69u・14u、iPhone の画面の中は -40u・11.5u） */
.mac-screen .window { left: calc(69 * var(--u)); top: calc(14 * var(--u)); }
.phone .window { left: calc(-40 * var(--u)); top: calc(11.5 * var(--u)); }
/* 光の継ぎ目（Tonari の色。アプリのアイコンと同じ） */
.seam { align-self: stretch; display: flex; align-items: flex-end; padding-bottom: calc(4 * var(--u)); }
.seam span:not([class]) {
  display: block; width: 2px; height: calc(56 * var(--u)); border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 22%, white);
  box-shadow: 0 0 18px 4px color-mix(in srgb, var(--accent) 60%, transparent),
    0 0 60px 14px color-mix(in srgb, var(--accent) 25%, transparent);
  transform-origin: 50% 50%;
}
/* 1 回だけの動き：光が中央から伸び、iPhone の画面が点き、ウインドウが Mac の画面から継ぎ目を越えて iPhone へ滑る
   （3 回目のレビューの U-037）。動きを減らす設定では動かさない */
@media (prefers-reduced-motion: no-preference) {
  .seam span:not([class]) { animation: seam-grow 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
  .phone .screen { animation: screen-on 0.7s ease-out 1.05s both; }
  .mac-screen .window,
  .phone .window { animation: window-move 1.2s cubic-bezier(0.3, 0.7, 0.2, 1) 1.8s both; }
}
@keyframes window-move { from { transform: translateX(calc(-40 * var(--u))); } to { transform: none; } }
@keyframes seam-grow { from { transform: scaleY(0.04); opacity: 0.4; } to { transform: scaleY(1); opacity: 1; } }
@keyframes screen-on { from { opacity: 0; filter: brightness(0.3); } to { opacity: 1; filter: none; } }

/* 特長の 3 つ（最初の画面のすぐ下） */
.why-chapter { padding-block: clamp(2rem, 5vw, 3.5rem); }
.why { list-style: none; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.why > li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.why h3 { font-size: 1.125rem; }
.why p { margin-top: 0.35rem; color: var(--muted); max-width: var(--measure); }
@media (min-width: 60rem) {
  .why { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .why > li { padding: 1.5rem 1.5rem 1.5rem 0; border-bottom: 0; }
  .why > li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
}

/* 章の前置き（chapter-head の中ではない前置きも同じ見た目に） */
.intro { color: var(--muted); max-width: var(--measure); }

/* 使う場面の例と、アプリの画面 */
.scenes { padding-left: 1.4em; max-width: var(--measure); }
.scenes > li + li { margin-top: 0.35rem; }
.shots { display: grid; gap: 2rem; margin-top: 2rem; align-items: start; }
.shots .shot.is-mac { max-width: 24rem; }
.shot figcaption strong { display: block; color: var(--ink); }
@media (min-width: 48rem) {
  .shots { grid-template-columns: 16rem minmax(0, 24rem); gap: 3rem; }
}

/* はじめかた：番号は CSS で数える（文に数字を足さない） */
.procedure.counted { counter-reset: step; --steps: 4; }
.procedure.counted > li { counter-increment: step; align-content: start; }
.procedure.counted > li::before {
  content: counter(step); grid-row: span 2;
  color: var(--ink); font-family: var(--font-num); font-size: 2rem; font-weight: 700; line-height: 1.1;
}
@media (min-width: 60rem) { .procedure.counted.across > li::before { grid-row: auto; } }

/* できること・Tonari Pro の機能 */
.feature-group + .feature-group { margin-top: 2.5rem; }
.feature-group > h3 { margin-bottom: 0.75rem; }
h2 + .feature-group { margin-top: 1.5rem; }
.abilities-list { list-style: none; padding: 0; display: grid; gap: 0 3rem; margin-top: 1rem; }
.abilities-list > li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.abilities-list :is(h3, h4) { margin: 0; font-size: 1.0625rem; line-height: 1.5; font-weight: 700; color: var(--ink); }
.abilities-list p { margin-top: 0.35rem; color: var(--muted); max-width: var(--measure); }
@media (min-width: 48rem) { .abilities-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 比べの表と動く環境の表 */
.spec-table.compare { margin-block: 1.5rem 2rem; }
.spec-table.compare thead th,
.spec-table.compare tr:first-child th { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--ink); }
@media (max-width: 40rem) {
  .spec-table.compare tr:first-child { display: none; }
}

/* 最後のダウンロード */
.get { display: grid; gap: 1.5rem 2.5rem; align-items: center; }
.get img { width: 112px; height: auto; border-radius: 22%; }
.get .intro { margin-top: 0.75rem; }
.get .action { margin-top: 1.25rem; }
@media (min-width: 48rem) { .get { grid-template-columns: auto minmax(0, 1fr); } .get img { width: 144px; } }

/* ---- 使い方 ---- */
.guide-body > .guide-step { display: grid; gap: 1.5rem; padding-top: 2.5rem; }
.guide-body > .guide-step:first-child { padding-top: 0; }
.guide-body > .guide-step + .guide-step { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.guide-step h2 .num { margin-right: 0.75rem; color: var(--link); font-family: var(--font-num); font-weight: 700; }
/* 目次とメニューのリンクは、文の中の改行の印（<wbr>）ごとに別の列にならないように、flex ではなく block で並べる
   （共通の CSS は flex。押せる高さは min-height のまま） */
.guide-index a { display: block; padding-block: 0.55rem; }
.menu-sheet nav a { display: block; padding-block: 0.7rem; line-height: 1.5; }
.guide-step :where(ol, ul):not([class]) { padding-left: 1.4em; }
.guide-step :where(ol, ul):not([class]) > li + li { margin-top: 0.3rem; }
.guide-step :where(p, ul, ol) + :where(p, ul, ol) { margin-top: 0.85rem; }
.guide-step p,
.guide-step li { max-width: var(--measure); }
.pics { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; }
.pics img { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.pics .pic-mac { width: min(100%, 20rem); }
.pics .pic-phone { width: min(100%, 12rem); border-radius: 1.75rem; }
.pics .pic-wide { width: min(100%, 32rem); }

/* ---- サポート ---- */
.support-body .faq-group + :is(.faq-group, .report) { margin-top: 2.75rem; }
.support-body .faq-group > h2 { margin-bottom: 0.75rem; font-size: 1.5rem; }
.support-body .report > h2 { font-size: 1.5rem; }
/* アプリの「サポートを見る」で開いた項目を目立たせ、中身も見せる（スクリプトは使わない。U-045）。
   ブラウザは :target の details を開かない（2026-10-07 に Playwright の WebKit 26.6 で、open は false のままだった）。
   ::details-content で閉じた中身を見せる（対応していないブラウザでは、今までどおり閉じたまま印だけが付く）。
   見せている間は、題を押しても閉じない（ページの中の別の項目へ移ると閉じる） */
.faq details:target::details-content { content-visibility: visible; display: block; }
/* 開いて見せている間は、押しても閉じないので、＋と−の印を出さない（TN-047）。位置は共通の scroll-padding-top に任せる（TN-018：
   ここでも足すと、上端から下に寄りすぎた） */
.faq details:target > summary::after { content: none; }
.faq details:target > summary { cursor: default; }
.faq details:target > summary { padding-left: 0.875rem; box-shadow: inset 3px 0 0 var(--link); }

/* ---- ダウンロード ---- */
.dl-card { display: grid; gap: 1.25rem 2rem; align-items: start; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.dl-card > img { width: 96px; height: auto; border-radius: 22%; }
.dl-card .note { margin-top: 0.9rem; }
/* ファイルの大きさを入れたダウンロードのボタンは長いので、狭い幅では 2 行に折り返す（共通のボタンは折り返さない。幅 320 の WebKit で
   はみ出した） */
.dl-card .action { display: inline-block; max-width: 100%; padding: 0.7rem 1.4rem; line-height: 1.5; text-align: center; white-space: normal; }
.needs { list-style: none; padding: 0; margin-top: 1rem; border-top: 1px solid var(--line); }
.needs > li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); max-width: var(--measure); }
@media (min-width: 48rem) { .dl-card { grid-template-columns: auto minmax(0, 1fr); } .dl-card > img { width: 112px; } }

/* ---- リリースノート（<article class="release" id="v版"> の形は verify-site.py と make-feed.py が読むので変えない） ---- */
.release-log > .release > h2 { font-family: var(--font-num); font-size: 1.5rem; }
.release-log > .release > p { margin: 0; }
@media (min-width: 60rem) {
  .release-log > .release > h2,
  .release-log > .release > p:first-of-type { grid-column: 1; }
  .release-log > .release > h2 { grid-row: 1; }
  .release-log > .release > p:first-of-type { grid-row: 2; }
  .release-log > .release > ul { grid-column: 2; grid-row: 1 / span 3; }
}

/* 下の帯の言語の切り替え（site-chrome.py が .colophon-legal に置く）も、押せる高さを 44px に（TN-021） */
.colophon-legal a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* App Store の公式バッジ（Apple の App Store Marketing Tools の素材。色・形は変えない。2026-10-17、iPhone アプリの配布の開始）。
   トップの「Mac 版をダウンロード」の横と、ダウンロードのページの「iPhone アプリ」の節に置く。ボタン（高さ 3rem）の並びの中では
   縦の中央にそろえる */
.store-badge { display: inline-flex; align-items: center; align-self: center; flex: none; }
.store-badge img { width: auto; height: 40px; }
.store-badge-row { margin-top: 1rem; }
