*{box-sizing:border-box}body{margin:0;background:#f5f5f2;color:#201f20;font:16px/1.75 Tahoma,Arial,sans-serif}header,main{max-width:1040px;margin:auto;padding:20px clamp(16px,4vw,48px)}header{display:flex;align-items:center;gap:12px}header form{margin-inline-start:auto}.mark{font:44px/1 Georgia;color:#bd1426}small{display:block;font-size:.88rem}.hero{display:flex;align-items:center;justify-content:space-between;background:#ad0e21;color:white;padding:clamp(24px,5vw,64px);border-radius:8px;overflow:hidden}.hero span{font:clamp(55px,12vw,145px)/.9 Georgia;color:#e3f8cc}.hero h1{font-size:clamp(25px,5vw,54px);line-height:1.4;margin:6px 0}.hero small{color:#ffe5e1}section,.metrics>div{padding:24px;background:white;border:1px solid #ddddd7;border-radius:8px;margin:16px 0}h2{margin:0 0 16px;font-size:1.32rem}input,select,button{font:inherit;border-radius:5px;padding:8px 14px}input,select{border:1px solid #a7a7a0;max-width:100%}label{display:block;margin:10px 0}label input,label select{display:block;margin:5px 0}button{border:0;background:#272527;color:white;cursor:pointer}.light,nav button{background:#e7e7e2;color:#232323}nav{display:flex;gap:8px;margin:22px 0}nav button.active{background:#222;color:white}button:disabled{opacity:.4}.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}.metrics>div{margin:0}.metrics b{display:block;font-size:1.6rem}.scroll{overflow:auto}table{width:100%;border-collapse:collapse;margin:16px 0}th,td{text-align:right;padding:8px;border-bottom:1px solid #e5e5df;white-space:nowrap}th{color:#62625d}output{display:block;border-radius:6px;font-size:1.25rem;margin-top:16px;padding:12px}output:empty{display:none}.valid{background:#d8f3dc}.used{background:#fff1c9}.invalid{background:#fce1dd}video{width:min(400px,100%)}a{color:#900b1a}button:focus-visible,input:focus-visible{outline:3px solid #6755ce}

.scan-notice {
  position: fixed;
  z-index: 10;
  inset: auto 50% max(1rem, calc(env(safe-area-inset-bottom) + 0.5rem)) auto;
  width: min(27rem, calc(100% - 2rem));
  transform: translateX(50%);
  pointer-events: none;
  display: grid;
  justify-items: center;
  gap: .45rem;
  padding: 1.2rem .9rem;
  border: 3px solid currentColor;
  border-radius: 1rem;
  box-shadow: 0 8px 24px #0004;
  text-align: center;
  animation: scan-result 2.6s ease-out both;
}
.scan-notice.valid { color: #104624; background: #dcfce7; }
.scan-notice.used { color: #704300; background: #fef3c7; }
.scan-notice.invalid, .scan-notice.error { color: #831c1c; background: #fee2e2; }
.scan-notice-mark {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font: bold 2rem/1 Arial, sans-serif;
}
.scan-notice strong { font-size: clamp(1.1rem, 5vw, 1.7rem); }
@keyframes scan-result {
  0% { opacity: 0; transform: translate(50%, .8rem) scale(.96); }
  9%, 88% { opacity: 1; transform: translate(50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(50%, .35rem) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .scan-notice { animation: none; }
}
