/*
 * JPholic Quiz Rally
 * クラスはすべて jqr- で始め、セレクタは .jqr の下に限定する。
 * テーマのCSSに影響を与えず、テーマ側の .btn や .inner などの指定も受けないようにするため。
 * 色は templates/quiz.php が config.php の値を style 属性で上書きする。
 */
.jqr{
  --jqr-red:#CF0616; --jqr-red-dark:#A00511; --jqr-orange:#FF9900;
  --jqr-ink:#1a1a1a; --jqr-sub:#5a5a5a;
  --jqr-paper:#ffffff; --jqr-ground:#F7F4F1; --jqr-line:#E7E1DA;
  --jqr-ok:#1e8a4a;
  background:var(--jqr-ground); color:var(--jqr-ink);
  font-family:"Noto Sans JP","Open Sans",sans-serif;
  font-size:15px; line-height:1.7; text-align:left; letter-spacing:normal;
  padding-bottom:12px;
}
.jqr *,.jqr *::before,.jqr *::after{box-sizing:border-box}
.jqr [hidden]{display:none !important}
.jqr .jqr-wrap{max-width:560px; margin:0 auto; padding:0 16px}

/* 画面下に固定する進捗バーの分だけ、ページの下に余白を取る（クラスは quiz-rally.js が付ける） */
body.jqr-has-dock{padding-bottom:84px}

