/* Today's quests and the Vidi coin wallet on /study/ielts (ielts-quests.js), as a compact night card beside the hero
   (8 Nov 2026, owner: scrolling down to the quests was tiring). The heading, offer, hero and this card sit in
   .home-top, which spans both columns of the page; on narrow screens the card drops right under the hero. */
body.ielts-home-v3 .home-top { grid-column: 1 / -1; display: grid; gap: 22px; min-width: 0; }
body.ielts-home-v3 .home-top-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 18px; align-items: stretch; min-width: 0; }
body.ielts-home-v3 .home-top-row > * { min-width: 0; }
@media (max-width: 980px) { body.ielts-home-v3 .home-top-row { grid-template-columns: minmax(0, 1fr); } }

body.ielts-dash-page .quests[hidden] { display: none !important; }
body.ielts-dash-page .quests { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 20px 18px 16px; border-radius: 4px !important; clip-path: none; scroll-margin-top: 80px; }
.quests-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.quests-copy { min-width: 0; }
.quests-kicker { margin: 0 0 2px; font: 800 11px/1.2 'Be Vietnam Pro', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--vg-aqua) !important; }
.quests .quests-title { margin: 0; font: 800 22px/1.25 var(--vg-display); color: #fff; }
.quests .quests-band, .quests .quests-new-band { margin: 2px 0 0; font-size: 13px; line-height: 1.4; }
.quests .quests-new-band { color: var(--vg-gold) !important; font-weight: 700; }

.quests-wallet { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 6px; border-radius: 4px; background: rgba(255, 200, 61, .14); }
.quests-wallet strong { font: 800 20px/1 var(--vg-display); color: var(--vg-gold); text-shadow: 0 0 14px rgba(255, 200, 61, .6); font-variant-numeric: tabular-nums; }
.quests-wallet-unit { font-weight: 800; color: var(--vg-gold); font-size: 12px; }
.quests-wallet-coin { width: 26px; height: 26px; object-fit: contain; }
.quests-wallet.is-bump { animation: quests-bump .5s ease; }
@keyframes quests-bump { 40% { transform: scale(1.14); } }

/* three rows: picture, what to do and the coins, then one small action */
.quests-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quest { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px 8px 8px;
  border-radius: 4px; background: rgba(255, 255, 255, .07); transition: background .2s; }
.quest:hover { background: rgba(255, 255, 255, .11); }
.quest-art { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; display: block; background: rgba(255, 255, 255, .06); }
.quest-body { display: grid; gap: 1px; min-width: 0; }
.quest-kind { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--vg-violet-lite); }
.quest-title { font-size: 14px; font-weight: 700; line-height: 1.3; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quest-reward { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: var(--vg-gold); font-size: 12px; }
.quests-coin { width: 15px; height: 15px; object-fit: contain; }
.quest .vg-btn { min-height: 36px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.quest-tick { font-weight: 800; color: var(--vg-aqua); font-size: 13px; white-space: nowrap; padding: 0 4px; }
.quest-glow { animation: quest-glow 1.6s ease-in-out infinite; }   /* light only: the button never moves under a tap */
@keyframes quest-glow { 50% { filter: brightness(1.18) saturate(1.2); } }
.quest.is-mock { background: linear-gradient(120deg, rgba(255, 200, 61, .22), rgba(255, 255, 255, .06) 70%); box-shadow: inset 0 0 0 1.5px rgba(255, 200, 61, .6); }
.quest.is-done { background: rgba(255, 200, 61, .14); }
.quest.is-claimed { background: rgba(86, 218, 220, .07); }
.quest.is-claimed .quest-art { filter: saturate(.5) brightness(.8); }

/* the chest: progress to the bonus */
.quests-chest { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: auto; padding: 6px 4px 0; }
.quests-chest-art { width: 40px; height: auto; filter: grayscale(.6) brightness(.7); }
.quests-chest.is-ready .quests-chest-art, .quests-chest.is-open .quests-chest-art { filter: drop-shadow(0 0 10px rgba(255, 200, 61, .6)); }
.quests-chest.is-ready .quests-chest-art { animation: vg-bob 2.4s ease-in-out infinite; }
.quests-chest-copy { display: grid; gap: 6px; min-width: 0; }
.quests-chest-copy strong { color: #fff; font-size: 13px; }
.quests .quests-chest-hint { color: var(--vg-text-3); font-size: 12px; font-weight: 700; text-align: right; max-width: 110px; line-height: 1.3; }
.quests-chest .vg-btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
.quests .quests-error { margin: 0; color: #ffb4c0 !important; font-weight: 700; font-size: 13px; }

/* signed out */
.quests-teaser { display: grid; justify-items: start; gap: 12px; height: 100%; align-content: center; }
.quests-teaser-coin { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(255, 200, 61, .55)); }
.quests-teaser .quests-title { font-size: 20px; }

.quests-flyer { position: fixed; z-index: 9999; width: 24px; height: 24px; pointer-events: none; filter: drop-shadow(0 0 8px rgba(255, 200, 61, .8)); }

@media (max-width: 640px) {
  body.ielts-dash-page .quests { padding: 18px 14px 14px; }
  .quest { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; }
  .quest-art { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .quest, .quests-chest-art, .quest-glow { transition: none; animation: none !important; } .quests-wallet.is-bump { animation: none; } }
