/* 世界遺産ワールドクエスト A — アプリシェル + モック由来のアニメーション定義 */


@import url('/v/20261121-0647-c059aee3-test/wq-components.css');

:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  background: var(--wq-navy-deep);
  font-family: var(--font-body);
  color: #22304a;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
[data-act] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { -webkit-user-drag: none; user-select: none; }

/* ---- アプリ枠：スマホ全画面（PCでは中央480px） ---- */
#app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  background: var(--wq-paper);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,.5);
}
.scr {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  animation: wqFade .3s ease-out;
}
/* Paint the map across the full scrollable page, including content below the fold. */
.wq-paper-map {
  background-image: linear-gradient(rgba(246,237,220,.92), rgba(246,237,220,.92)), url('/v/20261121-0647-c059aee3-test/assets/worldmap-ink.png') !important;
  background-size: auto, 150% auto !important;
  background-position: center top !important;
  background-repeat: repeat !important;
  background-attachment: local !important;
}
.ovl { position: absolute; inset: 0; z-index: 20; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior-y: contain; }
.safe-top { padding-top: calc(var(--sat) + 10px); }
.safe-bottom { padding-bottom: calc(var(--sab) + 26px) !important; }

/* Scroll the complete page: hero, heading, copy and actions move together.
   data-scroll identifies content for styling only; it is not a scroll pane. */
.scr > *, .ovl > * { flex-shrink: 0; }
[data-scroll] { overflow: visible !important; min-height: auto; flex-shrink: 0 !important; }
.scr > [data-scroll], .ovl > [data-scroll] { flex: 1 0 auto !important; }
[data-scroll] > * { flex-shrink: 0; }
.scr.has-overlay, .ovl.is-scroll-locked, .scr.wq-stage, .wq-invite[data-open="1"] { overflow: hidden !important; }

/* Compact sharing fits portrait phones without a scroll. When space is still
   insufficient, the entire sheet moves, including its heading and actions. */
