.sign-reader { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #202024; color: #f5f5f7; font-family: inherit; }
.sign-reader[open] { display: flex; flex-direction: column; }
.sign-reader::backdrop { background: #0a0a0b; }
.sign-reader * { box-sizing: border-box; }
.sign-reader [hidden] { display: none !important; }
.sign-reader button, .sign-reader input, .sign-reader select { font: inherit; }
.sign-reader button, .sign-reader .sign-upload { min-height: 44px; padding: 10px 16px; border: 1px solid #66666f; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; font-size: 14px; }
.sign-reader button:hover:not(:disabled), .sign-upload:hover { background: #303035; }
.sign-reader button:disabled { opacity: .45; cursor: not-allowed; }
.sign-reader :focus-visible { outline: 2px solid #86b9f0; outline-offset: 4px; }
.sign-top { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: #101012; border-bottom: 1px solid #414147; }
.sign-title { min-width: 0; }
.sign-title h2 { font-size: 17px; font-weight: 550; margin: 0; letter-spacing: -.02em; }
.sign-title p { margin: 3px 0 0; font-size: 12px; color: #b8b8c1; }
.sign-tools { display: flex; gap: 8px; align-items: center; }
.sign-tools label { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.sign-tools select { background: #202024; color: #f5f5f7; border: 1px solid #66666f; border-radius: 8px; padding: 9px 8px; min-height: 44px; }
.sign-notice { flex-shrink: 0; background: #252a30; border-bottom: 1px solid #505b67; padding: 12px 24px; font-size: 14px; line-height: 1.55; }
.sign-notice strong { font-weight: 600; }
.sign-scroll { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; padding: 28px 20px 48px; scrollbar-color: #92929a #202024; scrollbar-width: thin; }
.sign-pages, .sign-sheet { width: min(100%,820px); margin-inline: auto; }
.sign-reader[data-zoom="125"] .sign-pages { width: 1025px; max-width: none; }
.sign-reader[data-zoom="150"] .sign-pages { width: 1230px; max-width: none; }
.sign-page { position: relative; margin: 0 0 24px; background: #fff; color: #101012; }
.sign-page canvas { display: block; width: 100%; height: auto; }
.sign-page-label { padding: 8px 12px; background: #e9e9ed; color: #45454c; font-size: 12px; font-variant-numeric: tabular-nums; }
.sign-page-text { margin: 0; padding: 14px 24px; border-top: 1px solid #ccc; font-size: 14px; line-height: 1.8; }
.sign-page-text summary { cursor: pointer; min-height: 36px; }
.sign-page-text p { white-space: pre-wrap; margin: 12px 0; }
.sign-load { color: #c4c4cd; text-align: center; padding: 30px 16px; line-height: 1.6; }
.sign-page .sign-load { color: #45454c; }
.sign-sheet { color-scheme: light; background: #fff; color: #151518; padding: 36px; border-radius: 3px; scroll-margin-top: 16px; }
.sign-sheet :focus-visible { outline-color: #202024; }
.sign-sheet h3 { font-size: 24px; margin: 0 0 8px; font-weight: 550; letter-spacing: -.02em; }
.sign-sheet > p { margin: 8px 0 22px; font-size: 14px; line-height: 1.7; color: #50505a; }
.sign-sheet dl { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 9px 16px; font-size: 14px; line-height: 1.55; margin: 24px 0; }
.sign-sheet dt { color: #585861; }
.sign-sheet dd { margin: 0; overflow-wrap: anywhere; }
.sign-sheet fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.sign-sheet fieldset:disabled { opacity: .6; }
.sign-sheet legend { font-size: 16px; font-weight: 550; margin-bottom: 14px; padding: 0; }
.sign-methods { display: flex; gap: 6px; padding-bottom: 16px; flex-wrap: wrap; }
.sign-reader .sign-methods button { color: #202024; border-color: #90909a; }
.sign-reader .sign-methods button[aria-pressed=true] { background: #202024; color: #fff; border-color: #202024; }
.sign-reader .sign-methods button:hover:not(:disabled) { background: #e4e4e9; color: #161619; }
.sign-reader .sign-sheet input[type=text] { width: 100%; min-height: 48px; padding: 12px; color: #151518; background: #fff; border: 1px solid #777781; border-radius: 8px; margin: 0; font-size: 16px; }
.sign-input-label { display: grid; gap: 10px; font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
.sign-sheet input[type=file] { display: block; width: 100%; min-width: 0; padding: 8px; border: 1px solid #888892; border-radius: 8px; background: #f7f7f9; color: #45454c; font-size: 14px; line-height: 1.5; }
.sign-sheet input[type=file]::file-selector-button { min-height: 44px; margin: 0 12px 0 0; padding: 10px 16px; border: 0; border-radius: 6px; background: #202024; color: #fff; font: inherit; cursor: pointer; }
.sign-sheet input[type=file]:hover:not(:disabled)::file-selector-button { background: #3b3b42; }
.sign-sheet input[type=file]:disabled::file-selector-button { background: #e4e4e9; color: #555560; cursor: not-allowed; }
.sign-preview { width: 100%; height: 150px; object-fit: contain; border-bottom: 1px solid #8a8a94; background: #fff; margin-block: 16px; }
.sign-preview img { width: 100%; height: 100%; object-fit: contain; }
.sign-draw { display: block; width: 100%; height: 180px; background: #fff; border: 1px solid #8a8a94; border-radius: 8px; touch-action: none; cursor: crosshair; }
.sign-reader .sign-clear, .sign-reader .sign-upload { color: #202024; border-color: #888892; margin-top: 12px; display: inline-flex; align-items: center; justify-content: center; }
.sign-upload input { max-width: 100%; }
.sign-reader .sign-clear:hover { background: #e4e4e9; }
.sign-help { max-width: 65ch; font-size: 13px; line-height: 1.65; color: #555560; margin: 10px 0 16px; }
.sign-sheet > .sign-help { font-size: 13px; line-height: 1.65; margin: 18px 0 0; }
.sign-reader .sign-intent { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; padding-top: 24px; border-top: 1px solid #d6d6dc; font-size: 14px; line-height: 1.65; }
.sign-intent input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: #202024; }
.sign-reader .sign-apply { display: flex; min-height: 48px; min-width: 220px; max-width: 100%; padding: 12px 20px; background: #202024; border-color: #202024; color: white; width: auto; margin: 24px 0 0 auto; }
.sign-reader .sign-apply:disabled { opacity: 1; background: #e4e4e9; border-color: #e4e4e9; color: #555560; }
.sign-reader .sign-apply:hover:not(:disabled) { background: #3b3b42; }
.sign-gate { padding: 12px 0 18px; border-top: 1px solid #d6d6dc; font-size: 14px; line-height: 1.65; }
.sign-sheet .sign-error { color: #a51d18; font-size: 14px; line-height: 1.6; margin: 12px 0 0; }
.sign-sheet .sign-error:empty { display: none; }
.sign-bottom { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 24px max(10px,env(safe-area-inset-bottom)); background: #101012; border-top: 1px solid #414147; }
.sign-bottom p { font-size: 13px; color: #c4c4cd; margin: 0; line-height: 1.45; }
.sign-summary { padding-block: 20px; border-block: 1px solid var(--line); margin-block: 20px; }
.sign-summary img { background: #fff; width: min(100%,360px); height: 100px; object-fit: contain; margin-top: 16px; border-radius: 8px; }
.sign-summary p + p { margin-top: 8px; }
@media (max-width:600px) {
  .sign-top { align-items: flex-start; padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .sign-title { flex: 1; }
  .sign-title h2 { font-size: 16px; }
  .sign-tools { width: 100%; justify-content: space-between; }
  .sign-notice { padding: 10px 14px; font-size: 13px; }
  .sign-scroll { padding: 16px 10px 32px; }
  .sign-sheet { padding: 24px 18px; }
  .sign-sheet h3 { font-size: 21px; }
  .sign-sheet dl { grid-template-columns: 1fr; gap: 5px; }
  .sign-sheet dd { margin-bottom: 9px; }
  .sign-reader .sign-apply { width: 100%; min-width: 0; }
  .sign-bottom { padding-inline: 14px; flex-wrap: wrap; }
  .sign-bottom p { flex: 1; }
  .sign-draw { height: 160px; }
}
@media (prefers-reduced-motion:reduce) { .sign-reader *, .sign-reader { scroll-behavior: auto !important; } }
button[aria-busy="true"]::before{content:"";display:inline-block;vertical-align:middle;width:1em;height:1em;margin-right:.6em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:approval-busy .8s linear infinite}
@keyframes approval-busy{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){button[aria-busy="true"]::before{animation:none}}