/* ---- header ---- */
.jqr .jqr-hero{background:var(--jqr-paper); border-bottom:1px solid var(--jqr-line); padding:28px 0 22px; text-align:center}
.jqr .jqr-eyebrow{display:inline-block; background:var(--jqr-red); color:#fff; font-weight:700; font-size:12px; letter-spacing:.14em; padding:4px 14px; border-radius:2px}
.jqr .jqr-title{font-weight:900; font-size:clamp(24px,6vw,32px); line-height:1.7; color:var(--jqr-ink); margin:14px 0 6px; padding:0; border:0; background:none; letter-spacing:.02em; text-wrap:balance}
.jqr .jqr-title__em{color:var(--jqr-red)}
.jqr .jqr-lead{margin:0 auto; padding:0; max-width:34em; color:var(--jqr-sub); font-size:13.5px; line-height:1.7}

/* ---- stamp rally ---- */
.jqr .jqr-rally{background:var(--jqr-paper); border:1px solid var(--jqr-line); border-radius:8px; margin:20px auto 0; padding:18px 14px 14px; position:relative}
.jqr .jqr-rally__title{margin:0 0 12px; padding:0; border:0; background:none; font-size:13px; font-weight:700; line-height:1.7; letter-spacing:.12em; text-align:center; color:var(--jqr-sub)}
.jqr .jqr-stamps{display:flex; gap:6px; justify-content:center; flex-wrap:wrap}
.jqr .jqr-stamp{width:64px; text-align:center}
.jqr .jqr-stamp__pad{
  width:56px; height:56px; margin:0 auto; border-radius:50%;
  border:2px dashed #C9C2B9; display:flex; align-items:center; justify-content:center;
  font-weight:800; color:#C9C2B9; font-size:15px; background:#FBFAF8; position:relative;
}
.jqr .jqr-stamp__lbl{font-size:10.5px; color:var(--jqr-sub); margin-top:4px; letter-spacing:.03em}
.jqr .jqr-stamp.is-hit .jqr-stamp__pad{border:none; background:transparent}
.jqr .jqr-stamp.is-hit .jqr-stamp__pad::after{
  content:attr(data-mark);
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  border:2.5px solid var(--jqr-red); border-radius:50%; color:var(--jqr-red);
  font-weight:900; font-size:13px; letter-spacing:.05em;
  transform:rotate(-12deg); background:rgba(207,6,22,.05);
  animation:jqr-press .35s cubic-bezier(.2,1.6,.4,1);
}
@keyframes jqr-press{0%{transform:rotate(-12deg) scale(2.2); opacity:0}100%{transform:rotate(-12deg) scale(1); opacity:1}}
@media (prefers-reduced-motion:reduce){ .jqr .jqr-stamp.is-hit .jqr-stamp__pad::after{animation:none} }

/* ---- cards / screens ---- */
.jqr .jqr-card{background:var(--jqr-paper); border:1px solid var(--jqr-line); border-radius:8px; margin:16px 0; padding:22px 18px}
.jqr .jqr-card__title{margin:0 0 10px; padding:0; border:0; background:none; font-size:17px; font-weight:900; line-height:1.7; color:var(--jqr-ink); letter-spacing:normal}
.jqr .jqr-card__text{margin:0 0 8px; padding:0; font-size:15px; line-height:1.7; color:var(--jqr-ink)}
.jqr .jqr-card__sub{margin:0 0 16px; padding:0; font-size:13px; line-height:1.7; color:var(--jqr-sub)}
.jqr .jqr-btn{
  display:inline-block; border:none; cursor:pointer; text-decoration:none; text-align:center;
  background:var(--jqr-red); color:#fff; font-family:inherit; font-weight:800; font-size:16px; line-height:1.7;
  padding:14px 28px; margin:0; border-radius:6px; letter-spacing:.06em; width:100%;
  box-shadow:0 3px 0 var(--jqr-red-dark); transition:transform .06s;
}
.jqr .jqr-btn:hover{color:#fff; text-decoration:none; opacity:1}
.jqr .jqr-btn:active{transform:translateY(2px); box-shadow:none}

/* quiz */
.jqr .jqr-qhead{display:flex; align-items:baseline; gap:10px; border-bottom:2px solid var(--jqr-ink); padding-bottom:8px; margin-bottom:14px}
.jqr .jqr-qnum{font-family:"Open Sans",sans-serif; font-weight:800; color:var(--jqr-red); font-size:22px; font-variant-numeric:tabular-nums; white-space:nowrap}
.jqr .jqr-qnum__total{font-size:13px; color:var(--jqr-sub)}
.jqr .jqr-qtext{font-weight:700; font-size:16px}
.jqr .jqr-choices{display:flex; flex-direction:column; gap:10px; margin:14px 0 6px}
.jqr .jqr-choice{
  font-family:inherit; font-size:15px; font-weight:500; line-height:1.7; text-align:left; cursor:pointer;
  background:#FBFAF8; border:1.5px solid var(--jqr-line); border-radius:6px; padding:13px 14px; margin:0; width:100%;
  display:flex; gap:10px; align-items:center; color:var(--jqr-ink);
}
.jqr .jqr-choice:hover{border-color:var(--jqr-ink)}
.jqr .jqr-choice:focus-visible,.jqr .jqr-btn:focus-visible{outline:3px solid var(--jqr-orange); outline-offset:2px}
.jqr .jqr-choice__key{flex:none; width:24px; height:24px; border-radius:50%; border:1.5px solid #C9C2B9; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:var(--jqr-sub)}
.jqr .jqr-choice.is-correct{border-color:var(--jqr-ok); background:#F0F8F2}
.jqr .jqr-choice.is-correct .jqr-choice__key{border-color:var(--jqr-ok); background:var(--jqr-ok); color:#fff}
.jqr .jqr-choice.is-wrong{border-color:var(--jqr-red); background:#FBF0F0; animation:jqr-shake .3s}
@keyframes jqr-shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
@media (prefers-reduced-motion:reduce){ .jqr .jqr-choice.is-wrong{animation:none} }
.jqr .jqr-hint{
  margin-top:12px; font-size:13px; background:#FFF6E8; border:1px solid #F2DDB8; border-radius:6px; padding:10px 12px;
}
.jqr .jqr-hint a{color:var(--jqr-red-dark); font-weight:700; text-decoration:underline}
.jqr .jqr-feedback{min-height:24px; font-size:13.5px; font-weight:700; margin-top:10px}
.jqr .jqr-feedback.is-ok{color:var(--jqr-ok)} .jqr .jqr-feedback.is-ng{color:var(--jqr-red)}
.jqr .jqr-nextrow{margin-top:12px}

/* coupon */
.jqr .jqr-coupon{
  position:relative; background:var(--jqr-paper); border-radius:10px; margin:16px 0;
  border:1px solid var(--jqr-line); overflow:hidden;
}
.jqr .jqr-coupon__top{background:var(--jqr-red); color:#fff; text-align:center; padding:20px 16px 24px}
.jqr .jqr-coupon__cong{font-size:12px; letter-spacing:.2em; font-weight:700; opacity:.9}
.jqr .jqr-coupon__amount{font-family:"Open Sans","Noto Sans JP",sans-serif; font-weight:800; font-size:44px; line-height:1.1; margin:6px 0 2px}
.jqr .jqr-coupon__amount small{font-size:18px; font-weight:700}
.jqr .jqr-coupon__cond{font-size:12px; opacity:.9}
.jqr .jqr-coupon__perf{border-top:3px dashed var(--jqr-ground); position:relative; height:0}
.jqr .jqr-coupon__perf::before,.jqr .jqr-coupon__perf::after{
  content:""; position:absolute; top:-12px; width:24px; height:24px; border-radius:50%; background:var(--jqr-ground);
}
.jqr .jqr-coupon__perf::before{left:-13px} .jqr .jqr-coupon__perf::after{right:-13px}
.jqr .jqr-coupon__body{padding:18px 16px 20px; text-align:center}
.jqr .jqr-code-label{font-size:12.5px; font-weight:700; margin-bottom:4px}
.jqr .jqr-code{
  font-family:"Open Sans",monospace; font-weight:800; font-size:24px; letter-spacing:.18em;
  border:2px dashed var(--jqr-ink); border-radius:6px; padding:10px 8px; margin:4px 0 4px; background:#FBFAF8;
  font-variant-numeric:tabular-nums;
}
.jqr .jqr-copy{
  display:inline-block; background:var(--jqr-paper); color:var(--jqr-ink); border:1.5px solid var(--jqr-ink); border-radius:5px;
  font-family:inherit; font-size:13px; font-weight:700; line-height:1.7; padding:6px 16px; margin:4px 0 8px; cursor:pointer; width:auto;
}
.jqr .jqr-copy:focus-visible{outline:3px solid var(--jqr-orange); outline-offset:2px}
.jqr .jqr-issue-error{color:var(--jqr-red); font-size:13px; font-weight:700; margin:4px 0 8px}
.jqr .jqr-issue-error p{margin:0 0 4px; padding:0}
.jqr .jqr-code-note{font-size:12px; color:var(--jqr-sub); margin-bottom:12px}
.jqr .jqr-timer{
  background:var(--jqr-ink); color:#fff; border-radius:6px; padding:10px 12px; margin:12px 0 14px;
  font-size:13px;
}
.jqr .jqr-timer__row{display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap}
.jqr .jqr-timer__until{font-size:12.5px; opacity:.85}
.jqr .jqr-timer__t{font-family:"Open Sans",sans-serif; font-weight:800; font-size:20px; color:var(--jqr-orange); font-variant-numeric:tabular-nums}
.jqr .jqr-expired{color:var(--jqr-red); font-weight:700; font-size:13px}
.jqr .jqr-coupon__text{font-size:13px; line-height:1.7; margin:0 0 14px; padding:0; color:var(--jqr-sub)}
.jqr .jqr-coupon__text strong{color:var(--jqr-ink)}

/* sticky progress bar */
.jqr .jqr-dock{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  background:var(--jqr-ink); color:#fff; padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));
}
.jqr .jqr-dock__inner{max-width:560px; margin:0 auto; display:flex; align-items:center; gap:12px}
.jqr .jqr-dock__msg{font-size:12.5px; font-weight:700; flex:1; min-width:0}
.jqr .jqr-dock__hl{color:var(--jqr-orange)}
.jqr .jqr-bar{flex:1.2; height:8px; background:#3a3a3a; border-radius:4px; overflow:hidden; min-width:80px}
.jqr .jqr-bar i{display:block; height:100%; background:linear-gradient(90deg,var(--jqr-red),var(--jqr-orange)); width:0; transition:width .4s}
.jqr .jqr-dock__cta{flex:none; background:var(--jqr-red); color:#fff; text-decoration:none; font-size:12px; font-weight:800; padding:8px 12px; border-radius:5px; white-space:nowrap}

.jqr .jqr-foot{color:var(--jqr-sub); font-size:11px; line-height:1.7; text-align:center; margin:28px 0 12px; padding:0}
.jqr .jqr-reset{background:none; border:none; padding:0; margin:0; color:var(--jqr-sub); font-size:11px; text-decoration:underline; cursor:pointer; font-family:inherit; width:auto}
