/* Quest Reward Upgrades + Plan my route (quest-upgrades.html), on top of quests.css */
:root { --tip-bg: #070a1a; --tip-border: #5d6177; --green: #1eff00; --red: #ff4040; }
.qu .qd-crumbs { text-align: left; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.qu-btn { font: inherit; font-weight: 800; letter-spacing: .3px; color: #1b1300; cursor: pointer; padding: 10px 18px; border-radius: 10px;
  border: 1px solid #e0a000; background: linear-gradient(#ffcc33, #e0a000); white-space: nowrap; }
.qu-btn:hover { filter: brightness(1.07); } .qu-btn:disabled { opacity: .5; cursor: default; filter: none; }
.qu-btn.ghost { color: #e9e2c8; background: linear-gradient(180deg, #1d2338, #151a2b); border-color: #343c5c; font-weight: 700; }
.qu-btn.ghost:hover { border-color: var(--gold-dim); }
.qu-btn.ok { border-color: var(--green) !important; }

/* the box */
.qu-form { max-width: 900px; margin: 0 auto; }
.qu-box { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 14px;
  background: linear-gradient(160deg, #171c2e, #10131f 70%); border: 1px solid #343c5c; }
.qu-box:focus-within { border-color: var(--gold-dim); }
.qu-box svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.qu-box input { flex: 1; min-width: 0; font: inherit; color: var(--text); background: transparent; border: 0; padding: 10px 0; outline: none; }
.qu-opts { margin: 10px 4px 0; color: var(--muted); font-size: 14px; }
.qu-opts summary { cursor: pointer; width: fit-content; }
.qu-optrow { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; }
.qu-optrow label { display: inline-flex; align-items: center; gap: 8px; }
.qu-optrow select, .qu-filters select { font: inherit; color: var(--text); background: #0f1320; border: 1px solid #2c3350; border-radius: 9px; padding: 7px 10px; }
.qu-status { text-align: center; color: var(--muted); min-height: 22px; margin: 14px 0 0; }
.qu-status.err { color: #ff9b8a; }

/* character */
.qu-char { display: flex; align-items: center; gap: 16px; margin: 22px 0 14px; padding: 14px 18px; border-radius: 14px;
  background: radial-gradient(520px 200px at 100% 50%, rgba(248, 183, 0, .12), transparent 70%), linear-gradient(160deg, #171c2e, #10131f 70%);
  border: 1px solid #262d45; flex-wrap: wrap; }
.qu-char img { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--gold-dim); object-fit: cover; }
.qu-char .nm { font-family: var(--display); font-weight: 800; font-size: 22px; color: #f3ead0; }
.qu-char .sub { color: var(--muted); font-size: 14px; }
.qu-kpis { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.qu-kpis div { min-width: 120px; padding: 8px 12px; border-radius: 10px; background: #0f1320; border: 1px solid #262d45; text-align: center; }
.qu-kpis b { display: block; color: #ffe08a; font-size: 20px; } .qu-kpis span { color: var(--muted); font-size: 12px; }

.qu-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.qu-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.qu-check { display: inline-flex; align-items: center; gap: 7px; color: #c9cfdf; font-size: 14px; cursor: pointer; }
.qu-check input { width: 17px; height: 17px; accent-color: #f8b700; }
.qu-count { margin: 0; color: var(--muted); font-size: 13.5px; }

/* one upgrade quest */
.qu-list { display: flex; flex-direction: column; gap: 8px; }
.qu-row { display: grid; grid-template-columns: 34px 96px minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 12px; background: #121726; border: 1px solid #222941; }
.qu-row:hover { border-color: #39426a; }
.qu-row.done { opacity: .55; }
.qu-pick { display: grid; place-items: center; cursor: pointer; }
.qu-pick input { width: 20px; height: 20px; accent-color: #f8b700; cursor: pointer; }
.qu-gain { text-align: center; padding: 6px 4px; border-radius: 10px; background: rgba(30, 255, 0, .06); border: 1px solid rgba(30, 255, 0, .22); }
.qu-gain b { display: block; color: var(--green); font-size: 19px; line-height: 1.1; }
.qu-gain span { color: #9fd99a; font-size: 11.5px; }
.qu-q { min-width: 0; }
.qu-t { color: #f3ead0; font-weight: 700; font-size: 15.5px; text-decoration: none; margin-right: 6px; }
.qu-t:hover { color: var(--gold); text-decoration: underline; }
.qu-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.soon { color: #ffb86b; font-style: normal; font-weight: 700; }
.qu-rew { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: 6px 8px; border-radius: 10px; background: transparent; border: 1px solid transparent; }
.qu-rew:hover, .qu-rew[aria-expanded="true"] { background: #0f1320; border-color: #2c3350; }
.qu-rew > span:last-child { min-width: 0; }
.qu-rew b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qu-rew small { display: block; color: var(--muted); font-size: 12.5px; }
.qu-ic { flex: none; width: 38px; height: 38px; border-radius: 7px; border: 2px solid #3a3a3a; background: #111; display: grid; place-items: center; overflow: hidden; }
.qu-ic img { width: 100%; height: 100%; display: block; }
.qu-ic.q2 { border-color: #1eff00; } .qu-ic.q3 { border-color: #0070dd; } .qu-ic.q4 { border-color: #a335ee; } .qu-ic.q5 { border-color: #ff8000; }
.qu-ic-l { color: #888; font-weight: 800; }
.qu-done { font: inherit; font-size: 13px; font-weight: 700; color: #c9cfdf; cursor: pointer; padding: 7px 12px; border-radius: 9px;
  background: #171c2e; border: 1px solid #2c3350; }
.qu-done:hover { border-color: var(--gold-dim); color: #fff; }
.qu-tips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 0 2px 46px; }
.qu-tipcol { width: 320px; max-width: 100%; }
.qu-tiph { margin: 0 0 6px; color: var(--muted); font-size: 13px; } .qu-tiph b { color: var(--green); }
.qu-chain { width: 100%; margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.qu-chain a { color: #ffe08a; }
.q0 { color: #9d9d9d } .q1 { color: #fff } .q2 { color: #1eff00 } .q3 { color: #0070dd } .q4 { color: #a335ee } .q5 { color: #ff8000 }

/* in-game tooltip (as on Find Upgrades) */
.tip { background: var(--tip-bg); border: 2px solid var(--tip-border); border-radius: 6px; padding: 8px 11px;
  font-family: Verdana, "Segoe UI", sans-serif; font-size: 13px; line-height: 1.38; color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.45); }
.tip .nm { font-size: 15px; } .tip .il { color: #ffd100; } .tip .row { display: flex; justify-content: space-between; gap: 10px; }
.tip .eq { color: var(--green); } .tip .bad { color: var(--red); } .tip .sell { color: #fff; }
.coin { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin: 0 4px 0 1px; }
.coin.g { background: radial-gradient(circle at 35% 35%, #ffe680, #c99a00); }
.coin.s { background: radial-gradient(circle at 35% 35%, #f2f2f2, #8a8a8a); }
.coin.c { background: radial-gradient(circle at 35% 35%, #f0a070, #9a4a1c); }

/* the bar that plans the route */
.qu-plan { position: sticky; bottom: 12px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px;
  margin-top: 14px; padding: 10px 12px 10px 18px; border-radius: 14px; background: rgba(16, 19, 31, .96); border: 1px solid var(--gold-dim);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.qu-plan #qu-picked { margin-right: auto; color: #f3ead0; font-weight: 700; }

/* the route */
.qu-route { margin-top: 30px; scroll-margin-top: 80px; }
.qu-route-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.qu-route-top h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3vw, 32px); color: #f3ead0; }
.qu-route-top p { margin: 6px 0 0; color: #c9cfdf; } .qu-route-top p b { color: #ffe08a; }
.qu-route-btns { display: flex; gap: 8px; }
.qu-warn { color: #ffb86b; font-size: 13.5px; }
.qu-zone { margin-top: 14px; border-radius: 14px; background: linear-gradient(160deg, #161b2c, #10131f 70%); border: 1px solid #262d45; overflow: hidden; }
.qu-zone > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; padding: 12px 16px;
  border-bottom: 1px solid #222941; background: rgba(0, 0, 0, .18); }
.qu-zone h3 { margin: 0; font-family: var(--display); font-size: 20px; color: #f3ead0; }
.qu-zone header span { color: var(--muted); font-size: 13px; }
.qu-zone-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 460px); gap: 16px; padding: 12px 16px 16px; align-items: start; }
.qu-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.qu-steps > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 7px 4px; border-bottom: 1px dashed #232a40; }
.qu-steps > li:last-child { border-bottom: 0; }
.qu-sn { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #1b1300;
  background: linear-gradient(#ffcc33, #e0a000); }
.qu-way { font: inherit; font-size: 12px; font-weight: 800; color: #ffe08a; cursor: pointer; padding: 2px 8px; margin-right: 8px; border-radius: 999px;
  background: #0f1320; border: 1px solid #3a4266; vertical-align: 1px; }
.qu-way:hover { border-color: var(--gold); } .qu-way.ok { color: var(--green); border-color: var(--green); }
.qu-who { color: #f3ead0; }
.qu-steps ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: #c9cfdf; }
.qu-steps ul i { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 7px; border-radius: 50%; font-style: normal;
  font-weight: 900; font-size: 11px; vertical-align: 1px; }
.qu-steps li.k-pickup i { color: #1b1300; background: #ffd100; }
.qu-steps li.k-turnin i { color: #1b1300; background: #ffe9a8; }
.qu-steps li.k-do i { color: #fff; background: #3c4466; font-size: 10px; }
.qu-steps ul a { color: #ffe08a; text-decoration: none; } .qu-steps ul a:hover { text-decoration: underline; }
.qu-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; vertical-align: 1px; }
.qu-badge.up { color: #0b1a08; background: var(--green); }
.qu-badge.xp { color: #cfe6ff; background: #13294a; border: 1px solid #2c5a99; }
.qu-xp { color: #c9a0ff; font-weight: 700; font-size: 13px; }
.qu-zmap { position: sticky; top: 80px; border-radius: 10px; overflow: hidden; border: 1px solid #3a2f12; aspect-ratio: 1002 / 668; background: #0c0f1a; }
.qu-zmap img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.qp-n { position: absolute; transform: translate(-50%, -50%); min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 900; color: #1b1300; background: #ffd100; border: 2px solid #1b1300; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.qp-n.k-do { background: #9fb3ff; } .qp-n.k-turnin { background: #ffe9a8; }
.qu-routenote { margin: 14px 2px 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 1100px) {
  .qu-row { grid-template-columns: 30px 86px minmax(0, 1fr) auto; }
  .qu-rew { grid-column: 2 / 4; grid-row: 2; }
  .qu-done { grid-column: 4; grid-row: 1; }
}
@media (max-width: 860px) {
  .qu-zone-in { grid-template-columns: minmax(0, 1fr); }
  .qu-zmap { position: relative; top: 0; order: -1; }
  .qu-kpis { margin-left: 0; }
}
@media (max-width: 560px) {
  .qu-box { flex-wrap: wrap; padding: 8px; } .qu-box svg { display: none; } .qu-box input { flex-basis: 100%; padding: 6px 4px; }
  .qu-box .qu-btn { width: 100%; }
  .qu-row { grid-template-columns: 26px 1fr auto; gap: 8px 10px; }
  .qu-gain { grid-column: 2; grid-row: 1; text-align: left; padding: 4px 8px; width: fit-content; }
  .qu-gain b { display: inline; font-size: 17px; margin-right: 6px; }
  .qu-q { grid-column: 1 / -1; grid-row: 2; }
  .qu-rew { grid-column: 1 / -1; grid-row: 3; }
  .qu-done { grid-column: 3; grid-row: 1; }
  .qu-tips { padding-left: 0; }
  .qu-plan { justify-content: stretch; } .qu-plan .qu-btn { flex: 1; }
  .qu-kpis div { min-width: 0; flex: 1; }
}
@media print {
  .menu, .banner, .site-footer, .qu-form, .qu-status, #qu-results, .qu-route-btns, .qs-note, .qu-top { display: none !important; }
  body { background: #fff !important; color: #000; }
}

.tip a.nm { text-decoration: none; } .tip a.nm:hover { text-decoration: underline; }
.qu-tiph a { color: #ffe08a; }