.wq-share-overlay { justify-content: flex-start !important; }
.wq-share-overlay > [data-act="shClose"] { flex: 1 0 10px !important; }
.wq-share-sheet {
  --wq-share-scale: 1;
  display: flex; flex-direction: column; flex: none; min-height: 0;
  margin-top: var(--sat);
  overflow: visible;
  padding: 8px 20px calc(var(--sab) + 14px);
}
.wq-share-handle { flex: none; margin: 0 auto 8px; }
.wq-share-heading { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.wq-share-heading > button { flex: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.wq-share-content { display: grid; gap: 10px; padding: 4px 0 10px; }
.wq-share-preview { width: calc(150px * var(--wq-share-scale)); height: calc(266px * var(--wq-share-scale)); margin: 0 auto; }
.wq-share-card { transform: scale(var(--wq-share-scale)); transform-origin: top left; }
.wq-share-copy-block { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.wq-share-caption { text-align: center; line-height: 1.6; }
.wq-share-copy { overflow-wrap: anywhere; }
.wq-share-actions { display: flex; flex: none; flex-direction: column; gap: 8px; padding-top: 2px; }
.wq-share-actions > button { flex: none; }
.wq-share-targets > button, .wq-share-targets > a { min-height: 48px; }
.wq-share-preview { display: grid; place-items: center; background: #14233b; border-radius: 12px; box-shadow: 0 12px 26px rgba(9,17,30,.2); }
.wq-share-preview > img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; -webkit-touch-callout: default; user-select: auto; }
.wq-share-preview > span { color: #f6ecd6; font-size: 11px; }
.wq-share-sheet [hidden] { display: none !important; }
.wq-share-sheet button:disabled, .wq-share-targets > a[aria-disabled="true"] { opacity: .5; cursor: wait; }
.wq-share-sheet :is(button,a):focus-visible { outline: 3px solid #9b7c1f; outline-offset: 3px; }
.wq-share-notice, .wq-share-status { margin: 0; font-size: 11px; line-height: 1.65; color: #526078; overflow-wrap: anywhere; }
.wq-share-status { min-height: 18px; }
.wq-share-simple-actions { grid-column: 1 / -1; }
.wq-share-simple-actions [hidden] { display: none !important; }
.wq-share-simple-actions button:disabled { opacity: .5; cursor: wait; }
.wq-share-outbound { display: block; color: #1c2b45; font-size: 13px; font-weight: 700; padding: 10px; text-align: center; border: 1px solid #c9a227; border-radius: 10px; }
.wq-share-help { background: #f2e7d0; border-radius: 12px; padding: 10px; font-size: 11px; line-height: 1.7; }
.wq-share-help p { margin: 0 0 8px; }
.wq-share-help > div { display: flex; gap: 8px; }
.wq-share-help button, .wq-share-retry { min-height: 44px; padding: 8px 12px; border: 1px solid #a4987c; border-radius: 10px; color: #1c2b45; background: #fffdf7; font-size: 12px; }
.wq-share-copy p { user-select: text; -webkit-user-select: text; }
.wq-survey-thanks-content > :first-child { margin-top: auto; }
.wq-survey-thanks-content > :last-child { margin-bottom: auto; }
.wq-completion-overlay { flex-direction: column; justify-content: flex-start !important; }
.wq-completion-card { display: flex; flex-direction: column; flex: none; margin-block: auto; }
.wq-completion-card > button { flex: none; }
.wq-invite-content > :first-child { margin-top: auto; }
.wq-invite-content > :last-child { margin-bottom: auto; }
.wq-invite-letter { position: absolute; inset: 0; pointer-events: none; }
.wq-message-overlay { display: flex; flex-direction: column; padding: calc(var(--sat) + 16px) 0 calc(var(--sab) + 24px); gap: 16px; }
.wq-message-overlay > .wq-message-content { flex: none !important; margin-top: auto; }
.wq-message-hint { flex: none; margin-bottom: auto; }
/* 吹き出しと返事は同じ拍で登場。待っている間の選択肢は操作対象にしない。 */
.wq-message-overlay:has(.wq-message-choices) > .wq-message-content { margin-bottom: auto; }
.wq-message-reveal { animation: wqMessageReveal .44s var(--wq-message-delay, 2.7s) cubic-bezier(.2,.85,.2,1) both; }
@keyframes wqMessageReveal {
  from { opacity: 0; visibility: hidden; transform: translateY(10px) scale(.92); }
  to { opacity: 1; visibility: visible; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wq-message-overlay, .wq-message-overlay * { animation: none !important; }
  .wq-message-reveal { opacity: 1; visibility: visible; transform: none; }
}

.wq-capture-overlay { justify-content: flex-start !important; }
.wq-capture-overlay > :first-child { margin-top: auto; }
.wq-capture-overlay > :last-child { margin-bottom: auto; }
.wq-survey textarea { overflow: hidden; }
.wq-celebration { position: absolute; inset: 0; z-index: 6; overflow: hidden; pointer-events: none; }

@media (max-height: 700px) {
  .scr > .safe-bottom, .wq-survey > .safe-bottom { padding-bottom: calc(var(--sab) + 10px) !important; }
  .wq-share-sheet { --wq-share-scale: .72; padding: 6px 14px calc(var(--sab) + 10px); }
  .wq-share-handle { margin-bottom: 3px; }
  .wq-share-heading { margin-bottom: 4px; }
  .wq-share-content { grid-template-columns: 1fr; align-items: center; gap: 12px; padding-bottom: 8px; }
  .wq-share-caption { text-align: left; }
  .wq-share-copy { padding: 8px !important; gap: 5px !important; }
  .wq-share-actions { gap: 6px; }
  .wq-share-targets { gap: 6px !important; }
  .wq-share-targets > button, .wq-share-targets > a { padding: 7px 2px 6px !important; gap: 4px !important; }
  .wq-share-actions > button { height: 44px !important; }
  .wq-survey > .safe-top { padding: calc(var(--sat) + 8px) 16px 8px !important; }
  .wq-survey > [data-scroll="survey"] { padding: 0 16px 10px !important; gap: 12px !important; }
  .wq-survey > [data-scroll="survey"] > div { gap: 6px !important; }
  .wq-survey > .safe-bottom { padding-top: 8px !important; padding-left: 16px !important; padding-right: 16px !important; }
}
@media (max-height: 500px) {
  .wq-share-sheet { --wq-share-scale: .58; }
  .wq-completion-card { padding: 14px !important; }
  .wq-completion-card > button { margin-top: 10px !important; height: 44px !important; }
  .wq-invite-letter { transform: translateY(-10px) scale(.82); }
  .wq-invite [data-env="tap"] { padding-bottom: calc(var(--sab) + 14px) !important; }
}
@media (max-height: 350px) {
  .wq-share-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .wq-share-targets { grid-column: 1 / -1; }
  .wq-share-actions > button:last-child { grid-column: 2; grid-row: 2; }
  .wq-share-actions > button:only-of-type { grid-column: 1 / -1; }
  .wq-share-actions > button { font-size: 12px !important; }
  .wq-invite-letter { transform: translateY(-18px) scale(.42); }
}

/* Approved paper background: heritage stamps at 35%. Match the catalogue's
   authored paper surfaces; photo backdrops, prologue artwork and AR stay intact.
   Catalogue alternatives override this same pseudo-element, never a second layer. */
:is(.scr, .ovl):is([style*="background:var(--wq-paper)"], [style*="background: var(--wq-paper)"], [style*="background:var(--wq-cream)"], [style*="background: var(--wq-cream)"]) {
  isolation: isolate;
  --wq-paper-surface-color: var(--wq-paper);
}
:is(.scr, .ovl):is([style*="background:var(--wq-cream)"], [style*="background: var(--wq-cream)"]) {
  --wq-paper-surface-color: var(--wq-cream);
}
:is(.scr, .ovl):is([style*="background:var(--wq-paper)"], [style*="background: var(--wq-paper)"], [style*="background:var(--wq-cream)"], [style*="background: var(--wq-cream)"])::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Anchor the illustration to the app viewport while the paper content scrolls. */
  position: fixed;
  width: min(100%, 480px);
  margin-inline: auto;
  background: url('/v/20261121-0647-c059aee3-test/assets/ui/background-heritage-stamps-v01.png') center top / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .35;
}
/* Keep the original tint of translucent controls on a solid paper backing,
   so the illustration is confined to the space behind the foreground panels. */
:is(.scr, .ovl):is([style*="background:var(--wq-paper)"], [style*="background: var(--wq-paper)"], [style*="background:var(--wq-cream)"], [style*="background: var(--wq-cream)"])
  :is(.wq-button--secondary, [data-act="qrDemo"],
      [data-scroll="pieces"] > [style*="background:rgba(201,162,39,.1)"],
      .wq-quiz-kicker,
      [data-scroll="quiz"] > [style*="background:rgba(155,57,28,.09)"]) {
  background-color: var(--wq-paper-surface-color) !important;
  background-image: linear-gradient(var(--wq-paper-panel-tint, transparent), var(--wq-paper-panel-tint, transparent)) !important;
}
[data-act="qrDemo"] { --wq-paper-panel-tint: rgba(19,34,56,.06); }
[data-scroll="pieces"] > [style*="background:rgba(201,162,39,.1)"] { --wq-paper-panel-tint: rgba(201,162,39,.1); }
.wq-quiz-kicker { --wq-paper-panel-tint: rgba(201,162,39,.18); }
[data-scroll="quiz"] > [style*="background:rgba(155,57,28,.09)"] { --wq-paper-panel-tint: rgba(155,57,28,.09); }
/* Replace only decorative watermark siblings, preserving the SVG world map. */
:is(.scr, .ovl) > [style*="worldmap-ink.png"] { visibility: hidden; }

/* Keep the label and count on one baseline across the selectable font pairs. */
.wq-piece-status { min-height: 38px; line-height: 1; white-space: nowrap; }
.wq-piece-status__text { display: inline-flex; align-items: baseline; gap: 6px; }
.wq-piece-status__count { font-family: var(--font-display); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.wq-medal-received { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; text-align: center; }
.wq-medal-received__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #4a6b57; color: var(--wq-cream); }
.wq-medal-received > span:last-child { font-size: 12px; color: var(--wq-secondary-ink); }
.wq-medal-confirm { width: min(360px, calc(100vw - 32px)); max-height: calc(100dvh - 32px - var(--sat) - var(--sab)); margin: auto; padding: 24px 22px; border: 1px solid rgba(201,162,39,.4); border-radius: 20px; background: var(--wq-paper); color: #1c2b45; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 20px 60px #0005; }
.wq-medal-confirm::backdrop { background: rgba(8,18,32,.65); }
.wq-medal-confirm h2 { margin: 0 0 16px; font-family: var(--font-heading); font-size: 21px; }
.wq-medal-confirm p { font-size: 14px; line-height: 1.8; }
.wq-medal-confirm__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.wq-medal-confirm__actions > button { width: 100%; min-height: 48px; }

/* トースト */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--sab) + 96px);
  transform: translateX(-50%);
  z-index: 90; max-width: 330px; padding: 11px 18px; border-radius: 999px;
  background: rgba(18,20,26,.9); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 12.5px;
  line-height: 1.6; text-align: center; pointer-events: none;
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
  animation: wqToast .22s ease-out; white-space: pre-line;
}

/* ---- 再描画時のチラつき防止 ----
   同一画面内の状態更新（.re）では登場アニメを再生しない。
   オーバーレイも開いたままの更新（.re-ovl）なら止める。 */
.scr.re { animation: none; }
.scr.re *:not(.ovl):not(.ovl *):not(.keep) { animation: none !important; }
.scr.re-ovl ~ .ovl, .scr.re-ovl ~ .ovl * { animation: none !important; }
/* ピース獲得画面の一過性エフェクトは再描画時は非表示（アニメ終端と同じ状態） */
.scr.re [data-r="flash"], .scr.re [data-r="ring"], .scr.re [data-r="ray"],
.scr.re [data-r="piece"], .scr.re [data-r="conf"], .scr.re [data-r="shine"] { opacity: 0 !important; }

/* ================= モック由来キーフレーム ================= */
@keyframes wqGlow{0%,100%{opacity:.55;transform:scale(.9)}50%{opacity:1;transform:scale(1.15)}}
@keyframes wqFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes wqSeal{0%{transform:translate(-50%,-50%) scale(1);opacity:1}38%{transform:translate(-50%,-50%) scale(1.18);opacity:1}100%{transform:translate(-50%,-8%) scale(.62) rotate(16deg);opacity:0}}
@keyframes wqBurst{0%{transform:scale(1)}38%{transform:scale(1.3)}100%{transform:scale(.55);opacity:0}}
@keyframes wqFlap{0%{transform:rotateX(0deg)}100%{transform:rotateX(-168deg)}}
@keyframes wqLetter2{0%{opacity:0;transform:scale(.92)}100%{opacity:1;transform:scale(1)}}
@keyframes wqEnvGlow{0%{opacity:0}45%{opacity:1}100%{opacity:0}}
@keyframes wqSheetIn{from{opacity:.4;transform:translateY(100%)}to{opacity:1;transform:none}}
@keyframes wqToast{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes wqPRule{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:none}}
@keyframes wqPWalk{0%{transform:translateX(216px)}100%{transform:translateX(0)}}
@keyframes wqPToddle{0%{transform:translateY(0) rotate(-3deg)}25%{transform:translateY(-8px) rotate(0deg)}50%{transform:translateY(0) rotate(3deg)}75%{transform:translateY(-8px) rotate(0deg)}100%{transform:translateY(0) rotate(-3deg)}}
@keyframes wqPDust{0%{opacity:0;transform:translate(0,0) scale(.5)}30%{opacity:.5}100%{opacity:0;transform:translate(16px,-9px) scale(1.5)}}
@keyframes wqPShadow{0%,50%,100%{transform:scaleX(1);opacity:.16}25%,75%{transform:scaleX(.78);opacity:.09}}
@keyframes wqPPop{0%{opacity:0;transform:translateY(12px) scale(.92)}64%{opacity:1;transform:translateY(-2px) scale(1.015)}100%{opacity:1;transform:none}}
@keyframes wqPLine{0%{opacity:0;transform:translateY(5px)}100%{opacity:1;transform:none}}
@keyframes wqPRise{0%{opacity:0;transform:translateY(14px)}100%{opacity:1;transform:none}}
@keyframes wqPNote{0%{opacity:0;transform:translate(0,0) scale(.6)}25%{opacity:.85}100%{opacity:0;transform:translate(13px,-26px) scale(1.05) rotate(18deg)}}
@keyframes wqPTrip{0%{transform:rotate(-3deg) translate(0,0)}34%{transform:rotate(-20deg) translate(-4px,1px)}100%{transform:rotate(-76deg) translate(-16px,13px)}}
@keyframes wqPUp{0%{transform:rotate(-76deg) translate(-16px,13px)}52%{transform:rotate(7deg) translate(0,0)}76%{transform:rotate(-4deg)}100%{transform:none}}
@keyframes wqPBob{0%,100%{transform:translateY(0) rotate(0deg)}50%{transform:translateY(-5px) rotate(-1.2deg)}}
@keyframes wqPThud{0%{opacity:0;transform:scale(.4)}25%{opacity:.55}100%{opacity:0;transform:scale(1.9)}}
@keyframes wqPStars{0%{opacity:0;transform:translateY(4px) scale(.6)}30%{opacity:1;transform:translateY(-6px) scale(1)}100%{opacity:0;transform:translateY(-16px) scale(.9)}}
@keyframes wqPBlink{0%,100%{opacity:.25;transform:translateY(0)}50%{opacity:1;transform:translateY(2px)}}
@keyframes wqEnvWobble{0%,100%{transform:rotate(-1.4deg) translateY(0)}28%{transform:rotate(1.1deg) translateY(-4px)}54%{transform:rotate(-.7deg) translateY(-1px)}78%{transform:rotate(1.4deg) translateY(-3px)}}
@keyframes wqFlash{0%{opacity:0}12%{opacity:1}30%{opacity:.15}46%{opacity:.8}100%{opacity:0}}
@keyframes wqShake{0%,100%{transform:translate(0,0)}12%{transform:translate(-7px,4px)}26%{transform:translate(6px,-4px)}40%{transform:translate(-5px,3px)}54%{transform:translate(4px,-2px)}70%{transform:translate(-3px,1px)}85%{transform:translate(2px,-1px)}}
@keyframes wqBurst2{0%{opacity:0;transform:translate(-50%,-50%) scale(.15) rotate(0deg)}25%{opacity:.85}100%{opacity:0;transform:translate(-50%,-50%) scale(2.1) rotate(72deg)}}
@keyframes wqPulse{0%,100%{transform:scale(1)}40%{transform:scale(1.45)}70%{transform:scale(.94)}}
@keyframes wqScrimIn{0%{opacity:0}100%{opacity:1}}
@keyframes wqTeku{0%{opacity:0;transform:translate(-132px,0)}9%{opacity:1;transform:translate(-118px,-5px)}18%{transform:translate(-104px,0)}27%{transform:translate(-90px,-5px)}36%{transform:translate(-76px,0)}45%{transform:translate(-62px,-5px)}54%{transform:translate(-49px,0)}63%{transform:translate(-37px,-5px)}72%{transform:translate(-26px,0)}81%{transform:translate(-16px,-4px)}90%{transform:translate(-7px,0)}100%{opacity:1;transform:translate(0,0)}}
@keyframes wqSimonIn{0%{opacity:0;transform:translateX(-90px) scale(.94)}62%{opacity:1;transform:translateX(8px) scale(1.02)}100%{opacity:1;transform:none}}
@keyframes wqBubbleIn{0%{opacity:0;transform:translateY(10px) scale(.92)}100%{opacity:1;transform:none}}
@keyframes wqCardIn{0%{opacity:0;transform:translateY(30px) scale(.84)}58%{opacity:1;transform:translateY(0) scale(1.05)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes wqLetterTile{0%{opacity:0;transform:translateY(16px) scale(.5) rotate(-16deg)}68%{opacity:1;transform:translateY(0) scale(1.18) rotate(4deg)}100%{opacity:1;transform:none}}
@keyframes wqPieceIn{0%{opacity:0;transform:translate(-50%,-50%) scale(.12) rotate(-320deg)}38%{opacity:1;transform:translate(-50%,-50%) scale(1.32) rotate(24deg)}58%{transform:translate(-50%,-50%) scale(.88) rotate(-12deg)}76%{transform:translate(-50%,-50%) scale(1.08) rotate(5deg)}100%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0deg)}}
@keyframes wqPieceFly{0%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0deg)}30%{transform:translate(-50%,-58%) scale(1.16) rotate(-14deg)}100%{opacity:0;transform:translate(-50%,170px) scale(.2) rotate(38deg)}}
@keyframes wqRing{0%{opacity:.85;transform:translate(-50%,-50%) scale(.35)}100%{opacity:0;transform:translate(-50%,-50%) scale(2.6)}}
@keyframes wqConf{0%{opacity:0;transform:translateY(-40px) rotate(0deg)}14%{opacity:1}100%{opacity:0;transform:translateY(360px) rotate(340deg)}}
@keyframes wqStampIn{0%{opacity:0;transform:rotate(-13deg) scale(2.2)}55%{opacity:1;transform:rotate(-13deg) scale(.9)}78%{transform:rotate(-13deg) scale(1.07)}100%{opacity:1;transform:rotate(-13deg) scale(1)}}
@keyframes wqSqPop{0%{opacity:0;transform:scale(.5)}62%{opacity:1;transform:scale(1.2)}100%{opacity:1;transform:scale(1)}}
@keyframes wqShine{0%{opacity:0;transform:translateX(-130%) skewX(-18deg)}20%{opacity:.8}100%{opacity:0;transform:translateX(240%) skewX(-18deg)}}
@keyframes wqScrim{from{opacity:0}to{opacity:1}}
@keyframes wqScroll{0%{opacity:0;transform:translateY(36px) scale(.4)}16%{opacity:1}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes wqUnroll{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes wqRuleX{from{opacity:0;transform:scaleX(0)}to{opacity:1;transform:none}}
@keyframes wqChar{0%{opacity:0;transform:translateY(4px) scale(1.12)}100%{opacity:1;transform:none}}

/* ---- 画面1：招待状の演出 ---- */
[data-env="env"]{animation:wqEnvWobble 3.4s ease-in-out infinite}
[data-open="1"] [data-env="env"]{animation:none}
[data-open="1"] [data-env="seal"]{animation:wqSeal .5s cubic-bezier(.4,0,.2,1) forwards}
[data-open="1"] [data-env="burst"]{animation:wqBurst .5s cubic-bezier(.4,0,.2,1) forwards}
[data-open="1"] [data-env="flap"]{animation:wqFlap .55s .18s cubic-bezier(.45,0,.2,1) forwards}
[data-open="1"] [data-env="letter2"]{animation:wqLetter2 .6s .34s cubic-bezier(.2,.7,.2,1) forwards}
[data-open="1"] [data-env="glow"]{animation:wqEnvGlow 1.25s .28s ease-out forwards}
[data-open="1"] [data-env="scrim"]{animation:wqScrim .55s .58s ease-out both}
[data-open="1"] [data-env="scroll"]{animation:wqScroll .92s .42s cubic-bezier(.2,.8,.2,1) both}
[data-open="1"] [data-env="e1"]{animation:wqUnroll .42s 1.22s ease-out both}
[data-open="1"] [data-env="r1"]{animation:wqRuleX .42s 1.32s cubic-bezier(.3,.8,.2,1) both}
[data-env="ch"]{opacity:0}
[data-open="1"] [data-env="ch"]{animation:wqChar .3s ease-out both}
[data-open="1"] [data-env="r2"]{animation:wqRuleX .5s 4.9s cubic-bezier(.3,.8,.2,1) both}
[data-open="1"] [data-env="hint"]{animation:wqUnroll .6s 5.15s ease-out both}
[data-env="tap"]{pointer-events:none}
[data-open="1"] [data-env="tap"]{animation:wqUnroll .6s 5.55s ease-out both;pointer-events:auto}

/* ---- 画面2：プロローグ（シモン登場） ---- */
[data-p2] [data-p="eyebrow"]{animation:wqPLine .5s .1s ease-out both}
[data-p2] [data-p="rule"]{animation:wqPRule .46s .2s cubic-bezier(.3,.8,.2,1) both}
[data-p2] [data-p="walk"]{animation:wqPWalk 1.5s .3s cubic-bezier(.32,.02,.5,1) both}
[data-p2] [data-p="toddle"]{animation:wqPToddle .375s .3s steps(24,end) 4 both,wqPTrip .38s 1.8s cubic-bezier(.45,0,.85,1) forwards,wqPUp .62s 2.5s cubic-bezier(.3,.65,.2,1) forwards}
[data-p2] [data-p="bob"]{animation:wqPBob 2.4s 3.1s ease-in-out infinite}
[data-p2] [data-p="shadow"]{animation:wqPShadow .375s .3s ease-in-out 4 both}
[data-p2] [data-p="dust"]{animation:wqPDust .5s .3s ease-out 3 both}
[data-p2] [data-p="thud"]{animation:wqPThud .55s 2.14s ease-out both}
[data-p2] [data-p="stars"]{animation:wqPStars .9s 2.16s ease-out both}
[data-p2] [data-p="bubble"]{animation:wqPPop .52s 3.16s cubic-bezier(.2,.8,.2,1) both}
[data-p2] [data-p="note"]{animation:wqPNote 1.5s 3.4s ease-out infinite both}
[data-p2] [data-p="cta"]{animation:wqPRise .5s 3.6s cubic-bezier(.2,.8,.2,1) both}

/* ---- 画面4：ピース獲得演出 ---- */
/* Place the name over the illustration without adding a separate title row. */
/* Give spare height to the illustration, not gaps between the controls.
   Anchor the artwork at the top so only its lower edge is cropped. */
.scr[data-a3] > div:nth-child(2) { height: auto !important; min-height: 160px; flex: 1 1 0 !important; }
.scr[data-a3] > div:nth-child(2) > img { object-position: center top; }
.scr[data-a3] [data-r="stamp"] { right: 20px !important; top: 18px !important; width: 90px !important; height: 90px !important; }
.scr[data-a3] [data-scroll="get"] { flex: 0 0 auto !important; margin-top: 0 !important; padding-top: 8px !important; justify-content: flex-start; gap: 10px !important; }
.scr[data-a3] [data-r="head"] { position: absolute; left: 0; right: 0; bottom: 100%; padding: 24px 24px 12px; background: linear-gradient(transparent, rgba(246,237,220,.94)); }
.scr[data-a3] [data-r="head"] h3 { line-height: 1.25; }
.scr[data-a3] [data-r="card"] { padding: 12px 14px !important; }
.scr[data-a3] [data-r="card"] > div:last-child { margin-top: 10px !important; }
.scr[data-a3] [data-r="card"] > div:last-child > span { min-width: 0; }
.scr[data-a3] > [data-r="cta"] { padding: 12px 24px calc(var(--sab) + 16px) !important; gap: 8px !important; }
/* Keep both actions reachable on short phones; enlarged text can still scroll. */
@media (max-height: 600px) {
  .scr[data-a3] > div:nth-child(2) { min-height: 130px; }
  .scr[data-a3] [data-r="stamp"] { right: 16px !important; top: 10px !important; width: 68px !important; height: 68px !important; }
  .scr[data-a3] [data-r="head"] { padding: 20px 16px 8px; }
  .scr[data-a3] [data-r="head"] h3 { font-size: 20px !important; margin-top: 3px !important; }
  .scr[data-a3] [data-r="head"] > div { font-size: 9px !important; }
  .scr[data-a3] [data-scroll="get"] { padding: 8px 16px 0 !important; gap: 8px !important; }
  .scr[data-a3] [data-r="card"] { padding: 9px 12px !important; }
  .scr[data-a3] [data-r="card"] > div:last-child { gap: 5px !important; margin-top: 7px !important; }
  .scr[data-a3] [data-r="talk"] { gap: 8px !important; }
  .scr[data-a3] [data-r="talk"] .wq-simon { --simon-height: 68px !important; }
  .scr[data-a3] [data-r="talk"] > div { padding: 8px 12px !important; }
  .scr[data-a3] [data-r="talk"] p { font-size: 13px !important; line-height: 1.6 !important; }
  .scr[data-a3] > [data-r="cta"] { padding: 8px 16px calc(var(--sab) + 10px) !important; gap: 6px !important; }
  .scr[data-a3] > [data-r="cta"] > button { height: 44px !important; min-height: 44px; }
}
[data-a3]{animation:wqShake .62s 1.62s cubic-bezier(.36,.07,.19,.97) both}
[data-a3] [data-r="flash"]{animation:wqFlash .95s .04s ease-out both}
[data-a3] [data-r="ring"]{animation:wqRing .85s .18s ease-out both}
[data-a3] [data-r="ray"]{animation:wqBurst2 .95s .1s ease-out both}
[data-a3] [data-r="piece"]{animation:wqPieceIn .82s .1s cubic-bezier(.2,.85,.2,1) both,wqPieceFly .6s 1.15s cubic-bezier(.55,0,.75,1) forwards}
[data-a3] [data-r="conf"]{animation:wqConf 2.4s .22s ease-in both}
[data-a3] [data-r="count"]{display:inline-block;animation:wqPulse .5s 1.68s ease-out both}
[data-a3] [data-r="head"]{animation:wqPLine .5s .5s ease-out both}
[data-a3] [data-r="card"]{animation:wqPRise .5s .92s cubic-bezier(.2,.8,.2,1) both}
[data-a3] [data-r="sq"]{animation:wqSqPop .45s 1.64s cubic-bezier(.2,.8,.2,1) both}
[data-a3] [data-r="shine"]{animation:wqShine 1.1s 1.85s ease-out both}
[data-a3] [data-r="stamp"]{animation:wqStampIn .5s 1.55s cubic-bezier(.3,.7,.2,1) both}
[data-a3] [data-r="talk"]{animation:wqPPop .5s 2.1s cubic-bezier(.2,.8,.2,1) both}
[data-a3] [data-r="cta"]{animation:wqPRise .5s 2.45s cubic-bezier(.2,.8,.2,1) both}

/* PC閲覧時の補助背景 */
@media (min-width: 500px) {
  body::before {
    content: '';
    position: fixed; inset: 0;
    background: radial-gradient(circle at 50% 30%, #1d3151, var(--wq-navy-deep) 70%);
    z-index: -1;
  }
}

/* ---- スポット紹介と初回のシモン登場 ---- */
.wq-spot-detail {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.wq-spot-detail__hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(160px, 27vh, 230px);
  min-height: clamp(160px, 27svh, 230px);
  padding-top: calc(var(--sat) + 66px);
  flex: none;
  overflow: hidden;
}
.wq-spot-detail__hero > img { object-position: center top; }
/* Zone, name and location form one heading. Allow wrapping below the back button. */
.wq-spot-detail__title { position: relative; margin-top: auto; padding: 0 22px 16px; }
.wq-spot-detail__zone { max-width: 100%; }
.scr.wq-spot-detail > .wq-spot-detail__body {
  position: relative;
  flex: 1 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 12px 20px 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}
.wq-spot-detail__actions {
  position: relative;
  flex: none;
  padding: 12px 20px 0;
  padding-bottom: calc(var(--sab) + 16px) !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wq-spot-copy { flex: none; }
.wq-spot-copy h4 {
  margin: 0 0 8px;
  color: var(--wq-navy);
  font-family: var(--font-heading);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 800;
}
.wq-spot-copy p, .wq-spot-highlights {
  margin: 0;
  color: var(--wq-secondary-ink);
  font-size: 12.5px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}
.wq-spot-highlights { padding: 14px 15px; border: 1px solid rgba(19,34,56,.1); border-radius: 12px; background: #fffaf0; }
.wq-spot-highlights h4 { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.wq-spot-detail .wq-spot-copy p { line-height: 1.8; }
.wq-spot-detail .wq-spot-highlights {
  padding: 10px 12px;
  align-self: start;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wq-spot-highlight-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  flex: 0 1 auto;
  min-height: 0;
  max-height: 199px;
  gap: 10px;
  margin-top: 8px;
}
.wq-spot-highlight-photos figure {
  margin: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wq-spot-highlight-photos figure:only-child { grid-column: 1 / -1; width: 60%; justify-self: center; }
.wq-spot-highlight-photos img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center top;
  border-radius: 7px;
}
.wq-spot-highlight-photos figcaption { flex-shrink: 0; margin-top: 3px; font-size: 10.5px; line-height: 1.4; text-align: center; }
@media (max-height: 700px) {
  .wq-spot-detail__hero { min-height: clamp(154px, 24vh, 174px); min-height: clamp(154px, 24svh, 174px); }
  .scr.wq-spot-detail > .wq-spot-detail__body { padding: 10px 18px 0; gap: 8px; }
  .wq-spot-detail__actions { padding: 10px 18px 0; padding-bottom: calc(var(--sab) + 10px) !important; gap: 6px; }
  .wq-spot-detail .wq-spot-highlights h4 { margin-bottom: 5px; }
}

/* Reserve both action rows inside Safari's visible Web area (SE2: 375 × 553).
   The photo rows absorb the remaining height without shrinking copy or buttons. */
.wq-spot-detail .wq-spot-detail__back {
  position: absolute; z-index: 1; top: calc(var(--sat) + 14px); left: 20px;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: rgba(246,237,220,.92); color: var(--wq-navy);
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
}
.wq-spot-detail__back:focus-visible { outline: 3px solid var(--wq-gold); outline-offset: 2px; }
@media (max-height: 650px) {
  .wq-spot-detail__hero { min-height: 142px; padding-top: calc(var(--sat) + 60px); }
  .wq-spot-detail .wq-spot-detail__back { top: calc(var(--sat) + 8px) !important; left: 14px !important; }
  .wq-spot-detail .wq-spot-detail__title { padding: 0 16px 10px; }
  .wq-spot-detail #spotHeading { font-size: 23px !important; line-height: 1.35; }
  .scr.wq-spot-detail > .wq-spot-detail__body { padding: 8px 16px 0; gap: 7px; }
  .wq-spot-detail .wq-spot-copy p { line-height: 1.65; }
  .wq-spot-detail .wq-spot-highlights { padding: 7px 10px; }
  .wq-spot-detail .wq-spot-highlights h4 { font-size: 14px; line-height: 1.4; margin-bottom: 3px; }
  .wq-spot-detail .wq-spot-highlight-photos { margin-top: 5px; gap: 8px; }
  .wq-spot-detail__actions { padding: 8px 16px 0; padding-bottom: calc(var(--sab) + 8px) !important; gap: 6px; }
  .wq-spot-detail__actions .wq-button { height: 48px !important; flex: none; }
  .wq-spot-detail__actions [data-act="qrDemo"] { padding: 8px 10px !important; }
}

.wq-spot-welcome {
  position: fixed;
  inset: 0;
  width: min(480px, 100vw);
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wq-cream);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.wq-spot-welcome[open] { display: flex; flex-direction: column; }
.wq-spot-welcome::backdrop { background: rgba(8,18,32,var(--wq-spot-backdrop-opacity, .75)); }
.wq-spot-welcome__content {
  width: 100%;
  flex: none;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(var(--sat) + 18px) clamp(18px, 5vw, 24px) calc(var(--sab) + 22px);
}
.wq-simon-row.wq-spot-welcome__scene {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: none;
  min-width: 0;
}
.wq-dialogue.wq-spot-welcome__bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid rgba(201,162,39,.45);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(8,18,32,.18);
  animation: wqSpotBubbleIn .3s .85s ease-out both;
}
.wq-spot-welcome__bubble::after {
  content: '';
  position: absolute;
  right: -6px;
  bottom: 23px;
  width: 10px;
  height: 10px;
  background: var(--wq-dialogue-fill);
  border-top: 1px solid rgba(201,162,39,.45);
  border-right: 1px solid rgba(201,162,39,.45);
  transform: rotate(45deg);
}
.wq-spot-welcome__bubble h2 {
  outline: none;
  margin: 0 0 6px;
  color: var(--wq-gold-soft);
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .12em;
}
.wq-spot-welcome__bubble p {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
/* QR到着の案内（2026-10-17 東武リハ後）：「〇〇に到着！」を本文より大きく見せる。 */
.wq-spot-welcome__bubble .wq-spot-arrival__headline {
  margin: 0 0 4px;
  color: var(--wq-gold-soft);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
}
.wq-spot-welcome__character {
  flex: none;
  width: 115.4px;
  max-width: 42%;
  line-height: 0;
  animation: wqSpotSimonIn .85s cubic-bezier(.22,.7,.28,1) both;
}
.wq-spot-welcome__character > .wq-simon {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 846 / 1144;
}
.wq-spot-welcome__content > .wq-button {
  position: relative;
  z-index: 1;
  flex: none;
  min-height: 48px;
}
/* Share brand artwork: https://github.com/simple-icons/simple-icons (icons/line.svg, icons/x.svg).
   Keep the icon host's existing dimensions; transparent color hides Lucide's shadow SVG. */
[data-act="shLine"] > lc-icon,
[data-act="share"][aria-label="LINEでシェア"] > lc-icon,
[data-act="shX"] > lc-icon,
[data-act="share"][aria-label="Xでシェア"] > lc-icon {
  color: transparent !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
[data-act="shLine"] > lc-icon,
[data-act="share"][aria-label="LINEでシェア"] > lc-icon {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%2306C755%22%3E%3Cpath%20d%3D%22M19.365%209.863c.349%200%20.63.285.63.631%200%20.345-.281.63-.63.63H17.61v1.125h1.755c.349%200%20.63.283.63.63%200%20.344-.281.629-.63.629h-2.386c-.345%200-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346%200%20.627.285.627.63%200%20.349-.281.63-.63.63H17.61v1.125h1.755zm-3.855%203.016c0%20.27-.174.51-.432.596-.064.021-.133.031-.199.031-.211%200-.391-.09-.51-.25l-2.443-3.317v2.94c0%20.344-.279.629-.631.629-.346%200-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195%200%20.375.104.495.254l2.462%203.33V8.108c0-.345.282-.63.63-.63.345%200%20.63.285.63.63v4.771zm-5.741%200c0%20.344-.282.629-.631.629-.345%200-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346%200%20.628.285.628.63v4.771zm-2.466.629H4.917c-.345%200-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348%200%20.63.285.63.63v4.141h1.756c.348%200%20.629.283.629.63%200%20.344-.282.629-.629.629M24%2010.314C24%204.943%2018.615.572%2012%20.572S0%204.943%200%2010.314c0%204.811%204.27%208.842%2010.035%209.608.391.082.923.258%201.058.59.12.301.079.766.038%201.08l-.164%201.02c-.045.301-.24%201.186%201.049.645%201.291-.539%206.916-4.078%209.436-6.975C23.176%2014.393%2024%2012.458%2024%2010.314%22%2F%3E%3C%2Fsvg%3E");
}
[data-act="shX"] > lc-icon,
[data-act="share"][aria-label="Xでシェア"] > lc-icon {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23000000%22%3E%3Cpath%20d%3D%22M14.234%2010.162%2022.977%200h-2.072l-7.591%208.824L7.251%200H.258l9.168%2013.343L.258%2024H2.33l8.016-9.318L16.749%2024h6.993zm-2.837%203.299-.929-1.329L3.076%201.56h3.182l5.965%208.532.929%201.329%207.754%2011.09h-3.182z%22%2F%3E%3C%2Fsvg%3E");
}

.wq-spot-welcome__content > .wq-button:focus-visible {
  outline: 3px solid var(--wq-cream);
  outline-offset: 3px;
}
@keyframes wqSpotSimonIn {
  from { opacity: 0; transform: translateX(100vw); }
  to { opacity: 1; transform: none; }
}
@keyframes wqSpotBubbleIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
@media (max-height: 440px) {
  .wq-spot-welcome__content { gap: 10px; padding-top: calc(var(--sat) + 12px); padding-bottom: calc(var(--sab) + 14px); }
  .wq-spot-welcome__character { width: 94px; }
  .wq-dialogue.wq-spot-welcome__bubble { margin-bottom: 6px; padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .wq-spot-welcome__character, .wq-dialogue.wq-spot-welcome__bubble {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
/* Adopted popup artwork: travel postmarks at full strength. */
.wq-share-sheet, .wq-completion-card {
  position: relative;
  isolation: isolate;
}
.wq-share-sheet > *, .wq-completion-card > * {
  position: relative;
  z-index: 1;
}
.wq-share-sheet::before, .wq-completion-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
  background: url('/v/20261121-0647-c059aee3-test/assets/ui/background-travel-postmarks-v01.png') center top / cover no-repeat;
  opacity: 1;
  mix-blend-mode: multiply;
}
.wq-completion-card::before {
  filter: invert(1);
  mix-blend-mode: screen;
}
.wq-share-sheet button[data-act="shClose"]:not([aria-label]) {
  background: #fbf5e8 !important;
}

/* Screen and download display the same approved scrapbook image. */
.wq-album-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: #fffbed;
  box-shadow: 0 8px 22px rgba(68,41,17,.16);
}
.wq-album-card img {
  display: block;
  width: 100%;
  height: auto;
}
.wq-album-card [hidden] { display: none; }
.wq-album-card [data-album-card-preparing] {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #66442d;
  text-align: center;
}
.wq-album-card [data-album-card-preparing][hidden] { display: none; }
.wq-album-designs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:12px; }
.wq-album-designs button { display:flex; flex-direction:column; align-items:center; gap:6px; min-height:66px; padding:8px 3px; border:1px solid #c9bd9f; border-radius:12px; color:#22304a; background:#fffaf0; font:600 10px var(--font-heading); cursor:pointer; }
.wq-album-designs button[aria-pressed="true"] { border:2px solid #ac8615; padding:7px 2px; background:#fff1b9; }
.wq-album-designs button:disabled { opacity:.55; cursor:wait; }
.wq-album-design-swatch { display:block; width:24px; height:28px; border:1px solid #c8baa2; border-radius:3px; }
.wq-album-design-swatch--02 { background:#fff; }
.wq-album-design-swatch--03 { background:linear-gradient(120deg,#143854 40%,#efe5d0 40%); }
.wq-album-design-swatch--08 { background:linear-gradient(135deg,#afd9d5,#fffaf0 50%,#f4cbb3); }

/* Shared medal images. Celebration opens only after staff confirmation. */
.wq-medal-art { text-align:center; width:100%; }
.wq-medal-art__stage { position:relative; height:148px; display:grid; place-items:center; perspective:700px; isolation:isolate; }
.wq-medal-art__stage::before { content:""; position:absolute; width:180px; height:148px; border-radius:50%; background:radial-gradient(ellipse,#f6d67866,transparent 70%); }
.wq-medal-art__coin { width:120px; height:120px; position:relative; transform-style:preserve-3d; }
.wq-medal-art__face { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; backface-visibility:hidden; -webkit-backface-visibility:hidden; filter:drop-shadow(0 6px 5px #70511033); }
.wq-medal-art__face--back { transform:rotateY(180deg); }
.wq-medal-art__sparkles { position:absolute; inset:0; display:grid; place-items:center; color:#bb8520; font-size:22px; opacity:0; pointer-events:none; text-shadow:72px -36px #e6b544,-76px -30px #bb8520,67px 44px #bb8520,-65px 48px #e6b544,0 -65px #e6b544; }
.wq-medal-art__caption { display:block; font-family:var(--font-heading); font-weight:900; font-size:23px; color:#946510; }
.wq-medal-art__placeholder { display:block; margin-top:4px; font-size:10px; color:#6b6256; }


/* Gallery receipt: the album's actual gallery artwork supplies the heading. */
.wq-medal-popup { padding:0; width:min(360px,calc(100vw - 36px)); max-width:none; max-height:calc(100dvh - 24px - var(--sat) - var(--sab)); overflow:auto; overscroll-behavior:contain; border:1px solid #c8b4a799; border-radius:17px; color:#402c20; background:#fffefa; box-shadow:0 18px 65px #231c2040; }
.wq-medal-popup::backdrop { background:#27231e88; }
.wq-medal-popup__scene { position:relative; overflow:hidden; padding:8px 22px 20px; text-align:center; background:#fffefa; }
.wq-medal-popup__scene::after { content:""; position:absolute; inset:5px; border:1px solid #cbb1a866; border-radius:12px; pointer-events:none; }
.wq-medal-popup__close { position:absolute; z-index:5; right:9px; top:9px; width:36px; height:36px; border:0; background:transparent; color:#655c56; font-size:27px; cursor:pointer; }
.wq-medal-popup__header { height:auto; aspect-ratio:4.7; margin:0 -14px; background:url('/v/20261121-0647-c059aee3-test/assets/album-designs/02-background.png') center top / 100% auto no-repeat; }
.wq-medal-popup__title { position:relative; margin:9px -8px 0; min-height:35px; font:700 clamp(20px,6vw,26px)/1.35 'Noto Serif JP',serif; color:#40271c; }
.wq-medal-popup__show { position:relative; height:252px; display:grid; place-items:center; isolation:isolate; }
.wq-medal-popup__canvas { position:absolute; width:100%; height:100%; object-fit:contain; z-index:2; visibility:hidden; }
.wq-medal-popup[data-render-mode="webgl"] .wq-medal-popup__canvas { visibility:visible; }
.wq-medal-popup[data-render-mode="webgl"] .wq-medal-art { visibility:hidden; }
.wq-medal-popup .wq-medal-art { position:relative; z-index:2; }
.wq-medal-popup .wq-medal-art__stage { height:240px; }
.wq-medal-popup .wq-medal-art__coin { width:170px; height:170px; }
.wq-medal-popup .wq-medal-art__caption, .wq-medal-popup .wq-medal-art__placeholder, .wq-medal-popup .wq-medal-art__sparkles { display:none; }
.wq-medal-popup__shadow { position:absolute; bottom:12px; width:115px; height:15px; background:radial-gradient(ellipse,#59432640,transparent 70%); filter:blur(3px); }
.wq-medal-popup__sample { display:block; margin:3px 0 12px; font:12px 'Noto Serif JP',serif; color:#9a7867; }
.wq-medal-popup__actions { display:flex; flex-direction:column; gap:8px; }
.wq-medal-popup__actions > .wq-button { width:100%; min-height:42px; height:42px !important; border-radius:999px; font-family:var(--font-heading); font-size:14px; }
.wq-medal-popup__actions > .wq-button--primary { background:#FACF01; color:#1c2b45; box-shadow:none; border:0; }
.wq-medal-popup__later { background:#fff9e9; border:1px solid #c9bd9f; color:#1c2b45; font-weight:700; cursor:pointer; }
.wq-medal-popup:not(.is-medal-ready) .wq-medal-popup__title, .wq-medal-popup:not(.is-medal-ready) .wq-medal-popup__actions { opacity:0; }
.wq-medal-popup.is-medal-ready .wq-medal-popup__title { animation:wq-gallery-get .45s 3s both; }
.wq-medal-popup.is-medal-ready .wq-medal-popup__actions { animation:wq-gallery-get .4s 3.3s both; }
@keyframes wq-gallery-get { from { opacity:0; transform:translateY(7px) scale(.96); } to { opacity:1; transform:none; } }
@media(max-height:600px) { .wq-medal-popup__show { height:170px; } .wq-medal-popup__scene { padding-bottom:13px; } .wq-medal-popup__title { margin-top:3px; } }
@media(prefers-reduced-motion:reduce) { .wq-medal-popup *, .wq-medal-popup[open] { animation:none !important; } .wq-medal-popup .wq-medal-popup__title, .wq-medal-popup .wq-medal-popup__actions { opacity:1; } }

/* Five-second awards ceremony; Three.js drives particles and the reveal timeline. */
.wq-medal-popup__radiance,.wq-medal-popup__halo { display:none; }
.wq-medal-popup[data-render-mode="webgl"] .wq-medal-popup__scene::before { content:""; position:absolute; inset:0; pointer-events:none; background:radial-gradient(ellipse at 50% 45%,#3b2914 0%,#19130e 45%,#0e0e10 85%); opacity:var(--ceremony-veil,0); }
.wq-medal-popup__header,.wq-medal-popup__sample,.wq-medal-popup__actions { position:relative; }
.wq-medal-popup__canvas { width:calc(100% + 44px); height:340px; transform:none; }
.wq-medal-popup[data-ceremony] .wq-medal-popup__title,.wq-medal-popup[data-ceremony] .wq-medal-popup__actions { animation:none; }
.wq-medal-popup[data-ceremony="gather"] .wq-medal-popup__title,.wq-medal-popup[data-ceremony="spin"] .wq-medal-popup__title { opacity:0; }
.wq-medal-popup[data-ceremony="gather"] .wq-medal-popup__actions,.wq-medal-popup[data-ceremony="spin"] .wq-medal-popup__actions,.wq-medal-popup[data-ceremony="burst"] .wq-medal-popup__actions,.wq-medal-popup[data-ceremony="settle"] .wq-medal-popup__actions { opacity:0; pointer-events:none; visibility:hidden; }
.wq-medal-popup[data-ceremony="burst"] .wq-medal-popup__title { color:#ffebbb; text-shadow:0 0 22px #ffcd7288; animation:wq-award-title .65s both; }
.wq-medal-popup[data-ceremony="settle"] .wq-medal-popup__title { color:#946527; }
.wq-medal-popup[data-ceremony="done"] .wq-medal-popup__actions { animation:wq-gallery-get .35s both; }
.wq-medal-popup[data-ceremony="gather"] .wq-medal-popup__header,.wq-medal-popup[data-ceremony="spin"] .wq-medal-popup__header,.wq-medal-popup[data-ceremony="burst"] .wq-medal-popup__header { opacity:.5; filter:invert(1) sepia(.8); mix-blend-mode:screen; }
.wq-medal-popup[data-ceremony="gather"] .wq-medal-popup__close,.wq-medal-popup[data-ceremony="spin"] .wq-medal-popup__close,.wq-medal-popup[data-ceremony="burst"] .wq-medal-popup__close { color:#ead8b7; }
.wq-medal-popup[data-ceremony="gather"] .wq-medal-popup__sample,.wq-medal-popup[data-ceremony="spin"] .wq-medal-popup__sample,.wq-medal-popup[data-ceremony="burst"] .wq-medal-popup__sample { color:#c3ab84; }
.wq-medal-popup[data-ceremony="gather"] .wq-medal-popup__shadow,.wq-medal-popup[data-ceremony="spin"] .wq-medal-popup__shadow,.wq-medal-popup[data-ceremony="burst"] .wq-medal-popup__shadow { opacity:0; }
@keyframes wq-award-title { from { opacity:0; transform:translateY(5px) scale(.88); filter:blur(3px); } to { opacity:1; transform:none; filter:blur(0); } }
@media(max-height:600px) { .wq-medal-popup__canvas { height:250px; } }
@media(prefers-reduced-motion:reduce) { .wq-medal-popup__scene::before { display:none; } }
/* No preview of the medal before its reveal, including the lazy renderer load. */
.wq-medal-popup:not(.is-medal-ready) .wq-medal-art { visibility:hidden; }
.scr:has(#medalCelebration[open]) [data-scroll="medal"] .wq-medal-art { visibility:hidden; }
/* The album artwork's paper disappears into the popup instead of forming a panel. */
.wq-medal-popup__header { mix-blend-mode:multiply; mask-image:linear-gradient(to bottom,#000 0%,#000 84%,transparent 100%); }
body:has(#medalCelebration[open]) [data-scroll="medal"] .wq-medal-art { display:none; }
[data-scroll="medal"] .wq-medal-art__face { border-radius:50%; }