/* Bảng Nhiệm vụ (quest-ui.mjs): khung chung .swg-* ở tour.css */
#sw-quest-btn { position: relative; }
#sw-quest-dot { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff;
  font: 800 11px/18px -apple-system, "Segoe UI", Arial, sans-serif; text-align: center; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); animation: swq-pop .4s cubic-bezier(.2, .9, .3, 1.4); }
#sw-quest-dot.hidden { display: none; }
@keyframes swq-pop { from { transform: scale(.3); } to { transform: none; } }
.swq-panel { position: fixed; top: calc(68px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); bottom: 16px; z-index: 40; width: min(430px, calc(100% - 32px));
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; color: var(--swg-text); pointer-events: auto;
  background: rgba(13, 20, 33, .93); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); backdrop-filter: blur(10px);
  animation: swq-in .3s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes swq-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.swq-hd { position: relative; padding: 16px 18px 12px; background: linear-gradient(135deg, rgba(250, 204, 21, .3), rgba(249, 115, 22, .24) 55%, rgba(16, 185, 129, .18)); }
.swq-hd .swg-badge { color: #fef3c7; }
.swq-hd h2 { margin: 9px 0 3px; font-size: 19px; font-weight: 800; color: #fff; }
.swq-hd p { margin: 0; font-size: 12.5px; color: rgba(232, 238, 247, .85); }
.swq-x { position: absolute; top: 10px; right: 10px; }
.swq-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 12px 12px 4px; }
.swq-tabs button { position: relative; height: 58px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--swg-mute); font: 650 11px/1 inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; transition: background .15s, color .15s; }
.swq-tabs button i { font-style: normal; font-size: 17px; }
.swq-tabs button { white-space: nowrap; letter-spacing: -.01em; padding: 0 2px; }
.swq-tabs button span { font: 650 10.5px/1 ui-monospace, Consolas, monospace; color: var(--swg-mute); }
.swq-tabs button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.swq-tabs button.is-on { background: linear-gradient(135deg, rgba(250, 204, 21, .26), rgba(249, 115, 22, .22)); color: #fff; box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .5); }
.swq-tabs button.is-on span { color: #fde68a; }
.swq-tabs button u { position: absolute; top: 3px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff;
  text-decoration: none; font: 800 10px/16px -apple-system, "Segoe UI", Arial, sans-serif; }
.swq-list { flex: 1; min-height: 0; overflow: auto; padding: 8px 14px 12px; display: grid; gap: 8px; align-content: start; }
.swq-card { display: flex; gap: 12px; padding: 11px 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); }
.swq-card.is-done { background: linear-gradient(135deg, rgba(52, 211, 153, .12), rgba(34, 211, 238, .05)); border-color: rgba(52, 211, 153, .35); }
.swq-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 20px;
  background: rgba(255, 255, 255, .08); }
.swq-card.is-done .swq-ic { background: #34d399; color: #052e2b; font-size: 18px; font-weight: 900; }
.swq-info { flex: 1; min-width: 0; }
.swq-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swq-head b { font-size: 14.5px; color: #fff; }
.swq-reward { margin-left: auto; padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: rgba(251, 191, 36, .15); color: #fde68a; white-space: nowrap; }
.swq-reward.is-claimed { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
.swq-rep { font-style: normal; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; background: rgba(96, 165, 250, .16); color: #bfdbfe; }
.swq-rep.is-week { background: rgba(167, 139, 250, .18); color: #ddd6fe; }
.swq-card.is-ready { border-color: rgba(251, 191, 36, .55); box-shadow: 0 0 0 1px rgba(251, 191, 36, .25), 0 10px 26px -14px rgba(251, 191, 36, .8); }
.swq-claim { margin-top: 9px; width: 100%; }
.swq-all { width: 100%; }
.swq-reset { font-size: 11.5px; color: var(--swg-mute); padding: 0 2px; }
.swq-points { margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .25); color: #fde68a; font-weight: 800; font-size: 12px; }
.swq-panel.is-busy .swq-claim, .swq-panel.is-busy .swq-all { opacity: .55; pointer-events: none; }
.swq-info small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: rgba(232, 238, 247, .8); }
.swq-bar { margin-top: 8px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.swq-bar b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fbbf24, #f97316); transition: width .35s; }
.swq-card.is-done .swq-bar b { background: linear-gradient(90deg, var(--swg-acc), var(--swg-acc2)); }
.swq-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font-size: 11.5px; color: var(--swg-mute); }
.swq-num { font: 650 11px/1.4 ui-monospace, Consolas, monospace; white-space: nowrap; }
.swq-card.is-done .swq-foot span:first-child { color: #6ee7b7; }
.swq-journal { width: 100%; margin-top: 4px; }
.swq-note { padding: 10px 16px 14px; font-size: 11.5px; color: var(--swg-mute); border-top: 1px solid rgba(255, 255, 255, .07); }
@media (max-width: 700px) {
  .swq-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(64%, 520px); }
  .swq-hd p { display: none; }
}
@media (max-height: 520px) {
  .swq-panel { top: 8px; bottom: 8px; }
  .swq-hd h2, .swq-hd p, .swq-note { display: none; }
  .swq-tabs button { height: 42px; }
}
