/* Modo Sono, Missões e Presente diário — mesmo padrão das janelas Pescador/Loja. */

/* Indicador na barra de atalhos */
.shortcut .qbadge {
  position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #e5533d; color: #fff; font: 700 10px/16px "Segoe UI", sans-serif;
  box-shadow: 0 0 0 2px #0b141c, 0 0 8px rgb(229 83 61 / 70%); pointer-events: none;
}

/* Enquanto você dormia */
.sleepwin { width: min(500px, 94vw); max-height: min(720px, 92vh); }
.sleepwin .wbody { display: grid; gap: 10px; overflow-y: auto; }
.sleepbadge { color: #c9b6ff; border-color: #6a4fd0; font-weight: 700; white-space: nowrap; }
.sleephunt {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: #0a141c; border: 1px solid #3c2f7a;
  box-shadow: inset 3px 0 0 #8a6cff;
}
.sleephunt .portrait.big { width: 56px; height: 56px; }
.sleeplist { display: grid; gap: 6px; }
.sleeplist .label { margin: 4px 0 0; }
.droplist { display: grid; gap: 4px; }
.droprow {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 5px 10px; border-radius: 8px; background: #0a141c; border: 1px solid var(--edge);
}
.droprow .owned { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.droprow .ithumb canvas { width: 28px; height: 28px; }
.sleeplist .chip { display: inline-flex; align-items: center; gap: 6px; }
.sleeplist .chip .portrait { width: 24px; height: 24px; }

/* Missões */
.questwin { width: min(500px, 94vw); height: min(720px, 92vh); }
.questwin .wbody { display: grid; grid-template-rows: auto auto 1fr; gap: 10px; overflow: hidden; }
.questpill { color: var(--muted); font-weight: 700; white-space: nowrap; }
.questpill.on { color: #ffd166; border-color: var(--gold-dim); box-shadow: 0 0 8px rgb(232 200 114 / 30%); }
.qcard {
  display: grid; gap: 7px; padding: 10px 12px; border-radius: 10px;
  background: #0a141c; border: 1px solid var(--edge);
}
.qcard.ready { border-color: var(--gold-dim); box-shadow: inset 3px 0 0 var(--gold), 0 0 12px rgb(232 200 114 / 15%); }
.qcard.claimed { opacity: 0.55; }
.qhead { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.qcard .thumb {
  width: 38px; height: 38px; display: grid; place-items: center; color: var(--gold);
  background: radial-gradient(#132433, #0a141c); border: 1px solid #23394b; border-radius: 6px; overflow: hidden;
}
.qcard .thumb .portrait { width: 34px; height: 34px; }
.qcard .thumb .type { font-size: 8px; padding: 1px 3px; }
.qcard .thumb .icon { width: 18px; height: 18px; }
.bar.questxp { height: 7px; margin: 0; }
.bar.questxp span { background: linear-gradient(90deg, #c9a24a, #ffe08a); box-shadow: 0 0 6px rgb(232 200 114 / 60%); }
.qcard.ready .bar.questxp span { background: linear-gradient(90deg, #2f9a4f, #7cf29a); }
.qreward { gap: 4px; }
.qreward .chip { font-size: 11px; }
.qreward .chip.gold { color: var(--gold); border-color: var(--gold-dim); font-weight: 700; }
.qactions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
body.playing .qactions button { padding: 5px 14px; }
body.playing .qactions .qabandon { background: transparent; color: var(--muted); border-color: #4a2a2a; }
body.playing .qactions .qabandon:hover:not(:disabled) { color: #ff8a80; border-color: #a33; }
body.playing .qactions .qabandon .icon { width: 14px; height: 14px; }

/* Presente diário */
.giftwin { width: min(560px, 96vw); }
.giftwin .wbody { display: grid; gap: 12px; }
.giftstreak { color: #ffb86b; border-color: #a8673a; font-weight: 700; white-space: nowrap; }
.giftcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.giftcard {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; min-height: 120px;
  padding: 8px 4px; border-radius: 9px; text-align: center;
  background: #0a141c; border: 1px solid var(--edge);
}
.giftcard.today { border-color: var(--gold); background: linear-gradient(#1c2a38, #0c1822); box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgb(232 200 114 / 40%); }
.giftcard.claimed { border-color: #1e5a30; }
.giftcard.claimed .giftloot { opacity: 0.55; }
.giftcard.locked { opacity: 0.6; }
.giftcard.big { background: linear-gradient(#2a2410, #0c1822); border-color: var(--gold-dim); }
.giftday { font: 700 11px Georgia, serif; font-variant: small-caps; letter-spacing: 0.1em; color: var(--gold); }
.giftloot { display: grid; gap: 4px; justify-items: center; }
.giftloot .chip { font-size: 10px; padding: 2px 5px; }
.giftitem { display: flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--text); }
.giftitem .ithumb canvas { width: 28px; height: 28px; }
.giftcard .tiertag { font-size: 9px; padding: 1px 6px; }
.giftcard.claimed .tiertag { color: var(--green); border-color: #1e5a30; background: #0b1f12; }

/* Depósito do Centro Pokémon (time à esquerda, depósito à direita, ações embaixo) */
body.playing .npcbubble.depotbubble .pkicon { width: 18px; height: 18px; margin: -3px 0; }
.depotwin { width: min(1000px, 96vw); height: min(720px, 94vh); }
.depotwin .wbody { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; overflow: hidden; }
.depotteampill { color: #8fd3ff; border-color: #2f7fd6; font-weight: 700; white-space: nowrap; }
.depotboxpill { color: var(--gold); border-color: var(--gold-dim); font-weight: 700; white-space: nowrap; }
.depotmain { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; min-height: 0; }
.depotside, .depotbox {
  display: grid; gap: 8px; min-height: 0; padding: 10px; border-radius: 10px;
  background: linear-gradient(160deg, #0d1c28, #09121a); border: 1px solid #1f4256; box-shadow: inset 0 0 18px rgb(79 216 232 / 6%);
}
.depotside { grid-template-rows: auto minmax(0, 1fr); }
.depotbox { grid-template-rows: auto auto minmax(0, 1fr); transition: border-color 0.15s, box-shadow 0.15s; }
.depothead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.depotcount { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.depotteam { display: grid; gap: 6px; align-content: start; overflow-y: auto; padding-right: 4px; }
.depotwin .thumb {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none;
  background: radial-gradient(#132433, #0a141c); border: 1px solid #23394b; border-radius: 4px; color: var(--muted);
}
.depotwin .thumb canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.depotwin .thumb.big { width: 62px; height: 62px; border-radius: 8px; border-color: #2f7fd6; box-shadow: 0 0 12px rgb(74 163 255 / 20%); }
.depotwin .thumb.big canvas { width: 56px; height: 56px; }
body.playing .depotwin .membercard[draggable="true"] { cursor: grab; }
.depotfilters .dexsearch { flex: 1 1 180px; }
.depotgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; align-content: start;
  overflow-y: auto; min-height: 0; padding: 2px 4px 2px 2px;
}
body.playing .depotcard {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 16px 4px 7px; text-align: center; cursor: grab;
  background: radial-gradient(circle at 50% 42%, #132433, #0a141c 72%); color: var(--text);
  border: 1px solid var(--edge); border-bottom: 3px solid color-mix(in srgb, var(--tc) 85%, #000); border-radius: 8px;
}
body.playing .depotcard:hover { border-color: var(--gold-dim) var(--gold-dim) var(--tc); background: radial-gradient(circle at 50% 42%, #183044, #0e1b26 72%); }
body.playing .depotcard.selected { border-color: var(--gold) var(--gold) var(--tc); background: linear-gradient(#2a2410, #0c1822); box-shadow: 0 0 0 1px var(--gold), 0 0 12px rgb(232 200 114 / 35%); }
.depotcard.fainted canvas { filter: grayscale(1) brightness(0.8); }
.depotcard .dexsprite { width: 46px; height: 46px; }
.depotlv { position: absolute; top: 3px; left: 6px; font-size: 10px; font-style: normal; font-weight: 700; color: #8fd3ff; font-variant-numeric: tabular-nums; }
.depotcard .caughtball { left: auto; right: 4px; }
.depotwin .wbody.dragteam .depotbox { border-color: var(--gold-dim); }
.depotbox.over { border-color: var(--gold); box-shadow: inset 0 0 18px rgb(232 200 114 / 12%), 0 0 12px rgb(232 200 114 / 25%); }
.depotwin .wbody.dragdepot .depotteam .membercard { border-style: dashed; border-color: #2f7fd6; }
body.playing .depotwin .membercard.over { border-color: #8fd3ff; box-shadow: 0 0 0 1px #8fd3ff, 0 0 12px rgb(74 163 255 / 45%); }
.depotfoot { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.depotpicked { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-width: 0; }
.depotpicked > .small { grid-column: 1 / -1; margin: 0; }
.depotinfo { display: grid; gap: 5px; min-width: 0; }
.depotinfo .teamtitle h3 { font-size: 18px; }
.depotfacts { display: flex; flex-wrap: wrap; gap: 4px; }
.depotfacts .chip { font-size: 11px; color: var(--cyan); border-color: #1f4256; background: #08131b; }
.teamtag.box { color: var(--gold); border-color: var(--gold-dim); background: #1f1808; }
.depotactions { display: grid; grid-template-columns: repeat(3, auto); gap: 6px; }
body.playing .depotactions button { padding: 10px 14px; font-size: 13px; letter-spacing: 0.03em; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.playing .depotactions .pkicon { width: 18px; height: 18px; }
.teamdepot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
body.playing .teamdepot .link { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; font-size: 11px; }
body.playing .teamdepot .pkicon { width: 16px; height: 16px; }
@media (max-width: 820px) {
  .depotwin .wbody { grid-template-rows: none; overflow-y: auto; }
  .depotmain { grid-template-columns: 1fr; }
  .depotgrid { max-height: 46vh; }
  .depotfoot { grid-template-columns: 1fr; }
  .depotactions { grid-template-columns: 1fr; }
}

/* Mercado do servidor (terminal vermelho do Centro Pokémon) — mesmas peças da Loja do Mark */
body.playing .npcbubble.marketbubble { border-color: #ff8a80; }
.marketwin { width: min(760px, 96vw); height: min(760px, 94vh); }
.marketwin .wbody { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; overflow: hidden; }
.marketactive { color: #8fd3ff; border-color: #2f7fd6; font-weight: 700; white-space: nowrap; }
.marketactive.full { color: #ff8a80; border-color: #a33; }
body.playing .markettabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.playing .markettabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; min-width: 0; }
.markettabs .icon { width: 16px; height: 16px; flex: none; }
.markettabs .pkicon svg { width: 18px; height: 18px; }
.markettools { display: grid; gap: 8px; }
.marketfilters .dexsearch { flex: 1 1 200px; }
body.playing .marketfilters .marketlevel { width: 78px; padding: 7px 8px; }
body.playing .marketside { grid-template-columns: 1fr 1fr; }
.marketlist { min-height: 0; }
.marketlist > .dexkicker { margin-top: 4px; }
.marketwin .thumb {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  background: radial-gradient(#132433, #0a141c); border: 1px solid #23394b; border-radius: 6px; color: var(--muted);
}
.marketwin .thumb canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.marketwin .thumb.big { width: 62px; height: 62px; border-radius: 8px; border-color: #2f7fd6; box-shadow: 0 0 12px rgb(74 163 255 / 20%); }
.marketwin .thumb.big canvas { width: 56px; height: 56px; }
.marketwin .thumb .ithumb canvas { width: 32px; height: 32px; }
.marketwin .thumb.big .ithumb canvas { width: 48px; height: 48px; }
.marketcard .shoptext { gap: 3px; }
.marketpoke { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.marketpoke .typebadge { width: 15px; height: 15px; }
.marketref { color: var(--gold-dim) !important; }
.marketearned { color: var(--green) !important; font-weight: 700; }
.marketcard .shopside .price { font-size: 15px; }
.marketcard .shopside .price.buy { color: #ff8a80; }
.marketcard .shopside .price.sell { color: var(--green); }
.marketcard.mine.sold { border-color: #1e5a30; }
.marketcard.mine.expired, .marketcard.mine.cancelled { opacity: 0.7; }
.teamtag.sold { color: var(--gold); border-color: var(--gold-dim); background: #1f1808; }
body.playing .marketcancel { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; background: transparent; color: var(--muted); border-color: #4a2a2a; }
body.playing .marketcancel:hover:not(:disabled) { color: #ff8a80; border-color: #a33; }
body.playing .marketcancel .icon { width: 12px; height: 12px; }
.marketfoot { min-height: 96px; align-content: start; }
.marketfoot .shoppicked .shoptext b { font-size: 15px; }
.marketprice { flex-wrap: wrap; }
body.playing .marketprice input { width: 110px; }
.marketsum { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.marketfoot .shopgo .pkicon svg { width: 18px; height: 18px; }
.msg.sys b { color: #ff8a80; }
@media (max-width: 760px) {
  .marketwin { height: 94vh; }
  body.playing .markettabs button span { overflow: hidden; text-overflow: ellipsis; }
  .markettabs .icon { display: none; }
}
