/*
 * 画面（Blade）用の、補正：モックの CSS（common.css）の、あとに、読み込む。
 * モックは、静的な HTML のため、リンク（<a>）や、並べて表示する例（<div>）の形で、書かれている。実際の画面では、ボタン（<button>）・ダイアログ（<dialog>）を使うので、その差を、ここで、そろえる。
 * Bản vá giao diện cho Blade: nạp sau common.css. Mockup là HTML tĩnh nên dùng <a>/<div>; màn hình thật dùng <button>/<dialog>, phần chênh lệch được chỉnh ở đây.
 */

/* ボタン：文字の種類を、ページに、そろえる。押せることが、分かるようにする */
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }

/* リンクの形で、作られているクラスを、<button> に、使うとき：既定の枠を、消す（枠が、クラスに、無いもの）*/
button.c-029, button.c-154, button.c-441, button.c-095 { border: none; }

/* ログインの、タブ（新規登録・ログイン）：ボタンの形で、作られている。リンク・文字に、使うので、中央に、そろえる */
a.c-464, span.c-465 { display: flex; align-items: center; justify-content: center; box-sizing: border-box; text-decoration: none; }

/* ダウンロードのボタン：<button>（フォームの中）。フォームは、枠の、一部として、並べる */
form.c-download { display: contents; }

/* ポップアップ（<dialog>）：見本の c-322 は、画面の中に、並べて表示する例のため、常に、表示される。閉じているときは、隠し、開いたときだけ、画面の中央に、出す */
dialog.c-322:not([open]) { display: none; }
dialog.c-322[open] { display: flex; margin: auto; }
dialog.c-322::backdrop { background: rgba(29, 35, 48, 0.55); }

/* 画面全体の枠（12種類）：見本は、枠ごとに、最小の高さ（700〜1600px）を、固定している。窓が、縦に長いとき、下に、白い部分が、残る。窓の高さいっぱいまで、広げる（メニューも、一緒に、伸びる）。
   c-518：ログイン／c-074・c-063・c-091・c-078・c-366・c-256・c-184・c-506 ほか：メニューつきの画面・個別の画面／c-517・c-519：運営側のログインなど */
.c-063, .c-074, .c-078, .c-091, .c-184, .c-256, .c-366, .c-367, .c-506, .c-517, .c-518, .c-519 { min-height: 100vh; }

/* 台本の画面：指摘の重さの色分け。見本は、橙（c-329）・青（c-327）の枠と、強調（c-321・c-319）だけ。「生成できません」（赤）を、足す */
.scene-block { border: 2px solid var(--c-danger); }
.mark-block { background: var(--c-danger-bg); color: var(--c-danger); text-decoration: underline; padding: 0 2px; }
span.c-044 { display: inline-flex; align-items: center; }
.c-095:disabled, button.c-095[disabled] { background: var(--c-bg); color: var(--c-text-faint); border: 1px solid var(--c-border); cursor: not-allowed; }
audio.narration { width: 100%; max-width: 420px; height: 36px; margin-top: 4px; }

/* 台本の画面の、見た目の補正 */
/* 凡例：バッジと説明を、2列の表にそろえる（見本は、折り返しで、ずれる）*/
.c-363 { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; }
/* 押せないボタン（修正案の適用：準備中）は、灰色にする */
button.c-183:disabled { color: var(--c-text-faint); border-color: var(--c-border); background: var(--c-bg); cursor: not-allowed; }
/* 承認の注意書き：縦に並べて、右にそろえる */
.approve-box { flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
/* 凡例のバッジは、文字の幅（列いっぱいに、伸ばさない）*/
.c-363 > span:nth-child(odd) { justify-self: start; }
/* 指摘を無視するフォーム（折りたたみ）*/
details.ignore-form summary { cursor: pointer; font-size: 12px; color: var(--c-text-sub, #555); }
details.ignore-form form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* ローディング（処理中の、くるくる）。動きを減らす設定のときは、ゆっくり回す */
.spinner { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spinner-rotate 0.8s linear infinite; }
@keyframes spinner-rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
/* 法規制チェックの実行中：指摘の一覧を、薄くして、更新を、待っていることが、分かるようにする */
.is-busy .finding-list { opacity: 0.5; }

/* 書き換え案（AI）：シーンの文の下に出す */
.rewrite-box { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; padding: 12px; border: 1px dashed var(--c-border); border-radius: 8px; background: var(--c-bg); }

/* 声の選択・試聴 */
details.voice-picker { margin: 4px 0 12px; }
details.voice-picker summary { cursor: pointer; display: inline-block; }
details.voice-picker form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface, #fff); }
.voice-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 420px; }

/* ラジオ入力を、視覚的に、隠す（スクリーンリーダー・キーボードでは、使える）。カード全体を <label> にして、丸い印は、別の要素で、描くため */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* キーボードで、ラジオを、選んだとき、カードに、フォーカスの印を、出す */
label.c-328:focus-within, label.c-101:focus-within { outline: 2px solid var(--c-primary); outline-offset: 2px; }
label.c-328, label.c-101 { cursor: pointer; }


/* U04 場面と場面の間の「つなぎ」の部品（R11〜R13）：細い縦線・判断の元のバッジ（AI＝緑・あなたが変更＝青・規則＝灰）・迷った境目の印（黄）・選択のボタン */
.tr-box { margin: -6px 0 14px 14px; padding: 6px 12px; border-left: 3px solid #c9d3e0; font-size: 13px; line-height: 1.8; }
.tr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tr-badge { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; color: #fff; }
.tr-badge-ai { background: #2e8b57; }
.tr-badge-user { background: #2f6fdb; }
.tr-badge-fixed { background: #7a8594; }
.tr-split-wrap { display: inline-block; }
.tr-split { display: inline-block; padding: 1px 9px; border-radius: 10px; background: #f5d76e; color: #5a4500; font-size: 12px; cursor: pointer; list-style: none; }
.tr-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tr-buttons button[aria-pressed="true"] { background: #e8f0fe; border-color: #2f6fdb; font-weight: 600; }

.tr-radios { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.tr-radios label { cursor: pointer; }
