









.qc-layer { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
            box-sizing: border-box; padding: 12px 16px; }
.qc-layer[hidden] { display: none; }
.qc-veil { position: absolute; inset: 0; background: rgba(3,5,6,.74); animation: qcVeil .22s ease-out both; }
@keyframes qcVeil { from { opacity: 0; } to { opacity: 1; } }

.qc {
   
  position: relative; z-index: 1; box-sizing: border-box; width: auto; min-width: min(340px, 100%); max-width: min(680px, 100%);
  max-height: 100%; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 18px 16px; outline: none;
  border-radius: 14px; border: 1px solid var(--gold);
  background: radial-gradient(120% 90% at 50% 0%, #2a2016 0%, #172024 46%, #0e1417 100%);
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,241,196,.42), 0 0 46px rgba(255,191,71,.22), 0 22px 60px rgba(0,0,0,.78);
  color: var(--ink); font: 500 12px/1.3 var(--ui);
  animation: qcIn .42s cubic-bezier(.3,1.25,.5,1) both;
}
@keyframes qcIn { 0% { transform: translateY(26px) scale(.9); opacity: 0; } 70% { transform: translateY(-3px) scale(1.01); opacity: 1; }
                  100% { transform: none; opacity: 1; } }
 
.qc-rays { position: absolute; left: 50%; top: -150px; width: 360px; height: 360px; margin-left: -180px; pointer-events: none;
           background: repeating-conic-gradient(from 0deg, rgba(255,191,71,.13) 0deg 9deg, transparent 9deg 24deg);
           -webkit-mask: radial-gradient(circle, #000 0 38%, transparent 70%); mask: radial-gradient(circle, #000 0 38%, transparent 70%);
           animation: qcSpin 14s linear infinite; }
@keyframes qcSpin { to { transform: rotate(360deg); } }
.qc-h { position: relative; margin: 2px 0 0; font: 700 22px/1 var(--title); letter-spacing: .16em; color: var(--goldHi);
        text-shadow: 0 0 14px rgba(255,191,71,.45), 0 2px 0 #000; animation: qcDrop .5s .08s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes qcDrop { from { transform: translateY(-14px) scale(1.25); opacity: 0; } to { transform: none; opacity: 1; } }

 
.qc-list { position: relative; display: flex; justify-content: center; gap: 12px; width: 100%; }
.qc-card { box-sizing: border-box; flex: 0 1 200px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
           padding: 12px 10px 10px; border-radius: 10px; border: 1px solid var(--edge2); background: rgba(19,26,29,.82);
           opacity: .38; transform: scale(.94); transition: opacity .18s, transform .18s, border-color .18s, background-color .18s; }
.qc-card.on { opacity: 1; transform: none; border-color: #7a6238;
              background: linear-gradient(180deg, rgba(220,180,110,.16), rgba(19,26,29,.86));
              animation: qcStamp .34s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes qcStamp { 0% { transform: scale(.94); } 45% { transform: scale(1.07); } 100% { transform: none; } }
.qc-ico { position: relative; width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 9px;
          border: 1px solid var(--edge2); background: var(--pane); color: var(--parch); }
.qc-ico .qc-glyph { width: 28px; height: 28px; margin-top: -6px; }
.qc-ico .q-fam { width: 17px; height: 17px; margin-top: -6px; transform: rotate(45deg); border: 1px solid #000; }
 
.qc-ico .q-fam.fire { background: var(--fire); }
.qc-ico .q-fam.iron { background: var(--ironGem); }
.qc-ico .q-fam.sword { background: var(--sword); }
.qc-ico .q-fam.tide { background: var(--tide); }
.qc-ico .q-pips { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.qc-ico .q-pips i { width: 5px; height: 5px; transform: rotate(45deg); background: var(--gold); }
 
.qc-seal { position: absolute; right: -9px; top: -9px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 13px;
           background: radial-gradient(circle at 35% 30%, #fff1c4, #f1d79c 40%, #b8863a 80%); color: #2a1c0c;
           box-shadow: 0 0 0 1px #000, 0 0 10px rgba(255,191,71,.55); opacity: 0; transform: scale(2.2); }
.qc-card.on .qc-seal { opacity: 1; transform: none; transition: transform .26s cubic-bezier(.3,1.6,.5,1) .06s, opacity .12s .06s; }
 
.qc-text { margin: 0; min-height: 2.5em; font: 600 13px/1.25 var(--ui); color: var(--ink); text-align: center;
           display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qc-gold { display: inline-flex; align-items: center; gap: 5px; color: var(--goldHi); font: 700 18px/1 var(--title);
           font-variant-numeric: tabular-nums; }
.qc-gold svg { width: 18px; height: 18px; }
.qc-card:not(.on) .qc-gold { color: var(--dim); }
.qc-card.on .qc-gold { animation: qcPop .36s .1s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes qcPop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: none; } }

 
.qc-total { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px;
            border: 1px solid var(--edge2); background: rgba(6,9,11,.82); }
.qc-total svg { width: 20px; height: 20px; color: var(--gold); }
.qc-total b { font: 700 19px/1 var(--title); letter-spacing: .04em; color: var(--goldHi); font-variant-numeric: tabular-nums; min-width: 3ch; }

.qc-ok { width: 148px; height: 44px; border-radius: 8px; cursor: pointer; font: 700 15px/1 var(--title) !important; letter-spacing: .16em;
         border: 1.5px solid var(--gold) !important; background: linear-gradient(180deg, #2a2016, #120e0b) !important; color: var(--goldHi);
         box-shadow: 0 0 0 1px #000, 0 0 18px rgba(255,191,71,.32), inset 0 0 18px rgba(220,180,110,.16); transition: opacity .18s; }
.qc-ok[aria-disabled="true"] { opacity: .45; cursor: default; box-shadow: 0 0 0 1px #000; }
.qc.done .qc-rays { animation-play-state: paused; }

 
@media (max-height: 420px) {
  .qc { gap: 9px; padding: 12px 14px 12px; }
  .qc-h { font-size: 19px; }
  .qc-card { padding: 9px 8px 8px; gap: 6px; }
  .qc-ico { width: 48px; height: 48px; }
  .qc-ico .qc-glyph { width: 24px; height: 24px; }
  .qc-total { height: 30px; }
}
 
@media (max-width: 560px) {
  .qc-list { flex-direction: column; gap: 8px; }
  .qc-card { flex: none; flex-direction: row; gap: 12px; padding: 8px 10px; }
  .qc-text { flex: 1; min-height: 0; text-align: left; }
}
 
@media (prefers-reduced-motion: reduce) {
  .qc, .qc-veil, .qc-h, .qc-card.on, .qc-card.on .qc-gold, .qc-rays { animation: none !important; }
  .qc-card, .qc-seal, .qc-ok { transition: none !important; }
}



.qc-ico img.q-art { object-fit: contain; }
.qc-seal.qc-seal-art:not(.q-fb) { background: none; box-shadow: none; border-radius: 0; }
.qc-seal img.qc-sealimg { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
