.record-replay {
/* 配色・ボタン・選択UIは既存CSSを使い、ここでは取り込み画面の配置を定義する。 */
& { color-scheme: dark; }
/* 暗色・書体・補助の文字色は既存土台（site.css）を使う。 */
& { margin: 0; background: var(--bg); color: var(--text); }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
.mock-label, .eyebrow { color: var(--gold-light); font-size: 12px; }
h1 { font-size: 25px; margin: 4px 0 6px; letter-spacing: .03em; }
h2 { font-size: 18px; }
p { margin: 6px 0 12px; }
.intro, .list-toolbar, .row-head, .field-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.intro > div { min-width: 0; }
.steps { list-style: none; padding: 0; display: flex; gap: 32px; margin: 0 0 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.steps li { padding-bottom: 12px; }
.steps li span { margin-left: 6px; }
.steps .is-current { color: var(--gold-light); border-bottom: 2px solid var(--gold); }
.review-layout { display: grid; grid-template-columns: minmax(0, 790px) minmax(210px, 1fr); gap: 36px; }
.rows-area { min-width: 0; }
.list-toolbar { margin-bottom: 12px; font-size: 14px; flex-wrap: wrap; }
.list-toolbar label { font-size: 12px; }
.row { border-top: 1px solid var(--line); padding: 18px 0 26px; scroll-margin-top: 14px; }
.row.is-excluded .row-fields { opacity: .55; }
.row-head { margin-bottom: 9px; }
.row-title { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-number { font-size: 19px; color: var(--gold-light); }
.row-head .btn { min-height: 34px; padding: 5px 12px; font-size: 12px; }
.row-image-scroll { overflow-x: auto; overscroll-behavior-inline: contain; background: #111921; border: 1px solid #354654; }
.row-image { width: 100%; min-width: 590px; height: auto; display: block; }
.row-fields { margin-top: 14px !important; }
.field-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.field-grid > div { min-width: 0; }
.field-heading, .side-heading { font-size: 12px; color: var(--muted); margin: 0 0 5px; }
& .row .cr-input, & .row .filter-select { margin: 0; height: 42px; width: 100%; font-size: 14px; }
& .row .choice-trigger { padding-left: 0; }
.row .match-sides { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.row .side-card { display: block; }
.row .side-card h3 { font-size: 12px; font-weight: 500; margin: 0 0 5px; }
.row .deck-fields { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; }
.row .class-trigger { height: 42px; }
.row .class-trigger img { width: 26px; height: 26px; }
.row .choice-trigger .name { font-size: 13px; }
.field-error { display: block; font-size: 11px; color: var(--danger-soft); margin: 4px 0 0; min-height: 0; }
.field-error:empty { display: none; }
.row-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.row-bottom .going-buttons { gap: 6px; }
.row-bottom .going-buttons .btn { height: 37px; min-height: 37px; font-size: 13px; }
.field-heading .btn { font-size: 10px; padding: 0 4px; min-height: 20px; }
.row details { margin-top: 10px; font-size: 12px; color: var(--muted); }
.row details textarea { width: 100%; margin-top: 8px; min-height: 48px; font-size: 14px; border: 1px solid var(--line); padding: 8px; }
.duplicate-box { margin-top: 14px; border-left: 2px solid #dca66e; padding: 8px 10px; background: #dca66e09; display: flex; align-items: center; gap: 12px; justify-content: space-between; font-size: 12px; }
.duplicate-box p { margin: 0; color: #ebcba4; }
.duplicate-box .btn { white-space: nowrap; font-size: 12px; padding: 5px 12px; }
.duplicate-resolved { color: var(--muted); font-size: 11px; margin: 10px 0 0; }
.summary-sticky { position: sticky; top: 20px; border-top: 2px solid var(--gold); padding-top: 16px; }
.summary-sticky h2 { font-size: 16px; margin: 0 0 14px; }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.counts > div { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); }
.counts strong { font-size: 26px; font-weight: 500; color: var(--text); line-height: 1.25; }
.counts .attention strong { color: #edb587; }
#replay-row-nav { border-top: 1px solid var(--line); margin-top: 20px; }
#replay-row-nav a { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 10px 2px; color: var(--text); text-decoration: none; font-size: 12px; }
#replay-row-nav a span { color: var(--muted); }
.test-controls { font-size: 11px; color: var(--muted); margin-top: 30px; }
.test-controls label { display: flex; margin-top: 10px; font-size: 12px; }
.save-bar { position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 14px max(20px, calc((100vw - 1120px) / 2)); padding-bottom: max(14px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.save-bar > div { display: flex; flex-direction: column; gap: 3px; }
.save-bar strong { font-size: 14px; }
.save-bar .muted { font-size: 11px; }
.save-bar .btn { min-width: 210px; }
.record-dialog { width: calc(100vw - 32px); padding: 20px; }
.record-dialog .panel-head { margin-top: 0; }
.record-dialog .form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
.record-dialog p { font-size: 14px; }
.compare { width: 100%; border-collapse: collapse; font-size: 12px; margin: 18px 0 12px; }
.compare :is(th,td) { padding: 9px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.compare th { color: var(--muted); font-weight: 400; }
.compare .different { color: var(--warning-text); }
.image-dialog { max-width: 1100px; }
.image-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.image-tools label { display: flex; align-items: center; gap: 8px; }
#replay-image-scroll { overflow: auto; max-height: 65dvh; overscroll-behavior: contain; }
#replay-full-image { min-width: 760px; position: relative; }
#replay-full-image img { display: block; width: 100%; height: auto; }
.roi { position: absolute; border: 2px solid #f0bd49; pointer-events: none; }
.roi span { display: block; width: 20px; background: #f0bd49; color: #171717; text-align: center; font-size: 11px; }
.roi.active { border-color: #5cedb7; }
.roi.active span { background: #5cedb7; }
.result-heading { display: flex; align-items: center; gap: 14px; margin: 24px 0; }
#replay-result-list { margin: 24px 0; }
.result-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.result-row span { color: var(--muted); }
@media (max-width: 800px) {
  .review-layout { grid-template-columns: 1fr; gap: 0; }
  .review-aside { grid-row: 1; }
  .summary-sticky { position: static; padding-top: 0; border: 0; }
  .summary-sticky h2, .summary-sticky > .muted, #replay-row-nav { display: none; }
  .counts { grid-template-columns: repeat(4, 1fr); gap: 6px; padding-bottom: 16px; margin-bottom: 0; }
  .counts strong { font-size: 23px; }
  .test-controls { margin: 0 0 16px; }
  h1 { font-size: 22px; }
  .intro { align-items: flex-start; gap: 8px; }
  .intro .eyebrow, .intro .muted { display: none; }
  .intro h1 { margin: 0; font-size: 21px; }
  .intro > .btn { font-size: 11px; padding: 5px 8px; flex: none; }
  .steps { gap: 22px; font-size: 11px; margin-bottom: 12px; }
  .steps li { padding-bottom: 8px; }
  .steps li span { margin-left: 2px; }
  .field-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .field-grid > :first-child { grid-column: 1 / -1; }
  & .row .cr-input { font-size: 16px; }
  .row .match-sides { grid-template-columns: 1fr; gap: 10px; }
  .row .side-card { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 0 8px; align-items: center; }
  .row .side-card .field-error { grid-column: 2; }
  .row .side-card h3 { margin: 0; }
  .row .deck-fields { grid-template-columns: 44px minmax(0,1fr); }
  .row-bottom { gap: 10px; }
  .save-bar { padding: 10px 16px max(10px, env(safe-area-inset-bottom)); gap: 8px; flex-wrap: wrap; }
  .save-bar > div { flex-direction: row; flex-wrap: wrap; gap: 3px 10px; align-items: baseline; }
  .save-bar .btn { width: 100%; min-width: 0; height: 44px; }
  .row-image-scroll::after { content: '横スクロールで確認 →'; display: block; font-size: 10px; color: #c1c9d1; text-align: right; padding: 2px 8px; position: sticky; left: 0; }
  .row { padding-bottom: 22px; }
  .record-dialog { padding: 16px; }
  .record-dialog h2 { font-size: 18px; }
}
/* 密度比較用の配置。PCは画像ごとに最大6戦、スマホは同じ位置で候補を切り替える。 */
/* 古い共通ボタンの角丸・浮き上がりを、現行デザイン規約に合わせる。 */
& .btn:not(.class-center), & .select-menu-btn { border-radius: 0; box-shadow: none; }
& .btn:not(.class-center):hover { transform: none; box-shadow: none; }
& .btn.primary { color: var(--bg); }
& :is(dialog.panel, dialog.popup-surface) { border-radius: 0; border-top: 2px solid var(--gold); }
& :is(.gold-hover, .gold-selected) { --gold-feedback: linear-gradient(rgba(var(--gold-rgb), .1), rgba(var(--gold-rgb), .1)); }
& .btn, & .filter-select { transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease; }
.review-layout { display: block; }
.list-toolbar { margin: 0 0 10px; gap: 12px; flex-wrap: nowrap; }
#replay-image-tabs { display: flex; gap: 4px; }
#replay-image-tabs, #replay-row-nav { position: relative; }
#replay-image-tabs::after, #replay-row-nav::after { content: ''; position: absolute; bottom: 0; left: 0; height: 2px; width: var(--tab-w, 0px); transform: translateX(var(--tab-x, 0px)); background: var(--gold); transition: transform 220ms ease, width 220ms ease; pointer-events: none; }
& :is(#replay-image-tabs, #replay-row-nav) .btn { border-color: transparent; background: transparent; }
& :is(#replay-image-tabs, #replay-row-nav) .btn[aria-pressed="true"] { --button-rest-color: transparent; border-color: transparent; color: var(--gold-light); }
#replay-image-tabs .btn { font-size: 12px; padding: 5px 10px; min-height: 32px; white-space: nowrap; }
.list-toolbar .check-row { margin-left: auto; white-space: nowrap; font-size: 12px; }
.counts { display: flex; gap: 14px; margin: 0; padding: 0; }
.counts > div { flex-direction: row; align-items: baseline; gap: 5px; font-size: 12px; }
.counts strong { font-size: 14px; }
#replay-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; row-gap: 10px; align-items: start; }
.row { min-width: 0; padding: 4px 0 0; margin: 0; }
.row-head { display: grid; grid-template-columns: 22px 112px minmax(0, 1fr) 38px; gap: 4px; margin: 3px 0; }
.row-number { font-size: 13px; }
.row-head .btn { min-height: 30px; height: 30px; padding: 0 3px; font-size: 12px; }
.row-time { text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; text-decoration: underline dotted; text-underline-offset: 4px; }
.row .row-head .filter-select { height: 30px; font-size: 12px; }
.row .row-head .choice-trigger .name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.row .row-head .choice-trigger .info { padding-inline: 5px; gap: 3px; }
.row .format-slot.has-icon .choice-trigger { padding: 0; }
.row .format-slot.has-icon .choice-trigger::after, .row .format-slot.has-icon .name { display: none; }
.row .format-slot.has-icon .info { justify-content: center; }
.row .format-slot .choice-trigger::after { display: none; }
.row .format-slot .choice-trigger { padding-right: 0; }
.row .format-slot .choice-icon { width: 20px; height: 20px; }
.row .select-menu { min-width: 0; width: 100%; }
.row .select-menu:not(.is-open) > .select-menu-list { max-height: 0; padding-block: 0; overflow: hidden; }
.row .select-menu.is-open > .select-menu-list { max-height: min(240px, 45vh); overflow-y: auto; }
.row .select-menu-btn { width: 100%; height: 30px; min-width: 0; font-size: 12px; padding: 0 7px; background: var(--panel-strong); color: var(--text); border: 1px solid var(--line); }
.row .select-menu-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .format-slot.has-icon .select-menu-value { font-size: 0; display: flex; justify-content: center; }
.row .format-slot.has-icon .select-menu-arrow { display: none; }
.row .format-slot .select-menu-icon { width: 20px; height: 20px; margin-right: 0; }
.select-menu-option[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
& .select-menu-btn:focus-visible, & .select-menu-btn[aria-expanded="true"] { border-color: var(--gold); }
.metadata-errors { display: flex; flex-wrap: wrap; gap: 0 8px; }
.metadata-errors .field-error:not(:empty) { margin: 0 0 4px; }
.row-image-wrap { position: relative; min-width: 0; }
.row-image-scroll { min-width: 0; overflow: clip; }
.row-image-scroll::after { display: none; }
.row-image { min-width: 0; }
.row .expand-image { position: absolute; right: 0; top: 0; min-height: 25px; width: 27px; padding: 0; font-size: 14px; background: #141d27e6; color: var(--text); }
.row-fields { margin-top: 3px !important; }
.row .match-sides { display: grid; grid-template-columns: 1fr; margin: 0; gap: 5px; }
.row .side-card { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 6px; align-items: center; }
.row .side-card h3 { font-size: 11px; margin: 0; }
.row .side-card .field-error { grid-column: 2 / -1; margin: 1px 0 0; }
.row .deck-fields { grid-template-columns: 36px minmax(0, 1fr); gap: 5px; }
.row .side-card .class-trigger { height: 36px; padding: 0; }
.row .side-card .class-trigger img { width: 24px; height: 24px; }
.row .side-card .filter-select { height: 36px; }
.row .choice-trigger .name { font-size: 13px; }
.field-error { font-size: 11px; line-height: 1.4; }
.row-bottom { margin-top: 6px; gap: 12px; grid-template-columns: 1fr 1fr; }
.row-bottom .going-buttons { gap: 4px; }
.row-bottom .going-buttons .btn { height: 34px; min-height: 34px; font-size: 12px; }
.row-actions { display: flex; align-items: center; min-height: 30px; margin-top: 2px; gap: 8px; }
.row-actions .duplicate-area { flex: 1; }
.row-actions > .btn { min-height: 28px; height: 28px; padding: 0 3px; font-size: 11px; }
.row-actions > .row-more-trigger { padding-inline: 6px; white-space: nowrap; }
.row-actions > .include-toggle { color: var(--muted); font-size: 11px; white-space: nowrap; gap: 5px; min-height: 28px; cursor: pointer; }
.row-actions > .include-toggle:has(:checked) { color: var(--text); }
.row-actions > .include-toggle:has(:disabled) { cursor: default; opacity: .55; }
.review-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 3px; }
.review-actions .btn { min-height: 34px; height: 34px; padding: 0 14px; font-size: 12px; }
@media (min-width: 720px) { .review-actions .btn { display: none; } }
.status-icon { width: 17px; height: 17px; flex: none; }
#replay-row-nav .warning { color: var(--warning-text); }
#replay-row-nav .success { color: rgb(var(--success-rgb)); }
.row.is-reviewed { border-top-color: rgba(var(--success-rgb), .6); }
.row.is-reviewed .review-actions .btn { background: transparent; color: rgb(var(--success-rgb)); border-color: rgba(var(--success-rgb), .6); opacity: 1; }
/* 明示された表示要望により、この確認文のクラス名だけクラス色を文字に使う。 */
.bulk-class { color: var(--class-color); font-weight: 700; }
.bulk-archetype { color: var(--gold-light); font-weight: 700; }
#replay-date-dialog { max-width: 420px; }
#replay-date-value { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.duplicate-box { padding: 0; margin: 0; border: 0; background: none; }
.duplicate-box .btn { height: 28px; min-height: 28px; padding: 2px 8px; font-size: 11px; color: var(--warning-text); border-color: rgba(var(--warning-rgb), .5); background: transparent; }
.duplicate-resolved { margin: 0; font-size: 11px; }
.more-fields { padding-top: 8px; }
.more-fields .field-heading { margin: 6px 0 3px; }
.row .more-fields .cr-input, .row .more-fields textarea { font-size: 16px; width: 100%; }
.row .more-fields textarea { min-height: 44px; padding: 4px; }
.more-fields .btn { font-size: 12px; min-height: 32px; }
#replay-row-nav { display: none; }
.candidate-paging { display: none; }
#replay-row-viewport { position: relative; }
#replay-row-viewport.is-sliding { overflow: clip; overflow-anchor: none; }
.is-sliding > #replay-rows, .row-slide-preview { will-change: transform; }
.row-slide-preview { position: absolute; inset: 0 0 auto; width: 100%; pointer-events: none; }
.save-bar { padding: 10px 20px max(10px, env(safe-area-inset-bottom)); gap: 12px; }
.save-bar .save-counts { display: flex; flex-direction: row; gap: 12px; align-items: baseline; }
.save-bar strong { font-size: 12px; }
.save-bar .btn { min-width: 170px; min-height: 38px; }
.save-bar #replay-save-hint { font-size: 11px; }
@media (min-width: 720px) and (max-width: 1079px) {
  #replay-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  /* 共通部品の公開変数で、画像・候補の切替ボタンを通知から避ける。 */
  & { --svwb-toast-context-offset: max(0px, calc(100svh - 200px)); }
  .list-toolbar { margin-bottom: 5px; gap: 5px; }
  #replay-image-tabs .btn { min-height: 36px; padding-inline: 7px; font-size: 11px; }
  .list-toolbar .check-row { font-size: 11px; gap: 4px; }
  .counts { display: none; }
  #replay-row-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; border: 0; margin: 0 0 6px; }
  #replay-row-nav .btn { display: flex; align-items: center; justify-content: center; gap: 5px; height: 40px; min-height: 40px; padding: 0; font-size: 13px; }
  #replay-row-nav .status-icon { width: 15px; height: 15px; }
  #replay-rows { display: block; }
  #replay-rows { touch-action: pan-y pinch-zoom; }
  .row { padding-top: 6px; }
  .row-head { grid-template-columns: 20px 100px minmax(0, 1fr) 36px; gap: 3px; }
  .row-head .btn, .row .row-head .filter-select { height: 36px; min-height: 36px; }
  .row .row-head .choice-trigger .name, .row-head .row-time { font-size: 11px; }
  .row .side-card { grid-template-columns: 28px minmax(0, 1fr); gap: 0 6px; }
  .row .deck-fields { grid-template-columns: 44px minmax(0, 1fr); gap: 6px; }
  .row .side-card .class-trigger, .row .side-card .filter-select { height: 44px; min-height: 44px; }
  .row .select-menu-btn { height: 36px; font-size: 11px; }
  .row .side-card .class-trigger img { width: 26px; height: 26px; }
  .row .match-sides { gap: 6px; }
  .row-bottom .going-buttons .btn { height: 40px; min-height: 40px; font-size: 13px; }
  .row-actions { min-height: 36px; }
  .duplicate-box .btn, .row-actions > .btn { min-height: 36px; height: 36px; }
  .review-actions .btn { min-height: 44px; height: 44px; font-size: 13px; min-width: 160px; }
  .save-bar { padding: 7px 12px max(7px, env(safe-area-inset-bottom)); flex-wrap: nowrap; gap: 8px; }
  .save-bar .save-counts { display: flex; flex-direction: column; gap: 0; align-items: flex-start; flex: 1; }
  .save-bar strong { font-size: 10px; }
  .save-bar #replay-save-hint { font-size: 9px; }
  .save-bar .btn { min-width: 0; width: auto; min-height: 40px; height: 40px; }
  .save-bar > #replay-save { width: 118px; padding: 5px; font-size: 12px; }
  .candidate-paging { display: flex; align-items: center; gap: 3px; }
  .candidate-paging span { font-size: 11px; min-width: 22px; text-align: center; }
  .candidate-paging .btn { width: 30px; padding: 0; font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  & :is(.btn, .filter-select), #replay-image-tabs::after, #replay-row-nav::after { transition: none; }
}

}
.record-input-method { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.record-input-method .btn { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 8px 2px; }
.record-input-method [aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.record-replay { padding-bottom: 76px; }
.record-replay .replay-tools { display: flex; justify-content: flex-end; gap: 8px; }
.record-replay .replay-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.record-replay .replay-drop-zone { border: 1px dashed var(--muted); padding: 24px 16px 16px; text-align: center; transition: border-color 180ms, background-color 180ms; }
.record-replay .replay-drop-zone:is(:focus-visible, .is-dragover) { outline: 2px solid var(--gold); outline-offset: 3px; border-color: var(--gold); background: var(--panel); }
.record-replay .replay-drop-zone.is-disabled { opacity: .65; }
.record-replay .replay-drop-title { font-weight: 650; margin: 0 0 4px; }
.record-replay .replay-image-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.record-replay .replay-image-actions .btn { min-height: 40px; }
.record-replay .replay-selected-images { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; padding: 0; }
.record-replay .replay-selected-images:empty { display: none; }
.record-replay .replay-selected-images li { display: grid; grid-template-columns: 1fr auto; gap: 4px; min-width: 0; text-align: left; align-items: center; }
.record-replay .replay-selected-images img { grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--panel-strong); }
.record-replay .replay-selected-images span { font-size: 12px; }
.record-replay .replay-selected-images .btn { min-height: 32px; min-width: 32px; padding: 0; }
.record-replay #replay-selection-status:empty, .record-replay #replay-image-errors:empty { display: none; }
.record-replay .replay-upload { margin-top: 12px; }
.record-replay .save-bar { width: min(var(--record-content-width), calc(100% - 36px)); left: 50%; right: auto; transform: translateX(-50%); padding-inline: 0; }
.record-replay .row .row-fields:disabled, .record-replay .row :is(button, input, select, textarea):disabled { pointer-events: none; }
.record-replay .row .choice-trigger.is-suggested:not([aria-invalid="true"]), .record-replay .row .going-buttons.is-suggested .btn { border-color: rgba(var(--gold-rgb), .85); background-color: rgba(var(--gold-rgb), .12); }
.record-replay .review-actions .btn[data-state="excluded"]:disabled { display: inline-flex; align-items: center; justify-content: center; opacity: 1; background: transparent; border-color: var(--line); color: var(--muted); }
.record-replay .review-actions .btn[data-state="saved"] { display: inline-flex; align-items: center; justify-content: center; opacity: 1; color: rgb(var(--success-rgb)); }
/* 本文とフッターは既定で同じ重なり順。固定の登録欄を表示中だけ本文を一段上げる。 */
.record-page .record-main:has(#input-panel:not([hidden]) .record-replay:not([hidden]) #replay-save-bar:not([hidden])) { z-index: 2; }
.record-page:has(#input-panel:not([hidden]) .record-replay:not([hidden]) #replay-save-bar:not([hidden])) { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.record-replay #replay-image-tabs { min-width: 0; overflow-x: auto; }
.record-replay #replay-reading-status, .record-replay #replay-image-errors { width: 100%; }
.record-replay #replay-reading-dialog { max-width: 360px; text-align: center; padding: 28px 20px; }
.record-replay #replay-reading-dialog .loading-indicator-spinner { margin: 6px auto 10px; }
.record-replay #replay-reading-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.record-replay #replay-reading-progress { color: var(--muted); min-height: 24px; margin: 0 0 10px; }
.record-replay #replay-reading-track { position: relative; height: 5px; margin: 0 0 18px; background: var(--line); }
.record-replay #replay-reading-track:has(progress:not([value])) { visibility: hidden; }
.record-replay #replay-reading-meter { display: block; opacity: 0; width: 100%; height: 100%; border: 0; margin: 0; }
.record-replay #replay-reading-fill { position: absolute; inset: 0; background: var(--gold); transform: scaleX(var(--reading-progress, 0)); transform-origin: left; transition: transform 220ms ease-out; pointer-events: none; }
.record-replay #replay-reading-track:has(progress:not([value])) #replay-reading-fill { transition: none; }
.record-replay .replay-auto-exclude { margin: 16px 0 12px; }
@media (prefers-reduced-motion: reduce) { .record-replay #replay-reading-fill { transition: none; } }
.record-replay #replay-cancel-reading { min-width: 100px; }
/* 通常・選択中・フォーカス時の枠より必須エラーを優先する。勝敗は各ボタンを囲む。 */
.record-replay .row [aria-invalid="true"], .record-replay .row [aria-invalid="true"] .btn { border-color: var(--danger-soft); box-shadow: none; }
.record-replay .review-layout { display: block; }
.record-replay .row-fields { border: 0; padding: 0; min-width: 0; }
.record-replay .list-toolbar .replay-tools { margin-left: auto; }
.record-replay .list-toolbar .replay-tools .btn { padding: 2px 4px; min-height: 28px; font-size: 11px; }
.record-replay #replay-restart { display: inline-flex; align-items: center; justify-content: center; width: 32px; padding: 4px; }
.record-replay #replay-restart svg { width: 18px; height: 18px; }
.record-page .record-input-method .btn { border-radius: 0; }
@media (min-width: 1080px) {
  .record-replay .row-actions { min-height: 24px; height: 24px; }
  .record-replay .row-actions > .btn { min-height: 24px; height: 24px; }
}
@media (max-width: 719px) {
  .record-replay .replay-selected-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-replay .row-actions > .include-toggle { min-height: 36px; }
  .record-replay .list-toolbar { flex-wrap: nowrap; }
  .record-replay #replay-image-tabs { min-width: 0; overflow-x: auto; flex: 1; }
}

#replay-source-zone-field, #replay-date-zone-field { min-width: 0; }
:is(#replay-source-zone-field, #replay-date-zone-field) .filter-select { display: block; box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
