/* 파파레디 QC 확인 페이지. 휴대폰 화면이 기준이다(QR 로 들어온다). */
:root {
  --plum: #723254;
  --plum-deep: color-mix(in srgb, var(--plum) 82%, #000);
  --plum-soft: color-mix(in srgb, var(--plum) 9%, #fff);
  --plum-line: color-mix(in srgb, var(--plum) 28%, #fff);
  --paper: #fff;
  --page: #f7f3f5;
  --ink: #1b1418;
  --ink-2: #6f6369;
  --warn: #a8501b;
  --warn-soft: #fbf1e7;
  --serif: "Playfair Display", "Noto Serif KR", Georgia, serif;
  --sans: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* 맨 위 자주색 띠 */
.top {
  background: var(--plum);
  color: #fff;
  text-align: center;
  padding: calc(28px + env(safe-area-inset-top)) 16px 76px;
}
.top .logo { width: 46px; height: auto; display: block; margin: 0 auto 10px; }
.brand { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: .32em; text-indent: .32em; }
.brand-ko { margin: 4px 0 0; font-size: 11px; letter-spacing: .9em; text-indent: .9em; opacity: .78; }

.wrap { width: 100%; max-width: 460px; margin: -52px auto 0; padding: 0 16px; flex: 1; }
.panel {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(60, 20, 42, .10), 0 1px 3px rgba(60, 20, 42, .08);
  padding: 28px 22px 24px;
}
.panel:focus { outline: none; }

/* 번호 넣는 화면 */
.ask h1 { margin: 0; font-size: 22px; font-weight: 700; text-align: center; letter-spacing: -.01em; text-wrap: balance; }
.lead { margin: 8px 0 22px; text-align: center; color: var(--ink-2); font-size: 15px; white-space: pre-line; text-wrap: balance; }
#form { display: grid; gap: 12px; }
#no {
  width: 100%;
  height: 64px;
  border: 1.5px solid var(--plum-line);
  border-radius: 10px;
  background: var(--plum-soft);
  color: var(--ink);
  font: 700 30px/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: .28em;
  text-indent: .28em;
  text-align: center;
  appearance: none;
}
#no::placeholder { color: color-mix(in srgb, var(--plum) 26%, #fff); }
#no:focus-visible { outline: 3px solid color-mix(in srgb, var(--plum) 34%, #fff); outline-offset: 1px; border-color: var(--plum); background: #fff; }
/* 첫 화면 이름 칸 */
.namefield { margin-top: 6px; text-align: center; }
.namefield label { display: block; margin-bottom: 8px; font-size: 14.5px; color: var(--ink-2); text-wrap: balance; }
.namefield input { width: 100%; height: 54px; padding: 0 14px; border: 1.5px solid var(--plum-line); border-radius: 10px; background: #fff; color: var(--ink); font: 500 18px/1 var(--sans); text-align: center; appearance: none; }
.namefield input::placeholder { color: color-mix(in srgb, var(--plum) 30%, #fff); font-weight: 400; }
.namefield input:focus-visible { outline: 3px solid color-mix(in srgb, var(--plum) 34%, #fff); outline-offset: 1px; border-color: var(--plum); }
.name-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); text-wrap: balance; }
#go, .again-btn {
  height: 54px;
  border: 0;
  border-radius: 10px;
  background: var(--plum);
  color: #fff;
  font: 700 17px/1 var(--sans);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#go:hover { background: var(--plum-deep); }
#go:focus-visible, .again-btn:focus-visible, .cs:focus-visible { outline: 3px solid color-mix(in srgb, var(--plum) 40%, #fff); outline-offset: 2px; }
#go[disabled] { opacity: .6; cursor: default; }
.msg { min-height: 24px; margin: 12px 0 0; text-align: center; font-size: 14.5px; color: var(--warn); text-wrap: balance; }
.msg:empty { min-height: 0; margin: 0; }

/* 결과 화면 */
.cert { border: 1px solid var(--plum); outline: 1px solid var(--plum-line); outline-offset: 4px; border-radius: 4px; margin: 6px; padding: 26px 16px 22px; text-align: center; }
.seal { width: 104px; height: 104px; margin: 0 auto 12px; color: var(--plum); }
.seal svg { display: block; width: 100%; height: 100%; }
.pass-title { margin: 0; font: 700 38px/1.1 var(--serif); letter-spacing: .06em; color: var(--ink); }
.owner { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--plum); overflow-wrap: anywhere; text-wrap: balance; }
.serial { margin: 8px 0 0; font-size: 16px; font-weight: 700; letter-spacing: .1em; font-variant-numeric: tabular-nums; color: var(--plum); }
.orn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px auto 14px; color: var(--plum); }
.orn::before, .orn::after { content: ""; width: 56px; height: 1px; background: currentColor; opacity: .6; }
.orn i { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); }
.pass-msg { margin: 0 0 20px; font-size: 15px; white-space: pre-line; text-wrap: balance; }
.rows { margin: 0; padding: 0; border-top: 1px solid var(--plum-line); text-align: left; }
.rows > div { display: flex; gap: 12px; align-items: baseline; padding: 11px 4px; border-bottom: 1px solid var(--plum-line); }
.rows dt { flex: 0 0 76px; margin: 0; color: var(--ink-2); font-size: 13.5px; }
.rows dd { flex: 1; min-width: 0; margin: 0; font-weight: 500; font-size: 15px; overflow-wrap: anywhere; }
.rows dd.num { font-weight: 700; font-size: 18px; letter-spacing: .16em; font-variant-numeric: tabular-nums; color: var(--plum); }
.checks-title { margin: 18px 0 8px; font-size: 13.5px; color: var(--ink-2); text-align: left; padding-left: 4px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.checks li { display: flex; gap: 7px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; background: var(--plum-soft); font-size: 14px; line-height: 1.4; }
.checks li::before { content: ""; flex: none; width: 15px; height: 15px; margin-top: 2px; background: var(--plum); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.4 11.6 3 8.2l1.2-1.2 2.2 2.2 5.4-5.4L13 5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.notice { margin: 18px 0 0; padding: 13px 14px; border-radius: 8px; background: var(--warn-soft); color: #5e3210; font-size: 14px; text-align: left; white-space: pre-line; }
.notice b { display: block; margin-bottom: 3px; color: var(--warn); }

.cert.unknown { border-color: #b9aeb4; outline-color: #e6dfe3; }
.unknown .mark { width: 60px; height: 60px; margin: 2px auto 14px; border-radius: 50%; background: #f1ecee; color: #6f6369; display: grid; place-items: center; font: 700 30px/1 var(--sans); }
.unknown .pass-no { margin: 0 0 8px; font-weight: 700; font-size: 22px; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.unknown .pass-msg { margin-bottom: 4px; color: var(--ink-2); }

.again-btn { width: 100%; margin-top: 16px; background: transparent; color: var(--plum); border: 1.5px solid var(--plum-line); font-size: 15.5px; height: 50px; }
.again-btn:hover { background: var(--plum-soft); }

.cs { display: block; margin: 16px 0 0; padding: 14px; border-radius: 10px; text-align: center; background: transparent; color: var(--plum); font-weight: 500; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }

.foot { padding: 30px 16px calc(34px + env(safe-area-inset-bottom)); text-align: center; color: var(--ink-2); font-size: 13px; line-height: 1.8; }
.foot p { margin: 0; white-space: pre-line; }

/* 도장이 찍히는 움직임 */
@media (prefers-reduced-motion: no-preference) {
  .cert.pass .seal { animation: stamp .5s cubic-bezier(.2, 1.3, .4, 1) both; }
  .cert .owner, .cert .pass-title, .cert .serial, .cert .orn, .cert .pass-msg, .cert .rows, .cert .checks-title, .cert .checks, .cert .notice { animation: rise .45s ease-out both; animation-delay: .18s; }
  @keyframes stamp { from { transform: scale(1.7) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
}

@media (max-width: 340px) {
  .panel { padding: 24px 16px 20px; }
  #no { font-size: 26px; letter-spacing: .2em; text-indent: .2em; }
  .checks { grid-template-columns: 1fr; }
  .pass-title { font-size: 32px; }
}
