.box-check-dialog{width:min(680px,calc(100vw - 24px));max-height:90dvh;padding:0;box-sizing:border-box;overflow:hidden;border:1px solid var(--line,#ccd7df);border-radius:16px;background:var(--card,#fff);color:var(--ink,#203345)}
.box-check-dialog[open]{display:flex;flex-direction:column}
.box-check-dialog::backdrop{background:#071c32aa}
.box-check-dialog>.box-check-header{display:flex;gap:16px;align-items:center;justify-content:space-between;flex:none;position:static;width:auto;inset:auto;margin:0;padding:18px 20px;border-bottom:1px solid var(--line,#ccd7df)}
.box-check-dialog h2,.box-check-dialog h3,.box-check-dialog p{margin:0 0 8px}.box-check-dialog h2{font-size:22px;text-transform:none;letter-spacing:normal}.box-check-dialog h3{font-size:16px;overflow-wrap:anywhere}
.box-check-body{padding:20px;min-height:0;overflow:auto;overscroll-behavior:contain}.box-check-intro{color:var(--mut,#526575);line-height:1.5}
.box-check-dialog fieldset{border:0;padding:0;margin:0;min-width:0}.box-check-dialog label{display:block;font-size:14px;font-weight:600}
.box-check-dialog input[type=number],.box-check-dialog textarea{display:block;width:100%;box-sizing:border-box;margin:6px 0 12px;font:inherit}
.box-check-dialog textarea{resize:vertical}.box-check-quantity{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;margin:12px 0}.box-check-quantity label{min-width:0;margin:0}.box-check-quantity input[type=number]{min-width:0;height:44px;min-height:44px;margin:6px 0 0}.box-check-quantity .btn{height:44px;margin:0;min-width:138px;box-sizing:border-box}
.box-check-line{padding:16px;margin:14px 0;background:var(--bg,#f4f7fa);border:1px solid var(--line,#d6e0e7);border-radius:12px}
.box-check-line.has-difference{border-color:#b87c29}.box-check-line-status{font-size:13px;color:var(--mut,#526575)}
.box-check-progress{font-weight:700;margin:16px 0}
.box-check-error{color:var(--bad,#b33232);white-space:pre-wrap;margin:12px 0!important}.box-check-error:empty{display:none}
.box-check-warning{padding:12px;background:#fff3d9;color:#704a0a;border-radius:8px}.box-check-saved{padding:16px;background:var(--okbg,#edf7f0);border-radius:12px}
.box-check-history{margin-top:24px}.box-check-history details{border-top:1px solid var(--line,#ccd7df);padding:12px 0}
.box-check-history summary{cursor:pointer}.box-check-history summary span,.box-check-history summary em,.box-check-history-line span{display:block;margin-top:5px;font-size:13px}
.box-check-history summary em{color:#9a650d}.box-check-history-line{padding:12px 0;border-bottom:1px solid var(--line,#ccd7df);overflow-wrap:anywhere}
.box-check-history-line p{white-space:pre-wrap;margin-top:6px}.box-check-dialog button{min-height:44px}.box-check-dialog form>button{margin:6px 8px 0 0}
@media(max-width:430px){.box-check-body{padding:14px}.box-check-dialog>.box-check-header{padding:14px}.box-check-line{padding:12px}}
html[data-theme="dark"] .box-check-dialog input[type=number],
html[data-theme="dark"] .box-check-dialog textarea{background:#142d45;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .box-check-dialog textarea::placeholder{color:var(--mut);opacity:1}
html[data-theme="dark"] .box-check-dialog .btn{background:#93c4ff;color:#102033}
html[data-theme="dark"] .box-check-dialog .btn.sub{background:#18334f;color:var(--ink);border-color:var(--line)}

.box-check-dialog [hidden]{display:none!important}
.box-check-header .btn{flex:none;margin:0}
.box-check-line-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;margin-bottom:8px}
.box-check-line-head h3{margin:0}.box-check-line-head .btn{margin:0;max-width:180px}
.box-check-line.is-dismissed{border-style:dashed}
.box-check-dialog select{display:block;box-sizing:border-box;width:100%;min-width:0;height:44px;margin:6px 0 12px;font:inherit}
@media(max-width:430px){.box-check-line-head{gap:8px}.box-check-line-head .btn{font-size:12px;max-width:148px;padding-inline:8px}.box-check-quantity{gap:8px}.box-check-quantity .btn{min-width:130px;padding-inline:8px}}
html[data-theme="dark"] .box-check-dialog select{background:#142d45;color:var(--ink);border-color:var(--line)}

/* Keep iPhone entry at a readable size without Safari focus zoom. */
.box-check-dialog input[type=number],.box-check-dialog input[type=search]{font-size:16px}
