/* #1 와이파이 QR 전용 스타일 (공통 틀은 assets/dangdo.css) */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wq-view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wq-help {
  margin: 10px 2px 2px;
  color: var(--dd-sub);
  font-size: 14px;
}

.wq-help-inline {
  color: var(--dd-sub);
  font-size: 13px;
  font-weight: 500;
}

.wq-center {
  text-align: center;
}

.wq-form .dd-field:last-of-type {
  margin-bottom: 6px;
}

/* 숨긴 와이파이 스위치: 다른 입력 라벨과 같은 글씨 */
.wq-hidden-switch {
  margin-top: 6px;
  padding-left: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dd-sub);
}

.wq-more-state {
  margin-left: auto;
  color: var(--dd-faint);
  font-weight: 500;
  font-size: 14px;
}

/* ---------- 결과: QR이 화면 세로 가운데쯤 오도록 ---------- */
.wq-center-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8px;
}

.wq-summary {
  align-self: center;
  margin-bottom: 14px;
}

.wq-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 18px 20px;
}

.wq-qr {
  width: min(100%, 44vh, 300px);
  width: min(100%, 44dvh, 300px);
  aspect-ratio: 1;
}

.wq-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.wq-qr-name {
  margin: 8px 0 0;
  max-width: 100%;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wq-qr-caption {
  margin: 4px 0 0;
  color: var(--dd-sub);
  font-size: 15px;
}

#warnings .dd-notice {
  margin: 12px 0 0;
}

/* ---------- 카드 ---------- */
.wq-designs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 18px;
}

.wq-design {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 6px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--dd-sub);
  cursor: pointer;
  transition: background 0.15s;
}

.wq-design svg {
  display: block;
  width: 58px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(42, 35, 32, 0.16);
}

.wq-design[aria-checked="true"] {
  background: var(--dd-surface);
  color: var(--dd-ink);
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--dd-accent);
}

.wq-card-preview {
  display: flex;
  justify-content: center;
}

.wq-card-preview svg {
  display: block;
  height: min(40vh, 400px);
  height: min(40dvh, 400px);
  width: auto;
  max-width: 100%;
  border-radius: 6% / 4.5%;
  box-shadow: 0 2px 4px rgba(42, 35, 32, 0.06), 0 12px 28px rgba(42, 35, 32, 0.12);
}

.wq-pw-switch {
  margin: 14px 0 0;
  padding: 4px 16px;
  border-radius: var(--dd-radius);
  background: var(--dd-surface);
}

/* ---------- 인쇄 미리보기 ---------- */
.wq-count {
  margin-bottom: 18px;
}

.wq-sheet-wrap {
  display: flex;
  justify-content: center;
}

.wq-sheet svg {
  display: block;
  height: min(44vh, 560px);
  height: min(44dvh, 560px);
  width: auto;
  max-width: 100%;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(42, 35, 32, 0.06), 0 14px 30px rgba(42, 35, 32, 0.12);
}

/* 카드가 한 장씩 차례로 놓이는 효과 */
.wq-sheet .dd-slot {
  transform-box: fill-box;
  transform-origin: center;
  animation: wq-slot 380ms var(--dd-ease-out) both;
}

.wq-sheet .dd-slot-2 { animation-delay: 40ms; }
.wq-sheet .dd-slot-3 { animation-delay: 80ms; }
.wq-sheet .dd-slot-4 { animation-delay: 120ms; }
.wq-sheet .dd-slot-5 { animation-delay: 160ms; }
.wq-sheet .dd-slot-6 { animation-delay: 200ms; }
.wq-sheet .dd-slot-7 { animation-delay: 240ms; }
.wq-sheet .dd-slot-8 { animation-delay: 280ms; }
.wq-sheet .dd-slot-9 { animation-delay: 320ms; }

@keyframes wq-slot {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 실제 인쇄 ---------- */
@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  .dd-print-area svg {
    display: block;
    width: 210mm;
    height: 296mm; /* 297mm 꽉 채우면 반올림 때문에 빈 둘째 장이 생길 수 있어 1mm 줄임 */
    margin: 0;
  }
}
