/* 相手の画面：PDF 入力欄方式（段階P4b）。ui.css の部品（.panel .f .opt .alert .tabs .docviewer .consent）の上に、書類の切り抜き・欄ごとの札・書類の上の入力だけを足す。
   色・余白・角は ui.css の変数だけを使う（値は直書きしない）。 */

/* 書類ごとの見出し */
.rp-dochead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-5) 0 var(--sp-3); padding-top: var(--sp-3); border-top: 2px solid var(--c-sign); }
.rp-dochead h2 { font-size: var(--fs-l); margin: 0; }

/* 欄ごとの札（スマホ） */
.rp-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-l); margin: 0 0 var(--sp-3); overflow: hidden; scroll-margin-top: var(--sp-5); }
.rp-card.rp-need { border-color: var(--c-warn-ring); }
.rp-card.rp-bad { border-color: var(--c-err); box-shadow: inset 0 0 0 1px var(--c-err); }
.rp-card.rp-flash { box-shadow: 0 0 0 3px var(--c-go); }
.rp-card__body { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.rp-card__head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin: 0 0 var(--sp-2); }
.rp-card__head b { font-size: var(--fs-base); }
.rp-card__head .num { margin-left: auto; }
.rp-card input[type="text"], .rp-card input[type="date"], .rp-card select, .rp-card textarea { width: 100%; min-height: 44px; font-size: var(--fs-base); }
.rp-more { margin: var(--sp-2) 0 0; }
.rp-opts { display: grid; gap: var(--sp-2); }
.rp-opts .opt { min-height: 44px; }
.rp-card .err, .rp-signer .err { color: var(--c-err); font-size: var(--fs-m); margin-top: var(--sp-2); }
.rp-card .err[hidden], .rp-signer .err[hidden] { display: none; }

/* 書類の切り抜き */
.rp-crop { background: var(--c-desk); display: block; line-height: 0; }
.rp-crop__c { display: none; width: 100%; height: auto; background: var(--c-surface); }
.rp-crop__c.is-drawn { display: block; }
.rp-crop:has(.rp-crop__c:not(.is-drawn)):not(.is-text) { min-height: 44px; background: var(--c-surface-2); }
.rp-crop.is-text { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); line-height: var(--lh-tight); font-size: var(--fs-m); background: var(--c-surface-2); }
.rp-link { color: var(--c-accent); font-weight: 700; }

/* 署名する人の情報 */
.rp-signer h2 { margin-bottom: var(--sp-1); }
.rp-signer .f.rp-bad input { border-color: var(--c-err); box-shadow: inset 0 0 0 1px var(--c-err); }
.rp-signer .f.rp-flash input { box-shadow: 0 0 0 3px var(--c-go); }
.rp-signer input { width: 100%; min-height: 44px; font-size: var(--fs-base); }

/* 下に貼り付く帯 */
.rp-bar { position: sticky; bottom: 0; z-index: 5; margin: var(--sp-4) calc(var(--sp-4) * -1) 0; background: var(--c-sign); color: var(--c-on-sign); }
.rp-bar__in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); min-height: 56px; max-width: var(--w-read); margin: 0 auto; }
.rp-bar__left { font-weight: 700; font-size: var(--fs-m); }
.rp-bar__left.is-ok { color: var(--c-on-go); background: var(--c-go); padding: 2px var(--sp-2); border-radius: var(--r-s); }
.rp-bar button.sub { background: transparent; color: var(--c-on-sign); border-color: var(--c-on-sign-2); min-height: 44px; flex: none; }
.rp-hint { margin: var(--sp-3) 0; text-align: center; }
.rp-hint:empty { display: none; }

/* PC：書類の上に入力 */
.rp-desk { display: grid; justify-items: center; gap: 0; }
.rp-pageno { color: var(--c-ink-3); font-size: var(--fs-xs); margin: var(--sp-2) 0 var(--sp-1); }
.rp-page { position: relative; background: var(--c-surface); margin: 0 0 var(--sp-3); }
.rp-ov { position: absolute; inset: 0; }
.rp-slot { position: absolute; display: flex; align-items: center; box-sizing: border-box; }
.rp-slot input, .rp-slot select, .rp-slot textarea { width: 100%; height: 100%; min-height: 0; padding: 0 2px; margin: 0; border: 1px solid var(--c-accent); border-radius: var(--r-s); background: var(--c-accent-weak); font: inherit; color: var(--c-ink); }
.rp-slot textarea { padding: 1px 2px; resize: none; line-height: 1.35; }
.rp-slot.rp-need input, .rp-slot.rp-need select, .rp-slot.rp-need textarea { border-color: var(--c-err); background: var(--c-err-bg); }
.rp-slot.rp-flash { outline: 3px solid var(--c-go); }
.rp-slot.is-mirror { border: 1px dashed var(--c-accent); background: var(--c-accent-weak); padding: 0 2px; overflow: hidden; white-space: nowrap; }
.rp-slot.is-mirror.rp-need { border-color: var(--c-err); background: var(--c-err-bg); }
.rp-slot.is-given { color: var(--c-ink); }
.rp-slot.is-check { justify-content: center; }
.rp-slot.is-check button { width: 100%; height: 100%; min-height: 0; padding: 0; border: 1px solid var(--c-accent); border-radius: var(--r-s); background: var(--c-accent-weak); color: var(--c-ink); font-size: inherit; line-height: 1; }
.rp-slot.is-check button[aria-checked="true"]::after { content: "\2714"; }
.rp-slot.is-check.rp-need button { border-color: var(--c-err); background: var(--c-err-bg); }
.rp-frame { position: absolute; border: 2px solid var(--c-accent); border-radius: var(--r-s); box-sizing: border-box; pointer-events: none; }
.rp-loading { margin: var(--sp-5) 0; }

/* 確認の画面 */
.rp-doc .panel__head { margin-bottom: var(--sp-2); }
.rp-wrote { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--c-line); border-radius: var(--r-m); overflow: hidden; margin: 0 0 var(--sp-3); }
.rp-wrote__v { padding: var(--sp-2) var(--sp-3) var(--sp-3); display: grid; gap: 2px; }
.rp-open { margin-top: var(--sp-3); }
.rp-backrow { margin: var(--sp-4) 0 0; }
.rp-slot.is-seal { border-radius: 50%; border-color: rgb(200 16 46 / 0.6); text-align: center; writing-mode: vertical-rl; }
