/* セリフ.css ─ ノベル形式セリフ表示エンジン用スタイル (汎用・プロジェクト非依存)
   330_ノベル.css から分離 (v0.7.334)。 対応JSは セリフ.js (同梱)。
   他プロジェクトへ移植する場合、 本ファイル+セリフ.js をコピーすればそのまま動く。
========================================
サバゲ用背景全画面レイヤー（ウィンドウ全体にフィット）
========================================= */
#Go背景レイヤー {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 1000; /* 各種設定(通常1000未満)より上、セリフレイヤーより下 */
background-size: cover;
background-position: center;
display: none;
pointer-events: none; /* クリック操作は下の要素またはセリフレイヤーへ通す */
}
/* ========================================
セリフレイヤー（常に16:9を維持するコンテナ）
トップレベルで常に画面中央にレターボックス配置
========================================= */
#Goセリフレイヤー {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100vw;
height: 56.25vw; /* 16:9 ratio */
max-height: 100vh;
max-width: 177.78vh; /* 16:9 ratio */
container-type: size; /* コンテナクエリを有効化 */
z-index: 2000; /* 背景より上に配置 */
font-family: 'NotoSerifJP', serif;
display: none;
pointer-events: auto;
cursor: pointer;
overflow: hidden;
}
/* ========================================
フキダシ本体（通常キャラ発言用）
========================================= */
.Go吹出 {
position: absolute;
margin-left: -1.6cqw;
width: 100cqw;
height: 60cqh;
background-size: 100% 100%;
background-repeat: no-repeat;
z-index: 2010;
pointer-events: none;
padding: 0;
overflow: visible;
display: none;
}
.Go吹出.反転 {
transform: scaleX(-1);
}
.Go吹出.反転 .吹出中身 {
transform: scaleX(-1);
}
/* 上下位置 */
.窓_上 {
top: 0;
}
.窓_下 {
bottom: 0;
}
/* ========================================
フキダシの左右配置（通常発言用）
========================================= */
.Go吹出.配置_左 {
left: 2cqw;
right: auto;
}
.Go吹出.配置_右 {
right: 2cqw;
left: auto;
}
/* ========================================
システム発言用スタイル
========================================= */
.Go吹出.システム発言 {
width: 80cqw;
height: 28cqh;
margin: 1cqw;
left: 10cqw;
right: auto;
font-size: 2cqw;
background-color: rgba(63, 63, 63, 0.65);
background-size: 100% 100%;
background-repeat: no-repeat;
border: 1px solid rgba(180, 180, 200, 0.4);
border-radius: 8px;
}
.Go吹出.システム発言 .吹出中身 {
padding: 3cqh 3cqw;
justify-content: center;
text-align: center;
}
.Go吹出.システム発言 .吹出名前 {
display: none;
}
/* ========================================
吹き出しの中身（テキスト領域）
========================================= */
.吹出中身 {
display: flex;
flex-direction: column;
justify-content: center;
box-sizing: border-box;
width: 100%;
height: 100%;
color: #fff;
text-shadow: 2px 2px 4px #000;
padding: 3cqh 5cqw 0 5cqw;
}
/* v0.7.58: CSSロールバック ─ 旧 v0.7.49 仕様に戻す (上=配置_左、 下=配置_右 統一前提)
   ユーザー指示「cssロールバックして 配置上＝左 配置下＝右に統一修正せよ」
   システム側 (330_ノベルシステム.js) で 上吹出=強制 配置_左 / 下吹出=強制 配置_右 に統一済 */
/* キャラが左→テキストは右に寄せる */
.Go吹出.配置_左 .吹出中身 {
padding-left: 27cqw;
}
/* キャラが右→テキストは左に寄せる */
.Go吹出.配置_右 .吹出中身 {
padding-right: 28cqw;
padding-left: 11.7cqw;
padding-top: 13.9cqh;
}
/* ========================================
名前ラベル
========================================= */
.吹出名前 {
position: absolute;
font-family: 'MS Gothic', 'ＭＳ ゴシック', monospace;
font-size: 1.7cqw;
font-weight: bold;
color: #ffffff;
-webkit-text-stroke: 2px #000000;
paint-order: stroke fill;
text-shadow: none;
z-index: 2020;
background: none;
padding: 0;
white-space: nowrap;
}
/* v0.7.58: 名前ラベル位置 ロールバック (旧 v0.7.49 仕様) */
/* 上フキダシの名前: フキダシ下外縁、中央寄り (上=配置_左 統一前提) */
.窓_上 .吹出名前 {
bottom: 10.2cqh;
top: auto;
left: 29cqw;
right: auto;
}
/* 下フキダシの名前: フキダシ上外縁 (下=配置_右 統一前提) */
.窓_下 .吹出名前 {
top: 23.1cqh;
bottom: auto;
right: 28cqw;
left: auto;
}
/* ========================================
セリフ本文
========================================= */
.吹出本文 {
font-size: 2.6cqw;
line-height: 1.5;
white-space: pre-wrap;
}
/* v0.6.30: 上吹出のセリフ本文を 25px 右にシフト (ユーザー指示「上のキャラセリフがキャラに被るので25px右にずらす」)
   セリフ画像 (.Go吹出 の background) のサイズは変えず、 .吹出本文 にだけ padding-left:25px を入れて
   テキスト開始位置を25px右へ。 同時に margin-right:-25px で右側余白を25px減らして はみ出しを回避。
   下吹出 (.窓_下) は対象外 (キャラが下中央~右に配置されるためテキスト被りなし)。 */
