/* Diário de Quests (quests-ui.js, 27/09/2026): janela larga em três colunas no molde da ficha — o diário à esquerda, a quest
   no meio (objetivos e runs), onde ir, itens, recompensas e botões à direita — e o rastreador da quest fixada no alto da
   coluna do Hunt Analyzer. Moldura de bronze e ouro do layout; os títulos usam o .fh-t da ficha. */
#jan.jquests { width: min(1500px, 97vw); height: min(880px, 92vh); max-height: 92vh; }
#jan.jquests #janC { display: block; padding: 12px; overflow-y: auto; }
.qs { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.qs .win { box-shadow: 0 0 0 1px #000, 0 0 0 2px #5c4a2c, 0 0 0 3px #1a140c, inset 0 0 0 1px rgba(228,188,108,.14) !important; border-radius: 6px; }
.qs-col { padding: 10px 12px 12px; }
.qs-meio, .qs-dir { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.qs .neg { color: #ff8060; }

/* barra de progresso fina, dourada; verde quando fecha */
.qs-barra { height: 7px; margin-top: 4px; border-radius: 2px; background: #07080a; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #3d3322; overflow: hidden; }
.qs-barra i { display: block; height: 100%; background: linear-gradient(#ffd46a, #d59a22 55%, #9a6b10); }
.qs-barra.ok i { background: linear-gradient(#35e763, #0a9a31 55%, #057424); }

/* selo de estado */
.qs-selo { padding: 1px 7px; border-radius: 3px; font: 700 10px/1.5 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 0 0 1px currentColor; }
.qs-selo.ativa { color: #ffd98a; } .qs-selo.disponivel { color: #7fd6ff; } .qs-selo.bloqueada { color: #9a8f80; } .qs-selo.concluida { color: #5fe08a; }

/* esquerda: o diário */
.qs-diario { display: flex; flex-direction: column; gap: 8px; }
.qs-diario input, .qs-diario select { width: 100%; box-sizing: border-box; }
.qs-abas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.qs-abas .bt { padding: 5px 2px; font-size: 12px; white-space: normal; line-height: 1.15; }
.qs-abas .bt small { opacity: .75; }
.qs-cont { display: flex; justify-content: flex-end; color: var(--ink-muted); font: 600 11px var(--font-mono); }
.qs-cards { display: flex; flex-direction: column; gap: 7px; }
.qs-c { display: flex; gap: 9px; padding: 8px; border-radius: 6px; cursor: pointer; background: rgba(0,0,0,.35); box-shadow: 0 0 0 1px #2c2417; }
.qs-c:hover { box-shadow: 0 0 0 1px #8a6d3b; }
.qs-c.on { background: linear-gradient(rgba(58,46,23,.55), rgba(20,16,9,.6)); box-shadow: 0 0 0 1px #000, 0 0 0 2px #e4bc6c, 0 0 12px rgba(228,188,108,.25); }
.qs-c.bloqueada { opacity: .6; }
.qs-ret { flex: none; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px;
  background: radial-gradient(circle at 50% 40%, #2c261c, #070605 75%); box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #5c4a2c; }
.qs-ret img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.qs-cm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qs-cm > b { color: var(--ink); font: 700 14px var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-cm > small { color: var(--ink-muted); font-size: 11px; }
.qs-cl { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.qs-cl em { color: var(--ink-muted); font: 11px var(--font-mono); font-style: normal; }
.qs-vazio { color: var(--ink-muted); font-style: italic; margin: 6px 2px; }

/* meio: cabeçalho, objetivos e runs */
.qs-cab { display: flex; gap: 16px; padding: 14px 16px; }
.qs-cret { flex: none; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px;
  background: radial-gradient(circle at 50% 40%, #3a3122, #070605 75%); box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #8a6d3b, 0 0 14px rgba(228,188,108,.15); }
.qs-cret img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.qs-ct { flex: 1; min-width: 0; }
.qs-ct h3 { margin: 0 0 6px; color: #ffd98a; font: 700 24px/1.1 var(--font-display); letter-spacing: .03em; text-shadow: 0 2px 2px #000; }
.qs-ct .qs-cl { justify-content: flex-start; gap: 12px; color: var(--ink-muted); font-size: 13px; }
.qs-ct p { margin: 8px 0 0; color: var(--ink); font: 400 14px/1.45 var(--font-serif); }
.qs-os { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.qs-o { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr); gap: 9px; align-items: center; padding: 7px 9px; border-radius: 5px; background: rgba(0,0,0,.3); box-shadow: 0 0 0 1px #2c2417; }
.qs-o.feita { box-shadow: 0 0 0 1px #2f5c35; }
.qs-o.trancada { opacity: .55; }
.qs-cx { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 3px; background: #07080a; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #5c4a2c; color: #5fe08a; font: 700 13px var(--font-mono); }
.qs-o.trancada .qs-cx { font-size: 11px; }
.qs-oi { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.qs-oi img { max-width: 34px; max-height: 34px; image-rendering: pixelated; }
.qs-ol { display: flex; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 14px; }
.qs-ol b { flex: none; font: 600 13px var(--font-mono); color: #ffd98a; }
.qs-o.feita .qs-ol b { color: #5fe08a; }
.qs-ot small { color: var(--ink-muted); font-size: 12px; }
.qs-runs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.qs-run { display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,.35); box-shadow: 0 0 0 1px #3d3322; }
.qs-prev { position: relative; height: 110px; background: #07080a center / cover no-repeat; image-rendering: pixelated; box-shadow: inset 0 -40px 30px -10px rgba(0,0,0,.85); }
.qs-prev.grande { height: 150px; border-radius: 5px; box-shadow: inset 0 -40px 30px -10px rgba(0,0,0,.85), 0 0 0 1px #5c4a2c; }
.qs-prev span { position: absolute; left: 10px; bottom: 7px; color: #ffd98a; font: 700 15px var(--font-display); text-shadow: 0 2px 2px #000; }
.qs-rm { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px; }
.qs-rl { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-muted); font-size: 12px; }
.qs-rl b { color: var(--ink); font: 600 12px var(--font-mono); }
.qs-rm .bt { margin-top: 4px; }

/* direita: onde ir, itens, recompensas, botões */
.qs-onde { margin: 8px 0 0; color: var(--ink-muted); font-size: 12px; line-height: 1.4; }
.qs-onde b { color: var(--ink); }
.qs-q { position: relative; flex: none; width: 44px; height: 44px; border-radius: 4px; background: #0a0c0e center / 34px no-repeat; image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #5c4a2c; border: 1px solid transparent; box-sizing: border-box; }
.qs-q b { position: absolute; right: 2px; bottom: 1px; color: #fff; font: 700 10px var(--font-mono); text-shadow: 0 1px 1px #000, 0 0 2px #000; }
.qs-it, .qs-pr { display: flex; gap: 10px; align-items: center; padding: 5px 0; }
.qs-it + .qs-it, .qs-pr + .qs-pr { border-top: 1px solid rgba(92,74,44,.4); }
.qs-it > div:last-child, .qs-pr > div:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qs-it b, .qs-pr b { color: var(--ink); font-size: 14px; }
.qs-it small, .qs-pr small { color: var(--ink-muted); font-size: 11px; }
.qs-xp { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: radial-gradient(circle, #3d2f12, #0a0c0e 75%);
  box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #8a6d3b; color: #ffd98a; font: 700 14px var(--font-display); }
.qs-bots { display: flex; flex-direction: column; gap: 7px; }
.qs-bots .bt { width: 100%; padding: 7px; }
.qs-bots .qs-principal { padding: 10px; font-size: 15px; }
.qs-bots small { color: var(--ink-muted); font-size: 12px; text-align: center; }
.qs-bots .qs-aband { opacity: .75; }

/* o rastreador da quest fixada (coluna do Hunt Analyzer) */
#qsTrack .miolo { cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
#qsTrack .qs-tn { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
#qsTrack .qs-tn .qs-ret { width: 34px; height: 34px; }
#qsTrack .qs-tn b { color: #ffd98a; font: 700 13px/1.2 var(--font-display); }
#qsTrack .qs-to { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--ink); }
#qsTrack .qs-to b { font: 600 11px var(--font-mono); color: var(--ink-muted); }
#qsTrack .qs-to.feita { color: #5fe08a; } #qsTrack .qs-to.trancada { color: var(--ink-muted); }
#qsTrack .qs-barra { height: 4px; margin: 0 0 3px; }

/* retratos maiores: a figura vem com a altura na linha (figura()); aqui ela enche a moldura */
.qs-ret img { height: 50px !important; width: auto; max-width: none; max-height: none; }
.qs-cret img { height: 92px !important; width: auto; max-width: none; max-height: none; }
#qsTrack .qs-tn .qs-ret img { height: 34px !important; }

@media (max-width: 1400px) { .qs { grid-template-columns: 250px minmax(0, 1fr) 260px; } }
@media (max-width: 1100px) {
  .qs { grid-template-columns: minmax(0, 1fr); }
  .qs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-height: 330px; overflow-y: auto; padding: 2px; }      /* a lista não empurra a quest para longe */
}
@media (max-width: 700px) {
  #jan.jquests #janC { padding: 8px; }
  .qs-cab { flex-direction: column; gap: 8px; padding: 10px; } .qs-cret { width: 72px; height: 72px; } .qs-ct h3 { font-size: 20px; }
  .qs-runs { grid-template-columns: minmax(0, 1fr); }
}