.Go吹出.窓_上 .吹出本文 {
padding-left: 25px;
margin-right: -25px;
}
/* ========================================
肖像画(キャラ画像)
========================================= */
.Go肖像 {
position: absolute;
z-index: 2015;
height: 55cqh;
max-width: 28cqw;
object-fit: contain;
object-position: bottom;
pointer-events: none;
}
.Go肖像.左 {
left: 2cqw;
right: auto;
}
.Go肖像.右 {
right: 2cqw;
left: auto;
}
.Go肖像.垂直_上 {
top: 0;
bottom: auto;
}
.Go肖像.垂直_下 {
bottom: 0;
top: auto;
}
.Go肖像.隠す {
display: none;
}
#Go操作ガイド {
display: none;
}

/* ========================================
   2026-10-27 本人「セリフ背景白いの見にくい。黒にしろ。改行箇所がまったく考慮されていない。はみ出しすぎ」
   「黒版のセリフ画像が用意されてるだろうが（黒塗りの加工はゴミ）」「名前の位置は決まってる」
   ・フキダシは黒版の絵（lv10api/img/005_f_top.png・005_f_down.png）をそのまま使う（600 が入れる。白版 W は使わない）
   ・名前（.吹出名前）は元の決まった位置のまま。字は .吹出中身 の padding でフキダシの形の内側（名前と重ならない所）に収める
   ・改行は文節（word-break: auto-phrase）と禁則（line-break: strict）。収まらない時は 600 が字を小さくする
   ・.Go吹出 は 100cqw × 60cqh。上の絵の吹き出しは 縦 33〜84%・横 13〜93%、下の絵は 縦 39〜91%・横 6〜85%
========================================= */
.Go吹出.窓_上:not(.システム発言) .吹出中身 { padding: 21cqh 8.5cqw 13.5cqh 21cqw; }
.Go吹出.窓_下:not(.システム発言) .吹出中身 { padding: 26.5cqh 20cqw 7cqh 8.5cqw; }
.Go吹出:not(.システム発言) .吹出中身 { overflow: hidden; }
.Go吹出:not(.システム発言) .吹出本文 { padding: 0 !important; margin: 0 !important; font-size: var(--吹出字, 2.4cqw); line-height: 1.5; color: #fff; word-break: auto-phrase; line-break: strict; overflow-wrap: anywhere; text-wrap: pretty; }
.Go吹出.システム発言 .吹出本文 { word-break: auto-phrase; line-break: strict; text-wrap: pretty; }

/* 表情の動き（600_会話.js 顔窓。行の 表情 が 怒＝揺れ・驚＝跳ね・悲＝沈む・笑＝弾む・照＝傾く。2026-11-17。絵の差分が無い人にも効く） */
@keyframes 表情_怒 { 0%,100% { transform: translateX(0); } 15% { transform: translateX(-1.2cqh) rotate(-1deg); } 35% { transform: translateX(1.2cqh) rotate(1deg); } 55% { transform: translateX(-0.8cqh); } 75% { transform: translateX(0.5cqh); } }
@keyframes 表情_驚 { 0%,100% { transform: translateY(0); } 30% { transform: translateY(-2.4cqh) scale(1.03); } 60% { transform: translateY(0.3cqh); } }
@keyframes 表情_悲 { 0% { transform: translateY(0); filter: none; } 100% { transform: translateY(1.2cqh); filter: brightness(.82) saturate(.8); } }
@keyframes 表情_笑 { 0%,100% { transform: translateY(0); } 25% { transform: translateY(-1cqh); } 50% { transform: translateY(0); } 75% { transform: translateY(-0.6cqh); } }
@keyframes 表情_照 { 0%,100% { transform: rotate(0); } 40%,70% { transform: rotate(-2.5deg) translateX(-0.4cqh); } }
.Go肖像.顔窓.表情_怒 { animation: 表情_怒 .42s ease-out; }
.Go肖像.顔窓.表情_驚 { animation: 表情_驚 .38s ease-out; }
.Go肖像.顔窓.表情_悲 { animation: 表情_悲 .6s ease-out forwards; }
.Go肖像.顔窓.表情_笑 { animation: 表情_笑 .5s ease-in-out; }
.Go肖像.顔窓.表情_照 { animation: 表情_照 .7s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .Go肖像.顔窓[class*="表情_"] { animation: none; } }
